diff --git a/Makefile.common b/Makefile.common index ad58095034..95215e95da 100644 --- a/Makefile.common +++ b/Makefile.common @@ -1216,6 +1216,10 @@ ifeq ($(findstring 1, $(HAVE_VULKAN) $(HAVE_D3D10) $(HAVE_D3D11) $(HAVE_D3D12)), INCLUDE_DIRS += -Igfx/include endif +ifeq ($(findstring 1, $(HAVE_D3D10) $(HAVE_D3D11) $(HAVE_D3D12)),1) + INCLUDE_DIRS += -Igfx/include/dxsdk +endif + ifeq ($(WANT_WGL), 1) OBJ += gfx/drivers_context/wgl_ctx.o LIBS += -lcomctl32 diff --git a/gfx/include/dxsdk/audiodefs.h b/gfx/include/dxsdk/audiodefs.h new file mode 100644 index 0000000000..089612758a --- /dev/null +++ b/gfx/include/dxsdk/audiodefs.h @@ -0,0 +1,263 @@ +/*************************************************************************** + * + * Copyright (c) Microsoft Corporation. All rights reserved. + * + * File: audiodefs.h + * Content: Basic constants and data types for audio work. + * + * Remarks: This header file defines all of the audio format constants and + * structures required for XAudio2 and XACT work. Providing these + * in a single location avoids certain dependency problems in the + * legacy audio headers (mmreg.h, mmsystem.h, ksmedia.h). + * + * NOTE: Including the legacy headers after this one may cause a + * compilation error, because they define some of the same types + * defined here without preprocessor guards to avoid multiple + * definitions. If a source file needs one of the old headers, + * it must include it before including audiodefs.h. + * + ***************************************************************************/ + +#ifndef __AUDIODEFS_INCLUDED__ +#define __AUDIODEFS_INCLUDED__ + +#include // For WORD, DWORD, etc. + +#pragma pack(push, 1) // Pack structures to 1-byte boundaries + + +/************************************************************************** + * + * WAVEFORMATEX: Base structure for many audio formats. Format-specific + * extensions can be defined for particular formats by using a non-zero + * cbSize value and adding extra fields to the end of this structure. + * + ***************************************************************************/ + +#ifndef _WAVEFORMATEX_ + + #define _WAVEFORMATEX_ + typedef struct tWAVEFORMATEX + { + WORD wFormatTag; // Integer identifier of the format + WORD nChannels; // Number of audio channels + DWORD nSamplesPerSec; // Audio sample rate + DWORD nAvgBytesPerSec; // Bytes per second (possibly approximate) + WORD nBlockAlign; // Size in bytes of a sample block (all channels) + WORD wBitsPerSample; // Size in bits of a single per-channel sample + WORD cbSize; // Bytes of extra data appended to this struct + } WAVEFORMATEX; + +#endif + +// Defining pointer types outside of the #if block to make sure they are +// defined even if mmreg.h or mmsystem.h is #included before this file + +typedef WAVEFORMATEX *PWAVEFORMATEX, *NPWAVEFORMATEX, *LPWAVEFORMATEX; +typedef const WAVEFORMATEX *PCWAVEFORMATEX, *LPCWAVEFORMATEX; + + +/************************************************************************** + * + * WAVEFORMATEXTENSIBLE: Extended version of WAVEFORMATEX that should be + * used as a basis for all new audio formats. The format tag is replaced + * with a GUID, allowing new formats to be defined without registering a + * format tag with Microsoft. There are also new fields that can be used + * to specify the spatial positions for each channel and the bit packing + * used for wide samples (e.g. 24-bit PCM samples in 32-bit containers). + * + ***************************************************************************/ + +#ifndef _WAVEFORMATEXTENSIBLE_ + + #define _WAVEFORMATEXTENSIBLE_ + typedef struct + { + WAVEFORMATEX Format; // Base WAVEFORMATEX data + union + { + WORD wValidBitsPerSample; // Valid bits in each sample container + WORD wSamplesPerBlock; // Samples per block of audio data; valid + // if wBitsPerSample=0 (but rarely used). + WORD wReserved; // Zero if neither case above applies. + } Samples; + DWORD dwChannelMask; // Positions of the audio channels + GUID SubFormat; // Format identifier GUID + } WAVEFORMATEXTENSIBLE; + +#endif + +typedef WAVEFORMATEXTENSIBLE *PWAVEFORMATEXTENSIBLE, *LPWAVEFORMATEXTENSIBLE; +typedef const WAVEFORMATEXTENSIBLE *PCWAVEFORMATEXTENSIBLE, *LPCWAVEFORMATEXTENSIBLE; + + + +/************************************************************************** + * + * Define the most common wave format tags used in WAVEFORMATEX formats. + * + ***************************************************************************/ + +#ifndef WAVE_FORMAT_PCM // Pulse Code Modulation + + // If WAVE_FORMAT_PCM is not defined, we need to define some legacy types + // for compatibility with the Windows mmreg.h / mmsystem.h header files. + + // Old general format structure (information common to all formats) + typedef struct waveformat_tag + { + WORD wFormatTag; + WORD nChannels; + DWORD nSamplesPerSec; + DWORD nAvgBytesPerSec; + WORD nBlockAlign; + } WAVEFORMAT, *PWAVEFORMAT, NEAR *NPWAVEFORMAT, FAR *LPWAVEFORMAT; + + // Specific format structure for PCM data + typedef struct pcmwaveformat_tag + { + WAVEFORMAT wf; + WORD wBitsPerSample; + } PCMWAVEFORMAT, *PPCMWAVEFORMAT, NEAR *NPPCMWAVEFORMAT, FAR *LPPCMWAVEFORMAT; + + #define WAVE_FORMAT_PCM 0x0001 + +#endif + +#ifndef WAVE_FORMAT_ADPCM // Microsoft Adaptive Differental PCM + + // Replicate the Microsoft ADPCM type definitions from mmreg.h. + + typedef struct adpcmcoef_tag + { + short iCoef1; + short iCoef2; + } ADPCMCOEFSET; + + #pragma warning(push) + #pragma warning(disable:4200) // Disable zero-sized array warnings + + typedef struct adpcmwaveformat_tag { + WAVEFORMATEX wfx; + WORD wSamplesPerBlock; + WORD wNumCoef; + ADPCMCOEFSET aCoef[]; // Always 7 coefficient pairs for MS ADPCM + } ADPCMWAVEFORMAT; + + #pragma warning(pop) + + #define WAVE_FORMAT_ADPCM 0x0002 + +#endif + +// Other frequently used format tags + +#ifndef WAVE_FORMAT_UNKNOWN + #define WAVE_FORMAT_UNKNOWN 0x0000 // Unknown or invalid format tag +#endif + +#ifndef WAVE_FORMAT_IEEE_FLOAT + #define WAVE_FORMAT_IEEE_FLOAT 0x0003 // 32-bit floating-point +#endif + +#ifndef WAVE_FORMAT_MPEGLAYER3 + #define WAVE_FORMAT_MPEGLAYER3 0x0055 // ISO/MPEG Layer3 +#endif + +#ifndef WAVE_FORMAT_DOLBY_AC3_SPDIF + #define WAVE_FORMAT_DOLBY_AC3_SPDIF 0x0092 // Dolby Audio Codec 3 over S/PDIF +#endif + +#ifndef WAVE_FORMAT_WMAUDIO2 + #define WAVE_FORMAT_WMAUDIO2 0x0161 // Windows Media Audio +#endif + +#ifndef WAVE_FORMAT_WMAUDIO3 + #define WAVE_FORMAT_WMAUDIO3 0x0162 // Windows Media Audio Pro +#endif + +#ifndef WAVE_FORMAT_WMASPDIF + #define WAVE_FORMAT_WMASPDIF 0x0164 // Windows Media Audio over S/PDIF +#endif + +#ifndef WAVE_FORMAT_EXTENSIBLE + #define WAVE_FORMAT_EXTENSIBLE 0xFFFE // All WAVEFORMATEXTENSIBLE formats +#endif + + +/************************************************************************** + * + * Define the most common wave format GUIDs used in WAVEFORMATEXTENSIBLE + * formats. Note that including the Windows ksmedia.h header after this + * one will cause build problems; this cannot be avoided, since ksmedia.h + * defines these macros without preprocessor guards. + * + ***************************************************************************/ + +#if defined(__cplusplus) && defined(_MSC_VER) // uuid() and __uuidof() are only available in C++ + + #ifndef KSDATAFORMAT_SUBTYPE_PCM + struct __declspec(uuid("00000001-0000-0010-8000-00aa00389b71")) KSDATAFORMAT_SUBTYPE_PCM_STRUCT; + #define KSDATAFORMAT_SUBTYPE_PCM __uuidof(KSDATAFORMAT_SUBTYPE_PCM_STRUCT) + #endif + + #ifndef KSDATAFORMAT_SUBTYPE_ADPCM + struct __declspec(uuid("00000002-0000-0010-8000-00aa00389b71")) KSDATAFORMAT_SUBTYPE_ADPCM_STRUCT; + #define KSDATAFORMAT_SUBTYPE_ADPCM __uuidof(KSDATAFORMAT_SUBTYPE_ADPCM_STRUCT) + #endif + + #ifndef KSDATAFORMAT_SUBTYPE_IEEE_FLOAT + struct __declspec(uuid("00000003-0000-0010-8000-00aa00389b71")) KSDATAFORMAT_SUBTYPE_IEEE_FLOAT_STRUCT; + #define KSDATAFORMAT_SUBTYPE_IEEE_FLOAT __uuidof(KSDATAFORMAT_SUBTYPE_IEEE_FLOAT_STRUCT) + #endif + +#endif + + +/************************************************************************** + * + * Speaker positions used in the WAVEFORMATEXTENSIBLE dwChannelMask field. + * + ***************************************************************************/ + +#ifndef SPEAKER_FRONT_LEFT + #define SPEAKER_FRONT_LEFT 0x00000001 + #define SPEAKER_FRONT_RIGHT 0x00000002 + #define SPEAKER_FRONT_CENTER 0x00000004 + #define SPEAKER_LOW_FREQUENCY 0x00000008 + #define SPEAKER_BACK_LEFT 0x00000010 + #define SPEAKER_BACK_RIGHT 0x00000020 + #define SPEAKER_FRONT_LEFT_OF_CENTER 0x00000040 + #define SPEAKER_FRONT_RIGHT_OF_CENTER 0x00000080 + #define SPEAKER_BACK_CENTER 0x00000100 + #define SPEAKER_SIDE_LEFT 0x00000200 + #define SPEAKER_SIDE_RIGHT 0x00000400 + #define SPEAKER_TOP_CENTER 0x00000800 + #define SPEAKER_TOP_FRONT_LEFT 0x00001000 + #define SPEAKER_TOP_FRONT_CENTER 0x00002000 + #define SPEAKER_TOP_FRONT_RIGHT 0x00004000 + #define SPEAKER_TOP_BACK_LEFT 0x00008000 + #define SPEAKER_TOP_BACK_CENTER 0x00010000 + #define SPEAKER_TOP_BACK_RIGHT 0x00020000 + #define SPEAKER_RESERVED 0x7FFC0000 + #define SPEAKER_ALL 0x80000000 + #define _SPEAKER_POSITIONS_ +#endif + +#ifndef SPEAKER_STEREO + #define SPEAKER_MONO (SPEAKER_FRONT_CENTER) + #define SPEAKER_STEREO (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT) + #define SPEAKER_2POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_LOW_FREQUENCY) + #define SPEAKER_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_BACK_CENTER) + #define SPEAKER_QUAD (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT) + #define SPEAKER_4POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT) + #define SPEAKER_5POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT) + #define SPEAKER_7POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_FRONT_LEFT_OF_CENTER | SPEAKER_FRONT_RIGHT_OF_CENTER) + #define SPEAKER_5POINT1_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT) + #define SPEAKER_7POINT1_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT) +#endif + + +#pragma pack(pop) + +#endif // #ifndef __AUDIODEFS_INCLUDED__ diff --git a/gfx/include/dxsdk/comdecl.h b/gfx/include/dxsdk/comdecl.h new file mode 100644 index 0000000000..367f4d028c --- /dev/null +++ b/gfx/include/dxsdk/comdecl.h @@ -0,0 +1,59 @@ +// comdecl.h: Macros to facilitate COM interface and GUID declarations. +// Copyright (c) Microsoft Corporation. All rights reserved. + +#ifndef _COMDECL_H_ +#define _COMDECL_H_ + +#ifndef _XBOX + #include // For standard COM interface macros +#else + #pragma warning(push) + #pragma warning(disable:4061) + #include // Required by xobjbase.h + #include // Special definitions for Xbox build + #pragma warning(pop) +#endif + +// The DEFINE_CLSID() and DEFINE_IID() macros defined below allow COM GUIDs to +// be declared and defined in such a way that clients can obtain the GUIDs using +// either the __uuidof() extension or the old-style CLSID_Foo / IID_IFoo names. +// If using the latter approach, the client can also choose whether to get the +// GUID definitions by defining the INITGUID preprocessor constant or by linking +// to a GUID library. This works in either C or C++. + +#if defined(__cplusplus) && defined(_MSC_VER) + + #define DECLSPEC_UUID_WRAPPER(x) __declspec(uuid(#x)) + #ifdef INITGUID + + #define DEFINE_CLSID(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ + class DECLSPEC_UUID_WRAPPER(l##-##w1##-##w2##-##b1##b2##-##b3##b4##b5##b6##b7##b8) className; \ + EXTERN_C const GUID DECLSPEC_SELECTANY CLSID_##className = __uuidof(className) + + #define DEFINE_IID(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ + interface DECLSPEC_UUID_WRAPPER(l##-##w1##-##w2##-##b1##b2##-##b3##b4##b5##b6##b7##b8) interfaceName; \ + EXTERN_C const GUID DECLSPEC_SELECTANY IID_##interfaceName = __uuidof(interfaceName) + + #else // INITGUID + + #define DEFINE_CLSID(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ + class DECLSPEC_UUID_WRAPPER(l##-##w1##-##w2##-##b1##b2##-##b3##b4##b5##b6##b7##b8) className; \ + EXTERN_C const GUID CLSID_##className + + #define DEFINE_IID(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ + interface DECLSPEC_UUID_WRAPPER(l##-##w1##-##w2##-##b1##b2##-##b3##b4##b5##b6##b7##b8) interfaceName; \ + EXTERN_C const GUID IID_##interfaceName + + #endif // INITGUID + +#else // __cplusplus + + #define DEFINE_CLSID(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ + DEFINE_GUID(CLSID_##className, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8) + + #define DEFINE_IID(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ + DEFINE_GUID(IID_##interfaceName, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8) + +#endif // __cplusplus + +#endif // #ifndef _COMDECL_H_ diff --git a/gfx/include/dxsdk/d2d1.h b/gfx/include/dxsdk/d2d1.h new file mode 100644 index 0000000000..6891e9b394 --- /dev/null +++ b/gfx/include/dxsdk/d2d1.h @@ -0,0 +1,3768 @@ +//--------------------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// This file is automatically generated. Please do not edit it directly. +// +// File name: D2D1.h +//--------------------------------------------------------------------------- +#ifdef _MSC_VER +#pragma once +#endif // #ifdef _MSC_VER + +#ifndef _D2D1_H_ +#define _D2D1_H_ + +#ifndef COM_NO_WINDOWS_H +#include +#endif // #ifndef COM_NO_WINDOWS_H +#include +#include +#include +#include +#include +/*#pragma region Desktop Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ +#include +/*#else*/ +/*#include */ +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ + +#ifndef D2D_USE_C_DEFINITIONS + +// +// We use the 'C' definitions if C++ is not defined +// +#ifndef __cplusplus +#define D2D_USE_C_DEFINITIONS +#endif + +#endif // #ifndef D2D_USE_C_DEFINITIONS + +/*#include */ + +// +// Forward declarations here +// + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + +typedef interface IDWriteTextFormat IDWriteTextFormat; +typedef interface IDWriteTextLayout IDWriteTextLayout; +typedef interface IDWriteRenderingParams IDWriteRenderingParams; +typedef interface IDXGISurface IDXGISurface; +typedef interface IWICBitmap IWICBitmap; +typedef interface IWICBitmapSource IWICBitmapSource; + +typedef struct DWRITE_GLYPH_RUN DWRITE_GLYPH_RUN; + +#ifndef D2D_USE_C_DEFINITIONS + +interface ID2D1Factory; +interface ID2D1RenderTarget; +interface ID2D1BitmapRenderTarget; +interface ID2D1SimplifiedGeometrySink; +interface ID2D1TessellationSink; +interface ID2D1Geometry; +interface ID2D1Brush; + +#else + +typedef interface ID2D1Factory ID2D1Factory; +typedef interface ID2D1RenderTarget ID2D1RenderTarget; +typedef interface ID2D1BitmapRenderTarget ID2D1BitmapRenderTarget; +typedef interface ID2D1SimplifiedGeometrySink ID2D1SimplifiedGeometrySink;; +typedef interface ID2D1TessellationSink ID2D1TessellationSink; +typedef interface ID2D1Geometry ID2D1Geometry; +typedef interface ID2D1Brush ID2D1Brush; + +#endif + +#define D2D1_INVALID_TAG ULONGLONG_MAX +#define D2D1_DEFAULT_FLATTENING_TOLERANCE (0.25f) + + +/// +/// This defines the superset of interpolation mode supported by D2D APIs +/// and built-in effects +/// +enum +{ + D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR = 0, + D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR = 1, + D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC = 2, + D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR = 3, + D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC = 4, + D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC = 5, + D2D1_INTERPOLATION_MODE_DEFINITION_FANT = 6, + D2D1_INTERPOLATION_MODE_DEFINITION_MIPMAP_LINEAR = 7 + +}; + + +/// +/// This determines what gamma is used for interpolation/blending. +/// +typedef enum D2D1_GAMMA +{ + + /// + /// Colors are manipulated in 2.2 gamma color space. + /// + D2D1_GAMMA_2_2 = 0, + + /// + /// Colors are manipulated in 1.0 gamma color space. + /// + D2D1_GAMMA_1_0 = 1, + D2D1_GAMMA_FORCE_DWORD = 0xffffffff + +} D2D1_GAMMA; + + +/// +/// Specifies what the contents are of an opacity mask. +/// +typedef enum D2D1_OPACITY_MASK_CONTENT +{ + + /// + /// The mask contains geometries or bitmaps. + /// + D2D1_OPACITY_MASK_CONTENT_GRAPHICS = 0, + + /// + /// The mask contains text rendered using one of the natural text modes. + /// + D2D1_OPACITY_MASK_CONTENT_TEXT_NATURAL = 1, + + /// + /// The mask contains text rendered using one of the GDI compatible text modes. + /// + D2D1_OPACITY_MASK_CONTENT_TEXT_GDI_COMPATIBLE = 2, + D2D1_OPACITY_MASK_CONTENT_FORCE_DWORD = 0xffffffff + +} D2D1_OPACITY_MASK_CONTENT; + + +/// +/// Enum which describes how to sample from a source outside its base tile. +/// +typedef enum D2D1_EXTEND_MODE +{ + + /// + /// Extend the edges of the source out by clamping sample points outside the source + /// to the edges. + /// + D2D1_EXTEND_MODE_CLAMP = 0, + + /// + /// The base tile is drawn untransformed and the remainder are filled by repeating + /// the base tile. + /// + D2D1_EXTEND_MODE_WRAP = 1, + + /// + /// The same as wrap, but alternate tiles are flipped The base tile is drawn + /// untransformed. + /// + D2D1_EXTEND_MODE_MIRROR = 2, + D2D1_EXTEND_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_EXTEND_MODE; + + +/// +/// Enum which describes the manner in which we render edges of non-text primitives. +/// +typedef enum D2D1_ANTIALIAS_MODE +{ + + /// + /// The edges of each primitive are antialiased sequentially. + /// + D2D1_ANTIALIAS_MODE_PER_PRIMITIVE = 0, + + /// + /// Each pixel is rendered if its pixel center is contained by the geometry. + /// + D2D1_ANTIALIAS_MODE_ALIASED = 1, + D2D1_ANTIALIAS_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_ANTIALIAS_MODE; + + +/// +/// Describes the antialiasing mode used for drawing text. +/// +typedef enum D2D1_TEXT_ANTIALIAS_MODE +{ + + /// + /// Render text using the current system setting. + /// + D2D1_TEXT_ANTIALIAS_MODE_DEFAULT = 0, + + /// + /// Render text using ClearType. + /// + D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE = 1, + + /// + /// Render text using gray-scale. + /// + D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE = 2, + + /// + /// Render text aliased. + /// + D2D1_TEXT_ANTIALIAS_MODE_ALIASED = 3, + D2D1_TEXT_ANTIALIAS_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_TEXT_ANTIALIAS_MODE; + + +/// +/// Specifies the algorithm that is used when images are scaled or rotated. Note +/// Starting in Windows 8, more interpolations modes are available. See +/// D2D1_INTERPOLATION_MODE for more info. +/// +typedef enum D2D1_BITMAP_INTERPOLATION_MODE +{ + + /// + /// Nearest Neighbor filtering. Also known as nearest pixel or nearest point + /// sampling. + /// + D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR = D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR, + + /// + /// Linear filtering. + /// + D2D1_BITMAP_INTERPOLATION_MODE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR, + D2D1_BITMAP_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_BITMAP_INTERPOLATION_MODE; + + +/// +/// Modifications made to the draw text call that influence how the text is +/// rendered. +/// +typedef enum D2D1_DRAW_TEXT_OPTIONS +{ + + /// + /// Do not snap the baseline of the text vertically. + /// + D2D1_DRAW_TEXT_OPTIONS_NO_SNAP = 0x00000001, + + /// + /// Clip the text to the content bounds. + /// + D2D1_DRAW_TEXT_OPTIONS_CLIP = 0x00000002, + + /// + /// Render color versions of glyphs if defined by the font. + /// + D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT = 0x00000004, + + /// + /// Bitmap origins of color glyph bitmaps are not snapped. + /// + D2D1_DRAW_TEXT_OPTIONS_DISABLE_COLOR_BITMAP_SNAPPING = 0x00000008, + D2D1_DRAW_TEXT_OPTIONS_NONE = 0x00000000, + D2D1_DRAW_TEXT_OPTIONS_FORCE_DWORD = 0xffffffff + +} D2D1_DRAW_TEXT_OPTIONS; + +DEFINE_ENUM_FLAG_OPERATORS(D2D1_DRAW_TEXT_OPTIONS); + +typedef D2D_POINT_2U D2D1_POINT_2U; +typedef D2D_POINT_2F D2D1_POINT_2F; +typedef D2D_RECT_F D2D1_RECT_F; +typedef D2D_RECT_U D2D1_RECT_U; +typedef D2D_SIZE_F D2D1_SIZE_F; +typedef D2D_SIZE_U D2D1_SIZE_U; +typedef D2D_COLOR_F D2D1_COLOR_F; +typedef D2D_MATRIX_3X2_F D2D1_MATRIX_3X2_F; +typedef UINT64 D2D1_TAG; + +/// +/// Describes the pixel format and dpi of a bitmap. +/// +typedef struct D2D1_BITMAP_PROPERTIES +{ + D2D1_PIXEL_FORMAT pixelFormat; + FLOAT dpiX; + FLOAT dpiY; + +} D2D1_BITMAP_PROPERTIES; + + +/// +/// Contains the position and color of a gradient stop. +/// +typedef struct D2D1_GRADIENT_STOP +{ + FLOAT position; + D2D1_COLOR_F color; + +} D2D1_GRADIENT_STOP; + + +/// +/// Describes the opacity and transformation of a brush. +/// +typedef struct D2D1_BRUSH_PROPERTIES +{ + FLOAT opacity; + D2D1_MATRIX_3X2_F transform; + +} D2D1_BRUSH_PROPERTIES; + + +/// +/// Describes the extend modes and the interpolation mode of an ID2D1BitmapBrush. +/// +typedef struct D2D1_BITMAP_BRUSH_PROPERTIES +{ + D2D1_EXTEND_MODE extendModeX; + D2D1_EXTEND_MODE extendModeY; + D2D1_BITMAP_INTERPOLATION_MODE interpolationMode; + +} D2D1_BITMAP_BRUSH_PROPERTIES; + + +/// +/// Contains the starting point and endpoint of the gradient axis for an +/// ID2D1LinearGradientBrush. +/// +typedef struct D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES +{ + D2D1_POINT_2F startPoint; + D2D1_POINT_2F endPoint; + +} D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES; + + +/// +/// Contains the gradient origin offset and the size and position of the gradient +/// ellipse for an ID2D1RadialGradientBrush. +/// +typedef struct D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES +{ + D2D1_POINT_2F center; + D2D1_POINT_2F gradientOriginOffset; + FLOAT radiusX; + FLOAT radiusY; + +} D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES; + + +/// +/// Differentiates which of the two possible arcs could match the given arc +/// parameters. +/// +typedef enum D2D1_ARC_SIZE +{ + D2D1_ARC_SIZE_SMALL = 0, + D2D1_ARC_SIZE_LARGE = 1, + D2D1_ARC_SIZE_FORCE_DWORD = 0xffffffff + +} D2D1_ARC_SIZE; + + +/// +/// Enum which describes the drawing of the ends of a line. +/// +typedef enum D2D1_CAP_STYLE +{ + + /// + /// Flat line cap. + /// + D2D1_CAP_STYLE_FLAT = 0, + + /// + /// Square line cap. + /// + D2D1_CAP_STYLE_SQUARE = 1, + + /// + /// Round line cap. + /// + D2D1_CAP_STYLE_ROUND = 2, + + /// + /// Triangle line cap. + /// + D2D1_CAP_STYLE_TRIANGLE = 3, + D2D1_CAP_STYLE_FORCE_DWORD = 0xffffffff + +} D2D1_CAP_STYLE; + + +/// +/// Describes the sequence of dashes and gaps in a stroke. +/// +typedef enum D2D1_DASH_STYLE +{ + D2D1_DASH_STYLE_SOLID = 0, + D2D1_DASH_STYLE_DASH = 1, + D2D1_DASH_STYLE_DOT = 2, + D2D1_DASH_STYLE_DASH_DOT = 3, + D2D1_DASH_STYLE_DASH_DOT_DOT = 4, + D2D1_DASH_STYLE_CUSTOM = 5, + D2D1_DASH_STYLE_FORCE_DWORD = 0xffffffff + +} D2D1_DASH_STYLE; + + +/// +/// Enum which describes the drawing of the corners on the line. +/// +typedef enum D2D1_LINE_JOIN +{ + + /// + /// Miter join. + /// + D2D1_LINE_JOIN_MITER = 0, + + /// + /// Bevel join. + /// + D2D1_LINE_JOIN_BEVEL = 1, + + /// + /// Round join. + /// + D2D1_LINE_JOIN_ROUND = 2, + + /// + /// Miter/Bevel join. + /// + D2D1_LINE_JOIN_MITER_OR_BEVEL = 3, + D2D1_LINE_JOIN_FORCE_DWORD = 0xffffffff + +} D2D1_LINE_JOIN; + + +/// +/// This enumeration describes the type of combine operation to be performed. +/// +typedef enum D2D1_COMBINE_MODE +{ + + /// + /// Produce a geometry representing the set of points contained in either the first + /// or the second geometry. + /// + D2D1_COMBINE_MODE_UNION = 0, + + /// + /// Produce a geometry representing the set of points common to the first and the + /// second geometries. + /// + D2D1_COMBINE_MODE_INTERSECT = 1, + + /// + /// Produce a geometry representing the set of points contained in the first + /// geometry or the second geometry, but not both. + /// + D2D1_COMBINE_MODE_XOR = 2, + + /// + /// Produce a geometry representing the set of points contained in the first + /// geometry but not the second geometry. + /// + D2D1_COMBINE_MODE_EXCLUDE = 3, + D2D1_COMBINE_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_COMBINE_MODE; + + +/// +/// Describes how one geometry object is spatially related to another geometry +/// object. +/// +typedef enum D2D1_GEOMETRY_RELATION +{ + + /// + /// The relation between the geometries couldn't be determined. This value is never + /// returned by any D2D method. + /// + D2D1_GEOMETRY_RELATION_UNKNOWN = 0, + + /// + /// The two geometries do not intersect at all. + /// + D2D1_GEOMETRY_RELATION_DISJOINT = 1, + + /// + /// The passed in geometry is entirely contained by the object. + /// + D2D1_GEOMETRY_RELATION_IS_CONTAINED = 2, + + /// + /// The object entirely contains the passed in geometry. + /// + D2D1_GEOMETRY_RELATION_CONTAINS = 3, + + /// + /// The two geometries overlap but neither completely contains the other. + /// + D2D1_GEOMETRY_RELATION_OVERLAP = 4, + D2D1_GEOMETRY_RELATION_FORCE_DWORD = 0xffffffff + +} D2D1_GEOMETRY_RELATION; + + +/// +/// Specifies how simple the output of a simplified geometry sink should be. +/// +typedef enum D2D1_GEOMETRY_SIMPLIFICATION_OPTION +{ + D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES = 0, + D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES = 1, + D2D1_GEOMETRY_SIMPLIFICATION_OPTION_FORCE_DWORD = 0xffffffff + +} D2D1_GEOMETRY_SIMPLIFICATION_OPTION; + + +/// +/// Indicates whether the given figure is filled or hollow. +/// +typedef enum D2D1_FIGURE_BEGIN +{ + D2D1_FIGURE_BEGIN_FILLED = 0, + D2D1_FIGURE_BEGIN_HOLLOW = 1, + D2D1_FIGURE_BEGIN_FORCE_DWORD = 0xffffffff + +} D2D1_FIGURE_BEGIN; + + +/// +/// Indicates whether the figure is open or closed on its end point. +/// +typedef enum D2D1_FIGURE_END +{ + D2D1_FIGURE_END_OPEN = 0, + D2D1_FIGURE_END_CLOSED = 1, + D2D1_FIGURE_END_FORCE_DWORD = 0xffffffff + +} D2D1_FIGURE_END; + + +/// +/// Describes a cubic bezier in a path. +/// +typedef struct D2D1_BEZIER_SEGMENT +{ + D2D1_POINT_2F point1; + D2D1_POINT_2F point2; + D2D1_POINT_2F point3; + +} D2D1_BEZIER_SEGMENT; + + +/// +/// Describes a triangle. +/// +typedef struct D2D1_TRIANGLE +{ + D2D1_POINT_2F point1; + D2D1_POINT_2F point2; + D2D1_POINT_2F point3; + +} D2D1_TRIANGLE; + + +/// +/// Indicates whether the given segment should be stroked, or, if the join between +/// this segment and the previous one should be smooth. +/// +typedef enum D2D1_PATH_SEGMENT +{ + D2D1_PATH_SEGMENT_NONE = 0x00000000, + D2D1_PATH_SEGMENT_FORCE_UNSTROKED = 0x00000001, + D2D1_PATH_SEGMENT_FORCE_ROUND_LINE_JOIN = 0x00000002, + D2D1_PATH_SEGMENT_FORCE_DWORD = 0xffffffff + +} D2D1_PATH_SEGMENT; + +DEFINE_ENUM_FLAG_OPERATORS(D2D1_PATH_SEGMENT); + + +/// +/// Defines the direction that an elliptical arc is drawn. +/// +typedef enum D2D1_SWEEP_DIRECTION +{ + D2D1_SWEEP_DIRECTION_COUNTER_CLOCKWISE = 0, + D2D1_SWEEP_DIRECTION_CLOCKWISE = 1, + D2D1_SWEEP_DIRECTION_FORCE_DWORD = 0xffffffff + +} D2D1_SWEEP_DIRECTION; + + +/// +/// Specifies how the intersecting areas of geometries or figures are combined to +/// form the area of the composite geometry. +/// +typedef enum D2D1_FILL_MODE +{ + D2D1_FILL_MODE_ALTERNATE = 0, + D2D1_FILL_MODE_WINDING = 1, + D2D1_FILL_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_FILL_MODE; + + +/// +/// Describes an arc that is defined as part of a path. +/// +typedef struct D2D1_ARC_SEGMENT +{ + D2D1_POINT_2F point; + D2D1_SIZE_F size; + FLOAT rotationAngle; + D2D1_SWEEP_DIRECTION sweepDirection; + D2D1_ARC_SIZE arcSize; + +} D2D1_ARC_SEGMENT; + + +/// +/// Contains the control point and end point for a quadratic Bezier segment. +/// +typedef struct D2D1_QUADRATIC_BEZIER_SEGMENT +{ + D2D1_POINT_2F point1; + D2D1_POINT_2F point2; + +} D2D1_QUADRATIC_BEZIER_SEGMENT; + + +/// +/// Contains the center point, x-radius, and y-radius of an ellipse. +/// +typedef struct D2D1_ELLIPSE +{ + D2D1_POINT_2F point; + FLOAT radiusX; + FLOAT radiusY; + +} D2D1_ELLIPSE; + + +/// +/// Contains the dimensions and corner radii of a rounded rectangle. +/// +typedef struct D2D1_ROUNDED_RECT +{ + D2D1_RECT_F rect; + FLOAT radiusX; + FLOAT radiusY; + +} D2D1_ROUNDED_RECT; + + +/// +/// Properties, aside from the width, that allow geometric penning to be specified. +/// +typedef struct D2D1_STROKE_STYLE_PROPERTIES +{ + D2D1_CAP_STYLE startCap; + D2D1_CAP_STYLE endCap; + D2D1_CAP_STYLE dashCap; + D2D1_LINE_JOIN lineJoin; + FLOAT miterLimit; + D2D1_DASH_STYLE dashStyle; + FLOAT dashOffset; + +} D2D1_STROKE_STYLE_PROPERTIES; + + +/// +/// Specified options that can be applied when a layer resource is applied to create +/// a layer. +/// +typedef enum D2D1_LAYER_OPTIONS +{ + D2D1_LAYER_OPTIONS_NONE = 0x00000000, + + /// + /// The layer will render correctly for ClearType text. If the render target was set + /// to ClearType previously, the layer will continue to render ClearType. If the + /// render target was set to ClearType and this option is not specified, the render + /// target will be set to render gray-scale until the layer is popped. The caller + /// can override this default by calling SetTextAntialiasMode while within the + /// layer. This flag is slightly slower than the default. + /// + D2D1_LAYER_OPTIONS_INITIALIZE_FOR_CLEARTYPE = 0x00000001, + D2D1_LAYER_OPTIONS_FORCE_DWORD = 0xffffffff + +} D2D1_LAYER_OPTIONS; + +DEFINE_ENUM_FLAG_OPERATORS(D2D1_LAYER_OPTIONS); + + +/// +/// Contains the content bounds, mask information, opacity settings, and other +/// options for a layer resource. +/// +typedef struct D2D1_LAYER_PARAMETERS +{ + + /// + /// The rectangular clip that will be applied to the layer. The clip is affected by + /// the world transform. Content outside of the content bounds will not render. + /// + D2D1_RECT_F contentBounds; + + /// + /// A general mask that can be optionally applied to the content. Content not inside + /// the fill of the mask will not be rendered. + /// + _Field_size_opt_(1) ID2D1Geometry *geometricMask; + + /// + /// Specifies whether the mask should be aliased or antialiased. + /// + D2D1_ANTIALIAS_MODE maskAntialiasMode; + + /// + /// An additional transform that may be applied to the mask in addition to the + /// current world transform. + /// + D2D1_MATRIX_3X2_F maskTransform; + + /// + /// The opacity with which all of the content in the layer will be blended back to + /// the target when the layer is popped. + /// + FLOAT opacity; + + /// + /// An additional brush that can be applied to the layer. Only the opacity channel + /// is sampled from this brush and multiplied both with the layer content and the + /// over-all layer opacity. + /// + _Field_size_opt_(1) ID2D1Brush *opacityBrush; + + /// + /// Specifies if ClearType will be rendered into the layer. + /// + D2D1_LAYER_OPTIONS layerOptions; + +} D2D1_LAYER_PARAMETERS; + + +/// +/// Describes whether a window is occluded. +/// +typedef enum D2D1_WINDOW_STATE +{ + D2D1_WINDOW_STATE_NONE = 0x0000000, + D2D1_WINDOW_STATE_OCCLUDED = 0x0000001, + D2D1_WINDOW_STATE_FORCE_DWORD = 0xffffffff + +} D2D1_WINDOW_STATE; + +DEFINE_ENUM_FLAG_OPERATORS(D2D1_WINDOW_STATE); + + +/// +/// Describes whether a render target uses hardware or software rendering, or if +/// Direct2D should select the rendering mode. +/// +typedef enum D2D1_RENDER_TARGET_TYPE +{ + + /// + /// D2D is free to choose the render target type for the caller. + /// + D2D1_RENDER_TARGET_TYPE_DEFAULT = 0, + + /// + /// The render target will render using the CPU. + /// + D2D1_RENDER_TARGET_TYPE_SOFTWARE = 1, + + /// + /// The render target will render using the GPU. + /// + D2D1_RENDER_TARGET_TYPE_HARDWARE = 2, + D2D1_RENDER_TARGET_TYPE_FORCE_DWORD = 0xffffffff + +} D2D1_RENDER_TARGET_TYPE; + + +/// +/// Describes the minimum DirectX support required for hardware rendering by a +/// render target. +/// +typedef enum D2D1_FEATURE_LEVEL +{ + + /// + /// The caller does not require a particular underlying D3D device level. + /// + D2D1_FEATURE_LEVEL_DEFAULT = 0, + + /// + /// The D3D device level is DX9 compatible. + /// + D2D1_FEATURE_LEVEL_9 = D3D_FEATURE_LEVEL_9_1, + + /// + /// The D3D device level is DX10 compatible. + /// + D2D1_FEATURE_LEVEL_10 = D3D_FEATURE_LEVEL_10_0, + D2D1_FEATURE_LEVEL_FORCE_DWORD = 0xffffffff + +} D2D1_FEATURE_LEVEL; + + +/// +/// Describes how a render target is remoted and whether it should be +/// GDI-compatible. This enumeration allows a bitwise combination of its member +/// values. +/// +typedef enum D2D1_RENDER_TARGET_USAGE +{ + D2D1_RENDER_TARGET_USAGE_NONE = 0x00000000, + + /// + /// Rendering will occur locally, if a terminal-services session is established, the + /// bitmap updates will be sent to the terminal services client. + /// + D2D1_RENDER_TARGET_USAGE_FORCE_BITMAP_REMOTING = 0x00000001, + + /// + /// The render target will allow a call to GetDC on the ID2D1GdiInteropRenderTarget + /// interface. Rendering will also occur locally. + /// + D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE = 0x00000002, + D2D1_RENDER_TARGET_USAGE_FORCE_DWORD = 0xffffffff + +} D2D1_RENDER_TARGET_USAGE; + +DEFINE_ENUM_FLAG_OPERATORS(D2D1_RENDER_TARGET_USAGE); + + +/// +/// Describes how present should behave. +/// +typedef enum D2D1_PRESENT_OPTIONS +{ + D2D1_PRESENT_OPTIONS_NONE = 0x00000000, + + /// + /// Keep the target contents intact through present. + /// + D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS = 0x00000001, + + /// + /// Do not wait for display refresh to commit changes to display. + /// + D2D1_PRESENT_OPTIONS_IMMEDIATELY = 0x00000002, + D2D1_PRESENT_OPTIONS_FORCE_DWORD = 0xffffffff + +} D2D1_PRESENT_OPTIONS; + +DEFINE_ENUM_FLAG_OPERATORS(D2D1_PRESENT_OPTIONS); + + +/// +/// Contains rendering options (hardware or software), pixel format, DPI +/// information, remoting options, and Direct3D support requirements for a render +/// target. +/// +typedef struct D2D1_RENDER_TARGET_PROPERTIES +{ + D2D1_RENDER_TARGET_TYPE type; + D2D1_PIXEL_FORMAT pixelFormat; + FLOAT dpiX; + FLOAT dpiY; + D2D1_RENDER_TARGET_USAGE usage; + D2D1_FEATURE_LEVEL minLevel; + +} D2D1_RENDER_TARGET_PROPERTIES; + + +/// +/// Contains the HWND, pixel size, and presentation options for an +/// ID2D1HwndRenderTarget. +/// +typedef struct D2D1_HWND_RENDER_TARGET_PROPERTIES +{ + HWND hwnd; + D2D1_SIZE_U pixelSize; + D2D1_PRESENT_OPTIONS presentOptions; + +} D2D1_HWND_RENDER_TARGET_PROPERTIES; + + +/// +/// Specifies additional features supportable by a compatible render target when it +/// is created. This enumeration allows a bitwise combination of its member values. +/// +typedef enum D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS +{ + D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE = 0x00000000, + + /// + /// The compatible render target will allow a call to GetDC on the + /// ID2D1GdiInteropRenderTarget interface. This can be specified even if the parent + /// render target is not GDI compatible. + /// + D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_GDI_COMPATIBLE = 0x00000001, + D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_FORCE_DWORD = 0xffffffff + +} D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS; + +DEFINE_ENUM_FLAG_OPERATORS(D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS); + + +/// +/// Allows the drawing state to be atomically created. This also specifies the +/// drawing state that is saved into an IDrawingStateBlock object. +/// +typedef struct D2D1_DRAWING_STATE_DESCRIPTION +{ + D2D1_ANTIALIAS_MODE antialiasMode; + D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode; + D2D1_TAG tag1; + D2D1_TAG tag2; + D2D1_MATRIX_3X2_F transform; + +} D2D1_DRAWING_STATE_DESCRIPTION; + + +/// +/// Specifies how a device context is initialized for GDI rendering when it is +/// retrieved from the render target. +/// +typedef enum D2D1_DC_INITIALIZE_MODE +{ + + /// + /// The contents of the D2D render target will be copied to the DC. + /// + D2D1_DC_INITIALIZE_MODE_COPY = 0, + + /// + /// The contents of the DC will be cleared. + /// + D2D1_DC_INITIALIZE_MODE_CLEAR = 1, + D2D1_DC_INITIALIZE_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_DC_INITIALIZE_MODE; + + +/// +/// Indicates the debug level to be output by the debug layer. +/// +typedef enum D2D1_DEBUG_LEVEL +{ + D2D1_DEBUG_LEVEL_NONE = 0, + D2D1_DEBUG_LEVEL_ERROR = 1, + D2D1_DEBUG_LEVEL_WARNING = 2, + D2D1_DEBUG_LEVEL_INFORMATION = 3, + D2D1_DEBUG_LEVEL_FORCE_DWORD = 0xffffffff + +} D2D1_DEBUG_LEVEL; + + +/// +/// Specifies the threading model of the created factory and all of its derived +/// resources. +/// +typedef enum D2D1_FACTORY_TYPE +{ + + /// + /// The resulting factory and derived resources may only be invoked serially. + /// Reference counts on resources are interlocked, however, resource and render + /// target state is not protected from multi-threaded access. + /// + D2D1_FACTORY_TYPE_SINGLE_THREADED = 0, + + /// + /// The resulting factory may be invoked from multiple threads. Returned resources + /// use interlocked reference counting and their state is protected. + /// + D2D1_FACTORY_TYPE_MULTI_THREADED = 1, + D2D1_FACTORY_TYPE_FORCE_DWORD = 0xffffffff + +} D2D1_FACTORY_TYPE; + + +/// +/// Allows additional parameters for factory creation. +/// +typedef struct D2D1_FACTORY_OPTIONS +{ + + /// + /// Requests a certain level of debugging information from the debug layer. This + /// parameter is ignored if the debug layer DLL is not present. + /// + D2D1_DEBUG_LEVEL debugLevel; + +} D2D1_FACTORY_OPTIONS; + + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ + + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + + +EXTERN_C CONST IID IID_ID2D1Resource; +EXTERN_C CONST IID IID_ID2D1Image; +EXTERN_C CONST IID IID_ID2D1Bitmap; +EXTERN_C CONST IID IID_ID2D1GradientStopCollection; +EXTERN_C CONST IID IID_ID2D1Brush; +EXTERN_C CONST IID IID_ID2D1BitmapBrush; +EXTERN_C CONST IID IID_ID2D1SolidColorBrush; +EXTERN_C CONST IID IID_ID2D1LinearGradientBrush; +EXTERN_C CONST IID IID_ID2D1RadialGradientBrush; +EXTERN_C CONST IID IID_ID2D1StrokeStyle; +EXTERN_C CONST IID IID_ID2D1Geometry; +EXTERN_C CONST IID IID_ID2D1RectangleGeometry; +EXTERN_C CONST IID IID_ID2D1RoundedRectangleGeometry; +EXTERN_C CONST IID IID_ID2D1EllipseGeometry; +EXTERN_C CONST IID IID_ID2D1GeometryGroup; +EXTERN_C CONST IID IID_ID2D1TransformedGeometry; +EXTERN_C CONST IID IID_ID2D1SimplifiedGeometrySink; +EXTERN_C CONST IID IID_ID2D1GeometrySink; +EXTERN_C CONST IID IID_ID2D1TessellationSink; +EXTERN_C CONST IID IID_ID2D1PathGeometry; +EXTERN_C CONST IID IID_ID2D1Mesh; +EXTERN_C CONST IID IID_ID2D1Layer; +EXTERN_C CONST IID IID_ID2D1DrawingStateBlock; +EXTERN_C CONST IID IID_ID2D1RenderTarget; +EXTERN_C CONST IID IID_ID2D1BitmapRenderTarget; +EXTERN_C CONST IID IID_ID2D1HwndRenderTarget; +EXTERN_C CONST IID IID_ID2D1DCRenderTarget; +EXTERN_C CONST IID IID_ID2D1Factory; + + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ + +/*#pragma region Desktop Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ + + +EXTERN_C CONST IID IID_ID2D1GdiInteropRenderTarget; + + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ + + +#ifndef D2D_USE_C_DEFINITIONS + + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + +/// +/// The root interface for all resources in D2D. +/// +interface DX_DECLARE_INTERFACE("2cd90691-12e2-11dc-9fed-001143a055f9") ID2D1Resource : public IUnknown +{ + + /// + /// Retrieve the factory associated with this resource. + /// + STDMETHOD_(void, GetFactory)( + _Outptr_ ID2D1Factory **factory + ) CONST PURE; +}; // interface ID2D1Resource + + +/// +/// Represents a producer of pixels that can fill an arbitrary 2D plane. +/// +interface DX_DECLARE_INTERFACE("65019f75-8da2-497c-b32c-dfa34e48ede6") ID2D1Image : public ID2D1Resource +{ +}; // interface ID2D1Image + + +/// +/// Root bitmap resource, linearly scaled on a draw call. +/// +interface DX_DECLARE_INTERFACE("a2296057-ea42-4099-983b-539fb6505426") ID2D1Bitmap : public ID2D1Image +{ + + /// + /// Returns the size of the bitmap in resolution independent units. + /// + STDMETHOD_(D2D1_SIZE_F, GetSize)( + ) CONST PURE; + + /// + /// Returns the size of the bitmap in resolution dependent units, (pixels). + /// + STDMETHOD_(D2D1_SIZE_U, GetPixelSize)( + ) CONST PURE; + + /// + /// Retrieve the format of the bitmap. + /// + STDMETHOD_(D2D1_PIXEL_FORMAT, GetPixelFormat)( + ) CONST PURE; + + /// + /// Return the DPI of the bitmap. + /// + STDMETHOD_(void, GetDpi)( + _Out_ FLOAT *dpiX, + _Out_ FLOAT *dpiY + ) CONST PURE; + + STDMETHOD(CopyFromBitmap)( + _In_opt_ CONST D2D1_POINT_2U *destPoint, + _In_ ID2D1Bitmap *bitmap, + _In_opt_ CONST D2D1_RECT_U *srcRect + ) PURE; + + STDMETHOD(CopyFromRenderTarget)( + _In_opt_ CONST D2D1_POINT_2U *destPoint, + _In_ ID2D1RenderTarget *renderTarget, + _In_opt_ CONST D2D1_RECT_U *srcRect + ) PURE; + + STDMETHOD(CopyFromMemory)( + _In_opt_ CONST D2D1_RECT_U *dstRect, + _In_ CONST void *srcData, + UINT32 pitch + ) PURE; +}; // interface ID2D1Bitmap + + +/// +/// Represents an collection of gradient stops that can then be the source resource +/// for either a linear or radial gradient brush. +/// +interface DX_DECLARE_INTERFACE("2cd906a7-12e2-11dc-9fed-001143a055f9") ID2D1GradientStopCollection : public ID2D1Resource +{ + + /// + /// Returns the number of stops in the gradient. + /// + STDMETHOD_(UINT32, GetGradientStopCount)( + ) CONST PURE; + + /// + /// Copies the gradient stops from the collection into the caller's interface. The + /// returned colors have straight alpha. + /// + STDMETHOD_(void, GetGradientStops)( + _Out_writes_to_(gradientStopsCount, _Inexpressible_("Retrieved through GetGradientStopCount()") ) D2D1_GRADIENT_STOP *gradientStops, + UINT32 gradientStopsCount + ) CONST PURE; + + /// + /// Returns whether the interpolation occurs with 1.0 or 2.2 gamma. + /// + STDMETHOD_(D2D1_GAMMA, GetColorInterpolationGamma)( + ) CONST PURE; + + STDMETHOD_(D2D1_EXTEND_MODE, GetExtendMode)( + ) CONST PURE; +}; // interface ID2D1GradientStopCollection + + +/// +/// The root brush interface. All brushes can be used to fill or pen a geometry. +/// +interface DX_DECLARE_INTERFACE("2cd906a8-12e2-11dc-9fed-001143a055f9") ID2D1Brush : public ID2D1Resource +{ + + /// + /// Sets the opacity for when the brush is drawn over the entire fill of the brush. + /// + STDMETHOD_(void, SetOpacity)( + FLOAT opacity + ) PURE; + + /// + /// Sets the transform that applies to everything drawn by the brush. + /// + STDMETHOD_(void, SetTransform)( + _In_ CONST D2D1_MATRIX_3X2_F *transform + ) PURE; + + STDMETHOD_(FLOAT, GetOpacity)( + ) CONST PURE; + + STDMETHOD_(void, GetTransform)( + _Out_ D2D1_MATRIX_3X2_F *transform + ) CONST PURE; + + COM_DECLSPEC_NOTHROW + void + SetTransform( + CONST D2D1_MATRIX_3X2_F &transform + ) + { + SetTransform(&transform); + } +}; // interface ID2D1Brush + + +/// +/// A bitmap brush allows a bitmap to be used to fill a geometry. +/// +interface DX_DECLARE_INTERFACE("2cd906aa-12e2-11dc-9fed-001143a055f9") ID2D1BitmapBrush : public ID2D1Brush +{ + + /// + /// Sets how the bitmap is to be treated outside of its natural extent on the X + /// axis. + /// + STDMETHOD_(void, SetExtendModeX)( + D2D1_EXTEND_MODE extendModeX + ) PURE; + + /// + /// Sets how the bitmap is to be treated outside of its natural extent on the X + /// axis. + /// + STDMETHOD_(void, SetExtendModeY)( + D2D1_EXTEND_MODE extendModeY + ) PURE; + + /// + /// Sets the interpolation mode used when this brush is used. + /// + STDMETHOD_(void, SetInterpolationMode)( + D2D1_BITMAP_INTERPOLATION_MODE interpolationMode + ) PURE; + + /// + /// Sets the bitmap associated as the source of this brush. + /// + STDMETHOD_(void, SetBitmap)( + _In_opt_ ID2D1Bitmap *bitmap + ) PURE; + + STDMETHOD_(D2D1_EXTEND_MODE, GetExtendModeX)( + ) CONST PURE; + + STDMETHOD_(D2D1_EXTEND_MODE, GetExtendModeY)( + ) CONST PURE; + + STDMETHOD_(D2D1_BITMAP_INTERPOLATION_MODE, GetInterpolationMode)( + ) CONST PURE; + + STDMETHOD_(void, GetBitmap)( + _Outptr_result_maybenull_ ID2D1Bitmap **bitmap + ) CONST PURE; +}; // interface ID2D1BitmapBrush + + +/// +/// Paints an area with a solid color. +/// +interface DX_DECLARE_INTERFACE("2cd906a9-12e2-11dc-9fed-001143a055f9") ID2D1SolidColorBrush : public ID2D1Brush +{ + + STDMETHOD_(void, SetColor)( + _In_ CONST D2D1_COLOR_F *color + ) PURE; + + STDMETHOD_(D2D1_COLOR_F, GetColor)( + ) CONST PURE; + + COM_DECLSPEC_NOTHROW + void + SetColor( + CONST D2D1_COLOR_F &color + ) + { + SetColor(&color); + } +}; // interface ID2D1SolidColorBrush + + +/// +/// Paints an area with a linear gradient. +/// +interface DX_DECLARE_INTERFACE("2cd906ab-12e2-11dc-9fed-001143a055f9") ID2D1LinearGradientBrush : public ID2D1Brush +{ + + STDMETHOD_(void, SetStartPoint)( + D2D1_POINT_2F startPoint + ) PURE; + + /// + /// Sets the end point of the gradient in local coordinate space. This is not + /// influenced by the geometry being filled. + /// + STDMETHOD_(void, SetEndPoint)( + D2D1_POINT_2F endPoint + ) PURE; + + STDMETHOD_(D2D1_POINT_2F, GetStartPoint)( + ) CONST PURE; + + STDMETHOD_(D2D1_POINT_2F, GetEndPoint)( + ) CONST PURE; + + STDMETHOD_(void, GetGradientStopCollection)( + _Outptr_ ID2D1GradientStopCollection **gradientStopCollection + ) CONST PURE; +}; // interface ID2D1LinearGradientBrush + + +/// +/// Paints an area with a radial gradient. +/// +interface DX_DECLARE_INTERFACE("2cd906ac-12e2-11dc-9fed-001143a055f9") ID2D1RadialGradientBrush : public ID2D1Brush +{ + + /// + /// Sets the center of the radial gradient. This will be in local coordinates and + /// will not depend on the geometry being filled. + /// + STDMETHOD_(void, SetCenter)( + D2D1_POINT_2F center + ) PURE; + + /// + /// Sets offset of the origin relative to the radial gradient center. + /// + STDMETHOD_(void, SetGradientOriginOffset)( + D2D1_POINT_2F gradientOriginOffset + ) PURE; + + STDMETHOD_(void, SetRadiusX)( + FLOAT radiusX + ) PURE; + + STDMETHOD_(void, SetRadiusY)( + FLOAT radiusY + ) PURE; + + STDMETHOD_(D2D1_POINT_2F, GetCenter)( + ) CONST PURE; + + STDMETHOD_(D2D1_POINT_2F, GetGradientOriginOffset)( + ) CONST PURE; + + STDMETHOD_(FLOAT, GetRadiusX)( + ) CONST PURE; + + STDMETHOD_(FLOAT, GetRadiusY)( + ) CONST PURE; + + STDMETHOD_(void, GetGradientStopCollection)( + _Outptr_ ID2D1GradientStopCollection **gradientStopCollection + ) CONST PURE; +}; // interface ID2D1RadialGradientBrush + + +/// +/// Resource interface that holds pen style properties. +/// +interface DX_DECLARE_INTERFACE("2cd9069d-12e2-11dc-9fed-001143a055f9") ID2D1StrokeStyle : public ID2D1Resource +{ + + STDMETHOD_(D2D1_CAP_STYLE, GetStartCap)( + ) CONST PURE; + + STDMETHOD_(D2D1_CAP_STYLE, GetEndCap)( + ) CONST PURE; + + STDMETHOD_(D2D1_CAP_STYLE, GetDashCap)( + ) CONST PURE; + + STDMETHOD_(FLOAT, GetMiterLimit)( + ) CONST PURE; + + STDMETHOD_(D2D1_LINE_JOIN, GetLineJoin)( + ) CONST PURE; + + STDMETHOD_(FLOAT, GetDashOffset)( + ) CONST PURE; + + STDMETHOD_(D2D1_DASH_STYLE, GetDashStyle)( + ) CONST PURE; + + STDMETHOD_(UINT32, GetDashesCount)( + ) CONST PURE; + + /// + /// Returns the dashes from the object into a user allocated array. The user must + /// call GetDashesCount to retrieve the required size. + /// + STDMETHOD_(void, GetDashes)( + _Out_writes_(dashesCount) FLOAT *dashes, + UINT32 dashesCount + ) CONST PURE; +}; // interface ID2D1StrokeStyle + + +/// +/// Represents a geometry resource and defines a set of helper methods for +/// manipulating and measuring geometric shapes. Interfaces that inherit from +/// ID2D1Geometry define specific shapes. +/// +interface DX_DECLARE_INTERFACE("2cd906a1-12e2-11dc-9fed-001143a055f9") ID2D1Geometry : public ID2D1Resource +{ + + /// + /// Retrieve the bounds of the geometry, with an optional applied transform. + /// + STDMETHOD(GetBounds)( + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + _Out_ D2D1_RECT_F *bounds + ) CONST PURE; + + /// + /// Get the bounds of the corresponding geometry after it has been widened or have + /// an optional pen style applied. + /// + STDMETHOD(GetWidenedBounds)( + FLOAT strokeWidth, + _In_opt_ ID2D1StrokeStyle *strokeStyle, + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + FLOAT flatteningTolerance, + _Out_ D2D1_RECT_F *bounds + ) CONST PURE; + + /// + /// Checks to see whether the corresponding penned and widened geometry contains the + /// given point. + /// + STDMETHOD(StrokeContainsPoint)( + D2D1_POINT_2F point, + FLOAT strokeWidth, + _In_opt_ ID2D1StrokeStyle *strokeStyle, + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + FLOAT flatteningTolerance, + _Out_ BOOL *contains + ) CONST PURE; + + /// + /// Test whether the given fill of this geometry would contain this point. + /// + STDMETHOD(FillContainsPoint)( + D2D1_POINT_2F point, + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + FLOAT flatteningTolerance, + _Out_ BOOL *contains + ) CONST PURE; + + /// + /// Compare how one geometry intersects or contains another geometry. + /// + STDMETHOD(CompareWithGeometry)( + _In_ ID2D1Geometry *inputGeometry, + _In_opt_ CONST D2D1_MATRIX_3X2_F *inputGeometryTransform, + FLOAT flatteningTolerance, + _Out_ D2D1_GEOMETRY_RELATION *relation + ) CONST PURE; + + /// + /// Converts a geometry to a simplified geometry that has arcs and quadratic beziers + /// removed. + /// + STDMETHOD(Simplify)( + D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + FLOAT flatteningTolerance, + _In_ ID2D1SimplifiedGeometrySink *geometrySink + ) CONST PURE; + + /// + /// Tessellates a geometry into triangles. + /// + STDMETHOD(Tessellate)( + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + FLOAT flatteningTolerance, + _In_ ID2D1TessellationSink *tessellationSink + ) CONST PURE; + + /// + /// Performs a combine operation between the two geometries to produce a resulting + /// geometry. + /// + STDMETHOD(CombineWithGeometry)( + _In_ ID2D1Geometry *inputGeometry, + D2D1_COMBINE_MODE combineMode, + _In_opt_ CONST D2D1_MATRIX_3X2_F *inputGeometryTransform, + FLOAT flatteningTolerance, + _In_ ID2D1SimplifiedGeometrySink *geometrySink + ) CONST PURE; + + /// + /// Computes the outline of the geometry. The result is written back into a + /// simplified geometry sink. + /// + STDMETHOD(Outline)( + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + FLOAT flatteningTolerance, + _In_ ID2D1SimplifiedGeometrySink *geometrySink + ) CONST PURE; + + /// + /// Computes the area of the geometry. + /// + STDMETHOD(ComputeArea)( + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + FLOAT flatteningTolerance, + _Out_ FLOAT *area + ) CONST PURE; + + /// + /// Computes the length of the geometry. + /// + STDMETHOD(ComputeLength)( + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + FLOAT flatteningTolerance, + _Out_ FLOAT *length + ) CONST PURE; + + /// + /// Computes the point and tangent a given distance along the path. + /// + STDMETHOD(ComputePointAtLength)( + FLOAT length, + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + FLOAT flatteningTolerance, + _Out_opt_ D2D1_POINT_2F *point, + _Out_opt_ D2D1_POINT_2F *unitTangentVector + ) CONST PURE; + + /// + /// Get the geometry and widen it as well as apply an optional pen style. + /// + STDMETHOD(Widen)( + FLOAT strokeWidth, + _In_opt_ ID2D1StrokeStyle *strokeStyle, + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + FLOAT flatteningTolerance, + _In_ ID2D1SimplifiedGeometrySink *geometrySink + ) CONST PURE; + + /// + /// Retrieve the bounds of the geometry, with an optional applied transform. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetBounds( + CONST D2D1_MATRIX_3X2_F &worldTransform, + _Out_ D2D1_RECT_F *bounds + ) CONST + { + return GetBounds(&worldTransform, bounds); + } + + /// + /// Get the bounds of the corresponding geometry after it has been widened or have + /// an optional pen style applied. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetWidenedBounds( + FLOAT strokeWidth, + _In_opt_ ID2D1StrokeStyle *strokeStyle, + CONST D2D1_MATRIX_3X2_F &worldTransform, + FLOAT flatteningTolerance, + _Out_ D2D1_RECT_F *bounds + ) CONST + { + return GetWidenedBounds(strokeWidth, strokeStyle, &worldTransform, flatteningTolerance, bounds); + } + + /// + /// Get the bounds of the corresponding geometry after it has been widened or have + /// an optional pen style applied. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetWidenedBounds( + FLOAT strokeWidth, + _In_opt_ ID2D1StrokeStyle *strokeStyle, + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + _Out_ D2D1_RECT_F *bounds + ) CONST + { + return GetWidenedBounds(strokeWidth, strokeStyle, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, bounds); + } + + /// + /// Get the bounds of the corresponding geometry after it has been widened or have + /// an optional pen style applied. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetWidenedBounds( + FLOAT strokeWidth, + _In_opt_ ID2D1StrokeStyle *strokeStyle, + CONST D2D1_MATRIX_3X2_F &worldTransform, + _Out_ D2D1_RECT_F *bounds + ) CONST + { + return GetWidenedBounds(strokeWidth, strokeStyle, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, bounds); + } + + COM_DECLSPEC_NOTHROW + HRESULT + StrokeContainsPoint( + D2D1_POINT_2F point, + FLOAT strokeWidth, + _In_opt_ ID2D1StrokeStyle *strokeStyle, + CONST D2D1_MATRIX_3X2_F &worldTransform, + FLOAT flatteningTolerance, + _Out_ BOOL *contains + ) CONST + { + return StrokeContainsPoint(point, strokeWidth, strokeStyle, &worldTransform, flatteningTolerance, contains); + } + + /// + /// Checks to see whether the corresponding penned and widened geometry contains the + /// given point. + /// + COM_DECLSPEC_NOTHROW + HRESULT + StrokeContainsPoint( + D2D1_POINT_2F point, + FLOAT strokeWidth, + _In_opt_ ID2D1StrokeStyle *strokeStyle, + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + _Out_ BOOL *contains + ) CONST + { + return StrokeContainsPoint(point, strokeWidth, strokeStyle, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, contains); + } + + COM_DECLSPEC_NOTHROW + HRESULT + StrokeContainsPoint( + D2D1_POINT_2F point, + FLOAT strokeWidth, + _In_opt_ ID2D1StrokeStyle *strokeStyle, + CONST D2D1_MATRIX_3X2_F &worldTransform, + _Out_ BOOL *contains + ) CONST + { + return StrokeContainsPoint(point, strokeWidth, strokeStyle, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, contains); + } + + COM_DECLSPEC_NOTHROW + HRESULT + FillContainsPoint( + D2D1_POINT_2F point, + CONST D2D1_MATRIX_3X2_F &worldTransform, + FLOAT flatteningTolerance, + _Out_ BOOL *contains + ) CONST + { + return FillContainsPoint(point, &worldTransform, flatteningTolerance, contains); + } + + /// + /// Test whether the given fill of this geometry would contain this point. + /// + COM_DECLSPEC_NOTHROW + HRESULT + FillContainsPoint( + D2D1_POINT_2F point, + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + _Out_ BOOL *contains + ) CONST + { + return FillContainsPoint(point, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, contains); + } + + COM_DECLSPEC_NOTHROW + HRESULT + FillContainsPoint( + D2D1_POINT_2F point, + CONST D2D1_MATRIX_3X2_F &worldTransform, + _Out_ BOOL *contains + ) CONST + { + return FillContainsPoint(point, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, contains); + } + + /// + /// Compare how one geometry intersects or contains another geometry. + /// + COM_DECLSPEC_NOTHROW + HRESULT + CompareWithGeometry( + _In_ ID2D1Geometry *inputGeometry, + CONST D2D1_MATRIX_3X2_F &inputGeometryTransform, + FLOAT flatteningTolerance, + _Out_ D2D1_GEOMETRY_RELATION *relation + ) CONST + { + return CompareWithGeometry(inputGeometry, &inputGeometryTransform, flatteningTolerance, relation); + } + + /// + /// Compare how one geometry intersects or contains another geometry. + /// + COM_DECLSPEC_NOTHROW + HRESULT + CompareWithGeometry( + _In_ ID2D1Geometry *inputGeometry, + _In_opt_ CONST D2D1_MATRIX_3X2_F *inputGeometryTransform, + _Out_ D2D1_GEOMETRY_RELATION *relation + ) CONST + { + return CompareWithGeometry(inputGeometry, inputGeometryTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, relation); + } + + /// + /// Compare how one geometry intersects or contains another geometry. + /// + COM_DECLSPEC_NOTHROW + HRESULT + CompareWithGeometry( + _In_ ID2D1Geometry *inputGeometry, + CONST D2D1_MATRIX_3X2_F &inputGeometryTransform, + _Out_ D2D1_GEOMETRY_RELATION *relation + ) CONST + { + return CompareWithGeometry(inputGeometry, &inputGeometryTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, relation); + } + + /// + /// Converts a geometry to a simplified geometry that has arcs and quadratic beziers + /// removed. + /// + COM_DECLSPEC_NOTHROW + HRESULT + Simplify( + D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, + CONST D2D1_MATRIX_3X2_F &worldTransform, + FLOAT flatteningTolerance, + _In_ ID2D1SimplifiedGeometrySink *geometrySink + ) CONST + { + return Simplify(simplificationOption, &worldTransform, flatteningTolerance, geometrySink); + } + + /// + /// Converts a geometry to a simplified geometry that has arcs and quadratic beziers + /// removed. + /// + COM_DECLSPEC_NOTHROW + HRESULT + Simplify( + D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + _In_ ID2D1SimplifiedGeometrySink *geometrySink + ) CONST + { + return Simplify(simplificationOption, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink); + } + + /// + /// Converts a geometry to a simplified geometry that has arcs and quadratic beziers + /// removed. + /// + COM_DECLSPEC_NOTHROW + HRESULT + Simplify( + D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, + CONST D2D1_MATRIX_3X2_F &worldTransform, + _In_ ID2D1SimplifiedGeometrySink *geometrySink + ) CONST + { + return Simplify(simplificationOption, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink); + } + + /// + /// Tessellates a geometry into triangles. + /// + COM_DECLSPEC_NOTHROW + HRESULT + Tessellate( + CONST D2D1_MATRIX_3X2_F &worldTransform, + FLOAT flatteningTolerance, + _In_ ID2D1TessellationSink *tessellationSink + ) CONST + { + return Tessellate(&worldTransform, flatteningTolerance, tessellationSink); + } + + /// + /// Tessellates a geometry into triangles. + /// + COM_DECLSPEC_NOTHROW + HRESULT + Tessellate( + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + _In_ ID2D1TessellationSink *tessellationSink + ) CONST + { + return Tessellate(worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, tessellationSink); + } + + /// + /// Tessellates a geometry into triangles. + /// + COM_DECLSPEC_NOTHROW + HRESULT + Tessellate( + CONST D2D1_MATRIX_3X2_F &worldTransform, + _In_ ID2D1TessellationSink *tessellationSink + ) CONST + { + return Tessellate(&worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, tessellationSink); + } + + /// + /// Performs a combine operation between the two geometries to produce a resulting + /// geometry. + /// + COM_DECLSPEC_NOTHROW + HRESULT + CombineWithGeometry( + _In_ ID2D1Geometry *inputGeometry, + D2D1_COMBINE_MODE combineMode, + CONST D2D1_MATRIX_3X2_F &inputGeometryTransform, + FLOAT flatteningTolerance, + _In_ ID2D1SimplifiedGeometrySink *geometrySink + ) CONST + { + return CombineWithGeometry(inputGeometry, combineMode, &inputGeometryTransform, flatteningTolerance, geometrySink); + } + + /// + /// Performs a combine operation between the two geometries to produce a resulting + /// geometry. + /// + COM_DECLSPEC_NOTHROW + HRESULT + CombineWithGeometry( + _In_ ID2D1Geometry *inputGeometry, + D2D1_COMBINE_MODE combineMode, + _In_opt_ CONST D2D1_MATRIX_3X2_F *inputGeometryTransform, + _In_ ID2D1SimplifiedGeometrySink *geometrySink + ) CONST + { + return CombineWithGeometry(inputGeometry, combineMode, inputGeometryTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink); + } + + /// + /// Performs a combine operation between the two geometries to produce a resulting + /// geometry. + /// + COM_DECLSPEC_NOTHROW + HRESULT + CombineWithGeometry( + _In_ ID2D1Geometry *inputGeometry, + D2D1_COMBINE_MODE combineMode, + CONST D2D1_MATRIX_3X2_F &inputGeometryTransform, + _In_ ID2D1SimplifiedGeometrySink *geometrySink + ) CONST + { + return CombineWithGeometry(inputGeometry, combineMode, &inputGeometryTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink); + } + + /// + /// Computes the outline of the geometry. The result is written back into a + /// simplified geometry sink. + /// + COM_DECLSPEC_NOTHROW + HRESULT + Outline( + CONST D2D1_MATRIX_3X2_F &worldTransform, + FLOAT flatteningTolerance, + _In_ ID2D1SimplifiedGeometrySink *geometrySink + ) CONST + { + return Outline(&worldTransform, flatteningTolerance, geometrySink); + } + + /// + /// Computes the outline of the geometry. The result is written back into a + /// simplified geometry sink. + /// + COM_DECLSPEC_NOTHROW + HRESULT + Outline( + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + _In_ ID2D1SimplifiedGeometrySink *geometrySink + ) CONST + { + return Outline(worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink); + } + + /// + /// Computes the outline of the geometry. The result is written back into a + /// simplified geometry sink. + /// + COM_DECLSPEC_NOTHROW + HRESULT + Outline( + CONST D2D1_MATRIX_3X2_F &worldTransform, + _In_ ID2D1SimplifiedGeometrySink *geometrySink + ) CONST + { + return Outline(&worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink); + } + + /// + /// Computes the area of the geometry. + /// + COM_DECLSPEC_NOTHROW + HRESULT + ComputeArea( + CONST D2D1_MATRIX_3X2_F &worldTransform, + FLOAT flatteningTolerance, + _Out_ FLOAT *area + ) CONST + { + return ComputeArea(&worldTransform, flatteningTolerance, area); + } + + /// + /// Computes the area of the geometry. + /// + COM_DECLSPEC_NOTHROW + HRESULT + ComputeArea( + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + _Out_ FLOAT *area + ) CONST + { + return ComputeArea(worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, area); + } + + /// + /// Computes the area of the geometry. + /// + COM_DECLSPEC_NOTHROW + HRESULT + ComputeArea( + CONST D2D1_MATRIX_3X2_F &worldTransform, + _Out_ FLOAT *area + ) CONST + { + return ComputeArea(&worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, area); + } + + /// + /// Computes the length of the geometry. + /// + COM_DECLSPEC_NOTHROW + HRESULT + ComputeLength( + CONST D2D1_MATRIX_3X2_F &worldTransform, + FLOAT flatteningTolerance, + _Out_ FLOAT *length + ) CONST + { + return ComputeLength(&worldTransform, flatteningTolerance, length); + } + + /// + /// Computes the length of the geometry. + /// + COM_DECLSPEC_NOTHROW + HRESULT + ComputeLength( + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + _Out_ FLOAT *length + ) CONST + { + return ComputeLength(worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, length); + } + + /// + /// Computes the length of the geometry. + /// + COM_DECLSPEC_NOTHROW + HRESULT + ComputeLength( + CONST D2D1_MATRIX_3X2_F &worldTransform, + _Out_ FLOAT *length + ) CONST + { + return ComputeLength(&worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, length); + } + + /// + /// Computes the point and tangent a given distance along the path. + /// + COM_DECLSPEC_NOTHROW + HRESULT + ComputePointAtLength( + FLOAT length, + CONST D2D1_MATRIX_3X2_F &worldTransform, + FLOAT flatteningTolerance, + _Out_opt_ D2D1_POINT_2F *point, + _Out_opt_ D2D1_POINT_2F *unitTangentVector + ) CONST + { + return ComputePointAtLength(length, &worldTransform, flatteningTolerance, point, unitTangentVector); + } + + /// + /// Computes the point and tangent a given distance along the path. + /// + COM_DECLSPEC_NOTHROW + HRESULT + ComputePointAtLength( + FLOAT length, + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + _Out_opt_ D2D1_POINT_2F *point, + _Out_opt_ D2D1_POINT_2F *unitTangentVector + ) CONST + { + return ComputePointAtLength(length, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, point, unitTangentVector); + } + + /// + /// Computes the point and tangent a given distance along the path. + /// + COM_DECLSPEC_NOTHROW + HRESULT + ComputePointAtLength( + FLOAT length, + CONST D2D1_MATRIX_3X2_F &worldTransform, + _Out_opt_ D2D1_POINT_2F *point, + _Out_opt_ D2D1_POINT_2F *unitTangentVector + ) CONST + { + return ComputePointAtLength(length, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, point, unitTangentVector); + } + + /// + /// Get the geometry and widen it as well as apply an optional pen style. + /// + COM_DECLSPEC_NOTHROW + HRESULT + Widen( + FLOAT strokeWidth, + _In_opt_ ID2D1StrokeStyle *strokeStyle, + CONST D2D1_MATRIX_3X2_F &worldTransform, + FLOAT flatteningTolerance, + _In_ ID2D1SimplifiedGeometrySink *geometrySink + ) CONST + { + return Widen(strokeWidth, strokeStyle, &worldTransform, flatteningTolerance, geometrySink); + } + + /// + /// Get the geometry and widen it as well as apply an optional pen style. + /// + COM_DECLSPEC_NOTHROW + HRESULT + Widen( + FLOAT strokeWidth, + _In_opt_ ID2D1StrokeStyle *strokeStyle, + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + _In_ ID2D1SimplifiedGeometrySink *geometrySink + ) CONST + { + return Widen(strokeWidth, strokeStyle, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink); + } + + /// + /// Get the geometry and widen it as well as apply an optional pen style. + /// + COM_DECLSPEC_NOTHROW + HRESULT + Widen( + FLOAT strokeWidth, + _In_opt_ ID2D1StrokeStyle *strokeStyle, + CONST D2D1_MATRIX_3X2_F &worldTransform, + _In_ ID2D1SimplifiedGeometrySink *geometrySink + ) CONST + { + return Widen(strokeWidth, strokeStyle, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink); + } +}; // interface ID2D1Geometry + + +/// +/// Describes a two-dimensional rectangle. +/// +interface DX_DECLARE_INTERFACE("2cd906a2-12e2-11dc-9fed-001143a055f9") ID2D1RectangleGeometry : public ID2D1Geometry +{ + + STDMETHOD_(void, GetRect)( + _Out_ D2D1_RECT_F *rect + ) CONST PURE; +}; // interface ID2D1RectangleGeometry + + +/// +/// Describes a rounded rectangle. +/// +interface DX_DECLARE_INTERFACE("2cd906a3-12e2-11dc-9fed-001143a055f9") ID2D1RoundedRectangleGeometry : public ID2D1Geometry +{ + + STDMETHOD_(void, GetRoundedRect)( + _Out_ D2D1_ROUNDED_RECT *roundedRect + ) CONST PURE; +}; // interface ID2D1RoundedRectangleGeometry + + +/// +/// Represents an ellipse. +/// +interface DX_DECLARE_INTERFACE("2cd906a4-12e2-11dc-9fed-001143a055f9") ID2D1EllipseGeometry : public ID2D1Geometry +{ + + STDMETHOD_(void, GetEllipse)( + _Out_ D2D1_ELLIPSE *ellipse + ) CONST PURE; +}; // interface ID2D1EllipseGeometry + + +/// +/// Represents a composite geometry, composed of other ID2D1Geometry objects. +/// +interface DX_DECLARE_INTERFACE("2cd906a6-12e2-11dc-9fed-001143a055f9") ID2D1GeometryGroup : public ID2D1Geometry +{ + + STDMETHOD_(D2D1_FILL_MODE, GetFillMode)( + ) CONST PURE; + + STDMETHOD_(UINT32, GetSourceGeometryCount)( + ) CONST PURE; + + STDMETHOD_(void, GetSourceGeometries)( + _Out_writes_(geometriesCount) ID2D1Geometry **geometries, + UINT32 geometriesCount + ) CONST PURE; +}; // interface ID2D1GeometryGroup + + +/// +/// Represents a geometry that has been transformed. +/// +interface DX_DECLARE_INTERFACE("2cd906bb-12e2-11dc-9fed-001143a055f9") ID2D1TransformedGeometry : public ID2D1Geometry +{ + + STDMETHOD_(void, GetSourceGeometry)( + _Outptr_ ID2D1Geometry **sourceGeometry + ) CONST PURE; + + STDMETHOD_(void, GetTransform)( + _Out_ D2D1_MATRIX_3X2_F *transform + ) CONST PURE; +}; // interface ID2D1TransformedGeometry + + +/// +/// Describes a geometric path that does not contain quadratic bezier curves or +/// arcs. +/// +interface DX_DECLARE_INTERFACE("2cd9069e-12e2-11dc-9fed-001143a055f9") ID2D1SimplifiedGeometrySink : public IUnknown +{ + + STDMETHOD_(void, SetFillMode)( + D2D1_FILL_MODE fillMode + ) PURE; + + STDMETHOD_(void, SetSegmentFlags)( + D2D1_PATH_SEGMENT vertexFlags + ) PURE; + + STDMETHOD_(void, BeginFigure)( + D2D1_POINT_2F startPoint, + D2D1_FIGURE_BEGIN figureBegin + ) PURE; + + STDMETHOD_(void, AddLines)( + _In_reads_(pointsCount) CONST D2D1_POINT_2F *points, + UINT32 pointsCount + ) PURE; + + STDMETHOD_(void, AddBeziers)( + _In_reads_(beziersCount) CONST D2D1_BEZIER_SEGMENT *beziers, + UINT32 beziersCount + ) PURE; + + STDMETHOD_(void, EndFigure)( + D2D1_FIGURE_END figureEnd + ) PURE; + + STDMETHOD(Close)( + ) PURE; +}; // interface ID2D1SimplifiedGeometrySink + + +/// +/// Describes a geometric path that can contain lines, arcs, cubic Bezier curves, +/// and quadratic Bezier curves. +/// +interface DX_DECLARE_INTERFACE("2cd9069f-12e2-11dc-9fed-001143a055f9") ID2D1GeometrySink : public ID2D1SimplifiedGeometrySink +{ + + STDMETHOD_(void, AddLine)( + D2D1_POINT_2F point + ) PURE; + + STDMETHOD_(void, AddBezier)( + _In_ CONST D2D1_BEZIER_SEGMENT *bezier + ) PURE; + + STDMETHOD_(void, AddQuadraticBezier)( + _In_ CONST D2D1_QUADRATIC_BEZIER_SEGMENT *bezier + ) PURE; + + STDMETHOD_(void, AddQuadraticBeziers)( + _In_reads_(beziersCount) CONST D2D1_QUADRATIC_BEZIER_SEGMENT *beziers, + UINT32 beziersCount + ) PURE; + + STDMETHOD_(void, AddArc)( + _In_ CONST D2D1_ARC_SEGMENT *arc + ) PURE; + + COM_DECLSPEC_NOTHROW + void + AddBezier( + CONST D2D1_BEZIER_SEGMENT &bezier + ) + { + AddBezier(&bezier); + } + + COM_DECLSPEC_NOTHROW + void + AddQuadraticBezier( + CONST D2D1_QUADRATIC_BEZIER_SEGMENT &bezier + ) + { + AddQuadraticBezier(&bezier); + } + + COM_DECLSPEC_NOTHROW + void + AddArc( + CONST D2D1_ARC_SEGMENT &arc + ) + { + AddArc(&arc); + } +}; // interface ID2D1GeometrySink + + +/// +/// Populates an ID2D1Mesh object with triangles. +/// +interface DX_DECLARE_INTERFACE("2cd906c1-12e2-11dc-9fed-001143a055f9") ID2D1TessellationSink : public IUnknown +{ + + STDMETHOD_(void, AddTriangles)( + _In_reads_(trianglesCount) CONST D2D1_TRIANGLE *triangles, + UINT32 trianglesCount + ) PURE; + + STDMETHOD(Close)( + ) PURE; +}; // interface ID2D1TessellationSink + + +/// +/// Represents a complex shape that may be composed of arcs, curves, and lines. +/// +interface DX_DECLARE_INTERFACE("2cd906a5-12e2-11dc-9fed-001143a055f9") ID2D1PathGeometry : public ID2D1Geometry +{ + + /// + /// Opens a geometry sink that will be used to create this path geometry. + /// + STDMETHOD(Open)( + _COM_Outptr_ ID2D1GeometrySink **geometrySink + ) PURE; + + /// + /// Retrieve the contents of this geometry. The caller passes an implementation of a + /// ID2D1GeometrySink interface to receive the data. + /// + STDMETHOD(Stream)( + _In_ ID2D1GeometrySink *geometrySink + ) CONST PURE; + + STDMETHOD(GetSegmentCount)( + _Out_ UINT32 *count + ) CONST PURE; + + STDMETHOD(GetFigureCount)( + _Out_ UINT32 *count + ) CONST PURE; +}; // interface ID2D1PathGeometry + + +/// +/// Represents a set of vertices that form a list of triangles. +/// +interface DX_DECLARE_INTERFACE("2cd906c2-12e2-11dc-9fed-001143a055f9") ID2D1Mesh : public ID2D1Resource +{ + + /// + /// Opens the mesh for population. + /// + STDMETHOD(Open)( + _COM_Outptr_ ID2D1TessellationSink **tessellationSink + ) PURE; +}; // interface ID2D1Mesh + + +/// +/// Represents the backing store required to render a layer. +/// +interface DX_DECLARE_INTERFACE("2cd9069b-12e2-11dc-9fed-001143a055f9") ID2D1Layer : public ID2D1Resource +{ + + STDMETHOD_(D2D1_SIZE_F, GetSize)( + ) CONST PURE; +}; // interface ID2D1Layer + + +/// +/// Represents the drawing state of a render target: the antialiasing mode, +/// transform, tags, and text-rendering options. +/// +interface DX_DECLARE_INTERFACE("28506e39-ebf6-46a1-bb47-fd85565ab957") ID2D1DrawingStateBlock : public ID2D1Resource +{ + + /// + /// Retrieves the state currently contained within this state block resource. + /// + STDMETHOD_(void, GetDescription)( + _Out_ D2D1_DRAWING_STATE_DESCRIPTION *stateDescription + ) CONST PURE; + + /// + /// Sets the state description of this state block resource. + /// + STDMETHOD_(void, SetDescription)( + _In_ CONST D2D1_DRAWING_STATE_DESCRIPTION *stateDescription + ) PURE; + + /// + /// Sets the text rendering parameters of this state block resource. + /// + STDMETHOD_(void, SetTextRenderingParams)( + _In_opt_ IDWriteRenderingParams *textRenderingParams = NULL + ) PURE; + + /// + /// Retrieves the text rendering parameters contained within this state block + /// resource. If a NULL text rendering parameter was specified, NULL will be + /// returned. + /// + STDMETHOD_(void, GetTextRenderingParams)( + _Outptr_result_maybenull_ IDWriteRenderingParams **textRenderingParams + ) CONST PURE; + + COM_DECLSPEC_NOTHROW + void + SetDescription( + CONST D2D1_DRAWING_STATE_DESCRIPTION &stateDescription + ) + { + SetDescription(&stateDescription); + } +}; // interface ID2D1DrawingStateBlock + + +/// +/// Represents an object that can receive drawing commands. Interfaces that inherit +/// from ID2D1RenderTarget render the drawing commands they receive in different +/// ways. +/// +interface DX_DECLARE_INTERFACE("2cd90694-12e2-11dc-9fed-001143a055f9") ID2D1RenderTarget : public ID2D1Resource +{ + + /// + /// Create a D2D bitmap by copying from memory, or create uninitialized. + /// + STDMETHOD(CreateBitmap)( + D2D1_SIZE_U size, + _In_opt_ CONST void *srcData, + UINT32 pitch, + _In_ CONST D2D1_BITMAP_PROPERTIES *bitmapProperties, + _COM_Outptr_ ID2D1Bitmap **bitmap + ) PURE; + + /// + /// Create a D2D bitmap by copying a WIC bitmap. + /// + STDMETHOD(CreateBitmapFromWicBitmap)( + _In_ IWICBitmapSource *wicBitmapSource, + _In_opt_ CONST D2D1_BITMAP_PROPERTIES *bitmapProperties, + _COM_Outptr_ ID2D1Bitmap **bitmap + ) PURE; + + /// + /// Create a D2D bitmap by sharing bits from another resource. The bitmap must be + /// compatible with the render target for the call to succeed. For example, an + /// IWICBitmap can be shared with a software target, or a DXGI surface can be shared + /// with a DXGI render target. + /// + STDMETHOD(CreateSharedBitmap)( + _In_ REFIID riid, + _Inout_ void *data, + _In_opt_ CONST D2D1_BITMAP_PROPERTIES *bitmapProperties, + _COM_Outptr_ ID2D1Bitmap **bitmap + ) PURE; + + /// + /// Creates a bitmap brush. The bitmap is scaled, rotated, skewed or tiled to fill + /// or pen a geometry. + /// + STDMETHOD(CreateBitmapBrush)( + _In_opt_ ID2D1Bitmap *bitmap, + _In_opt_ CONST D2D1_BITMAP_BRUSH_PROPERTIES *bitmapBrushProperties, + _In_opt_ CONST D2D1_BRUSH_PROPERTIES *brushProperties, + _COM_Outptr_ ID2D1BitmapBrush **bitmapBrush + ) PURE; + + STDMETHOD(CreateSolidColorBrush)( + _In_ CONST D2D1_COLOR_F *color, + _In_opt_ CONST D2D1_BRUSH_PROPERTIES *brushProperties, + _COM_Outptr_ ID2D1SolidColorBrush **solidColorBrush + ) PURE; + + /// + /// A gradient stop collection represents a set of stops in an ideal unit length. + /// This is the source resource for a linear gradient and radial gradient brush. + /// + /// Specifies which space the color + /// interpolation occurs in. + /// Specifies how the gradient will be extended outside of + /// the unit length. + STDMETHOD(CreateGradientStopCollection)( + _In_reads_(gradientStopsCount) CONST D2D1_GRADIENT_STOP *gradientStops, + _In_range_(>=,1) UINT32 gradientStopsCount, + D2D1_GAMMA colorInterpolationGamma, + D2D1_EXTEND_MODE extendMode, + _COM_Outptr_ ID2D1GradientStopCollection **gradientStopCollection + ) PURE; + + STDMETHOD(CreateLinearGradientBrush)( + _In_ CONST D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *linearGradientBrushProperties, + _In_opt_ CONST D2D1_BRUSH_PROPERTIES *brushProperties, + _In_ ID2D1GradientStopCollection *gradientStopCollection, + _COM_Outptr_ ID2D1LinearGradientBrush **linearGradientBrush + ) PURE; + + STDMETHOD(CreateRadialGradientBrush)( + _In_ CONST D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *radialGradientBrushProperties, + _In_opt_ CONST D2D1_BRUSH_PROPERTIES *brushProperties, + _In_ ID2D1GradientStopCollection *gradientStopCollection, + _COM_Outptr_ ID2D1RadialGradientBrush **radialGradientBrush + ) PURE; + + /// + /// Creates a bitmap render target whose bitmap can be used as a source for + /// rendering in the API. + /// + /// The requested size of the target in DIPs. If the pixel + /// size is not specified, the DPI is inherited from the parent target. However, the + /// render target will never contain a fractional number of pixels. + /// The requested size of the render target in + /// pixels. If the DIP size is also specified, the DPI is calculated from these two + /// values. If the desired size is not specified, the DPI is inherited from the + /// parent render target. If neither value is specified, the compatible render + /// target will be the same size and have the same DPI as the parent target. + /// The desired pixel format. The format must be + /// compatible with the parent render target type. If the format is not specified, + /// it will be inherited from the parent render target. + /// Allows the caller to retrieve a GDI compatible render + /// target. + /// The returned bitmap render target. + STDMETHOD(CreateCompatibleRenderTarget)( + _In_opt_ CONST D2D1_SIZE_F *desiredSize, + _In_opt_ CONST D2D1_SIZE_U *desiredPixelSize, + _In_opt_ CONST D2D1_PIXEL_FORMAT *desiredFormat, + D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options, + _COM_Outptr_ ID2D1BitmapRenderTarget **bitmapRenderTarget + ) PURE; + + /// + /// Creates a layer resource that can be used on any target and which will resize + /// under the covers if necessary. + /// + /// The resolution independent minimum size hint for the layer + /// resource. Specify this to prevent unwanted reallocation of the layer backing + /// store. The size is in DIPs, but, it is unaffected by the current world + /// transform. If the size is unspecified, the returned resource is a placeholder + /// and the backing store will be allocated to be the minimum size that can hold the + /// content when the layer is pushed. + STDMETHOD(CreateLayer)( + _In_opt_ CONST D2D1_SIZE_F *size, + _COM_Outptr_ ID2D1Layer **layer + ) PURE; + + /// + /// Create a D2D mesh. + /// + STDMETHOD(CreateMesh)( + _COM_Outptr_ ID2D1Mesh **mesh + ) PURE; + + STDMETHOD_(void, DrawLine)( + D2D1_POINT_2F point0, + D2D1_POINT_2F point1, + _In_ ID2D1Brush *brush, + FLOAT strokeWidth = 1.0f, + _In_opt_ ID2D1StrokeStyle *strokeStyle = NULL + ) PURE; + + STDMETHOD_(void, DrawRectangle)( + _In_ CONST D2D1_RECT_F *rect, + _In_ ID2D1Brush *brush, + FLOAT strokeWidth = 1.0f, + _In_opt_ ID2D1StrokeStyle *strokeStyle = NULL + ) PURE; + + STDMETHOD_(void, FillRectangle)( + _In_ CONST D2D1_RECT_F *rect, + _In_ ID2D1Brush *brush + ) PURE; + + STDMETHOD_(void, DrawRoundedRectangle)( + _In_ CONST D2D1_ROUNDED_RECT *roundedRect, + _In_ ID2D1Brush *brush, + FLOAT strokeWidth = 1.0f, + _In_opt_ ID2D1StrokeStyle *strokeStyle = NULL + ) PURE; + + STDMETHOD_(void, FillRoundedRectangle)( + _In_ CONST D2D1_ROUNDED_RECT *roundedRect, + _In_ ID2D1Brush *brush + ) PURE; + + STDMETHOD_(void, DrawEllipse)( + _In_ CONST D2D1_ELLIPSE *ellipse, + _In_ ID2D1Brush *brush, + FLOAT strokeWidth = 1.0f, + _In_opt_ ID2D1StrokeStyle *strokeStyle = NULL + ) PURE; + + STDMETHOD_(void, FillEllipse)( + _In_ CONST D2D1_ELLIPSE *ellipse, + _In_ ID2D1Brush *brush + ) PURE; + + STDMETHOD_(void, DrawGeometry)( + _In_ ID2D1Geometry *geometry, + _In_ ID2D1Brush *brush, + FLOAT strokeWidth = 1.0f, + _In_opt_ ID2D1StrokeStyle *strokeStyle = NULL + ) PURE; + + /// An optionally specified opacity brush. Only the alpha + /// channel of the corresponding brush will be sampled and will be applied to the + /// entire fill of the geometry. If this brush is specified, the fill brush must be + /// a bitmap brush with an extend mode of D2D1_EXTEND_MODE_CLAMP. + STDMETHOD_(void, FillGeometry)( + _In_ ID2D1Geometry *geometry, + _In_ ID2D1Brush *brush, + _In_opt_ ID2D1Brush *opacityBrush = NULL + ) PURE; + + /// + /// Fill a mesh. Since meshes can only render aliased content, the render target + /// antialiasing mode must be set to aliased. + /// + STDMETHOD_(void, FillMesh)( + _In_ ID2D1Mesh *mesh, + _In_ ID2D1Brush *brush + ) PURE; + + /// + /// Fill using the alpha channel of the supplied opacity mask bitmap. The brush + /// opacity will be modulated by the mask. The render target antialiasing mode must + /// be set to aliased. + /// + STDMETHOD_(void, FillOpacityMask)( + _In_ ID2D1Bitmap *opacityMask, + _In_ ID2D1Brush *brush, + D2D1_OPACITY_MASK_CONTENT content, + _In_opt_ CONST D2D1_RECT_F *destinationRectangle = NULL, + _In_opt_ CONST D2D1_RECT_F *sourceRectangle = NULL + ) PURE; + + STDMETHOD_(void, DrawBitmap)( + _In_ ID2D1Bitmap *bitmap, + _In_opt_ CONST D2D1_RECT_F *destinationRectangle = NULL, + FLOAT opacity = 1.0f, + D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR, + _In_opt_ CONST D2D1_RECT_F *sourceRectangle = NULL + ) PURE; + + /// + /// Draws the text within the given layout rectangle and by default also performs + /// baseline snapping. + /// + STDMETHOD_(void, DrawText)( + _In_reads_(stringLength) CONST WCHAR *string, + UINT32 stringLength, + _In_ IDWriteTextFormat *textFormat, + _In_ CONST D2D1_RECT_F *layoutRect, + _In_ ID2D1Brush *defaultFillBrush, + D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE, + DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL + ) PURE; + + /// + /// Draw a text layout object. If the layout is not subsequently changed, this can + /// be more efficient than DrawText when drawing the same layout repeatedly. + /// + /// The specified text options. If D2D1_DRAW_TEXT_OPTIONS_CLIP + /// is used, the text is clipped to the layout bounds. These bounds are derived from + /// the origin and the layout bounds of the corresponding IDWriteTextLayout object. + /// + STDMETHOD_(void, DrawTextLayout)( + D2D1_POINT_2F origin, + _In_ IDWriteTextLayout *textLayout, + _In_ ID2D1Brush *defaultFillBrush, + D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE + ) PURE; + + STDMETHOD_(void, DrawGlyphRun)( + D2D1_POINT_2F baselineOrigin, + _In_ CONST DWRITE_GLYPH_RUN *glyphRun, + _In_ ID2D1Brush *foregroundBrush, + DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL + ) PURE; + + STDMETHOD_(void, SetTransform)( + _In_ CONST D2D1_MATRIX_3X2_F *transform + ) PURE; + + STDMETHOD_(void, GetTransform)( + _Out_ D2D1_MATRIX_3X2_F *transform + ) CONST PURE; + + STDMETHOD_(void, SetAntialiasMode)( + D2D1_ANTIALIAS_MODE antialiasMode + ) PURE; + + STDMETHOD_(D2D1_ANTIALIAS_MODE, GetAntialiasMode)( + ) CONST PURE; + + STDMETHOD_(void, SetTextAntialiasMode)( + D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode + ) PURE; + + STDMETHOD_(D2D1_TEXT_ANTIALIAS_MODE, GetTextAntialiasMode)( + ) CONST PURE; + + STDMETHOD_(void, SetTextRenderingParams)( + _In_opt_ IDWriteRenderingParams *textRenderingParams = NULL + ) PURE; + + /// + /// Retrieve the text render parameters. NOTE: If NULL is specified to + /// SetTextRenderingParameters, NULL will be returned. + /// + STDMETHOD_(void, GetTextRenderingParams)( + _Outptr_result_maybenull_ IDWriteRenderingParams **textRenderingParams + ) CONST PURE; + + /// + /// Set a tag to correspond to the succeeding primitives. If an error occurs + /// rendering a primitive, the tags can be returned from the Flush or EndDraw call. + /// + STDMETHOD_(void, SetTags)( + D2D1_TAG tag1, + D2D1_TAG tag2 + ) PURE; + + /// + /// Retrieves the currently set tags. This does not retrieve the tags corresponding + /// to any primitive that is in error. + /// + STDMETHOD_(void, GetTags)( + _Out_opt_ D2D1_TAG *tag1 = NULL, + _Out_opt_ D2D1_TAG *tag2 = NULL + ) CONST PURE; + + /// + /// Start a layer of drawing calls. The way in which the layer must be resolved is + /// specified first as well as the logical resource that stores the layer + /// parameters. The supplied layer resource might grow if the specified content + /// cannot fit inside it. The layer will grow monotonically on each axis. If a NULL + /// ID2D1Layer is provided, then a layer resource will be allocated automatically. + /// + STDMETHOD_(void, PushLayer)( + _In_ CONST D2D1_LAYER_PARAMETERS *layerParameters, + _In_opt_ ID2D1Layer *layer + ) PURE; + + /// + /// Ends a layer that was defined with particular layer resources. + /// + STDMETHOD_(void, PopLayer)( + ) PURE; + + STDMETHOD(Flush)( + _Out_opt_ D2D1_TAG *tag1 = NULL, + _Out_opt_ D2D1_TAG *tag2 = NULL + ) PURE; + + /// + /// Gets the current drawing state and saves it into the supplied + /// IDrawingStatckBlock. + /// + STDMETHOD_(void, SaveDrawingState)( + _Inout_ ID2D1DrawingStateBlock *drawingStateBlock + ) CONST PURE; + + /// + /// Copies the state stored in the block interface. + /// + STDMETHOD_(void, RestoreDrawingState)( + _In_ ID2D1DrawingStateBlock *drawingStateBlock + ) PURE; + + /// + /// Pushes a clip. The clip can be antialiased. The clip must be axis aligned. If + /// the current world transform is not axis preserving, then the bounding box of the + /// transformed clip rect will be used. The clip will remain in effect until a + /// PopAxisAligned clip call is made. + /// + STDMETHOD_(void, PushAxisAlignedClip)( + _In_ CONST D2D1_RECT_F *clipRect, + D2D1_ANTIALIAS_MODE antialiasMode + ) PURE; + + STDMETHOD_(void, PopAxisAlignedClip)( + ) PURE; + + STDMETHOD_(void, Clear)( + _In_opt_ CONST D2D1_COLOR_F *clearColor = NULL + ) PURE; + + /// + /// Start drawing on this render target. Draw calls can only be issued between a + /// BeginDraw and EndDraw call. + /// + STDMETHOD_(void, BeginDraw)( + ) PURE; + + /// + /// Ends drawing on the render target, error results can be retrieved at this time, + /// or when calling flush. + /// + STDMETHOD(EndDraw)( + _Out_opt_ D2D1_TAG *tag1 = NULL, + _Out_opt_ D2D1_TAG *tag2 = NULL + ) PURE; + + STDMETHOD_(D2D1_PIXEL_FORMAT, GetPixelFormat)( + ) CONST PURE; + + /// + /// Sets the DPI on the render target. This results in the render target being + /// interpreted to a different scale. Neither DPI can be negative. If zero is + /// specified for both, the system DPI is chosen. If one is zero and the other + /// unspecified, the DPI is not changed. + /// + STDMETHOD_(void, SetDpi)( + FLOAT dpiX, + FLOAT dpiY + ) PURE; + + /// + /// Return the current DPI from the target. + /// + STDMETHOD_(void, GetDpi)( + _Out_ FLOAT *dpiX, + _Out_ FLOAT *dpiY + ) CONST PURE; + + /// + /// Returns the size of the render target in DIPs. + /// + STDMETHOD_(D2D1_SIZE_F, GetSize)( + ) CONST PURE; + + /// + /// Returns the size of the render target in pixels. + /// + STDMETHOD_(D2D1_SIZE_U, GetPixelSize)( + ) CONST PURE; + + /// + /// Returns the maximum bitmap and render target size that is guaranteed to be + /// supported by the render target. + /// + STDMETHOD_(UINT32, GetMaximumBitmapSize)( + ) CONST PURE; + + /// + /// Returns true if the given properties are supported by this render target. The + /// DPI is ignored. NOTE: If the render target type is software, then neither + /// D2D1_FEATURE_LEVEL_9 nor D2D1_FEATURE_LEVEL_10 will be considered to be + /// supported. + /// + STDMETHOD_(BOOL, IsSupported)( + _In_ CONST D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties + ) CONST PURE; + + COM_DECLSPEC_NOTHROW + HRESULT + CreateBitmap( + D2D1_SIZE_U size, + _In_opt_ CONST void *srcData, + UINT32 pitch, + CONST D2D1_BITMAP_PROPERTIES &bitmapProperties, + _COM_Outptr_ ID2D1Bitmap **bitmap + ) + { + return CreateBitmap(size, srcData, pitch, &bitmapProperties, bitmap); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateBitmap( + D2D1_SIZE_U size, + CONST D2D1_BITMAP_PROPERTIES &bitmapProperties, + _COM_Outptr_ ID2D1Bitmap **bitmap + ) + { + return CreateBitmap(size, NULL, 0, &bitmapProperties, bitmap); + } + + /// + /// Create a D2D bitmap by copying a WIC bitmap. + /// + COM_DECLSPEC_NOTHROW + HRESULT + CreateBitmapFromWicBitmap( + _In_ IWICBitmapSource *wicBitmapSource, + CONST D2D1_BITMAP_PROPERTIES &bitmapProperties, + _COM_Outptr_ ID2D1Bitmap **bitmap + ) + { + return CreateBitmapFromWicBitmap(wicBitmapSource, &bitmapProperties, bitmap); + } + + /// + /// Create a D2D bitmap by copying a WIC bitmap. + /// + COM_DECLSPEC_NOTHROW + HRESULT + CreateBitmapFromWicBitmap( + _In_ IWICBitmapSource *wicBitmapSource, + _COM_Outptr_ ID2D1Bitmap **bitmap + ) + { + return CreateBitmapFromWicBitmap(wicBitmapSource, NULL, bitmap); + } + + /// + /// Creates a bitmap brush. The bitmap is scaled, rotated, skewed or tiled to fill + /// or pen a geometry. + /// + COM_DECLSPEC_NOTHROW + HRESULT + CreateBitmapBrush( + _In_opt_ ID2D1Bitmap *bitmap, + _COM_Outptr_ ID2D1BitmapBrush **bitmapBrush + ) + { + return CreateBitmapBrush(bitmap, NULL, NULL, bitmapBrush); + } + + /// + /// Creates a bitmap brush. The bitmap is scaled, rotated, skewed or tiled to fill + /// or pen a geometry. + /// + COM_DECLSPEC_NOTHROW + HRESULT + CreateBitmapBrush( + _In_opt_ ID2D1Bitmap *bitmap, + CONST D2D1_BITMAP_BRUSH_PROPERTIES &bitmapBrushProperties, + _COM_Outptr_ ID2D1BitmapBrush **bitmapBrush + ) + { + return CreateBitmapBrush(bitmap, &bitmapBrushProperties, NULL, bitmapBrush); + } + + /// + /// Creates a bitmap brush. The bitmap is scaled, rotated, skewed or tiled to fill + /// or pen a geometry. + /// + COM_DECLSPEC_NOTHROW + HRESULT + CreateBitmapBrush( + _In_opt_ ID2D1Bitmap *bitmap, + CONST D2D1_BITMAP_BRUSH_PROPERTIES &bitmapBrushProperties, + CONST D2D1_BRUSH_PROPERTIES &brushProperties, + _COM_Outptr_ ID2D1BitmapBrush **bitmapBrush + ) + { + return CreateBitmapBrush(bitmap, &bitmapBrushProperties, &brushProperties, bitmapBrush); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateSolidColorBrush( + CONST D2D1_COLOR_F &color, + _COM_Outptr_ ID2D1SolidColorBrush **solidColorBrush + ) + { + return CreateSolidColorBrush(&color, NULL, solidColorBrush); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateSolidColorBrush( + CONST D2D1_COLOR_F &color, + CONST D2D1_BRUSH_PROPERTIES &brushProperties, + _COM_Outptr_ ID2D1SolidColorBrush **solidColorBrush + ) + { + return CreateSolidColorBrush(&color, &brushProperties, solidColorBrush); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateGradientStopCollection( + _In_reads_(gradientStopsCount) CONST D2D1_GRADIENT_STOP *gradientStops, + UINT32 gradientStopsCount, + _COM_Outptr_ ID2D1GradientStopCollection **gradientStopCollection + ) + { + return CreateGradientStopCollection(gradientStops, gradientStopsCount, D2D1_GAMMA_2_2, D2D1_EXTEND_MODE_CLAMP, gradientStopCollection); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateLinearGradientBrush( + CONST D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES &linearGradientBrushProperties, + _In_ ID2D1GradientStopCollection *gradientStopCollection, + _COM_Outptr_ ID2D1LinearGradientBrush **linearGradientBrush + ) + { + return CreateLinearGradientBrush(&linearGradientBrushProperties, NULL, gradientStopCollection, linearGradientBrush); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateLinearGradientBrush( + CONST D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES &linearGradientBrushProperties, + CONST D2D1_BRUSH_PROPERTIES &brushProperties, + _In_ ID2D1GradientStopCollection *gradientStopCollection, + _COM_Outptr_ ID2D1LinearGradientBrush **linearGradientBrush + ) + { + return CreateLinearGradientBrush(&linearGradientBrushProperties, &brushProperties, gradientStopCollection, linearGradientBrush); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateRadialGradientBrush( + CONST D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES &radialGradientBrushProperties, + _In_ ID2D1GradientStopCollection *gradientStopCollection, + _COM_Outptr_ ID2D1RadialGradientBrush **radialGradientBrush + ) + { + return CreateRadialGradientBrush(&radialGradientBrushProperties, NULL, gradientStopCollection, radialGradientBrush); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateRadialGradientBrush( + CONST D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES &radialGradientBrushProperties, + CONST D2D1_BRUSH_PROPERTIES &brushProperties, + _In_ ID2D1GradientStopCollection *gradientStopCollection, + _COM_Outptr_ ID2D1RadialGradientBrush **radialGradientBrush + ) + { + return CreateRadialGradientBrush(&radialGradientBrushProperties, &brushProperties, gradientStopCollection, radialGradientBrush); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateCompatibleRenderTarget( + _COM_Outptr_ ID2D1BitmapRenderTarget **bitmapRenderTarget + ) + { + return CreateCompatibleRenderTarget(NULL, NULL, NULL, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateCompatibleRenderTarget( + D2D1_SIZE_F desiredSize, + _COM_Outptr_ ID2D1BitmapRenderTarget **bitmapRenderTarget + ) + { + return CreateCompatibleRenderTarget(&desiredSize, NULL, NULL, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateCompatibleRenderTarget( + D2D1_SIZE_F desiredSize, + D2D1_SIZE_U desiredPixelSize, + _COM_Outptr_ ID2D1BitmapRenderTarget **bitmapRenderTarget + ) + { + return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, NULL, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateCompatibleRenderTarget( + D2D1_SIZE_F desiredSize, + D2D1_SIZE_U desiredPixelSize, + D2D1_PIXEL_FORMAT desiredFormat, + _COM_Outptr_ ID2D1BitmapRenderTarget **bitmapRenderTarget + ) + { + return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, &desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateCompatibleRenderTarget( + D2D1_SIZE_F desiredSize, + D2D1_SIZE_U desiredPixelSize, + D2D1_PIXEL_FORMAT desiredFormat, + D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options, + _COM_Outptr_ ID2D1BitmapRenderTarget **bitmapRenderTarget + ) + { + return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, &desiredFormat, options, bitmapRenderTarget); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateLayer( + D2D1_SIZE_F size, + _COM_Outptr_ ID2D1Layer **layer + ) + { + return CreateLayer(&size, layer); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateLayer( + _COM_Outptr_ ID2D1Layer **layer + ) + { + return CreateLayer(NULL, layer); + } + + COM_DECLSPEC_NOTHROW + void + DrawRectangle( + CONST D2D1_RECT_F &rect, + _In_ ID2D1Brush *brush, + FLOAT strokeWidth = 1.0f, + _In_opt_ ID2D1StrokeStyle *strokeStyle = NULL + ) + { + DrawRectangle(&rect, brush, strokeWidth, strokeStyle); + } + + COM_DECLSPEC_NOTHROW + void + FillRectangle( + CONST D2D1_RECT_F &rect, + _In_ ID2D1Brush *brush + ) + { + FillRectangle(&rect, brush); + } + + COM_DECLSPEC_NOTHROW + void + DrawRoundedRectangle( + CONST D2D1_ROUNDED_RECT &roundedRect, + _In_ ID2D1Brush *brush, + FLOAT strokeWidth = 1.0f, + _In_opt_ ID2D1StrokeStyle *strokeStyle = NULL + ) + { + DrawRoundedRectangle(&roundedRect, brush, strokeWidth, strokeStyle); + } + + COM_DECLSPEC_NOTHROW + void + FillRoundedRectangle( + CONST D2D1_ROUNDED_RECT &roundedRect, + _In_ ID2D1Brush *brush + ) + { + FillRoundedRectangle(&roundedRect, brush); + } + + COM_DECLSPEC_NOTHROW + void + DrawEllipse( + CONST D2D1_ELLIPSE &ellipse, + _In_ ID2D1Brush *brush, + FLOAT strokeWidth = 1.0f, + _In_opt_ ID2D1StrokeStyle *strokeStyle = NULL + ) + { + DrawEllipse(&ellipse, brush, strokeWidth, strokeStyle); + } + + COM_DECLSPEC_NOTHROW + void + FillEllipse( + CONST D2D1_ELLIPSE &ellipse, + _In_ ID2D1Brush *brush + ) + { + FillEllipse(&ellipse, brush); + } + + COM_DECLSPEC_NOTHROW + void + FillOpacityMask( + _In_ ID2D1Bitmap *opacityMask, + _In_ ID2D1Brush *brush, + D2D1_OPACITY_MASK_CONTENT content, + CONST D2D1_RECT_F &destinationRectangle, + CONST D2D1_RECT_F &sourceRectangle + ) + { + FillOpacityMask(opacityMask, brush, content, &destinationRectangle, &sourceRectangle); + } + + COM_DECLSPEC_NOTHROW + void + DrawBitmap( + _In_ ID2D1Bitmap *bitmap, + CONST D2D1_RECT_F &destinationRectangle, + FLOAT opacity = 1.0f, + D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR, + _In_opt_ CONST D2D1_RECT_F *sourceRectangle = NULL + ) + { + DrawBitmap(bitmap, &destinationRectangle, opacity, interpolationMode, sourceRectangle); + } + + COM_DECLSPEC_NOTHROW + void + DrawBitmap( + _In_ ID2D1Bitmap *bitmap, + CONST D2D1_RECT_F &destinationRectangle, + FLOAT opacity, + D2D1_BITMAP_INTERPOLATION_MODE interpolationMode, + CONST D2D1_RECT_F &sourceRectangle + ) + { + DrawBitmap(bitmap, &destinationRectangle, opacity, interpolationMode, &sourceRectangle); + } + + COM_DECLSPEC_NOTHROW + void + SetTransform( + CONST D2D1_MATRIX_3X2_F &transform + ) + { + SetTransform(&transform); + } + + COM_DECLSPEC_NOTHROW + void + PushLayer( + CONST D2D1_LAYER_PARAMETERS &layerParameters, + _In_opt_ ID2D1Layer *layer + ) + { + PushLayer(&layerParameters, layer); + } + + COM_DECLSPEC_NOTHROW + void + PushAxisAlignedClip( + CONST D2D1_RECT_F &clipRect, + D2D1_ANTIALIAS_MODE antialiasMode + ) + { + return PushAxisAlignedClip(&clipRect, antialiasMode); + } + + COM_DECLSPEC_NOTHROW + void + Clear( + CONST D2D1_COLOR_F &clearColor + ) + { + return Clear(&clearColor); + } + + /// + /// Draws the text within the given layout rectangle and by default also performs + /// baseline snapping. + /// + COM_DECLSPEC_NOTHROW + void + DrawText( + _In_reads_(stringLength) CONST WCHAR *string, + UINT32 stringLength, + _In_ IDWriteTextFormat *textFormat, + CONST D2D1_RECT_F &layoutRect, + _In_ ID2D1Brush *defaultFillBrush, + D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE, + DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL + ) + { + return DrawText(string, stringLength, textFormat, &layoutRect, defaultFillBrush, options, measuringMode); + } + + COM_DECLSPEC_NOTHROW + BOOL + IsSupported( + CONST D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties + ) CONST + { + return IsSupported(&renderTargetProperties); + } +}; // interface ID2D1RenderTarget + + +/// +/// Renders to an intermediate texture created by the CreateCompatibleRenderTarget +/// method. +/// +interface DX_DECLARE_INTERFACE("2cd90695-12e2-11dc-9fed-001143a055f9") ID2D1BitmapRenderTarget : public ID2D1RenderTarget +{ + + STDMETHOD(GetBitmap)( + _COM_Outptr_ ID2D1Bitmap **bitmap + ) PURE; +}; // interface ID2D1BitmapRenderTarget + + +/// +/// Renders drawing instructions to a window. +/// +interface DX_DECLARE_INTERFACE("2cd90698-12e2-11dc-9fed-001143a055f9") ID2D1HwndRenderTarget : public ID2D1RenderTarget +{ + + STDMETHOD_(D2D1_WINDOW_STATE, CheckWindowState)( + ) PURE; + + /// + /// Resize the buffer underlying the render target. This operation might fail if + /// there is insufficient video memory or system memory, or if the render target is + /// resized beyond the maximum bitmap size. If the method fails, the render target + /// will be placed in a zombie state and D2DERR_RECREATE_TARGET will be returned + /// from it when EndDraw is called. In addition an appropriate failure result will + /// be returned from Resize. + /// + STDMETHOD(Resize)( + _In_ CONST D2D1_SIZE_U *pixelSize + ) PURE; + + STDMETHOD_(HWND, GetHwnd)( + ) CONST PURE; + + COM_DECLSPEC_NOTHROW + HRESULT + Resize( + CONST D2D1_SIZE_U &pixelSize + ) + { + return Resize(&pixelSize); + } +}; // interface ID2D1HwndRenderTarget + + + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ + +/*#pragma region Desktop Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ + +/// +/// Provides access to an device context that can accept GDI drawing commands. +/// +interface DX_DECLARE_INTERFACE("e0db51c3-6f77-4bae-b3d5-e47509b35838") ID2D1GdiInteropRenderTarget : public IUnknown +{ + + STDMETHOD(GetDC)( + D2D1_DC_INITIALIZE_MODE mode, + _Out_ HDC *hdc + ) PURE; + + STDMETHOD(ReleaseDC)( + _In_opt_ CONST RECT *update + ) PURE; +}; // interface ID2D1GdiInteropRenderTarget + + + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + +/// +/// Issues drawing commands to a GDI device context. +/// +interface DX_DECLARE_INTERFACE("1c51bc64-de61-46fd-9899-63a5d8f03950") ID2D1DCRenderTarget : public ID2D1RenderTarget +{ + + STDMETHOD(BindDC)( + _In_ CONST HDC hDC, + _In_ CONST RECT *pSubRect + ) PURE; +}; // interface ID2D1DCRenderTarget + + +/// +/// The root factory interface for all of D2D's objects. +/// +interface DX_DECLARE_INTERFACE("06152247-6f50-465a-9245-118bfd3b6007") ID2D1Factory : public IUnknown +{ + + /// + /// Cause the factory to refresh any system metrics that it might have been snapped + /// on factory creation. + /// + STDMETHOD(ReloadSystemMetrics)( + ) PURE; + + /// + /// Retrieves the current desktop DPI. To refresh this, call ReloadSystemMetrics. + /// + STDMETHOD_(void, GetDesktopDpi)( + _Out_ FLOAT *dpiX, + _Out_ FLOAT *dpiY + ) PURE; + + STDMETHOD(CreateRectangleGeometry)( + _In_ CONST D2D1_RECT_F *rectangle, + _COM_Outptr_ ID2D1RectangleGeometry **rectangleGeometry + ) PURE; + + STDMETHOD(CreateRoundedRectangleGeometry)( + _In_ CONST D2D1_ROUNDED_RECT *roundedRectangle, + _COM_Outptr_ ID2D1RoundedRectangleGeometry **roundedRectangleGeometry + ) PURE; + + STDMETHOD(CreateEllipseGeometry)( + _In_ CONST D2D1_ELLIPSE *ellipse, + _COM_Outptr_ ID2D1EllipseGeometry **ellipseGeometry + ) PURE; + + /// + /// Create a geometry which holds other geometries. + /// + STDMETHOD(CreateGeometryGroup)( + D2D1_FILL_MODE fillMode, + _In_reads_(geometriesCount) ID2D1Geometry **geometries, + UINT32 geometriesCount, + _COM_Outptr_ ID2D1GeometryGroup **geometryGroup + ) PURE; + + STDMETHOD(CreateTransformedGeometry)( + _In_ ID2D1Geometry *sourceGeometry, + _In_ CONST D2D1_MATRIX_3X2_F *transform, + _COM_Outptr_ ID2D1TransformedGeometry **transformedGeometry + ) PURE; + + /// + /// Returns an initially empty path geometry interface. A geometry sink is created + /// off the interface to populate it. + /// + STDMETHOD(CreatePathGeometry)( + _COM_Outptr_ ID2D1PathGeometry **pathGeometry + ) PURE; + + /// + /// Allows a non-default stroke style to be specified for a given geometry at draw + /// time. + /// + STDMETHOD(CreateStrokeStyle)( + _In_ CONST D2D1_STROKE_STYLE_PROPERTIES *strokeStyleProperties, + _In_reads_opt_(dashesCount) CONST FLOAT *dashes, + UINT32 dashesCount, + _COM_Outptr_ ID2D1StrokeStyle **strokeStyle + ) PURE; + + /// + /// Creates a new drawing state block, this can be used in subsequent + /// SaveDrawingState and RestoreDrawingState operations on the render target. + /// + STDMETHOD(CreateDrawingStateBlock)( + _In_opt_ CONST D2D1_DRAWING_STATE_DESCRIPTION *drawingStateDescription, + _In_opt_ IDWriteRenderingParams *textRenderingParams, + _COM_Outptr_ ID2D1DrawingStateBlock **drawingStateBlock + ) PURE; + + /// + /// Creates a render target which is a source of bitmaps. + /// + STDMETHOD(CreateWicBitmapRenderTarget)( + _In_ IWICBitmap *target, + _In_ CONST D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties, + _COM_Outptr_ ID2D1RenderTarget **renderTarget + ) PURE; + + /// + /// Creates a render target that appears on the display. + /// + STDMETHOD(CreateHwndRenderTarget)( + _In_ CONST D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties, + _In_ CONST D2D1_HWND_RENDER_TARGET_PROPERTIES *hwndRenderTargetProperties, + _COM_Outptr_ ID2D1HwndRenderTarget **hwndRenderTarget + ) PURE; + + /// + /// Creates a render target that draws to a DXGI Surface. The device that owns the + /// surface is used for rendering. + /// + STDMETHOD(CreateDxgiSurfaceRenderTarget)( + _In_ IDXGISurface *dxgiSurface, + _In_ CONST D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties, + _COM_Outptr_ ID2D1RenderTarget **renderTarget + ) PURE; + + /// + /// Creates a render target that draws to a GDI device context. + /// + STDMETHOD(CreateDCRenderTarget)( + _In_ CONST D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties, + _COM_Outptr_ ID2D1DCRenderTarget **dcRenderTarget + ) PURE; + + COM_DECLSPEC_NOTHROW + HRESULT + CreateRectangleGeometry( + CONST D2D1_RECT_F &rectangle, + _COM_Outptr_ ID2D1RectangleGeometry **rectangleGeometry + ) + { + return CreateRectangleGeometry(&rectangle, rectangleGeometry); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateRoundedRectangleGeometry( + CONST D2D1_ROUNDED_RECT &roundedRectangle, + _COM_Outptr_ ID2D1RoundedRectangleGeometry **roundedRectangleGeometry + ) + { + return CreateRoundedRectangleGeometry(&roundedRectangle, roundedRectangleGeometry); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateEllipseGeometry( + CONST D2D1_ELLIPSE &ellipse, + _COM_Outptr_ ID2D1EllipseGeometry **ellipseGeometry + ) + { + return CreateEllipseGeometry(&ellipse, ellipseGeometry); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateTransformedGeometry( + _In_ ID2D1Geometry *sourceGeometry, + CONST D2D1_MATRIX_3X2_F &transform, + _COM_Outptr_ ID2D1TransformedGeometry **transformedGeometry + ) + { + return CreateTransformedGeometry(sourceGeometry, &transform, transformedGeometry); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateStrokeStyle( + CONST D2D1_STROKE_STYLE_PROPERTIES &strokeStyleProperties, + _In_reads_opt_(dashesCount) CONST FLOAT *dashes, + UINT32 dashesCount, + _COM_Outptr_ ID2D1StrokeStyle **strokeStyle + ) + { + return CreateStrokeStyle(&strokeStyleProperties, dashes, dashesCount, strokeStyle); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateDrawingStateBlock( + CONST D2D1_DRAWING_STATE_DESCRIPTION &drawingStateDescription, + _COM_Outptr_ ID2D1DrawingStateBlock **drawingStateBlock + ) + { + return CreateDrawingStateBlock(&drawingStateDescription, NULL, drawingStateBlock); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateDrawingStateBlock( + _COM_Outptr_ ID2D1DrawingStateBlock **drawingStateBlock + ) + { + return CreateDrawingStateBlock(NULL, NULL, drawingStateBlock); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateWicBitmapRenderTarget( + _In_ IWICBitmap *target, + CONST D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties, + _COM_Outptr_ ID2D1RenderTarget **renderTarget + ) + { + return CreateWicBitmapRenderTarget(target, &renderTargetProperties, renderTarget); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateHwndRenderTarget( + CONST D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties, + CONST D2D1_HWND_RENDER_TARGET_PROPERTIES &hwndRenderTargetProperties, + _COM_Outptr_ ID2D1HwndRenderTarget **hwndRenderTarget + ) + { + return CreateHwndRenderTarget(&renderTargetProperties, &hwndRenderTargetProperties, hwndRenderTarget); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateDxgiSurfaceRenderTarget( + _In_ IDXGISurface *dxgiSurface, + CONST D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties, + _COM_Outptr_ ID2D1RenderTarget **renderTarget + ) + { + return CreateDxgiSurfaceRenderTarget(dxgiSurface, &renderTargetProperties, renderTarget); + } +}; // interface ID2D1Factory + + + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ + + +#endif + + +#ifdef D2D_USE_C_DEFINITIONS + + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + +typedef interface ID2D1Resource ID2D1Resource; + +typedef interface ID2D1Image ID2D1Image; + +typedef interface ID2D1Bitmap ID2D1Bitmap; + +typedef interface ID2D1GradientStopCollection ID2D1GradientStopCollection; + +typedef interface ID2D1Brush ID2D1Brush; + +typedef interface ID2D1BitmapBrush ID2D1BitmapBrush; + +typedef interface ID2D1SolidColorBrush ID2D1SolidColorBrush; + +typedef interface ID2D1LinearGradientBrush ID2D1LinearGradientBrush; + +typedef interface ID2D1RadialGradientBrush ID2D1RadialGradientBrush; + +typedef interface ID2D1StrokeStyle ID2D1StrokeStyle; + +typedef interface ID2D1Geometry ID2D1Geometry; + +typedef interface ID2D1RectangleGeometry ID2D1RectangleGeometry; + +typedef interface ID2D1RoundedRectangleGeometry ID2D1RoundedRectangleGeometry; + +typedef interface ID2D1EllipseGeometry ID2D1EllipseGeometry; + +typedef interface ID2D1GeometryGroup ID2D1GeometryGroup; + +typedef interface ID2D1TransformedGeometry ID2D1TransformedGeometry; + +typedef interface ID2D1SimplifiedGeometrySink ID2D1SimplifiedGeometrySink; + +typedef interface ID2D1GeometrySink ID2D1GeometrySink; + +typedef interface ID2D1TessellationSink ID2D1TessellationSink; + +typedef interface ID2D1PathGeometry ID2D1PathGeometry; + +typedef interface ID2D1Mesh ID2D1Mesh; + +typedef interface ID2D1Layer ID2D1Layer; + +typedef interface ID2D1DrawingStateBlock ID2D1DrawingStateBlock; + +typedef interface ID2D1RenderTarget ID2D1RenderTarget; + +typedef interface ID2D1BitmapRenderTarget ID2D1BitmapRenderTarget; + +typedef interface ID2D1HwndRenderTarget ID2D1HwndRenderTarget; + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + +typedef interface ID2D1GdiInteropRenderTarget ID2D1GdiInteropRenderTarget; + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + +typedef interface ID2D1DCRenderTarget ID2D1DCRenderTarget; + +typedef interface ID2D1Factory ID2D1Factory; + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ + + +#endif + + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + +#ifdef __cplusplus +extern "C" +{ +#endif + + // + // This export cannot be in a namespace because compiler name mangling isn't consistent + // also, this must be 'C' callable. + // + HRESULT WINAPI + D2D1CreateFactory( + _In_ D2D1_FACTORY_TYPE factoryType, + _In_ REFIID riid, + _In_opt_ CONST D2D1_FACTORY_OPTIONS *pFactoryOptions, + _Out_ void **ppIFactory + ); + + + void WINAPI + D2D1MakeRotateMatrix( + _In_ FLOAT angle, + _In_ D2D1_POINT_2F center, + _Out_ D2D1_MATRIX_3X2_F *matrix + ); + + void WINAPI + D2D1MakeSkewMatrix( + _In_ FLOAT angleX, + _In_ FLOAT angleY, + _In_ D2D1_POINT_2F center, + _Out_ D2D1_MATRIX_3X2_F *matrix + ); + + BOOL WINAPI + D2D1IsMatrixInvertible( + _In_ CONST D2D1_MATRIX_3X2_F *matrix + ); + + BOOL WINAPI + D2D1InvertMatrix( + _Inout_ D2D1_MATRIX_3X2_F *matrix + ); + +#ifdef __cplusplus +} +#endif + +#ifndef D2D1FORCEINLINE +#define D2D1FORCEINLINE FORCEINLINE +#endif // #ifndef D2D1FORCEINLINE + + +#include + + +#ifndef D2D_USE_C_DEFINITIONS + +COM_DECLSPEC_NOTHROW +inline +HRESULT +D2D1CreateFactory( + _In_ D2D1_FACTORY_TYPE factoryType, + _In_ REFIID riid, + _Out_ void **factory + ) +{ + return + D2D1CreateFactory( + factoryType, + riid, + NULL, + factory); +} + + +template +COM_DECLSPEC_NOTHROW +HRESULT +D2D1CreateFactory( + _In_ D2D1_FACTORY_TYPE factoryType, + _Out_ Factory **factory + ) +{ + return + D2D1CreateFactory( + factoryType, + __uuidof(Factory), + reinterpret_cast(factory)); +} + +template +COM_DECLSPEC_NOTHROW +HRESULT +D2D1CreateFactory( + _In_ D2D1_FACTORY_TYPE factoryType, + _In_ CONST D2D1_FACTORY_OPTIONS &factoryOptions, + _Out_ Factory **ppFactory + ) +{ + return + D2D1CreateFactory( + factoryType, + __uuidof(Factory), + &factoryOptions, + reinterpret_cast(ppFactory)); +} + +#endif // #ifndef D2D_USE_C_DEFINITIONS + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ + +#endif // #ifndef _D2D1_H_ diff --git a/gfx/include/dxsdk/d2d1_1.h b/gfx/include/dxsdk/d2d1_1.h new file mode 100644 index 0000000000..359f05c052 --- /dev/null +++ b/gfx/include/dxsdk/d2d1_1.h @@ -0,0 +1,2530 @@ +//--------------------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// This file is automatically generated. Please do not edit it directly. +// +// File name: D2D1_1.h +//--------------------------------------------------------------------------- +#ifdef _MSC_VER +#pragma once +#endif // #ifdef _MSC_VER + +#ifndef _D2D1_1_H_ +#define _D2D1_1_H_ + +#ifndef _D2D1_H_ +#include +#endif // #ifndef _D2D1_H_ +#ifndef _D2D1_EFFECTS_ +#include +#endif // #ifndef _D2D1_EFFECTS_ + +/*#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ +#include +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ + +/*#include */ + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + +typedef interface ID2D1ColorContext ID2D1ColorContext; +typedef interface IWICColorContext IWICColorContext; +typedef interface IWICImagingFactory IWICImagingFactory; +typedef interface IPrintDocumentPackageTarget IPrintDocumentPackageTarget; +typedef interface IDWriteFactory IDWriteFactory; +typedef struct DWRITE_GLYPH_RUN_DESCRIPTION DWRITE_GLYPH_RUN_DESCRIPTION; +typedef struct D2D1_PROPERTY_BINDING D2D1_PROPERTY_BINDING; + +/// +/// Function pointer to construct a new effect once registered. +/// +typedef HRESULT (CALLBACK *PD2D1_EFFECT_FACTORY)( + _Outptr_ IUnknown **effectImpl + ); + +#ifndef D2D_USE_C_DEFINITIONS + +interface ID2D1Device; +interface ID2D1Effect; +#else + +typedef interface ID2D1Device ID2D1Device; +typedef interface ID2D1Effect ID2D1Effect; + +#endif +#define D2D1_INVALID_PROPERTY_INDEX UINT_MAX +typedef D2D_RECT_L D2D1_RECT_L; +typedef D2D_POINT_2L D2D1_POINT_2L; + +/// +/// This defines the valid property types that can be used in an effect property +/// interface. +/// +typedef enum D2D1_PROPERTY_TYPE +{ + D2D1_PROPERTY_TYPE_UNKNOWN = 0, + D2D1_PROPERTY_TYPE_STRING = 1, + D2D1_PROPERTY_TYPE_BOOL = 2, + D2D1_PROPERTY_TYPE_UINT32 = 3, + D2D1_PROPERTY_TYPE_INT32 = 4, + D2D1_PROPERTY_TYPE_FLOAT = 5, + D2D1_PROPERTY_TYPE_VECTOR2 = 6, + D2D1_PROPERTY_TYPE_VECTOR3 = 7, + D2D1_PROPERTY_TYPE_VECTOR4 = 8, + D2D1_PROPERTY_TYPE_BLOB = 9, + D2D1_PROPERTY_TYPE_IUNKNOWN = 10, + D2D1_PROPERTY_TYPE_ENUM = 11, + D2D1_PROPERTY_TYPE_ARRAY = 12, + D2D1_PROPERTY_TYPE_CLSID = 13, + D2D1_PROPERTY_TYPE_MATRIX_3X2 = 14, + D2D1_PROPERTY_TYPE_MATRIX_4X3 = 15, + D2D1_PROPERTY_TYPE_MATRIX_4X4 = 16, + D2D1_PROPERTY_TYPE_MATRIX_5X4 = 17, + D2D1_PROPERTY_TYPE_COLOR_CONTEXT = 18, + D2D1_PROPERTY_TYPE_FORCE_DWORD = 0xffffffff + +} D2D1_PROPERTY_TYPE; + + +/// +/// This defines the list of system properties present on the root effect property +/// interface. +/// +typedef enum D2D1_PROPERTY +{ + D2D1_PROPERTY_CLSID = 0x80000000, + D2D1_PROPERTY_DISPLAYNAME = 0x80000001, + D2D1_PROPERTY_AUTHOR = 0x80000002, + D2D1_PROPERTY_CATEGORY = 0x80000003, + D2D1_PROPERTY_DESCRIPTION = 0x80000004, + D2D1_PROPERTY_INPUTS = 0x80000005, + D2D1_PROPERTY_CACHED = 0x80000006, + D2D1_PROPERTY_PRECISION = 0x80000007, + D2D1_PROPERTY_MIN_INPUTS = 0x80000008, + D2D1_PROPERTY_MAX_INPUTS = 0x80000009, + D2D1_PROPERTY_FORCE_DWORD = 0xffffffff + +} D2D1_PROPERTY; + + +/// +/// This defines the indices of sub-properties that may be present on any parent +/// property. +/// +typedef enum D2D1_SUBPROPERTY +{ + D2D1_SUBPROPERTY_DISPLAYNAME = 0x80000000, + D2D1_SUBPROPERTY_ISREADONLY = 0x80000001, + D2D1_SUBPROPERTY_MIN = 0x80000002, + D2D1_SUBPROPERTY_MAX = 0x80000003, + D2D1_SUBPROPERTY_DEFAULT = 0x80000004, + D2D1_SUBPROPERTY_FIELDS = 0x80000005, + D2D1_SUBPROPERTY_INDEX = 0x80000006, + D2D1_SUBPROPERTY_FORCE_DWORD = 0xffffffff + +} D2D1_SUBPROPERTY; + + +/// +/// Specifies how the bitmap can be used. +/// +typedef enum D2D1_BITMAP_OPTIONS +{ + + /// + /// The bitmap is created with default properties. + /// + D2D1_BITMAP_OPTIONS_NONE = 0x00000000, + + /// + /// The bitmap can be specified as a target in ID2D1DeviceContext::SetTarget + /// + D2D1_BITMAP_OPTIONS_TARGET = 0x00000001, + + /// + /// The bitmap cannot be used as an input to DrawBitmap, DrawImage, in a bitmap + /// brush or as an input to an effect. + /// + D2D1_BITMAP_OPTIONS_CANNOT_DRAW = 0x00000002, + + /// + /// The bitmap can be read from the CPU. + /// + D2D1_BITMAP_OPTIONS_CPU_READ = 0x00000004, + + /// + /// The bitmap works with the ID2D1GdiInteropRenderTarget::GetDC API. + /// + D2D1_BITMAP_OPTIONS_GDI_COMPATIBLE = 0x00000008, + D2D1_BITMAP_OPTIONS_FORCE_DWORD = 0xffffffff + +} D2D1_BITMAP_OPTIONS; + +DEFINE_ENUM_FLAG_OPERATORS(D2D1_BITMAP_OPTIONS); + + +/// +/// Specifies the composite mode that will be applied. +/// +typedef enum D2D1_COMPOSITE_MODE +{ + D2D1_COMPOSITE_MODE_SOURCE_OVER = 0, + D2D1_COMPOSITE_MODE_DESTINATION_OVER = 1, + D2D1_COMPOSITE_MODE_SOURCE_IN = 2, + D2D1_COMPOSITE_MODE_DESTINATION_IN = 3, + D2D1_COMPOSITE_MODE_SOURCE_OUT = 4, + D2D1_COMPOSITE_MODE_DESTINATION_OUT = 5, + D2D1_COMPOSITE_MODE_SOURCE_ATOP = 6, + D2D1_COMPOSITE_MODE_DESTINATION_ATOP = 7, + D2D1_COMPOSITE_MODE_XOR = 8, + D2D1_COMPOSITE_MODE_PLUS = 9, + D2D1_COMPOSITE_MODE_SOURCE_COPY = 10, + D2D1_COMPOSITE_MODE_BOUNDED_SOURCE_COPY = 11, + D2D1_COMPOSITE_MODE_MASK_INVERT = 12, + D2D1_COMPOSITE_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_COMPOSITE_MODE; + + +/// +/// This specifies the precision that should be used in buffers allocated by D2D. +/// +typedef enum D2D1_BUFFER_PRECISION +{ + D2D1_BUFFER_PRECISION_UNKNOWN = 0, + D2D1_BUFFER_PRECISION_8BPC_UNORM = 1, + D2D1_BUFFER_PRECISION_8BPC_UNORM_SRGB = 2, + D2D1_BUFFER_PRECISION_16BPC_UNORM = 3, + D2D1_BUFFER_PRECISION_16BPC_FLOAT = 4, + D2D1_BUFFER_PRECISION_32BPC_FLOAT = 5, + D2D1_BUFFER_PRECISION_FORCE_DWORD = 0xffffffff + +} D2D1_BUFFER_PRECISION; + + +/// +/// This describes how the individual mapping operation should be performed. +/// +typedef enum D2D1_MAP_OPTIONS +{ + + /// + /// The mapped pointer has undefined behavior. + /// + D2D1_MAP_OPTIONS_NONE = 0, + + /// + /// The mapped pointer can be read from. + /// + D2D1_MAP_OPTIONS_READ = 1, + + /// + /// The mapped pointer can be written to. + /// + D2D1_MAP_OPTIONS_WRITE = 2, + + /// + /// The previous contents of the bitmap are discarded when it is mapped. + /// + D2D1_MAP_OPTIONS_DISCARD = 4, + D2D1_MAP_OPTIONS_FORCE_DWORD = 0xffffffff + +} D2D1_MAP_OPTIONS; + +DEFINE_ENUM_FLAG_OPERATORS(D2D1_MAP_OPTIONS); + + +/// +/// This is used to specify the quality of image scaling with +/// ID2D1DeviceContext::DrawImage and with the 2D Affine Transform Effect. +/// +typedef enum D2D1_INTERPOLATION_MODE +{ + D2D1_INTERPOLATION_MODE_NEAREST_NEIGHBOR = D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR, + D2D1_INTERPOLATION_MODE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR, + D2D1_INTERPOLATION_MODE_CUBIC = D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC, + D2D1_INTERPOLATION_MODE_MULTI_SAMPLE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR, + D2D1_INTERPOLATION_MODE_ANISOTROPIC = D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC, + D2D1_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC = D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC, + D2D1_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_INTERPOLATION_MODE; + + +/// +/// This specifies what units should be accepted by the D2D API. +/// +typedef enum D2D1_UNIT_MODE +{ + D2D1_UNIT_MODE_DIPS = 0, + D2D1_UNIT_MODE_PIXELS = 1, + D2D1_UNIT_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_UNIT_MODE; + + +/// +/// Defines a color space. +/// +typedef enum D2D1_COLOR_SPACE +{ + + /// + /// The color space is described by accompanying data, such as a color profile. + /// + D2D1_COLOR_SPACE_CUSTOM = 0, + + /// + /// The sRGB color space. + /// + D2D1_COLOR_SPACE_SRGB = 1, + + /// + /// The scRGB color space. + /// + D2D1_COLOR_SPACE_SCRGB = 2, + D2D1_COLOR_SPACE_FORCE_DWORD = 0xffffffff + +} D2D1_COLOR_SPACE; + + +/// +/// This specifies options that apply to the device context for its lifetime. +/// +typedef enum D2D1_DEVICE_CONTEXT_OPTIONS +{ + D2D1_DEVICE_CONTEXT_OPTIONS_NONE = 0, + + /// + /// Geometry rendering will be performed on many threads in parallel, a single + /// thread is the default. + /// + D2D1_DEVICE_CONTEXT_OPTIONS_ENABLE_MULTITHREADED_OPTIMIZATIONS = 1, + D2D1_DEVICE_CONTEXT_OPTIONS_FORCE_DWORD = 0xffffffff + +} D2D1_DEVICE_CONTEXT_OPTIONS; + +DEFINE_ENUM_FLAG_OPERATORS(D2D1_DEVICE_CONTEXT_OPTIONS); + + +/// +/// Defines how the world transform, dots per inch (dpi), and stroke width affect +/// the shape of the pen used to stroke a primitive. +/// +typedef enum D2D1_STROKE_TRANSFORM_TYPE +{ + + /// + /// The stroke respects the world transform, the DPI, and the stroke width. + /// + D2D1_STROKE_TRANSFORM_TYPE_NORMAL = 0, + + /// + /// The stroke does not respect the world transform, but it does respect the DPI and + /// the stroke width. + /// + D2D1_STROKE_TRANSFORM_TYPE_FIXED = 1, + + /// + /// The stroke is forced to one pixel wide. + /// + D2D1_STROKE_TRANSFORM_TYPE_HAIRLINE = 2, + D2D1_STROKE_TRANSFORM_TYPE_FORCE_DWORD = 0xffffffff + +} D2D1_STROKE_TRANSFORM_TYPE; + + +/// +/// A blend mode that applies to all primitives drawn on the context. +/// +typedef enum D2D1_PRIMITIVE_BLEND +{ + D2D1_PRIMITIVE_BLEND_SOURCE_OVER = 0, + D2D1_PRIMITIVE_BLEND_COPY = 1, + D2D1_PRIMITIVE_BLEND_MIN = 2, + D2D1_PRIMITIVE_BLEND_ADD = 3, + D2D1_PRIMITIVE_BLEND_MAX = 4, + D2D1_PRIMITIVE_BLEND_FORCE_DWORD = 0xffffffff + +} D2D1_PRIMITIVE_BLEND; + + +/// +/// This specifies the threading mode used while simultaneously creating the device, +/// factory, and device context. +/// +typedef enum D2D1_THREADING_MODE +{ + + /// + /// Resources may only be invoked serially. Reference counts on resources are + /// interlocked, however, resource and render target state is not protected from + /// multi-threaded access + /// + D2D1_THREADING_MODE_SINGLE_THREADED = D2D1_FACTORY_TYPE_SINGLE_THREADED, + + /// + /// Resources may be invoked from multiple threads. Resources use interlocked + /// reference counting and their state is protected. + /// + D2D1_THREADING_MODE_MULTI_THREADED = D2D1_FACTORY_TYPE_MULTI_THREADED, + D2D1_THREADING_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_THREADING_MODE; + + +/// +/// This specifies how colors are interpolated. +/// +typedef enum D2D1_COLOR_INTERPOLATION_MODE +{ + + /// + /// Colors will be interpolated in straight alpha space. + /// + D2D1_COLOR_INTERPOLATION_MODE_STRAIGHT = 0, + + /// + /// Colors will be interpolated in premultiplied alpha space. + /// + D2D1_COLOR_INTERPOLATION_MODE_PREMULTIPLIED = 1, + D2D1_COLOR_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_COLOR_INTERPOLATION_MODE; + +typedef D2D_VECTOR_2F D2D1_VECTOR_2F; +typedef D2D_VECTOR_3F D2D1_VECTOR_3F; +typedef D2D_VECTOR_4F D2D1_VECTOR_4F; + +/// +/// Extended bitmap properties. +/// +typedef struct D2D1_BITMAP_PROPERTIES1 +{ + D2D1_PIXEL_FORMAT pixelFormat; + FLOAT dpiX; + FLOAT dpiY; + + /// + /// Specifies how the bitmap can be used. + /// + D2D1_BITMAP_OPTIONS bitmapOptions; + _Field_size_opt_(1) ID2D1ColorContext *colorContext; + +} D2D1_BITMAP_PROPERTIES1; + + +/// +/// Describes mapped memory from the ID2D1Bitmap1::Map API. +/// +typedef struct D2D1_MAPPED_RECT +{ + UINT32 pitch; + BYTE *bits; + +} D2D1_MAPPED_RECT; + + +/// +/// This controls advanced settings of the Direct2D imaging pipeline. +/// +typedef struct D2D1_RENDERING_CONTROLS +{ + + /// + /// The default buffer precision, used if the precision isn't otherwise specified. + /// + D2D1_BUFFER_PRECISION bufferPrecision; + + /// + /// The size of allocated tiles used to render imaging effects. + /// + D2D1_SIZE_U tileSize; + +} D2D1_RENDERING_CONTROLS; + + +/// +/// This identifies a certain input connection of a certain effect. +/// +typedef struct D2D1_EFFECT_INPUT_DESCRIPTION +{ + + /// + /// The effect whose input connection is being specified. + /// + ID2D1Effect *effect; + + /// + /// The index of the input connection into the specified effect. + /// + UINT32 inputIndex; + + /// + /// The rectangle which would be available on the specified input connection during + /// render operations. + /// + D2D1_RECT_F inputRectangle; + +} D2D1_EFFECT_INPUT_DESCRIPTION; + +typedef D2D_MATRIX_4X3_F D2D1_MATRIX_4X3_F; +typedef D2D_MATRIX_4X4_F D2D1_MATRIX_4X4_F; +typedef D2D_MATRIX_5X4_F D2D1_MATRIX_5X4_F; + +/// +/// Describes a point along a path. +/// +typedef struct D2D1_POINT_DESCRIPTION +{ + D2D1_POINT_2F point; + D2D1_POINT_2F unitTangentVector; + UINT32 endSegment; + UINT32 endFigure; + FLOAT lengthToEndSegment; + +} D2D1_POINT_DESCRIPTION; + + +/// +/// Creation properties for an image brush. +/// +typedef struct D2D1_IMAGE_BRUSH_PROPERTIES +{ + D2D1_RECT_F sourceRectangle; + D2D1_EXTEND_MODE extendModeX; + D2D1_EXTEND_MODE extendModeY; + D2D1_INTERPOLATION_MODE interpolationMode; + +} D2D1_IMAGE_BRUSH_PROPERTIES; + + +/// +/// Describes the extend modes and the interpolation mode of an ID2D1BitmapBrush. +/// +typedef struct D2D1_BITMAP_BRUSH_PROPERTIES1 +{ + D2D1_EXTEND_MODE extendModeX; + D2D1_EXTEND_MODE extendModeY; + D2D1_INTERPOLATION_MODE interpolationMode; + +} D2D1_BITMAP_BRUSH_PROPERTIES1; + + +/// +/// This defines how geometries should be drawn and widened. +/// +typedef struct D2D1_STROKE_STYLE_PROPERTIES1 +{ + D2D1_CAP_STYLE startCap; + D2D1_CAP_STYLE endCap; + D2D1_CAP_STYLE dashCap; + D2D1_LINE_JOIN lineJoin; + FLOAT miterLimit; + D2D1_DASH_STYLE dashStyle; + FLOAT dashOffset; + + /// + /// How the nib of the stroke is influenced by the context properties. + /// + D2D1_STROKE_TRANSFORM_TYPE transformType; + +} D2D1_STROKE_STYLE_PROPERTIES1; + + +/// +/// Specifies how the layer contents should be prepared. +/// +typedef enum D2D1_LAYER_OPTIONS1 +{ + D2D1_LAYER_OPTIONS1_NONE = 0, + D2D1_LAYER_OPTIONS1_INITIALIZE_FROM_BACKGROUND = 1, + D2D1_LAYER_OPTIONS1_IGNORE_ALPHA = 2, + D2D1_LAYER_OPTIONS1_FORCE_DWORD = 0xffffffff + +} D2D1_LAYER_OPTIONS1; + +DEFINE_ENUM_FLAG_OPERATORS(D2D1_LAYER_OPTIONS1); + + +/// +/// All parameters related to pushing a layer. +/// +typedef struct D2D1_LAYER_PARAMETERS1 +{ + D2D1_RECT_F contentBounds; + _Field_size_opt_(1) ID2D1Geometry *geometricMask; + D2D1_ANTIALIAS_MODE maskAntialiasMode; + D2D1_MATRIX_3X2_F maskTransform; + FLOAT opacity; + _Field_size_opt_(1) ID2D1Brush *opacityBrush; + D2D1_LAYER_OPTIONS1 layerOptions; + +} D2D1_LAYER_PARAMETERS1; + + +/// +/// Defines when font resources should be subset during printing. +/// +typedef enum D2D1_PRINT_FONT_SUBSET_MODE +{ + + /// + /// Subset for used glyphs, send and discard font resource after every five pages + /// + D2D1_PRINT_FONT_SUBSET_MODE_DEFAULT = 0, + + /// + /// Subset for used glyphs, send and discard font resource after each page + /// + D2D1_PRINT_FONT_SUBSET_MODE_EACHPAGE = 1, + + /// + /// Do not subset, reuse font for all pages, send it after first page + /// + D2D1_PRINT_FONT_SUBSET_MODE_NONE = 2, + D2D1_PRINT_FONT_SUBSET_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_PRINT_FONT_SUBSET_MODE; + + +/// +/// This describes the drawing state. +/// +typedef struct D2D1_DRAWING_STATE_DESCRIPTION1 +{ + D2D1_ANTIALIAS_MODE antialiasMode; + D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode; + D2D1_TAG tag1; + D2D1_TAG tag2; + D2D1_MATRIX_3X2_F transform; + D2D1_PRIMITIVE_BLEND primitiveBlend; + D2D1_UNIT_MODE unitMode; + +} D2D1_DRAWING_STATE_DESCRIPTION1; + + +/// +/// The creation properties for a ID2D1PrintControl object. +/// +typedef struct D2D1_PRINT_CONTROL_PROPERTIES +{ + D2D1_PRINT_FONT_SUBSET_MODE fontSubset; + + /// + /// DPI for rasterization of all unsupported D2D commands or options, defaults to + /// 150.0 + /// + FLOAT rasterDPI; + + /// + /// Color space for vector graphics in XPS package + /// + D2D1_COLOR_SPACE colorSpace; + +} D2D1_PRINT_CONTROL_PROPERTIES; + + +/// +/// This specifies the options while simultaneously creating the device, factory, +/// and device context. +/// +typedef struct D2D1_CREATION_PROPERTIES +{ + + /// + /// Describes locking behavior of D2D resources + /// + D2D1_THREADING_MODE threadingMode; + D2D1_DEBUG_LEVEL debugLevel; + D2D1_DEVICE_CONTEXT_OPTIONS options; + +} D2D1_CREATION_PROPERTIES; + + +EXTERN_C CONST IID IID_ID2D1GdiMetafileSink; +EXTERN_C CONST IID IID_ID2D1GdiMetafile; +EXTERN_C CONST IID IID_ID2D1CommandSink; +EXTERN_C CONST IID IID_ID2D1CommandList; +EXTERN_C CONST IID IID_ID2D1PrintControl; +EXTERN_C CONST IID IID_ID2D1ImageBrush; +EXTERN_C CONST IID IID_ID2D1BitmapBrush1; +EXTERN_C CONST IID IID_ID2D1StrokeStyle1; +EXTERN_C CONST IID IID_ID2D1PathGeometry1; +EXTERN_C CONST IID IID_ID2D1Properties; +EXTERN_C CONST IID IID_ID2D1Effect; +EXTERN_C CONST IID IID_ID2D1Bitmap1; +EXTERN_C CONST IID IID_ID2D1ColorContext; +EXTERN_C CONST IID IID_ID2D1GradientStopCollection1; +EXTERN_C CONST IID IID_ID2D1DrawingStateBlock1; +EXTERN_C CONST IID IID_ID2D1DeviceContext; +EXTERN_C CONST IID IID_ID2D1Device; +EXTERN_C CONST IID IID_ID2D1Factory1; +EXTERN_C CONST IID IID_ID2D1Multithread; + + +#ifndef D2D_USE_C_DEFINITIONS + + +/// +/// User-implementable interface for introspecting on a metafile. +/// +interface DX_DECLARE_INTERFACE("82237326-8111-4f7c-bcf4-b5c1175564fe") ID2D1GdiMetafileSink : public IUnknown +{ + + /// + /// Callback for examining a metafile record. + /// + STDMETHOD(ProcessRecord)( + DWORD recordType, + _In_opt_ CONST void *recordData, + DWORD recordDataSize + ) PURE; +}; // interface ID2D1GdiMetafileSink + + +/// +/// Interface encapsulating a GDI/GDI+ metafile. +/// +interface DX_DECLARE_INTERFACE("2f543dc3-cfc1-4211-864f-cfd91c6f3395") ID2D1GdiMetafile : public ID2D1Resource +{ + + /// + /// Play the metafile into a caller-supplied sink interface. + /// + STDMETHOD(Stream)( + _In_ ID2D1GdiMetafileSink *sink + ) PURE; + + /// + /// Gets the bounds of the metafile. + /// + STDMETHOD(GetBounds)( + _Out_ D2D1_RECT_F *bounds + ) PURE; +}; // interface ID2D1GdiMetafile + + +/// +/// Caller-supplied implementation of an interface to receive the recorded command +/// list. +/// +interface DX_DECLARE_INTERFACE("54d7898a-a061-40a7-bec7-e465bcba2c4f") ID2D1CommandSink : public IUnknown +{ + + STDMETHOD(BeginDraw)( + ) PURE; + + STDMETHOD(EndDraw)( + ) PURE; + + STDMETHOD(SetAntialiasMode)( + D2D1_ANTIALIAS_MODE antialiasMode + ) PURE; + + STDMETHOD(SetTags)( + D2D1_TAG tag1, + D2D1_TAG tag2 + ) PURE; + + STDMETHOD(SetTextAntialiasMode)( + D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode + ) PURE; + + STDMETHOD(SetTextRenderingParams)( + _In_opt_ IDWriteRenderingParams *textRenderingParams + ) PURE; + + STDMETHOD(SetTransform)( + _In_ CONST D2D1_MATRIX_3X2_F *transform + ) PURE; + + STDMETHOD(SetPrimitiveBlend)( + D2D1_PRIMITIVE_BLEND primitiveBlend + ) PURE; + + STDMETHOD(SetUnitMode)( + D2D1_UNIT_MODE unitMode + ) PURE; + + STDMETHOD(Clear)( + _In_opt_ CONST D2D1_COLOR_F *color + ) PURE; + + STDMETHOD(DrawGlyphRun)( + D2D1_POINT_2F baselineOrigin, + _In_ CONST DWRITE_GLYPH_RUN *glyphRun, + _In_opt_ CONST DWRITE_GLYPH_RUN_DESCRIPTION *glyphRunDescription, + _In_ ID2D1Brush *foregroundBrush, + DWRITE_MEASURING_MODE measuringMode + ) PURE; + + STDMETHOD(DrawLine)( + D2D1_POINT_2F point0, + D2D1_POINT_2F point1, + _In_ ID2D1Brush *brush, + FLOAT strokeWidth, + _In_opt_ ID2D1StrokeStyle *strokeStyle + ) PURE; + + STDMETHOD(DrawGeometry)( + _In_ ID2D1Geometry *geometry, + _In_ ID2D1Brush *brush, + FLOAT strokeWidth, + _In_opt_ ID2D1StrokeStyle *strokeStyle + ) PURE; + + STDMETHOD(DrawRectangle)( + _In_ CONST D2D1_RECT_F *rect, + _In_ ID2D1Brush *brush, + FLOAT strokeWidth, + _In_opt_ ID2D1StrokeStyle *strokeStyle + ) PURE; + + STDMETHOD(DrawBitmap)( + _In_ ID2D1Bitmap *bitmap, + _In_opt_ CONST D2D1_RECT_F *destinationRectangle, + FLOAT opacity, + D2D1_INTERPOLATION_MODE interpolationMode, + _In_opt_ CONST D2D1_RECT_F *sourceRectangle, + _In_opt_ CONST D2D1_MATRIX_4X4_F *perspectiveTransform + ) PURE; + + STDMETHOD(DrawImage)( + _In_ ID2D1Image *image, + _In_opt_ CONST D2D1_POINT_2F *targetOffset, + _In_opt_ CONST D2D1_RECT_F *imageRectangle, + D2D1_INTERPOLATION_MODE interpolationMode, + D2D1_COMPOSITE_MODE compositeMode + ) PURE; + + STDMETHOD(DrawGdiMetafile)( + _In_ ID2D1GdiMetafile *gdiMetafile, + _In_opt_ CONST D2D1_POINT_2F *targetOffset + ) PURE; + + STDMETHOD(FillMesh)( + _In_ ID2D1Mesh *mesh, + _In_ ID2D1Brush *brush + ) PURE; + + STDMETHOD(FillOpacityMask)( + _In_ ID2D1Bitmap *opacityMask, + _In_ ID2D1Brush *brush, + _In_opt_ CONST D2D1_RECT_F *destinationRectangle, + _In_opt_ CONST D2D1_RECT_F *sourceRectangle + ) PURE; + + STDMETHOD(FillGeometry)( + _In_ ID2D1Geometry *geometry, + _In_ ID2D1Brush *brush, + _In_opt_ ID2D1Brush *opacityBrush + ) PURE; + + STDMETHOD(FillRectangle)( + _In_ CONST D2D1_RECT_F *rect, + _In_ ID2D1Brush *brush + ) PURE; + + STDMETHOD(PushAxisAlignedClip)( + _In_ CONST D2D1_RECT_F *clipRect, + D2D1_ANTIALIAS_MODE antialiasMode + ) PURE; + + STDMETHOD(PushLayer)( + _In_ CONST D2D1_LAYER_PARAMETERS1 *layerParameters1, + _In_opt_ ID2D1Layer *layer + ) PURE; + + STDMETHOD(PopAxisAlignedClip)( + ) PURE; + + STDMETHOD(PopLayer)( + ) PURE; +}; // interface ID2D1CommandSink + + +/// +/// The commandList interface. +/// +interface DX_DECLARE_INTERFACE("b4f34a19-2383-4d76-94f6-ec343657c3dc") ID2D1CommandList : public ID2D1Image +{ + + /// + /// Play the command list into a caller-supplied sink interface. + /// + STDMETHOD(Stream)( + _In_ ID2D1CommandSink *sink + ) PURE; + + /// + /// Marks the command list as ready for use. + /// + STDMETHOD(Close)( + ) PURE; +}; // interface ID2D1CommandList + + +/// +/// Converts Direct2D primitives stored in an ID2D1CommandList into a fixed page +/// representation. The print sub-system then consumes the primitives. +/// +interface DX_DECLARE_INTERFACE("2c1d867d-c290-41c8-ae7e-34a98702e9a5") ID2D1PrintControl : public IUnknown +{ + + STDMETHOD(AddPage)( + _In_ ID2D1CommandList *commandList, + D2D_SIZE_F pageSize, + _In_opt_ IStream *pagePrintTicketStream, + _Out_opt_ D2D1_TAG *tag1 = NULL, + _Out_opt_ D2D1_TAG *tag2 = NULL + ) PURE; + + STDMETHOD(Close)( + ) PURE; +}; // interface ID2D1PrintControl + + +/// +/// Provides a brush that can take any effect, command list or bitmap and use it to +/// fill a 2D shape. +/// +interface DX_DECLARE_INTERFACE("fe9e984d-3f95-407c-b5db-cb94d4e8f87c") ID2D1ImageBrush : public ID2D1Brush +{ + + STDMETHOD_(void, SetImage)( + _In_opt_ ID2D1Image *image + ) PURE; + + STDMETHOD_(void, SetExtendModeX)( + D2D1_EXTEND_MODE extendModeX + ) PURE; + + STDMETHOD_(void, SetExtendModeY)( + D2D1_EXTEND_MODE extendModeY + ) PURE; + + STDMETHOD_(void, SetInterpolationMode)( + D2D1_INTERPOLATION_MODE interpolationMode + ) PURE; + + STDMETHOD_(void, SetSourceRectangle)( + _In_ CONST D2D1_RECT_F *sourceRectangle + ) PURE; + + STDMETHOD_(void, GetImage)( + _Outptr_result_maybenull_ ID2D1Image **image + ) CONST PURE; + + STDMETHOD_(D2D1_EXTEND_MODE, GetExtendModeX)( + ) CONST PURE; + + STDMETHOD_(D2D1_EXTEND_MODE, GetExtendModeY)( + ) CONST PURE; + + STDMETHOD_(D2D1_INTERPOLATION_MODE, GetInterpolationMode)( + ) CONST PURE; + + STDMETHOD_(void, GetSourceRectangle)( + _Out_ D2D1_RECT_F *sourceRectangle + ) CONST PURE; +}; // interface ID2D1ImageBrush + + +/// +/// A bitmap brush allows a bitmap to be used to fill a geometry. Interpolation +/// mode is specified with D2D1_INTERPOLATION_MODE +/// +interface DX_DECLARE_INTERFACE("41343a53-e41a-49a2-91cd-21793bbb62e5") ID2D1BitmapBrush1 : public ID2D1BitmapBrush +{ + + /// + /// Sets the interpolation mode used when this brush is used. + /// + STDMETHOD_(void, SetInterpolationMode1)( + D2D1_INTERPOLATION_MODE interpolationMode + ) PURE; + + STDMETHOD_(D2D1_INTERPOLATION_MODE, GetInterpolationMode1)( + ) CONST PURE; +}; // interface ID2D1BitmapBrush1 + + +/// +/// Extends a stroke style to allow nominal width strokes. +/// +interface DX_DECLARE_INTERFACE("10a72a66-e91c-43f4-993f-ddf4b82b0b4a") ID2D1StrokeStyle1 : public ID2D1StrokeStyle +{ + + STDMETHOD_(D2D1_STROKE_TRANSFORM_TYPE, GetStrokeTransformType)( + ) CONST PURE; +}; // interface ID2D1StrokeStyle1 + + +/// +/// The ID2D1PathGeometry1 interface adds functionality to ID2D1PathGeometry. In +/// particular, it provides the path geometry-specific +/// ComputePointAndSegmentAtLength method. +/// +interface DX_DECLARE_INTERFACE("62baa2d2-ab54-41b7-b872-787e0106a421") ID2D1PathGeometry1 : public ID2D1PathGeometry +{ + + STDMETHOD(ComputePointAndSegmentAtLength)( + FLOAT length, + UINT32 startSegment, + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + FLOAT flatteningTolerance, + _Out_ D2D1_POINT_DESCRIPTION *pointDescription + ) CONST PURE; + + COM_DECLSPEC_NOTHROW + HRESULT + ComputePointAndSegmentAtLength( + FLOAT length, + UINT32 startSegment, + CONST D2D1_MATRIX_3X2_F &worldTransform, + FLOAT flatteningTolerance, + _Out_ D2D1_POINT_DESCRIPTION *pointDescription + ) CONST + { + return ComputePointAndSegmentAtLength(length, startSegment, &worldTransform, flatteningTolerance, pointDescription); + } + + COM_DECLSPEC_NOTHROW + HRESULT + ComputePointAndSegmentAtLength( + FLOAT length, + UINT32 startSegment, + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + _Out_ D2D1_POINT_DESCRIPTION *pointDescription + ) CONST + { + return ComputePointAndSegmentAtLength(length, startSegment, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, pointDescription); + } + + COM_DECLSPEC_NOTHROW + HRESULT + ComputePointAndSegmentAtLength( + FLOAT length, + UINT32 startSegment, + CONST D2D1_MATRIX_3X2_F &worldTransform, + _Out_ D2D1_POINT_DESCRIPTION *pointDescription + ) CONST + { + return ComputePointAndSegmentAtLength(length, startSegment, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, pointDescription); + } +}; // interface ID2D1PathGeometry1 + + +/// +/// Represents a set of run-time bindable and discoverable properties that allow a +/// data-driven application to modify the state of a Direct2D effect. +/// +interface DX_DECLARE_INTERFACE("483473d7-cd46-4f9d-9d3a-3112aa80159d") ID2D1Properties : public IUnknown +{ + + /// + /// Returns the total number of custom properties in this interface. + /// + STDMETHOD_(UINT32, GetPropertyCount)( + ) CONST PURE; + + /// + /// Retrieves the property name from the given property index. + /// + STDMETHOD(GetPropertyName)( + UINT32 index, + _Out_writes_(nameCount) PWSTR name, + UINT32 nameCount + ) CONST PURE; + + /// + /// Returns the length of the property name from the given index. + /// + STDMETHOD_(UINT32, GetPropertyNameLength)( + UINT32 index + ) CONST PURE; + + /// + /// Retrieves the type of the given property. + /// + STDMETHOD_(D2D1_PROPERTY_TYPE, GetType)( + UINT32 index + ) CONST PURE; + + /// + /// Retrieves the property index for the given property name. + /// + STDMETHOD_(UINT32, GetPropertyIndex)( + _In_ PCWSTR name + ) CONST PURE; + + /// + /// Sets the value of the given property using its name. + /// + STDMETHOD(SetValueByName)( + _In_ PCWSTR name, + D2D1_PROPERTY_TYPE type, + _In_reads_(dataSize) CONST BYTE *data, + UINT32 dataSize + ) PURE; + + /// + /// Sets the given value using the property index. + /// + STDMETHOD(SetValue)( + UINT32 index, + D2D1_PROPERTY_TYPE type, + _In_reads_(dataSize) CONST BYTE *data, + UINT32 dataSize + ) PURE; + + /// + /// Retrieves the given property or sub-property by name. '.' is the delimiter for + /// sub-properties. + /// + STDMETHOD(GetValueByName)( + _In_ PCWSTR name, + D2D1_PROPERTY_TYPE type, + _Out_writes_(dataSize) BYTE *data, + UINT32 dataSize + ) CONST PURE; + + /// + /// Retrieves the given value by index. + /// + STDMETHOD(GetValue)( + UINT32 index, + D2D1_PROPERTY_TYPE type, + _Out_writes_(dataSize) BYTE *data, + UINT32 dataSize + ) CONST PURE; + + /// + /// Returns the value size for the given property index. + /// + STDMETHOD_(UINT32, GetValueSize)( + UINT32 index + ) CONST PURE; + + /// + /// Retrieves the sub-properties of the given property by index. + /// + STDMETHOD(GetSubProperties)( + UINT32 index, + _COM_Outptr_result_maybenull_ ID2D1Properties **subProperties + ) CONST PURE; + + COM_DECLSPEC_NOTHROW + HRESULT + SetValueByName( + _In_ PCWSTR name, + _In_reads_(dataSize) CONST BYTE *data, + UINT32 dataSize + ) + { + return SetValueByName(name, D2D1_PROPERTY_TYPE_UNKNOWN, data, dataSize); + } + + COM_DECLSPEC_NOTHROW + HRESULT + SetValue( + UINT32 index, + _In_reads_(dataSize) CONST BYTE *data, + UINT32 dataSize + ) + { + return SetValue(index, D2D1_PROPERTY_TYPE_UNKNOWN, data, dataSize); + } + + COM_DECLSPEC_NOTHROW + HRESULT + GetValueByName( + _In_ PCWSTR name, + _Out_writes_(dataSize) BYTE *data, + UINT32 dataSize + ) CONST + { + return GetValueByName(name, D2D1_PROPERTY_TYPE_UNKNOWN, data, dataSize); + } + + COM_DECLSPEC_NOTHROW + HRESULT + GetValue( + UINT32 index, + _Out_writes_(dataSize) BYTE *data, + UINT32 dataSize + ) CONST + { + return GetValue(index, D2D1_PROPERTY_TYPE_UNKNOWN, data, dataSize); + } + + // + // Templatized helper functions: + // + template + HRESULT GetValueByName( + _In_ PCWSTR propertyName, + _Out_ T *value + ) const + { + return GetValueByName(propertyName, reinterpret_cast(value), sizeof(*value)); + } + + template + T GetValueByName( + _In_ PCWSTR propertyName + ) const + { + T value; + HRESULT ignoreHr = GetValueByName(propertyName, reinterpret_cast(&value), sizeof(value)); + UNREFERENCED_PARAMETER(ignoreHr); + + return value; + } + + + template + HRESULT SetValueByName( + _In_ PCWSTR propertyName, + _In_ const T &value + ) + { + return SetValueByName(propertyName, reinterpret_cast(&value), sizeof(value)); + } + + template + HRESULT GetValue( + U index, + _Out_writes_(dataSize) BYTE *data, + UINT32 dataSize + ) CONST + { + return GetValue(static_cast(index), data, dataSize); + } + + template + HRESULT GetValue( + U index, + _Out_ T *value + ) const + { + return GetValue(static_cast(index), reinterpret_cast(value), sizeof(*value)); + } + + template + T GetValue( + U index + ) const + { + T value; + HRESULT ignoreHr = GetValue(static_cast(index), reinterpret_cast(&value), sizeof(value)); + + // Unreferenced variable: + ignoreHr; + + return value; + } + + template + HRESULT SetValue( + U index, + _In_reads_(dataSize) CONST BYTE *data, + UINT32 dataSize + ) + { + return SetValue(static_cast(index), data, dataSize); + } + + template + HRESULT SetValue( + U index, + _In_ const T &value + ) + { + return SetValue(static_cast(index), reinterpret_cast(&value), sizeof(value)); + } + + template + HRESULT GetPropertyName( + U index, + _Out_writes_(nameCount) PWSTR name, + UINT32 nameCount + ) CONST + { + return GetPropertyName(static_cast(index), name, nameCount); + } + + template + UINT32 GetPropertyNameLength( + U index + ) CONST + { + return GetPropertyNameLength(static_cast(index)); + } + + template + D2D1_PROPERTY_TYPE GetType( + U index + ) CONST + { + return GetType(static_cast(index)); + } + + + template + UINT32 GetValueSize( + U index + ) CONST + { + return GetValueSize(static_cast(index)); + } + + template + HRESULT GetSubProperties( + U index, + _Outptr_result_maybenull_ ID2D1Properties **subProperties + ) CONST + { + return GetSubProperties(static_cast(index), subProperties); + } +}; // interface ID2D1Properties + + +/// +/// The effect interface. Properties control how the effect is rendered. The effect +/// is Drawn with the DrawImage call. +/// +interface DX_DECLARE_INTERFACE("28211a43-7d89-476f-8181-2d6159b220ad") ID2D1Effect : public ID2D1Properties +{ + + /// + /// Sets the input to the given effect. The input can be a concrete bitmap or the + /// output of another effect. + /// + STDMETHOD_(void, SetInput)( + UINT32 index, + _In_opt_ ID2D1Image *input, + BOOL invalidate = TRUE + ) PURE; + + /// + /// If the effect supports a variable number of inputs, this sets the number of + /// input that are currently active on the effect. + /// + STDMETHOD(SetInputCount)( + UINT32 inputCount + ) PURE; + + /// + /// Returns the input image to the effect. The input could be another effect or a + /// bitmap. + /// + STDMETHOD_(void, GetInput)( + UINT32 index, + _Outptr_result_maybenull_ ID2D1Image **input + ) CONST PURE; + + /// + /// This returns the number of input that are bound into this effect. + /// + STDMETHOD_(UINT32, GetInputCount)( + ) CONST PURE; + + /// + /// Returns the output image of the given effect. This can be set as the input to + /// another effect or can be drawn with DrawImage. + /// + STDMETHOD_(void, GetOutput)( + _Outptr_ ID2D1Image **outputImage + ) CONST PURE; + + COM_DECLSPEC_NOTHROW + void + SetInputEffect( + UINT32 index, + _In_opt_ ID2D1Effect *inputEffect, + BOOL invalidate = TRUE + ) + { + + ID2D1Image *output = NULL; + if (inputEffect != NULL) + { + inputEffect->GetOutput(&output); + } + SetInput(index, output, invalidate); + if (output != NULL) + { + output->Release(); + } + } +}; // interface ID2D1Effect + + +/// +/// Represents a bitmap that can be used as a surface for an ID2D1DeviceContext or +/// mapped into system memory, and can contain additional color context information. +/// +interface DX_DECLARE_INTERFACE("a898a84c-3873-4588-b08b-ebbf978df041") ID2D1Bitmap1 : public ID2D1Bitmap +{ + + /// + /// Retrieves the color context information associated with the bitmap. + /// + STDMETHOD_(void, GetColorContext)( + _Outptr_result_maybenull_ ID2D1ColorContext **colorContext + ) CONST PURE; + + /// + /// Retrieves the bitmap options used when creating the API. + /// + STDMETHOD_(D2D1_BITMAP_OPTIONS, GetOptions)( + ) CONST PURE; + + /// + /// Retrieves the DXGI surface from the corresponding bitmap, if the bitmap was + /// created from a device derived from a D3D device. + /// + STDMETHOD(GetSurface)( + _COM_Outptr_result_maybenull_ IDXGISurface **dxgiSurface + ) CONST PURE; + + /// + /// Maps the given bitmap into memory. The bitmap must have been created with the + /// D2D1_BITMAP_OPTIONS_CPU_READ flag. + /// + STDMETHOD(Map)( + D2D1_MAP_OPTIONS options, + _Out_ D2D1_MAPPED_RECT *mappedRect + ) PURE; + + /// + /// Unmaps the given bitmap from memory. + /// + STDMETHOD(Unmap)( + ) PURE; +}; // interface ID2D1Bitmap1 + + +/// +/// Represents a color context that can be used with an ID2D1Bitmap1 object. +/// +interface DX_DECLARE_INTERFACE("1c4820bb-5771-4518-a581-2fe4dd0ec657") ID2D1ColorContext : public ID2D1Resource +{ + + /// + /// Retrieves the color space of the color context. + /// + STDMETHOD_(D2D1_COLOR_SPACE, GetColorSpace)( + ) CONST PURE; + + /// + /// Retrieves the size of the color profile, in bytes. + /// + STDMETHOD_(UINT32, GetProfileSize)( + ) CONST PURE; + + /// + /// Retrieves the color profile bytes. + /// + STDMETHOD(GetProfile)( + _Out_writes_(profileSize) BYTE *profile, + UINT32 profileSize + ) CONST PURE; +}; // interface ID2D1ColorContext + + +/// +/// Represents an collection of gradient stops that can then be the source resource +/// for either a linear or radial gradient brush. +/// +interface DX_DECLARE_INTERFACE("ae1572f4-5dd0-4777-998b-9279472ae63b") ID2D1GradientStopCollection1 : public ID2D1GradientStopCollection +{ + + /// + /// Copies the gradient stops from the collection into the caller's memory. If this + /// object was created using ID2D1DeviceContext::CreateGradientStopCollection, this + /// method returns the same values as were specified in the creation method. If this + /// object was created using ID2D1RenderTarget::CreateGradientStopCollection, the + /// stops returned here will first be transformed into the gamma space specified by + /// the colorInterpolationGamma parameter. + /// + STDMETHOD_(void, GetGradientStops1)( + _Out_writes_to_(gradientStopsCount, _Inexpressible_("Retrieved through GetGradientStopCount()") ) D2D1_GRADIENT_STOP *gradientStops, + UINT32 gradientStopsCount + ) CONST PURE; + + /// + /// Returns the color space in which interpolation occurs. If this object was + /// created using ID2D1RenderTarget::CreateGradientStopCollection, this method + /// returns the color space related to the color interpolation gamma. + /// + STDMETHOD_(D2D1_COLOR_SPACE, GetPreInterpolationSpace)( + ) CONST PURE; + + /// + /// Returns the color space colors will be converted to after interpolation occurs. + /// If this object was created using + /// ID2D1RenderTarget::CreateGradientStopCollection, this method returns + /// D2D1_COLOR_SPACE_SRGB. + /// + STDMETHOD_(D2D1_COLOR_SPACE, GetPostInterpolationSpace)( + ) CONST PURE; + + /// + /// Returns the buffer precision of this gradient. If this object was created using + /// ID2D1RenderTarget::CreateGradientStopCollection, this method returns + /// D2D1_BUFFER_PRECISION_8BPC_UNORM. + /// + STDMETHOD_(D2D1_BUFFER_PRECISION, GetBufferPrecision)( + ) CONST PURE; + + /// + /// Returns the interpolation mode used to interpolate colors in the gradient. + /// + STDMETHOD_(D2D1_COLOR_INTERPOLATION_MODE, GetColorInterpolationMode)( + ) CONST PURE; +}; // interface ID2D1GradientStopCollection1 + + +/// +/// Represents drawing state. +/// +interface DX_DECLARE_INTERFACE("689f1f85-c72e-4e33-8f19-85754efd5ace") ID2D1DrawingStateBlock1 : public ID2D1DrawingStateBlock +{ + + /// + /// Retrieves the state currently contained within this state block resource. + /// + STDMETHOD_(void, GetDescription)( + _Out_ D2D1_DRAWING_STATE_DESCRIPTION1 *stateDescription + ) CONST PURE; + + using ID2D1DrawingStateBlock::GetDescription; + + /// + /// Sets the state description of this state block resource. + /// + STDMETHOD_(void, SetDescription)( + _In_ CONST D2D1_DRAWING_STATE_DESCRIPTION1 *stateDescription + ) PURE; + + using ID2D1DrawingStateBlock::SetDescription; +}; // interface ID2D1DrawingStateBlock1 + + +/// +/// The device context represents a set of state and a command buffer that is used +/// to render to a target bitmap. +/// +interface DX_DECLARE_INTERFACE("e8f7fe7a-191c-466d-ad95-975678bda998") ID2D1DeviceContext : public ID2D1RenderTarget +{ + + /// + /// Creates a bitmap with extended bitmap properties, potentially from a block of + /// memory. + /// + STDMETHOD(CreateBitmap)( + D2D1_SIZE_U size, + _In_opt_ CONST void *sourceData, + UINT32 pitch, + _In_ CONST D2D1_BITMAP_PROPERTIES1 *bitmapProperties, + _COM_Outptr_ ID2D1Bitmap1 **bitmap + ) PURE; + + using ID2D1RenderTarget::CreateBitmap; + + /// + /// Create a D2D bitmap by copying a WIC bitmap. + /// + STDMETHOD(CreateBitmapFromWicBitmap)( + _In_ IWICBitmapSource *wicBitmapSource, + _In_opt_ CONST D2D1_BITMAP_PROPERTIES1 *bitmapProperties, + _COM_Outptr_ ID2D1Bitmap1 **bitmap + ) PURE; + + using ID2D1RenderTarget::CreateBitmapFromWicBitmap; + + /// + /// Creates a color context from a color space. If the space is Custom, the context + /// is initialized from the profile/profileSize arguments. Otherwise the context is + /// initialized with the profile bytes associated with the space and + /// profile/profileSize are ignored. + /// + STDMETHOD(CreateColorContext)( + D2D1_COLOR_SPACE space, + _In_reads_opt_(profileSize) CONST BYTE *profile, + UINT32 profileSize, + _COM_Outptr_ ID2D1ColorContext **colorContext + ) PURE; + + STDMETHOD(CreateColorContextFromFilename)( + _In_ PCWSTR filename, + _COM_Outptr_ ID2D1ColorContext **colorContext + ) PURE; + + STDMETHOD(CreateColorContextFromWicColorContext)( + _In_ IWICColorContext *wicColorContext, + _COM_Outptr_ ID2D1ColorContext **colorContext + ) PURE; + + /// + /// Creates a bitmap from a DXGI surface with a set of extended properties. + /// + STDMETHOD(CreateBitmapFromDxgiSurface)( + _In_ IDXGISurface *surface, + _In_opt_ CONST D2D1_BITMAP_PROPERTIES1 *bitmapProperties, + _COM_Outptr_ ID2D1Bitmap1 **bitmap + ) PURE; + + /// + /// Create a new effect, the effect must either be built in or previously registered + /// through ID2D1Factory1::RegisterEffectFromStream or + /// ID2D1Factory1::RegisterEffectFromString. + /// + STDMETHOD(CreateEffect)( + _In_ REFCLSID effectId, + _COM_Outptr_ ID2D1Effect **effect + ) PURE; + + /// + /// A gradient stop collection represents a set of stops in an ideal unit length. + /// This is the source resource for a linear gradient and radial gradient brush. + /// + /// Specifies both the input color space and the + /// space in which the color interpolation occurs. + /// Specifies the color space colors will be + /// converted to after interpolation occurs. + /// Specifies the precision in which the gradient + /// buffer will be held. + /// Specifies how the gradient will be extended outside of + /// the unit length. + /// Determines if colors will be interpolated + /// in straight alpha or premultiplied alpha space. + STDMETHOD(CreateGradientStopCollection)( + _In_reads_(straightAlphaGradientStopsCount) CONST D2D1_GRADIENT_STOP *straightAlphaGradientStops, + _In_range_(>=,1) UINT32 straightAlphaGradientStopsCount, + D2D1_COLOR_SPACE preInterpolationSpace, + D2D1_COLOR_SPACE postInterpolationSpace, + D2D1_BUFFER_PRECISION bufferPrecision, + D2D1_EXTEND_MODE extendMode, + D2D1_COLOR_INTERPOLATION_MODE colorInterpolationMode, + _COM_Outptr_ ID2D1GradientStopCollection1 **gradientStopCollection1 + ) PURE; + + using ID2D1RenderTarget::CreateGradientStopCollection; + + /// + /// Creates an image brush, the input image can be any type of image, including a + /// bitmap, effect and a command list. + /// + STDMETHOD(CreateImageBrush)( + _In_opt_ ID2D1Image *image, + _In_ CONST D2D1_IMAGE_BRUSH_PROPERTIES *imageBrushProperties, + _In_opt_ CONST D2D1_BRUSH_PROPERTIES *brushProperties, + _COM_Outptr_ ID2D1ImageBrush **imageBrush + ) PURE; + + STDMETHOD(CreateBitmapBrush)( + _In_opt_ ID2D1Bitmap *bitmap, + _In_opt_ CONST D2D1_BITMAP_BRUSH_PROPERTIES1 *bitmapBrushProperties, + _In_opt_ CONST D2D1_BRUSH_PROPERTIES *brushProperties, + _COM_Outptr_ ID2D1BitmapBrush1 **bitmapBrush + ) PURE; + + using ID2D1RenderTarget::CreateBitmapBrush; + + /// + /// Creates a new command list. + /// + STDMETHOD(CreateCommandList)( + _COM_Outptr_ ID2D1CommandList **commandList + ) PURE; + + /// + /// Indicates whether the format is supported by D2D. + /// + STDMETHOD_(BOOL, IsDxgiFormatSupported)( + DXGI_FORMAT format + ) CONST PURE; + + /// + /// Indicates whether the buffer precision is supported by D2D. + /// + STDMETHOD_(BOOL, IsBufferPrecisionSupported)( + D2D1_BUFFER_PRECISION bufferPrecision + ) CONST PURE; + + /// + /// This retrieves the local-space bounds in DIPs of the current image using the + /// device context DPI. + /// + STDMETHOD(GetImageLocalBounds)( + _In_ ID2D1Image *image, + _Out_ D2D1_RECT_F *localBounds + ) CONST PURE; + + /// + /// This retrieves the world-space bounds in DIPs of the current image using the + /// device context DPI. + /// + STDMETHOD(GetImageWorldBounds)( + _In_ ID2D1Image *image, + _Out_ D2D1_RECT_F *worldBounds + ) CONST PURE; + + /// + /// Retrieves the world-space bounds in DIPs of the glyph run using the device + /// context DPI. + /// + STDMETHOD(GetGlyphRunWorldBounds)( + D2D1_POINT_2F baselineOrigin, + _In_ CONST DWRITE_GLYPH_RUN *glyphRun, + DWRITE_MEASURING_MODE measuringMode, + _Out_ D2D1_RECT_F *bounds + ) CONST PURE; + + /// + /// Retrieves the device associated with this device context. + /// + STDMETHOD_(void, GetDevice)( + _Outptr_ ID2D1Device **device + ) CONST PURE; + + /// + /// Sets the target for this device context to point to the given image. The image + /// can be a command list or a bitmap created with the D2D1_BITMAP_OPTIONS_TARGET + /// flag. + /// + STDMETHOD_(void, SetTarget)( + _In_opt_ ID2D1Image *image + ) PURE; + + /// + /// Gets the target that this device context is currently pointing to. + /// + STDMETHOD_(void, GetTarget)( + _Outptr_result_maybenull_ ID2D1Image **image + ) CONST PURE; + + /// + /// Sets tuning parameters for internal rendering inside the device context. + /// + STDMETHOD_(void, SetRenderingControls)( + _In_ CONST D2D1_RENDERING_CONTROLS *renderingControls + ) PURE; + + /// + /// This retrieves the rendering controls currently selected into the device + /// context. + /// + STDMETHOD_(void, GetRenderingControls)( + _Out_ D2D1_RENDERING_CONTROLS *renderingControls + ) CONST PURE; + + /// + /// Changes the primitive blending mode for all of the rendering operations. + /// + STDMETHOD_(void, SetPrimitiveBlend)( + D2D1_PRIMITIVE_BLEND primitiveBlend + ) PURE; + + /// + /// Returns the primitive blend currently selected into the device context. + /// + STDMETHOD_(D2D1_PRIMITIVE_BLEND, GetPrimitiveBlend)( + ) CONST PURE; + + /// + /// Changes the units used for all of the rendering operations. + /// + STDMETHOD_(void, SetUnitMode)( + D2D1_UNIT_MODE unitMode + ) PURE; + + /// + /// Returns the unit mode currently set on the device context. + /// + STDMETHOD_(D2D1_UNIT_MODE, GetUnitMode)( + ) CONST PURE; + + /// + /// Draws the glyph run with an extended description to describe the glyphs. + /// + STDMETHOD_(void, DrawGlyphRun)( + D2D1_POINT_2F baselineOrigin, + _In_ CONST DWRITE_GLYPH_RUN *glyphRun, + _In_opt_ CONST DWRITE_GLYPH_RUN_DESCRIPTION *glyphRunDescription, + _In_ ID2D1Brush *foregroundBrush, + DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL + ) PURE; + + using ID2D1RenderTarget::DrawGlyphRun; + + /// + /// Draw an image to the device context. The image represents either a concrete + /// bitmap or the output of an effect graph. + /// + STDMETHOD_(void, DrawImage)( + _In_ ID2D1Image *image, + _In_opt_ CONST D2D1_POINT_2F *targetOffset = NULL, + _In_opt_ CONST D2D1_RECT_F *imageRectangle = NULL, + D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR, + D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER + ) PURE; + + /// + /// Draw a metafile to the device context. + /// + STDMETHOD_(void, DrawGdiMetafile)( + _In_ ID2D1GdiMetafile *gdiMetafile, + _In_opt_ CONST D2D1_POINT_2F *targetOffset = NULL + ) PURE; + + STDMETHOD_(void, DrawBitmap)( + _In_ ID2D1Bitmap *bitmap, + _In_opt_ CONST D2D1_RECT_F *destinationRectangle, + FLOAT opacity, + D2D1_INTERPOLATION_MODE interpolationMode, + _In_opt_ CONST D2D1_RECT_F *sourceRectangle = NULL, + _In_opt_ CONST D2D1_MATRIX_4X4_F *perspectiveTransform = NULL + ) PURE; + + using ID2D1RenderTarget::DrawBitmap; + + /// + /// Push a layer on the device context. + /// + STDMETHOD_(void, PushLayer)( + _In_ CONST D2D1_LAYER_PARAMETERS1 *layerParameters, + _In_opt_ ID2D1Layer *layer + ) PURE; + + using ID2D1RenderTarget::PushLayer; + + /// + /// This indicates that a portion of an effect's input is invalid. This method can + /// be called many times. + /// + STDMETHOD(InvalidateEffectInputRectangle)( + _In_ ID2D1Effect *effect, + UINT32 input, + _In_ CONST D2D1_RECT_F *inputRectangle + ) PURE; + + /// + /// Gets the number of invalid ouptut rectangles that have accumulated at the + /// effect. + /// + STDMETHOD(GetEffectInvalidRectangleCount)( + _In_ ID2D1Effect *effect, + _Out_ UINT32 *rectangleCount + ) PURE; + + /// + /// Gets the invalid rectangles that are at the output of the effect. + /// + STDMETHOD(GetEffectInvalidRectangles)( + _In_ ID2D1Effect *effect, + _Out_writes_(rectanglesCount) D2D1_RECT_F *rectangles, + UINT32 rectanglesCount + ) PURE; + + /// + /// Gets the maximum region of each specified input which would be used during a + /// subsequent rendering operation + /// + STDMETHOD(GetEffectRequiredInputRectangles)( + _In_ ID2D1Effect *renderEffect, + _In_opt_ CONST D2D1_RECT_F *renderImageRectangle, + _In_reads_(inputCount) CONST D2D1_EFFECT_INPUT_DESCRIPTION *inputDescriptions, + _Out_writes_(inputCount) D2D1_RECT_F *requiredInputRects, + UINT32 inputCount + ) PURE; + + /// + /// Fill using the alpha channel of the supplied opacity mask bitmap. The brush + /// opacity will be modulated by the mask. The render target antialiasing mode must + /// be set to aliased. + /// + STDMETHOD_(void, FillOpacityMask)( + _In_ ID2D1Bitmap *opacityMask, + _In_ ID2D1Brush *brush, + _In_opt_ CONST D2D1_RECT_F *destinationRectangle = NULL, + _In_opt_ CONST D2D1_RECT_F *sourceRectangle = NULL + ) PURE; + + using ID2D1RenderTarget::FillOpacityMask; + + COM_DECLSPEC_NOTHROW + HRESULT + CreateBitmap( + D2D1_SIZE_U size, + _In_opt_ CONST void *sourceData, + UINT32 pitch, + CONST D2D1_BITMAP_PROPERTIES1 &bitmapProperties, + _COM_Outptr_ ID2D1Bitmap1 **bitmap + ) + { + return CreateBitmap(size, sourceData, pitch, &bitmapProperties, bitmap); + } + + /// + /// Create a D2D bitmap by copying a WIC bitmap. + /// + COM_DECLSPEC_NOTHROW + HRESULT + CreateBitmapFromWicBitmap( + _In_ IWICBitmapSource *wicBitmapSource, + CONST D2D1_BITMAP_PROPERTIES1 &bitmapProperties, + _COM_Outptr_ ID2D1Bitmap1 **bitmap + ) + { + return CreateBitmapFromWicBitmap(wicBitmapSource, &bitmapProperties, bitmap); + } + + /// + /// Create a D2D bitmap by copying a WIC bitmap. + /// + COM_DECLSPEC_NOTHROW + HRESULT + CreateBitmapFromWicBitmap( + _In_ IWICBitmapSource *wicBitmapSource, + _COM_Outptr_ ID2D1Bitmap1 **bitmap + ) + { + return CreateBitmapFromWicBitmap(wicBitmapSource, NULL, bitmap); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateBitmapFromDxgiSurface( + _In_ IDXGISurface *surface, + CONST D2D1_BITMAP_PROPERTIES1 &bitmapProperties, + _COM_Outptr_ ID2D1Bitmap1 **bitmap + ) + { + return CreateBitmapFromDxgiSurface(surface, &bitmapProperties, bitmap); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateImageBrush( + _In_opt_ ID2D1Image *image, + CONST D2D1_IMAGE_BRUSH_PROPERTIES &imageBrushProperties, + CONST D2D1_BRUSH_PROPERTIES &brushProperties, + _COM_Outptr_ ID2D1ImageBrush **imageBrush + ) + { + return CreateImageBrush(image, &imageBrushProperties, &brushProperties, imageBrush); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateImageBrush( + _In_opt_ ID2D1Image *image, + CONST D2D1_IMAGE_BRUSH_PROPERTIES &imageBrushProperties, + _COM_Outptr_ ID2D1ImageBrush **imageBrush + ) + { + return CreateImageBrush(image,&imageBrushProperties, NULL, imageBrush); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateBitmapBrush( + _In_opt_ ID2D1Bitmap *bitmap, + _COM_Outptr_ ID2D1BitmapBrush1 **bitmapBrush + ) + { + return CreateBitmapBrush(bitmap, NULL, NULL, bitmapBrush); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateBitmapBrush( + _In_opt_ ID2D1Bitmap *bitmap, + CONST D2D1_BITMAP_BRUSH_PROPERTIES1 &bitmapBrushProperties, + _COM_Outptr_ ID2D1BitmapBrush1 **bitmapBrush + ) + { + return CreateBitmapBrush(bitmap, &bitmapBrushProperties, NULL, bitmapBrush); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateBitmapBrush( + _In_opt_ ID2D1Bitmap *bitmap, + CONST D2D1_BITMAP_BRUSH_PROPERTIES1 &bitmapBrushProperties, + CONST D2D1_BRUSH_PROPERTIES &brushProperties, + _COM_Outptr_ ID2D1BitmapBrush1 **bitmapBrush + ) + { + return CreateBitmapBrush(bitmap, &bitmapBrushProperties, &brushProperties, bitmapBrush); + } + + /// + /// Draws the output of the effect as an image. + /// + COM_DECLSPEC_NOTHROW + void + DrawImage( + _In_ ID2D1Effect *effect, + _In_opt_ CONST D2D1_POINT_2F *targetOffset = NULL, + _In_opt_ CONST D2D1_RECT_F *imageRectangle = NULL, + D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR, + D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER + ) + { + + ID2D1Image *output = NULL; + effect->GetOutput(&output); + DrawImage(output, targetOffset, imageRectangle, interpolationMode, compositeMode); + output->Release(); + } + + COM_DECLSPEC_NOTHROW + void + DrawImage( + _In_ ID2D1Image *image, + D2D1_INTERPOLATION_MODE interpolationMode, + D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER + ) + { + DrawImage(image, NULL, NULL, interpolationMode, compositeMode); + } + + COM_DECLSPEC_NOTHROW + void + DrawImage( + _In_ ID2D1Effect *effect, + D2D1_INTERPOLATION_MODE interpolationMode, + D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER + ) + { + DrawImage(effect, NULL, NULL, interpolationMode, compositeMode); + } + + COM_DECLSPEC_NOTHROW + void + DrawImage( + _In_ ID2D1Image *image, + D2D1_POINT_2F targetOffset, + D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR, + D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER + ) + { + DrawImage(image, &targetOffset, NULL, interpolationMode, compositeMode); + } + + COM_DECLSPEC_NOTHROW + void + DrawImage( + _In_ ID2D1Effect *effect, + D2D1_POINT_2F targetOffset, + D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR, + D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER + ) + { + DrawImage(effect, &targetOffset, NULL, interpolationMode, compositeMode); + } + + COM_DECLSPEC_NOTHROW + void + DrawImage( + _In_ ID2D1Image *image, + D2D1_POINT_2F targetOffset, + CONST D2D1_RECT_F &imageRectangle, + D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR, + D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER + ) + { + DrawImage(image, &targetOffset, &imageRectangle, interpolationMode, compositeMode); + } + + COM_DECLSPEC_NOTHROW + void + DrawImage( + _In_ ID2D1Effect *effect, + D2D1_POINT_2F targetOffset, + CONST D2D1_RECT_F &imageRectangle, + D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR, + D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER + ) + { + DrawImage(effect, &targetOffset, &imageRectangle, interpolationMode, compositeMode); + } + + COM_DECLSPEC_NOTHROW + void + PushLayer( + CONST D2D1_LAYER_PARAMETERS1 &layerParameters, + _In_opt_ ID2D1Layer *layer + ) + { + PushLayer(&layerParameters, layer); + } + + COM_DECLSPEC_NOTHROW + void + DrawGdiMetafile( + _In_ ID2D1GdiMetafile *gdiMetafile, + D2D1_POINT_2F targetOffset + ) + { + DrawGdiMetafile(gdiMetafile, &targetOffset); + } + + COM_DECLSPEC_NOTHROW + void + DrawBitmap( + _In_ ID2D1Bitmap *bitmap, + CONST D2D1_RECT_F &destinationRectangle, + FLOAT opacity, + D2D1_INTERPOLATION_MODE interpolationMode, + _In_opt_ CONST D2D1_RECT_F *sourceRectangle = NULL, + _In_opt_ CONST D2D1_MATRIX_4X4_F *perspectiveTransform = NULL + ) + { + DrawBitmap(bitmap, &destinationRectangle, opacity, interpolationMode, sourceRectangle, perspectiveTransform); + } + + COM_DECLSPEC_NOTHROW + void + DrawBitmap( + _In_ ID2D1Bitmap *bitmap, + CONST D2D1_RECT_F &destinationRectangle, + FLOAT opacity, + D2D1_INTERPOLATION_MODE interpolationMode, + CONST D2D1_RECT_F &sourceRectangle, + _In_opt_ CONST D2D1_MATRIX_4X4_F *perspectiveTransform = NULL + ) + { + DrawBitmap(bitmap, &destinationRectangle, opacity, interpolationMode, &sourceRectangle, perspectiveTransform); + } + + COM_DECLSPEC_NOTHROW + void + DrawBitmap( + _In_ ID2D1Bitmap *bitmap, + CONST D2D1_RECT_F &destinationRectangle, + FLOAT opacity, + D2D1_INTERPOLATION_MODE interpolationMode, + CONST D2D1_RECT_F &sourceRectangle, + CONST D2D1_MATRIX_4X4_F &perspectiveTransform + ) + { + DrawBitmap(bitmap, &destinationRectangle, opacity, interpolationMode, &sourceRectangle, &perspectiveTransform); + } + + COM_DECLSPEC_NOTHROW + void + FillOpacityMask( + _In_ ID2D1Bitmap *opacityMask, + _In_ ID2D1Brush *brush, + CONST D2D1_RECT_F &destinationRectangle, + _In_opt_ CONST D2D1_RECT_F *sourceRectangle = NULL + ) + { + FillOpacityMask(opacityMask, brush, &destinationRectangle, sourceRectangle); + } + + COM_DECLSPEC_NOTHROW + void + FillOpacityMask( + _In_ ID2D1Bitmap *opacityMask, + _In_ ID2D1Brush *brush, + CONST D2D1_RECT_F &destinationRectangle, + CONST D2D1_RECT_F &sourceRectangle + ) + { + FillOpacityMask(opacityMask, brush, &destinationRectangle, &sourceRectangle); + } + + /// + /// Sets tuning parameters for internal rendering inside the device context. + /// + COM_DECLSPEC_NOTHROW + void + SetRenderingControls( + CONST D2D1_RENDERING_CONTROLS &renderingControls + ) + { + return SetRenderingControls(&renderingControls); + } +}; // interface ID2D1DeviceContext + + +/// +/// The device defines a resource domain whose objects and device contexts can be +/// used together. +/// +interface DX_DECLARE_INTERFACE("47dd575d-ac05-4cdd-8049-9b02cd16f44c") ID2D1Device : public ID2D1Resource +{ + + /// + /// Creates a new device context with no initially assigned target. + /// + STDMETHOD(CreateDeviceContext)( + D2D1_DEVICE_CONTEXT_OPTIONS options, + _COM_Outptr_ ID2D1DeviceContext **deviceContext + ) PURE; + + /// + /// Creates a D2D print control. + /// + STDMETHOD(CreatePrintControl)( + _In_ IWICImagingFactory *wicFactory, + _In_ IPrintDocumentPackageTarget *documentTarget, + _In_opt_ CONST D2D1_PRINT_CONTROL_PROPERTIES *printControlProperties, + _COM_Outptr_ ID2D1PrintControl **printControl + ) PURE; + + /// + /// Sets the maximum amount of texture memory to maintain before evicting caches. + /// + STDMETHOD_(void, SetMaximumTextureMemory)( + UINT64 maximumInBytes + ) PURE; + + /// + /// Gets the maximum amount of texture memory to maintain before evicting caches. + /// + STDMETHOD_(UINT64, GetMaximumTextureMemory)( + ) CONST PURE; + + /// + /// Clears all resources that are cached but not held in use by the application + /// through an interface reference. + /// + STDMETHOD_(void, ClearResources)( + UINT32 millisecondsSinceUse = 0 + ) PURE; + + COM_DECLSPEC_NOTHROW + HRESULT + CreatePrintControl( + _In_ IWICImagingFactory *wicFactory, + _In_ IPrintDocumentPackageTarget *documentTarget, + CONST D2D1_PRINT_CONTROL_PROPERTIES &printControlProperties, + _COM_Outptr_ ID2D1PrintControl **printControl + ) + { + return CreatePrintControl(wicFactory, documentTarget, &printControlProperties, printControl); + } +}; // interface ID2D1Device + + +/// +/// Creates Direct2D resources. +/// +interface DX_DECLARE_INTERFACE("bb12d362-daee-4b9a-aa1d-14ba401cfa1f") ID2D1Factory1 : public ID2D1Factory +{ + + /// + /// This creates a new Direct2D device from the given IDXGIDevice. + /// + STDMETHOD(CreateDevice)( + _In_ IDXGIDevice *dxgiDevice, + _COM_Outptr_ ID2D1Device **d2dDevice + ) PURE; + + /// + /// This creates a stroke style with the ability to preserve stroke width in various + /// ways. + /// + STDMETHOD(CreateStrokeStyle)( + _In_ CONST D2D1_STROKE_STYLE_PROPERTIES1 *strokeStyleProperties, + _In_reads_opt_(dashesCount) CONST FLOAT *dashes, + UINT32 dashesCount, + _COM_Outptr_ ID2D1StrokeStyle1 **strokeStyle + ) PURE; + + using ID2D1Factory::CreateStrokeStyle; + + /// + /// Creates a path geometry with new operational methods. + /// + STDMETHOD(CreatePathGeometry)( + _COM_Outptr_ ID2D1PathGeometry1 **pathGeometry + ) PURE; + + using ID2D1Factory::CreatePathGeometry; + + /// + /// Creates a new drawing state block, this can be used in subsequent + /// SaveDrawingState and RestoreDrawingState operations on the render target. + /// + STDMETHOD(CreateDrawingStateBlock)( + _In_opt_ CONST D2D1_DRAWING_STATE_DESCRIPTION1 *drawingStateDescription, + _In_opt_ IDWriteRenderingParams *textRenderingParams, + _COM_Outptr_ ID2D1DrawingStateBlock1 **drawingStateBlock + ) PURE; + + using ID2D1Factory::CreateDrawingStateBlock; + + /// + /// Creates a new GDI metafile. + /// + STDMETHOD(CreateGdiMetafile)( + _In_ IStream *metafileStream, + _COM_Outptr_ ID2D1GdiMetafile **metafile + ) PURE; + + /// + /// This globally registers the given effect. The effect can later be instantiated + /// by using the registered class id. The effect registration is reference counted. + /// + STDMETHOD(RegisterEffectFromStream)( + _In_ REFCLSID classId, + _In_ IStream *propertyXml, + _In_reads_opt_(bindingsCount) CONST D2D1_PROPERTY_BINDING *bindings, + UINT32 bindingsCount, + _In_ CONST PD2D1_EFFECT_FACTORY effectFactory + ) PURE; + + /// + /// This globally registers the given effect. The effect can later be instantiated + /// by using the registered class id. The effect registration is reference counted. + /// + STDMETHOD(RegisterEffectFromString)( + _In_ REFCLSID classId, + _In_ PCWSTR propertyXml, + _In_reads_opt_(bindingsCount) CONST D2D1_PROPERTY_BINDING *bindings, + UINT32 bindingsCount, + _In_ CONST PD2D1_EFFECT_FACTORY effectFactory + ) PURE; + + /// + /// This unregisters the given effect by its class id, you need to call + /// UnregisterEffect for every call to ID2D1Factory1::RegisterEffectFromStream and + /// ID2D1Factory1::RegisterEffectFromString to completely unregister it. + /// + STDMETHOD(UnregisterEffect)( + _In_ REFCLSID classId + ) PURE; + + /// + /// This returns all of the registered effects in the process, including any + /// built-in effects. + /// + /// The number of effects returned into the passed in + /// effects array. + /// The number of effects currently registered in + /// the system. + STDMETHOD(GetRegisteredEffects)( + _Out_writes_to_opt_(effectsCount, *effectsReturned) CLSID *effects, + UINT32 effectsCount, + _Out_opt_ UINT32 *effectsReturned, + _Out_opt_ UINT32 *effectsRegistered + ) CONST PURE; + + /// + /// This retrieves the effect properties for the given effect, all of the effect + /// properties will be set to a default value since an effect is not instantiated to + /// implement the returned property interface. + /// + STDMETHOD(GetEffectProperties)( + _In_ REFCLSID effectId, + _COM_Outptr_ ID2D1Properties **properties + ) CONST PURE; + + COM_DECLSPEC_NOTHROW + HRESULT + CreateStrokeStyle( + CONST D2D1_STROKE_STYLE_PROPERTIES1 &strokeStyleProperties, + _In_reads_opt_(dashesCount) CONST FLOAT *dashes, + UINT32 dashesCount, + _COM_Outptr_ ID2D1StrokeStyle1 **strokeStyle + ) + { + return CreateStrokeStyle(&strokeStyleProperties, dashes, dashesCount, strokeStyle); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateDrawingStateBlock( + CONST D2D1_DRAWING_STATE_DESCRIPTION1 &drawingStateDescription, + _COM_Outptr_ ID2D1DrawingStateBlock1 **drawingStateBlock + ) + { + return CreateDrawingStateBlock(&drawingStateDescription, NULL, drawingStateBlock); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateDrawingStateBlock( + _COM_Outptr_ ID2D1DrawingStateBlock1 **drawingStateBlock + ) + { + return CreateDrawingStateBlock(NULL, NULL, drawingStateBlock); + } +}; // interface ID2D1Factory1 + + +/// +/// A locking mechanism from a Direct2D factory that Direct2D uses to control +/// exclusive resource access in an app that is uses multiple threads. +/// +interface DX_DECLARE_INTERFACE("31e6e7bc-e0ff-4d46-8c64-a0a8c41c15d3") ID2D1Multithread : public IUnknown +{ + + /// + /// Returns whether the D2D factory was created with + /// D2D1_FACTORY_TYPE_MULTI_THREADED. + /// + STDMETHOD_(BOOL, GetMultithreadProtected)( + ) CONST PURE; + + /// + /// Enters the D2D API critical section, if it exists. + /// + STDMETHOD_(void, Enter)( + ) PURE; + + /// + /// Leaves the D2D API critical section, if it exists. + /// + STDMETHOD_(void, Leave)( + ) PURE; +}; // interface ID2D1Multithread + + + +#endif + + +#ifdef D2D_USE_C_DEFINITIONS + + +typedef interface ID2D1GdiMetafileSink ID2D1GdiMetafileSink; + +typedef interface ID2D1GdiMetafile ID2D1GdiMetafile; + +typedef interface ID2D1CommandSink ID2D1CommandSink; + +typedef interface ID2D1CommandList ID2D1CommandList; + +typedef interface ID2D1PrintControl ID2D1PrintControl; + +typedef interface ID2D1ImageBrush ID2D1ImageBrush; + +typedef interface ID2D1BitmapBrush1 ID2D1BitmapBrush1; + +typedef interface ID2D1StrokeStyle1 ID2D1StrokeStyle1; + +typedef interface ID2D1PathGeometry1 ID2D1PathGeometry1; + +typedef interface ID2D1Properties ID2D1Properties; + +typedef interface ID2D1Effect ID2D1Effect; + +typedef interface ID2D1Bitmap1 ID2D1Bitmap1; + +typedef interface ID2D1ColorContext ID2D1ColorContext; + +typedef interface ID2D1GradientStopCollection1 ID2D1GradientStopCollection1; + +typedef interface ID2D1DrawingStateBlock1 ID2D1DrawingStateBlock1; + +typedef interface ID2D1DeviceContext ID2D1DeviceContext; + +typedef interface ID2D1Device ID2D1Device; + +typedef interface ID2D1Factory1 ID2D1Factory1; + +typedef interface ID2D1Multithread ID2D1Multithread; + +#endif + + +#ifdef __cplusplus +extern "C" +{ +#endif + + HRESULT WINAPI + D2D1CreateDevice( + _In_ IDXGIDevice *dxgiDevice, + _In_opt_ CONST D2D1_CREATION_PROPERTIES *creationProperties, + _Outptr_ ID2D1Device **d2dDevice + ); + + HRESULT WINAPI + D2D1CreateDeviceContext( + _In_ IDXGISurface *dxgiSurface, + _In_opt_ CONST D2D1_CREATION_PROPERTIES *creationProperties, + _Outptr_ ID2D1DeviceContext **d2dDeviceContext + ); + + D2D1_COLOR_F WINAPI + D2D1ConvertColorSpace( + D2D1_COLOR_SPACE sourceColorSpace, + D2D1_COLOR_SPACE destinationColorSpace, + _In_ CONST D2D1_COLOR_F* color + ); + + void WINAPI + D2D1SinCos( + _In_ FLOAT angle, + _Out_ FLOAT *s, + _Out_ FLOAT *c + ); + + FLOAT WINAPI + D2D1Tan( + _In_ FLOAT angle + ); + + FLOAT WINAPI + D2D1Vec3Length( + _In_ FLOAT x, + _In_ FLOAT y, + _In_ FLOAT z + ); + +#ifdef __cplusplus +} +#endif + +#include + + +#ifndef D2D_USE_C_DEFINITIONS + +inline HRESULT +D2D1CreateDevice( + _In_ IDXGIDevice *dxgiDevice, + _In_ CONST D2D1_CREATION_PROPERTIES &creationProperties, + _Outptr_ ID2D1Device **d2dDevice + ) +{ + + return + D2D1CreateDevice( + dxgiDevice, + &creationProperties, + d2dDevice); +} + +inline HRESULT +D2D1CreateDeviceContext( + _In_ IDXGISurface *dxgiSurface, + _In_ CONST D2D1_CREATION_PROPERTIES &creationProperties, + _Outptr_ ID2D1DeviceContext **d2dDeviceContext + ) +{ + return + D2D1CreateDeviceContext( + dxgiSurface, + &creationProperties, + d2dDeviceContext); +} + +#endif // #ifndef D2D_USE_C_DEFINITIONS + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ +#endif // #ifndef _D2D1_1_H_ diff --git a/gfx/include/dxsdk/d2d1_1helper.h b/gfx/include/dxsdk/d2d1_1helper.h new file mode 100644 index 0000000000..9e680b8f7e --- /dev/null +++ b/gfx/include/dxsdk/d2d1_1helper.h @@ -0,0 +1,924 @@ + +/*=========================================================================*\ + + Copyright (c) Microsoft Corporation. All rights reserved. + + File: D2D1_1Helper.h + + Module Name: D2D + + Description: Helper files over the D2D interfaces and APIs. + +\*=========================================================================*/ +#pragma once + +#ifndef _D2D1_1HELPER_H_ +#define _D2D1_1HELPER_H_ + +#ifndef _D2D1_1_H_ +#include +#endif // #ifndef _D2D1_H_ + +#ifndef D2D_USE_C_DEFINITIONS + +/*#include */ + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + +namespace D2D1 +{ + template<> + struct TypeTraits + { + typedef D2D1_POINT_2L Point; + typedef D2D1_RECT_L Rect; + }; + + template<> + struct TypeTraits + { + typedef D2D1_POINT_2L Point; + typedef D2D1_RECT_L Rect; + }; + + class Matrix4x3F : public D2D1_MATRIX_4X3_F + { + public: + + COM_DECLSPEC_NOTHROW + inline + Matrix4x3F( + FLOAT m11, FLOAT m12, FLOAT m13, + FLOAT m21, FLOAT m22, FLOAT m23, + FLOAT m31, FLOAT m32, FLOAT m33, + FLOAT m41, FLOAT m42, FLOAT m43 + ) + { + _11 = m11; + _12 = m12; + _13 = m13; + + _21 = m21; + _22 = m22; + _23 = m23; + + _31 = m31; + _32 = m32; + _33 = m33; + + _41 = m41; + _42 = m42; + _43 = m43; + } + + COM_DECLSPEC_NOTHROW + inline + Matrix4x3F() + { + _11 = 1; + _12 = 0; + _13 = 0; + + _21 = 0; + _22 = 1; + _23 = 0; + + _31 = 0; + _32 = 0; + _33 = 1; + + _41 = 0; + _42 = 0; + _43 = 0; + } + }; + + class Matrix4x4F : public D2D1_MATRIX_4X4_F + { + public: + + COM_DECLSPEC_NOTHROW + inline + Matrix4x4F( + FLOAT m11, FLOAT m12, FLOAT m13, FLOAT m14, + FLOAT m21, FLOAT m22, FLOAT m23, FLOAT m24, + FLOAT m31, FLOAT m32, FLOAT m33, FLOAT m34, + FLOAT m41, FLOAT m42, FLOAT m43, FLOAT m44 + ) + { + _11 = m11; + _12 = m12; + _13 = m13; + _14 = m14; + + _21 = m21; + _22 = m22; + _23 = m23; + _24 = m24; + + _31 = m31; + _32 = m32; + _33 = m33; + _34 = m34; + + _41 = m41; + _42 = m42; + _43 = m43; + _44 = m44; + } + + COM_DECLSPEC_NOTHROW + inline + Matrix4x4F() + { + _11 = 1; + _12 = 0; + _13 = 0; + _14 = 0; + + _21 = 0; + _22 = 1; + _23 = 0; + _24 = 0; + + _31 = 0; + _32 = 0; + _33 = 1; + _34 = 0; + + _41 = 0; + _42 = 0; + _43 = 0; + _44 = 1; + } + + COM_DECLSPEC_NOTHROW + inline + bool + operator==( + const Matrix4x4F& r + ) const + { + return _11 == r._11 && _12 == r._12 && _13 == r._13 && _14 == r._14 && + _21 == r._21 && _22 == r._22 && _23 == r._23 && _24 == r._24 && + _31 == r._31 && _32 == r._32 && _33 == r._33 && _34 == r._34 && + _41 == r._41 && _42 == r._42 && _43 == r._43 && _44 == r._44; + } + + COM_DECLSPEC_NOTHROW + inline + bool + operator!=( + const Matrix4x4F& r + ) const + { + return !(*this == r); + } + + static + COM_DECLSPEC_NOTHROW + inline + Matrix4x4F + Translation(FLOAT x, FLOAT y, FLOAT z) + { + Matrix4x4F translation; + + translation._11 = 1.0; translation._12 = 0.0; translation._13 = 0.0; translation._14 = 0.0; + translation._21 = 0.0; translation._22 = 1.0; translation._23 = 0.0; translation._24 = 0.0; + translation._31 = 0.0; translation._32 = 0.0; translation._33 = 1.0; translation._34 = 0.0; + translation._41 = x; translation._42 = y; translation._43 = z; translation._44 = 1.0; + + return translation; + } + + static + COM_DECLSPEC_NOTHROW + inline + Matrix4x4F + Scale(FLOAT x, FLOAT y, FLOAT z) + { + Matrix4x4F scale; + + scale._11 = x; scale._12 = 0.0; scale._13 = 0.0; scale._14 = 0.0; + scale._21 = 0.0; scale._22 = y; scale._23 = 0.0; scale._24 = 0.0; + scale._31 = 0.0; scale._32 = 0.0; scale._33 = z; scale._34 = 0.0; + scale._41 = 0.0; scale._42 = 0.0; scale._43 = 0.0; scale._44 = 1.0; + + return scale; + } + + static + COM_DECLSPEC_NOTHROW + inline + Matrix4x4F + RotationX(FLOAT degreeX) + { + FLOAT angleInRadian = degreeX * (3.141592654f / 180.0f); + + FLOAT sinAngle = 0.0; + FLOAT cosAngle = 0.0; + D2D1SinCos(angleInRadian, &sinAngle, &cosAngle); + + Matrix4x4F rotationX( + 1, 0, 0, 0, + 0, cosAngle, sinAngle, 0, + 0, -sinAngle, cosAngle, 0, + 0, 0, 0, 1 + ); + + return rotationX; + } + + static + COM_DECLSPEC_NOTHROW + inline + Matrix4x4F + RotationY(FLOAT degreeY) + { + FLOAT angleInRadian = degreeY * (3.141592654f / 180.0f); + + FLOAT sinAngle = 0.0; + FLOAT cosAngle = 0.0; + D2D1SinCos(angleInRadian, &sinAngle, &cosAngle); + + Matrix4x4F rotationY( + cosAngle, 0, -sinAngle, 0, + 0, 1, 0, 0, + sinAngle, 0, cosAngle, 0, + 0, 0, 0, 1 + ); + + return rotationY; + } + + static + COM_DECLSPEC_NOTHROW + inline + Matrix4x4F + RotationZ(FLOAT degreeZ) + { + FLOAT angleInRadian = degreeZ * (3.141592654f / 180.0f); + + FLOAT sinAngle = 0.0; + FLOAT cosAngle = 0.0; + D2D1SinCos(angleInRadian, &sinAngle, &cosAngle); + + Matrix4x4F rotationZ( + cosAngle, sinAngle, 0, 0, + -sinAngle, cosAngle, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + ); + + return rotationZ; + } + + // + // 3D Rotation matrix for an arbitrary axis specified by x, y and z + // + static + COM_DECLSPEC_NOTHROW + inline + Matrix4x4F + RotationArbitraryAxis(FLOAT x, FLOAT y, FLOAT z, FLOAT degree) + { + // Normalize the vector represented by x, y, and z + FLOAT magnitude = D2D1Vec3Length(x, y, z); + x /= magnitude; + y /= magnitude; + z /= magnitude; + + FLOAT angleInRadian = degree * (3.141592654f / 180.0f); + + FLOAT sinAngle = 0.0; + FLOAT cosAngle = 0.0; + D2D1SinCos(angleInRadian, &sinAngle, &cosAngle); + + FLOAT oneMinusCosAngle = 1 - cosAngle; + + Matrix4x4F rotationArb( + 1 + oneMinusCosAngle * (x * x - 1), + z * sinAngle + oneMinusCosAngle * x * y, + -y * sinAngle + oneMinusCosAngle * x * z, + 0, + + -z * sinAngle + oneMinusCosAngle * y * x, + 1 + oneMinusCosAngle * (y * y - 1), + x * sinAngle + oneMinusCosAngle * y * z, + 0, + + y * sinAngle + oneMinusCosAngle * z * x, + -x * sinAngle + oneMinusCosAngle * z * y, + 1 + oneMinusCosAngle * (z * z - 1) , + 0, + + 0, 0, 0, 1 + ); + + return rotationArb; + } + + static + COM_DECLSPEC_NOTHROW + inline + Matrix4x4F + SkewX(FLOAT degreeX) + { + FLOAT angleInRadian = degreeX * (3.141592654f / 180.0f); + + FLOAT tanAngle = D2D1Tan(angleInRadian); + + Matrix4x4F skewX( + 1, 0, 0, 0, + tanAngle, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + ); + + return skewX; + } + + static + COM_DECLSPEC_NOTHROW + inline + Matrix4x4F + SkewY(FLOAT degreeY) + { + FLOAT angleInRadian = degreeY * (3.141592654f / 180.0f); + + FLOAT tanAngle = D2D1Tan(angleInRadian); + + Matrix4x4F skewY( + 1, tanAngle, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + ); + + return skewY; + } + + + static + COM_DECLSPEC_NOTHROW + inline + Matrix4x4F + PerspectiveProjection(FLOAT depth) + { + float proj = 0; + + if (depth > 0) + { + proj = -1/depth; + } + + Matrix4x4F projection( + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, proj, + 0, 0, 0, 1 + ); + + return projection; + } + + // + // Functions for convertion from the base D2D1_MATRIX_4X4_f to + // this type without making a copy + // + static + COM_DECLSPEC_NOTHROW + inline + const Matrix4x4F* + ReinterpretBaseType(const D2D1_MATRIX_4X4_F *pMatrix) + { + return static_cast(pMatrix); + } + + static + COM_DECLSPEC_NOTHROW + inline + Matrix4x4F* + ReinterpretBaseType(D2D1_MATRIX_4X4_F *pMatrix) + { + return static_cast(pMatrix); + } + + COM_DECLSPEC_NOTHROW + inline + FLOAT + Determinant() const + { + FLOAT minor1 = _41 * (_12 * (_23 * _34 - _33 * _24) - _13 * (_22 * _34 - _24 * _32) + _14 * (_22 * _33 - _23 * _32)); + FLOAT minor2 = _42 * (_11 * (_21 * _34 - _31 * _24) - _13 * (_21 * _34 - _24 * _31) + _14 * (_21 * _33 - _23 * _31)); + FLOAT minor3 = _43 * (_11 * (_22 * _34 - _32 * _24) - _12 * (_21 * _34 - _24 * _31) + _14 * (_21 * _32 - _22 * _31)); + FLOAT minor4 = _44 * (_11 * (_22 * _33 - _32 * _23) - _12 * (_21 * _33 - _23 * _31) + _13 * (_21 * _32 - _22 * _31)); + + return minor1 - minor2 + minor3 - minor4; + } + + COM_DECLSPEC_NOTHROW + inline + bool + IsIdentity() const + { + return _11 == 1.f && _12 == 0.f && _13 == 0.f && _14 == 0.f + && _21 == 0.f && _22 == 1.f && _23 == 0.f && _24 == 0.f + && _31 == 0.f && _32 == 0.f && _33 == 1.f && _34 == 0.f + && _41 == 0.f && _42 == 0.f && _43 == 0.f && _44 == 1.f; + } + + COM_DECLSPEC_NOTHROW + inline + void + SetProduct(const Matrix4x4F &a, const Matrix4x4F &b) + { + _11 = a._11 * b._11 + a._12 * b._21 + a._13 * b._31 + a._14 * b._41; + _12 = a._11 * b._12 + a._12 * b._22 + a._13 * b._32 + a._14 * b._42; + _13 = a._11 * b._13 + a._12 * b._23 + a._13 * b._33 + a._14 * b._43; + _14 = a._11 * b._14 + a._12 * b._24 + a._13 * b._34 + a._14 * b._44; + + _21 = a._21 * b._11 + a._22 * b._21 + a._23 * b._31 + a._24 * b._41; + _22 = a._21 * b._12 + a._22 * b._22 + a._23 * b._32 + a._24 * b._42; + _23 = a._21 * b._13 + a._22 * b._23 + a._23 * b._33 + a._24 * b._43; + _24 = a._21 * b._14 + a._22 * b._24 + a._23 * b._34 + a._24 * b._44; + + _31 = a._31 * b._11 + a._32 * b._21 + a._33 * b._31 + a._34 * b._41; + _32 = a._31 * b._12 + a._32 * b._22 + a._33 * b._32 + a._34 * b._42; + _33 = a._31 * b._13 + a._32 * b._23 + a._33 * b._33 + a._34 * b._43; + _34 = a._31 * b._14 + a._32 * b._24 + a._33 * b._34 + a._34 * b._44; + + _41 = a._41 * b._11 + a._42 * b._21 + a._43 * b._31 + a._44 * b._41; + _42 = a._41 * b._12 + a._42 * b._22 + a._43 * b._32 + a._44 * b._42; + _43 = a._41 * b._13 + a._42 * b._23 + a._43 * b._33 + a._44 * b._43; + _44 = a._41 * b._14 + a._42 * b._24 + a._43 * b._34 + a._44 * b._44; + } + + COM_DECLSPEC_NOTHROW + inline + Matrix4x4F + operator*(const Matrix4x4F &matrix) const + { + Matrix4x4F result; + + result.SetProduct(*this, matrix); + + return result; + } + }; + + + class Matrix5x4F : public D2D1_MATRIX_5X4_F + { + public: + + COM_DECLSPEC_NOTHROW + inline + Matrix5x4F( + FLOAT m11, FLOAT m12, FLOAT m13, FLOAT m14, + FLOAT m21, FLOAT m22, FLOAT m23, FLOAT m24, + FLOAT m31, FLOAT m32, FLOAT m33, FLOAT m34, + FLOAT m41, FLOAT m42, FLOAT m43, FLOAT m44, + FLOAT m51, FLOAT m52, FLOAT m53, FLOAT m54 + ) + { + _11 = m11; + _12 = m12; + _13 = m13; + _14 = m14; + + _21 = m21; + _22 = m22; + _23 = m23; + _24 = m24; + + _31 = m31; + _32 = m32; + _33 = m33; + _34 = m34; + + _41 = m41; + _42 = m42; + _43 = m43; + _44 = m44; + + _51 = m51; + _52 = m52; + _53 = m53; + _54 = m54; + } + + COM_DECLSPEC_NOTHROW + inline + Matrix5x4F() + { + _11 = 1; + _12 = 0; + _13 = 0; + _14 = 0; + + _21 = 0; + _22 = 1; + _23 = 0; + _24 = 0; + + _31 = 0; + _32 = 0; + _33 = 1; + _34 = 0; + + _41 = 0; + _42 = 0; + _43 = 0; + _44 = 1; + + _51 = 0; + _52 = 0; + _53 = 0; + _54 = 0; + } + }; + + COM_DECLSPEC_NOTHROW + inline + D2D1_COLOR_F + ConvertColorSpace( + D2D1_COLOR_SPACE sourceColorSpace, + D2D1_COLOR_SPACE destinationColorSpace, + const D2D1_COLOR_F& color + ) + { + return D2D1ConvertColorSpace( + sourceColorSpace, + destinationColorSpace, + &color + ); + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_DRAWING_STATE_DESCRIPTION1 + DrawingStateDescription1( + D2D1_ANTIALIAS_MODE antialiasMode = D2D1_ANTIALIAS_MODE_PER_PRIMITIVE, + D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode = D2D1_TEXT_ANTIALIAS_MODE_DEFAULT, + D2D1_TAG tag1 = 0, + D2D1_TAG tag2 = 0, + _In_ const D2D1_MATRIX_3X2_F &transform = D2D1::IdentityMatrix(), + D2D1_PRIMITIVE_BLEND primitiveBlend = D2D1_PRIMITIVE_BLEND_SOURCE_OVER, + D2D1_UNIT_MODE unitMode = D2D1_UNIT_MODE_DIPS + ) + { + D2D1_DRAWING_STATE_DESCRIPTION1 drawingStateDescription1; + + drawingStateDescription1.antialiasMode = antialiasMode; + drawingStateDescription1.textAntialiasMode = textAntialiasMode; + drawingStateDescription1.tag1 = tag1; + drawingStateDescription1.tag2 = tag2; + drawingStateDescription1.transform = transform; + drawingStateDescription1.primitiveBlend = primitiveBlend; + drawingStateDescription1.unitMode = unitMode; + + return drawingStateDescription1; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_DRAWING_STATE_DESCRIPTION1 + DrawingStateDescription1( + _In_ const D2D1_DRAWING_STATE_DESCRIPTION &desc, + D2D1_PRIMITIVE_BLEND primitiveBlend = D2D1_PRIMITIVE_BLEND_SOURCE_OVER, + D2D1_UNIT_MODE unitMode = D2D1_UNIT_MODE_DIPS + ) + { + D2D1_DRAWING_STATE_DESCRIPTION1 drawingStateDescription1; + + drawingStateDescription1.antialiasMode = desc.antialiasMode; + drawingStateDescription1.textAntialiasMode = desc.textAntialiasMode; + drawingStateDescription1.tag1 = desc.tag1; + drawingStateDescription1.tag2 = desc.tag2; + drawingStateDescription1.transform = desc.transform; + drawingStateDescription1.primitiveBlend = primitiveBlend; + drawingStateDescription1.unitMode = unitMode; + + return drawingStateDescription1; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_BITMAP_PROPERTIES1 + BitmapProperties1( + D2D1_BITMAP_OPTIONS bitmapOptions = D2D1_BITMAP_OPTIONS_NONE, + _In_ CONST D2D1_PIXEL_FORMAT pixelFormat = D2D1::PixelFormat(), + FLOAT dpiX = 96.0f, + FLOAT dpiY = 96.0f, + _In_opt_ ID2D1ColorContext *colorContext = NULL + ) + { + D2D1_BITMAP_PROPERTIES1 bitmapProperties = + { + pixelFormat, + dpiX, dpiY, + bitmapOptions, + colorContext + }; + + return bitmapProperties; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_LAYER_PARAMETERS1 + LayerParameters1( + _In_ CONST D2D1_RECT_F &contentBounds = D2D1::InfiniteRect(), + _In_opt_ ID2D1Geometry *geometricMask = NULL, + D2D1_ANTIALIAS_MODE maskAntialiasMode = D2D1_ANTIALIAS_MODE_PER_PRIMITIVE, + D2D1_MATRIX_3X2_F maskTransform = D2D1::IdentityMatrix(), + FLOAT opacity = 1.0, + _In_opt_ ID2D1Brush *opacityBrush = NULL, + D2D1_LAYER_OPTIONS1 layerOptions = D2D1_LAYER_OPTIONS1_NONE + ) + { + D2D1_LAYER_PARAMETERS1 layerParameters = { 0 }; + + layerParameters.contentBounds = contentBounds; + layerParameters.geometricMask = geometricMask; + layerParameters.maskAntialiasMode = maskAntialiasMode; + layerParameters.maskTransform = maskTransform; + layerParameters.opacity = opacity; + layerParameters.opacityBrush = opacityBrush; + layerParameters.layerOptions = layerOptions; + + return layerParameters; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_STROKE_STYLE_PROPERTIES1 + StrokeStyleProperties1( + D2D1_CAP_STYLE startCap = D2D1_CAP_STYLE_FLAT, + D2D1_CAP_STYLE endCap = D2D1_CAP_STYLE_FLAT, + D2D1_CAP_STYLE dashCap = D2D1_CAP_STYLE_FLAT, + D2D1_LINE_JOIN lineJoin = D2D1_LINE_JOIN_MITER, + FLOAT miterLimit = 10.0f, + D2D1_DASH_STYLE dashStyle = D2D1_DASH_STYLE_SOLID, + FLOAT dashOffset = 0.0f, + D2D1_STROKE_TRANSFORM_TYPE transformType = D2D1_STROKE_TRANSFORM_TYPE_NORMAL + ) + { + D2D1_STROKE_STYLE_PROPERTIES1 strokeStyleProperties; + + strokeStyleProperties.startCap = startCap; + strokeStyleProperties.endCap = endCap; + strokeStyleProperties.dashCap = dashCap; + strokeStyleProperties.lineJoin = lineJoin; + strokeStyleProperties.miterLimit = miterLimit; + strokeStyleProperties.dashStyle = dashStyle; + strokeStyleProperties.dashOffset = dashOffset; + strokeStyleProperties.transformType = transformType; + + return strokeStyleProperties; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_IMAGE_BRUSH_PROPERTIES + ImageBrushProperties( + D2D1_RECT_F sourceRectangle, + D2D1_EXTEND_MODE extendModeX = D2D1_EXTEND_MODE_CLAMP, + D2D1_EXTEND_MODE extendModeY = D2D1_EXTEND_MODE_CLAMP, + D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR + ) + { + D2D1_IMAGE_BRUSH_PROPERTIES imageBrushProperties; + + imageBrushProperties.extendModeX = extendModeX; + imageBrushProperties.extendModeY = extendModeY; + imageBrushProperties.interpolationMode = interpolationMode; + imageBrushProperties.sourceRectangle = sourceRectangle; + + return imageBrushProperties; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_BITMAP_BRUSH_PROPERTIES1 + BitmapBrushProperties1( + D2D1_EXTEND_MODE extendModeX = D2D1_EXTEND_MODE_CLAMP, + D2D1_EXTEND_MODE extendModeY = D2D1_EXTEND_MODE_CLAMP, + D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR + ) + { + D2D1_BITMAP_BRUSH_PROPERTIES1 bitmapBrush1Properties; + + bitmapBrush1Properties.extendModeX = extendModeX; + bitmapBrush1Properties.extendModeY = extendModeY; + bitmapBrush1Properties.interpolationMode = interpolationMode; + + return bitmapBrush1Properties; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_PRINT_CONTROL_PROPERTIES + PrintControlProperties( + D2D1_PRINT_FONT_SUBSET_MODE fontSubsetMode = D2D1_PRINT_FONT_SUBSET_MODE_DEFAULT, + FLOAT rasterDpi = 150.0f, + D2D1_COLOR_SPACE colorSpace = D2D1_COLOR_SPACE_SRGB + ) + { + D2D1_PRINT_CONTROL_PROPERTIES printControlProps; + + printControlProps.fontSubset = fontSubsetMode; + printControlProps.rasterDPI = rasterDpi; + printControlProps.colorSpace = colorSpace; + + return printControlProps; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_RENDERING_CONTROLS + RenderingControls( + D2D1_BUFFER_PRECISION bufferPrecision, + D2D1_SIZE_U tileSize + ) + { + D2D1_RENDERING_CONTROLS renderingControls; + + renderingControls.bufferPrecision = bufferPrecision; + renderingControls.tileSize = tileSize; + + return renderingControls; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_EFFECT_INPUT_DESCRIPTION + EffectInputDescription( + ID2D1Effect *effect, + UINT32 inputIndex, + D2D1_RECT_F inputRectangle + ) + { + D2D1_EFFECT_INPUT_DESCRIPTION description; + + description.effect = effect; + description.inputIndex = inputIndex; + description.inputRectangle = inputRectangle; + + return description; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_CREATION_PROPERTIES + CreationProperties( + D2D1_THREADING_MODE threadingMode, + D2D1_DEBUG_LEVEL debugLevel, + D2D1_DEVICE_CONTEXT_OPTIONS options + ) + { + D2D1_CREATION_PROPERTIES creationProperties; + + creationProperties.threadingMode = threadingMode; + creationProperties.debugLevel = debugLevel; + creationProperties.options = options; + + return creationProperties; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_VECTOR_2F + Vector2F( + FLOAT x = 0.0f, + FLOAT y = 0.0f + ) + { + D2D1_VECTOR_2F vec2 = {x, y}; + return vec2; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_VECTOR_3F + Vector3F( + FLOAT x = 0.0f, + FLOAT y = 0.0f, + FLOAT z = 0.0f + ) + { + D2D1_VECTOR_3F vec3 = {x, y, z}; + return vec3; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_VECTOR_4F + Vector4F( + FLOAT x = 0.0f, + FLOAT y = 0.0f, + FLOAT z = 0.0f, + FLOAT w = 0.0f + ) + { + D2D1_VECTOR_4F vec4 = {x, y, z, w}; + return vec4; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_POINT_2L + Point2L( + INT32 x = 0, + INT32 y = 0 + ) + { + return Point2(x, y); + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_RECT_L + RectL( + INT32 left = 0.f, + INT32 top = 0.f, + INT32 right = 0.f, + INT32 bottom = 0.f + ) + { + return Rect(left, top, right, bottom); + } + + // + // Sets a bitmap as an effect input, while inserting a DPI compensation effect + // to preserve visual appearance as the device context's DPI changes. + // + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + HRESULT + SetDpiCompensatedEffectInput( + _In_ ID2D1DeviceContext *deviceContext, + _In_ ID2D1Effect *effect, + UINT32 inputIndex, + _In_opt_ ID2D1Bitmap *inputBitmap, + D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR, + D2D1_BORDER_MODE borderMode = D2D1_BORDER_MODE_HARD + ) + { + HRESULT hr = S_OK; + ID2D1Effect *dpiCompensationEffect = NULL; + + if (!inputBitmap) + { + effect->SetInput(inputIndex, NULL); + return hr; + } + + hr = deviceContext->CreateEffect(CLSID_D2D1DpiCompensation, &dpiCompensationEffect); + + if (SUCCEEDED(hr)) + { + if (SUCCEEDED(hr)) + { + dpiCompensationEffect->SetInput(0, inputBitmap); + + D2D1_POINT_2F bitmapDpi; + inputBitmap->GetDpi(&bitmapDpi.x, &bitmapDpi.y); + hr = dpiCompensationEffect->SetValue(D2D1_DPICOMPENSATION_PROP_INPUT_DPI, bitmapDpi); + } + + if (SUCCEEDED(hr)) + { + hr = dpiCompensationEffect->SetValue(D2D1_DPICOMPENSATION_PROP_INTERPOLATION_MODE, interpolationMode); + } + + if (SUCCEEDED(hr)) + { + hr = dpiCompensationEffect->SetValue(D2D1_DPICOMPENSATION_PROP_BORDER_MODE, borderMode); + } + + if (SUCCEEDED(hr)) + { + effect->SetInputEffect(inputIndex, dpiCompensationEffect); + } + + if (dpiCompensationEffect) + { + dpiCompensationEffect->Release(); + } + } + + return hr; + } + +} // namespace D2D1 + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ + +#endif // #ifndef D2D_USE_C_DEFINITIONS + +#endif // #ifndef _D2D1_HELPER_H_ + diff --git a/gfx/include/dxsdk/d2d1_2.h b/gfx/include/dxsdk/d2d1_2.h new file mode 100644 index 0000000000..2441769ab8 --- /dev/null +++ b/gfx/include/dxsdk/d2d1_2.h @@ -0,0 +1,204 @@ +//--------------------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// This file is automatically generated. Please do not edit it directly. +// +// File name: D2D1_2.h +//--------------------------------------------------------------------------- +#ifdef _MSC_VER +#pragma once +#endif // #ifdef _MSC_VER + +#ifndef _D2D1_2_H_ +#define _D2D1_2_H_ + +#ifndef _D2D1_1_H_ +#include +#endif // #ifndef _D2D1_1_H_ +#ifndef _D2D1_EFFECTS_1_ +#include +#endif // #ifndef _D2D1_EFFECTS_1_ + +/*#include */ + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + +#ifndef D2D_USE_C_DEFINITIONS + +interface ID2D1Device1; +#else + +typedef interface ID2D1Device1 ID2D1Device1; + +#endif + +/// +/// Specifies the extent to which D2D will throttle work sent to the GPU. +/// +typedef enum D2D1_RENDERING_PRIORITY +{ + D2D1_RENDERING_PRIORITY_NORMAL = 0, + D2D1_RENDERING_PRIORITY_LOW = 1, + D2D1_RENDERING_PRIORITY_FORCE_DWORD = 0xffffffff + +} D2D1_RENDERING_PRIORITY; + + +EXTERN_C CONST IID IID_ID2D1GeometryRealization; +EXTERN_C CONST IID IID_ID2D1DeviceContext1; +EXTERN_C CONST IID IID_ID2D1Device1; +EXTERN_C CONST IID IID_ID2D1Factory2; +EXTERN_C CONST IID IID_ID2D1CommandSink1; + + +#ifndef D2D_USE_C_DEFINITIONS + + +/// +/// Encapsulates a device- and transform-dependent representation of a filled or +/// stroked geometry. +/// +interface DX_DECLARE_INTERFACE("a16907d7-bc02-4801-99e8-8cf7f485f774") ID2D1GeometryRealization : public ID2D1Resource +{ +}; // interface ID2D1GeometryRealization + + +/// +/// Enables creation and drawing of geometry realization objects. +/// +interface DX_DECLARE_INTERFACE("d37f57e4-6908-459f-a199-e72f24f79987") ID2D1DeviceContext1 : public ID2D1DeviceContext +{ + + STDMETHOD(CreateFilledGeometryRealization)( + _In_ ID2D1Geometry *geometry, + FLOAT flatteningTolerance, + _COM_Outptr_ ID2D1GeometryRealization **geometryRealization + ) PURE; + + STDMETHOD(CreateStrokedGeometryRealization)( + _In_ ID2D1Geometry *geometry, + FLOAT flatteningTolerance, + FLOAT strokeWidth, + _In_opt_ ID2D1StrokeStyle *strokeStyle, + _COM_Outptr_ ID2D1GeometryRealization **geometryRealization + ) PURE; + + STDMETHOD_(void, DrawGeometryRealization)( + _In_ ID2D1GeometryRealization *geometryRealization, + _In_ ID2D1Brush *brush + ) PURE; +}; // interface ID2D1DeviceContext1 + + +/// +/// Represents a resource domain whose objects and device contexts can be used +/// together. +/// +interface DX_DECLARE_INTERFACE("d21768e1-23a4-4823-a14b-7c3eba85d658") ID2D1Device1 : public ID2D1Device +{ + + /// + /// Retrieves the rendering priority currently set on the device. + /// + STDMETHOD_(D2D1_RENDERING_PRIORITY, GetRenderingPriority)( + ) PURE; + + /// + /// Sets the rendering priority of the device. + /// + STDMETHOD_(void, SetRenderingPriority)( + D2D1_RENDERING_PRIORITY renderingPriority + ) PURE; + + /// + /// Creates a new device context with no initially assigned target. + /// + STDMETHOD(CreateDeviceContext)( + D2D1_DEVICE_CONTEXT_OPTIONS options, + _COM_Outptr_ ID2D1DeviceContext1 **deviceContext1 + ) PURE; + + using ID2D1Device::CreateDeviceContext; +}; // interface ID2D1Device1 + + +/// +/// Creates Direct2D resources. This interface also enables the creation of +/// ID2D1Device1 objects. +/// +interface DX_DECLARE_INTERFACE("94f81a73-9212-4376-9c58-b16a3a0d3992") ID2D1Factory2 : public ID2D1Factory1 +{ + + /// + /// This creates a new Direct2D device from the given IDXGIDevice. + /// + STDMETHOD(CreateDevice)( + _In_ IDXGIDevice *dxgiDevice, + _COM_Outptr_ ID2D1Device1 **d2dDevice1 + ) PURE; + + using ID2D1Factory1::CreateDevice; +}; // interface ID2D1Factory2 + + +/// +/// This interface performs all the same functions as the existing ID2D1CommandSink +/// interface. It also enables access to the new primitive blend modes, MIN and ADD, +/// through its SetPrimitiveBlend1 method. +/// +interface DX_DECLARE_INTERFACE("9eb767fd-4269-4467-b8c2-eb30cb305743") ID2D1CommandSink1 : public ID2D1CommandSink +{ + + /// + /// This method is called if primitiveBlend value was added after Windows 8. + /// SetPrimitiveBlend method is used for Win8 values (_SOURCE_OVER and _COPY). + /// + STDMETHOD(SetPrimitiveBlend1)( + D2D1_PRIMITIVE_BLEND primitiveBlend + ) PURE; +}; // interface ID2D1CommandSink1 + + + +#endif + + +#ifdef D2D_USE_C_DEFINITIONS + + +typedef interface ID2D1GeometryRealization ID2D1GeometryRealization; + +typedef interface ID2D1DeviceContext1 ID2D1DeviceContext1; + +typedef interface ID2D1Device1 ID2D1Device1; + +typedef interface ID2D1Factory2 ID2D1Factory2; + +typedef interface ID2D1CommandSink1 ID2D1CommandSink1; + +#endif + + +#ifdef __cplusplus +extern "C" +{ +#endif + +#if NTDDI_VERSION >= NTDDI_WINBLUE + FLOAT WINAPI + D2D1ComputeMaximumScaleFactor( + _In_ CONST D2D1_MATRIX_3X2_F *matrix + ); +#endif // #if NTDDI_VERSION >= NTDDI_WINBLUE + +#ifdef __cplusplus +} +#endif + + + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ +#include +#endif // #ifndef _D2D1_2_H_ diff --git a/gfx/include/dxsdk/d2d1_2helper.h b/gfx/include/dxsdk/d2d1_2helper.h new file mode 100644 index 0000000000..d5f57fbc61 --- /dev/null +++ b/gfx/include/dxsdk/d2d1_2helper.h @@ -0,0 +1,65 @@ + +/*=========================================================================*\ + + Copyright (c) Microsoft Corporation. All rights reserved. + + File: D2D1_2Helper.h + + Module Name: D2D + + Description: Helper files over the D2D interfaces and APIs. + +\*=========================================================================*/ + +#ifdef _MSC_VER +#pragma once +#endif // _MSC_VER + +#ifndef _D2D1_2HELPER_H_ +#define _D2D1_2HELPER_H_ + +#if NTDDI_VERSION >= NTDDI_WINBLUE + +#ifndef _D2D1_2_H_ +#include +#endif // #ifndef _D2D1_2_H_ + +#ifndef D2D_USE_C_DEFINITIONS + +/*#include */ + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + +namespace D2D1 +{ + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + FLOAT + ComputeFlatteningTolerance( + _In_ CONST D2D1_MATRIX_3X2_F &matrix, + FLOAT dpiX = 96.0f, + FLOAT dpiY = 96.0f, + FLOAT maxZoomFactor = 1.0f + ) + { + D2D1_MATRIX_3X2_F dpiDependentTransform = + matrix * D2D1::Matrix3x2F::Scale(dpiX / 96.0f, dpiY / 96.0f); + + FLOAT absMaxZoomFactor = (maxZoomFactor > 0) ? maxZoomFactor : -maxZoomFactor; + + return D2D1_DEFAULT_FLATTENING_TOLERANCE / + (absMaxZoomFactor * D2D1ComputeMaximumScaleFactor(&dpiDependentTransform)); + } + +} // namespace D2D1 + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ + +#endif // #ifndef D2D_USE_C_DEFINITIONS + +#endif // #if NTDDI_VERSION >= NTDDI_WINBLUE + +#endif // #ifndef _D2D1_HELPER_H_ + diff --git a/gfx/include/dxsdk/d2d1_3.h b/gfx/include/dxsdk/d2d1_3.h new file mode 100644 index 0000000000..eaf33b073e --- /dev/null +++ b/gfx/include/dxsdk/d2d1_3.h @@ -0,0 +1,1860 @@ +//--------------------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// This file is automatically generated. Please do not edit it directly. +// +// File name: D2D1_3.h +//--------------------------------------------------------------------------- +#ifdef _MSC_VER +#pragma once +#endif // #ifdef _MSC_VER + +#ifndef _D2D1_3_H_ +#define _D2D1_3_H_ + +#ifndef _D2D1_2_H_ +#include +#endif // #ifndef _D2D1_2_H_ +#ifndef _D2D1_EFFECTS_2_ +#include +#endif // #ifndef _D2D1_EFFECTS_2_ +#ifndef _D2D1_SVG_ +#include +#endif // #ifndef _D2D1_SVG_ + +/*#include */ + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + +typedef interface IWICBitmapFrameDecode IWICBitmapFrameDecode; +typedef interface IDWriteFontFace IDWriteFontFace; + +/// +/// Specifies the appearance of the ink nib (pen tip) as part of an +/// D2D1_INK_STYLE_PROPERTIES structure. +/// +typedef enum D2D1_INK_NIB_SHAPE +{ + D2D1_INK_NIB_SHAPE_ROUND = 0, + D2D1_INK_NIB_SHAPE_SQUARE = 1, + D2D1_INK_NIB_SHAPE_FORCE_DWORD = 0xffffffff + +} D2D1_INK_NIB_SHAPE; + + +/// +/// Specifies the orientation of an image. +/// +typedef enum D2D1_ORIENTATION +{ + D2D1_ORIENTATION_DEFAULT = 1, + D2D1_ORIENTATION_FLIP_HORIZONTAL = 2, + D2D1_ORIENTATION_ROTATE_CLOCKWISE180 = 3, + D2D1_ORIENTATION_ROTATE_CLOCKWISE180_FLIP_HORIZONTAL = 4, + D2D1_ORIENTATION_ROTATE_CLOCKWISE90_FLIP_HORIZONTAL = 5, + D2D1_ORIENTATION_ROTATE_CLOCKWISE270 = 6, + D2D1_ORIENTATION_ROTATE_CLOCKWISE270_FLIP_HORIZONTAL = 7, + D2D1_ORIENTATION_ROTATE_CLOCKWISE90 = 8, + D2D1_ORIENTATION_FORCE_DWORD = 0xffffffff + +} D2D1_ORIENTATION; + + +/// +/// Option flags controlling how images sources are loaded during +/// CreateImageSourceFromWic. +/// +typedef enum D2D1_IMAGE_SOURCE_LOADING_OPTIONS +{ + D2D1_IMAGE_SOURCE_LOADING_OPTIONS_NONE = 0, + D2D1_IMAGE_SOURCE_LOADING_OPTIONS_RELEASE_SOURCE = 1, + D2D1_IMAGE_SOURCE_LOADING_OPTIONS_CACHE_ON_DEMAND = 2, + D2D1_IMAGE_SOURCE_LOADING_OPTIONS_FORCE_DWORD = 0xffffffff + +} D2D1_IMAGE_SOURCE_LOADING_OPTIONS; + +DEFINE_ENUM_FLAG_OPERATORS(D2D1_IMAGE_SOURCE_LOADING_OPTIONS); + + +/// +/// Option flags controlling primary conversion performed by +/// CreateImageSourceFromDxgi, if any. +/// +typedef enum D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS +{ + D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS_NONE = 0, + D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS_LOW_QUALITY_PRIMARY_CONVERSION = 1, + D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS_FORCE_DWORD = 0xffffffff + +} D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS; + +DEFINE_ENUM_FLAG_OPERATORS(D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS); + + +/// +/// Option flags for transformed image sources. +/// +typedef enum D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS +{ + D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS_NONE = 0, + + /// + /// Prevents the image source from being automatically scaled (by a ratio of the + /// context DPI divided by 96) while drawn. + /// + D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS_DISABLE_DPI_SCALE = 1, + D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS_FORCE_DWORD = 0xffffffff + +} D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS; + +DEFINE_ENUM_FLAG_OPERATORS(D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS); + + +/// +/// Properties of a transformed image source. +/// +typedef struct D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES +{ + + /// + /// The orientation at which the image source is drawn. + /// + D2D1_ORIENTATION orientation; + + /// + /// The horizontal scale factor at which the image source is drawn. + /// + FLOAT scaleX; + + /// + /// The vertical scale factor at which the image source is drawn. + /// + FLOAT scaleY; + + /// + /// The interpolation mode used when the image source is drawn. This is ignored if + /// the image source is drawn using the DrawImage method, or using an image brush. + /// + D2D1_INTERPOLATION_MODE interpolationMode; + + /// + /// Option flags. + /// + D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS options; + +} D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES; + + +/// +/// Represents a point, radius pair that makes up part of a D2D1_INK_BEZIER_SEGMENT. +/// +typedef struct D2D1_INK_POINT +{ + FLOAT x; + FLOAT y; + FLOAT radius; + +} D2D1_INK_POINT; + + +/// +/// Represents a Bezier segment to be used in the creation of an ID2D1Ink object. +/// This structure differs from D2D1_BEZIER_SEGMENT in that it is composed of +/// D2D1_INK_POINT s, which contain a radius in addition to x- and y-coordinates. +/// +typedef struct D2D1_INK_BEZIER_SEGMENT +{ + D2D1_INK_POINT point1; + D2D1_INK_POINT point2; + D2D1_INK_POINT point3; + +} D2D1_INK_BEZIER_SEGMENT; + + +/// +/// Defines the general pen tip shape and the transform used in an ID2D1InkStyle +/// object. +/// +typedef struct D2D1_INK_STYLE_PROPERTIES +{ + + /// + /// The general shape of the nib used to draw a given ink object. + /// + D2D1_INK_NIB_SHAPE nibShape; + + /// + /// The transform applied to shape of the nib. _31 and _32 are ignored. + /// + D2D1_MATRIX_3X2_F nibTransform; + +} D2D1_INK_STYLE_PROPERTIES; + + +/// +/// Specifies how to render gradient mesh edges. +/// +typedef enum D2D1_PATCH_EDGE_MODE +{ + + /// + /// Render this edge aliased. + /// + D2D1_PATCH_EDGE_MODE_ALIASED = 0, + + /// + /// Render this edge antialiased. + /// + D2D1_PATCH_EDGE_MODE_ANTIALIASED = 1, + + /// + /// Render this edge aliased and inflated out slightly. + /// + D2D1_PATCH_EDGE_MODE_ALIASED_INFLATED = 2, + D2D1_PATCH_EDGE_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_PATCH_EDGE_MODE; + + +/// +/// Represents a tensor patch with 16 control points, 4 corner colors, and boundary +/// flags. An ID2D1GradientMesh is made up of 1 or more gradient mesh patches. Use +/// the GradientMeshPatch function or the GradientMeshPatchFromCoonsPatch function +/// to create one. +/// +typedef struct D2D1_GRADIENT_MESH_PATCH +{ + + /// + /// The gradient mesh patch control point at position 00. + /// + D2D1_POINT_2F point00; + + /// + /// The gradient mesh patch control point at position 01. + /// + D2D1_POINT_2F point01; + + /// + /// The gradient mesh patch control point at position 02. + /// + D2D1_POINT_2F point02; + + /// + /// The gradient mesh patch control point at position 03. + /// + D2D1_POINT_2F point03; + + /// + /// The gradient mesh patch control point at position 10. + /// + D2D1_POINT_2F point10; + + /// + /// The gradient mesh patch control point at position 11. + /// + D2D1_POINT_2F point11; + + /// + /// The gradient mesh patch control point at position 12. + /// + D2D1_POINT_2F point12; + + /// + /// The gradient mesh patch control point at position 13. + /// + D2D1_POINT_2F point13; + + /// + /// The gradient mesh patch control point at position 20. + /// + D2D1_POINT_2F point20; + + /// + /// The gradient mesh patch control point at position 21. + /// + D2D1_POINT_2F point21; + + /// + /// The gradient mesh patch control point at position 22. + /// + D2D1_POINT_2F point22; + + /// + /// The gradient mesh patch control point at position 23. + /// + D2D1_POINT_2F point23; + + /// + /// The gradient mesh patch control point at position 30. + /// + D2D1_POINT_2F point30; + + /// + /// The gradient mesh patch control point at position 31. + /// + D2D1_POINT_2F point31; + + /// + /// The gradient mesh patch control point at position 32. + /// + D2D1_POINT_2F point32; + + /// + /// The gradient mesh patch control point at position 33. + /// + D2D1_POINT_2F point33; + + /// + /// The color associated with control point at position 00. + /// + D2D1_COLOR_F color00; + + /// + /// The color associated with control point at position 03. + /// + D2D1_COLOR_F color03; + + /// + /// The color associated with control point at position 30. + /// + D2D1_COLOR_F color30; + + /// + /// The color associated with control point at position 33. + /// + D2D1_COLOR_F color33; + + /// + /// The edge mode for the top edge of the patch. + /// + D2D1_PATCH_EDGE_MODE topEdgeMode; + + /// + /// The edge mode for the left edge of the patch. + /// + D2D1_PATCH_EDGE_MODE leftEdgeMode; + + /// + /// The edge mode for the bottom edge of the patch. + /// + D2D1_PATCH_EDGE_MODE bottomEdgeMode; + + /// + /// The edge mode for the right edge of the patch. + /// + D2D1_PATCH_EDGE_MODE rightEdgeMode; + +} D2D1_GRADIENT_MESH_PATCH; + +typedef enum D2D1_SPRITE_OPTIONS +{ + + /// + /// Use default sprite rendering behavior. + /// + D2D1_SPRITE_OPTIONS_NONE = 0, + + /// + /// Bitmap interpolation will be clamped to the sprite's source rectangle. + /// + D2D1_SPRITE_OPTIONS_CLAMP_TO_SOURCE_RECTANGLE = 1, + D2D1_SPRITE_OPTIONS_FORCE_DWORD = 0xffffffff + +} D2D1_SPRITE_OPTIONS; + +DEFINE_ENUM_FLAG_OPERATORS(D2D1_SPRITE_OPTIONS); + + +/// +/// Specifies the pixel snapping policy when rendering color bitmap glyphs. +/// +typedef enum D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION +{ + + /// + /// Color bitmap glyph positions are snapped to the nearest pixel if the bitmap + /// resolution matches that of the device context. + /// + D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION_DEFAULT = 0, + + /// + /// Color bitmap glyph positions are not snapped. + /// + D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION_DISABLE = 1, + D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION_FORCE_DWORD = 0xffffffff + +} D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION; + + +/// +/// This determines what gamma is used for interpolation/blending. +/// +typedef enum D2D1_GAMMA1 +{ + + /// + /// Colors are manipulated in 2.2 gamma color space. + /// + D2D1_GAMMA1_G22 = D2D1_GAMMA_2_2, + + /// + /// Colors are manipulated in 1.0 gamma color space. + /// + D2D1_GAMMA1_G10 = D2D1_GAMMA_1_0, + + /// + /// Colors are manipulated in ST.2084 PQ gamma color space. + /// + D2D1_GAMMA1_G2084 = 2, + D2D1_GAMMA1_FORCE_DWORD = 0xffffffff + +} D2D1_GAMMA1; + + +/// +/// Simple description of a color space. +/// +typedef struct D2D1_SIMPLE_COLOR_PROFILE +{ + + /// + /// The XY coordinates of the red primary in CIEXYZ space. + /// + D2D1_POINT_2F redPrimary; + + /// + /// The XY coordinates of the green primary in CIEXYZ space. + /// + D2D1_POINT_2F greenPrimary; + + /// + /// The XY coordinates of the blue primary in CIEXYZ space. + /// + D2D1_POINT_2F bluePrimary; + + /// + /// The X/Z tristimulus values for the whitepoint, normalized for relative + /// luminance. + /// + D2D1_POINT_2F whitePointXZ; + + /// + /// The gamma encoding to use for this color space. + /// + D2D1_GAMMA1 gamma; + +} D2D1_SIMPLE_COLOR_PROFILE; + + +/// +/// Specifies which way a color profile is defined. +/// +typedef enum D2D1_COLOR_CONTEXT_TYPE +{ + D2D1_COLOR_CONTEXT_TYPE_ICC = 0, + D2D1_COLOR_CONTEXT_TYPE_SIMPLE = 1, + D2D1_COLOR_CONTEXT_TYPE_DXGI = 2, + D2D1_COLOR_CONTEXT_TYPE_FORCE_DWORD = 0xffffffff + +} D2D1_COLOR_CONTEXT_TYPE; + + +EXTERN_C CONST IID IID_ID2D1InkStyle; +EXTERN_C CONST IID IID_ID2D1Ink; +EXTERN_C CONST IID IID_ID2D1GradientMesh; +EXTERN_C CONST IID IID_ID2D1ImageSource; +EXTERN_C CONST IID IID_ID2D1ImageSourceFromWic; +EXTERN_C CONST IID IID_ID2D1TransformedImageSource; +EXTERN_C CONST IID IID_ID2D1LookupTable3D; +EXTERN_C CONST IID IID_ID2D1DeviceContext2; +EXTERN_C CONST IID IID_ID2D1Device2; +EXTERN_C CONST IID IID_ID2D1Factory3; +EXTERN_C CONST IID IID_ID2D1CommandSink2; +EXTERN_C CONST IID IID_ID2D1GdiMetafile1; +EXTERN_C CONST IID IID_ID2D1GdiMetafileSink1; +EXTERN_C CONST IID IID_ID2D1SpriteBatch; +EXTERN_C CONST IID IID_ID2D1DeviceContext3; +EXTERN_C CONST IID IID_ID2D1Device3; +EXTERN_C CONST IID IID_ID2D1Factory4; +EXTERN_C CONST IID IID_ID2D1CommandSink3; +EXTERN_C CONST IID IID_ID2D1SvgGlyphStyle; +EXTERN_C CONST IID IID_ID2D1DeviceContext4; +EXTERN_C CONST IID IID_ID2D1Device4; +EXTERN_C CONST IID IID_ID2D1Factory5; +EXTERN_C CONST IID IID_ID2D1CommandSink4; +EXTERN_C CONST IID IID_ID2D1ColorContext1; +EXTERN_C CONST IID IID_ID2D1DeviceContext5; +EXTERN_C CONST IID IID_ID2D1Device5; +EXTERN_C CONST IID IID_ID2D1Factory6; +EXTERN_C CONST IID IID_ID2D1CommandSink5; +EXTERN_C CONST IID IID_ID2D1DeviceContext6; +EXTERN_C CONST IID IID_ID2D1Device6; +EXTERN_C CONST IID IID_ID2D1Factory7; + + +#ifndef D2D_USE_C_DEFINITIONS + + +/// +/// Represents a collection of style properties to be used by methods like +/// ID2D1DeviceContext2::DrawInk when rendering ink. The ink style defines the nib +/// (pen tip) shape and transform. +/// +interface DX_DECLARE_INTERFACE("bae8b344-23fc-4071-8cb5-d05d6f073848") ID2D1InkStyle : public ID2D1Resource +{ + + STDMETHOD_(void, SetNibTransform)( + _In_ CONST D2D1_MATRIX_3X2_F *transform + ) PURE; + + STDMETHOD_(void, GetNibTransform)( + _Out_ D2D1_MATRIX_3X2_F *transform + ) CONST PURE; + + STDMETHOD_(void, SetNibShape)( + D2D1_INK_NIB_SHAPE nibShape + ) PURE; + + STDMETHOD_(D2D1_INK_NIB_SHAPE, GetNibShape)( + ) CONST PURE; + + COM_DECLSPEC_NOTHROW + void + SetNibTransform( + CONST D2D1_MATRIX_3X2_F &transform + ) + { + SetNibTransform(&transform); + } +}; // interface ID2D1InkStyle + + +/// +/// Represents a single continuous stroke of variable-width ink, as defined by a +/// series of Bezier segments and widths. +/// +interface DX_DECLARE_INTERFACE("b499923b-7029-478f-a8b3-432c7c5f5312") ID2D1Ink : public ID2D1Resource +{ + + /// + /// Resets the ink start point. + /// + STDMETHOD_(void, SetStartPoint)( + _In_ CONST D2D1_INK_POINT *startPoint + ) PURE; + + /// + /// Retrieve the start point with which the ink was initialized. + /// + STDMETHOD_(D2D1_INK_POINT, GetStartPoint)( + ) CONST PURE; + + /// + /// Add one or more segments to the end of the ink. + /// + STDMETHOD(AddSegments)( + _In_reads_(segmentsCount) CONST D2D1_INK_BEZIER_SEGMENT *segments, + UINT32 segmentsCount + ) PURE; + + /// + /// Remove one or more segments from the end of the ink. + /// + STDMETHOD(RemoveSegmentsAtEnd)( + UINT32 segmentsCount + ) PURE; + + /// + /// Updates the specified segments with new control points. + /// + STDMETHOD(SetSegments)( + UINT32 startSegment, + _In_reads_(segmentsCount) CONST D2D1_INK_BEZIER_SEGMENT *segments, + UINT32 segmentsCount + ) PURE; + + /// + /// Update the last segment with new control points. + /// + STDMETHOD(SetSegmentAtEnd)( + _In_ CONST D2D1_INK_BEZIER_SEGMENT *segment + ) PURE; + + /// + /// Returns the number of segments the ink is composed of. + /// + STDMETHOD_(UINT32, GetSegmentCount)( + ) CONST PURE; + + /// + /// Retrieve the segments stored in the ink. + /// + STDMETHOD(GetSegments)( + UINT32 startSegment, + _Out_writes_(segmentsCount) D2D1_INK_BEZIER_SEGMENT *segments, + UINT32 segmentsCount + ) CONST PURE; + + /// + /// Construct a geometric representation of the ink. + /// + STDMETHOD(StreamAsGeometry)( + _In_opt_ ID2D1InkStyle *inkStyle, + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + FLOAT flatteningTolerance, + _In_ ID2D1SimplifiedGeometrySink *geometrySink + ) CONST PURE; + + /// + /// Retrieve the bounds of the ink, with an optional applied transform. + /// + STDMETHOD(GetBounds)( + _In_opt_ ID2D1InkStyle *inkStyle, + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + _Out_ D2D1_RECT_F *bounds + ) CONST PURE; + + /// + /// Resets the ink start point. + /// + COM_DECLSPEC_NOTHROW + void + SetStartPoint( + CONST D2D1_INK_POINT &startPoint + ) + { + SetStartPoint(&startPoint); + } + + COM_DECLSPEC_NOTHROW + HRESULT + SetSegmentAtEnd( + CONST D2D1_INK_BEZIER_SEGMENT &segment + ) + { + return SetSegmentAtEnd(&segment); + } + + /// + /// Construct a geometric representation of the ink. + /// + COM_DECLSPEC_NOTHROW + HRESULT + StreamAsGeometry( + _In_opt_ ID2D1InkStyle *inkStyle, + CONST D2D1_MATRIX_3X2_F &worldTransform, + FLOAT flatteningTolerance, + _In_ ID2D1SimplifiedGeometrySink *geometrySink + ) CONST + { + return StreamAsGeometry(inkStyle,&worldTransform, flatteningTolerance, geometrySink); + } + + /// + /// Construct a geometric representation of the ink. + /// + COM_DECLSPEC_NOTHROW + HRESULT + StreamAsGeometry( + _In_opt_ ID2D1InkStyle *inkStyle, + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + _In_ ID2D1SimplifiedGeometrySink *geometrySink + ) CONST + { + return StreamAsGeometry(inkStyle,worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink); + } + + /// + /// Construct a geometric representation of the ink. + /// + COM_DECLSPEC_NOTHROW + HRESULT + StreamAsGeometry( + _In_opt_ ID2D1InkStyle *inkStyle, + CONST D2D1_MATRIX_3X2_F &worldTransform, + _In_ ID2D1SimplifiedGeometrySink *geometrySink + ) CONST + { + return StreamAsGeometry(inkStyle,&worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink); + } +}; // interface ID2D1Ink + + +/// +/// Represents a device-dependent representation of a gradient mesh composed of +/// patches. Use the ID2D1DeviceContext2::CreateGradientMesh method to create an +/// instance of ID2D1GradientMesh. +/// +interface DX_DECLARE_INTERFACE("f292e401-c050-4cde-83d7-04962d3b23c2") ID2D1GradientMesh : public ID2D1Resource +{ + + /// + /// Returns the number of patches of the gradient mesh. + /// + STDMETHOD_(UINT32, GetPatchCount)( + ) CONST PURE; + + /// + /// Retrieve the patch data stored in the gradient mesh. + /// + STDMETHOD(GetPatches)( + UINT32 startIndex, + _Out_writes_(patchesCount) D2D1_GRADIENT_MESH_PATCH *patches, + UINT32 patchesCount + ) CONST PURE; +}; // interface ID2D1GradientMesh + + +/// +/// Represents a producer of pixels that can fill an arbitrary 2D plane. +/// +interface DX_DECLARE_INTERFACE("c9b664e5-74a1-4378-9ac2-eefc37a3f4d8") ID2D1ImageSource : public ID2D1Image +{ + + STDMETHOD(OfferResources)( + ) PURE; + + STDMETHOD(TryReclaimResources)( + _Out_ BOOL *resourcesDiscarded + ) PURE; +}; // interface ID2D1ImageSource + + +/// +/// Produces 2D pixel data that has been sourced from WIC. +/// +interface DX_DECLARE_INTERFACE("77395441-1c8f-4555-8683-f50dab0fe792") ID2D1ImageSourceFromWic : public ID2D1ImageSource +{ + + STDMETHOD(EnsureCached)( + _In_opt_ CONST D2D1_RECT_U *rectangleToFill + ) PURE; + + STDMETHOD(TrimCache)( + _In_opt_ CONST D2D1_RECT_U *rectangleToPreserve + ) PURE; + + STDMETHOD_(void, GetSource)( + _Outptr_result_maybenull_ IWICBitmapSource **wicBitmapSource + ) CONST PURE; + + COM_DECLSPEC_NOTHROW + HRESULT + EnsureCached( + CONST D2D1_RECT_U &rectangleToFill + ) + { + return EnsureCached(&rectangleToFill); + } + + COM_DECLSPEC_NOTHROW + HRESULT + TrimCache( + CONST D2D1_RECT_U &rectangleToPreserve + ) + { + return TrimCache(&rectangleToPreserve); + } +}; // interface ID2D1ImageSourceFromWic + + +/// +/// Represents an image source which shares resources with an original image source. +/// +interface DX_DECLARE_INTERFACE("7f1f79e5-2796-416c-8f55-700f911445e5") ID2D1TransformedImageSource : public ID2D1Image +{ + + STDMETHOD_(void, GetSource)( + _Outptr_result_maybenull_ ID2D1ImageSource **imageSource + ) CONST PURE; + + STDMETHOD_(void, GetProperties)( + _Out_ D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES *properties + ) CONST PURE; +}; // interface ID2D1TransformedImageSource + + +/// +/// A container for 3D lookup table data that can be passed to the LookupTable3D +/// effect. +/// +interface DX_DECLARE_INTERFACE("53dd9855-a3b0-4d5b-82e1-26e25c5e5797") ID2D1LookupTable3D : public ID2D1Resource +{ +}; // interface ID2D1LookupTable3D + + +/// +/// This interface performs all the same functions as the ID2D1DeviceContext1 +/// interface, plus it enables functionality such as ink rendering, gradient mesh +/// rendering, and improved image loading. +/// +interface DX_DECLARE_INTERFACE("394ea6a3-0c34-4321-950b-6ca20f0be6c7") ID2D1DeviceContext2 : public ID2D1DeviceContext1 +{ + + STDMETHOD(CreateInk)( + _In_ CONST D2D1_INK_POINT *startPoint, + _COM_Outptr_ ID2D1Ink **ink + ) PURE; + + /// + /// Creates a new ink style. + /// + STDMETHOD(CreateInkStyle)( + _In_opt_ CONST D2D1_INK_STYLE_PROPERTIES *inkStyleProperties, + _COM_Outptr_ ID2D1InkStyle **inkStyle + ) PURE; + + STDMETHOD(CreateGradientMesh)( + _In_reads_(patchesCount) CONST D2D1_GRADIENT_MESH_PATCH *patches, + UINT32 patchesCount, + _COM_Outptr_ ID2D1GradientMesh **gradientMesh + ) PURE; + + STDMETHOD(CreateImageSourceFromWic)( + _In_ IWICBitmapSource *wicBitmapSource, + D2D1_IMAGE_SOURCE_LOADING_OPTIONS loadingOptions, + D2D1_ALPHA_MODE alphaMode, + _COM_Outptr_ ID2D1ImageSourceFromWic **imageSource + ) PURE; + + /// + /// Creates a 3D lookup table for mapping a 3-channel input to a 3-channel output. + /// The table data must be provided in 4-channel format. + /// + STDMETHOD(CreateLookupTable3D)( + D2D1_BUFFER_PRECISION precision, + _In_reads_(3) CONST UINT32 *extents, + _In_reads_(dataCount) CONST BYTE *data, + UINT32 dataCount, + _In_reads_(2) CONST UINT32 *strides, + _COM_Outptr_ ID2D1LookupTable3D **lookupTable + ) PURE; + + STDMETHOD(CreateImageSourceFromDxgi)( + _In_reads_(surfaceCount) IDXGISurface **surfaces, + UINT32 surfaceCount, + DXGI_COLOR_SPACE_TYPE colorSpace, + D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS options, + _COM_Outptr_ ID2D1ImageSource **imageSource + ) PURE; + + /// + /// Retrieves the world-space bounds in DIPs of the gradient mesh using the device + /// context DPI. + /// + STDMETHOD(GetGradientMeshWorldBounds)( + _In_ ID2D1GradientMesh *gradientMesh, + _Out_ D2D1_RECT_F *pBounds + ) CONST PURE; + + STDMETHOD_(void, DrawInk)( + _In_ ID2D1Ink *ink, + _In_ ID2D1Brush *brush, + _In_opt_ ID2D1InkStyle *inkStyle + ) PURE; + + STDMETHOD_(void, DrawGradientMesh)( + _In_ ID2D1GradientMesh *gradientMesh + ) PURE; + + /// + /// Draw a metafile to the device context. + /// + STDMETHOD_(void, DrawGdiMetafile)( + _In_ ID2D1GdiMetafile *gdiMetafile, + _In_opt_ CONST D2D1_RECT_F *destinationRectangle, + _In_opt_ CONST D2D1_RECT_F *sourceRectangle = NULL + ) PURE; + + using ID2D1DeviceContext::DrawGdiMetafile; + + /// + /// Creates an image source which shares resources with an original. + /// + STDMETHOD(CreateTransformedImageSource)( + _In_ ID2D1ImageSource *imageSource, + _In_ CONST D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES *properties, + _COM_Outptr_ ID2D1TransformedImageSource **transformedImageSource + ) PURE; + + COM_DECLSPEC_NOTHROW + HRESULT + CreateInk( + CONST D2D1_INK_POINT &startPoint, + _COM_Outptr_ ID2D1Ink **ink + ) + { + return CreateInk(&startPoint, ink); + } + + /// + /// Creates a new ink style. + /// + COM_DECLSPEC_NOTHROW + HRESULT + CreateInkStyle( + CONST D2D1_INK_STYLE_PROPERTIES &inkStyleProperties, + _COM_Outptr_ ID2D1InkStyle **inkStyle + ) + { + return CreateInkStyle(&inkStyleProperties, inkStyle); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateImageSourceFromWic( + _In_ IWICBitmapSource *wicBitmapSource, + D2D1_IMAGE_SOURCE_LOADING_OPTIONS loadingOptions, + _COM_Outptr_ ID2D1ImageSourceFromWic **imageSource + ) + { + return CreateImageSourceFromWic(wicBitmapSource, loadingOptions, D2D1_ALPHA_MODE_UNKNOWN, imageSource); + } + + COM_DECLSPEC_NOTHROW + HRESULT + CreateImageSourceFromWic( + _In_ IWICBitmapSource *wicBitmapSource, + _COM_Outptr_ ID2D1ImageSourceFromWic **imageSource + ) + { + return CreateImageSourceFromWic(wicBitmapSource, D2D1_IMAGE_SOURCE_LOADING_OPTIONS_NONE, D2D1_ALPHA_MODE_UNKNOWN, imageSource); + } + + /// + /// Draw a metafile to the device context. + /// + COM_DECLSPEC_NOTHROW + void + DrawGdiMetafile( + _In_ ID2D1GdiMetafile *gdiMetafile, + CONST D2D1_RECT_F &destinationRectangle, + CONST D2D1_RECT_F &sourceRectangle + ) + { + return DrawGdiMetafile(gdiMetafile, &destinationRectangle, &sourceRectangle); + } + + /// + /// Draw a metafile to the device context. + /// + COM_DECLSPEC_NOTHROW + void + DrawGdiMetafile( + _In_ ID2D1GdiMetafile *gdiMetafile, + CONST D2D1_RECT_F &destinationRectangle, + _In_ CONST D2D1_RECT_F *sourceRectangle = NULL + ) + { + return DrawGdiMetafile(gdiMetafile, &destinationRectangle, sourceRectangle); + } +}; // interface ID2D1DeviceContext2 + + +/// +/// Represents a resource domain whose objects and device contexts can be used +/// together. This interface performs all the same functions as the existing +/// ID2D1Device1 interface. It also enables the creation of ID2D1DeviceContext2 +/// objects. +/// +interface DX_DECLARE_INTERFACE("a44472e1-8dfb-4e60-8492-6e2861c9ca8b") ID2D1Device2 : public ID2D1Device1 +{ + + /// + /// Creates a new device context with no initially assigned target. + /// + STDMETHOD(CreateDeviceContext)( + D2D1_DEVICE_CONTEXT_OPTIONS options, + _COM_Outptr_ ID2D1DeviceContext2 **deviceContext2 + ) PURE; + + using ID2D1Device1::CreateDeviceContext; + + using ID2D1Device::CreateDeviceContext; + + /// + /// Flush all device contexts that reference a given bitmap. + /// + STDMETHOD_(void, FlushDeviceContexts)( + _In_ ID2D1Bitmap *bitmap + ) PURE; + + /// + /// Returns the DXGI device associated with this D2D device. + /// + STDMETHOD(GetDxgiDevice)( + _COM_Outptr_ IDXGIDevice **dxgiDevice + ) PURE; +}; // interface ID2D1Device2 + + +/// +/// Creates Direct2D resources. This interface also enables the creation of +/// ID2D1Device2 objects. +/// +interface DX_DECLARE_INTERFACE("0869759f-4f00-413f-b03e-2bda45404d0f") ID2D1Factory3 : public ID2D1Factory2 +{ + + /// + /// This creates a new Direct2D device from the given IDXGIDevice. + /// + STDMETHOD(CreateDevice)( + _In_ IDXGIDevice *dxgiDevice, + _COM_Outptr_ ID2D1Device2 **d2dDevice2 + ) PURE; + + using ID2D1Factory2::CreateDevice; + + using ID2D1Factory1::CreateDevice; +}; // interface ID2D1Factory3 + + +/// +/// This interface performs all the same functions as the existing ID2D1CommandSink1 +/// interface. It also enables access to ink rendering and gradient mesh rendering. +/// +interface DX_DECLARE_INTERFACE("3bab440e-417e-47df-a2e2-bc0be6a00916") ID2D1CommandSink2 : public ID2D1CommandSink1 +{ + + STDMETHOD(DrawInk)( + _In_ ID2D1Ink *ink, + _In_ ID2D1Brush *brush, + _In_opt_ ID2D1InkStyle *inkStyle + ) PURE; + + STDMETHOD(DrawGradientMesh)( + _In_ ID2D1GradientMesh *gradientMesh + ) PURE; + + STDMETHOD(DrawGdiMetafile)( + _In_ ID2D1GdiMetafile *gdiMetafile, + _In_opt_ CONST D2D1_RECT_F *destinationRectangle, + _In_opt_ CONST D2D1_RECT_F *sourceRectangle + ) PURE; + + using ID2D1CommandSink::DrawGdiMetafile; +}; // interface ID2D1CommandSink2 + + +/// +/// Interface encapsulating a GDI/GDI+ metafile. +/// +interface DX_DECLARE_INTERFACE("2e69f9e8-dd3f-4bf9-95ba-c04f49d788df") ID2D1GdiMetafile1 : public ID2D1GdiMetafile +{ + + /// + /// Returns the DPI reported by the metafile. + /// + STDMETHOD(GetDpi)( + _Out_ FLOAT *dpiX, + _Out_ FLOAT *dpiY + ) PURE; + + /// + /// Gets the bounds (in DIPs) of the metafile (as specified by the frame rect + /// declared in the metafile). + /// + STDMETHOD(GetSourceBounds)( + _Out_ D2D1_RECT_F *bounds + ) PURE; +}; // interface ID2D1GdiMetafile1 + + +/// +/// User-implementable interface for introspecting on a metafile. +/// +interface DX_DECLARE_INTERFACE("fd0ecb6b-91e6-411e-8655-395e760f91b4") ID2D1GdiMetafileSink1 : public ID2D1GdiMetafileSink +{ + + /// + /// Callback for examining a metafile record. + /// + STDMETHOD(ProcessRecord)( + DWORD recordType, + _In_opt_ CONST void *recordData, + DWORD recordDataSize, + UINT32 flags + ) PURE; + + using ID2D1GdiMetafileSink::ProcessRecord; +}; // interface ID2D1GdiMetafileSink1 + + +#if NTDDI_VERSION >= NTDDI_WIN10_TH2 + +interface DX_DECLARE_INTERFACE("4dc583bf-3a10-438a-8722-e9765224f1f1") ID2D1SpriteBatch : public ID2D1Resource +{ + + /// + /// Adds sprites to the end of the sprite batch. + /// + STDMETHOD(AddSprites)( + UINT32 spriteCount, + _In_reads_bytes_(sizeof(D2D1_RECT_F) + (spriteCount - 1) * destinationRectanglesStride) CONST D2D1_RECT_F *destinationRectangles, + _In_reads_bytes_opt_(sizeof(D2D1_RECT_U) + (spriteCount - 1) * sourceRectanglesStride) CONST D2D1_RECT_U *sourceRectangles = NULL, + _In_reads_bytes_opt_(sizeof(D2D1_COLOR_F) + (spriteCount - 1) * colorsStride) CONST D2D1_COLOR_F *colors = NULL, + _In_reads_bytes_opt_(sizeof(D2D1_MATRIX_3X2_F) + (spriteCount - 1) * transformsStride) CONST D2D1_MATRIX_3X2_F *transforms = NULL, + UINT32 destinationRectanglesStride = sizeof(D2D1_RECT_F), + UINT32 sourceRectanglesStride = sizeof(D2D1_RECT_U), + UINT32 colorsStride = sizeof(D2D1_COLOR_F), + UINT32 transformsStride = sizeof(D2D1_MATRIX_3X2_F) + ) PURE; + + /// + /// Set properties for existing sprites. All properties not specified are + /// unmodified. + /// + STDMETHOD(SetSprites)( + UINT32 startIndex, + UINT32 spriteCount, + _In_reads_bytes_opt_(sizeof(D2D1_RECT_F) + (spriteCount - 1) * destinationRectanglesStride) CONST D2D1_RECT_F *destinationRectangles = NULL, + _In_reads_bytes_opt_(sizeof(D2D1_RECT_U) + (spriteCount - 1) * sourceRectanglesStride) CONST D2D1_RECT_U *sourceRectangles = NULL, + _In_reads_bytes_opt_(sizeof(D2D1_COLOR_F) + (spriteCount - 1) * colorsStride) CONST D2D1_COLOR_F *colors = NULL, + _In_reads_bytes_opt_(sizeof(D2D1_MATRIX_3X2_F) + (spriteCount - 1) * transformsStride) CONST D2D1_MATRIX_3X2_F *transforms = NULL, + UINT32 destinationRectanglesStride = sizeof(D2D1_RECT_F), + UINT32 sourceRectanglesStride = sizeof(D2D1_RECT_U), + UINT32 colorsStride = sizeof(D2D1_COLOR_F), + UINT32 transformsStride = sizeof(D2D1_MATRIX_3X2_F) + ) PURE; + + /// + /// Retrieves sprite properties. + /// + STDMETHOD(GetSprites)( + UINT32 startIndex, + UINT32 spriteCount, + _Out_writes_opt_(spriteCount) D2D1_RECT_F *destinationRectangles = NULL, + _Out_writes_opt_(spriteCount) D2D1_RECT_U *sourceRectangles = NULL, + _Out_writes_opt_(spriteCount) D2D1_COLOR_F *colors = NULL, + _Out_writes_opt_(spriteCount) D2D1_MATRIX_3X2_F *transforms = NULL + ) CONST PURE; + + /// + /// Retrieves the number of sprites in the sprite batch. + /// + STDMETHOD_(UINT32, GetSpriteCount)( + ) CONST PURE; + + /// + /// Removes all sprites from the sprite batch. + /// + STDMETHOD_(void, Clear)( + ) PURE; +}; // interface ID2D1SpriteBatch + + +interface DX_DECLARE_INTERFACE("235a7496-8351-414c-bcd4-6672ab2d8e00") ID2D1DeviceContext3 : public ID2D1DeviceContext2 +{ + + /// + /// Creates a new sprite batch. + /// + STDMETHOD(CreateSpriteBatch)( + _COM_Outptr_ ID2D1SpriteBatch **spriteBatch + ) PURE; + + /// + /// Draws sprites in a sprite batch. + /// + STDMETHOD_(void, DrawSpriteBatch)( + _In_ ID2D1SpriteBatch *spriteBatch, + UINT32 startIndex, + UINT32 spriteCount, + _In_ ID2D1Bitmap *bitmap, + D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR, + D2D1_SPRITE_OPTIONS spriteOptions = D2D1_SPRITE_OPTIONS_NONE + ) PURE; + + /// + /// Draws all sprites in a sprite batch. + /// + COM_DECLSPEC_NOTHROW + void + DrawSpriteBatch( + _In_ ID2D1SpriteBatch *spriteBatch, + _In_ ID2D1Bitmap *bitmap, + D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR, + D2D1_SPRITE_OPTIONS spriteOptions = D2D1_SPRITE_OPTIONS_NONE + ) + { + return DrawSpriteBatch(spriteBatch, 0, spriteBatch->GetSpriteCount(), bitmap, interpolationMode, spriteOptions); + } +}; // interface ID2D1DeviceContext3 + + +interface DX_DECLARE_INTERFACE("852f2087-802c-4037-ab60-ff2e7ee6fc01") ID2D1Device3 : public ID2D1Device2 +{ + + /// + /// Creates a new device context with no initially assigned target. + /// + STDMETHOD(CreateDeviceContext)( + D2D1_DEVICE_CONTEXT_OPTIONS options, + _COM_Outptr_ ID2D1DeviceContext3 **deviceContext3 + ) PURE; + + using ID2D1Device2::CreateDeviceContext; + + using ID2D1Device1::CreateDeviceContext; + + using ID2D1Device::CreateDeviceContext; +}; // interface ID2D1Device3 + + +/// +/// Creates Direct2D resources. This interface also enables the creation of +/// ID2D1Device3 objects. +/// +interface DX_DECLARE_INTERFACE("bd4ec2d2-0662-4bee-ba8e-6f29f032e096") ID2D1Factory4 : public ID2D1Factory3 +{ + + /// + /// This creates a new Direct2D device from the given IDXGIDevice. + /// + STDMETHOD(CreateDevice)( + _In_ IDXGIDevice *dxgiDevice, + _COM_Outptr_ ID2D1Device3 **d2dDevice3 + ) PURE; + + using ID2D1Factory3::CreateDevice; + + using ID2D1Factory2::CreateDevice; + + using ID2D1Factory1::CreateDevice; +}; // interface ID2D1Factory4 + + +interface DX_DECLARE_INTERFACE("18079135-4cf3-4868-bc8e-06067e6d242d") ID2D1CommandSink3 : public ID2D1CommandSink2 +{ + + STDMETHOD(DrawSpriteBatch)( + _In_ ID2D1SpriteBatch *spriteBatch, + UINT32 startIndex, + UINT32 spriteCount, + _In_ ID2D1Bitmap *bitmap, + D2D1_BITMAP_INTERPOLATION_MODE interpolationMode, + D2D1_SPRITE_OPTIONS spriteOptions + ) PURE; +}; // interface ID2D1CommandSink3 + + +#endif // #if NTDDI_VERSION >= NTDDI_WIN10_TH2 +#if NTDDI_VERSION >= NTDDI_WIN10_RS1 + +/// +/// This object supplies the values for context-fill, context-stroke, and +/// context-value that are used when rendering SVG glyphs. +/// +interface DX_DECLARE_INTERFACE("af671749-d241-4db8-8e41-dcc2e5c1a438") ID2D1SvgGlyphStyle : public ID2D1Resource +{ + + /// + /// Provides values to an SVG glyph for fill. The brush with opacity set to 1 is + /// used as the 'context-fill'. The opacity of the brush is used as the + /// 'context-fill-opacity' value. + /// + /// A null brush will cause the context-fill value to come from + /// the defaultFillBrush. If the defaultFillBrush is also null, the context-fill + /// value will be 'none'. + STDMETHOD(SetFill)( + _In_opt_ ID2D1Brush *brush + ) PURE; + + /// + /// Returns the requested fill parameters. + /// + STDMETHOD_(void, GetFill)( + _Outptr_result_maybenull_ ID2D1Brush **brush + ) PURE; + + /// + /// Provides values to an SVG glyph for stroke properties. The brush with opacity + /// set to 1 is used as the 'context-stroke'. The opacity of the brush is used as + /// the 'context-stroke-opacity' value. + /// + /// A null brush will cause the context-stroke value to be + /// 'none'. + /// Specifies the 'context-value' for the 'stroke-width' + /// property. + /// Specifies the 'context-value' for the 'stroke-dasharray' + /// property. A null value will cause the stroke-dasharray to be set to 'none'. + /// + /// Specifies the 'context-value' for the + /// 'stroke-dashoffset' property. + STDMETHOD(SetStroke)( + _In_opt_ ID2D1Brush *brush, + FLOAT strokeWidth = 1.0f, + _In_reads_opt_(dashesCount) CONST FLOAT *dashes = NULL, + UINT32 dashesCount = 0, + FLOAT dashOffset = 1.0f + ) PURE; + + /// + /// Returns the number of dashes in the dash array. + /// + STDMETHOD_(UINT32, GetStrokeDashesCount)( + ) PURE; + + /// + /// Returns the requested stroke parameters. + /// + STDMETHOD_(void, GetStroke)( + _Outptr_opt_result_maybenull_ ID2D1Brush **brush, + _Out_opt_ FLOAT *strokeWidth = NULL, + _Out_writes_opt_(dashesCount) FLOAT *dashes = NULL, + UINT32 dashesCount = 0, + _Out_opt_ FLOAT *dashOffset = NULL + ) PURE; +}; // interface ID2D1SvgGlyphStyle + + +interface DX_DECLARE_INTERFACE("8c427831-3d90-4476-b647-c4fae349e4db") ID2D1DeviceContext4 : public ID2D1DeviceContext3 +{ + + /// + /// Creates an SVG glyph style object. + /// + STDMETHOD(CreateSvgGlyphStyle)( + _COM_Outptr_ ID2D1SvgGlyphStyle **svgGlyphStyle + ) PURE; + + /// + /// Draws the text within the given layout rectangle. By default, this method + /// performs baseline snapping and renders color versions of glyphs in color fonts. + /// + /// Object used to style SVG glyphs. + /// The index used to select a color palette within + /// a color font. + STDMETHOD_(void, DrawText)( + _In_reads_(stringLength) CONST WCHAR *string, + UINT32 stringLength, + _In_ IDWriteTextFormat *textFormat, + _In_ CONST D2D1_RECT_F *layoutRect, + _In_opt_ ID2D1Brush *defaultFillBrush, + _In_opt_ ID2D1SvgGlyphStyle *svgGlyphStyle, + UINT32 colorPaletteIndex = 0, + D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT, + DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL + ) PURE; + + using ID2D1RenderTarget::DrawText; + + /// + /// Draw a text layout object. If the layout is not subsequently changed, this can + /// be more efficient than DrawText when drawing the same layout repeatedly. + /// + /// Object used to style SVG glyphs. + /// The index used to select a color palette within + /// a color font. + /// The specified text options. If D2D1_DRAW_TEXT_OPTIONS_CLIP + /// is used, the text is clipped to the layout bounds. These bounds are derived from + /// the origin and the layout bounds of the corresponding IDWriteTextLayout object. + /// + STDMETHOD_(void, DrawTextLayout)( + D2D1_POINT_2F origin, + _In_ IDWriteTextLayout *textLayout, + _In_opt_ ID2D1Brush *defaultFillBrush, + _In_opt_ ID2D1SvgGlyphStyle *svgGlyphStyle, + UINT32 colorPaletteIndex = 0, + D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT + ) PURE; + + using ID2D1RenderTarget::DrawTextLayout; + + /// + /// Draws a color glyph run using one (and only one) of the bitmap formats- + /// DWRITE_GLYPH_IMAGE_FORMATS_PNG, DWRITE_GLYPH_IMAGE_FORMATS_JPEG, + /// DWRITE_GLYPH_IMAGE_FORMATS_TIFF, or + /// DWRITE_GLYPH_IMAGE_FORMATS_PREMULTIPLIED_B8G8R8A8. + /// + STDMETHOD_(void, DrawColorBitmapGlyphRun)( + DWRITE_GLYPH_IMAGE_FORMATS glyphImageFormat, + D2D1_POINT_2F baselineOrigin, + _In_ CONST DWRITE_GLYPH_RUN *glyphRun, + DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL, + D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION bitmapSnapOption = D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION_DEFAULT + ) PURE; + + /// + /// Draws a color glyph run that has the format of DWRITE_GLYPH_IMAGE_FORMATS_SVG. + /// + /// Object used to style SVG glyphs. + /// The index used to select a color palette within + /// a color font. Note that this not the same as the paletteIndex in the + /// DWRITE_COLOR_GLYPH_RUN struct, which is not relevant for SVG glyphs. + STDMETHOD_(void, DrawSvgGlyphRun)( + D2D1_POINT_2F baselineOrigin, + _In_ CONST DWRITE_GLYPH_RUN *glyphRun, + _In_opt_ ID2D1Brush *defaultFillBrush = NULL, + _In_opt_ ID2D1SvgGlyphStyle *svgGlyphStyle = NULL, + UINT32 colorPaletteIndex = 0, + DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL + ) PURE; + + /// + /// Retrieves an image of the color bitmap glyph from the color glyph cache. If the + /// cache does not already contain the requested resource, it will be created. This + /// method may be used to extend the lifetime of a glyph image even after it is + /// evicted from the color glyph cache. + /// + /// The specified font size affects the choice of which + /// bitmap to use from the font. It also affects the output glyphTransform, causing + /// it to properly scale the glyph. + /// Output transform, which transforms from the glyph's + /// space to the same output space as the worldTransform. This includes the input + /// glyphOrigin, the glyph's offset from the glyphOrigin, and any other required + /// transformations. + STDMETHOD(GetColorBitmapGlyphImage)( + DWRITE_GLYPH_IMAGE_FORMATS glyphImageFormat, + D2D1_POINT_2F glyphOrigin, + _In_ IDWriteFontFace *fontFace, + FLOAT fontEmSize, + UINT16 glyphIndex, + BOOL isSideways, + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + FLOAT dpiX, + FLOAT dpiY, + _Out_ D2D1_MATRIX_3X2_F *glyphTransform, + _COM_Outptr_ ID2D1Image **glyphImage + ) PURE; + + /// + /// Retrieves an image of the SVG glyph from the color glyph cache. If the cache + /// does not already contain the requested resource, it will be created. This method + /// may be used to extend the lifetime of a glyph image even after it is evicted + /// from the color glyph cache. + /// + /// The specified font size affects the output + /// glyphTransform, causing it to properly scale the glyph. + /// Object used to style SVG glyphs. + /// The index used to select a color palette within + /// a color font. Note that this not the same as the paletteIndex in the + /// DWRITE_COLOR_GLYPH_RUN struct, which is not relevant for SVG glyphs. + /// Output transform, which transforms from the glyph's + /// space to the same output space as the worldTransform. This includes the input + /// glyphOrigin, the glyph's offset from the glyphOrigin, and any other required + /// transformations. + STDMETHOD(GetSvgGlyphImage)( + D2D1_POINT_2F glyphOrigin, + _In_ IDWriteFontFace *fontFace, + FLOAT fontEmSize, + UINT16 glyphIndex, + BOOL isSideways, + _In_opt_ CONST D2D1_MATRIX_3X2_F *worldTransform, + _In_opt_ ID2D1Brush *defaultFillBrush, + _In_opt_ ID2D1SvgGlyphStyle *svgGlyphStyle, + UINT32 colorPaletteIndex, + _Out_ D2D1_MATRIX_3X2_F *glyphTransform, + _COM_Outptr_ ID2D1CommandList **glyphImage + ) PURE; + + /// + /// Draws the text within the given layout rectangle. By default, this method + /// performs baseline snapping and renders color versions of glyphs in color fonts. + /// + /// Object used to style SVG glyphs. + /// The index used to select a color palette within + /// a color font. + COM_DECLSPEC_NOTHROW + void + DrawText( + _In_reads_(stringLength) CONST WCHAR *string, + UINT32 stringLength, + _In_ IDWriteTextFormat *textFormat, + CONST D2D1_RECT_F &layoutRect, + _In_opt_ ID2D1Brush *defaultFillBrush, + _In_opt_ ID2D1SvgGlyphStyle *svgGlyphStyle, + UINT32 colorPaletteIndex = 0, + D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT, + DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL + ) + { + return DrawText(string, stringLength, textFormat, &layoutRect, defaultFillBrush, svgGlyphStyle, colorPaletteIndex, options, measuringMode); + } +}; // interface ID2D1DeviceContext4 + + +interface DX_DECLARE_INTERFACE("d7bdb159-5683-4a46-bc9c-72dc720b858b") ID2D1Device4 : public ID2D1Device3 +{ + + /// + /// Creates a new device context with no initially assigned target. + /// + STDMETHOD(CreateDeviceContext)( + D2D1_DEVICE_CONTEXT_OPTIONS options, + _COM_Outptr_ ID2D1DeviceContext4 **deviceContext4 + ) PURE; + + using ID2D1Device3::CreateDeviceContext; + + using ID2D1Device2::CreateDeviceContext; + + using ID2D1Device1::CreateDeviceContext; + + using ID2D1Device::CreateDeviceContext; + + /// + /// Sets the maximum capacity of the color glyph cache. This cache is used to store + /// color bitmap glyphs and SVG glyphs, enabling faster performance if the same + /// glyphs are needed again. If the application still references a glyph using + /// GetColorBitmapGlyphImage or GetSvgGlyphImage after it has been evicted, this + /// glyph does not count toward the cache capacity. + /// + STDMETHOD_(void, SetMaximumColorGlyphCacheMemory)( + UINT64 maximumInBytes + ) PURE; + + /// + /// Gets the maximum capacity of the color glyph cache. + /// + STDMETHOD_(UINT64, GetMaximumColorGlyphCacheMemory)( + ) CONST PURE; +}; // interface ID2D1Device4 + + +/// +/// Creates Direct2D resources. This interface also enables the creation of +/// ID2D1Device4 objects. +/// +interface DX_DECLARE_INTERFACE("c4349994-838e-4b0f-8cab-44997d9eeacc") ID2D1Factory5 : public ID2D1Factory4 +{ + + /// + /// This creates a new Direct2D device from the given IDXGIDevice. + /// + STDMETHOD(CreateDevice)( + _In_ IDXGIDevice *dxgiDevice, + _COM_Outptr_ ID2D1Device4 **d2dDevice4 + ) PURE; + + using ID2D1Factory4::CreateDevice; + + using ID2D1Factory3::CreateDevice; + + using ID2D1Factory2::CreateDevice; + + using ID2D1Factory1::CreateDevice; +}; // interface ID2D1Factory5 + + +#endif // #if NTDDI_VERSION >= NTDDI_WIN10_RS1 +#if NTDDI_VERSION >= NTDDI_WIN10_RS2 + +interface DX_DECLARE_INTERFACE("c78a6519-40d6-4218-b2de-beeeb744bb3e") ID2D1CommandSink4 : public ID2D1CommandSink3 +{ + + /// + /// A new function to set blend mode that respects the new MAX blend. + /// + /// Implementers of SetPrimitiveBlend2 should expect and handle blend mode: + /// D2D1_PRIMITIVE_BLEND_MAX + /// + /// Implementers of SetPrimitiveBlend1 should expect and handle blend modes: + /// D2D1_PRIMITIVE_BLEND_MIN and D2D1_PRIMITIVE_BLEND_ADD + /// + /// Implementers of SetPrimitiveBlend should expect and handle blend modes: + /// D2D1_PRIMITIVE_BLEND_SOURCE_OVER and D2D1_PRIMITIVE_BLEND_COPY + /// + STDMETHOD(SetPrimitiveBlend2)( + D2D1_PRIMITIVE_BLEND primitiveBlend + ) PURE; +}; // interface ID2D1CommandSink4 + + +/// +/// Represents a color context to be used with the Color Management Effect. +/// +interface DX_DECLARE_INTERFACE("1ab42875-c57f-4be9-bd85-9cd78d6f55ee") ID2D1ColorContext1 : public ID2D1ColorContext +{ + + /// + /// Retrieves the color context type. + /// + STDMETHOD_(D2D1_COLOR_CONTEXT_TYPE, GetColorContextType)( + ) CONST PURE; + + /// + /// Retrieves the DXGI color space of this context. Returns DXGI_COLOR_SPACE_CUSTOM + /// when color context type is ICC. + /// + STDMETHOD_(DXGI_COLOR_SPACE_TYPE, GetDXGIColorSpace)( + ) CONST PURE; + + /// + /// Retrieves a set simple color profile. + /// + STDMETHOD(GetSimpleColorProfile)( + _Out_ D2D1_SIMPLE_COLOR_PROFILE *simpleProfile + ) CONST PURE; +}; // interface ID2D1ColorContext1 + + +interface DX_DECLARE_INTERFACE("7836d248-68cc-4df6-b9e8-de991bf62eb7") ID2D1DeviceContext5 : public ID2D1DeviceContext4 +{ + + /// + /// Creates an SVG document from a stream. + /// + /// An input stream containing the SVG XML document. If + /// null, an empty document is created. + /// Size of the initial viewport of the document. + /// When this method returns, contains a pointer to the + /// SVG document. + STDMETHOD(CreateSvgDocument)( + _In_opt_ IStream *inputXmlStream, + D2D1_SIZE_F viewportSize, + _COM_Outptr_ ID2D1SvgDocument **svgDocument + ) PURE; + + /// + /// Draw an SVG document. + /// + STDMETHOD_(void, DrawSvgDocument)( + _In_ ID2D1SvgDocument *svgDocument + ) PURE; + + /// + /// Creates a color context from a DXGI color space type. It is only valid to use + /// this with the Color Management Effect in 'Best' mode. + /// + STDMETHOD(CreateColorContextFromDxgiColorSpace)( + DXGI_COLOR_SPACE_TYPE colorSpace, + _COM_Outptr_ ID2D1ColorContext1 **colorContext + ) PURE; + + /// + /// Creates a color context from a simple color profile. It is only valid to use + /// this with the Color Management Effect in 'Best' mode. + /// + STDMETHOD(CreateColorContextFromSimpleColorProfile)( + _In_ CONST D2D1_SIMPLE_COLOR_PROFILE *simpleProfile, + _COM_Outptr_ ID2D1ColorContext1 **colorContext + ) PURE; + + /// + /// Creates a color context from a simple color profile. + /// + COM_DECLSPEC_NOTHROW + HRESULT + CreateColorContextFromSimpleColorProfile( + CONST D2D1_SIMPLE_COLOR_PROFILE &simpleProfile, + _COM_Outptr_ ID2D1ColorContext1 **colorContext + ) + { + return CreateColorContextFromSimpleColorProfile(&simpleProfile, colorContext); + } +}; // interface ID2D1DeviceContext5 + + +interface DX_DECLARE_INTERFACE("d55ba0a4-6405-4694-aef5-08ee1a4358b4") ID2D1Device5 : public ID2D1Device4 +{ + + /// + /// Creates a new device context with no initially assigned target. + /// + STDMETHOD(CreateDeviceContext)( + D2D1_DEVICE_CONTEXT_OPTIONS options, + _COM_Outptr_ ID2D1DeviceContext5 **deviceContext5 + ) PURE; + + using ID2D1Device4::CreateDeviceContext; + + using ID2D1Device3::CreateDeviceContext; + + using ID2D1Device2::CreateDeviceContext; + + using ID2D1Device1::CreateDeviceContext; + + using ID2D1Device::CreateDeviceContext; +}; // interface ID2D1Device5 + + +/// +/// Creates Direct2D resources. This interface also enables the creation of +/// ID2D1Device5 objects. +/// +interface DX_DECLARE_INTERFACE("f9976f46-f642-44c1-97ca-da32ea2a2635") ID2D1Factory6 : public ID2D1Factory5 +{ + + /// + /// This creates a new Direct2D device from the given IDXGIDevice. + /// + STDMETHOD(CreateDevice)( + _In_ IDXGIDevice *dxgiDevice, + _COM_Outptr_ ID2D1Device5 **d2dDevice5 + ) PURE; + + using ID2D1Factory5::CreateDevice; + + using ID2D1Factory4::CreateDevice; + + using ID2D1Factory3::CreateDevice; + + using ID2D1Factory2::CreateDevice; + + using ID2D1Factory1::CreateDevice; +}; // interface ID2D1Factory6 + + +#endif +#if NTDDI_VERSION >= NTDDI_WIN10_RS3 + +interface DX_DECLARE_INTERFACE("7047dd26-b1e7-44a7-959a-8349e2144fa8") ID2D1CommandSink5 : public ID2D1CommandSink4 +{ + + STDMETHOD(BlendImage)( + _In_ ID2D1Image *image, + D2D1_BLEND_MODE blendMode, + _In_opt_ CONST D2D1_POINT_2F *targetOffset, + _In_opt_ CONST D2D1_RECT_F *imageRectangle, + D2D1_INTERPOLATION_MODE interpolationMode + ) PURE; +}; // interface ID2D1CommandSink5 + + +interface DX_DECLARE_INTERFACE("985f7e37-4ed0-4a19-98a3-15b0edfde306") ID2D1DeviceContext6 : public ID2D1DeviceContext5 +{ + + /// + /// Draw an image to the device context. + /// + STDMETHOD_(void, BlendImage)( + _In_ ID2D1Image *image, + D2D1_BLEND_MODE blendMode, + _In_opt_ CONST D2D1_POINT_2F *targetOffset = NULL, + _In_opt_ CONST D2D1_RECT_F *imageRectangle = NULL, + D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR + ) PURE; +}; // interface ID2D1DeviceContext6 + + +interface DX_DECLARE_INTERFACE("7bfef914-2d75-4bad-be87-e18ddb077b6d") ID2D1Device6 : public ID2D1Device5 +{ + + /// + /// Creates a new device context with no initially assigned target. + /// + STDMETHOD(CreateDeviceContext)( + D2D1_DEVICE_CONTEXT_OPTIONS options, + _COM_Outptr_ ID2D1DeviceContext6 **deviceContext6 + ) PURE; + + using ID2D1Device5::CreateDeviceContext; + + using ID2D1Device4::CreateDeviceContext; + + using ID2D1Device3::CreateDeviceContext; + + using ID2D1Device2::CreateDeviceContext; + + using ID2D1Device1::CreateDeviceContext; + + using ID2D1Device::CreateDeviceContext; +}; // interface ID2D1Device6 + + +/// +/// Creates Direct2D resources. This interface also enables the creation of +/// ID2D1Device6 objects. +/// +interface DX_DECLARE_INTERFACE("bdc2bdd3-b96c-4de6-bdf7-99d4745454de") ID2D1Factory7 : public ID2D1Factory6 +{ + + /// + /// This creates a new Direct2D device from the given IDXGIDevice. + /// + STDMETHOD(CreateDevice)( + _In_ IDXGIDevice *dxgiDevice, + _COM_Outptr_ ID2D1Device6 **d2dDevice6 + ) PURE; + + using ID2D1Factory6::CreateDevice; + + using ID2D1Factory5::CreateDevice; + + using ID2D1Factory4::CreateDevice; + + using ID2D1Factory3::CreateDevice; + + using ID2D1Factory2::CreateDevice; + + using ID2D1Factory1::CreateDevice; +}; // interface ID2D1Factory7 + + +#endif + +#endif + + +#ifdef D2D_USE_C_DEFINITIONS + + +typedef interface ID2D1InkStyle ID2D1InkStyle; + +typedef interface ID2D1Ink ID2D1Ink; + +typedef interface ID2D1GradientMesh ID2D1GradientMesh; + +typedef interface ID2D1ImageSource ID2D1ImageSource; + +typedef interface ID2D1ImageSourceFromWic ID2D1ImageSourceFromWic; + +typedef interface ID2D1TransformedImageSource ID2D1TransformedImageSource; + +typedef interface ID2D1LookupTable3D ID2D1LookupTable3D; + +typedef interface ID2D1DeviceContext2 ID2D1DeviceContext2; + +typedef interface ID2D1Device2 ID2D1Device2; + +typedef interface ID2D1Factory3 ID2D1Factory3; + +typedef interface ID2D1CommandSink2 ID2D1CommandSink2; + +typedef interface ID2D1GdiMetafile1 ID2D1GdiMetafile1; + +typedef interface ID2D1GdiMetafileSink1 ID2D1GdiMetafileSink1; + +#endif + + +#ifdef __cplusplus +extern "C" +{ +#endif + +#if NTDDI_VERSION >= NTDDI_WINTHRESHOLD + void WINAPI + D2D1GetGradientMeshInteriorPointsFromCoonsPatch( + _In_ CONST D2D1_POINT_2F *pPoint0, + _In_ CONST D2D1_POINT_2F *pPoint1, + _In_ CONST D2D1_POINT_2F *pPoint2, + _In_ CONST D2D1_POINT_2F *pPoint3, + _In_ CONST D2D1_POINT_2F *pPoint4, + _In_ CONST D2D1_POINT_2F *pPoint5, + _In_ CONST D2D1_POINT_2F *pPoint6, + _In_ CONST D2D1_POINT_2F *pPoint7, + _In_ CONST D2D1_POINT_2F *pPoint8, + _In_ CONST D2D1_POINT_2F *pPoint9, + _In_ CONST D2D1_POINT_2F *pPoint10, + _In_ CONST D2D1_POINT_2F *pPoint11, + _Out_ D2D1_POINT_2F *pTensorPoint11, + _Out_ D2D1_POINT_2F *pTensorPoint12, + _Out_ D2D1_POINT_2F *pTensorPoint21, + _Out_ D2D1_POINT_2F *pTensorPoint22 + ); +#endif // #if NTDDI_VERSION >= NTDDI_WINTHRESHOLD + +#ifdef __cplusplus +} +#endif + + + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ +#include +#endif // #ifndef _D2D1_3_H_ diff --git a/gfx/include/dxsdk/d2d1_3helper.h b/gfx/include/dxsdk/d2d1_3helper.h new file mode 100644 index 0000000000..b5b5153cdd --- /dev/null +++ b/gfx/include/dxsdk/d2d1_3helper.h @@ -0,0 +1,260 @@ + +/*=========================================================================*\ + + Copyright (c) Microsoft Corporation. All rights reserved. + + File: D2D1_3Helper.h + + Module Name: D2D + + Description: Helper files over the D2D interfaces and APIs. + +\*=========================================================================*/ + +#ifdef _MSC_VER +#pragma once +#endif // _MSC_VER + +#ifndef _D2D1_3HELPER_H_ +#define _D2D1_3HELPER_H_ + +#if NTDDI_VERSION >= NTDDI_WINTHRESHOLD + +#ifndef _D2D1_3_H_ +#include +#endif // #ifndef _D2D1_3_H_ + +#ifndef D2D_USE_C_DEFINITIONS + +/*#include */ + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + +namespace D2D1 +{ + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_GRADIENT_MESH_PATCH + GradientMeshPatch( + D2D1_POINT_2F point00, + D2D1_POINT_2F point01, + D2D1_POINT_2F point02, + D2D1_POINT_2F point03, + D2D1_POINT_2F point10, + D2D1_POINT_2F point11, + D2D1_POINT_2F point12, + D2D1_POINT_2F point13, + D2D1_POINT_2F point20, + D2D1_POINT_2F point21, + D2D1_POINT_2F point22, + D2D1_POINT_2F point23, + D2D1_POINT_2F point30, + D2D1_POINT_2F point31, + D2D1_POINT_2F point32, + D2D1_POINT_2F point33, + D2D1_COLOR_F color00, + D2D1_COLOR_F color03, + D2D1_COLOR_F color30, + D2D1_COLOR_F color33, + D2D1_PATCH_EDGE_MODE topEdgeMode, + D2D1_PATCH_EDGE_MODE leftEdgeMode, + D2D1_PATCH_EDGE_MODE bottomEdgeMode, + D2D1_PATCH_EDGE_MODE rightEdgeMode + ) + { + D2D1_GRADIENT_MESH_PATCH newPatch; + newPatch.point00 = point00; + newPatch.point01 = point01; + newPatch.point02 = point02; + newPatch.point03 = point03; + newPatch.point10 = point10; + newPatch.point11 = point11; + newPatch.point12 = point12; + newPatch.point13 = point13; + newPatch.point20 = point20; + newPatch.point21 = point21; + newPatch.point22 = point22; + newPatch.point23 = point23; + newPatch.point30 = point30; + newPatch.point31 = point31; + newPatch.point32 = point32; + newPatch.point33 = point33; + + newPatch.color00 = color00; + newPatch.color03 = color03; + newPatch.color30 = color30; + newPatch.color33 = color33; + + newPatch.topEdgeMode = topEdgeMode; + newPatch.leftEdgeMode = leftEdgeMode; + newPatch.bottomEdgeMode = bottomEdgeMode; + newPatch.rightEdgeMode = rightEdgeMode; + + return newPatch; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_GRADIENT_MESH_PATCH + GradientMeshPatchFromCoonsPatch( + D2D1_POINT_2F point0, + D2D1_POINT_2F point1, + D2D1_POINT_2F point2, + D2D1_POINT_2F point3, + D2D1_POINT_2F point4, + D2D1_POINT_2F point5, + D2D1_POINT_2F point6, + D2D1_POINT_2F point7, + D2D1_POINT_2F point8, + D2D1_POINT_2F point9, + D2D1_POINT_2F point10, + D2D1_POINT_2F point11, + D2D1_COLOR_F color0, + D2D1_COLOR_F color1, + D2D1_COLOR_F color2, + D2D1_COLOR_F color3, + D2D1_PATCH_EDGE_MODE topEdgeMode, + D2D1_PATCH_EDGE_MODE leftEdgeMode, + D2D1_PATCH_EDGE_MODE bottomEdgeMode, + D2D1_PATCH_EDGE_MODE rightEdgeMode + ) + { + D2D1_GRADIENT_MESH_PATCH newPatch; + newPatch.point00 = point0; + newPatch.point01 = point1; + newPatch.point02 = point2; + newPatch.point03 = point3; + newPatch.point13 = point4; + newPatch.point23 = point5; + newPatch.point33 = point6; + newPatch.point32 = point7; + newPatch.point31 = point8; + newPatch.point30 = point9; + newPatch.point20 = point10; + newPatch.point10 = point11; + + D2D1GetGradientMeshInteriorPointsFromCoonsPatch( + &point0, + &point1, + &point2, + &point3, + &point4, + &point5, + &point6, + &point7, + &point8, + &point9, + &point10, + &point11, + &newPatch.point11, + &newPatch.point12, + &newPatch.point21, + &newPatch.point22 + ); + + newPatch.color00 = color0; + newPatch.color03 = color1; + newPatch.color33 = color2; + newPatch.color30 = color3; + newPatch.topEdgeMode = topEdgeMode; + newPatch.leftEdgeMode = leftEdgeMode; + newPatch.bottomEdgeMode = bottomEdgeMode; + newPatch.rightEdgeMode = rightEdgeMode; + + return newPatch; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_INK_POINT + InkPoint( + const D2D1_POINT_2F &point, + FLOAT radius + ) + { + D2D1_INK_POINT inkPoint; + + inkPoint.x = point.x; + inkPoint.y = point.y; + inkPoint.radius = radius; + + return inkPoint; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_INK_BEZIER_SEGMENT + InkBezierSegment( + const D2D1_INK_POINT &point1, + const D2D1_INK_POINT &point2, + const D2D1_INK_POINT &point3 + ) + { + D2D1_INK_BEZIER_SEGMENT inkBezierSegment; + + inkBezierSegment.point1 = point1; + inkBezierSegment.point2 = point2; + inkBezierSegment.point3 = point3; + + return inkBezierSegment; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_INK_STYLE_PROPERTIES + InkStyleProperties( + D2D1_INK_NIB_SHAPE nibShape, + const D2D1_MATRIX_3X2_F &nibTransform + ) + { + D2D1_INK_STYLE_PROPERTIES inkStyleProperties; + + inkStyleProperties.nibShape = nibShape; + inkStyleProperties.nibTransform = nibTransform; + + return inkStyleProperties; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_RECT_U + InfiniteRectU() + { + D2D1_RECT_U rect = { 0u, 0u, UINT_MAX, UINT_MAX }; + + return rect; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_SIMPLE_COLOR_PROFILE + SimpleColorProfile( + const D2D1_POINT_2F &redPrimary, + const D2D1_POINT_2F &greenPrimary, + const D2D1_POINT_2F &bluePrimary, + const D2D1_GAMMA1 gamma, + const D2D1_POINT_2F &whitePointXZ + ) + { + D2D1_SIMPLE_COLOR_PROFILE simpleColorProfile; + + simpleColorProfile.redPrimary = redPrimary; + simpleColorProfile.greenPrimary = greenPrimary; + simpleColorProfile.bluePrimary = bluePrimary; + simpleColorProfile.gamma = gamma; + simpleColorProfile.whitePointXZ = whitePointXZ; + + return simpleColorProfile; + } +} // namespace D2D1 + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ + +#endif // #ifndef D2D_USE_C_DEFINITIONS + +#endif // #if NTDDI_VERSION >= NTDDI_WINTHRESHOLD + +#endif // #ifndef _D2D1_HELPER_H_ + diff --git a/gfx/include/dxsdk/d2d1effectauthor.h b/gfx/include/dxsdk/d2d1effectauthor.h new file mode 100644 index 0000000000..9b4dc7996a --- /dev/null +++ b/gfx/include/dxsdk/d2d1effectauthor.h @@ -0,0 +1,1084 @@ +//--------------------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// This file is automatically generated. Please do not edit it directly. +// +// File name: D2D1EffectAuthor.h +//--------------------------------------------------------------------------- +#ifdef _MSC_VER +#pragma once +#endif // #ifdef _MSC_VER + +#ifndef _D2D1_EFFECT_AUTHOR_H_ +#define _D2D1_EFFECT_AUTHOR_H_ + +#ifndef _D2D1_1_H_ +#include +#endif // #ifndef _D2D1_1_H_ + + +/// +/// Function pointer that sets a property on an effect. +/// +typedef HRESULT (CALLBACK *PD2D1_PROPERTY_SET_FUNCTION)( + _In_ IUnknown *effect, + _In_reads_(dataSize) const BYTE *data, + UINT32 dataSize + ); + +/// +/// Function pointer that gets a property from an effect. +/// +typedef HRESULT (CALLBACK *PD2D1_PROPERTY_GET_FUNCTION)( + _In_ const IUnknown *effect, + _Out_writes_opt_(dataSize) BYTE *data, + UINT32 dataSize, + _Out_opt_ UINT32 *actualSize + ); + +#ifndef D2D_USE_C_DEFINITIONS + +interface ID2D1EffectContext; +interface ID2D1TransformNode; + +#else + +typedef interface ID2D1EffectContext ID2D1EffectContext; +typedef interface ID2D1TransformNode ID2D1TransformNode; + +#endif + + +/// +/// Indicates what has changed since the last time the effect was asked to prepare +/// to render. +/// +typedef enum D2D1_CHANGE_TYPE +{ + + /// + /// Nothing has changed. + /// + D2D1_CHANGE_TYPE_NONE = 0, + + /// + /// The effect's properties have changed. + /// + D2D1_CHANGE_TYPE_PROPERTIES = 1, + + /// + /// The internal context has changed and should be inspected. + /// + D2D1_CHANGE_TYPE_CONTEXT = 2, + + /// + /// A new graph has been set due to a change in the input count. + /// + D2D1_CHANGE_TYPE_GRAPH = 3, + D2D1_CHANGE_TYPE_FORCE_DWORD = 0xffffffff + +} D2D1_CHANGE_TYPE; + +DEFINE_ENUM_FLAG_OPERATORS(D2D1_CHANGE_TYPE); + + +/// +/// Indicates options for drawing using a pixel shader. +/// +typedef enum D2D1_PIXEL_OPTIONS +{ + + /// + /// Default pixel processing. + /// + D2D1_PIXEL_OPTIONS_NONE = 0, + + /// + /// Indicates that the shader samples its inputs only at exactly the same scene + /// coordinate as the output pixel, and that it returns transparent black whenever + /// the input pixels are also transparent black. + /// + D2D1_PIXEL_OPTIONS_TRIVIAL_SAMPLING = 1, + D2D1_PIXEL_OPTIONS_FORCE_DWORD = 0xffffffff + +} D2D1_PIXEL_OPTIONS; + +DEFINE_ENUM_FLAG_OPERATORS(D2D1_PIXEL_OPTIONS); + + +/// +/// Indicates options for drawing custom vertices set by transforms. +/// +typedef enum D2D1_VERTEX_OPTIONS +{ + + /// + /// Default vertex processing. + /// + D2D1_VERTEX_OPTIONS_NONE = 0, + + /// + /// Indicates that the output rectangle does not need to be cleared before drawing + /// custom vertices. This must only be used by transforms whose custom vertices + /// completely cover their output rectangle. + /// + D2D1_VERTEX_OPTIONS_DO_NOT_CLEAR = 1, + + /// + /// Causes a depth buffer to be used while drawing custom vertices. This impacts + /// drawing behavior when primitives overlap one another. + /// + D2D1_VERTEX_OPTIONS_USE_DEPTH_BUFFER = 2, + + /// + /// Indicates that custom vertices do not form primitives which overlap one another. + /// + D2D1_VERTEX_OPTIONS_ASSUME_NO_OVERLAP = 4, + D2D1_VERTEX_OPTIONS_FORCE_DWORD = 0xffffffff + +} D2D1_VERTEX_OPTIONS; + +DEFINE_ENUM_FLAG_OPERATORS(D2D1_VERTEX_OPTIONS); + + +/// +/// Describes how a vertex buffer is to be managed. +/// +typedef enum D2D1_VERTEX_USAGE +{ + + /// + /// The vertex buffer content do not change frequently from frame to frame. + /// + D2D1_VERTEX_USAGE_STATIC = 0, + + /// + /// The vertex buffer is intended to be updated frequently. + /// + D2D1_VERTEX_USAGE_DYNAMIC = 1, + D2D1_VERTEX_USAGE_FORCE_DWORD = 0xffffffff + +} D2D1_VERTEX_USAGE; + + +/// +/// Describes a particular blend in the D2D1_BLEND_DESCRIPTION structure. +/// +typedef enum D2D1_BLEND_OPERATION +{ + D2D1_BLEND_OPERATION_ADD = 1, + D2D1_BLEND_OPERATION_SUBTRACT = 2, + D2D1_BLEND_OPERATION_REV_SUBTRACT = 3, + D2D1_BLEND_OPERATION_MIN = 4, + D2D1_BLEND_OPERATION_MAX = 5, + D2D1_BLEND_OPERATION_FORCE_DWORD = 0xffffffff + +} D2D1_BLEND_OPERATION; + + +/// +/// Describes a particular blend in the D2D1_BLEND_DESCRIPTION structure. +/// +typedef enum D2D1_BLEND +{ + D2D1_BLEND_ZERO = 1, + D2D1_BLEND_ONE = 2, + D2D1_BLEND_SRC_COLOR = 3, + D2D1_BLEND_INV_SRC_COLOR = 4, + D2D1_BLEND_SRC_ALPHA = 5, + D2D1_BLEND_INV_SRC_ALPHA = 6, + D2D1_BLEND_DEST_ALPHA = 7, + D2D1_BLEND_INV_DEST_ALPHA = 8, + D2D1_BLEND_DEST_COLOR = 9, + D2D1_BLEND_INV_DEST_COLOR = 10, + D2D1_BLEND_SRC_ALPHA_SAT = 11, + D2D1_BLEND_BLEND_FACTOR = 14, + D2D1_BLEND_INV_BLEND_FACTOR = 15, + D2D1_BLEND_FORCE_DWORD = 0xffffffff + +} D2D1_BLEND; + + +/// +/// Allows a caller to control the channel depth of a stage in the rendering +/// pipeline. +/// +typedef enum D2D1_CHANNEL_DEPTH +{ + D2D1_CHANNEL_DEPTH_DEFAULT = 0, + D2D1_CHANNEL_DEPTH_1 = 1, + D2D1_CHANNEL_DEPTH_4 = 4, + D2D1_CHANNEL_DEPTH_FORCE_DWORD = 0xffffffff + +} D2D1_CHANNEL_DEPTH; + + +/// +/// Represents filtering modes transforms may select to use on their input textures. +/// +typedef enum D2D1_FILTER +{ + D2D1_FILTER_MIN_MAG_MIP_POINT = 0x00, + D2D1_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x01, + D2D1_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x04, + D2D1_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x05, + D2D1_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x10, + D2D1_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x11, + D2D1_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x14, + D2D1_FILTER_MIN_MAG_MIP_LINEAR = 0x15, + D2D1_FILTER_ANISOTROPIC = 0x55, + D2D1_FILTER_FORCE_DWORD = 0xffffffff + +} D2D1_FILTER; + + +/// +/// Defines capabilities of the underlying D3D device which may be queried using +/// CheckFeatureSupport. +/// +typedef enum D2D1_FEATURE +{ + D2D1_FEATURE_DOUBLES = 0, + D2D1_FEATURE_D3D10_X_HARDWARE_OPTIONS = 1, + D2D1_FEATURE_FORCE_DWORD = 0xffffffff + +} D2D1_FEATURE; + + +/// +/// Defines a property binding to a function. The name must match the property +/// defined in the registration schema. +/// +typedef struct D2D1_PROPERTY_BINDING +{ + + /// + /// The name of the property. + /// + PCWSTR propertyName; + + /// + /// The function that will receive the data to set. + /// + PD2D1_PROPERTY_SET_FUNCTION setFunction; + + /// + /// The function that will be asked to write the output data. + /// + PD2D1_PROPERTY_GET_FUNCTION getFunction; + +} D2D1_PROPERTY_BINDING; + + +/// +/// This is used to define a resource texture when that resource texture is created. +/// +typedef struct D2D1_RESOURCE_TEXTURE_PROPERTIES +{ + _Field_size_(dimensions) CONST UINT32 *extents; + UINT32 dimensions; + D2D1_BUFFER_PRECISION bufferPrecision; + D2D1_CHANNEL_DEPTH channelDepth; + D2D1_FILTER filter; + _Field_size_(dimensions) CONST D2D1_EXTEND_MODE *extendModes; + +} D2D1_RESOURCE_TEXTURE_PROPERTIES; + + +/// +/// This defines a single element of the vertex layout. +/// +typedef struct D2D1_INPUT_ELEMENT_DESC +{ + PCSTR semanticName; + UINT32 semanticIndex; + DXGI_FORMAT format; + UINT32 inputSlot; + UINT32 alignedByteOffset; + +} D2D1_INPUT_ELEMENT_DESC; + + +// +// Set to alignedByteOffset within D2D1_INPUT_ELEMENT_DESC for elements that +// immediately follow preceding elements in memory +// +#define D2D1_APPEND_ALIGNED_ELEMENT ( 0xffffffff ) + + +/// +/// This defines the properties of a vertex buffer which uses the default vertex +/// layout. +/// +typedef struct D2D1_VERTEX_BUFFER_PROPERTIES +{ + UINT32 inputCount; + D2D1_VERTEX_USAGE usage; + _Field_size_opt_(byteWidth) CONST BYTE *data; + UINT32 byteWidth; + +} D2D1_VERTEX_BUFFER_PROPERTIES; + + +/// +/// This defines the input layout of vertices and the vertex shader which processes +/// them. +/// +typedef struct D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES +{ + _Field_size_(shaderBufferSize) CONST BYTE *shaderBufferWithInputSignature; + UINT32 shaderBufferSize; + _Field_size_opt_(elementCount) CONST D2D1_INPUT_ELEMENT_DESC *inputElements; + UINT32 elementCount; + UINT32 stride; + +} D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES; + + +/// +/// This defines the range of vertices from a vertex buffer to draw. +/// +typedef struct D2D1_VERTEX_RANGE +{ + UINT32 startVertex; + UINT32 vertexCount; + +} D2D1_VERTEX_RANGE; + + +/// +/// Blend description which configures a blend transform object. +/// +typedef struct D2D1_BLEND_DESCRIPTION +{ + D2D1_BLEND sourceBlend; + D2D1_BLEND destinationBlend; + D2D1_BLEND_OPERATION blendOperation; + D2D1_BLEND sourceBlendAlpha; + D2D1_BLEND destinationBlendAlpha; + D2D1_BLEND_OPERATION blendOperationAlpha; + FLOAT blendFactor[4]; + +} D2D1_BLEND_DESCRIPTION; + + +/// +/// Describes options transforms may select to use on their input textures. +/// +typedef struct D2D1_INPUT_DESCRIPTION +{ + D2D1_FILTER filter; + UINT32 levelOfDetailCount; + +} D2D1_INPUT_DESCRIPTION; + + +/// +/// Indicates whether shader support for doubles is present on the underlying +/// hardware. This may be populated using CheckFeatureSupport. +/// +typedef struct D2D1_FEATURE_DATA_DOUBLES +{ + BOOL doublePrecisionFloatShaderOps; + +} D2D1_FEATURE_DATA_DOUBLES; + + +/// +/// Indicates support for features which are optional on D3D10 feature levels. This +/// may be populated using CheckFeatureSupport. +/// +typedef struct D2D1_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS +{ + BOOL computeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x; + +} D2D1_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS; + + +EXTERN_C CONST IID IID_ID2D1VertexBuffer; +EXTERN_C CONST IID IID_ID2D1ResourceTexture; +EXTERN_C CONST IID IID_ID2D1RenderInfo; +EXTERN_C CONST IID IID_ID2D1DrawInfo; +EXTERN_C CONST IID IID_ID2D1ComputeInfo; +EXTERN_C CONST IID IID_ID2D1TransformNode; +EXTERN_C CONST IID IID_ID2D1TransformGraph; +EXTERN_C CONST IID IID_ID2D1Transform; +EXTERN_C CONST IID IID_ID2D1DrawTransform; +EXTERN_C CONST IID IID_ID2D1ComputeTransform; +EXTERN_C CONST IID IID_ID2D1AnalysisTransform; +EXTERN_C CONST IID IID_ID2D1SourceTransform; +EXTERN_C CONST IID IID_ID2D1ConcreteTransform; +EXTERN_C CONST IID IID_ID2D1BlendTransform; +EXTERN_C CONST IID IID_ID2D1BorderTransform; +EXTERN_C CONST IID IID_ID2D1OffsetTransform; +EXTERN_C CONST IID IID_ID2D1BoundsAdjustmentTransform; +EXTERN_C CONST IID IID_ID2D1EffectImpl; +EXTERN_C CONST IID IID_ID2D1EffectContext; + + +#ifndef D2D_USE_C_DEFINITIONS + + +/// +/// A transform uses this interface to write new vertices to a vertex buffer. +/// +interface DX_DECLARE_INTERFACE("9b8b1336-00a5-4668-92b7-ced5d8bf9b7b") ID2D1VertexBuffer : public IUnknown +{ + + STDMETHOD(Map)( + _Outptr_result_bytebuffer_(bufferSize) BYTE **data, + UINT32 bufferSize + ) PURE; + + STDMETHOD(Unmap)( + ) PURE; +}; // interface ID2D1VertexBuffer + + +interface DX_DECLARE_INTERFACE("688d15c3-02b0-438d-b13a-d1b44c32c39a") ID2D1ResourceTexture : public IUnknown +{ + + /// + /// Update the vertex text. + /// + STDMETHOD(Update)( + _In_reads_opt_(dimensions) CONST UINT32 *minimumExtents, + _In_reads_opt_(dimensions) CONST UINT32 *maximimumExtents, + _In_reads_opt_(dimensions - 1) CONST UINT32 *strides, + UINT32 dimensions, + _In_reads_(dataCount) CONST BYTE *data, + UINT32 dataCount + ) PURE; +}; // interface ID2D1ResourceTexture + + +/// +/// A transform uses this interface to specify how to render a particular pass in +/// D2D. +/// +interface DX_DECLARE_INTERFACE("519ae1bd-d19a-420d-b849-364f594776b7") ID2D1RenderInfo : public IUnknown +{ + + /// + /// Sets options for sampling the specified image input + /// + STDMETHOD(SetInputDescription)( + UINT32 inputIndex, + D2D1_INPUT_DESCRIPTION inputDescription + ) PURE; + + /// + /// Controls the output precision and channel-depth for the associated transform. + /// + STDMETHOD(SetOutputBuffer)( + D2D1_BUFFER_PRECISION bufferPrecision, + D2D1_CHANNEL_DEPTH channelDepth + ) PURE; + + /// + /// Controls whether the output of the associated transform is cached. + /// + STDMETHOD_(void, SetCached)( + BOOL isCached + ) PURE; + + /// + /// Provides a hint of the approximate shader instruction count per pixel. If + /// provided, it may improve performance when processing large images. Instructions + /// should be counted multiple times if occurring within loops. + /// + STDMETHOD_(void, SetInstructionCountHint)( + UINT32 instructionCount + ) PURE; +}; // interface ID2D1RenderInfo + + +/// +/// A transform uses this interface to specify how to render a particular pass using +/// pixel and vertex shaders. +/// +interface DX_DECLARE_INTERFACE("693ce632-7f2f-45de-93fe-18d88b37aa21") ID2D1DrawInfo : public ID2D1RenderInfo +{ + + /// + /// Set the constant buffer for this transform's pixel shader. + /// + STDMETHOD(SetPixelShaderConstantBuffer)( + _In_reads_(bufferCount) CONST BYTE *buffer, + UINT32 bufferCount + ) PURE; + + /// + /// Sets the resource texture corresponding to the given shader texture index. + /// + STDMETHOD(SetResourceTexture)( + UINT32 textureIndex, + _In_ ID2D1ResourceTexture *resourceTexture + ) PURE; + + /// + /// Set the constant buffer for this transform's vertex shader. + /// + STDMETHOD(SetVertexShaderConstantBuffer)( + _In_reads_(bufferCount) CONST BYTE *buffer, + UINT32 bufferCount + ) PURE; + + /// + /// Set the shader instructions for this transform. + /// + STDMETHOD(SetPixelShader)( + _In_ REFGUID shaderId, + D2D1_PIXEL_OPTIONS pixelOptions = D2D1_PIXEL_OPTIONS_NONE + ) PURE; + + /// + /// Set custom vertices for the associated transform. A blend mode if + /// foreground-over will be used if blendDescription is NULL. + /// + STDMETHOD(SetVertexProcessing)( + _In_opt_ ID2D1VertexBuffer *vertexBuffer, + D2D1_VERTEX_OPTIONS vertexOptions, + _In_opt_ CONST D2D1_BLEND_DESCRIPTION *blendDescription = NULL, + _In_opt_ CONST D2D1_VERTEX_RANGE *vertexRange = NULL, + _In_opt_ CONST GUID *vertexShader = NULL + ) PURE; +}; // interface ID2D1DrawInfo + + +/// +/// A transform uses this interface to specify how to render a particular pass using +/// compute shader. +/// +interface DX_DECLARE_INTERFACE("5598b14b-9fd7-48b7-9bdb-8f0964eb38bc") ID2D1ComputeInfo : public ID2D1RenderInfo +{ + + /// + /// Set the constant buffer for this transform. + /// + STDMETHOD(SetComputeShaderConstantBuffer)( + _In_reads_(bufferCount) CONST BYTE *buffer, + UINT32 bufferCount + ) PURE; + + /// + /// Set the shader instructions for this transform. + /// + STDMETHOD(SetComputeShader)( + _In_ REFGUID shaderId + ) PURE; + + /// + /// Sets the resource texture corresponding to the given shader texture index. + /// + STDMETHOD(SetResourceTexture)( + UINT32 textureIndex, + _In_ ID2D1ResourceTexture *resourceTexture + ) PURE; +}; // interface ID2D1ComputeInfo + + +/// +/// A base object which can be inserted into a transform graph. +/// +interface DX_DECLARE_INTERFACE("b2efe1e7-729f-4102-949f-505fa21bf666") ID2D1TransformNode : public IUnknown +{ + + /// + /// Return the number of input this node has. + /// + STDMETHOD_(UINT32, GetInputCount)( + ) CONST PURE; +}; // interface ID2D1TransformNode + + +/// +/// The implementation of the actual graph. +/// +interface DX_DECLARE_INTERFACE("13d29038-c3e6-4034-9081-13b53a417992") ID2D1TransformGraph : public IUnknown +{ + + /// + /// Return the number of input this graph has. + /// + STDMETHOD_(UINT32, GetInputCount)( + ) CONST PURE; + + /// + /// Sets the graph to contain a single transform whose inputs map 1:1 with effect + /// inputs. + /// + STDMETHOD(SetSingleTransformNode)( + _In_ ID2D1TransformNode *node + ) PURE; + + /// + /// Adds the given transform node to the graph. + /// + STDMETHOD(AddNode)( + _In_ ID2D1TransformNode *node + ) PURE; + + /// + /// Removes the given transform node from the graph. + /// + STDMETHOD(RemoveNode)( + _In_ ID2D1TransformNode *node + ) PURE; + + /// + /// Indicates that the given transform node should be considered to be the output + /// node of the graph. + /// + STDMETHOD(SetOutputNode)( + _In_ ID2D1TransformNode *node + ) PURE; + + /// + /// Connects one node to another node inside the graph. + /// + STDMETHOD(ConnectNode)( + _In_ ID2D1TransformNode *fromNode, + _In_ ID2D1TransformNode *toNode, + UINT32 toNodeInputIndex + ) PURE; + + /// + /// Connects a transform node inside the graph to the corresponding input of the + /// encapsulating effect. + /// + STDMETHOD(ConnectToEffectInput)( + UINT32 toEffectInputIndex, + _In_ ID2D1TransformNode *node, + UINT32 toNodeInputIndex + ) PURE; + + /// + /// Clears all nodes and connections from the transform graph. + /// + STDMETHOD_(void, Clear)( + ) PURE; + + /// + /// Uses the specified input as the effect output. + /// + STDMETHOD(SetPassthroughGraph)( + UINT32 effectInputIndex + ) PURE; +}; // interface ID2D1TransformGraph + + +/// +/// The interface implemented by a transform author. +/// +interface DX_DECLARE_INTERFACE("ef1a287d-342a-4f76-8fdb-da0d6ea9f92b") ID2D1Transform : public ID2D1TransformNode +{ + + STDMETHOD(MapOutputRectToInputRects)( + _In_ CONST D2D1_RECT_L *outputRect, + _Out_writes_(inputRectsCount) D2D1_RECT_L *inputRects, + UINT32 inputRectsCount + ) CONST PURE; + + STDMETHOD(MapInputRectsToOutputRect)( + _In_reads_(inputRectCount) CONST D2D1_RECT_L *inputRects, + _In_reads_(inputRectCount) CONST D2D1_RECT_L *inputOpaqueSubRects, + UINT32 inputRectCount, + _Out_ D2D1_RECT_L *outputRect, + _Out_ D2D1_RECT_L *outputOpaqueSubRect + ) PURE; + + STDMETHOD(MapInvalidRect)( + UINT32 inputIndex, + D2D1_RECT_L invalidInputRect, + _Out_ D2D1_RECT_L *invalidOutputRect + ) CONST PURE; +}; // interface ID2D1Transform + + +/// +/// The interface implemented by a transform author to provide a GPU-based effect. +/// +interface DX_DECLARE_INTERFACE("36bfdcb6-9739-435d-a30d-a653beff6a6f") ID2D1DrawTransform : public ID2D1Transform +{ + + STDMETHOD(SetDrawInfo)( + _In_ ID2D1DrawInfo *drawInfo + ) PURE; +}; // interface ID2D1DrawTransform + + +/// +/// The interface implemented by a transform author to provide a Compute Shader +/// based effect. +/// +interface DX_DECLARE_INTERFACE("0d85573c-01e3-4f7d-bfd9-0d60608bf3c3") ID2D1ComputeTransform : public ID2D1Transform +{ + + STDMETHOD(SetComputeInfo)( + _In_ ID2D1ComputeInfo *computeInfo + ) PURE; + + STDMETHOD(CalculateThreadgroups)( + _In_ CONST D2D1_RECT_L *outputRect, + _Out_ UINT32 *dimensionX, + _Out_ UINT32 *dimensionY, + _Out_ UINT32 *dimensionZ + ) PURE; +}; // interface ID2D1ComputeTransform + + +/// +/// The interface implemented by a transform author to indicate that it should +/// receive an analysis result callback. +/// +interface DX_DECLARE_INTERFACE("0359dc30-95e6-4568-9055-27720d130e93") ID2D1AnalysisTransform : public IUnknown +{ + + STDMETHOD(ProcessAnalysisResults)( + _In_reads_(analysisDataCount) CONST BYTE *analysisData, + UINT32 analysisDataCount + ) PURE; +}; // interface ID2D1AnalysisTransform + + +/// +/// The interface implemented by a transform author to provide a CPU based source +/// effect. +/// +interface DX_DECLARE_INTERFACE("db1800dd-0c34-4cf9-be90-31cc0a5653e1") ID2D1SourceTransform : public ID2D1Transform +{ + + STDMETHOD(SetRenderInfo)( + _In_ ID2D1RenderInfo *renderInfo + ) PURE; + + STDMETHOD(Draw)( + _In_ ID2D1Bitmap1 *target, + _In_ CONST D2D1_RECT_L *drawRect, + D2D1_POINT_2U targetOrigin + ) PURE; +}; // interface ID2D1SourceTransform + + +/// +/// Base interface for built-in transforms on which precision and caching may be +/// controlled. +/// +interface DX_DECLARE_INTERFACE("1a799d8a-69f7-4e4c-9fed-437ccc6684cc") ID2D1ConcreteTransform : public ID2D1TransformNode +{ + + /// + /// Controls the output precision and channel-depth for this transform. + /// + STDMETHOD(SetOutputBuffer)( + D2D1_BUFFER_PRECISION bufferPrecision, + D2D1_CHANNEL_DEPTH channelDepth + ) PURE; + + /// + /// Controls whether the output of this transform is cached. + /// + STDMETHOD_(void, SetCached)( + BOOL isCached + ) PURE; +}; // interface ID2D1ConcreteTransform + + +/// +/// An effect uses this interface to configure a blending operation. +/// +interface DX_DECLARE_INTERFACE("63ac0b32-ba44-450f-8806-7f4ca1ff2f1b") ID2D1BlendTransform : public ID2D1ConcreteTransform +{ + + STDMETHOD_(void, SetDescription)( + _In_ CONST D2D1_BLEND_DESCRIPTION *description + ) PURE; + + STDMETHOD_(void, GetDescription)( + _Out_ D2D1_BLEND_DESCRIPTION *description + ) CONST PURE; +}; // interface ID2D1BlendTransform + + +/// +/// An effect uses this interface to configure border generation. +/// +interface DX_DECLARE_INTERFACE("4998735c-3a19-473c-9781-656847e3a347") ID2D1BorderTransform : public ID2D1ConcreteTransform +{ + + STDMETHOD_(void, SetExtendModeX)( + D2D1_EXTEND_MODE extendMode + ) PURE; + + STDMETHOD_(void, SetExtendModeY)( + D2D1_EXTEND_MODE extendMode + ) PURE; + + STDMETHOD_(D2D1_EXTEND_MODE, GetExtendModeX)( + ) CONST PURE; + + STDMETHOD_(D2D1_EXTEND_MODE, GetExtendModeY)( + ) CONST PURE; +}; // interface ID2D1BorderTransform + + +/// +/// An effect uses this interface to offset an image without inserting a rendering +/// pass. +/// +interface DX_DECLARE_INTERFACE("3fe6adea-7643-4f53-bd14-a0ce63f24042") ID2D1OffsetTransform : public ID2D1TransformNode +{ + + STDMETHOD_(void, SetOffset)( + D2D1_POINT_2L offset + ) PURE; + + STDMETHOD_(D2D1_POINT_2L, GetOffset)( + ) CONST PURE; +}; // interface ID2D1OffsetTransform + + +/// +/// An effect uses this interface to alter the image rectangle of its input. +/// +interface DX_DECLARE_INTERFACE("90f732e2-5092-4606-a819-8651970baccd") ID2D1BoundsAdjustmentTransform : public ID2D1TransformNode +{ + + STDMETHOD_(void, SetOutputBounds)( + _In_ CONST D2D1_RECT_L *outputBounds + ) PURE; + + STDMETHOD_(void, GetOutputBounds)( + _Out_ D2D1_RECT_L *outputBounds + ) CONST PURE; +}; // interface ID2D1BoundsAdjustmentTransform + + +/// +/// This is the interface implemented by an effect author, along with the +/// constructor and registration information. +/// +interface DX_DECLARE_INTERFACE("a248fd3f-3e6c-4e63-9f03-7f68ecc91db9") ID2D1EffectImpl : public IUnknown +{ + + /// + /// Initialize the effect with a context and a transform graph. The effect must + /// populate the transform graph with a topology and can update it later. + /// + STDMETHOD(Initialize)( + _In_ ID2D1EffectContext *effectContext, + _In_ ID2D1TransformGraph *transformGraph + ) PURE; + + /// + /// Initialize the effect with a context and a transform graph. The effect must + /// populate the transform graph with a topology and can update it later. + /// + STDMETHOD(PrepareForRender)( + D2D1_CHANGE_TYPE changeType + ) PURE; + + /// + /// Sets a new transform graph to the effect. This happens when the number of + /// inputs to the effect changes, if the effect support a variable number of inputs. + /// + STDMETHOD(SetGraph)( + _In_ ID2D1TransformGraph *transformGraph + ) PURE; +}; // interface ID2D1EffectImpl + + +/// +/// The internal context handed to effect authors to create transforms from effects +/// and any other operation tied to context which is not useful to the application +/// facing API. +/// +interface DX_DECLARE_INTERFACE("3d9f916b-27dc-4ad7-b4f1-64945340f563") ID2D1EffectContext : public IUnknown +{ + + STDMETHOD_(void, GetDpi)( + _Out_ FLOAT *dpiX, + _Out_ FLOAT *dpiY + ) CONST PURE; + + /// + /// Create a new effect, the effect must either be built in or previously registered + /// through ID2D1Factory1::RegisterEffect. + /// + STDMETHOD(CreateEffect)( + _In_ REFCLSID effectId, + _COM_Outptr_ ID2D1Effect **effect + ) PURE; + + STDMETHOD(GetMaximumSupportedFeatureLevel)( + _In_reads_(featureLevelsCount) CONST D3D_FEATURE_LEVEL *featureLevels, + UINT32 featureLevelsCount, + _Out_ D3D_FEATURE_LEVEL *maximumSupportedFeatureLevel + ) CONST PURE; + + /// + /// Create a transform node from the passed in effect. + /// + STDMETHOD(CreateTransformNodeFromEffect)( + _In_ ID2D1Effect *effect, + _COM_Outptr_ ID2D1TransformNode **transformNode + ) PURE; + + STDMETHOD(CreateBlendTransform)( + UINT32 numInputs, + _In_ CONST D2D1_BLEND_DESCRIPTION *blendDescription, + _COM_Outptr_ ID2D1BlendTransform **transform + ) PURE; + + STDMETHOD(CreateBorderTransform)( + D2D1_EXTEND_MODE extendModeX, + D2D1_EXTEND_MODE extendModeY, + _COM_Outptr_ ID2D1BorderTransform **transform + ) PURE; + + STDMETHOD(CreateOffsetTransform)( + D2D1_POINT_2L offset, + _COM_Outptr_ ID2D1OffsetTransform **transform + ) PURE; + + STDMETHOD(CreateBoundsAdjustmentTransform)( + _In_ CONST D2D1_RECT_L *outputRectangle, + _COM_Outptr_ ID2D1BoundsAdjustmentTransform **transform + ) PURE; + + STDMETHOD(LoadPixelShader)( + REFGUID shaderId, + _In_reads_(shaderBufferCount) CONST BYTE *shaderBuffer, + UINT32 shaderBufferCount + ) PURE; + + STDMETHOD(LoadVertexShader)( + REFGUID resourceId, + _In_reads_(shaderBufferCount) CONST BYTE *shaderBuffer, + UINT32 shaderBufferCount + ) PURE; + + STDMETHOD(LoadComputeShader)( + REFGUID resourceId, + _In_reads_(shaderBufferCount) CONST BYTE *shaderBuffer, + UINT32 shaderBufferCount + ) PURE; + + STDMETHOD_(BOOL, IsShaderLoaded)( + REFGUID shaderId + ) PURE; + + STDMETHOD(CreateResourceTexture)( + _In_opt_ CONST GUID *resourceId, + _In_ CONST D2D1_RESOURCE_TEXTURE_PROPERTIES *resourceTextureProperties, + _In_reads_opt_(dataSize) CONST BYTE *data, + _In_reads_opt_(resourceTextureProperties->dimensions - 1) CONST UINT32 *strides, + UINT32 dataSize, + _COM_Outptr_ ID2D1ResourceTexture **resourceTexture + ) PURE; + + STDMETHOD(FindResourceTexture)( + _In_ CONST GUID *resourceId, + _COM_Outptr_ ID2D1ResourceTexture **resourceTexture + ) PURE; + + STDMETHOD(CreateVertexBuffer)( + _In_ CONST D2D1_VERTEX_BUFFER_PROPERTIES *vertexBufferProperties, + _In_opt_ CONST GUID *resourceId, + _In_opt_ CONST D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES *customVertexBufferProperties, + _COM_Outptr_ ID2D1VertexBuffer **buffer + ) PURE; + + STDMETHOD(FindVertexBuffer)( + _In_ CONST GUID *resourceId, + _COM_Outptr_ ID2D1VertexBuffer **buffer + ) PURE; + + /// + /// Creates a color context from a color space. If the space is Custom, the context + /// is initialized from the profile/profileSize arguments. Otherwise the context is + /// initialized with the profile bytes associated with the space and + /// profile/profileSize are ignored. + /// + STDMETHOD(CreateColorContext)( + D2D1_COLOR_SPACE space, + _In_reads_opt_(profileSize) CONST BYTE *profile, + UINT32 profileSize, + _COM_Outptr_ ID2D1ColorContext **colorContext + ) PURE; + + STDMETHOD(CreateColorContextFromFilename)( + _In_ PCWSTR filename, + _COM_Outptr_ ID2D1ColorContext **colorContext + ) PURE; + + STDMETHOD(CreateColorContextFromWicColorContext)( + _In_ IWICColorContext *wicColorContext, + _COM_Outptr_ ID2D1ColorContext **colorContext + ) PURE; + + STDMETHOD(CheckFeatureSupport)( + D2D1_FEATURE feature, + _Out_writes_bytes_(featureSupportDataSize) void *featureSupportData, + UINT32 featureSupportDataSize + ) CONST PURE; + + /// + /// Indicates whether the buffer precision is supported by D2D. + /// + STDMETHOD_(BOOL, IsBufferPrecisionSupported)( + D2D1_BUFFER_PRECISION bufferPrecision + ) CONST PURE; +}; // interface ID2D1EffectContext + + + +#endif + + +#ifdef D2D_USE_C_DEFINITIONS + + +typedef interface ID2D1VertexBuffer ID2D1VertexBuffer; + +typedef interface ID2D1ResourceTexture ID2D1ResourceTexture; + +typedef interface ID2D1RenderInfo ID2D1RenderInfo; + +typedef interface ID2D1DrawInfo ID2D1DrawInfo; + +typedef interface ID2D1ComputeInfo ID2D1ComputeInfo; + +typedef interface ID2D1TransformNode ID2D1TransformNode; + +typedef interface ID2D1TransformGraph ID2D1TransformGraph; + +typedef interface ID2D1Transform ID2D1Transform; + +typedef interface ID2D1DrawTransform ID2D1DrawTransform; + +typedef interface ID2D1ComputeTransform ID2D1ComputeTransform; + +typedef interface ID2D1AnalysisTransform ID2D1AnalysisTransform; + +typedef interface ID2D1SourceTransform ID2D1SourceTransform; + +typedef interface ID2D1ConcreteTransform ID2D1ConcreteTransform; + +typedef interface ID2D1BlendTransform ID2D1BlendTransform; + +typedef interface ID2D1BorderTransform ID2D1BorderTransform; + +typedef interface ID2D1OffsetTransform ID2D1OffsetTransform; + +typedef interface ID2D1BoundsAdjustmentTransform ID2D1BoundsAdjustmentTransform; + +typedef interface ID2D1EffectImpl ID2D1EffectImpl; + +typedef interface ID2D1EffectContext ID2D1EffectContext; + +#endif + +#include +#endif // #ifndef _D2D1_EFFECT_AUTHOR_H_ diff --git a/gfx/include/dxsdk/d2d1effectauthor_1.h b/gfx/include/dxsdk/d2d1effectauthor_1.h new file mode 100644 index 0000000000..d1da35e889 --- /dev/null +++ b/gfx/include/dxsdk/d2d1effectauthor_1.h @@ -0,0 +1,98 @@ +//--------------------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// This file is automatically generated. Please do not edit it directly. +// +// File name: D2D1EffectAuthor_1.h +//--------------------------------------------------------------------------- +#ifdef _MSC_VER +#pragma once +#endif // #ifdef _MSC_VER + +#ifndef _D2D1_EFFECT_AUTHOR_1_H_ +#define _D2D1_EFFECT_AUTHOR_1_H_ + +#ifndef _D2D1_3_H_ +#include +#endif // #ifndef _D2D1_3_H_ +#ifndef _D2D1_EFFECT_AUTHOR_H_ +#include +#endif // #ifndef _D2D1_EFFECT_AUTHOR_H_ + +EXTERN_C CONST IID IID_ID2D1EffectContext1; +EXTERN_C CONST IID IID_ID2D1EffectContext2; + + +#ifndef D2D_USE_C_DEFINITIONS + + +/// +/// The internal context handed to effect authors to create transforms from effects +/// and any other operation tied to context which is not useful to the application +/// facing API. +/// +interface DX_DECLARE_INTERFACE("84ab595a-fc81-4546-bacd-e8ef4d8abe7a") ID2D1EffectContext1 : public ID2D1EffectContext +{ + + /// + /// Creates a 3D lookup table for mapping a 3-channel input to a 3-channel output. + /// The table data must be provided in 4-channel format. + /// + STDMETHOD(CreateLookupTable3D)( + D2D1_BUFFER_PRECISION precision, + _In_reads_(3) CONST UINT32 *extents, + _In_reads_(dataCount) CONST BYTE *data, + UINT32 dataCount, + _In_reads_(2) CONST UINT32 *strides, + _COM_Outptr_ ID2D1LookupTable3D **lookupTable + ) PURE; +}; // interface ID2D1EffectContext1 + + +#if NTDDI_VERSION >= NTDDI_WIN10_RS2 + +/// +/// The internal context handed to effect authors to create transforms from effects +/// and any other operation tied to context which is not useful to the application +/// facing API. +/// +interface DX_DECLARE_INTERFACE("577ad2a0-9fc7-4dda-8b18-dab810140052") ID2D1EffectContext2 : public ID2D1EffectContext1 +{ + + /// + /// Creates a color context from a DXGI color space type. It is only valid to use + /// this with the Color Management Effect in 'Best' mode. + /// + STDMETHOD(CreateColorContextFromDxgiColorSpace)( + DXGI_COLOR_SPACE_TYPE colorSpace, + _COM_Outptr_ ID2D1ColorContext1 **colorContext + ) PURE; + + /// + /// Creates a color context from a simple color profile. It is only valid to use + /// this with the Color Management Effect in 'Best' mode. + /// + STDMETHOD(CreateColorContextFromSimpleColorProfile)( + _In_ CONST D2D1_SIMPLE_COLOR_PROFILE *simpleProfile, + _COM_Outptr_ ID2D1ColorContext1 **colorContext + ) PURE; +}; // interface ID2D1EffectContext2 + + +#endif + +#endif + + +#ifdef D2D_USE_C_DEFINITIONS + + +typedef interface ID2D1EffectContext1 ID2D1EffectContext1; +#if NTDDI_VERSION >= NTDDI_WIN10_RS2 + +typedef interface ID2D1EffectContext2 ID2D1EffectContext2; +#endif + +#endif + +#endif // #ifndef _D2D1_EFFECT_AUTHOR_1_H_ diff --git a/gfx/include/dxsdk/d2d1effecthelpers.h b/gfx/include/dxsdk/d2d1effecthelpers.h new file mode 100644 index 0000000000..51598089f9 --- /dev/null +++ b/gfx/include/dxsdk/d2d1effecthelpers.h @@ -0,0 +1,410 @@ +//--------------------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// D2D helper functions for effect authors. +// +// File name: D2D1EffectHelpers.h +//--------------------------------------------------------------------------- +#pragma once + +#ifndef _D2D1_EFFECT_HELPERS_H_ +#define _D2D1_EFFECT_HELPERS_H_ + +/*#include */ + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + +#include + +//+----------------------------------------------------------------------------- +// +// Function: +// DeducingValueSetter +// +// Synopsis: +// Deduces the class and arguments and then calls a member-function property +// setter callback for a value-type property. +// +// This should not be called directly. +// +//-------------------------------------------------------------------------------- +template +HRESULT DeducingValueSetter( + _In_ HRESULT (C::*callback)(P), + _In_ I *effect, + _In_reads_(dataSize) const BYTE *data, + UINT32 dataSize + ) +{ + // We must exactly match the value-type's size. + if (dataSize != sizeof(P)) + { + return E_INVALIDARG; + } + + return (static_cast(effect)->*callback)(*reinterpret_cast(data)); +} + +//+----------------------------------------------------------------------------- +// +// Function: +// ValueSetter +// +// Synopsis: +// Calls a member-function property setter callback for a value-type property. +// +//-------------------------------------------------------------------------------- +template +HRESULT CALLBACK ValueSetter( + _In_ IUnknown *effect, + _In_reads_(dataSize) const BYTE *data, + UINT32 dataSize + ) +{ + // Cast through I to resolve multiple-inheritance ambiguities. + return DeducingValueSetter(P, static_cast(effect), data, dataSize); +} + +//+----------------------------------------------------------------------------- +// +// Function: +// DeducingValueGetter +// +// Synopsis: +// Deduces the class and arguments and then calls a member-function property +// getter callback for a value-type property. +// +// This should not be called directly. +// +//-------------------------------------------------------------------------------- +template +HRESULT DeducingValueGetter( + _In_ P (C::*callback)() const, + _In_ const I *effect, + _Out_writes_opt_(dataSize) BYTE *data, + UINT32 dataSize, + _Out_opt_ UINT32 *actualSize + ) +{ + if (actualSize) + { + *actualSize = sizeof(P); + } + + if (dataSize > 0 && data) + { + if (dataSize < sizeof(P)) + { + return E_NOT_SUFFICIENT_BUFFER; + } + + *reinterpret_cast

(data) = (static_cast(effect)->*callback)(); + } + + return S_OK; +} + +//+----------------------------------------------------------------------------- +// +// Function: +// ValueGetter +// +// Synopsis: +// Calls a member-function property setter callback for a value-type property. +// +//-------------------------------------------------------------------------------- +template +HRESULT CALLBACK ValueGetter( + _In_ const IUnknown *effect, + _Out_writes_opt_(dataSize) BYTE *data, + UINT32 dataSize, + _Out_opt_ UINT32 *actualSize + ) +{ + // Cast through I to resolve multiple-inheritance ambiguities. + return DeducingValueGetter(P, static_cast(effect), data, dataSize, actualSize); +} + +//+----------------------------------------------------------------------------- +// +// Function: +// DeducingBlobSetter +// +// Synopsis: +// Deduces the class and arguments and then calls a member-function property +// setter callback for a blob-type property. +// +// This should not be called directly. +// +//-------------------------------------------------------------------------------- +template +HRESULT DeducingBlobSetter( + _In_ HRESULT (C::*callback)(const BYTE *, UINT32), + _In_ I *effect, + _In_reads_(dataSize) const BYTE *data, + UINT32 dataSize + ) +{ + return (static_cast(effect)->*callback)(data, dataSize); +} + +//+----------------------------------------------------------------------------- +// +// Function: +// BlobSetter +// +// Synopsis: +// Calls a member-function property setter callback for a blob-type property. +// +//-------------------------------------------------------------------------------- +template +HRESULT CALLBACK BlobSetter( + _In_ IUnknown *effect, + _In_reads_(dataSize) const BYTE *data, + UINT32 dataSize + ) +{ + // Cast through I to resolve multiple-inheritance ambiguities. + return DeducingBlobSetter(P, static_cast(effect), data, dataSize); +} + +//+----------------------------------------------------------------------------- +// +// Function: +// DeducingBlobGetter +// +// Synopsis: +// Deduces the class and arguments and then calls a member-function property +// getter callback for a blob-type property. +// +// This should not be called directly. +// +//-------------------------------------------------------------------------------- +template +HRESULT DeducingBlobGetter( + _In_ HRESULT (C::*callback)(BYTE *, UINT32, UINT32*) const, + _In_ const I *effect, + _Out_writes_opt_(dataSize) BYTE *data, + UINT32 dataSize, + _Out_opt_ UINT32 *actualSize + ) +{ + return (static_cast(effect)->*callback)(data, dataSize, actualSize); +} + +//+----------------------------------------------------------------------------- +// +// Function: +// BlobGetter +// +// Synopsis: +// Calls a member-function property getter callback for a blob-type property. +// +//-------------------------------------------------------------------------------- +template +HRESULT CALLBACK BlobGetter( + _In_ const IUnknown *effect, + _Out_writes_opt_(dataSize) BYTE *data, + UINT32 dataSize, + _Out_opt_ UINT32 *actualSize + ) +{ + // Cast through I to resolve multiple-inheritance ambiguities. + return DeducingBlobGetter(P, static_cast(effect), data, dataSize, actualSize); +} + +//+----------------------------------------------------------------------------- +// +// Function: +// DeducingStringSetter +// +// Synopsis: +// Deduces the class and arguments and then calls a member-function property +// setter callback for a string-type property. +// +// This should not be called directly. +// +//-------------------------------------------------------------------------------- +template +HRESULT DeducingStringSetter( + _In_ HRESULT (C::*callback)(PCWSTR string), + _In_ I *effect, + _In_reads_(dataSize) const BYTE *data, + UINT32 dataSize + ) +{ + dataSize; + + return (static_cast(effect)->*callback)(reinterpret_cast(data)); +} + +//+----------------------------------------------------------------------------- +// +// Function: +// StringSetter +// +// Synopsis: +// Calls a member-function property setter callback for a string-type property. +// +//-------------------------------------------------------------------------------- +template +HRESULT CALLBACK StringSetter( + _In_ IUnknown *effect, + _In_reads_(dataSize) const BYTE *data, + UINT32 dataSize + ) +{ + // Cast through I to resolve multiple-inheritance ambiguities. + return DeducingStringSetter(P, static_cast(effect), data, dataSize); +} + +//+----------------------------------------------------------------------------- +// +// Function: +// DeducingStringGetter +// +// Synopsis: +// Deduces the class and arguments and then calls a member-function property +// getter callback for a string-type property. +// +// This should not be called directly. +// +//-------------------------------------------------------------------------------- +template +HRESULT DeducingStringGetter( + _In_ HRESULT (C::*callback)(PWSTR, UINT32, UINT32*) const, + _In_ const I *effect, + _Out_writes_opt_(dataSize) BYTE *data, + UINT32 dataSize, + _Out_opt_ UINT32 *actualSize + ) +{ + UINT32 cchString = 0; + + HRESULT hr = (static_cast(effect)->*callback)(reinterpret_cast(data), dataSize / sizeof(WCHAR), &cchString); + + if ((SUCCEEDED(hr) || hr == E_NOT_SUFFICIENT_BUFFER) && actualSize) + { + *actualSize = cchString * sizeof(WCHAR); + } + + return hr; +} + +//+----------------------------------------------------------------------------- +// +// Function: +// StringGetter +// +// Synopsis: +// Calls a member-function property getter callback for a string-type property. +// +//-------------------------------------------------------------------------------- +template +HRESULT CALLBACK StringGetter( + _In_ const IUnknown *effect, + _Out_writes_opt_(dataSize) BYTE *data, + UINT32 dataSize, + _Out_opt_ UINT32 *actualSize + ) +{ + // Cast through I to resolve multiple-inheritance ambiguities. + return DeducingStringGetter(P, static_cast(effect), data, dataSize, actualSize); +} + +// +// Simpler versions of the helpers can be declared if decltype is available: +// +#if _MSC_VER >= 1600 +#define D2D1_SIMPLE_BINDING_MACROS +#endif + +#ifdef D2D1_SIMPLE_BINDING_MACROS + +// +// Helper to work around decltype issues: +// +template +T GetType(T t) { return t; }; + +// +// Helper macros for declaring a D2D1_PROPERTY_BINDING for value, blob, or string callbacks. +// +#define D2D1_VALUE_TYPE_BINDING(NAME, SETTER, GETTER) \ + { NAME, &ValueSetter, &ValueGetter } + +#define D2D1_BLOB_TYPE_BINDING(NAME, SETTER, GETTER) \ + { NAME, &BlobSetter, &BlobGetter } + +#define D2D1_STRING_TYPE_BINDING(NAME, SETTER, GETTER) \ + { NAME, &StringSetter, &StringGetter } + +// +// Read-only variants: +// +#define D2D1_READONLY_VALUE_TYPE_BINDING(NAME, GETTER) \ + { NAME, NULL, &ValueGetter } + +#define D2D1_READONLY_BLOB_TYPE_BINDING(NAME, GETTER) \ + { NAME, NULL, &BlobGetter } + +#define D2D1_READONLY_STRING_TYPE_BINDING(NAME, GETTER) \ + { NAME, NULL, &StringGetter } + +#else // #ifdef D2D1_SIMPLE_BINDING_MACROS + +// +// Helper macros for declaring a D2D1_PROPERTY_BINDING for value, blob, or string callbacks. +// +#define D2D1_VALUE_TYPE_BINDING(NAME, TYPE, CLASS, SETTER, GETTER) \ + { \ + NAME, \ + &ValueSetter, \ + &ValueGetter \ + } + +#define D2D1_BLOB_TYPE_BINDING(NAME, CLASS, SETTER, GETTER) \ + { \ + NAME, \ + &BlobSetter, \ + &BlobGetter \ + } + +#define D2D1_STRING_TYPE_BINDING(NAME, CLASS, SETTER, GETTER) \ + { \ + NAME, \ + &StringSetter, \ + &StringGetter \ + } + +// +// Read-only variants: +// +#define D2D1_READONLY_VALUE_TYPE_BINDING(NAME, TYPE, CLASS, GETTER) \ + { \ + NAME, \ + NULL, \ + &ValueGetter \ + } + +#define D2D1_READONLY_BLOB_TYPE_BINDING(NAME, CLASS, GETTER) \ + { \ + NAME, \ + NULL, \ + &BlobGetter \ + } + +#define D2D1_READONLY_STRING_TYPE_BINDING(NAME, CLASS, GETTER) \ + { \ + NAME, \ + NULL, \ + &StringGetter \ + } + +#endif // #ifdef D2D1_SIMPLE_BINDING_MACROS + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ + +#endif // #ifndef _D2D1_AUTHOR_H_ diff --git a/gfx/include/dxsdk/d2d1effecthelpers.hlsli b/gfx/include/dxsdk/d2d1effecthelpers.hlsli new file mode 100644 index 0000000000..aaa56597eb --- /dev/null +++ b/gfx/include/dxsdk/d2d1effecthelpers.hlsli @@ -0,0 +1,316 @@ +//--------------------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// This file is automatically generated. Please do not edit it directly. +// +//--------------------------------------------------------------------------- + +// File contents: +// - Helpers methods for authoring D2D Effect shader code. +// These are located at the end of the file (D2DGetInput, etc.). +// - The top portion contains definitions and initialization required by the helpers. +// These elements are prefaced with "__D2D" and can be safely ignored. +// +// To use these helpers, the following values must be defined before inclusion: +// D2D_INPUT_COUNT - The number of texture inputs to the effect. +// D2D_INPUT[N]_SIMPLE or D2D_INPUT[N]_COMPLEX - How the effect will sample each input. (If unspecificed, defaults to _COMPLEX.) +// D2D_ENTRY - The name of the entry point being compiled. This will usually be defined on the command line at compilation time. +// +// The following values can be optionally defined: +// D2D_FUNCTION - Compile the entry point as an export function. This will usually be defined on the command line at compilation time. +// D2D_FULL_SHADER - Compile the entry point as a full shader. This will usually be defined on the command line at compilation time. +// D2D_FULL_SHADER_ONLY - Only compile the in-scope entry points to full shaders, never to export functions. +// + +#define __D2D_DEFINE_PS_GLOBALS(inputIndex) \ +Texture2D InputTexture##inputIndex : register(t##inputIndex); \ +SamplerState InputSampler##inputIndex : register(s##inputIndex); \ + +// Define a texture and sampler pair for each D2D effect input. +#if (D2D_INPUT_COUNT >= 1) +__D2D_DEFINE_PS_GLOBALS(0) +#endif +#if (D2D_INPUT_COUNT >= 2) +__D2D_DEFINE_PS_GLOBALS(1) +#endif +#if (D2D_INPUT_COUNT >= 3) +__D2D_DEFINE_PS_GLOBALS(2) +#endif +#if (D2D_INPUT_COUNT >= 4) +__D2D_DEFINE_PS_GLOBALS(3) +#endif +#if (D2D_INPUT_COUNT >= 5) +__D2D_DEFINE_PS_GLOBALS(4) +#endif +#if (D2D_INPUT_COUNT >= 6) +__D2D_DEFINE_PS_GLOBALS(5) +#endif +#if (D2D_INPUT_COUNT >= 7) +__D2D_DEFINE_PS_GLOBALS(6) +#endif +#if (D2D_INPUT_COUNT >= 8) +__D2D_DEFINE_PS_GLOBALS(7) +#endif + +#define __D2D_MAXIMUM_INPUT_COUNT 8 + +// Validate that all required shader information has been defined. +#ifndef D2D_INPUT_COUNT +#error D2D_INPUT_COUNT is undefined. +#endif + +#if (D2D_INPUT_COUNT > __D2D_MAXIMUM_INPUT_COUNT) +#error D2D_INPUT_COUNT exceeds the maximum input count. +#endif + +// Define global statics to hold the values needed by intrinsic methods. +// These values are initialized by the entry point wrapper before calling into the +// effect's shader implementation. +#if !defined(D2D_FUNCTION) || defined(D2D_REQUIRES_SCENE_POSITION) +static float4 __d2dstatic_scenePos = float4(0, 0, 0, 0); +#endif + +#define __D2D_DEFINE_INPUT_STATICS(inputIndex) \ +static float4 __d2dstatic_input##inputIndex = float4(0, 0, 0, 0); \ +static float4 __d2dstatic_uv##inputIndex = float4(0, 0, 0, 0); \ + +#if (D2D_INPUT_COUNT >= 1) +__D2D_DEFINE_INPUT_STATICS(0) +#endif +#if (D2D_INPUT_COUNT >= 2) +__D2D_DEFINE_INPUT_STATICS(1) +#endif +#if (D2D_INPUT_COUNT >= 3) +__D2D_DEFINE_INPUT_STATICS(2) +#endif +#if (D2D_INPUT_COUNT >= 4) +__D2D_DEFINE_INPUT_STATICS(3) +#endif +#if (D2D_INPUT_COUNT >= 5) +__D2D_DEFINE_INPUT_STATICS(4) +#endif +#if (D2D_INPUT_COUNT >= 6) +__D2D_DEFINE_INPUT_STATICS(5) +#endif +#if (D2D_INPUT_COUNT >= 7) +__D2D_DEFINE_INPUT_STATICS(6) +#endif +#if (D2D_INPUT_COUNT >= 8) +__D2D_DEFINE_INPUT_STATICS(7) +#endif + +// Define the scene position parameter according to whether the shader requires it, +// and whether it is the only parameter. +// The scene position input always needs to be defined for full shaders. +#if (!defined(D2D_FUNCTION) || defined(D2D_REQUIRES_SCENE_POSITION)) +#if (D2D_INPUT_COUNT == 0) +#define __D2D_SCENE_POS float4 __d2dinput_scenePos : SCENE_POSITION +#define __D2D_INIT_STATIC_SCENE_POS __d2dstatic_scenePos = __d2dinput_scenePos +#else +#define __D2D_SCENE_POS float4 __d2dinput_scenePos : SCENE_POSITION, +#define __D2D_INIT_STATIC_SCENE_POS __d2dstatic_scenePos = __d2dinput_scenePos; + #endif +#else + #define __D2D_SCENE_POS + #define __D2D_INIT_STATIC_SCENE_POS +#endif + +// When compiling a function version, simple and complex inputs have different definitions. +// When compiling a full shader, they have the same definition. +// Access to input parameters also differs between functions and full shaders. +#if defined(D2D_FUNCTION) +#define __D2D_SIMPLE_INPUT(index) float4 __d2dinput_color##index : INPUT##index +#define __D2D_INIT_SIMPLE_STATIC(index) __d2dstatic_input##index = __d2dinput_color##index +#else +#define __D2D_SIMPLE_INPUT(index) float4 __d2dinput_uv##index : TEXCOORD##index +#define __D2D_INIT_SIMPLE_STATIC(index) __d2dstatic_uv##index = __d2dinput_uv##index +#endif + +#define __D2D_COMPLEX_INPUT(index) float4 __d2dinput_uv##index : TEXCOORD##index +#define __D2D_INIT_COMPLEX_STATIC(index) __d2dstatic_uv##index = __d2dinput_uv##index + +#define __D2D_SAMPLE_INPUT(index) InputTexture##index.Sample(InputSampler##index, __d2dstatic_uv##index.xy) + +// Define each input as either simple or complex. +#if defined(D2D_INPUT0_SIMPLE) +#define __D2D_INPUT0 __D2D_SIMPLE_INPUT(0) +#define __D2D_INIT_STATIC0 __D2D_INIT_SIMPLE_STATIC(0) +#define __D2D_GET_INPUT0 __d2dstatic_input0 +#else +#define __D2D_INPUT0 __D2D_COMPLEX_INPUT(0) +#define __D2D_INIT_STATIC0 __D2D_INIT_COMPLEX_STATIC(0) +#define __D2D_GET_INPUT0 __D2D_SAMPLE_INPUT(0) +#endif +#if defined(D2D_INPUT1_SIMPLE) +#define __D2D_INPUT1 __D2D_SIMPLE_INPUT(1) +#define __D2D_INIT_STATIC1 __D2D_INIT_SIMPLE_STATIC(1) +#define __D2D_GET_INPUT1 __d2dstatic_input1 +#else +#define __D2D_INPUT1 __D2D_COMPLEX_INPUT(1) +#define __D2D_INIT_STATIC1 __D2D_INIT_COMPLEX_STATIC(1) +#define __D2D_GET_INPUT1 __D2D_SAMPLE_INPUT(1) +#endif +#if defined(D2D_INPUT2_SIMPLE) +#define __D2D_INPUT2 __D2D_SIMPLE_INPUT(2) +#define __D2D_INIT_STATIC2 __D2D_INIT_SIMPLE_STATIC(2) +#define __D2D_GET_INPUT2 __d2dstatic_input2 +#else +#define __D2D_INPUT2 __D2D_COMPLEX_INPUT(2) +#define __D2D_INIT_STATIC2 __D2D_INIT_COMPLEX_STATIC(2) +#define __D2D_GET_INPUT2 __D2D_SAMPLE_INPUT(2) +#endif +#if defined(D2D_INPUT3_SIMPLE) +#define __D2D_INPUT3 __D2D_SIMPLE_INPUT(3) +#define __D2D_INIT_STATIC3 __D2D_INIT_SIMPLE_STATIC(3) +#define __D2D_GET_INPUT3 __d2dstatic_input3 +#else +#define __D2D_INPUT3 __D2D_COMPLEX_INPUT(3) +#define __D2D_INIT_STATIC3 __D2D_INIT_COMPLEX_STATIC(3) +#define __D2D_GET_INPUT3 __D2D_SAMPLE_INPUT(3) +#endif +#if defined(D2D_INPUT4_SIMPLE) +#define __D2D_INPUT4 __D2D_SIMPLE_INPUT(4) +#define __D2D_INIT_STATIC4 __D2D_INIT_SIMPLE_STATIC(4) +#define __D2D_GET_INPUT4 __d2dstatic_input4 +#else +#define __D2D_INPUT4 __D2D_COMPLEX_INPUT(4) +#define __D2D_INIT_STATIC4 __D2D_INIT_COMPLEX_STATIC(4) +#define __D2D_GET_INPUT4 __D2D_SAMPLE_INPUT(4) +#endif +#if defined(D2D_INPUT5_SIMPLE) +#define __D2D_INPUT5 __D2D_SIMPLE_INPUT(5) +#define __D2D_INIT_STATIC5 __D2D_INIT_SIMPLE_STATIC(5) +#define __D2D_GET_INPUT5 __d2dstatic_input5 +#else +#define __D2D_INPUT5 __D2D_COMPLEX_INPUT(5) +#define __D2D_INIT_STATIC5 __D2D_INIT_COMPLEX_STATIC(5) +#define __D2D_GET_INPUT5 __D2D_SAMPLE_INPUT(5) +#endif +#if defined(D2D_INPUT6_SIMPLE) +#define __D2D_INPUT6 __D2D_SIMPLE_INPUT(6) +#define __D2D_INIT_STATIC6 __D2D_INIT_SIMPLE_STATIC(6) +#define __D2D_GET_INPUT6 __d2dstatic_input6 +#else +#define __D2D_INPUT6 __D2D_COMPLEX_INPUT(6) +#define __D2D_INIT_STATIC6 __D2D_INIT_COMPLEX_STATIC(6) +#define __D2D_GET_INPUT6 __D2D_SAMPLE_INPUT(6) +#endif +#if defined(D2D_INPUT7_SIMPLE) +#define __D2D_INPUT7 __D2D_SIMPLE_INPUT(7) +#define __D2D_INIT_STATIC7 __D2D_INIT_SIMPLE_STATIC(7) +#define __D2D_GET_INPUT7 __d2dstatic_input7 +#else +#define __D2D_INPUT7 __D2D_COMPLEX_INPUT(7) +#define __D2D_INIT_STATIC7 __D2D_INIT_COMPLEX_STATIC(7) +#define __D2D_GET_INPUT7 __D2D_SAMPLE_INPUT(7) +#endif +#if defined(D2D_INPUT8_SIMPLE) +#define __D2D_INPUT8 __D2D_SIMPLE_INPUT(8) +#define __D2D_INIT_STATIC8 __D2D_INIT_SIMPLE_STATIC(8) +#define __D2D_GET_INPUT8 __d2dstatic_input8 +#else +#define __D2D_INPUT8 __D2D_COMPLEX_INPUT(8) +#define __D2D_INIT_STATIC8 __D2D_INIT_COMPLEX_STATIC(8) +#define __D2D_GET_INPUT8 __D2D_SAMPLE_INPUT(8) +#endif + +// Define the export function inputs based on the defined input count and types. +#if (D2D_INPUT_COUNT == 0) +#define __D2D_FUNCTION_INPUTS __D2D_SCENE_POS +#define __D2D_INIT_STATICS __D2D_INIT_STATIC_SCENE_POS +#elif (D2D_INPUT_COUNT == 1) +#define __D2D_FUNCTION_INPUTS __D2D_SCENE_POS __D2D_INPUT0 +#define __D2D_INIT_STATICS __D2D_INIT_STATIC_SCENE_POS __D2D_INIT_STATIC0 +#elif (D2D_INPUT_COUNT == 2) +#define __D2D_FUNCTION_INPUTS __D2D_SCENE_POS __D2D_INPUT0, __D2D_INPUT1 +#define __D2D_INIT_STATICS __D2D_INIT_STATIC_SCENE_POS __D2D_INIT_STATIC0; __D2D_INIT_STATIC1 +#elif (D2D_INPUT_COUNT == 3) +#define __D2D_FUNCTION_INPUTS __D2D_SCENE_POS __D2D_INPUT0, __D2D_INPUT1, __D2D_INPUT2 +#define __D2D_INIT_STATICS __D2D_INIT_STATIC_SCENE_POS __D2D_INIT_STATIC0; __D2D_INIT_STATIC1; __D2D_INIT_STATIC2 +#elif (D2D_INPUT_COUNT == 4) +#define __D2D_FUNCTION_INPUTS __D2D_SCENE_POS __D2D_INPUT0, __D2D_INPUT1, __D2D_INPUT2, __D2D_INPUT3 +#define __D2D_INIT_STATICS __D2D_INIT_STATIC_SCENE_POS __D2D_INIT_STATIC0; __D2D_INIT_STATIC1; __D2D_INIT_STATIC2; __D2D_INIT_STATIC3 +#elif (D2D_INPUT_COUNT == 5) +#define __D2D_FUNCTION_INPUTS __D2D_SCENE_POS __D2D_INPUT0, __D2D_INPUT1, __D2D_INPUT2, __D2D_INPUT3, __D2D_INPUT4 +#define __D2D_INIT_STATICS __D2D_INIT_STATIC_SCENE_POS __D2D_INIT_STATIC0; __D2D_INIT_STATIC1; __D2D_INIT_STATIC2; __D2D_INIT_STATIC3; __D2D_INIT_STATIC4 +#elif (D2D_INPUT_COUNT == 6) +#define __D2D_FUNCTION_INPUTS __D2D_SCENE_POS __D2D_INPUT0, __D2D_INPUT1, __D2D_INPUT2, __D2D_INPUT3, __D2D_INPUT4, __D2D_INPUT5 +#define __D2D_INIT_STATICS __D2D_INIT_STATIC_SCENE_POS __D2D_INIT_STATIC0; __D2D_INIT_STATIC1; __D2D_INIT_STATIC2; __D2D_INIT_STATIC3; __D2D_INIT_STATIC4; __D2D_INIT_STATIC5 +#elif (D2D_INPUT_COUNT == 7) +#define __D2D_FUNCTION_INPUTS __D2D_SCENE_POS __D2D_INPUT0, __D2D_INPUT1, __D2D_INPUT2, __D2D_INPUT3, __D2D_INPUT4, __D2D_INPUT5, __D2D_INPUT6 +#define __D2D_INIT_STATICS __D2D_INIT_STATIC_SCENE_POS __D2D_INIT_STATIC0; __D2D_INIT_STATIC1; __D2D_INIT_STATIC2; __D2D_INIT_STATIC3; __D2D_INIT_STATIC4; __D2D_INIT_STATIC5; __D2D_INIT_STATIC6 +#elif (D2D_INPUT_COUNT == 8) +#define __D2D_FUNCTION_INPUTS __D2D_SCENE_POS __D2D_INPUT0, __D2D_INPUT1, __D2D_INPUT2, __D2D_INPUT3, __D2D_INPUT4, __D2D_INPUT5, __D2D_INPUT6, __D2D_INPUT7 +#define __D2D_INIT_STATICS __D2D_INIT_STATIC_SCENE_POS __D2D_INIT_STATIC0; __D2D_INIT_STATIC1; __D2D_INIT_STATIC2; __D2D_INIT_STATIC3; __D2D_INIT_STATIC4; __D2D_INIT_STATIC5; __D2D_INIT_STATIC6; __D2D_INIT_STATIC7 +#endif + +#if !defined(CONCAT) +#define CONCAT(str1, str2) str1##str2 +#endif + +// Rename the entry point target function so that the actual entry point can use the name. +// This expansion is the same for both full shaders and functions. +#define D2D_PS_ENTRY(name) float4 CONCAT(name, _Impl)() + +// If neither D2D_FUNCTION or D2D_FULL_SHADER is defined, behave as if D2D_FULL_SHADER is defined. +#if defined(D2D_FUNCTION) && !defined(D2D_FULL_SHADER_ONLY) + + // Replaces simple samples with either static variable or an actual sample, + // depending on whether the input is declared as simple or complex. + #define D2DGetInput(index) __D2D_GET_INPUT##index + + #if !defined(D2D_CUSTOM_ENTRY) + // Declare function prototype for the target function so that it can be referenced before definition. + // D2D_ENTRY is a macro whose actual name resolves to the effect's target "entry point" function. + float4 CONCAT(D2D_ENTRY, _Impl)(); + + // This is the actual entry point definition, which forwards the call to the target function. + export float4 D2D_func_entry(__D2D_FUNCTION_INPUTS) + { + __D2D_INIT_STATICS; + return CONCAT(D2D_ENTRY, _Impl)(); + } + + #endif + +#else // !defined(D2D_FUNCTION) + + // Replaces simple samples with actual samples. + #define D2DGetInput(index) __D2D_SAMPLE_INPUT(index) + + #if !defined(D2D_CUSTOM_ENTRY) + // Declare function prototype for the target function so that it can be referenced before definition. + // D2D_ENTRY is a macro whose actual name resolves to the effect's target "entry point" function. + float4 CONCAT(D2D_ENTRY, _Impl)(); + + // This is the actual entry point definition, which forwards the call to the target function. + float4 D2D_ENTRY (float4 pos : SV_POSITION, __D2D_FUNCTION_INPUTS) : SV_TARGET + { + __D2D_INIT_STATICS; + return CONCAT(D2D_ENTRY, _Impl)(); + } + + #endif + +#endif // D2D_FUNCTION + +//=============================================================== +// Along with D2DGetInput defined above, the following macros and +// methods define D2D intrinsics for use in effect shader code. +//=============================================================== + +#if !defined(D2D_FUNCTION) || defined(D2D_REQUIRES_SCENE_POSITION) +inline float4 D2DGetScenePosition() +{ + return __d2dstatic_scenePos; +} +#endif + +#define D2DGetInputCoordinate(index) __d2dstatic_uv##index + +#define D2DSampleInput(index, position) InputTexture##index.Sample(InputSampler##index, position) + +#define D2DSampleInputAtOffset(index, offset) InputTexture##index.Sample(InputSampler##index, __d2dstatic_uv##index.xy + offset * __d2dstatic_uv##index.zw) + +#define D2DSampleInputAtPosition(index, pos) InputTexture##index.Sample(InputSampler##index, __d2dstatic_uv##index.xy + __d2dstatic_uv##index.zw * (pos - __d2dstatic_scenePos.xy)) + diff --git a/gfx/include/dxsdk/d2d1effects.h b/gfx/include/dxsdk/d2d1effects.h new file mode 100644 index 0000000000..0903c91e06 --- /dev/null +++ b/gfx/include/dxsdk/d2d1effects.h @@ -0,0 +1,1906 @@ +//--------------------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// This file is automatically generated. Please do not edit it directly. +// +// File name: D2D1Effects.h +//--------------------------------------------------------------------------- +#ifdef _MSC_VER +#pragma once +#endif // #ifdef _MSC_VER + +#ifndef _D2D1_EFFECTS_ +#define _D2D1_EFFECTS_ + + + +/*#include */ + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + +// Built in effect CLSIDs +DEFINE_GUID(CLSID_D2D12DAffineTransform, 0x6AA97485, 0x6354, 0x4cfc, 0x90, 0x8C, 0xE4, 0xA7, 0x4F, 0x62, 0xC9, 0x6C); +DEFINE_GUID(CLSID_D2D13DPerspectiveTransform, 0xC2844D0B, 0x3D86, 0x46e7, 0x85, 0xBA, 0x52, 0x6C, 0x92, 0x40, 0xF3, 0xFB); +DEFINE_GUID(CLSID_D2D13DTransform, 0xe8467b04, 0xec61, 0x4b8a, 0xb5, 0xde, 0xd4, 0xd7, 0x3d, 0xeb, 0xea, 0x5a); +DEFINE_GUID(CLSID_D2D1ArithmeticComposite, 0xfc151437, 0x049a, 0x4784, 0xa2, 0x4a, 0xf1, 0xc4, 0xda, 0xf2, 0x09, 0x87); +DEFINE_GUID(CLSID_D2D1Atlas, 0x913e2be4, 0xfdcf, 0x4fe2, 0xa5, 0xf0, 0x24, 0x54, 0xf1, 0x4f, 0xf4, 0x8); +DEFINE_GUID(CLSID_D2D1BitmapSource, 0x5fb6c24d, 0xc6dd, 0x4231, 0x94, 0x4, 0x50, 0xf4, 0xd5, 0xc3, 0x25, 0x2d); +DEFINE_GUID(CLSID_D2D1Blend, 0x81c5b77b, 0x13f8, 0x4cdd, 0xad, 0x20, 0xc8, 0x90, 0x54, 0x7a, 0xc6, 0x5d); +DEFINE_GUID(CLSID_D2D1Border, 0x2A2D49C0, 0x4ACF, 0x43c7, 0x8C, 0x6A, 0x7C, 0x4A, 0x27, 0x87, 0x4D, 0x27); +DEFINE_GUID(CLSID_D2D1Brightness, 0x8cea8d1e, 0x77b0, 0x4986, 0xb3, 0xb9, 0x2f, 0x0c, 0x0e, 0xae, 0x78, 0x87); +DEFINE_GUID(CLSID_D2D1ColorManagement, 0x1A28524C, 0xFDD6, 0x4AA4, 0xAE, 0x8F, 0x83, 0x7E, 0xB8, 0x26, 0x7B, 0x37); +DEFINE_GUID(CLSID_D2D1ColorMatrix, 0x921F03D6, 0x641C, 0x47DF, 0x85, 0x2D, 0xB4, 0xBB, 0x61, 0x53, 0xAE, 0x11); +DEFINE_GUID(CLSID_D2D1Composite, 0x48fc9f51, 0xf6ac, 0x48f1, 0x8b, 0x58, 0x3b, 0x28, 0xac, 0x46, 0xf7, 0x6d); +DEFINE_GUID(CLSID_D2D1ConvolveMatrix, 0x407f8c08, 0x5533, 0x4331, 0xa3, 0x41, 0x23, 0xcc, 0x38, 0x77, 0x84, 0x3e); +DEFINE_GUID(CLSID_D2D1Crop, 0xE23F7110, 0x0E9A, 0x4324, 0xAF, 0x47, 0x6A, 0x2C, 0x0C, 0x46, 0xF3, 0x5B); +DEFINE_GUID(CLSID_D2D1DirectionalBlur, 0x174319a6, 0x58e9, 0x49b2, 0xbb, 0x63, 0xca, 0xf2, 0xc8, 0x11, 0xa3, 0xdb); +DEFINE_GUID(CLSID_D2D1DiscreteTransfer, 0x90866fcd, 0x488e, 0x454b, 0xaf, 0x06, 0xe5, 0x04, 0x1b, 0x66, 0xc3, 0x6c); +DEFINE_GUID(CLSID_D2D1DisplacementMap, 0xedc48364, 0x417, 0x4111, 0x94, 0x50, 0x43, 0x84, 0x5f, 0xa9, 0xf8, 0x90); +DEFINE_GUID(CLSID_D2D1DistantDiffuse, 0x3e7efd62, 0xa32d, 0x46d4, 0xa8, 0x3c, 0x52, 0x78, 0x88, 0x9a, 0xc9, 0x54); +DEFINE_GUID(CLSID_D2D1DistantSpecular, 0x428c1ee5, 0x77b8, 0x4450, 0x8a, 0xb5, 0x72, 0x21, 0x9c, 0x21, 0xab, 0xda); +DEFINE_GUID(CLSID_D2D1DpiCompensation, 0x6c26c5c7, 0x34e0, 0x46fc, 0x9c, 0xfd, 0xe5, 0x82, 0x37, 0x6, 0xe2, 0x28); +DEFINE_GUID(CLSID_D2D1Flood, 0x61c23c20, 0xae69, 0x4d8e, 0x94, 0xcf, 0x50, 0x07, 0x8d, 0xf6, 0x38, 0xf2); +DEFINE_GUID(CLSID_D2D1GammaTransfer, 0x409444c4, 0xc419, 0x41a0, 0xb0, 0xc1, 0x8c, 0xd0, 0xc0, 0xa1, 0x8e, 0x42); +DEFINE_GUID(CLSID_D2D1GaussianBlur, 0x1feb6d69, 0x2fe6, 0x4ac9, 0x8c, 0x58, 0x1d, 0x7f, 0x93, 0xe7, 0xa6, 0xa5); +DEFINE_GUID(CLSID_D2D1Scale, 0x9daf9369, 0x3846, 0x4d0e, 0xa4, 0x4e, 0xc, 0x60, 0x79, 0x34, 0xa5, 0xd7); +DEFINE_GUID(CLSID_D2D1Histogram, 0x881db7d0, 0xf7ee, 0x4d4d, 0xa6, 0xd2, 0x46, 0x97, 0xac, 0xc6, 0x6e, 0xe8); +DEFINE_GUID(CLSID_D2D1HueRotation, 0x0f4458ec, 0x4b32, 0x491b, 0x9e, 0x85, 0xbd, 0x73, 0xf4, 0x4d, 0x3e, 0xb6); +DEFINE_GUID(CLSID_D2D1LinearTransfer, 0xad47c8fd, 0x63ef, 0x4acc, 0x9b, 0x51, 0x67, 0x97, 0x9c, 0x03, 0x6c, 0x06); +DEFINE_GUID(CLSID_D2D1LuminanceToAlpha, 0x41251ab7, 0x0beb, 0x46f8, 0x9d, 0xa7, 0x59, 0xe9, 0x3f, 0xcc, 0xe5, 0xde); +DEFINE_GUID(CLSID_D2D1Morphology, 0xeae6c40d, 0x626a, 0x4c2d, 0xbf, 0xcb, 0x39, 0x10, 0x01, 0xab, 0xe2, 0x02); +DEFINE_GUID(CLSID_D2D1OpacityMetadata, 0x6c53006a, 0x4450, 0x4199, 0xaa, 0x5b, 0xad, 0x16, 0x56, 0xfe, 0xce, 0x5e); +DEFINE_GUID(CLSID_D2D1PointDiffuse, 0xb9e303c3, 0xc08c, 0x4f91, 0x8b, 0x7b, 0x38, 0x65, 0x6b, 0xc4, 0x8c, 0x20); +DEFINE_GUID(CLSID_D2D1PointSpecular, 0x09c3ca26, 0x3ae2, 0x4f09, 0x9e, 0xbc, 0xed, 0x38, 0x65, 0xd5, 0x3f, 0x22); +DEFINE_GUID(CLSID_D2D1Premultiply, 0x06eab419, 0xdeed, 0x4018, 0x80, 0xd2, 0x3e, 0x1d, 0x47, 0x1a, 0xde, 0xb2); +DEFINE_GUID(CLSID_D2D1Saturation, 0x5cb2d9cf, 0x327d, 0x459f, 0xa0, 0xce, 0x40, 0xc0, 0xb2, 0x08, 0x6b, 0xf7); +DEFINE_GUID(CLSID_D2D1Shadow, 0xC67EA361, 0x1863, 0x4e69, 0x89, 0xDB, 0x69, 0x5D, 0x3E, 0x9A, 0x5B, 0x6B); +DEFINE_GUID(CLSID_D2D1SpotDiffuse, 0x818a1105, 0x7932, 0x44f4, 0xaa, 0x86, 0x08, 0xae, 0x7b, 0x2f, 0x2c, 0x93); +DEFINE_GUID(CLSID_D2D1SpotSpecular, 0xedae421e, 0x7654, 0x4a37, 0x9d, 0xb8, 0x71, 0xac, 0xc1, 0xbe, 0xb3, 0xc1); +DEFINE_GUID(CLSID_D2D1TableTransfer, 0x5bf818c3, 0x5e43, 0x48cb, 0xb6, 0x31, 0x86, 0x83, 0x96, 0xd6, 0xa1, 0xd4); +DEFINE_GUID(CLSID_D2D1Tile, 0xB0784138, 0x3B76, 0x4bc5, 0xB1, 0x3B, 0x0F, 0xA2, 0xAD, 0x02, 0x65, 0x9F); +DEFINE_GUID(CLSID_D2D1Turbulence, 0xCF2BB6AE, 0x889A, 0x4ad7, 0xBA, 0x29, 0xA2, 0xFD, 0x73, 0x2C, 0x9F, 0xC9); +DEFINE_GUID(CLSID_D2D1UnPremultiply, 0xfb9ac489, 0xad8d, 0x41ed, 0x99, 0x99, 0xbb, 0x63, 0x47, 0xd1, 0x10, 0xf7); + + +///

+/// Specifies how the Crop effect handles the crop rectangle falling on fractional +/// pixel coordinates. +/// +typedef enum D2D1_BORDER_MODE +{ + D2D1_BORDER_MODE_SOFT = 0, + D2D1_BORDER_MODE_HARD = 1, + D2D1_BORDER_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_BORDER_MODE; + + +/// +/// Specifies the color channel the Displacement map effect extracts the intensity +/// from and uses it to spatially displace the image in the X or Y direction. +/// +typedef enum D2D1_CHANNEL_SELECTOR +{ + D2D1_CHANNEL_SELECTOR_R = 0, + D2D1_CHANNEL_SELECTOR_G = 1, + D2D1_CHANNEL_SELECTOR_B = 2, + D2D1_CHANNEL_SELECTOR_A = 3, + D2D1_CHANNEL_SELECTOR_FORCE_DWORD = 0xffffffff + +} D2D1_CHANNEL_SELECTOR; + + +/// +/// Speficies whether a flip and/or rotation operation should be performed by the +/// Bitmap source effect +/// +typedef enum D2D1_BITMAPSOURCE_ORIENTATION +{ + D2D1_BITMAPSOURCE_ORIENTATION_DEFAULT = 1, + D2D1_BITMAPSOURCE_ORIENTATION_FLIP_HORIZONTAL = 2, + D2D1_BITMAPSOURCE_ORIENTATION_ROTATE_CLOCKWISE180 = 3, + D2D1_BITMAPSOURCE_ORIENTATION_ROTATE_CLOCKWISE180_FLIP_HORIZONTAL = 4, + D2D1_BITMAPSOURCE_ORIENTATION_ROTATE_CLOCKWISE270_FLIP_HORIZONTAL = 5, + D2D1_BITMAPSOURCE_ORIENTATION_ROTATE_CLOCKWISE90 = 6, + D2D1_BITMAPSOURCE_ORIENTATION_ROTATE_CLOCKWISE90_FLIP_HORIZONTAL = 7, + D2D1_BITMAPSOURCE_ORIENTATION_ROTATE_CLOCKWISE270 = 8, + D2D1_BITMAPSOURCE_ORIENTATION_FORCE_DWORD = 0xffffffff + +} D2D1_BITMAPSOURCE_ORIENTATION; + + +/// +/// The enumeration of the Gaussian Blur effect's top level properties. +/// +typedef enum D2D1_GAUSSIANBLUR_PROP +{ + + /// + /// Property Name: "StandardDeviation" + /// Property Type: FLOAT + /// + D2D1_GAUSSIANBLUR_PROP_STANDARD_DEVIATION = 0, + + /// + /// Property Name: "Optimization" + /// Property Type: D2D1_GAUSSIANBLUR_OPTIMIZATION + /// + D2D1_GAUSSIANBLUR_PROP_OPTIMIZATION = 1, + + /// + /// Property Name: "BorderMode" + /// Property Type: D2D1_BORDER_MODE + /// + D2D1_GAUSSIANBLUR_PROP_BORDER_MODE = 2, + D2D1_GAUSSIANBLUR_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_GAUSSIANBLUR_PROP; + +typedef enum D2D1_GAUSSIANBLUR_OPTIMIZATION +{ + D2D1_GAUSSIANBLUR_OPTIMIZATION_SPEED = 0, + D2D1_GAUSSIANBLUR_OPTIMIZATION_BALANCED = 1, + D2D1_GAUSSIANBLUR_OPTIMIZATION_QUALITY = 2, + D2D1_GAUSSIANBLUR_OPTIMIZATION_FORCE_DWORD = 0xffffffff + +} D2D1_GAUSSIANBLUR_OPTIMIZATION; + + +/// +/// The enumeration of the Directional Blur effect's top level properties. +/// +typedef enum D2D1_DIRECTIONALBLUR_PROP +{ + + /// + /// Property Name: "StandardDeviation" + /// Property Type: FLOAT + /// + D2D1_DIRECTIONALBLUR_PROP_STANDARD_DEVIATION = 0, + + /// + /// Property Name: "Angle" + /// Property Type: FLOAT + /// + D2D1_DIRECTIONALBLUR_PROP_ANGLE = 1, + + /// + /// Property Name: "Optimization" + /// Property Type: D2D1_DIRECTIONALBLUR_OPTIMIZATION + /// + D2D1_DIRECTIONALBLUR_PROP_OPTIMIZATION = 2, + + /// + /// Property Name: "BorderMode" + /// Property Type: D2D1_BORDER_MODE + /// + D2D1_DIRECTIONALBLUR_PROP_BORDER_MODE = 3, + D2D1_DIRECTIONALBLUR_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_DIRECTIONALBLUR_PROP; + +typedef enum D2D1_DIRECTIONALBLUR_OPTIMIZATION +{ + D2D1_DIRECTIONALBLUR_OPTIMIZATION_SPEED = 0, + D2D1_DIRECTIONALBLUR_OPTIMIZATION_BALANCED = 1, + D2D1_DIRECTIONALBLUR_OPTIMIZATION_QUALITY = 2, + D2D1_DIRECTIONALBLUR_OPTIMIZATION_FORCE_DWORD = 0xffffffff + +} D2D1_DIRECTIONALBLUR_OPTIMIZATION; + + +/// +/// The enumeration of the Shadow effect's top level properties. +/// +typedef enum D2D1_SHADOW_PROP +{ + + /// + /// Property Name: "BlurStandardDeviation" + /// Property Type: FLOAT + /// + D2D1_SHADOW_PROP_BLUR_STANDARD_DEVIATION = 0, + + /// + /// Property Name: "Color" + /// Property Type: D2D1_VECTOR_4F + /// + D2D1_SHADOW_PROP_COLOR = 1, + + /// + /// Property Name: "Optimization" + /// Property Type: D2D1_SHADOW_OPTIMIZATION + /// + D2D1_SHADOW_PROP_OPTIMIZATION = 2, + D2D1_SHADOW_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_SHADOW_PROP; + +typedef enum D2D1_SHADOW_OPTIMIZATION +{ + D2D1_SHADOW_OPTIMIZATION_SPEED = 0, + D2D1_SHADOW_OPTIMIZATION_BALANCED = 1, + D2D1_SHADOW_OPTIMIZATION_QUALITY = 2, + D2D1_SHADOW_OPTIMIZATION_FORCE_DWORD = 0xffffffff + +} D2D1_SHADOW_OPTIMIZATION; + + +/// +/// The enumeration of the Blend effect's top level properties. +/// +typedef enum D2D1_BLEND_PROP +{ + + /// + /// Property Name: "Mode" + /// Property Type: D2D1_BLEND_MODE + /// + D2D1_BLEND_PROP_MODE = 0, + D2D1_BLEND_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_BLEND_PROP; + +typedef enum D2D1_BLEND_MODE +{ + D2D1_BLEND_MODE_MULTIPLY = 0, + D2D1_BLEND_MODE_SCREEN = 1, + D2D1_BLEND_MODE_DARKEN = 2, + D2D1_BLEND_MODE_LIGHTEN = 3, + D2D1_BLEND_MODE_DISSOLVE = 4, + D2D1_BLEND_MODE_COLOR_BURN = 5, + D2D1_BLEND_MODE_LINEAR_BURN = 6, + D2D1_BLEND_MODE_DARKER_COLOR = 7, + D2D1_BLEND_MODE_LIGHTER_COLOR = 8, + D2D1_BLEND_MODE_COLOR_DODGE = 9, + D2D1_BLEND_MODE_LINEAR_DODGE = 10, + D2D1_BLEND_MODE_OVERLAY = 11, + D2D1_BLEND_MODE_SOFT_LIGHT = 12, + D2D1_BLEND_MODE_HARD_LIGHT = 13, + D2D1_BLEND_MODE_VIVID_LIGHT = 14, + D2D1_BLEND_MODE_LINEAR_LIGHT = 15, + D2D1_BLEND_MODE_PIN_LIGHT = 16, + D2D1_BLEND_MODE_HARD_MIX = 17, + D2D1_BLEND_MODE_DIFFERENCE = 18, + D2D1_BLEND_MODE_EXCLUSION = 19, + D2D1_BLEND_MODE_HUE = 20, + D2D1_BLEND_MODE_SATURATION = 21, + D2D1_BLEND_MODE_COLOR = 22, + D2D1_BLEND_MODE_LUMINOSITY = 23, + D2D1_BLEND_MODE_SUBTRACT = 24, + D2D1_BLEND_MODE_DIVISION = 25, + D2D1_BLEND_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_BLEND_MODE; + + +/// +/// The enumeration of the Saturation effect's top level properties. +/// +typedef enum D2D1_SATURATION_PROP +{ + + /// + /// Property Name: "Saturation" + /// Property Type: FLOAT + /// + D2D1_SATURATION_PROP_SATURATION = 0, + D2D1_SATURATION_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_SATURATION_PROP; + + +/// +/// The enumeration of the Hue Rotation effect's top level properties. +/// +typedef enum D2D1_HUEROTATION_PROP +{ + + /// + /// Property Name: "Angle" + /// Property Type: FLOAT + /// + D2D1_HUEROTATION_PROP_ANGLE = 0, + D2D1_HUEROTATION_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_HUEROTATION_PROP; + + +/// +/// The enumeration of the Color Matrix effect's top level properties. +/// +typedef enum D2D1_COLORMATRIX_PROP +{ + + /// + /// Property Name: "ColorMatrix" + /// Property Type: D2D1_MATRIX_5X4_F + /// + D2D1_COLORMATRIX_PROP_COLOR_MATRIX = 0, + + /// + /// Property Name: "AlphaMode" + /// Property Type: D2D1_COLORMATRIX_ALPHA_MODE + /// + D2D1_COLORMATRIX_PROP_ALPHA_MODE = 1, + + /// + /// Property Name: "ClampOutput" + /// Property Type: BOOL + /// + D2D1_COLORMATRIX_PROP_CLAMP_OUTPUT = 2, + D2D1_COLORMATRIX_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_COLORMATRIX_PROP; + +typedef enum D2D1_COLORMATRIX_ALPHA_MODE +{ + D2D1_COLORMATRIX_ALPHA_MODE_PREMULTIPLIED = 1, + D2D1_COLORMATRIX_ALPHA_MODE_STRAIGHT = 2, + D2D1_COLORMATRIX_ALPHA_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_COLORMATRIX_ALPHA_MODE; + + +/// +/// The enumeration of the Bitmap Source effect's top level properties. +/// +typedef enum D2D1_BITMAPSOURCE_PROP +{ + + /// + /// Property Name: "WicBitmapSource" + /// Property Type: IUnknown * + /// + D2D1_BITMAPSOURCE_PROP_WIC_BITMAP_SOURCE = 0, + + /// + /// Property Name: "Scale" + /// Property Type: D2D1_VECTOR_2F + /// + D2D1_BITMAPSOURCE_PROP_SCALE = 1, + + /// + /// Property Name: "InterpolationMode" + /// Property Type: D2D1_BITMAPSOURCE_INTERPOLATION_MODE + /// + D2D1_BITMAPSOURCE_PROP_INTERPOLATION_MODE = 2, + + /// + /// Property Name: "EnableDPICorrection" + /// Property Type: BOOL + /// + D2D1_BITMAPSOURCE_PROP_ENABLE_DPI_CORRECTION = 3, + + /// + /// Property Name: "AlphaMode" + /// Property Type: D2D1_BITMAPSOURCE_ALPHA_MODE + /// + D2D1_BITMAPSOURCE_PROP_ALPHA_MODE = 4, + + /// + /// Property Name: "Orientation" + /// Property Type: D2D1_BITMAPSOURCE_ORIENTATION + /// + D2D1_BITMAPSOURCE_PROP_ORIENTATION = 5, + D2D1_BITMAPSOURCE_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_BITMAPSOURCE_PROP; + +typedef enum D2D1_BITMAPSOURCE_INTERPOLATION_MODE +{ + D2D1_BITMAPSOURCE_INTERPOLATION_MODE_NEAREST_NEIGHBOR = 0, + D2D1_BITMAPSOURCE_INTERPOLATION_MODE_LINEAR = 1, + D2D1_BITMAPSOURCE_INTERPOLATION_MODE_CUBIC = 2, + D2D1_BITMAPSOURCE_INTERPOLATION_MODE_FANT = 6, + D2D1_BITMAPSOURCE_INTERPOLATION_MODE_MIPMAP_LINEAR = 7, + D2D1_BITMAPSOURCE_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_BITMAPSOURCE_INTERPOLATION_MODE; + +typedef enum D2D1_BITMAPSOURCE_ALPHA_MODE +{ + D2D1_BITMAPSOURCE_ALPHA_MODE_PREMULTIPLIED = 1, + D2D1_BITMAPSOURCE_ALPHA_MODE_STRAIGHT = 2, + D2D1_BITMAPSOURCE_ALPHA_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_BITMAPSOURCE_ALPHA_MODE; + + +/// +/// The enumeration of the Composite effect's top level properties. +/// +typedef enum D2D1_COMPOSITE_PROP +{ + + /// + /// Property Name: "Mode" + /// Property Type: D2D1_COMPOSITE_MODE + /// + D2D1_COMPOSITE_PROP_MODE = 0, + D2D1_COMPOSITE_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_COMPOSITE_PROP; + + +/// +/// The enumeration of the 3D Transform effect's top level properties. +/// +typedef enum D2D1_3DTRANSFORM_PROP +{ + + /// + /// Property Name: "InterpolationMode" + /// Property Type: D2D1_3DTRANSFORM_INTERPOLATION_MODE + /// + D2D1_3DTRANSFORM_PROP_INTERPOLATION_MODE = 0, + + /// + /// Property Name: "BorderMode" + /// Property Type: D2D1_BORDER_MODE + /// + D2D1_3DTRANSFORM_PROP_BORDER_MODE = 1, + + /// + /// Property Name: "TransformMatrix" + /// Property Type: D2D1_MATRIX_4X4_F + /// + D2D1_3DTRANSFORM_PROP_TRANSFORM_MATRIX = 2, + D2D1_3DTRANSFORM_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_3DTRANSFORM_PROP; + +typedef enum D2D1_3DTRANSFORM_INTERPOLATION_MODE +{ + D2D1_3DTRANSFORM_INTERPOLATION_MODE_NEAREST_NEIGHBOR = 0, + D2D1_3DTRANSFORM_INTERPOLATION_MODE_LINEAR = 1, + D2D1_3DTRANSFORM_INTERPOLATION_MODE_CUBIC = 2, + D2D1_3DTRANSFORM_INTERPOLATION_MODE_MULTI_SAMPLE_LINEAR = 3, + D2D1_3DTRANSFORM_INTERPOLATION_MODE_ANISOTROPIC = 4, + D2D1_3DTRANSFORM_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_3DTRANSFORM_INTERPOLATION_MODE; + + +/// +/// The enumeration of the 3D Perspective Transform effect's top level properties. +/// +typedef enum D2D1_3DPERSPECTIVETRANSFORM_PROP +{ + + /// + /// Property Name: "InterpolationMode" + /// Property Type: D2D1_3DPERSPECTIVETRANSFORM_INTERPOLATION_MODE + /// + D2D1_3DPERSPECTIVETRANSFORM_PROP_INTERPOLATION_MODE = 0, + + /// + /// Property Name: "BorderMode" + /// Property Type: D2D1_BORDER_MODE + /// + D2D1_3DPERSPECTIVETRANSFORM_PROP_BORDER_MODE = 1, + + /// + /// Property Name: "Depth" + /// Property Type: FLOAT + /// + D2D1_3DPERSPECTIVETRANSFORM_PROP_DEPTH = 2, + + /// + /// Property Name: "PerspectiveOrigin" + /// Property Type: D2D1_VECTOR_2F + /// + D2D1_3DPERSPECTIVETRANSFORM_PROP_PERSPECTIVE_ORIGIN = 3, + + /// + /// Property Name: "LocalOffset" + /// Property Type: D2D1_VECTOR_3F + /// + D2D1_3DPERSPECTIVETRANSFORM_PROP_LOCAL_OFFSET = 4, + + /// + /// Property Name: "GlobalOffset" + /// Property Type: D2D1_VECTOR_3F + /// + D2D1_3DPERSPECTIVETRANSFORM_PROP_GLOBAL_OFFSET = 5, + + /// + /// Property Name: "RotationOrigin" + /// Property Type: D2D1_VECTOR_3F + /// + D2D1_3DPERSPECTIVETRANSFORM_PROP_ROTATION_ORIGIN = 6, + + /// + /// Property Name: "Rotation" + /// Property Type: D2D1_VECTOR_3F + /// + D2D1_3DPERSPECTIVETRANSFORM_PROP_ROTATION = 7, + D2D1_3DPERSPECTIVETRANSFORM_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_3DPERSPECTIVETRANSFORM_PROP; + +typedef enum D2D1_3DPERSPECTIVETRANSFORM_INTERPOLATION_MODE +{ + D2D1_3DPERSPECTIVETRANSFORM_INTERPOLATION_MODE_NEAREST_NEIGHBOR = 0, + D2D1_3DPERSPECTIVETRANSFORM_INTERPOLATION_MODE_LINEAR = 1, + D2D1_3DPERSPECTIVETRANSFORM_INTERPOLATION_MODE_CUBIC = 2, + D2D1_3DPERSPECTIVETRANSFORM_INTERPOLATION_MODE_MULTI_SAMPLE_LINEAR = 3, + D2D1_3DPERSPECTIVETRANSFORM_INTERPOLATION_MODE_ANISOTROPIC = 4, + D2D1_3DPERSPECTIVETRANSFORM_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_3DPERSPECTIVETRANSFORM_INTERPOLATION_MODE; + + +/// +/// The enumeration of the 2D Affine Transform effect's top level properties. +/// +typedef enum D2D1_2DAFFINETRANSFORM_PROP +{ + + /// + /// Property Name: "InterpolationMode" + /// Property Type: D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE + /// + D2D1_2DAFFINETRANSFORM_PROP_INTERPOLATION_MODE = 0, + + /// + /// Property Name: "BorderMode" + /// Property Type: D2D1_BORDER_MODE + /// + D2D1_2DAFFINETRANSFORM_PROP_BORDER_MODE = 1, + + /// + /// Property Name: "TransformMatrix" + /// Property Type: D2D1_MATRIX_3X2_F + /// + D2D1_2DAFFINETRANSFORM_PROP_TRANSFORM_MATRIX = 2, + + /// + /// Property Name: "Sharpness" + /// Property Type: FLOAT + /// + D2D1_2DAFFINETRANSFORM_PROP_SHARPNESS = 3, + D2D1_2DAFFINETRANSFORM_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_2DAFFINETRANSFORM_PROP; + +typedef enum D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE +{ + D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE_NEAREST_NEIGHBOR = 0, + D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE_LINEAR = 1, + D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE_CUBIC = 2, + D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE_MULTI_SAMPLE_LINEAR = 3, + D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE_ANISOTROPIC = 4, + D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC = 5, + D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE; + + +/// +/// The enumeration of the DPI Compensation effect's top level properties. +/// +typedef enum D2D1_DPICOMPENSATION_PROP +{ + + /// + /// Property Name: "InterpolationMode" + /// Property Type: D2D1_DPICOMPENSATION_INTERPOLATION_MODE + /// + D2D1_DPICOMPENSATION_PROP_INTERPOLATION_MODE = 0, + + /// + /// Property Name: "BorderMode" + /// Property Type: D2D1_BORDER_MODE + /// + D2D1_DPICOMPENSATION_PROP_BORDER_MODE = 1, + + /// + /// Property Name: "InputDpi" + /// Property Type: D2D1_VECTOR_2F + /// + D2D1_DPICOMPENSATION_PROP_INPUT_DPI = 2, + D2D1_DPICOMPENSATION_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_DPICOMPENSATION_PROP; + +typedef enum D2D1_DPICOMPENSATION_INTERPOLATION_MODE +{ + D2D1_DPICOMPENSATION_INTERPOLATION_MODE_NEAREST_NEIGHBOR = 0, + D2D1_DPICOMPENSATION_INTERPOLATION_MODE_LINEAR = 1, + D2D1_DPICOMPENSATION_INTERPOLATION_MODE_CUBIC = 2, + D2D1_DPICOMPENSATION_INTERPOLATION_MODE_MULTI_SAMPLE_LINEAR = 3, + D2D1_DPICOMPENSATION_INTERPOLATION_MODE_ANISOTROPIC = 4, + D2D1_DPICOMPENSATION_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC = 5, + D2D1_DPICOMPENSATION_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_DPICOMPENSATION_INTERPOLATION_MODE; + + +/// +/// The enumeration of the Scale effect's top level properties. +/// +typedef enum D2D1_SCALE_PROP +{ + + /// + /// Property Name: "Scale" + /// Property Type: D2D1_VECTOR_2F + /// + D2D1_SCALE_PROP_SCALE = 0, + + /// + /// Property Name: "CenterPoint" + /// Property Type: D2D1_VECTOR_2F + /// + D2D1_SCALE_PROP_CENTER_POINT = 1, + + /// + /// Property Name: "InterpolationMode" + /// Property Type: D2D1_SCALE_INTERPOLATION_MODE + /// + D2D1_SCALE_PROP_INTERPOLATION_MODE = 2, + + /// + /// Property Name: "BorderMode" + /// Property Type: D2D1_BORDER_MODE + /// + D2D1_SCALE_PROP_BORDER_MODE = 3, + + /// + /// Property Name: "Sharpness" + /// Property Type: FLOAT + /// + D2D1_SCALE_PROP_SHARPNESS = 4, + D2D1_SCALE_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_SCALE_PROP; + +typedef enum D2D1_SCALE_INTERPOLATION_MODE +{ + D2D1_SCALE_INTERPOLATION_MODE_NEAREST_NEIGHBOR = 0, + D2D1_SCALE_INTERPOLATION_MODE_LINEAR = 1, + D2D1_SCALE_INTERPOLATION_MODE_CUBIC = 2, + D2D1_SCALE_INTERPOLATION_MODE_MULTI_SAMPLE_LINEAR = 3, + D2D1_SCALE_INTERPOLATION_MODE_ANISOTROPIC = 4, + D2D1_SCALE_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC = 5, + D2D1_SCALE_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_SCALE_INTERPOLATION_MODE; + + +/// +/// The enumeration of the Turbulence effect's top level properties. +/// +typedef enum D2D1_TURBULENCE_PROP +{ + + /// + /// Property Name: "Offset" + /// Property Type: D2D1_VECTOR_2F + /// + D2D1_TURBULENCE_PROP_OFFSET = 0, + + /// + /// Property Name: "Size" + /// Property Type: D2D1_VECTOR_2F + /// + D2D1_TURBULENCE_PROP_SIZE = 1, + + /// + /// Property Name: "BaseFrequency" + /// Property Type: D2D1_VECTOR_2F + /// + D2D1_TURBULENCE_PROP_BASE_FREQUENCY = 2, + + /// + /// Property Name: "NumOctaves" + /// Property Type: UINT32 + /// + D2D1_TURBULENCE_PROP_NUM_OCTAVES = 3, + + /// + /// Property Name: "Seed" + /// Property Type: INT32 + /// + D2D1_TURBULENCE_PROP_SEED = 4, + + /// + /// Property Name: "Noise" + /// Property Type: D2D1_TURBULENCE_NOISE + /// + D2D1_TURBULENCE_PROP_NOISE = 5, + + /// + /// Property Name: "Stitchable" + /// Property Type: BOOL + /// + D2D1_TURBULENCE_PROP_STITCHABLE = 6, + D2D1_TURBULENCE_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_TURBULENCE_PROP; + +typedef enum D2D1_TURBULENCE_NOISE +{ + D2D1_TURBULENCE_NOISE_FRACTAL_SUM = 0, + D2D1_TURBULENCE_NOISE_TURBULENCE = 1, + D2D1_TURBULENCE_NOISE_FORCE_DWORD = 0xffffffff + +} D2D1_TURBULENCE_NOISE; + + +/// +/// The enumeration of the Displacement Map effect's top level properties. +/// +typedef enum D2D1_DISPLACEMENTMAP_PROP +{ + + /// + /// Property Name: "Scale" + /// Property Type: FLOAT + /// + D2D1_DISPLACEMENTMAP_PROP_SCALE = 0, + + /// + /// Property Name: "XChannelSelect" + /// Property Type: D2D1_CHANNEL_SELECTOR + /// + D2D1_DISPLACEMENTMAP_PROP_X_CHANNEL_SELECT = 1, + + /// + /// Property Name: "YChannelSelect" + /// Property Type: D2D1_CHANNEL_SELECTOR + /// + D2D1_DISPLACEMENTMAP_PROP_Y_CHANNEL_SELECT = 2, + D2D1_DISPLACEMENTMAP_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_DISPLACEMENTMAP_PROP; + + +/// +/// The enumeration of the Color Management effect's top level properties. +/// +typedef enum D2D1_COLORMANAGEMENT_PROP +{ + + /// + /// Property Name: "SourceColorContext" + /// Property Type: ID2D1ColorContext * + /// + D2D1_COLORMANAGEMENT_PROP_SOURCE_COLOR_CONTEXT = 0, + + /// + /// Property Name: "SourceRenderingIntent" + /// Property Type: D2D1_RENDERING_INTENT + /// + D2D1_COLORMANAGEMENT_PROP_SOURCE_RENDERING_INTENT = 1, + + /// + /// Property Name: "DestinationColorContext" + /// Property Type: ID2D1ColorContext * + /// + D2D1_COLORMANAGEMENT_PROP_DESTINATION_COLOR_CONTEXT = 2, + + /// + /// Property Name: "DestinationRenderingIntent" + /// Property Type: D2D1_RENDERING_INTENT + /// + D2D1_COLORMANAGEMENT_PROP_DESTINATION_RENDERING_INTENT = 3, + + /// + /// Property Name: "AlphaMode" + /// Property Type: D2D1_COLORMANAGEMENT_ALPHA_MODE + /// + D2D1_COLORMANAGEMENT_PROP_ALPHA_MODE = 4, + + /// + /// Property Name: "Quality" + /// Property Type: D2D1_COLORMANAGEMENT_QUALITY + /// + D2D1_COLORMANAGEMENT_PROP_QUALITY = 5, + D2D1_COLORMANAGEMENT_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_COLORMANAGEMENT_PROP; + +typedef enum D2D1_COLORMANAGEMENT_ALPHA_MODE +{ + D2D1_COLORMANAGEMENT_ALPHA_MODE_PREMULTIPLIED = 1, + D2D1_COLORMANAGEMENT_ALPHA_MODE_STRAIGHT = 2, + D2D1_COLORMANAGEMENT_ALPHA_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_COLORMANAGEMENT_ALPHA_MODE; + +typedef enum D2D1_COLORMANAGEMENT_QUALITY +{ + D2D1_COLORMANAGEMENT_QUALITY_PROOF = 0, + D2D1_COLORMANAGEMENT_QUALITY_NORMAL = 1, + D2D1_COLORMANAGEMENT_QUALITY_BEST = 2, + D2D1_COLORMANAGEMENT_QUALITY_FORCE_DWORD = 0xffffffff + +} D2D1_COLORMANAGEMENT_QUALITY; + + +/// +/// Specifies which ICC rendering intent the Color management effect should use. +/// +typedef enum D2D1_COLORMANAGEMENT_RENDERING_INTENT +{ + D2D1_COLORMANAGEMENT_RENDERING_INTENT_PERCEPTUAL = 0, + D2D1_COLORMANAGEMENT_RENDERING_INTENT_RELATIVE_COLORIMETRIC = 1, + D2D1_COLORMANAGEMENT_RENDERING_INTENT_SATURATION = 2, + D2D1_COLORMANAGEMENT_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC = 3, + D2D1_COLORMANAGEMENT_RENDERING_INTENT_FORCE_DWORD = 0xffffffff + +} D2D1_COLORMANAGEMENT_RENDERING_INTENT; + + +/// +/// The enumeration of the Histogram effect's top level properties. +/// +typedef enum D2D1_HISTOGRAM_PROP +{ + + /// + /// Property Name: "NumBins" + /// Property Type: UINT32 + /// + D2D1_HISTOGRAM_PROP_NUM_BINS = 0, + + /// + /// Property Name: "ChannelSelect" + /// Property Type: D2D1_CHANNEL_SELECTOR + /// + D2D1_HISTOGRAM_PROP_CHANNEL_SELECT = 1, + + /// + /// Property Name: "HistogramOutput" + /// Property Type: (blob) + /// + D2D1_HISTOGRAM_PROP_HISTOGRAM_OUTPUT = 2, + D2D1_HISTOGRAM_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_HISTOGRAM_PROP; + + +/// +/// The enumeration of the Point-Specular effect's top level properties. +/// +typedef enum D2D1_POINTSPECULAR_PROP +{ + + /// + /// Property Name: "LightPosition" + /// Property Type: D2D1_VECTOR_3F + /// + D2D1_POINTSPECULAR_PROP_LIGHT_POSITION = 0, + + /// + /// Property Name: "SpecularExponent" + /// Property Type: FLOAT + /// + D2D1_POINTSPECULAR_PROP_SPECULAR_EXPONENT = 1, + + /// + /// Property Name: "SpecularConstant" + /// Property Type: FLOAT + /// + D2D1_POINTSPECULAR_PROP_SPECULAR_CONSTANT = 2, + + /// + /// Property Name: "SurfaceScale" + /// Property Type: FLOAT + /// + D2D1_POINTSPECULAR_PROP_SURFACE_SCALE = 3, + + /// + /// Property Name: "Color" + /// Property Type: D2D1_VECTOR_3F + /// + D2D1_POINTSPECULAR_PROP_COLOR = 4, + + /// + /// Property Name: "KernelUnitLength" + /// Property Type: D2D1_VECTOR_2F + /// + D2D1_POINTSPECULAR_PROP_KERNEL_UNIT_LENGTH = 5, + + /// + /// Property Name: "ScaleMode" + /// Property Type: D2D1_POINTSPECULAR_SCALE_MODE + /// + D2D1_POINTSPECULAR_PROP_SCALE_MODE = 6, + D2D1_POINTSPECULAR_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_POINTSPECULAR_PROP; + +typedef enum D2D1_POINTSPECULAR_SCALE_MODE +{ + D2D1_POINTSPECULAR_SCALE_MODE_NEAREST_NEIGHBOR = 0, + D2D1_POINTSPECULAR_SCALE_MODE_LINEAR = 1, + D2D1_POINTSPECULAR_SCALE_MODE_CUBIC = 2, + D2D1_POINTSPECULAR_SCALE_MODE_MULTI_SAMPLE_LINEAR = 3, + D2D1_POINTSPECULAR_SCALE_MODE_ANISOTROPIC = 4, + D2D1_POINTSPECULAR_SCALE_MODE_HIGH_QUALITY_CUBIC = 5, + D2D1_POINTSPECULAR_SCALE_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_POINTSPECULAR_SCALE_MODE; + + +/// +/// The enumeration of the Spot-Specular effect's top level properties. +/// +typedef enum D2D1_SPOTSPECULAR_PROP +{ + + /// + /// Property Name: "LightPosition" + /// Property Type: D2D1_VECTOR_3F + /// + D2D1_SPOTSPECULAR_PROP_LIGHT_POSITION = 0, + + /// + /// Property Name: "PointsAt" + /// Property Type: D2D1_VECTOR_3F + /// + D2D1_SPOTSPECULAR_PROP_POINTS_AT = 1, + + /// + /// Property Name: "Focus" + /// Property Type: FLOAT + /// + D2D1_SPOTSPECULAR_PROP_FOCUS = 2, + + /// + /// Property Name: "LimitingConeAngle" + /// Property Type: FLOAT + /// + D2D1_SPOTSPECULAR_PROP_LIMITING_CONE_ANGLE = 3, + + /// + /// Property Name: "SpecularExponent" + /// Property Type: FLOAT + /// + D2D1_SPOTSPECULAR_PROP_SPECULAR_EXPONENT = 4, + + /// + /// Property Name: "SpecularConstant" + /// Property Type: FLOAT + /// + D2D1_SPOTSPECULAR_PROP_SPECULAR_CONSTANT = 5, + + /// + /// Property Name: "SurfaceScale" + /// Property Type: FLOAT + /// + D2D1_SPOTSPECULAR_PROP_SURFACE_SCALE = 6, + + /// + /// Property Name: "Color" + /// Property Type: D2D1_VECTOR_3F + /// + D2D1_SPOTSPECULAR_PROP_COLOR = 7, + + /// + /// Property Name: "KernelUnitLength" + /// Property Type: D2D1_VECTOR_2F + /// + D2D1_SPOTSPECULAR_PROP_KERNEL_UNIT_LENGTH = 8, + + /// + /// Property Name: "ScaleMode" + /// Property Type: D2D1_SPOTSPECULAR_SCALE_MODE + /// + D2D1_SPOTSPECULAR_PROP_SCALE_MODE = 9, + D2D1_SPOTSPECULAR_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_SPOTSPECULAR_PROP; + +typedef enum D2D1_SPOTSPECULAR_SCALE_MODE +{ + D2D1_SPOTSPECULAR_SCALE_MODE_NEAREST_NEIGHBOR = 0, + D2D1_SPOTSPECULAR_SCALE_MODE_LINEAR = 1, + D2D1_SPOTSPECULAR_SCALE_MODE_CUBIC = 2, + D2D1_SPOTSPECULAR_SCALE_MODE_MULTI_SAMPLE_LINEAR = 3, + D2D1_SPOTSPECULAR_SCALE_MODE_ANISOTROPIC = 4, + D2D1_SPOTSPECULAR_SCALE_MODE_HIGH_QUALITY_CUBIC = 5, + D2D1_SPOTSPECULAR_SCALE_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_SPOTSPECULAR_SCALE_MODE; + + +/// +/// The enumeration of the Distant-Specular effect's top level properties. +/// +typedef enum D2D1_DISTANTSPECULAR_PROP +{ + + /// + /// Property Name: "Azimuth" + /// Property Type: FLOAT + /// + D2D1_DISTANTSPECULAR_PROP_AZIMUTH = 0, + + /// + /// Property Name: "Elevation" + /// Property Type: FLOAT + /// + D2D1_DISTANTSPECULAR_PROP_ELEVATION = 1, + + /// + /// Property Name: "SpecularExponent" + /// Property Type: FLOAT + /// + D2D1_DISTANTSPECULAR_PROP_SPECULAR_EXPONENT = 2, + + /// + /// Property Name: "SpecularConstant" + /// Property Type: FLOAT + /// + D2D1_DISTANTSPECULAR_PROP_SPECULAR_CONSTANT = 3, + + /// + /// Property Name: "SurfaceScale" + /// Property Type: FLOAT + /// + D2D1_DISTANTSPECULAR_PROP_SURFACE_SCALE = 4, + + /// + /// Property Name: "Color" + /// Property Type: D2D1_VECTOR_3F + /// + D2D1_DISTANTSPECULAR_PROP_COLOR = 5, + + /// + /// Property Name: "KernelUnitLength" + /// Property Type: D2D1_VECTOR_2F + /// + D2D1_DISTANTSPECULAR_PROP_KERNEL_UNIT_LENGTH = 6, + + /// + /// Property Name: "ScaleMode" + /// Property Type: D2D1_DISTANTSPECULAR_SCALE_MODE + /// + D2D1_DISTANTSPECULAR_PROP_SCALE_MODE = 7, + D2D1_DISTANTSPECULAR_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_DISTANTSPECULAR_PROP; + +typedef enum D2D1_DISTANTSPECULAR_SCALE_MODE +{ + D2D1_DISTANTSPECULAR_SCALE_MODE_NEAREST_NEIGHBOR = 0, + D2D1_DISTANTSPECULAR_SCALE_MODE_LINEAR = 1, + D2D1_DISTANTSPECULAR_SCALE_MODE_CUBIC = 2, + D2D1_DISTANTSPECULAR_SCALE_MODE_MULTI_SAMPLE_LINEAR = 3, + D2D1_DISTANTSPECULAR_SCALE_MODE_ANISOTROPIC = 4, + D2D1_DISTANTSPECULAR_SCALE_MODE_HIGH_QUALITY_CUBIC = 5, + D2D1_DISTANTSPECULAR_SCALE_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_DISTANTSPECULAR_SCALE_MODE; + + +/// +/// The enumeration of the Point-Diffuse effect's top level properties. +/// +typedef enum D2D1_POINTDIFFUSE_PROP +{ + + /// + /// Property Name: "LightPosition" + /// Property Type: D2D1_VECTOR_3F + /// + D2D1_POINTDIFFUSE_PROP_LIGHT_POSITION = 0, + + /// + /// Property Name: "DiffuseConstant" + /// Property Type: FLOAT + /// + D2D1_POINTDIFFUSE_PROP_DIFFUSE_CONSTANT = 1, + + /// + /// Property Name: "SurfaceScale" + /// Property Type: FLOAT + /// + D2D1_POINTDIFFUSE_PROP_SURFACE_SCALE = 2, + + /// + /// Property Name: "Color" + /// Property Type: D2D1_VECTOR_3F + /// + D2D1_POINTDIFFUSE_PROP_COLOR = 3, + + /// + /// Property Name: "KernelUnitLength" + /// Property Type: D2D1_VECTOR_2F + /// + D2D1_POINTDIFFUSE_PROP_KERNEL_UNIT_LENGTH = 4, + + /// + /// Property Name: "ScaleMode" + /// Property Type: D2D1_POINTDIFFUSE_SCALE_MODE + /// + D2D1_POINTDIFFUSE_PROP_SCALE_MODE = 5, + D2D1_POINTDIFFUSE_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_POINTDIFFUSE_PROP; + +typedef enum D2D1_POINTDIFFUSE_SCALE_MODE +{ + D2D1_POINTDIFFUSE_SCALE_MODE_NEAREST_NEIGHBOR = 0, + D2D1_POINTDIFFUSE_SCALE_MODE_LINEAR = 1, + D2D1_POINTDIFFUSE_SCALE_MODE_CUBIC = 2, + D2D1_POINTDIFFUSE_SCALE_MODE_MULTI_SAMPLE_LINEAR = 3, + D2D1_POINTDIFFUSE_SCALE_MODE_ANISOTROPIC = 4, + D2D1_POINTDIFFUSE_SCALE_MODE_HIGH_QUALITY_CUBIC = 5, + D2D1_POINTDIFFUSE_SCALE_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_POINTDIFFUSE_SCALE_MODE; + + +/// +/// The enumeration of the Spot-Diffuse effect's top level properties. +/// +typedef enum D2D1_SPOTDIFFUSE_PROP +{ + + /// + /// Property Name: "LightPosition" + /// Property Type: D2D1_VECTOR_3F + /// + D2D1_SPOTDIFFUSE_PROP_LIGHT_POSITION = 0, + + /// + /// Property Name: "PointsAt" + /// Property Type: D2D1_VECTOR_3F + /// + D2D1_SPOTDIFFUSE_PROP_POINTS_AT = 1, + + /// + /// Property Name: "Focus" + /// Property Type: FLOAT + /// + D2D1_SPOTDIFFUSE_PROP_FOCUS = 2, + + /// + /// Property Name: "LimitingConeAngle" + /// Property Type: FLOAT + /// + D2D1_SPOTDIFFUSE_PROP_LIMITING_CONE_ANGLE = 3, + + /// + /// Property Name: "DiffuseConstant" + /// Property Type: FLOAT + /// + D2D1_SPOTDIFFUSE_PROP_DIFFUSE_CONSTANT = 4, + + /// + /// Property Name: "SurfaceScale" + /// Property Type: FLOAT + /// + D2D1_SPOTDIFFUSE_PROP_SURFACE_SCALE = 5, + + /// + /// Property Name: "Color" + /// Property Type: D2D1_VECTOR_3F + /// + D2D1_SPOTDIFFUSE_PROP_COLOR = 6, + + /// + /// Property Name: "KernelUnitLength" + /// Property Type: D2D1_VECTOR_2F + /// + D2D1_SPOTDIFFUSE_PROP_KERNEL_UNIT_LENGTH = 7, + + /// + /// Property Name: "ScaleMode" + /// Property Type: D2D1_SPOTDIFFUSE_SCALE_MODE + /// + D2D1_SPOTDIFFUSE_PROP_SCALE_MODE = 8, + D2D1_SPOTDIFFUSE_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_SPOTDIFFUSE_PROP; + +typedef enum D2D1_SPOTDIFFUSE_SCALE_MODE +{ + D2D1_SPOTDIFFUSE_SCALE_MODE_NEAREST_NEIGHBOR = 0, + D2D1_SPOTDIFFUSE_SCALE_MODE_LINEAR = 1, + D2D1_SPOTDIFFUSE_SCALE_MODE_CUBIC = 2, + D2D1_SPOTDIFFUSE_SCALE_MODE_MULTI_SAMPLE_LINEAR = 3, + D2D1_SPOTDIFFUSE_SCALE_MODE_ANISOTROPIC = 4, + D2D1_SPOTDIFFUSE_SCALE_MODE_HIGH_QUALITY_CUBIC = 5, + D2D1_SPOTDIFFUSE_SCALE_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_SPOTDIFFUSE_SCALE_MODE; + + +/// +/// The enumeration of the Distant-Diffuse effect's top level properties. +/// +typedef enum D2D1_DISTANTDIFFUSE_PROP +{ + + /// + /// Property Name: "Azimuth" + /// Property Type: FLOAT + /// + D2D1_DISTANTDIFFUSE_PROP_AZIMUTH = 0, + + /// + /// Property Name: "Elevation" + /// Property Type: FLOAT + /// + D2D1_DISTANTDIFFUSE_PROP_ELEVATION = 1, + + /// + /// Property Name: "DiffuseConstant" + /// Property Type: FLOAT + /// + D2D1_DISTANTDIFFUSE_PROP_DIFFUSE_CONSTANT = 2, + + /// + /// Property Name: "SurfaceScale" + /// Property Type: FLOAT + /// + D2D1_DISTANTDIFFUSE_PROP_SURFACE_SCALE = 3, + + /// + /// Property Name: "Color" + /// Property Type: D2D1_VECTOR_3F + /// + D2D1_DISTANTDIFFUSE_PROP_COLOR = 4, + + /// + /// Property Name: "KernelUnitLength" + /// Property Type: D2D1_VECTOR_2F + /// + D2D1_DISTANTDIFFUSE_PROP_KERNEL_UNIT_LENGTH = 5, + + /// + /// Property Name: "ScaleMode" + /// Property Type: D2D1_DISTANTDIFFUSE_SCALE_MODE + /// + D2D1_DISTANTDIFFUSE_PROP_SCALE_MODE = 6, + D2D1_DISTANTDIFFUSE_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_DISTANTDIFFUSE_PROP; + +typedef enum D2D1_DISTANTDIFFUSE_SCALE_MODE +{ + D2D1_DISTANTDIFFUSE_SCALE_MODE_NEAREST_NEIGHBOR = 0, + D2D1_DISTANTDIFFUSE_SCALE_MODE_LINEAR = 1, + D2D1_DISTANTDIFFUSE_SCALE_MODE_CUBIC = 2, + D2D1_DISTANTDIFFUSE_SCALE_MODE_MULTI_SAMPLE_LINEAR = 3, + D2D1_DISTANTDIFFUSE_SCALE_MODE_ANISOTROPIC = 4, + D2D1_DISTANTDIFFUSE_SCALE_MODE_HIGH_QUALITY_CUBIC = 5, + D2D1_DISTANTDIFFUSE_SCALE_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_DISTANTDIFFUSE_SCALE_MODE; + + +/// +/// The enumeration of the Flood effect's top level properties. +/// +typedef enum D2D1_FLOOD_PROP +{ + + /// + /// Property Name: "Color" + /// Property Type: D2D1_VECTOR_4F + /// + D2D1_FLOOD_PROP_COLOR = 0, + D2D1_FLOOD_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_FLOOD_PROP; + + +/// +/// The enumeration of the Linear Transfer effect's top level properties. +/// +typedef enum D2D1_LINEARTRANSFER_PROP +{ + + /// + /// Property Name: "RedYIntercept" + /// Property Type: FLOAT + /// + D2D1_LINEARTRANSFER_PROP_RED_Y_INTERCEPT = 0, + + /// + /// Property Name: "RedSlope" + /// Property Type: FLOAT + /// + D2D1_LINEARTRANSFER_PROP_RED_SLOPE = 1, + + /// + /// Property Name: "RedDisable" + /// Property Type: BOOL + /// + D2D1_LINEARTRANSFER_PROP_RED_DISABLE = 2, + + /// + /// Property Name: "GreenYIntercept" + /// Property Type: FLOAT + /// + D2D1_LINEARTRANSFER_PROP_GREEN_Y_INTERCEPT = 3, + + /// + /// Property Name: "GreenSlope" + /// Property Type: FLOAT + /// + D2D1_LINEARTRANSFER_PROP_GREEN_SLOPE = 4, + + /// + /// Property Name: "GreenDisable" + /// Property Type: BOOL + /// + D2D1_LINEARTRANSFER_PROP_GREEN_DISABLE = 5, + + /// + /// Property Name: "BlueYIntercept" + /// Property Type: FLOAT + /// + D2D1_LINEARTRANSFER_PROP_BLUE_Y_INTERCEPT = 6, + + /// + /// Property Name: "BlueSlope" + /// Property Type: FLOAT + /// + D2D1_LINEARTRANSFER_PROP_BLUE_SLOPE = 7, + + /// + /// Property Name: "BlueDisable" + /// Property Type: BOOL + /// + D2D1_LINEARTRANSFER_PROP_BLUE_DISABLE = 8, + + /// + /// Property Name: "AlphaYIntercept" + /// Property Type: FLOAT + /// + D2D1_LINEARTRANSFER_PROP_ALPHA_Y_INTERCEPT = 9, + + /// + /// Property Name: "AlphaSlope" + /// Property Type: FLOAT + /// + D2D1_LINEARTRANSFER_PROP_ALPHA_SLOPE = 10, + + /// + /// Property Name: "AlphaDisable" + /// Property Type: BOOL + /// + D2D1_LINEARTRANSFER_PROP_ALPHA_DISABLE = 11, + + /// + /// Property Name: "ClampOutput" + /// Property Type: BOOL + /// + D2D1_LINEARTRANSFER_PROP_CLAMP_OUTPUT = 12, + D2D1_LINEARTRANSFER_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_LINEARTRANSFER_PROP; + + +/// +/// The enumeration of the Gamma Transfer effect's top level properties. +/// +typedef enum D2D1_GAMMATRANSFER_PROP +{ + + /// + /// Property Name: "RedAmplitude" + /// Property Type: FLOAT + /// + D2D1_GAMMATRANSFER_PROP_RED_AMPLITUDE = 0, + + /// + /// Property Name: "RedExponent" + /// Property Type: FLOAT + /// + D2D1_GAMMATRANSFER_PROP_RED_EXPONENT = 1, + + /// + /// Property Name: "RedOffset" + /// Property Type: FLOAT + /// + D2D1_GAMMATRANSFER_PROP_RED_OFFSET = 2, + + /// + /// Property Name: "RedDisable" + /// Property Type: BOOL + /// + D2D1_GAMMATRANSFER_PROP_RED_DISABLE = 3, + + /// + /// Property Name: "GreenAmplitude" + /// Property Type: FLOAT + /// + D2D1_GAMMATRANSFER_PROP_GREEN_AMPLITUDE = 4, + + /// + /// Property Name: "GreenExponent" + /// Property Type: FLOAT + /// + D2D1_GAMMATRANSFER_PROP_GREEN_EXPONENT = 5, + + /// + /// Property Name: "GreenOffset" + /// Property Type: FLOAT + /// + D2D1_GAMMATRANSFER_PROP_GREEN_OFFSET = 6, + + /// + /// Property Name: "GreenDisable" + /// Property Type: BOOL + /// + D2D1_GAMMATRANSFER_PROP_GREEN_DISABLE = 7, + + /// + /// Property Name: "BlueAmplitude" + /// Property Type: FLOAT + /// + D2D1_GAMMATRANSFER_PROP_BLUE_AMPLITUDE = 8, + + /// + /// Property Name: "BlueExponent" + /// Property Type: FLOAT + /// + D2D1_GAMMATRANSFER_PROP_BLUE_EXPONENT = 9, + + /// + /// Property Name: "BlueOffset" + /// Property Type: FLOAT + /// + D2D1_GAMMATRANSFER_PROP_BLUE_OFFSET = 10, + + /// + /// Property Name: "BlueDisable" + /// Property Type: BOOL + /// + D2D1_GAMMATRANSFER_PROP_BLUE_DISABLE = 11, + + /// + /// Property Name: "AlphaAmplitude" + /// Property Type: FLOAT + /// + D2D1_GAMMATRANSFER_PROP_ALPHA_AMPLITUDE = 12, + + /// + /// Property Name: "AlphaExponent" + /// Property Type: FLOAT + /// + D2D1_GAMMATRANSFER_PROP_ALPHA_EXPONENT = 13, + + /// + /// Property Name: "AlphaOffset" + /// Property Type: FLOAT + /// + D2D1_GAMMATRANSFER_PROP_ALPHA_OFFSET = 14, + + /// + /// Property Name: "AlphaDisable" + /// Property Type: BOOL + /// + D2D1_GAMMATRANSFER_PROP_ALPHA_DISABLE = 15, + + /// + /// Property Name: "ClampOutput" + /// Property Type: BOOL + /// + D2D1_GAMMATRANSFER_PROP_CLAMP_OUTPUT = 16, + D2D1_GAMMATRANSFER_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_GAMMATRANSFER_PROP; + + +/// +/// The enumeration of the Table Transfer effect's top level properties. +/// +typedef enum D2D1_TABLETRANSFER_PROP +{ + + /// + /// Property Name: "RedTable" + /// Property Type: (blob) + /// + D2D1_TABLETRANSFER_PROP_RED_TABLE = 0, + + /// + /// Property Name: "RedDisable" + /// Property Type: BOOL + /// + D2D1_TABLETRANSFER_PROP_RED_DISABLE = 1, + + /// + /// Property Name: "GreenTable" + /// Property Type: (blob) + /// + D2D1_TABLETRANSFER_PROP_GREEN_TABLE = 2, + + /// + /// Property Name: "GreenDisable" + /// Property Type: BOOL + /// + D2D1_TABLETRANSFER_PROP_GREEN_DISABLE = 3, + + /// + /// Property Name: "BlueTable" + /// Property Type: (blob) + /// + D2D1_TABLETRANSFER_PROP_BLUE_TABLE = 4, + + /// + /// Property Name: "BlueDisable" + /// Property Type: BOOL + /// + D2D1_TABLETRANSFER_PROP_BLUE_DISABLE = 5, + + /// + /// Property Name: "AlphaTable" + /// Property Type: (blob) + /// + D2D1_TABLETRANSFER_PROP_ALPHA_TABLE = 6, + + /// + /// Property Name: "AlphaDisable" + /// Property Type: BOOL + /// + D2D1_TABLETRANSFER_PROP_ALPHA_DISABLE = 7, + + /// + /// Property Name: "ClampOutput" + /// Property Type: BOOL + /// + D2D1_TABLETRANSFER_PROP_CLAMP_OUTPUT = 8, + D2D1_TABLETRANSFER_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_TABLETRANSFER_PROP; + + +/// +/// The enumeration of the Discrete Transfer effect's top level properties. +/// +typedef enum D2D1_DISCRETETRANSFER_PROP +{ + + /// + /// Property Name: "RedTable" + /// Property Type: (blob) + /// + D2D1_DISCRETETRANSFER_PROP_RED_TABLE = 0, + + /// + /// Property Name: "RedDisable" + /// Property Type: BOOL + /// + D2D1_DISCRETETRANSFER_PROP_RED_DISABLE = 1, + + /// + /// Property Name: "GreenTable" + /// Property Type: (blob) + /// + D2D1_DISCRETETRANSFER_PROP_GREEN_TABLE = 2, + + /// + /// Property Name: "GreenDisable" + /// Property Type: BOOL + /// + D2D1_DISCRETETRANSFER_PROP_GREEN_DISABLE = 3, + + /// + /// Property Name: "BlueTable" + /// Property Type: (blob) + /// + D2D1_DISCRETETRANSFER_PROP_BLUE_TABLE = 4, + + /// + /// Property Name: "BlueDisable" + /// Property Type: BOOL + /// + D2D1_DISCRETETRANSFER_PROP_BLUE_DISABLE = 5, + + /// + /// Property Name: "AlphaTable" + /// Property Type: (blob) + /// + D2D1_DISCRETETRANSFER_PROP_ALPHA_TABLE = 6, + + /// + /// Property Name: "AlphaDisable" + /// Property Type: BOOL + /// + D2D1_DISCRETETRANSFER_PROP_ALPHA_DISABLE = 7, + + /// + /// Property Name: "ClampOutput" + /// Property Type: BOOL + /// + D2D1_DISCRETETRANSFER_PROP_CLAMP_OUTPUT = 8, + D2D1_DISCRETETRANSFER_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_DISCRETETRANSFER_PROP; + + +/// +/// The enumeration of the Convolve Matrix effect's top level properties. +/// +typedef enum D2D1_CONVOLVEMATRIX_PROP +{ + + /// + /// Property Name: "KernelUnitLength" + /// Property Type: D2D1_VECTOR_2F + /// + D2D1_CONVOLVEMATRIX_PROP_KERNEL_UNIT_LENGTH = 0, + + /// + /// Property Name: "ScaleMode" + /// Property Type: D2D1_CONVOLVEMATRIX_SCALE_MODE + /// + D2D1_CONVOLVEMATRIX_PROP_SCALE_MODE = 1, + + /// + /// Property Name: "KernelSizeX" + /// Property Type: UINT32 + /// + D2D1_CONVOLVEMATRIX_PROP_KERNEL_SIZE_X = 2, + + /// + /// Property Name: "KernelSizeY" + /// Property Type: UINT32 + /// + D2D1_CONVOLVEMATRIX_PROP_KERNEL_SIZE_Y = 3, + + /// + /// Property Name: "KernelMatrix" + /// Property Type: (blob) + /// + D2D1_CONVOLVEMATRIX_PROP_KERNEL_MATRIX = 4, + + /// + /// Property Name: "Divisor" + /// Property Type: FLOAT + /// + D2D1_CONVOLVEMATRIX_PROP_DIVISOR = 5, + + /// + /// Property Name: "Bias" + /// Property Type: FLOAT + /// + D2D1_CONVOLVEMATRIX_PROP_BIAS = 6, + + /// + /// Property Name: "KernelOffset" + /// Property Type: D2D1_VECTOR_2F + /// + D2D1_CONVOLVEMATRIX_PROP_KERNEL_OFFSET = 7, + + /// + /// Property Name: "PreserveAlpha" + /// Property Type: BOOL + /// + D2D1_CONVOLVEMATRIX_PROP_PRESERVE_ALPHA = 8, + + /// + /// Property Name: "BorderMode" + /// Property Type: D2D1_BORDER_MODE + /// + D2D1_CONVOLVEMATRIX_PROP_BORDER_MODE = 9, + + /// + /// Property Name: "ClampOutput" + /// Property Type: BOOL + /// + D2D1_CONVOLVEMATRIX_PROP_CLAMP_OUTPUT = 10, + D2D1_CONVOLVEMATRIX_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_CONVOLVEMATRIX_PROP; + +typedef enum D2D1_CONVOLVEMATRIX_SCALE_MODE +{ + D2D1_CONVOLVEMATRIX_SCALE_MODE_NEAREST_NEIGHBOR = 0, + D2D1_CONVOLVEMATRIX_SCALE_MODE_LINEAR = 1, + D2D1_CONVOLVEMATRIX_SCALE_MODE_CUBIC = 2, + D2D1_CONVOLVEMATRIX_SCALE_MODE_MULTI_SAMPLE_LINEAR = 3, + D2D1_CONVOLVEMATRIX_SCALE_MODE_ANISOTROPIC = 4, + D2D1_CONVOLVEMATRIX_SCALE_MODE_HIGH_QUALITY_CUBIC = 5, + D2D1_CONVOLVEMATRIX_SCALE_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_CONVOLVEMATRIX_SCALE_MODE; + + +/// +/// The enumeration of the Brightness effect's top level properties. +/// +typedef enum D2D1_BRIGHTNESS_PROP +{ + + /// + /// Property Name: "WhitePoint" + /// Property Type: D2D1_VECTOR_2F + /// + D2D1_BRIGHTNESS_PROP_WHITE_POINT = 0, + + /// + /// Property Name: "BlackPoint" + /// Property Type: D2D1_VECTOR_2F + /// + D2D1_BRIGHTNESS_PROP_BLACK_POINT = 1, + D2D1_BRIGHTNESS_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_BRIGHTNESS_PROP; + + +/// +/// The enumeration of the Arithmetic Composite effect's top level properties. +/// +typedef enum D2D1_ARITHMETICCOMPOSITE_PROP +{ + + /// + /// Property Name: "Coefficients" + /// Property Type: D2D1_VECTOR_4F + /// + D2D1_ARITHMETICCOMPOSITE_PROP_COEFFICIENTS = 0, + + /// + /// Property Name: "ClampOutput" + /// Property Type: BOOL + /// + D2D1_ARITHMETICCOMPOSITE_PROP_CLAMP_OUTPUT = 1, + D2D1_ARITHMETICCOMPOSITE_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_ARITHMETICCOMPOSITE_PROP; + + +/// +/// The enumeration of the Crop effect's top level properties. +/// +typedef enum D2D1_CROP_PROP +{ + + /// + /// Property Name: "Rect" + /// Property Type: D2D1_VECTOR_4F + /// + D2D1_CROP_PROP_RECT = 0, + + /// + /// Property Name: "BorderMode" + /// Property Type: D2D1_BORDER_MODE + /// + D2D1_CROP_PROP_BORDER_MODE = 1, + D2D1_CROP_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_CROP_PROP; + + +/// +/// The enumeration of the Border effect's top level properties. +/// +typedef enum D2D1_BORDER_PROP +{ + + /// + /// Property Name: "EdgeModeX" + /// Property Type: D2D1_BORDER_EDGE_MODE + /// + D2D1_BORDER_PROP_EDGE_MODE_X = 0, + + /// + /// Property Name: "EdgeModeY" + /// Property Type: D2D1_BORDER_EDGE_MODE + /// + D2D1_BORDER_PROP_EDGE_MODE_Y = 1, + D2D1_BORDER_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_BORDER_PROP; + + +/// +/// The edge mode for the Border effect. +/// +typedef enum D2D1_BORDER_EDGE_MODE +{ + D2D1_BORDER_EDGE_MODE_CLAMP = 0, + D2D1_BORDER_EDGE_MODE_WRAP = 1, + D2D1_BORDER_EDGE_MODE_MIRROR = 2, + D2D1_BORDER_EDGE_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_BORDER_EDGE_MODE; + + +/// +/// The enumeration of the Morphology effect's top level properties. +/// +typedef enum D2D1_MORPHOLOGY_PROP +{ + + /// + /// Property Name: "Mode" + /// Property Type: D2D1_MORPHOLOGY_MODE + /// + D2D1_MORPHOLOGY_PROP_MODE = 0, + + /// + /// Property Name: "Width" + /// Property Type: UINT32 + /// + D2D1_MORPHOLOGY_PROP_WIDTH = 1, + + /// + /// Property Name: "Height" + /// Property Type: UINT32 + /// + D2D1_MORPHOLOGY_PROP_HEIGHT = 2, + D2D1_MORPHOLOGY_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_MORPHOLOGY_PROP; + +typedef enum D2D1_MORPHOLOGY_MODE +{ + D2D1_MORPHOLOGY_MODE_ERODE = 0, + D2D1_MORPHOLOGY_MODE_DILATE = 1, + D2D1_MORPHOLOGY_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_MORPHOLOGY_MODE; + + +/// +/// The enumeration of the Tile effect's top level properties. +/// +typedef enum D2D1_TILE_PROP +{ + + /// + /// Property Name: "Rect" + /// Property Type: D2D1_VECTOR_4F + /// + D2D1_TILE_PROP_RECT = 0, + D2D1_TILE_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_TILE_PROP; + + +/// +/// The enumeration of the Atlas effect's top level properties. +/// +typedef enum D2D1_ATLAS_PROP +{ + + /// + /// Property Name: "InputRect" + /// Property Type: D2D1_VECTOR_4F + /// + D2D1_ATLAS_PROP_INPUT_RECT = 0, + + /// + /// Property Name: "InputPaddingRect" + /// Property Type: D2D1_VECTOR_4F + /// + D2D1_ATLAS_PROP_INPUT_PADDING_RECT = 1, + D2D1_ATLAS_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_ATLAS_PROP; + + +/// +/// The enumeration of the Opacity Metadata effect's top level properties. +/// +typedef enum D2D1_OPACITYMETADATA_PROP +{ + + /// + /// Property Name: "InputOpaqueRect" + /// Property Type: D2D1_VECTOR_4F + /// + D2D1_OPACITYMETADATA_PROP_INPUT_OPAQUE_RECT = 0, + D2D1_OPACITYMETADATA_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_OPACITYMETADATA_PROP; + + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ + +#endif // #ifndef _D2D1_EFFECTS_ diff --git a/gfx/include/dxsdk/d2d1effects_1.h b/gfx/include/dxsdk/d2d1effects_1.h new file mode 100644 index 0000000000..bbeee6fb07 --- /dev/null +++ b/gfx/include/dxsdk/d2d1effects_1.h @@ -0,0 +1,82 @@ +//--------------------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// This file is automatically generated. Please do not edit it directly. +// +// File name: D2D1Effects_1.h +//--------------------------------------------------------------------------- +#ifdef _MSC_VER +#pragma once +#endif // #ifdef _MSC_VER + +#ifndef _D2D1_EFFECTS_1_ +#define _D2D1_EFFECTS_1_ + +#ifndef _D2D1_EFFECTS_ +#include +#endif // #ifndef _D2D1_EFFECTS_ + + +/*#include */ + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + +// Built in effect CLSIDs +DEFINE_GUID(CLSID_D2D1YCbCr, 0x99503cc1, 0x66c7, 0x45c9, 0xa8, 0x75, 0x8a, 0xd8, 0xa7, 0x91, 0x44, 0x01); + +/// +/// The enumeration of the YCbCr effect's top level properties. +/// +typedef enum D2D1_YCBCR_PROP +{ + + /// + /// Property Name: "ChromaSubsampling" + /// Property Type: D2D1_YCBCR_CHROMA_SUBSAMPLING + /// + D2D1_YCBCR_PROP_CHROMA_SUBSAMPLING = 0, + + /// + /// Property Name: "TransformMatrix" + /// Property Type: D2D1_MATRIX_3X2_F + /// + D2D1_YCBCR_PROP_TRANSFORM_MATRIX = 1, + + /// + /// Property Name: "InterpolationMode" + /// Property Type: D2D1_YCBCR_INTERPOLATION_MODE + /// + D2D1_YCBCR_PROP_INTERPOLATION_MODE = 2, + D2D1_YCBCR_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_YCBCR_PROP; + +typedef enum D2D1_YCBCR_CHROMA_SUBSAMPLING +{ + D2D1_YCBCR_CHROMA_SUBSAMPLING_AUTO = 0, + D2D1_YCBCR_CHROMA_SUBSAMPLING_420 = 1, + D2D1_YCBCR_CHROMA_SUBSAMPLING_422 = 2, + D2D1_YCBCR_CHROMA_SUBSAMPLING_444 = 3, + D2D1_YCBCR_CHROMA_SUBSAMPLING_440 = 4, + D2D1_YCBCR_CHROMA_SUBSAMPLING_FORCE_DWORD = 0xffffffff + +} D2D1_YCBCR_CHROMA_SUBSAMPLING; + +typedef enum D2D1_YCBCR_INTERPOLATION_MODE +{ + D2D1_YCBCR_INTERPOLATION_MODE_NEAREST_NEIGHBOR = 0, + D2D1_YCBCR_INTERPOLATION_MODE_LINEAR = 1, + D2D1_YCBCR_INTERPOLATION_MODE_CUBIC = 2, + D2D1_YCBCR_INTERPOLATION_MODE_MULTI_SAMPLE_LINEAR = 3, + D2D1_YCBCR_INTERPOLATION_MODE_ANISOTROPIC = 4, + D2D1_YCBCR_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC = 5, + D2D1_YCBCR_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_YCBCR_INTERPOLATION_MODE; + + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ + +#endif // #ifndef _D2D1_EFFECTS_1_ diff --git a/gfx/include/dxsdk/d2d1effects_2.h b/gfx/include/dxsdk/d2d1effects_2.h new file mode 100644 index 0000000000..a8083b7f15 --- /dev/null +++ b/gfx/include/dxsdk/d2d1effects_2.h @@ -0,0 +1,535 @@ +//--------------------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// This file is automatically generated. Please do not edit it directly. +// +// File name: D2D1Effects_2.h +//--------------------------------------------------------------------------- +#ifdef _MSC_VER +#pragma once +#endif // #ifdef _MSC_VER + +#ifndef _D2D1_EFFECTS_2_ +#define _D2D1_EFFECTS_2_ + +#ifndef _D2D1_EFFECTS_1_ +#include +#endif // #ifndef _D2D1_EFFECTS_1_ + + +/*#include */ + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + +// Built in effect CLSIDs +DEFINE_GUID(CLSID_D2D1Contrast, 0xb648a78a, 0x0ed5, 0x4f80, 0xa9, 0x4a, 0x8e, 0x82, 0x5a, 0xca, 0x6b, 0x77); +DEFINE_GUID(CLSID_D2D1RgbToHue, 0x23f3e5ec, 0x91e8, 0x4d3d, 0xad, 0x0a, 0xaf, 0xad, 0xc1, 0x00, 0x4a, 0xa1); +DEFINE_GUID(CLSID_D2D1HueToRgb, 0x7b78a6bd, 0x0141, 0x4def, 0x8a, 0x52, 0x63, 0x56, 0xee, 0x0c, 0xbd, 0xd5); +DEFINE_GUID(CLSID_D2D1ChromaKey, 0x74C01F5B, 0x2A0D, 0x408C, 0x88, 0xE2, 0xC7, 0xA3, 0xC7, 0x19, 0x77, 0x42); +DEFINE_GUID(CLSID_D2D1Emboss, 0xb1c5eb2b, 0x0348, 0x43f0, 0x81, 0x07, 0x49, 0x57, 0xca, 0xcb, 0xa2, 0xae); +DEFINE_GUID(CLSID_D2D1Exposure, 0xb56c8cfa, 0xf634, 0x41ee, 0xbe, 0xe0, 0xff, 0xa6, 0x17, 0x10, 0x60, 0x04); +DEFINE_GUID(CLSID_D2D1Grayscale, 0x36DDE0EB, 0x3725, 0x42E0, 0x83, 0x6D, 0x52, 0xFB, 0x20, 0xAE, 0xE6, 0x44); +DEFINE_GUID(CLSID_D2D1Invert, 0xe0c3784d, 0xcb39, 0x4e84, 0xb6, 0xfd, 0x6b, 0x72, 0xf0, 0x81, 0x02, 0x63); +DEFINE_GUID(CLSID_D2D1Posterize, 0x2188945e, 0x33a3, 0x4366, 0xb7, 0xbc, 0x08, 0x6b, 0xd0, 0x2d, 0x08, 0x84); +DEFINE_GUID(CLSID_D2D1Sepia, 0x3a1af410, 0x5f1d, 0x4dbe, 0x84, 0xdf, 0x91, 0x5d, 0xa7, 0x9b, 0x71, 0x53); +DEFINE_GUID(CLSID_D2D1Sharpen, 0xC9B887CB, 0xC5FF, 0x4DC5, 0x97, 0x79, 0x27, 0x3D, 0xCF, 0x41, 0x7C, 0x7D); +DEFINE_GUID(CLSID_D2D1Straighten, 0x4da47b12, 0x79a3, 0x4fb0, 0x82, 0x37, 0xbb, 0xc3, 0xb2, 0xa4, 0xde, 0x08); +DEFINE_GUID(CLSID_D2D1TemperatureTint, 0x89176087, 0x8AF9, 0x4A08, 0xAE, 0xB1, 0x89, 0x5F, 0x38, 0xDB, 0x17, 0x66); +DEFINE_GUID(CLSID_D2D1Vignette, 0xc00c40be, 0x5e67, 0x4ca3, 0x95, 0xb4, 0xf4, 0xb0, 0x2c, 0x11, 0x51, 0x35); +DEFINE_GUID(CLSID_D2D1EdgeDetection, 0xEFF583CA, 0xCB07, 0x4AA9, 0xAC, 0x5D, 0x2C, 0xC4, 0x4C, 0x76, 0x46, 0x0F); +DEFINE_GUID(CLSID_D2D1HighlightsShadows, 0xCADC8384, 0x323F, 0x4C7E, 0xA3, 0x61, 0x2E, 0x2B, 0x24, 0xDF, 0x6E, 0xE4); +DEFINE_GUID(CLSID_D2D1LookupTable3D, 0x349E0EDA, 0x0088, 0x4A79, 0x9C, 0xA3, 0xC7, 0xE3, 0x00, 0x20, 0x20, 0x20); + +#if NTDDI_VERSION >= NTDDI_WIN10_RS1 + +DEFINE_GUID(CLSID_D2D1Opacity, 0x811d79a4, 0xde28, 0x4454, 0x80, 0x94, 0xc6, 0x46, 0x85, 0xf8, 0xbd, 0x4c); +DEFINE_GUID(CLSID_D2D1AlphaMask, 0xc80ecff0, 0x3fd5, 0x4f05, 0x83, 0x28, 0xc5, 0xd1, 0x72, 0x4b, 0x4f, 0x0a); +DEFINE_GUID(CLSID_D2D1CrossFade, 0x12f575e8, 0x4db1, 0x485f, 0x9a, 0x84, 0x03, 0xa0, 0x7d, 0xd3, 0x82, 0x9f); +DEFINE_GUID(CLSID_D2D1Tint, 0x36312b17, 0xf7dd, 0x4014, 0x91, 0x5d, 0xff, 0xca, 0x76, 0x8c, 0xf2, 0x11); + +#endif // #if NTDDI_VERSION >= NTDDI_WIN10_RS1 + +/// +/// The enumeration of the Contrast effect's top level properties. +/// +typedef enum D2D1_CONTRAST_PROP +{ + + /// + /// Property Name: "Contrast" + /// Property Type: FLOAT + /// + D2D1_CONTRAST_PROP_CONTRAST = 0, + + /// + /// Property Name: "ClampInput" + /// Property Type: BOOL + /// + D2D1_CONTRAST_PROP_CLAMP_INPUT = 1, + D2D1_CONTRAST_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_CONTRAST_PROP; + + +/// +/// The enumeration of the RgbToHue effect's top level properties. +/// +typedef enum D2D1_RGBTOHUE_PROP +{ + + /// + /// Property Name: "OutputColorSpace" + /// Property Type: D2D1_RGBTOHUE_OUTPUT_COLOR_SPACE + /// + D2D1_RGBTOHUE_PROP_OUTPUT_COLOR_SPACE = 0, + D2D1_RGBTOHUE_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_RGBTOHUE_PROP; + +typedef enum D2D1_RGBTOHUE_OUTPUT_COLOR_SPACE +{ + D2D1_RGBTOHUE_OUTPUT_COLOR_SPACE_HUE_SATURATION_VALUE = 0, + D2D1_RGBTOHUE_OUTPUT_COLOR_SPACE_HUE_SATURATION_LIGHTNESS = 1, + D2D1_RGBTOHUE_OUTPUT_COLOR_SPACE_FORCE_DWORD = 0xffffffff + +} D2D1_RGBTOHUE_OUTPUT_COLOR_SPACE; + + +/// +/// The enumeration of the HueToRgb effect's top level properties. +/// +typedef enum D2D1_HUETORGB_PROP +{ + + /// + /// Property Name: "InputColorSpace" + /// Property Type: D2D1_HUETORGB_INPUT_COLOR_SPACE + /// + D2D1_HUETORGB_PROP_INPUT_COLOR_SPACE = 0, + D2D1_HUETORGB_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_HUETORGB_PROP; + +typedef enum D2D1_HUETORGB_INPUT_COLOR_SPACE +{ + D2D1_HUETORGB_INPUT_COLOR_SPACE_HUE_SATURATION_VALUE = 0, + D2D1_HUETORGB_INPUT_COLOR_SPACE_HUE_SATURATION_LIGHTNESS = 1, + D2D1_HUETORGB_INPUT_COLOR_SPACE_FORCE_DWORD = 0xffffffff + +} D2D1_HUETORGB_INPUT_COLOR_SPACE; + + +/// +/// The enumeration of the Chroma Key effect's top level properties. +/// +typedef enum D2D1_CHROMAKEY_PROP +{ + + /// + /// Property Name: "Color" + /// Property Type: D2D1_VECTOR_3F + /// + D2D1_CHROMAKEY_PROP_COLOR = 0, + + /// + /// Property Name: "Tolerance" + /// Property Type: FLOAT + /// + D2D1_CHROMAKEY_PROP_TOLERANCE = 1, + + /// + /// Property Name: "InvertAlpha" + /// Property Type: BOOL + /// + D2D1_CHROMAKEY_PROP_INVERT_ALPHA = 2, + + /// + /// Property Name: "Feather" + /// Property Type: BOOL + /// + D2D1_CHROMAKEY_PROP_FEATHER = 3, + D2D1_CHROMAKEY_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_CHROMAKEY_PROP; + + +/// +/// The enumeration of the Emboss effect's top level properties. +/// +typedef enum D2D1_EMBOSS_PROP +{ + + /// + /// Property Name: "Height" + /// Property Type: FLOAT + /// + D2D1_EMBOSS_PROP_HEIGHT = 0, + + /// + /// Property Name: "Direction" + /// Property Type: FLOAT + /// + D2D1_EMBOSS_PROP_DIRECTION = 1, + D2D1_EMBOSS_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_EMBOSS_PROP; + + +/// +/// The enumeration of the Exposure effect's top level properties. +/// +typedef enum D2D1_EXPOSURE_PROP +{ + + /// + /// Property Name: "ExposureValue" + /// Property Type: FLOAT + /// + D2D1_EXPOSURE_PROP_EXPOSURE_VALUE = 0, + D2D1_EXPOSURE_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_EXPOSURE_PROP; + + +/// +/// The enumeration of the Posterize effect's top level properties. +/// +typedef enum D2D1_POSTERIZE_PROP +{ + + /// + /// Property Name: "RedValueCount" + /// Property Type: UINT32 + /// + D2D1_POSTERIZE_PROP_RED_VALUE_COUNT = 0, + + /// + /// Property Name: "GreenValueCount" + /// Property Type: UINT32 + /// + D2D1_POSTERIZE_PROP_GREEN_VALUE_COUNT = 1, + + /// + /// Property Name: "BlueValueCount" + /// Property Type: UINT32 + /// + D2D1_POSTERIZE_PROP_BLUE_VALUE_COUNT = 2, + D2D1_POSTERIZE_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_POSTERIZE_PROP; + + +/// +/// The enumeration of the Sepia effect's top level properties. +/// +typedef enum D2D1_SEPIA_PROP +{ + + /// + /// Property Name: "Intensity" + /// Property Type: FLOAT + /// + D2D1_SEPIA_PROP_INTENSITY = 0, + + /// + /// Property Name: "AlphaMode" + /// Property Type: D2D1_ALPHA_MODE + /// + D2D1_SEPIA_PROP_ALPHA_MODE = 1, + D2D1_SEPIA_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_SEPIA_PROP; + + +/// +/// The enumeration of the Sharpen effect's top level properties. +/// +typedef enum D2D1_SHARPEN_PROP +{ + + /// + /// Property Name: "Sharpness" + /// Property Type: FLOAT + /// + D2D1_SHARPEN_PROP_SHARPNESS = 0, + + /// + /// Property Name: "Threshold" + /// Property Type: FLOAT + /// + D2D1_SHARPEN_PROP_THRESHOLD = 1, + D2D1_SHARPEN_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_SHARPEN_PROP; + + +/// +/// The enumeration of the Straighten effect's top level properties. +/// +typedef enum D2D1_STRAIGHTEN_PROP +{ + + /// + /// Property Name: "Angle" + /// Property Type: FLOAT + /// + D2D1_STRAIGHTEN_PROP_ANGLE = 0, + + /// + /// Property Name: "MaintainSize" + /// Property Type: BOOL + /// + D2D1_STRAIGHTEN_PROP_MAINTAIN_SIZE = 1, + + /// + /// Property Name: "ScaleMode" + /// Property Type: D2D1_STRAIGHTEN_SCALE_MODE + /// + D2D1_STRAIGHTEN_PROP_SCALE_MODE = 2, + D2D1_STRAIGHTEN_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_STRAIGHTEN_PROP; + +typedef enum D2D1_STRAIGHTEN_SCALE_MODE +{ + D2D1_STRAIGHTEN_SCALE_MODE_NEAREST_NEIGHBOR = 0, + D2D1_STRAIGHTEN_SCALE_MODE_LINEAR = 1, + D2D1_STRAIGHTEN_SCALE_MODE_CUBIC = 2, + D2D1_STRAIGHTEN_SCALE_MODE_MULTI_SAMPLE_LINEAR = 3, + D2D1_STRAIGHTEN_SCALE_MODE_ANISOTROPIC = 4, + D2D1_STRAIGHTEN_SCALE_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_STRAIGHTEN_SCALE_MODE; + + +/// +/// The enumeration of the Temperature And Tint effect's top level properties. +/// +typedef enum D2D1_TEMPERATUREANDTINT_PROP +{ + + /// + /// Property Name: "Temperature" + /// Property Type: FLOAT + /// + D2D1_TEMPERATUREANDTINT_PROP_TEMPERATURE = 0, + + /// + /// Property Name: "Tint" + /// Property Type: FLOAT + /// + D2D1_TEMPERATUREANDTINT_PROP_TINT = 1, + D2D1_TEMPERATUREANDTINT_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_TEMPERATUREANDTINT_PROP; + + +/// +/// The enumeration of the Vignette effect's top level properties. +/// +typedef enum D2D1_VIGNETTE_PROP +{ + + /// + /// Property Name: "Color" + /// Property Type: D2D1_VECTOR_4F + /// + D2D1_VIGNETTE_PROP_COLOR = 0, + + /// + /// Property Name: "TransitionSize" + /// Property Type: FLOAT + /// + D2D1_VIGNETTE_PROP_TRANSITION_SIZE = 1, + + /// + /// Property Name: "Strength" + /// Property Type: FLOAT + /// + D2D1_VIGNETTE_PROP_STRENGTH = 2, + D2D1_VIGNETTE_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_VIGNETTE_PROP; + + +/// +/// The enumeration of the Edge Detection effect's top level properties. +/// +typedef enum D2D1_EDGEDETECTION_PROP +{ + + /// + /// Property Name: "Strength" + /// Property Type: FLOAT + /// + D2D1_EDGEDETECTION_PROP_STRENGTH = 0, + + /// + /// Property Name: "BlurRadius" + /// Property Type: FLOAT + /// + D2D1_EDGEDETECTION_PROP_BLUR_RADIUS = 1, + + /// + /// Property Name: "Mode" + /// Property Type: D2D1_EDGEDETECTION_MODE + /// + D2D1_EDGEDETECTION_PROP_MODE = 2, + + /// + /// Property Name: "OverlayEdges" + /// Property Type: BOOL + /// + D2D1_EDGEDETECTION_PROP_OVERLAY_EDGES = 3, + + /// + /// Property Name: "AlphaMode" + /// Property Type: D2D1_ALPHA_MODE + /// + D2D1_EDGEDETECTION_PROP_ALPHA_MODE = 4, + D2D1_EDGEDETECTION_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_EDGEDETECTION_PROP; + +typedef enum D2D1_EDGEDETECTION_MODE +{ + D2D1_EDGEDETECTION_MODE_SOBEL = 0, + D2D1_EDGEDETECTION_MODE_PREWITT = 1, + D2D1_EDGEDETECTION_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_EDGEDETECTION_MODE; + + +/// +/// The enumeration of the Highlights and Shadows effect's top level properties. +/// +typedef enum D2D1_HIGHLIGHTSANDSHADOWS_PROP +{ + + /// + /// Property Name: "Highlights" + /// Property Type: FLOAT + /// + D2D1_HIGHLIGHTSANDSHADOWS_PROP_HIGHLIGHTS = 0, + + /// + /// Property Name: "Shadows" + /// Property Type: FLOAT + /// + D2D1_HIGHLIGHTSANDSHADOWS_PROP_SHADOWS = 1, + + /// + /// Property Name: "Clarity" + /// Property Type: FLOAT + /// + D2D1_HIGHLIGHTSANDSHADOWS_PROP_CLARITY = 2, + + /// + /// Property Name: "InputGamma" + /// Property Type: D2D1_HIGHLIGHTSANDSHADOWS_INPUT_GAMMA + /// + D2D1_HIGHLIGHTSANDSHADOWS_PROP_INPUT_GAMMA = 3, + + /// + /// Property Name: "MaskBlurRadius" + /// Property Type: FLOAT + /// + D2D1_HIGHLIGHTSANDSHADOWS_PROP_MASK_BLUR_RADIUS = 4, + D2D1_HIGHLIGHTSANDSHADOWS_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_HIGHLIGHTSANDSHADOWS_PROP; + +typedef enum D2D1_HIGHLIGHTSANDSHADOWS_INPUT_GAMMA +{ + D2D1_HIGHLIGHTSANDSHADOWS_INPUT_GAMMA_LINEAR = 0, + D2D1_HIGHLIGHTSANDSHADOWS_INPUT_GAMMA_SRGB = 1, + D2D1_HIGHLIGHTSANDSHADOWS_INPUT_GAMMA_FORCE_DWORD = 0xffffffff + +} D2D1_HIGHLIGHTSANDSHADOWS_INPUT_GAMMA; + + +/// +/// The enumeration of the Lookup Table 3D effect's top level properties. +/// +typedef enum D2D1_LOOKUPTABLE3D_PROP +{ + + /// + /// Property Name: "Lut" + /// Property Type: IUnknown * + /// + D2D1_LOOKUPTABLE3D_PROP_LUT = 0, + + /// + /// Property Name: "AlphaMode" + /// Property Type: D2D1_ALPHA_MODE + /// + D2D1_LOOKUPTABLE3D_PROP_ALPHA_MODE = 1, + D2D1_LOOKUPTABLE3D_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_LOOKUPTABLE3D_PROP; + + +#if NTDDI_VERSION >= NTDDI_WIN10_RS1 + +/// +/// The enumeration of the Opacity effect's top level properties. +/// +typedef enum D2D1_OPACITY_PROP +{ + + /// + /// Property Name: "Opacity" + /// Property Type: FLOAT + /// + D2D1_OPACITY_PROP_OPACITY = 0, + D2D1_OPACITY_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_OPACITY_PROP; + + +/// +/// The enumeration of the Cross Fade effect's top level properties. +/// +typedef enum D2D1_CROSSFADE_PROP +{ + + /// + /// Property Name: "Weight" + /// Property Type: FLOAT + /// + D2D1_CROSSFADE_PROP_WEIGHT = 0, + D2D1_CROSSFADE_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_CROSSFADE_PROP; + + +/// +/// The enumeration of the Tint effect's top level properties. +/// +typedef enum D2D1_TINT_PROP +{ + + /// + /// Property Name: "Color" + /// Property Type: D2D1_VECTOR_4F + /// + D2D1_TINT_PROP_COLOR = 0, + + /// + /// Property Name: "ClampOutput" + /// Property Type: BOOL + /// + D2D1_TINT_PROP_CLAMP_OUTPUT = 1, + D2D1_TINT_PROP_FORCE_DWORD = 0xffffffff + +} D2D1_TINT_PROP; + + +#endif // #if NTDDI_VERSION >= NTDDI_WIN10_RS1 + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ + +#endif // #ifndef _D2D1_EFFECTS_2_ diff --git a/gfx/include/dxsdk/d2d1helper.h b/gfx/include/dxsdk/d2d1helper.h new file mode 100644 index 0000000000..46bcbd12e7 --- /dev/null +++ b/gfx/include/dxsdk/d2d1helper.h @@ -0,0 +1,1033 @@ + +/*=========================================================================*\ + + Copyright (c) Microsoft Corporation. All rights reserved. + + File: D2D1helper.h + + Module Name: D2D + + Description: Helper files over the D2D interfaces and APIs. + +\*=========================================================================*/ +#pragma once + +#ifndef _D2D1_HELPER_H_ +#define _D2D1_HELPER_H_ + +#ifndef _D2D1_H_ +#include +#endif // #ifndef _D2D1_H_ + +#ifndef D2D_USE_C_DEFINITIONS + +namespace D2D1 +{ + // + // Forward declared IdentityMatrix function to allow matrix class to use + // these constructors. + // + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_MATRIX_3X2_F + IdentityMatrix(); + + // + // The default trait type for objects in D2D is float. + // + template + struct TypeTraits + { + typedef D2D1_POINT_2F Point; + typedef D2D1_SIZE_F Size; + typedef D2D1_RECT_F Rect; + }; + + template<> + struct TypeTraits + { + typedef D2D1_POINT_2U Point; + typedef D2D1_SIZE_U Size; + typedef D2D1_RECT_U Rect; + }; + + static + COM_DECLSPEC_NOTHROW + inline + FLOAT FloatMax() + { + #ifdef FLT_MAX + return FLT_MAX; + #else + return 3.402823466e+38F; + #endif + } + + // + // Construction helpers + // + template + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + typename TypeTraits::Point + Point2( + Type x, + Type y + ) + { + typename TypeTraits::Point point = { x, y }; + + return point; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_POINT_2F + Point2F( + FLOAT x = 0.f, + FLOAT y = 0.f + ) + { + return Point2(x, y); + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_POINT_2U + Point2U( + UINT32 x = 0, + UINT32 y = 0 + ) + { + return Point2(x, y); + } + + template + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + typename TypeTraits::Size + Size( + Type width, + Type height + ) + { + typename TypeTraits::Size size = { width, height }; + + return size; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_SIZE_F + SizeF( + FLOAT width = 0.f, + FLOAT height = 0.f + ) + { + return Size(width, height); + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_SIZE_U + SizeU( + UINT32 width = 0, + UINT32 height = 0 + ) + { + return Size(width, height); + } + + template + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + typename TypeTraits::Rect + Rect( + Type left, + Type top, + Type right, + Type bottom + ) + { + typename TypeTraits::Rect rect = { left, top, right, bottom }; + + return rect; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_RECT_F + RectF( + FLOAT left = 0.f, + FLOAT top = 0.f, + FLOAT right = 0.f, + FLOAT bottom = 0.f + ) + { + return Rect(left, top, right, bottom); + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_RECT_U + RectU( + UINT32 left = 0, + UINT32 top = 0, + UINT32 right = 0, + UINT32 bottom = 0 + ) + { + return Rect(left, top, right, bottom); + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_RECT_F + InfiniteRect() + { + D2D1_RECT_F rect = { -FloatMax(), -FloatMax(), FloatMax(), FloatMax() }; + + return rect; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_ARC_SEGMENT + ArcSegment( + _In_ CONST D2D1_POINT_2F &point, + _In_ CONST D2D1_SIZE_F &size, + _In_ FLOAT rotationAngle, + _In_ D2D1_SWEEP_DIRECTION sweepDirection, + _In_ D2D1_ARC_SIZE arcSize + ) + { + D2D1_ARC_SEGMENT arcSegment = { point, size, rotationAngle, sweepDirection, arcSize }; + + return arcSegment; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_BEZIER_SEGMENT + BezierSegment( + _In_ CONST D2D1_POINT_2F &point1, + _In_ CONST D2D1_POINT_2F &point2, + _In_ CONST D2D1_POINT_2F &point3 + ) + { + D2D1_BEZIER_SEGMENT bezierSegment = { point1, point2, point3 }; + + return bezierSegment; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_ELLIPSE + Ellipse( + _In_ CONST D2D1_POINT_2F ¢er, + FLOAT radiusX, + FLOAT radiusY + ) + { + D2D1_ELLIPSE ellipse; + + ellipse.point = center; + ellipse.radiusX = radiusX; + ellipse.radiusY = radiusY; + + return ellipse; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_ROUNDED_RECT + RoundedRect( + _In_ CONST D2D1_RECT_F &rect, + FLOAT radiusX, + FLOAT radiusY + ) + { + D2D1_ROUNDED_RECT roundedRect; + + roundedRect.rect = rect; + roundedRect.radiusX = radiusX; + roundedRect.radiusY = radiusY; + + return roundedRect; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_BRUSH_PROPERTIES + BrushProperties( + _In_ FLOAT opacity = 1.0, + _In_ CONST D2D1_MATRIX_3X2_F &transform = D2D1::IdentityMatrix() + ) + { + D2D1_BRUSH_PROPERTIES brushProperties; + + brushProperties.opacity = opacity; + brushProperties.transform = transform; + + return brushProperties; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_GRADIENT_STOP + GradientStop( + FLOAT position, + _In_ CONST D2D1_COLOR_F &color + ) + { + D2D1_GRADIENT_STOP gradientStop = { position, color }; + + return gradientStop; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_QUADRATIC_BEZIER_SEGMENT + QuadraticBezierSegment( + _In_ CONST D2D1_POINT_2F &point1, + _In_ CONST D2D1_POINT_2F &point2 + ) + { + D2D1_QUADRATIC_BEZIER_SEGMENT quadraticBezier = { point1, point2 }; + + return quadraticBezier; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_STROKE_STYLE_PROPERTIES + StrokeStyleProperties( + D2D1_CAP_STYLE startCap = D2D1_CAP_STYLE_FLAT, + D2D1_CAP_STYLE endCap = D2D1_CAP_STYLE_FLAT, + D2D1_CAP_STYLE dashCap = D2D1_CAP_STYLE_FLAT, + D2D1_LINE_JOIN lineJoin = D2D1_LINE_JOIN_MITER, + FLOAT miterLimit = 10.0f, + D2D1_DASH_STYLE dashStyle = D2D1_DASH_STYLE_SOLID, + FLOAT dashOffset = 0.0f + ) + { + D2D1_STROKE_STYLE_PROPERTIES strokeStyleProperties; + + strokeStyleProperties.startCap = startCap; + strokeStyleProperties.endCap = endCap; + strokeStyleProperties.dashCap = dashCap; + strokeStyleProperties.lineJoin = lineJoin; + strokeStyleProperties.miterLimit = miterLimit; + strokeStyleProperties.dashStyle = dashStyle; + strokeStyleProperties.dashOffset = dashOffset; + + return strokeStyleProperties; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_BITMAP_BRUSH_PROPERTIES + BitmapBrushProperties( + D2D1_EXTEND_MODE extendModeX = D2D1_EXTEND_MODE_CLAMP, + D2D1_EXTEND_MODE extendModeY = D2D1_EXTEND_MODE_CLAMP, + D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR + ) + { + D2D1_BITMAP_BRUSH_PROPERTIES bitmapBrushProperties; + + bitmapBrushProperties.extendModeX = extendModeX; + bitmapBrushProperties.extendModeY = extendModeY; + bitmapBrushProperties.interpolationMode = interpolationMode; + + return bitmapBrushProperties; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES + LinearGradientBrushProperties( + _In_ CONST D2D1_POINT_2F &startPoint, + _In_ CONST D2D1_POINT_2F &endPoint + ) + { + D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES linearGradientBrushProperties; + + linearGradientBrushProperties.startPoint = startPoint; + linearGradientBrushProperties.endPoint = endPoint; + + return linearGradientBrushProperties; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES + RadialGradientBrushProperties( + _In_ CONST D2D1_POINT_2F ¢er, + _In_ CONST D2D1_POINT_2F &gradientOriginOffset, + FLOAT radiusX, + FLOAT radiusY + ) + { + D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES radialGradientBrushProperties; + + radialGradientBrushProperties.center = center; + radialGradientBrushProperties.gradientOriginOffset = gradientOriginOffset; + radialGradientBrushProperties.radiusX = radiusX; + radialGradientBrushProperties.radiusY = radiusY; + + return radialGradientBrushProperties; + } + + // + // PixelFormat + // + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_PIXEL_FORMAT + PixelFormat( + _In_ DXGI_FORMAT dxgiFormat = DXGI_FORMAT_UNKNOWN, + _In_ D2D1_ALPHA_MODE alphaMode = D2D1_ALPHA_MODE_UNKNOWN + ) + { + D2D1_PIXEL_FORMAT pixelFormat; + + pixelFormat.format = dxgiFormat; + pixelFormat.alphaMode = alphaMode; + + return pixelFormat; + } + + // + // Bitmaps + // + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_BITMAP_PROPERTIES + BitmapProperties( + CONST D2D1_PIXEL_FORMAT &pixelFormat = D2D1::PixelFormat(), + FLOAT dpiX = 96.0f, + FLOAT dpiY = 96.0f + ) + { + D2D1_BITMAP_PROPERTIES bitmapProperties; + + bitmapProperties.pixelFormat = pixelFormat; + bitmapProperties.dpiX = dpiX; + bitmapProperties.dpiY = dpiY; + + return bitmapProperties; + } + + // + // Render Targets + // + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_RENDER_TARGET_PROPERTIES + RenderTargetProperties( + D2D1_RENDER_TARGET_TYPE type = D2D1_RENDER_TARGET_TYPE_DEFAULT, + _In_ CONST D2D1_PIXEL_FORMAT &pixelFormat = D2D1::PixelFormat(), + FLOAT dpiX = 0.0, + FLOAT dpiY = 0.0, + D2D1_RENDER_TARGET_USAGE usage = D2D1_RENDER_TARGET_USAGE_NONE, + D2D1_FEATURE_LEVEL minLevel = D2D1_FEATURE_LEVEL_DEFAULT + ) + { + D2D1_RENDER_TARGET_PROPERTIES renderTargetProperties; + + renderTargetProperties.type = type; + renderTargetProperties.pixelFormat = pixelFormat; + renderTargetProperties.dpiX = dpiX; + renderTargetProperties.dpiY = dpiY; + renderTargetProperties.usage = usage; + renderTargetProperties.minLevel = minLevel; + + return renderTargetProperties; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_HWND_RENDER_TARGET_PROPERTIES + HwndRenderTargetProperties( + _In_ HWND hwnd, + _In_ D2D1_SIZE_U pixelSize = D2D1::Size(static_cast(0), static_cast(0)), + _In_ D2D1_PRESENT_OPTIONS presentOptions = D2D1_PRESENT_OPTIONS_NONE + ) + { + D2D1_HWND_RENDER_TARGET_PROPERTIES hwndRenderTargetProperties; + + hwndRenderTargetProperties.hwnd = hwnd; + hwndRenderTargetProperties.pixelSize = pixelSize; + hwndRenderTargetProperties.presentOptions = presentOptions; + + return hwndRenderTargetProperties; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_LAYER_PARAMETERS + LayerParameters( + _In_ CONST D2D1_RECT_F &contentBounds = D2D1::InfiniteRect(), + _In_opt_ ID2D1Geometry *geometricMask = NULL, + D2D1_ANTIALIAS_MODE maskAntialiasMode = D2D1_ANTIALIAS_MODE_PER_PRIMITIVE, + D2D1_MATRIX_3X2_F maskTransform = D2D1::IdentityMatrix(), + FLOAT opacity = 1.0, + _In_opt_ ID2D1Brush *opacityBrush = NULL, + D2D1_LAYER_OPTIONS layerOptions = D2D1_LAYER_OPTIONS_NONE + ) + { + D2D1_LAYER_PARAMETERS layerParameters = { 0 }; + + layerParameters.contentBounds = contentBounds; + layerParameters.geometricMask = geometricMask; + layerParameters.maskAntialiasMode = maskAntialiasMode; + layerParameters.maskTransform = maskTransform; + layerParameters.opacity = opacity; + layerParameters.opacityBrush = opacityBrush; + layerParameters.layerOptions = layerOptions; + + return layerParameters; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_DRAWING_STATE_DESCRIPTION + DrawingStateDescription( + D2D1_ANTIALIAS_MODE antialiasMode = D2D1_ANTIALIAS_MODE_PER_PRIMITIVE, + D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode = D2D1_TEXT_ANTIALIAS_MODE_DEFAULT, + D2D1_TAG tag1 = 0, + D2D1_TAG tag2 = 0, + _In_ const D2D1_MATRIX_3X2_F &transform = D2D1::IdentityMatrix() + ) + { + D2D1_DRAWING_STATE_DESCRIPTION drawingStateDescription; + + drawingStateDescription.antialiasMode = antialiasMode; + drawingStateDescription.textAntialiasMode = textAntialiasMode; + drawingStateDescription.tag1 = tag1; + drawingStateDescription.tag2 = tag2; + drawingStateDescription.transform = transform; + + return drawingStateDescription; + } + + // + // Colors, this enum defines a set of predefined colors. + // + class ColorF : public D2D1_COLOR_F + { + public: + + enum Enum + { + AliceBlue = 0xF0F8FF, + AntiqueWhite = 0xFAEBD7, + Aqua = 0x00FFFF, + Aquamarine = 0x7FFFD4, + Azure = 0xF0FFFF, + Beige = 0xF5F5DC, + Bisque = 0xFFE4C4, + Black = 0x000000, + BlanchedAlmond = 0xFFEBCD, + Blue = 0x0000FF, + BlueViolet = 0x8A2BE2, + Brown = 0xA52A2A, + BurlyWood = 0xDEB887, + CadetBlue = 0x5F9EA0, + Chartreuse = 0x7FFF00, + Chocolate = 0xD2691E, + Coral = 0xFF7F50, + CornflowerBlue = 0x6495ED, + Cornsilk = 0xFFF8DC, + Crimson = 0xDC143C, + Cyan = 0x00FFFF, + DarkBlue = 0x00008B, + DarkCyan = 0x008B8B, + DarkGoldenrod = 0xB8860B, + DarkGray = 0xA9A9A9, + DarkGreen = 0x006400, + DarkKhaki = 0xBDB76B, + DarkMagenta = 0x8B008B, + DarkOliveGreen = 0x556B2F, + DarkOrange = 0xFF8C00, + DarkOrchid = 0x9932CC, + DarkRed = 0x8B0000, + DarkSalmon = 0xE9967A, + DarkSeaGreen = 0x8FBC8F, + DarkSlateBlue = 0x483D8B, + DarkSlateGray = 0x2F4F4F, + DarkTurquoise = 0x00CED1, + DarkViolet = 0x9400D3, + DeepPink = 0xFF1493, + DeepSkyBlue = 0x00BFFF, + DimGray = 0x696969, + DodgerBlue = 0x1E90FF, + Firebrick = 0xB22222, + FloralWhite = 0xFFFAF0, + ForestGreen = 0x228B22, + Fuchsia = 0xFF00FF, + Gainsboro = 0xDCDCDC, + GhostWhite = 0xF8F8FF, + Gold = 0xFFD700, + Goldenrod = 0xDAA520, + Gray = 0x808080, + Green = 0x008000, + GreenYellow = 0xADFF2F, + Honeydew = 0xF0FFF0, + HotPink = 0xFF69B4, + IndianRed = 0xCD5C5C, + Indigo = 0x4B0082, + Ivory = 0xFFFFF0, + Khaki = 0xF0E68C, + Lavender = 0xE6E6FA, + LavenderBlush = 0xFFF0F5, + LawnGreen = 0x7CFC00, + LemonChiffon = 0xFFFACD, + LightBlue = 0xADD8E6, + LightCoral = 0xF08080, + LightCyan = 0xE0FFFF, + LightGoldenrodYellow = 0xFAFAD2, + LightGreen = 0x90EE90, + LightGray = 0xD3D3D3, + LightPink = 0xFFB6C1, + LightSalmon = 0xFFA07A, + LightSeaGreen = 0x20B2AA, + LightSkyBlue = 0x87CEFA, + LightSlateGray = 0x778899, + LightSteelBlue = 0xB0C4DE, + LightYellow = 0xFFFFE0, + Lime = 0x00FF00, + LimeGreen = 0x32CD32, + Linen = 0xFAF0E6, + Magenta = 0xFF00FF, + Maroon = 0x800000, + MediumAquamarine = 0x66CDAA, + MediumBlue = 0x0000CD, + MediumOrchid = 0xBA55D3, + MediumPurple = 0x9370DB, + MediumSeaGreen = 0x3CB371, + MediumSlateBlue = 0x7B68EE, + MediumSpringGreen = 0x00FA9A, + MediumTurquoise = 0x48D1CC, + MediumVioletRed = 0xC71585, + MidnightBlue = 0x191970, + MintCream = 0xF5FFFA, + MistyRose = 0xFFE4E1, + Moccasin = 0xFFE4B5, + NavajoWhite = 0xFFDEAD, + Navy = 0x000080, + OldLace = 0xFDF5E6, + Olive = 0x808000, + OliveDrab = 0x6B8E23, + Orange = 0xFFA500, + OrangeRed = 0xFF4500, + Orchid = 0xDA70D6, + PaleGoldenrod = 0xEEE8AA, + PaleGreen = 0x98FB98, + PaleTurquoise = 0xAFEEEE, + PaleVioletRed = 0xDB7093, + PapayaWhip = 0xFFEFD5, + PeachPuff = 0xFFDAB9, + Peru = 0xCD853F, + Pink = 0xFFC0CB, + Plum = 0xDDA0DD, + PowderBlue = 0xB0E0E6, + Purple = 0x800080, + Red = 0xFF0000, + RosyBrown = 0xBC8F8F, + RoyalBlue = 0x4169E1, + SaddleBrown = 0x8B4513, + Salmon = 0xFA8072, + SandyBrown = 0xF4A460, + SeaGreen = 0x2E8B57, + SeaShell = 0xFFF5EE, + Sienna = 0xA0522D, + Silver = 0xC0C0C0, + SkyBlue = 0x87CEEB, + SlateBlue = 0x6A5ACD, + SlateGray = 0x708090, + Snow = 0xFFFAFA, + SpringGreen = 0x00FF7F, + SteelBlue = 0x4682B4, + Tan = 0xD2B48C, + Teal = 0x008080, + Thistle = 0xD8BFD8, + Tomato = 0xFF6347, + Turquoise = 0x40E0D0, + Violet = 0xEE82EE, + Wheat = 0xF5DEB3, + White = 0xFFFFFF, + WhiteSmoke = 0xF5F5F5, + Yellow = 0xFFFF00, + YellowGreen = 0x9ACD32, + }; + + // + // Construct a color, note that the alpha value from the "rgb" component + // is never used. + // + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + ColorF( + UINT32 rgb, + FLOAT a = 1.0 + ) + { + Init(rgb, a); + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + ColorF( + Enum knownColor, + FLOAT a = 1.0 + ) + { + Init(knownColor, a); + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + ColorF( + FLOAT red, + FLOAT green, + FLOAT blue, + FLOAT alpha = 1.0 + ) + { + r = red; + g = green; + b = blue; + a = alpha; + } + + private: + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + void + Init( + UINT32 rgb, + FLOAT alpha + ) + { + r = static_cast((rgb & sc_redMask) >> sc_redShift) / 255.f; + g = static_cast((rgb & sc_greenMask) >> sc_greenShift) / 255.f; + b = static_cast((rgb & sc_blueMask) >> sc_blueShift) / 255.f; + a = alpha; + } + + static const UINT32 sc_redShift = 16; + static const UINT32 sc_greenShift = 8; + static const UINT32 sc_blueShift = 0; + + static const UINT32 sc_redMask = 0xff << sc_redShift; + static const UINT32 sc_greenMask = 0xff << sc_greenShift; + static const UINT32 sc_blueMask = 0xff << sc_blueShift; + }; + + class Matrix3x2F : public D2D1_MATRIX_3X2_F + { + public: + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + Matrix3x2F( + FLOAT m11, + FLOAT m12, + FLOAT m21, + FLOAT m22, + FLOAT m31, + FLOAT m32 + ) + { + _11 = m11; + _12 = m12; + _21 = m21; + _22 = m22; + _31 = m31; + _32 = m32; + } + + // + // Creates an uninitialized matrix + // + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + Matrix3x2F( + ) + { + } + + // + // Named quasi-constructors + // + static + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + Matrix3x2F + Identity() + { + Matrix3x2F identity; + + identity._11 = 1.f; + identity._12 = 0.f; + identity._21 = 0.f; + identity._22 = 1.f; + identity._31 = 0.f; + identity._32 = 0.f; + + return identity; + } + + static + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + Matrix3x2F + Translation( + D2D1_SIZE_F size + ) + { + Matrix3x2F translation; + + translation._11 = 1.0; translation._12 = 0.0; + translation._21 = 0.0; translation._22 = 1.0; + translation._31 = size.width; translation._32 = size.height; + + return translation; + } + + static + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + Matrix3x2F + Translation( + FLOAT x, + FLOAT y + ) + { + return Translation(SizeF(x, y)); + } + + + static + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + Matrix3x2F + Scale( + D2D1_SIZE_F size, + D2D1_POINT_2F center = D2D1::Point2F() + ) + { + Matrix3x2F scale; + + scale._11 = size.width; scale._12 = 0.0; + scale._21 = 0.0; scale._22 = size.height; + scale._31 = center.x - size.width * center.x; + scale._32 = center.y - size.height * center.y; + + return scale; + } + + static + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + Matrix3x2F + Scale( + FLOAT x, + FLOAT y, + D2D1_POINT_2F center = D2D1::Point2F() + ) + { + return Scale(SizeF(x, y), center); + } + + static + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + Matrix3x2F + Rotation( + FLOAT angle, + D2D1_POINT_2F center = D2D1::Point2F() + ) + { + Matrix3x2F rotation; + + D2D1MakeRotateMatrix(angle, center, &rotation); + + return rotation; + } + + static + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + Matrix3x2F + Skew( + FLOAT angleX, + FLOAT angleY, + D2D1_POINT_2F center = D2D1::Point2F() + ) + { + Matrix3x2F skew; + + D2D1MakeSkewMatrix(angleX, angleY, center, &skew); + + return skew; + } + + // + // Functions for convertion from the base D2D1_MATRIX_3X2_F to this type + // without making a copy + // + static + COM_DECLSPEC_NOTHROW + inline + const Matrix3x2F* + ReinterpretBaseType(const D2D1_MATRIX_3X2_F *pMatrix) + { + return static_cast(pMatrix); + } + + static + COM_DECLSPEC_NOTHROW + inline + Matrix3x2F* + ReinterpretBaseType(D2D1_MATRIX_3X2_F *pMatrix) + { + return static_cast(pMatrix); + } + + COM_DECLSPEC_NOTHROW + inline + FLOAT + Determinant() const + { + return (_11 * _22) - (_12 * _21); + } + + COM_DECLSPEC_NOTHROW + inline + bool + IsInvertible() const + { + return !!D2D1IsMatrixInvertible(this); + } + + COM_DECLSPEC_NOTHROW + inline + bool + Invert() + { + return !!D2D1InvertMatrix(this); + } + + COM_DECLSPEC_NOTHROW + inline + bool + IsIdentity() const + { + return _11 == 1.f && _12 == 0.f + && _21 == 0.f && _22 == 1.f + && _31 == 0.f && _32 == 0.f; + } + + COM_DECLSPEC_NOTHROW + inline + void SetProduct( + const Matrix3x2F &a, + const Matrix3x2F &b + ) + { + _11 = a._11 * b._11 + a._12 * b._21; + _12 = a._11 * b._12 + a._12 * b._22; + _21 = a._21 * b._11 + a._22 * b._21; + _22 = a._21 * b._12 + a._22 * b._22; + _31 = a._31 * b._11 + a._32 * b._21 + b._31; + _32 = a._31 * b._12 + a._32 * b._22 + b._32; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + Matrix3x2F + operator*( + const Matrix3x2F &matrix + ) const + { + Matrix3x2F result; + + result.SetProduct(*this, matrix); + + return result; + } + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_POINT_2F + TransformPoint( + D2D1_POINT_2F point + ) const + { + D2D1_POINT_2F result = + { + point.x * _11 + point.y * _21 + _31, + point.x * _12 + point.y * _22 + _32 + }; + + return result; + } + }; + + COM_DECLSPEC_NOTHROW + D2D1FORCEINLINE + D2D1_POINT_2F + operator*( + const D2D1_POINT_2F &point, + const D2D1_MATRIX_3X2_F &matrix + ) + { + return Matrix3x2F::ReinterpretBaseType(&matrix)->TransformPoint(point); + } + + COM_DECLSPEC_NOTHROW + D2D1_MATRIX_3X2_F + IdentityMatrix() + { + return Matrix3x2F::Identity(); + } + +} // namespace D2D1 + +COM_DECLSPEC_NOTHROW +D2D1FORCEINLINE +D2D1_MATRIX_3X2_F +operator*( + const D2D1_MATRIX_3X2_F &matrix1, + const D2D1_MATRIX_3X2_F &matrix2 + ) +{ + return + (*D2D1::Matrix3x2F::ReinterpretBaseType(&matrix1)) * + (*D2D1::Matrix3x2F::ReinterpretBaseType(&matrix2)); +} + +COM_DECLSPEC_NOTHROW +inline +bool +operator==(const D2D1_SIZE_U &size1, const D2D1_SIZE_U &size2) +{ + return (size1.width == size2.width) && (size1.height == size2.height); +} + +COM_DECLSPEC_NOTHROW +inline +bool +operator==(const D2D1_RECT_U &rect1, const D2D1_RECT_U &rect2) +{ + return (rect1.left == rect2.left) && (rect1.top == rect2.top) && + (rect1.right == rect2.right) && (rect1.bottom == rect2.bottom); +} + +#endif // #ifndef D2D_USE_C_DEFINITIONS + +#endif // #ifndef _D2D1_HELPER_H_ + diff --git a/gfx/include/dxsdk/d2d1svg.h b/gfx/include/dxsdk/d2d1svg.h new file mode 100644 index 0000000000..5611d3cdb1 --- /dev/null +++ b/gfx/include/dxsdk/d2d1svg.h @@ -0,0 +1,1832 @@ +//--------------------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// This file is automatically generated. Please do not edit it directly. +// +// File name: D2D1Svg.h +//--------------------------------------------------------------------------- +#ifdef _MSC_VER +#pragma once +#endif // #ifdef _MSC_VER + +#ifndef _D2D1_SVG_ +#define _D2D1_SVG_ + +#ifndef _D2D1_2_H_ +#include +#endif // #ifndef _D2D1_2_H_ + +/*#include */ + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + +typedef interface ID2D1SvgDocument ID2D1SvgDocument; +typedef interface ID2D1SvgElement ID2D1SvgElement; + +/// +/// Specifies the paint type for an SVG fill or stroke. +/// +typedef enum D2D1_SVG_PAINT_TYPE +{ + + /// + /// The fill or stroke is not rendered. + /// + D2D1_SVG_PAINT_TYPE_NONE = 0, + + /// + /// A solid color is rendered. + /// + D2D1_SVG_PAINT_TYPE_COLOR = 1, + + /// + /// The current color is rendered. + /// + D2D1_SVG_PAINT_TYPE_CURRENT_COLOR = 2, + + /// + /// A paint server, defined by another element in the SVG document, is used. + /// + D2D1_SVG_PAINT_TYPE_URI = 3, + + /// + /// A paint server, defined by another element in the SVG document, is used. If the + /// paint server reference is invalid, fall back to D2D1_SVG_PAINT_TYPE_NONE. + /// + D2D1_SVG_PAINT_TYPE_URI_NONE = 4, + + /// + /// A paint server, defined by another element in the SVG document, is used. If the + /// paint server reference is invalid, fall back to D2D1_SVG_PAINT_TYPE_COLOR. + /// + D2D1_SVG_PAINT_TYPE_URI_COLOR = 5, + + /// + /// A paint server, defined by another element in the SVG document, is used. If the + /// paint server reference is invalid, fall back to + /// D2D1_SVG_PAINT_TYPE_CURRENT_COLOR. + /// + D2D1_SVG_PAINT_TYPE_URI_CURRENT_COLOR = 6, + D2D1_SVG_PAINT_TYPE_FORCE_DWORD = 0xffffffff + +} D2D1_SVG_PAINT_TYPE; + + +/// +/// Specifies the units for an SVG length. +/// +typedef enum D2D1_SVG_LENGTH_UNITS +{ + + /// + /// The length is unitless. + /// + D2D1_SVG_LENGTH_UNITS_NUMBER = 0, + + /// + /// The length is a percentage value. + /// + D2D1_SVG_LENGTH_UNITS_PERCENTAGE = 1, + D2D1_SVG_LENGTH_UNITS_FORCE_DWORD = 0xffffffff + +} D2D1_SVG_LENGTH_UNITS; + + +/// +/// Specifies a value for the SVG display property. +/// +typedef enum D2D1_SVG_DISPLAY +{ + + /// + /// The element uses the default display behavior. + /// + D2D1_SVG_DISPLAY_INLINE = 0, + + /// + /// The element and all children are not rendered directly. + /// + D2D1_SVG_DISPLAY_NONE = 1, + D2D1_SVG_DISPLAY_FORCE_DWORD = 0xffffffff + +} D2D1_SVG_DISPLAY; + + +/// +/// Specifies a value for the SVG visibility property. +/// +typedef enum D2D1_SVG_VISIBILITY +{ + + /// + /// The element is visible. + /// + D2D1_SVG_VISIBILITY_VISIBLE = 0, + + /// + /// The element is invisible. + /// + D2D1_SVG_VISIBILITY_HIDDEN = 1, + D2D1_SVG_VISIBILITY_FORCE_DWORD = 0xffffffff + +} D2D1_SVG_VISIBILITY; + + +/// +/// Specifies a value for the SVG overflow property. +/// +typedef enum D2D1_SVG_OVERFLOW +{ + + /// + /// The element is not clipped to its viewport. + /// + D2D1_SVG_OVERFLOW_VISIBLE = 0, + + /// + /// The element is clipped to its viewport. + /// + D2D1_SVG_OVERFLOW_HIDDEN = 1, + D2D1_SVG_OVERFLOW_FORCE_DWORD = 0xffffffff + +} D2D1_SVG_OVERFLOW; + + +/// +/// Specifies a value for the SVG stroke-linecap property. +/// +typedef enum D2D1_SVG_LINE_CAP +{ + + /// + /// The property is set to SVG's 'butt' value. + /// + D2D1_SVG_LINE_CAP_BUTT = D2D1_CAP_STYLE_FLAT, + + /// + /// The property is set to SVG's 'square' value. + /// + D2D1_SVG_LINE_CAP_SQUARE = D2D1_CAP_STYLE_SQUARE, + + /// + /// The property is set to SVG's 'round' value. + /// + D2D1_SVG_LINE_CAP_ROUND = D2D1_CAP_STYLE_ROUND, + D2D1_SVG_LINE_CAP_FORCE_DWORD = 0xffffffff + +} D2D1_SVG_LINE_CAP; + + +/// +/// Specifies a value for the SVG stroke-linejoin property. +/// +typedef enum D2D1_SVG_LINE_JOIN +{ + + /// + /// The property is set to SVG's 'bevel' value. + /// + D2D1_SVG_LINE_JOIN_BEVEL = D2D1_LINE_JOIN_BEVEL, + + /// + /// The property is set to SVG's 'miter' value. Note that this is equivalent to + /// D2D1_LINE_JOIN_MITER_OR_BEVEL, not D2D1_LINE_JOIN_MITER. + /// + D2D1_SVG_LINE_JOIN_MITER = D2D1_LINE_JOIN_MITER_OR_BEVEL, + + /// + /// \ The property is set to SVG's 'round' value. + /// + D2D1_SVG_LINE_JOIN_ROUND = D2D1_LINE_JOIN_ROUND, + D2D1_SVG_LINE_JOIN_FORCE_DWORD = 0xffffffff + +} D2D1_SVG_LINE_JOIN; + + +/// +/// The alignment portion of the SVG preserveAspectRatio attribute. +/// +typedef enum D2D1_SVG_ASPECT_ALIGN +{ + + /// + /// The alignment is set to SVG's 'none' value. + /// + D2D1_SVG_ASPECT_ALIGN_NONE = 0, + + /// + /// The alignment is set to SVG's 'xMinYMin' value. + /// + D2D1_SVG_ASPECT_ALIGN_X_MIN_Y_MIN = 1, + + /// + /// The alignment is set to SVG's 'xMidYMin' value. + /// + D2D1_SVG_ASPECT_ALIGN_X_MID_Y_MIN = 2, + + /// + /// The alignment is set to SVG's 'xMaxYMin' value. + /// + D2D1_SVG_ASPECT_ALIGN_X_MAX_Y_MIN = 3, + + /// + /// The alignment is set to SVG's 'xMinYMid' value. + /// + D2D1_SVG_ASPECT_ALIGN_X_MIN_Y_MID = 4, + + /// + /// The alignment is set to SVG's 'xMidYMid' value. + /// + D2D1_SVG_ASPECT_ALIGN_X_MID_Y_MID = 5, + + /// + /// The alignment is set to SVG's 'xMaxYMid' value. + /// + D2D1_SVG_ASPECT_ALIGN_X_MAX_Y_MID = 6, + + /// + /// The alignment is set to SVG's 'xMinYMax' value. + /// + D2D1_SVG_ASPECT_ALIGN_X_MIN_Y_MAX = 7, + + /// + /// The alignment is set to SVG's 'xMidYMax' value. + /// + D2D1_SVG_ASPECT_ALIGN_X_MID_Y_MAX = 8, + + /// + /// The alignment is set to SVG's 'xMaxYMax' value. + /// + D2D1_SVG_ASPECT_ALIGN_X_MAX_Y_MAX = 9, + D2D1_SVG_ASPECT_ALIGN_FORCE_DWORD = 0xffffffff + +} D2D1_SVG_ASPECT_ALIGN; + + +/// +/// The meetOrSlice portion of the SVG preserveAspectRatio attribute. +/// +typedef enum D2D1_SVG_ASPECT_SCALING +{ + + /// + /// Scale the viewBox up as much as possible such that the entire viewBox is visible + /// within the viewport. + /// + D2D1_SVG_ASPECT_SCALING_MEET = 0, + + /// + /// Scale the viewBox down as much as possible such that the entire viewport is + /// covered by the viewBox. + /// + D2D1_SVG_ASPECT_SCALING_SLICE = 1, + D2D1_SVG_ASPECT_SCALING_FORCE_DWORD = 0xffffffff + +} D2D1_SVG_ASPECT_SCALING; + + +/// +/// Represents a path commmand. Each command may reference floats from the segment +/// data. Commands ending in _ABSOLUTE interpret data as absolute coordinate. +/// Commands ending in _RELATIVE interpret data as being relative to the previous +/// point. +/// +typedef enum D2D1_SVG_PATH_COMMAND +{ + + /// + /// Closes the current subpath. Uses no segment data. + /// + D2D1_SVG_PATH_COMMAND_CLOSE_PATH = 0, + + /// + /// Starts a new subpath at the coordinate (x y). Uses 2 floats of segment data. + /// + D2D1_SVG_PATH_COMMAND_MOVE_ABSOLUTE = 1, + + /// + /// Starts a new subpath at the coordinate (x y). Uses 2 floats of segment data. + /// + D2D1_SVG_PATH_COMMAND_MOVE_RELATIVE = 2, + + /// + /// Draws a line to the coordinate (x y). Uses 2 floats of segment data. + /// + D2D1_SVG_PATH_COMMAND_LINE_ABSOLUTE = 3, + + /// + /// Draws a line to the coordinate (x y). Uses 2 floats of segment data. + /// + D2D1_SVG_PATH_COMMAND_LINE_RELATIVE = 4, + + /// + /// Draws a cubic Bezier curve (x1 y1 x2 y2 x y). The curve ends at (x, y) and is + /// defined by the two control points (x1, y1) and (x2, y2). Uses 6 floats of + /// segment data. + /// + D2D1_SVG_PATH_COMMAND_CUBIC_ABSOLUTE = 5, + + /// + /// Draws a cubic Bezier curve (x1 y1 x2 y2 x y). The curve ends at (x, y) and is + /// defined by the two control points (x1, y1) and (x2, y2). Uses 6 floats of + /// segment data. + /// + D2D1_SVG_PATH_COMMAND_CUBIC_RELATIVE = 6, + + /// + /// Draws a quadratic Bezier curve (x1 y1 x y). The curve ends at (x, y) and is + /// defined by the control point (x1 y1). Uses 4 floats of segment data. + /// + D2D1_SVG_PATH_COMMAND_QUADRADIC_ABSOLUTE = 7, + + /// + /// Draws a quadratic Bezier curve (x1 y1 x y). The curve ends at (x, y) and is + /// defined by the control point (x1 y1). Uses 4 floats of segment data. + /// + D2D1_SVG_PATH_COMMAND_QUADRADIC_RELATIVE = 8, + + /// + /// Draws an elliptical arc (rx ry x-axis-rotation large-arc-flag sweep-flag x y). + /// The curve ends at (x, y) and is defined by the arc parameters. The two flags are + /// considered set if their values are non-zero. Uses 7 floats of segment data. + /// + D2D1_SVG_PATH_COMMAND_ARC_ABSOLUTE = 9, + + /// + /// Draws an elliptical arc (rx ry x-axis-rotation large-arc-flag sweep-flag x y). + /// The curve ends at (x, y) and is defined by the arc parameters. The two flags are + /// considered set if their values are non-zero. Uses 7 floats of segment data. + /// + D2D1_SVG_PATH_COMMAND_ARC_RELATIVE = 10, + + /// + /// Draws a horizontal line to the coordinate (x). Uses 1 float of segment data. + /// + D2D1_SVG_PATH_COMMAND_HORIZONTAL_ABSOLUTE = 11, + + /// + /// Draws a horizontal line to the coordinate (x). Uses 1 float of segment data. + /// + D2D1_SVG_PATH_COMMAND_HORIZONTAL_RELATIVE = 12, + + /// + /// Draws a vertical line to the coordinate (y). Uses 1 float of segment data. + /// + D2D1_SVG_PATH_COMMAND_VERTICAL_ABSOLUTE = 13, + + /// + /// Draws a vertical line to the coordinate (y). Uses 1 float of segment data. + /// + D2D1_SVG_PATH_COMMAND_VERTICAL_RELATIVE = 14, + + /// + /// Draws a smooth cubic Bezier curve (x2 y2 x y). The curve ends at (x, y) and is + /// defined by the control point (x2, y2). Uses 4 floats of segment data. + /// + D2D1_SVG_PATH_COMMAND_CUBIC_SMOOTH_ABSOLUTE = 15, + + /// + /// Draws a smooth cubic Bezier curve (x2 y2 x y). The curve ends at (x, y) and is + /// defined by the control point (x2, y2). Uses 4 floats of segment data. + /// + D2D1_SVG_PATH_COMMAND_CUBIC_SMOOTH_RELATIVE = 16, + + /// + /// Draws a smooth quadratic Bezier curve ending at (x, y). Uses 2 floats of segment + /// data. + /// + D2D1_SVG_PATH_COMMAND_QUADRADIC_SMOOTH_ABSOLUTE = 17, + + /// + /// Draws a smooth quadratic Bezier curve ending at (x, y). Uses 2 floats of segment + /// data. + /// + D2D1_SVG_PATH_COMMAND_QUADRADIC_SMOOTH_RELATIVE = 18, + D2D1_SVG_PATH_COMMAND_FORCE_DWORD = 0xffffffff + +} D2D1_SVG_PATH_COMMAND; + + +/// +/// Defines the coordinate system used for SVG gradient or clipPath elements. +/// +typedef enum D2D1_SVG_UNIT_TYPE +{ + + /// + /// The property is set to SVG's 'userSpaceOnUse' value. + /// + D2D1_SVG_UNIT_TYPE_USER_SPACE_ON_USE = 0, + + /// + /// The property is set to SVG's 'objectBoundingBox' value. + /// + D2D1_SVG_UNIT_TYPE_OBJECT_BOUNDING_BOX = 1, + D2D1_SVG_UNIT_TYPE_FORCE_DWORD = 0xffffffff + +} D2D1_SVG_UNIT_TYPE; + + +/// +/// Defines the type of SVG string attribute to set or get. +/// +typedef enum D2D1_SVG_ATTRIBUTE_STRING_TYPE +{ + + /// + /// The attribute is a string in the same form as it would appear in the SVG XML. + /// + /// Note that when getting values of this type, the value returned may not exactly + /// match the value that was set. Instead, the output value is a normalized version + /// of the value. For example, an input color of 'red' may be output as '#FF0000'. + /// + D2D1_SVG_ATTRIBUTE_STRING_TYPE_SVG = 0, + + /// + /// The attribute is an element ID. + /// + D2D1_SVG_ATTRIBUTE_STRING_TYPE_ID = 1, + D2D1_SVG_ATTRIBUTE_STRING_TYPE_FORCE_DWORD = 0xffffffff + +} D2D1_SVG_ATTRIBUTE_STRING_TYPE; + + +/// +/// Defines the type of SVG POD attribute to set or get. +/// +typedef enum D2D1_SVG_ATTRIBUTE_POD_TYPE +{ + + /// + /// The attribute is a FLOAT. + /// + D2D1_SVG_ATTRIBUTE_POD_TYPE_FLOAT = 0, + + /// + /// The attribute is a D2D1_COLOR_F. + /// + D2D1_SVG_ATTRIBUTE_POD_TYPE_COLOR = 1, + + /// + /// The attribute is a D2D1_FILL_MODE. + /// + D2D1_SVG_ATTRIBUTE_POD_TYPE_FILL_MODE = 2, + + /// + /// The attribute is a D2D1_SVG_DISPLAY. + /// + D2D1_SVG_ATTRIBUTE_POD_TYPE_DISPLAY = 3, + + /// + /// The attribute is a D2D1_SVG_OVERFLOW. + /// + D2D1_SVG_ATTRIBUTE_POD_TYPE_OVERFLOW = 4, + + /// + /// The attribute is a D2D1_SVG_LINE_CAP. + /// + D2D1_SVG_ATTRIBUTE_POD_TYPE_LINE_CAP = 5, + + /// + /// The attribute is a D2D1_SVG_LINE_JOIN. + /// + D2D1_SVG_ATTRIBUTE_POD_TYPE_LINE_JOIN = 6, + + /// + /// The attribute is a D2D1_SVG_VISIBILITY. + /// + D2D1_SVG_ATTRIBUTE_POD_TYPE_VISIBILITY = 7, + + /// + /// The attribute is a D2D1_MATRIX_3X2_F. + /// + D2D1_SVG_ATTRIBUTE_POD_TYPE_MATRIX = 8, + + /// + /// The attribute is a D2D1_SVG_UNIT_TYPE. + /// + D2D1_SVG_ATTRIBUTE_POD_TYPE_UNIT_TYPE = 9, + + /// + /// The attribute is a D2D1_EXTEND_MODE. + /// + D2D1_SVG_ATTRIBUTE_POD_TYPE_EXTEND_MODE = 10, + + /// + /// The attribute is a D2D1_SVG_PRESERVE_ASPECT_RATIO. + /// + D2D1_SVG_ATTRIBUTE_POD_TYPE_PRESERVE_ASPECT_RATIO = 11, + + /// + /// The attribute is a D2D1_SVG_VIEWBOX. + /// + D2D1_SVG_ATTRIBUTE_POD_TYPE_VIEWBOX = 12, + + /// + /// The attribute is a D2D1_SVG_LENGTH. + /// + D2D1_SVG_ATTRIBUTE_POD_TYPE_LENGTH = 13, + D2D1_SVG_ATTRIBUTE_POD_TYPE_FORCE_DWORD = 0xffffffff + +} D2D1_SVG_ATTRIBUTE_POD_TYPE; + + +/// +/// Represents an SVG length. +/// +typedef struct D2D1_SVG_LENGTH +{ + FLOAT value; + D2D1_SVG_LENGTH_UNITS units; + +} D2D1_SVG_LENGTH; + + +/// +/// Represents all SVG preserveAspectRatio settings. +/// +typedef struct D2D1_SVG_PRESERVE_ASPECT_RATIO +{ + + /// + /// Sets the 'defer' portion of the preserveAspectRatio settings. This field only + /// has an effect on an 'image' element that references another SVG document. As + /// this is not currently supported, the field has no impact on rendering. + /// + BOOL defer; + + /// + /// Sets the align portion of the preserveAspectRatio settings. + /// + D2D1_SVG_ASPECT_ALIGN align; + + /// + /// Sets the meetOrSlice portion of the preserveAspectRatio settings. + /// + D2D1_SVG_ASPECT_SCALING meetOrSlice; + +} D2D1_SVG_PRESERVE_ASPECT_RATIO; + + +/// +/// Represents an SVG viewBox. +/// +typedef struct D2D1_SVG_VIEWBOX +{ + FLOAT x; + FLOAT y; + FLOAT width; + FLOAT height; + +} D2D1_SVG_VIEWBOX; + + +EXTERN_C CONST IID IID_ID2D1SvgAttribute; +EXTERN_C CONST IID IID_ID2D1SvgPaint; +EXTERN_C CONST IID IID_ID2D1SvgStrokeDashArray; +EXTERN_C CONST IID IID_ID2D1SvgPointCollection; +EXTERN_C CONST IID IID_ID2D1SvgPathData; +EXTERN_C CONST IID IID_ID2D1SvgElement; +EXTERN_C CONST IID IID_ID2D1SvgDocument; + + +#ifndef D2D_USE_C_DEFINITIONS + +#if NTDDI_VERSION >= NTDDI_WIN10_RS2 + +/// +/// Interface describing an SVG attribute. +/// +interface DX_DECLARE_INTERFACE("c9cdb0dd-f8c9-4e70-b7c2-301c80292c5e") ID2D1SvgAttribute : public ID2D1Resource +{ + + /// + /// Returns the element on which this attribute is set. Returns null if the + /// attribute is not set on any element. + /// + STDMETHOD_(void, GetElement)( + _Outptr_result_maybenull_ ID2D1SvgElement **element + ) PURE; + + /// + /// Creates a clone of this attribute value. On creation, the cloned attribute is + /// not set on any element. + /// + STDMETHOD(Clone)( + _COM_Outptr_ ID2D1SvgAttribute **attribute + ) PURE; +}; // interface ID2D1SvgAttribute + + +/// +/// Interface describing an SVG 'fill' or 'stroke' value. +/// +interface DX_DECLARE_INTERFACE("d59bab0a-68a2-455b-a5dc-9eb2854e2490") ID2D1SvgPaint : public ID2D1SvgAttribute +{ + + /// + /// Sets the paint type. + /// + STDMETHOD(SetPaintType)( + D2D1_SVG_PAINT_TYPE paintType + ) PURE; + + /// + /// Gets the paint type. + /// + STDMETHOD_(D2D1_SVG_PAINT_TYPE, GetPaintType)( + ) PURE; + + /// + /// Sets the paint color that is used if the paint type is + /// D2D1_SVG_PAINT_TYPE_COLOR. + /// + STDMETHOD(SetColor)( + _In_ CONST D2D1_COLOR_F *color + ) PURE; + + /// + /// Gets the paint color that is used if the paint type is + /// D2D1_SVG_PAINT_TYPE_COLOR. + /// + STDMETHOD_(void, GetColor)( + _Out_ D2D1_COLOR_F *color + ) PURE; + + /// + /// Sets the element id which acts as the paint server. This id is used if the paint + /// type is D2D1_SVG_PAINT_TYPE_URI. + /// + STDMETHOD(SetId)( + _In_ PCWSTR id + ) PURE; + + /// + /// Gets the element id which acts as the paint server. This id is used if the paint + /// type is D2D1_SVG_PAINT_TYPE_URI. + /// + STDMETHOD(GetId)( + _Out_writes_(idCount) PWSTR id, + UINT32 idCount + ) PURE; + + /// + /// Gets the string length of the element id which acts as the paint server. This id + /// is used if the paint type is D2D1_SVG_PAINT_TYPE_URI. The returned string length + /// does not include room for the null terminator. + /// + STDMETHOD_(UINT32, GetIdLength)( + ) PURE; + + /// + /// Sets the paint color that is used if the paint type is + /// D2D1_SVG_PAINT_TYPE_COLOR. + /// + COM_DECLSPEC_NOTHROW + HRESULT + SetColor( + CONST D2D1_COLOR_F &color + ) + { + return SetColor(&color); + } +}; // interface ID2D1SvgPaint + + +/// +/// Interface describing an SVG 'stroke-dasharray' value. +/// +interface DX_DECLARE_INTERFACE("f1c0ca52-92a3-4f00-b4ce-f35691efd9d9") ID2D1SvgStrokeDashArray : public ID2D1SvgAttribute +{ + + /// + /// Removes dashes from the end of the array. + /// + /// Specifies how many dashes to remove. + STDMETHOD(RemoveDashesAtEnd)( + UINT32 dashesCount + ) PURE; + + /// + /// Updates the array. Existing dashes not updated by this method are preserved. The + /// array is resized larger if necessary to accomodate the new dashes. + /// + /// The dashes array. + /// The number of dashes to update. + /// The index at which to begin updating dashes. Must be + /// less than or equal to the size of the array. + STDMETHOD(UpdateDashes)( + _In_reads_(dashesCount) CONST FLOAT *dashes, + UINT32 dashesCount, + UINT32 startIndex = 0 + ) PURE; + + /// + /// Updates the array. Existing dashes not updated by this method are preserved. The + /// array is resized larger if necessary to accomodate the new dashes. + /// + /// The dashes array. + /// The number of dashes to update. + /// The index at which to begin updating dashes. Must be + /// less than or equal to the size of the array. + STDMETHOD(UpdateDashes)( + _In_reads_(dashesCount) CONST D2D1_SVG_LENGTH *dashes, + UINT32 dashesCount, + UINT32 startIndex = 0 + ) PURE; + + /// + /// Gets dashes from the array. + /// + /// Buffer to contain the dashes. + /// The element count of buffer. + /// The index of the first dash to retrieve. + STDMETHOD(GetDashes)( + _Out_writes_(dashesCount) FLOAT *dashes, + UINT32 dashesCount, + UINT32 startIndex = 0 + ) PURE; + + /// + /// Gets dashes from the array. + /// + /// Buffer to contain the dashes. + /// The element count of buffer. + /// The index of the first dash to retrieve. + STDMETHOD(GetDashes)( + _Out_writes_(dashesCount) D2D1_SVG_LENGTH *dashes, + UINT32 dashesCount, + UINT32 startIndex = 0 + ) PURE; + + /// + /// Gets the number of the dashes in the array. + /// + STDMETHOD_(UINT32, GetDashesCount)( + ) PURE; +}; // interface ID2D1SvgStrokeDashArray + + +/// +/// Interface describing an SVG 'points' value in a 'polyline' or 'polygon' element. +/// +interface DX_DECLARE_INTERFACE("9dbe4c0d-3572-4dd9-9825-5530813bb712") ID2D1SvgPointCollection : public ID2D1SvgAttribute +{ + + /// + /// Removes points from the end of the array. + /// + /// Specifies how many points to remove. + STDMETHOD(RemovePointsAtEnd)( + UINT32 pointsCount + ) PURE; + + /// + /// Updates the points array. Existing points not updated by this method are + /// preserved. The array is resized larger if necessary to accomodate the new + /// points. + /// + /// The points array. + /// The number of points to update. + /// The index at which to begin updating points. Must be + /// less than or equal to the size of the array. + STDMETHOD(UpdatePoints)( + _In_reads_(pointsCount) CONST D2D1_POINT_2F *points, + UINT32 pointsCount, + UINT32 startIndex = 0 + ) PURE; + + /// + /// Gets points from the points array. + /// + /// Buffer to contain the points. + /// The element count of the buffer. + /// The index of the first point to retrieve. + STDMETHOD(GetPoints)( + _Out_writes_(pointsCount) D2D1_POINT_2F *points, + UINT32 pointsCount, + UINT32 startIndex = 0 + ) PURE; + + /// + /// Gets the number of points in the array. + /// + STDMETHOD_(UINT32, GetPointsCount)( + ) PURE; +}; // interface ID2D1SvgPointCollection + + +/// +/// Interface describing SVG path data. Path data can be set as the 'd' attribute on +/// a 'path' element. +/// +/// The path data set is factored into two arrays. The segment data array stores all +/// numbers and the commands array stores the set of commands. Unlike the string +/// data set in the d attribute, each command in this representation uses a fixed +/// number of elements in the segment data array. Therefore, the path 'M 0,0 100,0 +/// 0,100 Z' is represented as: 'M0,0 L100,0 L0,100 Z'. This is split into two +/// arrays, with the segment data containing '0,0 100,0 0,100', and the commands +/// containing 'M L L Z'. +/// +interface DX_DECLARE_INTERFACE("c095e4f4-bb98-43d6-9745-4d1b84ec9888") ID2D1SvgPathData : public ID2D1SvgAttribute +{ + + /// + /// Removes data from the end of the segment data array. + /// + /// Specifies how much data to remove. + STDMETHOD(RemoveSegmentDataAtEnd)( + UINT32 dataCount + ) PURE; + + /// + /// Updates the segment data array. Existing segment data not updated by this method + /// are preserved. The array is resized larger if necessary to accomodate the new + /// segment data. + /// + /// The data array. + /// The number of data to update. + /// The index at which to begin updating segment data. Must + /// be less than or equal to the size of the segment data array. + STDMETHOD(UpdateSegmentData)( + _In_reads_(dataCount) CONST FLOAT *data, + UINT32 dataCount, + UINT32 startIndex = 0 + ) PURE; + + /// + /// Gets data from the segment data array. + /// + /// Buffer to contain the segment data array. + /// The element count of the buffer. + /// The index of the first segment data to retrieve. + /// + STDMETHOD(GetSegmentData)( + _Out_writes_(dataCount) FLOAT *data, + UINT32 dataCount, + UINT32 startIndex = 0 + ) PURE; + + /// + /// Gets the size of the segment data array. + /// + STDMETHOD_(UINT32, GetSegmentDataCount)( + ) PURE; + + /// + /// Removes commands from the end of the commands array. + /// + /// Specifies how many commands to remove. + STDMETHOD(RemoveCommandsAtEnd)( + UINT32 commandsCount + ) PURE; + + /// + /// Updates the commands array. Existing commands not updated by this method are + /// preserved. The array is resized larger if necessary to accomodate the new + /// commands. + /// + /// The commands array. + /// The number of commands to update. + /// The index at which to begin updating commands. Must be + /// less than or equal to the size of the commands array. + STDMETHOD(UpdateCommands)( + _In_reads_(commandsCount) CONST D2D1_SVG_PATH_COMMAND *commands, + UINT32 commandsCount, + UINT32 startIndex = 0 + ) PURE; + + /// + /// Gets commands from the commands array. + /// + /// Buffer to contain the commands + /// The element count of the buffer. + /// The index of the first commands to retrieve. + STDMETHOD(GetCommands)( + _Out_writes_(commandsCount) D2D1_SVG_PATH_COMMAND *commands, + UINT32 commandsCount, + UINT32 startIndex = 0 + ) PURE; + + /// + /// Gets the size of the commands array. + /// + STDMETHOD_(UINT32, GetCommandsCount)( + ) PURE; + + /// + /// Creates a path geometry object representing the path data. + /// + STDMETHOD(CreatePathGeometry)( + D2D1_FILL_MODE fillMode, + _COM_Outptr_ ID2D1PathGeometry1 **pathGeometry + ) PURE; +}; // interface ID2D1SvgPathData + + +/// +/// Interface for all SVG elements. +/// +interface DX_DECLARE_INTERFACE("ac7b67a6-183e-49c1-a823-0ebe40b0db29") ID2D1SvgElement : public ID2D1Resource +{ + + /// + /// Gets the document that contains this element. Returns null if the element has + /// been removed from the tree. + /// + STDMETHOD_(void, GetDocument)( + _Outptr_result_maybenull_ ID2D1SvgDocument **document + ) PURE; + + /// + /// Gets the tag name. + /// + STDMETHOD(GetTagName)( + _Out_writes_(nameCount) PWSTR name, + UINT32 nameCount + ) PURE; + + /// + /// Gets the string length of the tag name. The returned string length does not + /// include room for the null terminator. + /// + STDMETHOD_(UINT32, GetTagNameLength)( + ) PURE; + + /// + /// Returns TRUE if this element represents text content, e.g. the content of a + /// 'title' or 'desc' element. Text content does not have a tag name. + /// + STDMETHOD_(BOOL, IsTextContent)( + ) PURE; + + /// + /// Gets the parent element. + /// + STDMETHOD_(void, GetParent)( + _Outptr_result_maybenull_ ID2D1SvgElement **parent + ) PURE; + + /// + /// Returns whether this element has children. + /// + STDMETHOD_(BOOL, HasChildren)( + ) PURE; + + /// + /// Gets the first child of this element. + /// + STDMETHOD_(void, GetFirstChild)( + _Outptr_result_maybenull_ ID2D1SvgElement **child + ) PURE; + + /// + /// Gets the last child of this element. + /// + STDMETHOD_(void, GetLastChild)( + _Outptr_result_maybenull_ ID2D1SvgElement **child + ) PURE; + + /// + /// Gets the previous sibling of the referenceChild element. + /// + /// The referenceChild must be an immediate child of + /// this element. + /// The output previousChild element will be non-null if + /// the referenceChild has a previous sibling. If the referenceChild is the first + /// child, the output is null. + STDMETHOD(GetPreviousChild)( + _In_ ID2D1SvgElement *referenceChild, + _COM_Outptr_result_maybenull_ ID2D1SvgElement **previousChild + ) PURE; + + /// + /// Gets the next sibling of the referenceChild element. + /// + /// The referenceChild must be an immediate child of + /// this element. + /// The output nextChild element will be non-null if the + /// referenceChild has a next sibling. If the referenceChild is the last child, the + /// output is null. + STDMETHOD(GetNextChild)( + _In_ ID2D1SvgElement *referenceChild, + _COM_Outptr_result_maybenull_ ID2D1SvgElement **nextChild + ) PURE; + + /// + /// Inserts newChild as a child of this element, before the referenceChild element. + /// If the newChild element already has a parent, it is removed from this parent as + /// part of the insertion. Returns an error if this element cannot accept children + /// of the type of newChild. Returns an error if the newChild is an ancestor of this + /// element. + /// + /// The element to be inserted. + /// The element that the child should be inserted + /// before. If referenceChild is null, the newChild is placed as the last child. If + /// referenceChild is non-null, it must be an immediate child of this element. + /// + STDMETHOD(InsertChildBefore)( + _In_ ID2D1SvgElement *newChild, + _In_opt_ ID2D1SvgElement *referenceChild = NULL + ) PURE; + + /// + /// Appends newChild to the list of children. If the newChild element already has a + /// parent, it is removed from this parent as part of the append operation. Returns + /// an error if this element cannot accept children of the type of newChild. Returns + /// an error if the newChild is an ancestor of this element. + /// + /// The element to be appended. + STDMETHOD(AppendChild)( + _In_ ID2D1SvgElement *newChild + ) PURE; + + /// + /// Replaces the oldChild element with the newChild. This operation removes the + /// oldChild from the tree. If the newChild element already has a parent, it is + /// removed from this parent as part of the replace operation. Returns an error if + /// this element cannot accept children of the type of newChild. Returns an error if + /// the newChild is an ancestor of this element. + /// + /// The element to be inserted. + /// The child element to be replaced. The oldChild element + /// must be an immediate child of this element. + STDMETHOD(ReplaceChild)( + _In_ ID2D1SvgElement *newChild, + _In_ ID2D1SvgElement *oldChild + ) PURE; + + /// + /// Removes the oldChild from the tree. Children of oldChild remain children of + /// oldChild. + /// + /// The child element to be removed. The oldChild element + /// must be an immediate child of this element. + STDMETHOD(RemoveChild)( + _In_ ID2D1SvgElement *oldChild + ) PURE; + + /// + /// Creates an element from a tag name. The element is appended to the list of + /// children. Returns an error if this element cannot accept children of the + /// specified type. + /// + /// The tag name of the new child. An empty string is + /// interpreted to be a text content element. + /// The new child element. + STDMETHOD(CreateChild)( + _In_ PCWSTR tagName, + _COM_Outptr_ ID2D1SvgElement **newChild + ) PURE; + + /// + /// Returns true if the attribute is explicitly set on the element or if it is + /// present within an inline style. Returns FALSE if the attribute is not a valid + /// attribute on this element. + /// + /// The name of the attribute. + /// Outputs whether the attribute is set to the 'inherit' + /// value. + STDMETHOD_(BOOL, IsAttributeSpecified)( + _In_ PCWSTR name, + _Out_opt_ BOOL *inherited = NULL + ) PURE; + + /// + /// Returns the number of specified attributes on this element. Attributes are only + /// considered specified if they are explicitly set on the element or present within + /// an inline style. Properties that receive their value through CSS inheritance are + /// not considered specified. An attribute can become specified if it is set through + /// a method call. It can become unspecified if it is removed via RemoveAttribute. + /// + STDMETHOD_(UINT32, GetSpecifiedAttributeCount)( + ) PURE; + + /// + /// Gets the name of the specified attribute at the given index. + /// + /// The specified index of the attribute. + /// Outputs the name of the attribute. + /// Outputs whether the attribute is set to the 'inherit' + /// value. + STDMETHOD(GetSpecifiedAttributeName)( + UINT32 index, + _Out_writes_(nameCount) PWSTR name, + UINT32 nameCount, + _Out_opt_ BOOL *inherited = NULL + ) PURE; + + /// + /// Gets the string length of the name of the specified attribute at the given + /// index. The output string length does not include room for the null terminator. + /// + /// The specified index of the attribute. + /// Outputs the string length of the name of the specified + /// attribute. + /// Outputs whether the attribute is set to the 'inherit' + /// value. + STDMETHOD(GetSpecifiedAttributeNameLength)( + UINT32 index, + _Out_ UINT32 *nameLength, + _Out_opt_ BOOL *inherited = NULL + ) PURE; + + /// + /// Removes the attribute from this element. Also removes this attribute from within + /// an inline style if present. Returns an error if the attribute name is not valid + /// on this element. + /// + STDMETHOD(RemoveAttribute)( + _In_ PCWSTR name + ) PURE; + + /// + /// Sets the value of a text content element. + /// + STDMETHOD(SetTextValue)( + _In_reads_(nameCount) CONST WCHAR *name, + UINT32 nameCount + ) PURE; + + /// + /// Gets the value of a text content element. + /// + STDMETHOD(GetTextValue)( + _Out_writes_(nameCount) PWSTR name, + UINT32 nameCount + ) PURE; + + /// + /// Gets the length of the text content value. The returned string length does not + /// include room for the null terminator. + /// + STDMETHOD_(UINT32, GetTextValueLength)( + ) PURE; + + /// + /// Sets an attribute of this element using a string. Returns an error if the + /// attribute name is not valid on this element. Returns an error if the attribute + /// cannot be expressed as the specified type. + /// + STDMETHOD(SetAttributeValue)( + _In_ PCWSTR name, + D2D1_SVG_ATTRIBUTE_STRING_TYPE type, + _In_ PCWSTR value + ) PURE; + + /// + /// Gets an attribute of this element as a string. Returns an error if the attribute + /// is not specified. Returns an error if the attribute name is not valid on this + /// element. Returns an error if the attribute cannot be expressed as the specified + /// string type. + /// + STDMETHOD(GetAttributeValue)( + _In_ PCWSTR name, + D2D1_SVG_ATTRIBUTE_STRING_TYPE type, + _Out_writes_(valueCount) PWSTR value, + UINT32 valueCount + ) PURE; + + /// + /// Gets the string length of an attribute of this element. The returned string + /// length does not include room for the null terminator. Returns an error if the + /// attribute is not specified. Returns an error if the attribute name is not valid + /// on this element. Returns an error if the attribute cannot be expressed as the + /// specified string type. + /// + STDMETHOD(GetAttributeValueLength)( + _In_ PCWSTR name, + D2D1_SVG_ATTRIBUTE_STRING_TYPE type, + _Out_ UINT32 *valueLength + ) PURE; + + /// + /// Sets an attribute of this element using a POD type. Returns an error if the + /// attribute name is not valid on this element. Returns an error if the attribute + /// cannot be expressed as the specified type. + /// + STDMETHOD(SetAttributeValue)( + _In_ PCWSTR name, + D2D1_SVG_ATTRIBUTE_POD_TYPE type, + _In_reads_bytes_(valueSizeInBytes) CONST void *value, + UINT32 valueSizeInBytes + ) PURE; + + /// + /// Gets an attribute of this element as a POD type. Returns an error if the + /// attribute is not specified. Returns an error if the attribute name is not valid + /// on this element. Returns an error if the attribute cannot be expressed as the + /// specified POD type. + /// + STDMETHOD(GetAttributeValue)( + _In_ PCWSTR name, + D2D1_SVG_ATTRIBUTE_POD_TYPE type, + _Out_writes_bytes_(valueSizeInBytes) void *value, + UINT32 valueSizeInBytes + ) PURE; + + /// + /// Sets an attribute of this element using an interface. Returns an error if the + /// attribute name is not valid on this element. Returns an error if the attribute + /// cannot be expressed as the specified interface type. Returns an error if the + /// attribute object is already set on an element. A given attribute object may only + /// be set on one element in one attribute location at a time. + /// + STDMETHOD(SetAttributeValue)( + _In_ PCWSTR name, + _In_ ID2D1SvgAttribute *value + ) PURE; + + /// + /// Gets an attribute of this element as an interface type. Returns an error if the + /// attribute is not specified. Returns an error if the attribute name is not valid + /// on this element. Returns an error if the attribute cannot be expressed as the + /// specified interface type. + /// + /// The interface ID of the attribute value. + STDMETHOD(GetAttributeValue)( + _In_ PCWSTR name, + _In_ REFIID riid, + _COM_Outptr_result_maybenull_ void **value + ) PURE; + + /// + /// Sets an attribute of this element using a float. + /// + COM_DECLSPEC_NOTHROW + HRESULT + SetAttributeValue( + _In_ PCWSTR name, + FLOAT value + ) + { + return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_FLOAT, &value, sizeof(value)); + } + + /// + /// Gets an attribute of this element as a float. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetAttributeValue( + _In_ PCWSTR name, + _Out_ FLOAT *value + ) + { + return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_FLOAT, value, sizeof(*value)); + } + + /// + /// Sets an attribute of this element as a color. + /// + COM_DECLSPEC_NOTHROW + HRESULT + SetAttributeValue( + _In_ PCWSTR name, + CONST D2D1_COLOR_F &value + ) + { + return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_COLOR, &value, sizeof(value)); + } + + /// + /// Gets an attribute of this element as a color. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetAttributeValue( + _In_ PCWSTR name, + _Out_ D2D1_COLOR_F *value + ) + { + return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_COLOR, value, sizeof(*value)); + } + + /// + /// Sets an attribute of this element as a fill mode. This method can be used to set + /// the value of the 'fill-rule' or 'clip-rule' properties. + /// + COM_DECLSPEC_NOTHROW + HRESULT + SetAttributeValue( + _In_ PCWSTR name, + D2D1_FILL_MODE value + ) + { + return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_FILL_MODE, &value, sizeof(value)); + } + + /// + /// Gets an attribute of this element as a fill mode. This method can be used to get + /// the value of the 'fill-rule' or 'clip-rule' properties. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetAttributeValue( + _In_ PCWSTR name, + _Out_ D2D1_FILL_MODE *value + ) + { + return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_FILL_MODE, value, sizeof(*value)); + } + + /// + /// Sets an attribute of this element as a display value. This method can be used to + /// set the value of the 'display' property. + /// + COM_DECLSPEC_NOTHROW + HRESULT + SetAttributeValue( + _In_ PCWSTR name, + D2D1_SVG_DISPLAY value + ) + { + return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_DISPLAY, &value, sizeof(value)); + } + + /// + /// Gets an attribute of this element as a display value. This method can be used to + /// get the value of the 'display' property. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetAttributeValue( + _In_ PCWSTR name, + _Out_ D2D1_SVG_DISPLAY *value + ) + { + return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_DISPLAY, value, sizeof(*value)); + } + + /// + /// Sets an attribute of this element as an overflow value. This method can be used + /// to set the value of the 'overflow' property. + /// + COM_DECLSPEC_NOTHROW + HRESULT + SetAttributeValue( + _In_ PCWSTR name, + D2D1_SVG_OVERFLOW value + ) + { + return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_OVERFLOW, &value, sizeof(value)); + } + + /// + /// Gets an attribute of this element as an overflow value. This method can be used + /// to get the value of the 'overflow' property. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetAttributeValue( + _In_ PCWSTR name, + _Out_ D2D1_SVG_OVERFLOW *value + ) + { + return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_OVERFLOW, value, sizeof(*value)); + } + + /// + /// Sets an attribute of this element as a line join value. This method can be used + /// to set the value of the 'stroke-linejoin' property. + /// + COM_DECLSPEC_NOTHROW + HRESULT + SetAttributeValue( + _In_ PCWSTR name, + D2D1_SVG_LINE_JOIN value + ) + { + return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_LINE_JOIN, &value, sizeof(value)); + } + + /// + /// Gets an attribute of this element as a line join value. This method can be used + /// to get the value of the 'stroke-linejoin' property. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetAttributeValue( + _In_ PCWSTR name, + _Out_ D2D1_SVG_LINE_JOIN *value + ) + { + return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_LINE_JOIN, value, sizeof(*value)); + } + + /// + /// Sets an attribute of this element as a line cap value. This method can be used + /// to set the value of the 'stroke-linecap' property. + /// + COM_DECLSPEC_NOTHROW + HRESULT + SetAttributeValue( + _In_ PCWSTR name, + D2D1_SVG_LINE_CAP value + ) + { + return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_LINE_CAP, &value, sizeof(value)); + } + + /// + /// Gets an attribute of this element as a line cap value. This method can be used + /// to get the value of the 'stroke-linecap' property. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetAttributeValue( + _In_ PCWSTR name, + _Out_ D2D1_SVG_LINE_CAP *value + ) + { + return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_LINE_CAP, value, sizeof(*value)); + } + + /// + /// Sets an attribute of this element as a visibility value. This method can be used + /// to set the value of the 'visibility' property. + /// + COM_DECLSPEC_NOTHROW + HRESULT + SetAttributeValue( + _In_ PCWSTR name, + D2D1_SVG_VISIBILITY value + ) + { + return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_VISIBILITY, &value, sizeof(value)); + } + + /// + /// Gets an attribute of this element as a visibility value. This method can be used + /// to get the value of the 'visibility' property. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetAttributeValue( + _In_ PCWSTR name, + _Out_ D2D1_SVG_VISIBILITY *value + ) + { + return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_VISIBILITY, value, sizeof(*value)); + } + + /// + /// Sets an attribute of this element as a matrix value. This method can be used to + /// set the value of a 'transform' or 'gradientTransform' attribute. + /// + COM_DECLSPEC_NOTHROW + HRESULT + SetAttributeValue( + _In_ PCWSTR name, + CONST D2D1_MATRIX_3X2_F &value + ) + { + return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_MATRIX, &value, sizeof(value)); + } + + /// + /// Gets an attribute of this element as a matrix value. This method can be used to + /// get the value of a 'transform' or 'gradientTransform' attribute. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetAttributeValue( + _In_ PCWSTR name, + _Out_ D2D1_MATRIX_3X2_F *value + ) + { + return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_MATRIX, value, sizeof(*value)); + } + + /// + /// Sets an attribute of this element as a unit type value. This method can be used + /// to set the value of a 'gradientUnits' or 'clipPathUnits' attribute. + /// + COM_DECLSPEC_NOTHROW + HRESULT + SetAttributeValue( + _In_ PCWSTR name, + D2D1_SVG_UNIT_TYPE value + ) + { + return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_UNIT_TYPE, &value, sizeof(value)); + } + + /// + /// Gets an attribute of this element as a unit type value. This method can be used + /// to get the value of a 'gradientUnits' or 'clipPathUnits' attribute. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetAttributeValue( + _In_ PCWSTR name, + _Out_ D2D1_SVG_UNIT_TYPE *value + ) + { + return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_UNIT_TYPE, value, sizeof(*value)); + } + + /// + /// Sets an attribute of this element as an extend mode value. This method can be + /// used to set the value of a 'spreadMethod' attribute. + /// + COM_DECLSPEC_NOTHROW + HRESULT + SetAttributeValue( + _In_ PCWSTR name, + D2D1_EXTEND_MODE value + ) + { + return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_EXTEND_MODE, &value, sizeof(value)); + } + + /// + /// Gets an attribute of this element as a extend mode value. This method can be + /// used to get the value of a 'spreadMethod' attribute. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetAttributeValue( + _In_ PCWSTR name, + _Out_ D2D1_EXTEND_MODE *value + ) + { + return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_EXTEND_MODE, value, sizeof(*value)); + } + + /// + /// Sets an attribute of this element as a preserve aspect ratio value. This method + /// can be used to set the value of a 'preserveAspectRatio' attribute. + /// + COM_DECLSPEC_NOTHROW + HRESULT + SetAttributeValue( + _In_ PCWSTR name, + CONST D2D1_SVG_PRESERVE_ASPECT_RATIO &value + ) + { + return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_PRESERVE_ASPECT_RATIO, &value, sizeof(value)); + } + + /// + /// Gets an attribute of this element as a preserve aspect ratio value. This method + /// can be used to get the value of a 'preserveAspectRatio' attribute. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetAttributeValue( + _In_ PCWSTR name, + _Out_ D2D1_SVG_PRESERVE_ASPECT_RATIO *value + ) + { + return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_PRESERVE_ASPECT_RATIO, value, sizeof(*value)); + } + + /// + /// Sets an attribute of this element as a length value. + /// + COM_DECLSPEC_NOTHROW + HRESULT + SetAttributeValue( + _In_ PCWSTR name, + CONST D2D1_SVG_LENGTH &value + ) + { + return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_LENGTH, &value, sizeof(value)); + } + + /// + /// Gets an attribute of this element as length value. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetAttributeValue( + _In_ PCWSTR name, + _Out_ D2D1_SVG_LENGTH *value + ) + { + return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_LENGTH, value, sizeof(*value)); + } + + /// + /// Gets an attribute of this element. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetAttributeValue( + _In_ PCWSTR name, + _COM_Outptr_result_maybenull_ ID2D1SvgAttribute **value + ) + { + return GetAttributeValue(name, IID_ID2D1SvgAttribute, reinterpret_cast(value)); + } + + /// + /// Gets an attribute of this element as a paint. This method can be used to get the + /// value of the 'fill' or 'stroke' properties. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetAttributeValue( + _In_ PCWSTR name, + _COM_Outptr_result_maybenull_ ID2D1SvgPaint **value + ) + { + return GetAttributeValue(name, IID_ID2D1SvgPaint, reinterpret_cast(value)); + } + + /// + /// Gets an attribute of this element as a stroke dash array. This method can be + /// used to get the value of the 'stroke-dasharray' property. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetAttributeValue( + _In_ PCWSTR name, + _COM_Outptr_result_maybenull_ ID2D1SvgStrokeDashArray **value + ) + { + return GetAttributeValue(name, IID_ID2D1SvgStrokeDashArray, reinterpret_cast(value)); + } + + /// + /// Gets an attribute of this element as points. This method can be used to get the + /// value of the 'points' attribute on a 'polygon' or 'polyline' element. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetAttributeValue( + _In_ PCWSTR name, + _COM_Outptr_result_maybenull_ ID2D1SvgPointCollection **value + ) + { + return GetAttributeValue(name, IID_ID2D1SvgPointCollection, reinterpret_cast(value)); + } + + /// + /// Gets an attribute of this element as path data. This method can be used to get + /// the value of the 'd' attribute on a 'path' element. + /// + COM_DECLSPEC_NOTHROW + HRESULT + GetAttributeValue( + _In_ PCWSTR name, + _COM_Outptr_result_maybenull_ ID2D1SvgPathData **value + ) + { + return GetAttributeValue(name, IID_ID2D1SvgPathData, reinterpret_cast(value)); + } +}; // interface ID2D1SvgElement + + +interface DX_DECLARE_INTERFACE("86b88e4d-afa4-4d7b-88e4-68a51c4a0aec") ID2D1SvgDocument : public ID2D1Resource +{ + + /// + /// Sets the size of the initial viewport. + /// + STDMETHOD(SetViewportSize)( + D2D1_SIZE_F viewportSize + ) PURE; + + /// + /// Returns the size of the initial viewport. + /// + STDMETHOD_(D2D1_SIZE_F, GetViewportSize)( + ) CONST PURE; + + /// + /// Sets the root element of the document. The root element must be an 'svg' + /// element. If the element already exists within an svg tree, it is first removed. + /// + STDMETHOD(SetRoot)( + _In_opt_ ID2D1SvgElement *root + ) PURE; + + /// + /// Gets the root element of the document. + /// + STDMETHOD_(void, GetRoot)( + _Outptr_result_maybenull_ ID2D1SvgElement **root + ) PURE; + + /// + /// Gets the SVG element with the specified ID. If the element cannot be found, the + /// returned element will be null. + /// + STDMETHOD(FindElementById)( + _In_ PCWSTR id, + _COM_Outptr_result_maybenull_ ID2D1SvgElement **svgElement + ) PURE; + + /// + /// Serializes an element and its subtree to XML. The output XML is encoded as + /// UTF-8. + /// + /// An output stream to contain the SVG XML subtree. + /// + /// The root of the subtree. If null, the entire document is + /// serialized. + STDMETHOD(Serialize)( + _In_ IStream *outputXmlStream, + _In_opt_ ID2D1SvgElement *subtree = NULL + ) PURE; + + /// + /// Deserializes a subtree from the stream. The stream must have only one root + /// element, but that root element need not be an 'svg' element. The output element + /// is not inserted into this document tree. + /// + /// An input stream containing the SVG XML subtree. + /// + /// The root of the subtree. + STDMETHOD(Deserialize)( + _In_ IStream *inputXmlStream, + _COM_Outptr_ ID2D1SvgElement **subtree + ) PURE; + + /// + /// Creates a paint object which can be used to set the 'fill' or 'stroke' + /// properties. + /// + /// The color used if the paintType is + /// D2D1_SVG_PAINT_TYPE_COLOR. + /// The element id which acts as the paint server. This id is used + /// if the paint type is D2D1_SVG_PAINT_TYPE_URI. + STDMETHOD(CreatePaint)( + D2D1_SVG_PAINT_TYPE paintType, + _In_opt_ CONST D2D1_COLOR_F *color, + _In_opt_ PCWSTR id, + _COM_Outptr_ ID2D1SvgPaint **paint + ) PURE; + + /// + /// Creates a dash array object which can be used to set the 'stroke-dasharray' + /// property. + /// + STDMETHOD(CreateStrokeDashArray)( + _In_reads_opt_(dashesCount) CONST D2D1_SVG_LENGTH *dashes, + UINT32 dashesCount, + _COM_Outptr_ ID2D1SvgStrokeDashArray **strokeDashArray + ) PURE; + + /// + /// Creates a points object which can be used to set a 'points' attribute on a + /// 'polygon' or 'polyline' element. + /// + STDMETHOD(CreatePointCollection)( + _In_reads_opt_(pointsCount) CONST D2D1_POINT_2F *points, + UINT32 pointsCount, + _COM_Outptr_ ID2D1SvgPointCollection **pointCollection + ) PURE; + + /// + /// Creates a path data object which can be used to set a 'd' attribute on a 'path' + /// element. + /// + STDMETHOD(CreatePathData)( + _In_reads_opt_(segmentDataCount) CONST FLOAT *segmentData, + UINT32 segmentDataCount, + _In_reads_opt_(commandsCount) CONST D2D1_SVG_PATH_COMMAND *commands, + UINT32 commandsCount, + _COM_Outptr_ ID2D1SvgPathData **pathData + ) PURE; + + /// + /// Creates a paint object which can be used to set the 'fill' or 'stroke' + /// properties. + /// + /// The color used if the paintType is + /// D2D1_SVG_PAINT_TYPE_COLOR. + /// The element id which acts as the paint server. This id is used + /// if the paint type is D2D1_SVG_PAINT_TYPE_URI. + COM_DECLSPEC_NOTHROW + HRESULT + CreatePaint( + D2D1_SVG_PAINT_TYPE paintType, + CONST D2D1_COLOR_F &color, + _In_opt_ PCWSTR id, + _COM_Outptr_ ID2D1SvgPaint **paint + ) + { + return CreatePaint(paintType, &color, id, paint); + } +}; // interface ID2D1SvgDocument + + +#endif + +#endif + + +#ifdef D2D_USE_C_DEFINITIONS + + +#endif + + + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ +#endif // #ifndef _D2D1_SVG_ diff --git a/gfx/include/dxsdk/d2dbasetypes.h b/gfx/include/dxsdk/d2dbasetypes.h new file mode 100644 index 0000000000..da4eba5e2b --- /dev/null +++ b/gfx/include/dxsdk/d2dbasetypes.h @@ -0,0 +1,25 @@ +//--------------------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// This file is automatically generated. Please do not edit it directly. +// +// File name: D2DBaseTypes.h +//--------------------------------------------------------------------------- +#ifdef _MSC_VER +#pragma once +#endif // #ifdef _MSC_VER + +#ifndef _D2DBASETYPES_INCLUDED +#define _D2DBASETYPES_INCLUDED + +#ifndef COM_NO_WINDOWS_H +#include +#endif // #ifndef COM_NO_WINDOWS_H +#ifndef __dxgitype_h__ +#include +#endif // #ifndef __dxgitype_h__ +#ifndef DCOMMON_H_INCLUDED +#include +#endif // #ifndef DCOMMON_H_INCLUDED +typedef D3DCOLORVALUE D2D_COLOR_F; +#endif // #ifndef _D2DBASETYPES_INCLUDED diff --git a/gfx/include/dxsdk/d2derr.h b/gfx/include/dxsdk/d2derr.h new file mode 100644 index 0000000000..86924be4e1 --- /dev/null +++ b/gfx/include/dxsdk/d2derr.h @@ -0,0 +1,230 @@ +/*=========================================================================*\ + + Copyright (c) Microsoft Corporation. All rights reserved. + +\*=========================================================================*/ + +#pragma once + +/*#include */ + +/*#pragma region Desktop Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ + +/*=========================================================================*\ + D2D Status Codes +\*=========================================================================*/ + +#define FACILITY_D2D 0x899 + +#define MAKE_D2DHR( sev, code )\ + MAKE_HRESULT( sev, FACILITY_D2D, (code) ) + +#define MAKE_D2DHR_ERR( code )\ + MAKE_D2DHR( 1, code ) + + +//+---------------------------------------------------------------------------- +// +// D2D error codes +// +//------------------------------------------------------------------------------ + +// +// Error codes shared with WINCODECS +// + +// +// The pixel format is not supported. +// +#define D2DERR_UNSUPPORTED_PIXEL_FORMAT WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT + +// +// Error codes that were already returned in prior versions and were part of the +// MIL facility. + +// +// Error codes mapped from WIN32 where there isn't already another HRESULT based +// define +// + +// +// The supplied buffer was too small to accommodate the data. +// +#define D2DERR_INSUFFICIENT_BUFFER HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) + + +// +// The file specified was not found. +// +#define D2DERR_FILE_NOT_FOUND HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) + + +#ifndef D2DERR_WRONG_STATE + +// +// D2D specific codes +// + +// +// The object was not in the correct state to process the method. +// +#define D2DERR_WRONG_STATE MAKE_D2DHR_ERR(0x001) + +// +// The object has not yet been initialized. +// +#define D2DERR_NOT_INITIALIZED MAKE_D2DHR_ERR(0x002) + +// +// The requested opertion is not supported. +// +#define D2DERR_UNSUPPORTED_OPERATION MAKE_D2DHR_ERR(0x003) + +// +// The geomery scanner failed to process the data. +// +#define D2DERR_SCANNER_FAILED MAKE_D2DHR_ERR(0x004) + +// +// D2D could not access the screen. +// +#define D2DERR_SCREEN_ACCESS_DENIED MAKE_D2DHR_ERR(0x005) + +// +// A valid display state could not be determined. +// +#define D2DERR_DISPLAY_STATE_INVALID MAKE_D2DHR_ERR(0x006) + +// +// The supplied vector is vero. +// +#define D2DERR_ZERO_VECTOR MAKE_D2DHR_ERR(0x007) + +// +// An internal error (D2D bug) occurred. On checked builds, we would assert. +// +// The application should close this instance of D2D and should consider +// restarting its process. +// +#define D2DERR_INTERNAL_ERROR MAKE_D2DHR_ERR(0x008) + +// +// The display format we need to render is not supported by the +// hardware device. +// +#define D2DERR_DISPLAY_FORMAT_NOT_SUPPORTED MAKE_D2DHR_ERR(0x009) + +// +// A call to this method is invalid. +// +#define D2DERR_INVALID_CALL MAKE_D2DHR_ERR(0x00A) + +// +// No HW rendering device is available for this operation. +// +#define D2DERR_NO_HARDWARE_DEVICE MAKE_D2DHR_ERR(0x00B) + +// +// There has been a presentation error that may be recoverable. The caller +// needs to recreate, rerender the entire frame, and reattempt present. +// +#define D2DERR_RECREATE_TARGET MAKE_D2DHR_ERR(0x00C) + +// +// Shader construction failed because it was too complex. +// +#define D2DERR_TOO_MANY_SHADER_ELEMENTS MAKE_D2DHR_ERR(0x00D) + +// +// Shader compilation failed. +// +#define D2DERR_SHADER_COMPILE_FAILED MAKE_D2DHR_ERR(0x00E) + +// +// Requested DX surface size exceeded maximum texture size. +// +#define D2DERR_MAX_TEXTURE_SIZE_EXCEEDED MAKE_D2DHR_ERR(0x00F) + +// +// The requested D2D version is not supported. +// +#define D2DERR_UNSUPPORTED_VERSION MAKE_D2DHR_ERR(0x010) + +// +// Invalid number. +// +#define D2DERR_BAD_NUMBER MAKE_D2DHR_ERR(0x0011) + +// +// Objects used together must be created from the same factory instance. +// +#define D2DERR_WRONG_FACTORY MAKE_D2DHR_ERR(0x012) + +// +// A layer resource can only be in use once at any point in time. +// +#define D2DERR_LAYER_ALREADY_IN_USE MAKE_D2DHR_ERR(0x013) + +// +// The pop call did not match the corresponding push call +// +#define D2DERR_POP_CALL_DID_NOT_MATCH_PUSH MAKE_D2DHR_ERR(0x014) + +// +// The resource was realized on the wrong render target +// +#define D2DERR_WRONG_RESOURCE_DOMAIN MAKE_D2DHR_ERR(0x015) + +// +// The push and pop calls were unbalanced +// +#define D2DERR_PUSH_POP_UNBALANCED MAKE_D2DHR_ERR(0x016) + +// +// Attempt to copy from a render target while a layer or clip rect is applied +// +#define D2DERR_RENDER_TARGET_HAS_LAYER_OR_CLIPRECT MAKE_D2DHR_ERR(0x017) + +// +// The brush types are incompatible for the call. +// +#define D2DERR_INCOMPATIBLE_BRUSH_TYPES MAKE_D2DHR_ERR(0x018) + +// +// An unknown win32 failure occurred. +// +#define D2DERR_WIN32_ERROR MAKE_D2DHR_ERR(0x019) + +// +// The render target is not compatible with GDI +// +#define D2DERR_TARGET_NOT_GDI_COMPATIBLE MAKE_D2DHR_ERR(0x01A) + +// +// A text client drawing effect object is of the wrong type +// +#define D2DERR_TEXT_EFFECT_IS_WRONG_TYPE MAKE_D2DHR_ERR(0x01B) + +// +// The application is holding a reference to the IDWriteTextRenderer interface +// after the corresponding DrawText or DrawTextLayout call has returned. The +// IDWriteTextRenderer instance will be zombied. +// +#define D2DERR_TEXT_RENDERER_NOT_RELEASED MAKE_D2DHR_ERR(0x01C) + +// +// The requested size is larger than the guaranteed supported texture size. +// +#define D2DERR_EXCEEDS_MAX_BITMAP_SIZE MAKE_D2DHR_ERR(0x01D) + +#else /*D2DERR_WRONG_STATE*/ + +// +// D2D specific codes now live in winerror.h +// + +#endif /*D2DERR_WRONG_STATE*/ + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ diff --git a/gfx/include/dxsdk/d3d10.h b/gfx/include/dxsdk/d3d10.h new file mode 100644 index 0000000000..c0d91ad9ec --- /dev/null +++ b/gfx/include/dxsdk/d3d10.h @@ -0,0 +1,6819 @@ +/*------------------------------------------------------------------------------------- + * + * Copyright (c) Microsoft Corporation + * + *-------------------------------------------------------------------------------------*/ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ +/* @@MIDL_FILE_HEADING( ) */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __d3d10_h__ +#define __d3d10_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __ID3D10DeviceChild_FWD_DEFINED__ +#define __ID3D10DeviceChild_FWD_DEFINED__ +typedef interface ID3D10DeviceChild ID3D10DeviceChild; + +#endif /* __ID3D10DeviceChild_FWD_DEFINED__ */ + + +#ifndef __ID3D10DepthStencilState_FWD_DEFINED__ +#define __ID3D10DepthStencilState_FWD_DEFINED__ +typedef interface ID3D10DepthStencilState ID3D10DepthStencilState; + +#endif /* __ID3D10DepthStencilState_FWD_DEFINED__ */ + + +#ifndef __ID3D10BlendState_FWD_DEFINED__ +#define __ID3D10BlendState_FWD_DEFINED__ +typedef interface ID3D10BlendState ID3D10BlendState; + +#endif /* __ID3D10BlendState_FWD_DEFINED__ */ + + +#ifndef __ID3D10RasterizerState_FWD_DEFINED__ +#define __ID3D10RasterizerState_FWD_DEFINED__ +typedef interface ID3D10RasterizerState ID3D10RasterizerState; + +#endif /* __ID3D10RasterizerState_FWD_DEFINED__ */ + + +#ifndef __ID3D10Resource_FWD_DEFINED__ +#define __ID3D10Resource_FWD_DEFINED__ +typedef interface ID3D10Resource ID3D10Resource; + +#endif /* __ID3D10Resource_FWD_DEFINED__ */ + + +#ifndef __ID3D10Buffer_FWD_DEFINED__ +#define __ID3D10Buffer_FWD_DEFINED__ +typedef interface ID3D10Buffer ID3D10Buffer; + +#endif /* __ID3D10Buffer_FWD_DEFINED__ */ + + +#ifndef __ID3D10Texture1D_FWD_DEFINED__ +#define __ID3D10Texture1D_FWD_DEFINED__ +typedef interface ID3D10Texture1D ID3D10Texture1D; + +#endif /* __ID3D10Texture1D_FWD_DEFINED__ */ + + +#ifndef __ID3D10Texture2D_FWD_DEFINED__ +#define __ID3D10Texture2D_FWD_DEFINED__ +typedef interface ID3D10Texture2D ID3D10Texture2D; + +#endif /* __ID3D10Texture2D_FWD_DEFINED__ */ + + +#ifndef __ID3D10Texture3D_FWD_DEFINED__ +#define __ID3D10Texture3D_FWD_DEFINED__ +typedef interface ID3D10Texture3D ID3D10Texture3D; + +#endif /* __ID3D10Texture3D_FWD_DEFINED__ */ + + +#ifndef __ID3D10View_FWD_DEFINED__ +#define __ID3D10View_FWD_DEFINED__ +typedef interface ID3D10View ID3D10View; + +#endif /* __ID3D10View_FWD_DEFINED__ */ + + +#ifndef __ID3D10ShaderResourceView_FWD_DEFINED__ +#define __ID3D10ShaderResourceView_FWD_DEFINED__ +typedef interface ID3D10ShaderResourceView ID3D10ShaderResourceView; + +#endif /* __ID3D10ShaderResourceView_FWD_DEFINED__ */ + + +#ifndef __ID3D10RenderTargetView_FWD_DEFINED__ +#define __ID3D10RenderTargetView_FWD_DEFINED__ +typedef interface ID3D10RenderTargetView ID3D10RenderTargetView; + +#endif /* __ID3D10RenderTargetView_FWD_DEFINED__ */ + + +#ifndef __ID3D10DepthStencilView_FWD_DEFINED__ +#define __ID3D10DepthStencilView_FWD_DEFINED__ +typedef interface ID3D10DepthStencilView ID3D10DepthStencilView; + +#endif /* __ID3D10DepthStencilView_FWD_DEFINED__ */ + + +#ifndef __ID3D10VertexShader_FWD_DEFINED__ +#define __ID3D10VertexShader_FWD_DEFINED__ +typedef interface ID3D10VertexShader ID3D10VertexShader; + +#endif /* __ID3D10VertexShader_FWD_DEFINED__ */ + + +#ifndef __ID3D10GeometryShader_FWD_DEFINED__ +#define __ID3D10GeometryShader_FWD_DEFINED__ +typedef interface ID3D10GeometryShader ID3D10GeometryShader; + +#endif /* __ID3D10GeometryShader_FWD_DEFINED__ */ + + +#ifndef __ID3D10PixelShader_FWD_DEFINED__ +#define __ID3D10PixelShader_FWD_DEFINED__ +typedef interface ID3D10PixelShader ID3D10PixelShader; + +#endif /* __ID3D10PixelShader_FWD_DEFINED__ */ + + +#ifndef __ID3D10InputLayout_FWD_DEFINED__ +#define __ID3D10InputLayout_FWD_DEFINED__ +typedef interface ID3D10InputLayout ID3D10InputLayout; + +#endif /* __ID3D10InputLayout_FWD_DEFINED__ */ + + +#ifndef __ID3D10SamplerState_FWD_DEFINED__ +#define __ID3D10SamplerState_FWD_DEFINED__ +typedef interface ID3D10SamplerState ID3D10SamplerState; + +#endif /* __ID3D10SamplerState_FWD_DEFINED__ */ + + +#ifndef __ID3D10Asynchronous_FWD_DEFINED__ +#define __ID3D10Asynchronous_FWD_DEFINED__ +typedef interface ID3D10Asynchronous ID3D10Asynchronous; + +#endif /* __ID3D10Asynchronous_FWD_DEFINED__ */ + + +#ifndef __ID3D10Query_FWD_DEFINED__ +#define __ID3D10Query_FWD_DEFINED__ +typedef interface ID3D10Query ID3D10Query; + +#endif /* __ID3D10Query_FWD_DEFINED__ */ + + +#ifndef __ID3D10Predicate_FWD_DEFINED__ +#define __ID3D10Predicate_FWD_DEFINED__ +typedef interface ID3D10Predicate ID3D10Predicate; + +#endif /* __ID3D10Predicate_FWD_DEFINED__ */ + + +#ifndef __ID3D10Counter_FWD_DEFINED__ +#define __ID3D10Counter_FWD_DEFINED__ +typedef interface ID3D10Counter ID3D10Counter; + +#endif /* __ID3D10Counter_FWD_DEFINED__ */ + + +#ifndef __ID3D10Device_FWD_DEFINED__ +#define __ID3D10Device_FWD_DEFINED__ +typedef interface ID3D10Device ID3D10Device; + +#endif /* __ID3D10Device_FWD_DEFINED__ */ + + +#ifndef __ID3D10Multithread_FWD_DEFINED__ +#define __ID3D10Multithread_FWD_DEFINED__ +typedef interface ID3D10Multithread ID3D10Multithread; + +#endif /* __ID3D10Multithread_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "dxgi.h" +#include "d3dcommon.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_d3d10_0000_0000 */ +/* [local] */ + +#ifndef _D3D10_CONSTANTS +#define _D3D10_CONSTANTS +#define D3D10_16BIT_INDEX_STRIP_CUT_VALUE ( 0xffff ) + +#define D3D10_32BIT_INDEX_STRIP_CUT_VALUE ( 0xffffffff ) + +#define D3D10_8BIT_INDEX_STRIP_CUT_VALUE ( 0xff ) + +#define D3D10_ARRAY_AXIS_ADDRESS_RANGE_BIT_COUNT ( 9 ) + +#define D3D10_CLIP_OR_CULL_DISTANCE_COUNT ( 8 ) + +#define D3D10_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT ( 2 ) + +#define D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT ( 14 ) + +#define D3D10_COMMONSHADER_CONSTANT_BUFFER_COMPONENTS ( 4 ) + +#define D3D10_COMMONSHADER_CONSTANT_BUFFER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D10_COMMONSHADER_CONSTANT_BUFFER_HW_SLOT_COUNT ( 15 ) + +#define D3D10_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COMPONENTS ( 4 ) + +#define D3D10_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT ( 15 ) + +#define D3D10_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READS_PER_INST ( 1 ) + +#define D3D10_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READ_PORTS ( 1 ) + +#define D3D10_COMMONSHADER_FLOWCONTROL_NESTING_LIMIT ( 64 ) + +#define D3D10_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COMPONENTS ( 4 ) + +#define D3D10_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COUNT ( 1 ) + +#define D3D10_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READS_PER_INST ( 1 ) + +#define D3D10_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READ_PORTS ( 1 ) + +#define D3D10_COMMONSHADER_IMMEDIATE_VALUE_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D10_COMMONSHADER_INPUT_RESOURCE_REGISTER_COMPONENTS ( 1 ) + +#define D3D10_COMMONSHADER_INPUT_RESOURCE_REGISTER_COUNT ( 128 ) + +#define D3D10_COMMONSHADER_INPUT_RESOURCE_REGISTER_READS_PER_INST ( 1 ) + +#define D3D10_COMMONSHADER_INPUT_RESOURCE_REGISTER_READ_PORTS ( 1 ) + +#define D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT ( 128 ) + +#define D3D10_COMMONSHADER_SAMPLER_REGISTER_COMPONENTS ( 1 ) + +#define D3D10_COMMONSHADER_SAMPLER_REGISTER_COUNT ( 16 ) + +#define D3D10_COMMONSHADER_SAMPLER_REGISTER_READS_PER_INST ( 1 ) + +#define D3D10_COMMONSHADER_SAMPLER_REGISTER_READ_PORTS ( 1 ) + +#define D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT ( 16 ) + +#define D3D10_COMMONSHADER_SUBROUTINE_NESTING_LIMIT ( 32 ) + +#define D3D10_COMMONSHADER_TEMP_REGISTER_COMPONENTS ( 4 ) + +#define D3D10_COMMONSHADER_TEMP_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D10_COMMONSHADER_TEMP_REGISTER_COUNT ( 4096 ) + +#define D3D10_COMMONSHADER_TEMP_REGISTER_READS_PER_INST ( 3 ) + +#define D3D10_COMMONSHADER_TEMP_REGISTER_READ_PORTS ( 3 ) + +#define D3D10_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MAX ( 10 ) + +#define D3D10_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MIN ( -10 ) + +#define D3D10_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE ( -8 ) + +#define D3D10_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE ( 7 ) + +#define D3D10_DEFAULT_BLEND_FACTOR_ALPHA ( 1.0f ) +#define D3D10_DEFAULT_BLEND_FACTOR_BLUE ( 1.0f ) +#define D3D10_DEFAULT_BLEND_FACTOR_GREEN ( 1.0f ) +#define D3D10_DEFAULT_BLEND_FACTOR_RED ( 1.0f ) +#define D3D10_DEFAULT_BORDER_COLOR_COMPONENT ( 0.0f ) +#define D3D10_DEFAULT_DEPTH_BIAS ( 0 ) + +#define D3D10_DEFAULT_DEPTH_BIAS_CLAMP ( 0.0f ) +#define D3D10_DEFAULT_MAX_ANISOTROPY ( 16.0f ) +#define D3D10_DEFAULT_MIP_LOD_BIAS ( 0.0f ) +#define D3D10_DEFAULT_RENDER_TARGET_ARRAY_INDEX ( 0 ) + +#define D3D10_DEFAULT_SAMPLE_MASK ( 0xffffffff ) + +#define D3D10_DEFAULT_SCISSOR_ENDX ( 0 ) + +#define D3D10_DEFAULT_SCISSOR_ENDY ( 0 ) + +#define D3D10_DEFAULT_SCISSOR_STARTX ( 0 ) + +#define D3D10_DEFAULT_SCISSOR_STARTY ( 0 ) + +#define D3D10_DEFAULT_SLOPE_SCALED_DEPTH_BIAS ( 0.0f ) +#define D3D10_DEFAULT_STENCIL_READ_MASK ( 0xff ) + +#define D3D10_DEFAULT_STENCIL_REFERENCE ( 0 ) + +#define D3D10_DEFAULT_STENCIL_WRITE_MASK ( 0xff ) + +#define D3D10_DEFAULT_VIEWPORT_AND_SCISSORRECT_INDEX ( 0 ) + +#define D3D10_DEFAULT_VIEWPORT_HEIGHT ( 0 ) + +#define D3D10_DEFAULT_VIEWPORT_MAX_DEPTH ( 0.0f ) +#define D3D10_DEFAULT_VIEWPORT_MIN_DEPTH ( 0.0f ) +#define D3D10_DEFAULT_VIEWPORT_TOPLEFTX ( 0 ) + +#define D3D10_DEFAULT_VIEWPORT_TOPLEFTY ( 0 ) + +#define D3D10_DEFAULT_VIEWPORT_WIDTH ( 0 ) + +#define D3D10_FLOAT16_FUSED_TOLERANCE_IN_ULP ( 0.6 ) +#define D3D10_FLOAT32_MAX ( 3.402823466e+38f ) +#define D3D10_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP ( 0.6f ) +#define D3D10_FLOAT_TO_SRGB_EXPONENT_DENOMINATOR ( 2.4f ) +#define D3D10_FLOAT_TO_SRGB_EXPONENT_NUMERATOR ( 1.0f ) +#define D3D10_FLOAT_TO_SRGB_OFFSET ( 0.055f ) +#define D3D10_FLOAT_TO_SRGB_SCALE_1 ( 12.92f ) +#define D3D10_FLOAT_TO_SRGB_SCALE_2 ( 1.055f ) +#define D3D10_FLOAT_TO_SRGB_THRESHOLD ( 0.0031308f ) +#define D3D10_FTOI_INSTRUCTION_MAX_INPUT ( 2147483647.999f ) +#define D3D10_FTOI_INSTRUCTION_MIN_INPUT ( -2147483648.999f ) +#define D3D10_FTOU_INSTRUCTION_MAX_INPUT ( 4294967295.999f ) +#define D3D10_FTOU_INSTRUCTION_MIN_INPUT ( 0.0f ) +#define D3D10_GS_INPUT_PRIM_CONST_REGISTER_COMPONENTS ( 1 ) + +#define D3D10_GS_INPUT_PRIM_CONST_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D10_GS_INPUT_PRIM_CONST_REGISTER_COUNT ( 1 ) + +#define D3D10_GS_INPUT_PRIM_CONST_REGISTER_READS_PER_INST ( 2 ) + +#define D3D10_GS_INPUT_PRIM_CONST_REGISTER_READ_PORTS ( 1 ) + +#define D3D10_GS_INPUT_REGISTER_COMPONENTS ( 4 ) + +#define D3D10_GS_INPUT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D10_GS_INPUT_REGISTER_COUNT ( 16 ) + +#define D3D10_GS_INPUT_REGISTER_READS_PER_INST ( 2 ) + +#define D3D10_GS_INPUT_REGISTER_READ_PORTS ( 1 ) + +#define D3D10_GS_INPUT_REGISTER_VERTICES ( 6 ) + +#define D3D10_GS_OUTPUT_ELEMENTS ( 32 ) + +#define D3D10_GS_OUTPUT_REGISTER_COMPONENTS ( 4 ) + +#define D3D10_GS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D10_GS_OUTPUT_REGISTER_COUNT ( 32 ) + +#define D3D10_IA_DEFAULT_INDEX_BUFFER_OFFSET_IN_BYTES ( 0 ) + +#define D3D10_IA_DEFAULT_PRIMITIVE_TOPOLOGY ( 0 ) + +#define D3D10_IA_DEFAULT_VERTEX_BUFFER_OFFSET_IN_BYTES ( 0 ) + +#define D3D10_IA_INDEX_INPUT_RESOURCE_SLOT_COUNT ( 1 ) + +#define D3D10_IA_INSTANCE_ID_BIT_COUNT ( 32 ) + +#define D3D10_IA_INTEGER_ARITHMETIC_BIT_COUNT ( 32 ) + +#define D3D10_IA_PRIMITIVE_ID_BIT_COUNT ( 32 ) + +#define D3D10_IA_VERTEX_ID_BIT_COUNT ( 32 ) + +#define D3D10_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT ( 16 ) + +#define D3D10_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS ( 64 ) + +#define D3D10_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT ( 16 ) + +#define D3D10_INTEGER_DIVIDE_BY_ZERO_QUOTIENT ( 0xffffffff ) + +#define D3D10_INTEGER_DIVIDE_BY_ZERO_REMAINDER ( 0xffffffff ) + +#define D3D10_LINEAR_GAMMA ( 1.0f ) +#define D3D10_MAX_BORDER_COLOR_COMPONENT ( 1.0f ) +#define D3D10_MAX_DEPTH ( 1.0f ) +#define D3D10_MAX_MAXANISOTROPY ( 16 ) + +#define D3D10_MAX_MULTISAMPLE_SAMPLE_COUNT ( 32 ) + +#define D3D10_MAX_POSITION_VALUE ( 3.402823466e+34f ) +#define D3D10_MAX_TEXTURE_DIMENSION_2_TO_EXP ( 17 ) + +#define D3D10_MIN_BORDER_COLOR_COMPONENT ( 0.0f ) +#define D3D10_MIN_DEPTH ( 0.0f ) +#define D3D10_MIN_MAXANISOTROPY ( 0 ) + +#define D3D10_MIP_LOD_BIAS_MAX ( 15.99f ) +#define D3D10_MIP_LOD_BIAS_MIN ( -16.0f ) +#define D3D10_MIP_LOD_FRACTIONAL_BIT_COUNT ( 6 ) + +#define D3D10_MIP_LOD_RANGE_BIT_COUNT ( 8 ) + +#define D3D10_MULTISAMPLE_ANTIALIAS_LINE_WIDTH ( 1.4f ) +#define D3D10_NONSAMPLE_FETCH_OUT_OF_RANGE_ACCESS_RESULT ( 0 ) + +#define D3D10_PIXEL_ADDRESS_RANGE_BIT_COUNT ( 13 ) + +#define D3D10_PRE_SCISSOR_PIXEL_ADDRESS_RANGE_BIT_COUNT ( 15 ) + +#define D3D10_PS_FRONTFACING_DEFAULT_VALUE ( 0xffffffff ) + +#define D3D10_PS_FRONTFACING_FALSE_VALUE ( 0 ) + +#define D3D10_PS_FRONTFACING_TRUE_VALUE ( 0xffffffff ) + +#define D3D10_PS_INPUT_REGISTER_COMPONENTS ( 4 ) + +#define D3D10_PS_INPUT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D10_PS_INPUT_REGISTER_COUNT ( 32 ) + +#define D3D10_PS_INPUT_REGISTER_READS_PER_INST ( 2 ) + +#define D3D10_PS_INPUT_REGISTER_READ_PORTS ( 1 ) + +#define D3D10_PS_LEGACY_PIXEL_CENTER_FRACTIONAL_COMPONENT ( 0.0f ) +#define D3D10_PS_OUTPUT_DEPTH_REGISTER_COMPONENTS ( 1 ) + +#define D3D10_PS_OUTPUT_DEPTH_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D10_PS_OUTPUT_DEPTH_REGISTER_COUNT ( 1 ) + +#define D3D10_PS_OUTPUT_REGISTER_COMPONENTS ( 4 ) + +#define D3D10_PS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D10_PS_OUTPUT_REGISTER_COUNT ( 8 ) + +#define D3D10_PS_PIXEL_CENTER_FRACTIONAL_COMPONENT ( 0.5f ) +#define D3D10_REQ_BLEND_OBJECT_COUNT_PER_CONTEXT ( 4096 ) + +#define D3D10_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP ( 27 ) + +#define D3D10_REQ_CONSTANT_BUFFER_ELEMENT_COUNT ( 4096 ) + +#define D3D10_REQ_DEPTH_STENCIL_OBJECT_COUNT_PER_CONTEXT ( 4096 ) + +#define D3D10_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP ( 32 ) + +#define D3D10_REQ_DRAW_VERTEX_COUNT_2_TO_EXP ( 32 ) + +#define D3D10_REQ_FILTERING_HW_ADDRESSABLE_RESOURCE_DIMENSION ( 8192 ) + +#define D3D10_REQ_GS_INVOCATION_32BIT_OUTPUT_COMPONENT_LIMIT ( 1024 ) + +#define D3D10_REQ_IMMEDIATE_CONSTANT_BUFFER_ELEMENT_COUNT ( 4096 ) + +#define D3D10_REQ_MAXANISOTROPY ( 16 ) + +#define D3D10_REQ_MIP_LEVELS ( 14 ) + +#define D3D10_REQ_MULTI_ELEMENT_STRUCTURE_SIZE_IN_BYTES ( 2048 ) + +#define D3D10_REQ_RASTERIZER_OBJECT_COUNT_PER_CONTEXT ( 4096 ) + +#define D3D10_REQ_RENDER_TO_BUFFER_WINDOW_WIDTH ( 8192 ) + +#define D3D10_REQ_RESOURCE_SIZE_IN_MEGABYTES ( 128 ) + +#define D3D10_REQ_RESOURCE_VIEW_COUNT_PER_CONTEXT_2_TO_EXP ( 20 ) + +#define D3D10_REQ_SAMPLER_OBJECT_COUNT_PER_CONTEXT ( 4096 ) + +#define D3D10_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION ( 512 ) + +#define D3D10_REQ_TEXTURE1D_U_DIMENSION ( 8192 ) + +#define D3D10_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION ( 512 ) + +#define D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION ( 8192 ) + +#define D3D10_REQ_TEXTURE3D_U_V_OR_W_DIMENSION ( 2048 ) + +#define D3D10_REQ_TEXTURECUBE_DIMENSION ( 8192 ) + +#define D3D10_RESINFO_INSTRUCTION_MISSING_COMPONENT_RETVAL ( 0 ) + +#define D3D10_SHADER_MAJOR_VERSION ( 4 ) + +#define D3D10_SHADER_MINOR_VERSION ( 0 ) + +#define D3D10_SHIFT_INSTRUCTION_PAD_VALUE ( 0 ) + +#define D3D10_SHIFT_INSTRUCTION_SHIFT_VALUE_BIT_COUNT ( 5 ) + +#define D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT ( 8 ) + +#define D3D10_SO_BUFFER_MAX_STRIDE_IN_BYTES ( 2048 ) + +#define D3D10_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES ( 256 ) + +#define D3D10_SO_BUFFER_SLOT_COUNT ( 4 ) + +#define D3D10_SO_DDI_REGISTER_INDEX_DENOTING_GAP ( 0xffffffff ) + +#define D3D10_SO_MULTIPLE_BUFFER_ELEMENTS_PER_BUFFER ( 1 ) + +#define D3D10_SO_SINGLE_BUFFER_COMPONENT_LIMIT ( 64 ) + +#define D3D10_SRGB_GAMMA ( 2.2f ) +#define D3D10_SRGB_TO_FLOAT_DENOMINATOR_1 ( 12.92f ) +#define D3D10_SRGB_TO_FLOAT_DENOMINATOR_2 ( 1.055f ) +#define D3D10_SRGB_TO_FLOAT_EXPONENT ( 2.4f ) +#define D3D10_SRGB_TO_FLOAT_OFFSET ( 0.055f ) +#define D3D10_SRGB_TO_FLOAT_THRESHOLD ( 0.04045f ) +#define D3D10_SRGB_TO_FLOAT_TOLERANCE_IN_ULP ( 0.5f ) +#define D3D10_STANDARD_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D10_STANDARD_COMPONENT_BIT_COUNT_DOUBLED ( 64 ) + +#define D3D10_STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE ( 4 ) + +#define D3D10_STANDARD_PIXEL_COMPONENT_COUNT ( 128 ) + +#define D3D10_STANDARD_PIXEL_ELEMENT_COUNT ( 32 ) + +#define D3D10_STANDARD_VECTOR_SIZE ( 4 ) + +#define D3D10_STANDARD_VERTEX_ELEMENT_COUNT ( 16 ) + +#define D3D10_STANDARD_VERTEX_TOTAL_COMPONENT_COUNT ( 64 ) + +#define D3D10_SUBPIXEL_FRACTIONAL_BIT_COUNT ( 8 ) + +#define D3D10_SUBTEXEL_FRACTIONAL_BIT_COUNT ( 6 ) + +#define D3D10_TEXEL_ADDRESS_RANGE_BIT_COUNT ( 18 ) + +#define D3D10_UNBOUND_MEMORY_ACCESS_RESULT ( 0 ) + +#define D3D10_VIEWPORT_AND_SCISSORRECT_MAX_INDEX ( 15 ) + +#define D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE ( 16 ) + +#define D3D10_VIEWPORT_BOUNDS_MAX ( 16383 ) + +#define D3D10_VIEWPORT_BOUNDS_MIN ( -16384 ) + +#define D3D10_VS_INPUT_REGISTER_COMPONENTS ( 4 ) + +#define D3D10_VS_INPUT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D10_VS_INPUT_REGISTER_COUNT ( 16 ) + +#define D3D10_VS_INPUT_REGISTER_READS_PER_INST ( 2 ) + +#define D3D10_VS_INPUT_REGISTER_READ_PORTS ( 1 ) + +#define D3D10_VS_OUTPUT_REGISTER_COMPONENTS ( 4 ) + +#define D3D10_VS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D10_VS_OUTPUT_REGISTER_COUNT ( 16 ) + +#define D3D10_WHQL_CONTEXT_COUNT_FOR_RESOURCE_LIMIT ( 10 ) + +#define D3D10_WHQL_DRAWINDEXED_INDEX_COUNT_2_TO_EXP ( 25 ) + +#define D3D10_WHQL_DRAW_VERTEX_COUNT_2_TO_EXP ( 25 ) + +#define D3D_MAJOR_VERSION ( 10 ) + +#define D3D_MINOR_VERSION ( 0 ) + +#define D3D_SPEC_DATE_DAY ( 8 ) + +#define D3D_SPEC_DATE_MONTH ( 8 ) + +#define D3D_SPEC_DATE_YEAR ( 2006 ) + +#define D3D_SPEC_VERSION ( 1.050005 ) +#endif +/*#include */ +/*#pragma region Desktop Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ +#if !defined( __d3d10_1_h__ ) && !(D3D10_HEADER_MINOR_VERSION >= 1) +#define D3D10_1_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT D3D10_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT +#define D3D10_1_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT D3D10_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT +#endif +#define _FACD3D10 ( 0x879 ) + +#define _FACD3D10DEBUG ( ( _FACD3D10 + 1 ) ) + +#define MAKE_D3D10_HRESULT( code ) MAKE_HRESULT( 1, _FACD3D10, code ) +#define MAKE_D3D10_STATUS( code ) MAKE_HRESULT( 0, _FACD3D10, code ) +/* Direct3D errors are now found in winerror.h */ +typedef +enum D3D10_INPUT_CLASSIFICATION + { + D3D10_INPUT_PER_VERTEX_DATA = 0, + D3D10_INPUT_PER_INSTANCE_DATA = 1 + } D3D10_INPUT_CLASSIFICATION; + +#define D3D10_APPEND_ALIGNED_ELEMENT ( 0xffffffff ) + +typedef struct D3D10_INPUT_ELEMENT_DESC + { + LPCSTR SemanticName; + UINT SemanticIndex; + DXGI_FORMAT Format; + UINT InputSlot; + UINT AlignedByteOffset; + D3D10_INPUT_CLASSIFICATION InputSlotClass; + UINT InstanceDataStepRate; + } D3D10_INPUT_ELEMENT_DESC; + +typedef +enum D3D10_FILL_MODE + { + D3D10_FILL_WIREFRAME = 2, + D3D10_FILL_SOLID = 3 + } D3D10_FILL_MODE; + +typedef D3D_PRIMITIVE_TOPOLOGY D3D10_PRIMITIVE_TOPOLOGY; + +typedef D3D_PRIMITIVE D3D10_PRIMITIVE; + +typedef +enum D3D10_CULL_MODE + { + D3D10_CULL_NONE = 1, + D3D10_CULL_FRONT = 2, + D3D10_CULL_BACK = 3 + } D3D10_CULL_MODE; + +typedef struct D3D10_SO_DECLARATION_ENTRY + { + LPCSTR SemanticName; + UINT SemanticIndex; + BYTE StartComponent; + BYTE ComponentCount; + BYTE OutputSlot; + } D3D10_SO_DECLARATION_ENTRY; + +typedef struct D3D10_VIEWPORT + { + INT TopLeftX; + INT TopLeftY; + UINT Width; + UINT Height; + FLOAT MinDepth; + FLOAT MaxDepth; + } D3D10_VIEWPORT; + +typedef +enum D3D10_RESOURCE_DIMENSION + { + D3D10_RESOURCE_DIMENSION_UNKNOWN = 0, + D3D10_RESOURCE_DIMENSION_BUFFER = 1, + D3D10_RESOURCE_DIMENSION_TEXTURE1D = 2, + D3D10_RESOURCE_DIMENSION_TEXTURE2D = 3, + D3D10_RESOURCE_DIMENSION_TEXTURE3D = 4 + } D3D10_RESOURCE_DIMENSION; + +typedef D3D_SRV_DIMENSION D3D10_SRV_DIMENSION; + +typedef +enum D3D10_DSV_DIMENSION + { + D3D10_DSV_DIMENSION_UNKNOWN = 0, + D3D10_DSV_DIMENSION_TEXTURE1D = 1, + D3D10_DSV_DIMENSION_TEXTURE1DARRAY = 2, + D3D10_DSV_DIMENSION_TEXTURE2D = 3, + D3D10_DSV_DIMENSION_TEXTURE2DARRAY = 4, + D3D10_DSV_DIMENSION_TEXTURE2DMS = 5, + D3D10_DSV_DIMENSION_TEXTURE2DMSARRAY = 6 + } D3D10_DSV_DIMENSION; + +typedef +enum D3D10_RTV_DIMENSION + { + D3D10_RTV_DIMENSION_UNKNOWN = 0, + D3D10_RTV_DIMENSION_BUFFER = 1, + D3D10_RTV_DIMENSION_TEXTURE1D = 2, + D3D10_RTV_DIMENSION_TEXTURE1DARRAY = 3, + D3D10_RTV_DIMENSION_TEXTURE2D = 4, + D3D10_RTV_DIMENSION_TEXTURE2DARRAY = 5, + D3D10_RTV_DIMENSION_TEXTURE2DMS = 6, + D3D10_RTV_DIMENSION_TEXTURE2DMSARRAY = 7, + D3D10_RTV_DIMENSION_TEXTURE3D = 8 + } D3D10_RTV_DIMENSION; + +typedef +enum D3D10_USAGE + { + D3D10_USAGE_DEFAULT = 0, + D3D10_USAGE_IMMUTABLE = 1, + D3D10_USAGE_DYNAMIC = 2, + D3D10_USAGE_STAGING = 3 + } D3D10_USAGE; + +typedef +enum D3D10_BIND_FLAG + { + D3D10_BIND_VERTEX_BUFFER = 0x1L, + D3D10_BIND_INDEX_BUFFER = 0x2L, + D3D10_BIND_CONSTANT_BUFFER = 0x4L, + D3D10_BIND_SHADER_RESOURCE = 0x8L, + D3D10_BIND_STREAM_OUTPUT = 0x10L, + D3D10_BIND_RENDER_TARGET = 0x20L, + D3D10_BIND_DEPTH_STENCIL = 0x40L + } D3D10_BIND_FLAG; + +typedef +enum D3D10_CPU_ACCESS_FLAG + { + D3D10_CPU_ACCESS_WRITE = 0x10000L, + D3D10_CPU_ACCESS_READ = 0x20000L + } D3D10_CPU_ACCESS_FLAG; + +typedef +enum D3D10_RESOURCE_MISC_FLAG + { + D3D10_RESOURCE_MISC_GENERATE_MIPS = 0x1L, + D3D10_RESOURCE_MISC_SHARED = 0x2L, + D3D10_RESOURCE_MISC_TEXTURECUBE = 0x4L, + D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX = 0x10L, + D3D10_RESOURCE_MISC_GDI_COMPATIBLE = 0x20L + } D3D10_RESOURCE_MISC_FLAG; + +typedef +enum D3D10_MAP + { + D3D10_MAP_READ = 1, + D3D10_MAP_WRITE = 2, + D3D10_MAP_READ_WRITE = 3, + D3D10_MAP_WRITE_DISCARD = 4, + D3D10_MAP_WRITE_NO_OVERWRITE = 5 + } D3D10_MAP; + +typedef +enum D3D10_MAP_FLAG + { + D3D10_MAP_FLAG_DO_NOT_WAIT = 0x100000L + } D3D10_MAP_FLAG; + +typedef +enum D3D10_RAISE_FLAG + { + D3D10_RAISE_FLAG_DRIVER_INTERNAL_ERROR = 0x1L + } D3D10_RAISE_FLAG; + +typedef +enum D3D10_CLEAR_FLAG + { + D3D10_CLEAR_DEPTH = 0x1L, + D3D10_CLEAR_STENCIL = 0x2L + } D3D10_CLEAR_FLAG; + +typedef RECT D3D10_RECT; + +typedef struct D3D10_BOX + { + UINT left; + UINT top; + UINT front; + UINT right; + UINT bottom; + UINT back; + } D3D10_BOX; + + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0000_v0_0_s_ifspec; + +#ifndef __ID3D10DeviceChild_INTERFACE_DEFINED__ +#define __ID3D10DeviceChild_INTERFACE_DEFINED__ + +/* interface ID3D10DeviceChild */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10DeviceChild; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4C00-342C-4106-A19F-4F2704F689F0") + ID3D10DeviceChild : public IUnknown + { + public: + virtual void STDMETHODCALLTYPE GetDevice( + /* [annotation] */ + _Out_ ID3D10Device **ppDevice) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPrivateData( + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPrivateData( + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPrivateDataInterface( + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10DeviceChildVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10DeviceChild * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10DeviceChild * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10DeviceChild * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10DeviceChild * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10DeviceChild * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10DeviceChild * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10DeviceChild * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + END_INTERFACE + } ID3D10DeviceChildVtbl; + + interface ID3D10DeviceChild + { + CONST_VTBL struct ID3D10DeviceChildVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10DeviceChild_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10DeviceChild_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10DeviceChild_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10DeviceChild_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10DeviceChild_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10DeviceChild_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10DeviceChild_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10DeviceChild_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10_0000_0001 */ +/* [local] */ + +typedef +enum D3D10_COMPARISON_FUNC + { + D3D10_COMPARISON_NEVER = 1, + D3D10_COMPARISON_LESS = 2, + D3D10_COMPARISON_EQUAL = 3, + D3D10_COMPARISON_LESS_EQUAL = 4, + D3D10_COMPARISON_GREATER = 5, + D3D10_COMPARISON_NOT_EQUAL = 6, + D3D10_COMPARISON_GREATER_EQUAL = 7, + D3D10_COMPARISON_ALWAYS = 8 + } D3D10_COMPARISON_FUNC; + +typedef +enum D3D10_DEPTH_WRITE_MASK + { + D3D10_DEPTH_WRITE_MASK_ZERO = 0, + D3D10_DEPTH_WRITE_MASK_ALL = 1 + } D3D10_DEPTH_WRITE_MASK; + +typedef +enum D3D10_STENCIL_OP + { + D3D10_STENCIL_OP_KEEP = 1, + D3D10_STENCIL_OP_ZERO = 2, + D3D10_STENCIL_OP_REPLACE = 3, + D3D10_STENCIL_OP_INCR_SAT = 4, + D3D10_STENCIL_OP_DECR_SAT = 5, + D3D10_STENCIL_OP_INVERT = 6, + D3D10_STENCIL_OP_INCR = 7, + D3D10_STENCIL_OP_DECR = 8 + } D3D10_STENCIL_OP; + +typedef struct D3D10_DEPTH_STENCILOP_DESC + { + D3D10_STENCIL_OP StencilFailOp; + D3D10_STENCIL_OP StencilDepthFailOp; + D3D10_STENCIL_OP StencilPassOp; + D3D10_COMPARISON_FUNC StencilFunc; + } D3D10_DEPTH_STENCILOP_DESC; + +typedef struct D3D10_DEPTH_STENCIL_DESC + { + BOOL DepthEnable; + D3D10_DEPTH_WRITE_MASK DepthWriteMask; + D3D10_COMPARISON_FUNC DepthFunc; + BOOL StencilEnable; + UINT8 StencilReadMask; + UINT8 StencilWriteMask; + D3D10_DEPTH_STENCILOP_DESC FrontFace; + D3D10_DEPTH_STENCILOP_DESC BackFace; + } D3D10_DEPTH_STENCIL_DESC; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0001_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0001_v0_0_s_ifspec; + +#ifndef __ID3D10DepthStencilState_INTERFACE_DEFINED__ +#define __ID3D10DepthStencilState_INTERFACE_DEFINED__ + +/* interface ID3D10DepthStencilState */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10DepthStencilState; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("2B4B1CC8-A4AD-41f8-8322-CA86FC3EC675") + ID3D10DepthStencilState : public ID3D10DeviceChild + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D10_DEPTH_STENCIL_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10DepthStencilStateVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10DepthStencilState * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10DepthStencilState * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10DepthStencilState * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10DepthStencilState * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10DepthStencilState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10DepthStencilState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10DepthStencilState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D10DepthStencilState * This, + /* [annotation] */ + _Out_ D3D10_DEPTH_STENCIL_DESC *pDesc); + + END_INTERFACE + } ID3D10DepthStencilStateVtbl; + + interface ID3D10DepthStencilState + { + CONST_VTBL struct ID3D10DepthStencilStateVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10DepthStencilState_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10DepthStencilState_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10DepthStencilState_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10DepthStencilState_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10DepthStencilState_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10DepthStencilState_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10DepthStencilState_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D10DepthStencilState_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10DepthStencilState_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10_0000_0002 */ +/* [local] */ + +typedef +enum D3D10_BLEND + { + D3D10_BLEND_ZERO = 1, + D3D10_BLEND_ONE = 2, + D3D10_BLEND_SRC_COLOR = 3, + D3D10_BLEND_INV_SRC_COLOR = 4, + D3D10_BLEND_SRC_ALPHA = 5, + D3D10_BLEND_INV_SRC_ALPHA = 6, + D3D10_BLEND_DEST_ALPHA = 7, + D3D10_BLEND_INV_DEST_ALPHA = 8, + D3D10_BLEND_DEST_COLOR = 9, + D3D10_BLEND_INV_DEST_COLOR = 10, + D3D10_BLEND_SRC_ALPHA_SAT = 11, + D3D10_BLEND_BLEND_FACTOR = 14, + D3D10_BLEND_INV_BLEND_FACTOR = 15, + D3D10_BLEND_SRC1_COLOR = 16, + D3D10_BLEND_INV_SRC1_COLOR = 17, + D3D10_BLEND_SRC1_ALPHA = 18, + D3D10_BLEND_INV_SRC1_ALPHA = 19 + } D3D10_BLEND; + +typedef +enum D3D10_BLEND_OP + { + D3D10_BLEND_OP_ADD = 1, + D3D10_BLEND_OP_SUBTRACT = 2, + D3D10_BLEND_OP_REV_SUBTRACT = 3, + D3D10_BLEND_OP_MIN = 4, + D3D10_BLEND_OP_MAX = 5 + } D3D10_BLEND_OP; + +typedef +enum D3D10_COLOR_WRITE_ENABLE + { + D3D10_COLOR_WRITE_ENABLE_RED = 1, + D3D10_COLOR_WRITE_ENABLE_GREEN = 2, + D3D10_COLOR_WRITE_ENABLE_BLUE = 4, + D3D10_COLOR_WRITE_ENABLE_ALPHA = 8, + D3D10_COLOR_WRITE_ENABLE_ALL = ( ( ( D3D10_COLOR_WRITE_ENABLE_RED | D3D10_COLOR_WRITE_ENABLE_GREEN ) | D3D10_COLOR_WRITE_ENABLE_BLUE ) | D3D10_COLOR_WRITE_ENABLE_ALPHA ) + } D3D10_COLOR_WRITE_ENABLE; + +typedef struct D3D10_BLEND_DESC + { + BOOL AlphaToCoverageEnable; + BOOL BlendEnable[ 8 ]; + D3D10_BLEND SrcBlend; + D3D10_BLEND DestBlend; + D3D10_BLEND_OP BlendOp; + D3D10_BLEND SrcBlendAlpha; + D3D10_BLEND DestBlendAlpha; + D3D10_BLEND_OP BlendOpAlpha; + UINT8 RenderTargetWriteMask[ 8 ]; + } D3D10_BLEND_DESC; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0002_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0002_v0_0_s_ifspec; + +#ifndef __ID3D10BlendState_INTERFACE_DEFINED__ +#define __ID3D10BlendState_INTERFACE_DEFINED__ + +/* interface ID3D10BlendState */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10BlendState; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("EDAD8D19-8A35-4d6d-8566-2EA276CDE161") + ID3D10BlendState : public ID3D10DeviceChild + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D10_BLEND_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10BlendStateVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10BlendState * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10BlendState * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10BlendState * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10BlendState * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10BlendState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10BlendState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10BlendState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D10BlendState * This, + /* [annotation] */ + _Out_ D3D10_BLEND_DESC *pDesc); + + END_INTERFACE + } ID3D10BlendStateVtbl; + + interface ID3D10BlendState + { + CONST_VTBL struct ID3D10BlendStateVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10BlendState_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10BlendState_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10BlendState_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10BlendState_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10BlendState_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10BlendState_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10BlendState_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D10BlendState_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10BlendState_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10_0000_0003 */ +/* [local] */ + +typedef struct D3D10_RASTERIZER_DESC + { + D3D10_FILL_MODE FillMode; + D3D10_CULL_MODE CullMode; + BOOL FrontCounterClockwise; + INT DepthBias; + FLOAT DepthBiasClamp; + FLOAT SlopeScaledDepthBias; + BOOL DepthClipEnable; + BOOL ScissorEnable; + BOOL MultisampleEnable; + BOOL AntialiasedLineEnable; + } D3D10_RASTERIZER_DESC; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0003_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0003_v0_0_s_ifspec; + +#ifndef __ID3D10RasterizerState_INTERFACE_DEFINED__ +#define __ID3D10RasterizerState_INTERFACE_DEFINED__ + +/* interface ID3D10RasterizerState */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10RasterizerState; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("A2A07292-89AF-4345-BE2E-C53D9FBB6E9F") + ID3D10RasterizerState : public ID3D10DeviceChild + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D10_RASTERIZER_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10RasterizerStateVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10RasterizerState * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10RasterizerState * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10RasterizerState * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10RasterizerState * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10RasterizerState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10RasterizerState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10RasterizerState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D10RasterizerState * This, + /* [annotation] */ + _Out_ D3D10_RASTERIZER_DESC *pDesc); + + END_INTERFACE + } ID3D10RasterizerStateVtbl; + + interface ID3D10RasterizerState + { + CONST_VTBL struct ID3D10RasterizerStateVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10RasterizerState_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10RasterizerState_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10RasterizerState_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10RasterizerState_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10RasterizerState_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10RasterizerState_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10RasterizerState_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D10RasterizerState_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10RasterizerState_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10_0000_0004 */ +/* [local] */ + +#if !defined( D3D10_NO_HELPERS ) && defined( __cplusplus ) +inline UINT D3D10CalcSubresource( UINT MipSlice, UINT ArraySlice, UINT MipLevels ) +{ return MipSlice + ArraySlice * MipLevels; } +#endif +typedef struct D3D10_SUBRESOURCE_DATA + { + const void *pSysMem; + UINT SysMemPitch; + UINT SysMemSlicePitch; + } D3D10_SUBRESOURCE_DATA; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0004_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0004_v0_0_s_ifspec; + +#ifndef __ID3D10Resource_INTERFACE_DEFINED__ +#define __ID3D10Resource_INTERFACE_DEFINED__ + +/* interface ID3D10Resource */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10Resource; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4C01-342C-4106-A19F-4F2704F689F0") + ID3D10Resource : public ID3D10DeviceChild + { + public: + virtual void STDMETHODCALLTYPE GetType( + /* [annotation] */ + _Out_ D3D10_RESOURCE_DIMENSION *rType) = 0; + + virtual void STDMETHODCALLTYPE SetEvictionPriority( + /* [annotation] */ + _In_ UINT EvictionPriority) = 0; + + virtual UINT STDMETHODCALLTYPE GetEvictionPriority( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10ResourceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10Resource * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10Resource * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10Resource * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10Resource * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10Resource * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10Resource * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10Resource * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetType )( + ID3D10Resource * This, + /* [annotation] */ + _Out_ D3D10_RESOURCE_DIMENSION *rType); + + void ( STDMETHODCALLTYPE *SetEvictionPriority )( + ID3D10Resource * This, + /* [annotation] */ + _In_ UINT EvictionPriority); + + UINT ( STDMETHODCALLTYPE *GetEvictionPriority )( + ID3D10Resource * This); + + END_INTERFACE + } ID3D10ResourceVtbl; + + interface ID3D10Resource + { + CONST_VTBL struct ID3D10ResourceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10Resource_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10Resource_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10Resource_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10Resource_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10Resource_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10Resource_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10Resource_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D10Resource_GetType(This,rType) \ + ( (This)->lpVtbl -> GetType(This,rType) ) + +#define ID3D10Resource_SetEvictionPriority(This,EvictionPriority) \ + ( (This)->lpVtbl -> SetEvictionPriority(This,EvictionPriority) ) + +#define ID3D10Resource_GetEvictionPriority(This) \ + ( (This)->lpVtbl -> GetEvictionPriority(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10Resource_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10_0000_0005 */ +/* [local] */ + +typedef struct D3D10_BUFFER_DESC + { + UINT ByteWidth; + D3D10_USAGE Usage; + UINT BindFlags; + UINT CPUAccessFlags; + UINT MiscFlags; + } D3D10_BUFFER_DESC; + +#if !defined( D3D10_NO_HELPERS ) && defined( __cplusplus ) +struct CD3D10_BUFFER_DESC : public D3D10_BUFFER_DESC +{ + CD3D10_BUFFER_DESC() + {} + explicit CD3D10_BUFFER_DESC( const D3D10_BUFFER_DESC& o ) : + D3D10_BUFFER_DESC( o ) + {} + explicit CD3D10_BUFFER_DESC( + UINT byteWidth, + UINT bindFlags, + D3D10_USAGE usage = D3D10_USAGE_DEFAULT, + UINT cpuaccessFlags = 0, + UINT miscFlags = 0 ) + { + ByteWidth = byteWidth; + Usage = usage; + BindFlags = bindFlags; + CPUAccessFlags = cpuaccessFlags ; + MiscFlags = miscFlags; + } + ~CD3D10_BUFFER_DESC() {} + operator const D3D10_BUFFER_DESC&() const { return *this; } +}; +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0005_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0005_v0_0_s_ifspec; + +#ifndef __ID3D10Buffer_INTERFACE_DEFINED__ +#define __ID3D10Buffer_INTERFACE_DEFINED__ + +/* interface ID3D10Buffer */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10Buffer; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4C02-342C-4106-A19F-4F2704F689F0") + ID3D10Buffer : public ID3D10Resource + { + public: + virtual HRESULT STDMETHODCALLTYPE Map( + /* [annotation] */ + _In_ D3D10_MAP MapType, + /* [annotation] */ + _In_ UINT MapFlags, + /* [annotation] */ + _Out_ void **ppData) = 0; + + virtual void STDMETHODCALLTYPE Unmap( void) = 0; + + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D10_BUFFER_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10BufferVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10Buffer * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10Buffer * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10Buffer * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10Buffer * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10Buffer * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10Buffer * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10Buffer * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetType )( + ID3D10Buffer * This, + /* [annotation] */ + _Out_ D3D10_RESOURCE_DIMENSION *rType); + + void ( STDMETHODCALLTYPE *SetEvictionPriority )( + ID3D10Buffer * This, + /* [annotation] */ + _In_ UINT EvictionPriority); + + UINT ( STDMETHODCALLTYPE *GetEvictionPriority )( + ID3D10Buffer * This); + + HRESULT ( STDMETHODCALLTYPE *Map )( + ID3D10Buffer * This, + /* [annotation] */ + _In_ D3D10_MAP MapType, + /* [annotation] */ + _In_ UINT MapFlags, + /* [annotation] */ + _Out_ void **ppData); + + void ( STDMETHODCALLTYPE *Unmap )( + ID3D10Buffer * This); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D10Buffer * This, + /* [annotation] */ + _Out_ D3D10_BUFFER_DESC *pDesc); + + END_INTERFACE + } ID3D10BufferVtbl; + + interface ID3D10Buffer + { + CONST_VTBL struct ID3D10BufferVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10Buffer_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10Buffer_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10Buffer_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10Buffer_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10Buffer_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10Buffer_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10Buffer_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D10Buffer_GetType(This,rType) \ + ( (This)->lpVtbl -> GetType(This,rType) ) + +#define ID3D10Buffer_SetEvictionPriority(This,EvictionPriority) \ + ( (This)->lpVtbl -> SetEvictionPriority(This,EvictionPriority) ) + +#define ID3D10Buffer_GetEvictionPriority(This) \ + ( (This)->lpVtbl -> GetEvictionPriority(This) ) + + +#define ID3D10Buffer_Map(This,MapType,MapFlags,ppData) \ + ( (This)->lpVtbl -> Map(This,MapType,MapFlags,ppData) ) + +#define ID3D10Buffer_Unmap(This) \ + ( (This)->lpVtbl -> Unmap(This) ) + +#define ID3D10Buffer_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10Buffer_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10_0000_0006 */ +/* [local] */ + +typedef struct D3D10_TEXTURE1D_DESC + { + UINT Width; + UINT MipLevels; + UINT ArraySize; + DXGI_FORMAT Format; + D3D10_USAGE Usage; + UINT BindFlags; + UINT CPUAccessFlags; + UINT MiscFlags; + } D3D10_TEXTURE1D_DESC; + +#if !defined( D3D10_NO_HELPERS ) && defined( __cplusplus ) +struct CD3D10_TEXTURE1D_DESC : public D3D10_TEXTURE1D_DESC +{ + CD3D10_TEXTURE1D_DESC() + {} + explicit CD3D10_TEXTURE1D_DESC( const D3D10_TEXTURE1D_DESC& o ) : + D3D10_TEXTURE1D_DESC( o ) + {} + explicit CD3D10_TEXTURE1D_DESC( + DXGI_FORMAT format, + UINT width, + UINT arraySize = 1, + UINT mipLevels = 0, + UINT bindFlags = D3D10_BIND_SHADER_RESOURCE, + D3D10_USAGE usage = D3D10_USAGE_DEFAULT, + UINT cpuaccessFlags= 0, + UINT miscFlags = 0 ) + { + Width = width; + MipLevels = mipLevels; + ArraySize = arraySize; + Format = format; + Usage = usage; + BindFlags = bindFlags; + CPUAccessFlags = cpuaccessFlags; + MiscFlags = miscFlags; + } + ~CD3D10_TEXTURE1D_DESC() {} + operator const D3D10_TEXTURE1D_DESC&() const { return *this; } +}; +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0006_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0006_v0_0_s_ifspec; + +#ifndef __ID3D10Texture1D_INTERFACE_DEFINED__ +#define __ID3D10Texture1D_INTERFACE_DEFINED__ + +/* interface ID3D10Texture1D */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10Texture1D; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4C03-342C-4106-A19F-4F2704F689F0") + ID3D10Texture1D : public ID3D10Resource + { + public: + virtual HRESULT STDMETHODCALLTYPE Map( + /* [annotation] */ + _In_ UINT Subresource, + /* [annotation] */ + _In_ D3D10_MAP MapType, + /* [annotation] */ + _In_ UINT MapFlags, + /* [annotation] */ + _Out_ void **ppData) = 0; + + virtual void STDMETHODCALLTYPE Unmap( + /* [annotation] */ + _In_ UINT Subresource) = 0; + + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D10_TEXTURE1D_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10Texture1DVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10Texture1D * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10Texture1D * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10Texture1D * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10Texture1D * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10Texture1D * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10Texture1D * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10Texture1D * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetType )( + ID3D10Texture1D * This, + /* [annotation] */ + _Out_ D3D10_RESOURCE_DIMENSION *rType); + + void ( STDMETHODCALLTYPE *SetEvictionPriority )( + ID3D10Texture1D * This, + /* [annotation] */ + _In_ UINT EvictionPriority); + + UINT ( STDMETHODCALLTYPE *GetEvictionPriority )( + ID3D10Texture1D * This); + + HRESULT ( STDMETHODCALLTYPE *Map )( + ID3D10Texture1D * This, + /* [annotation] */ + _In_ UINT Subresource, + /* [annotation] */ + _In_ D3D10_MAP MapType, + /* [annotation] */ + _In_ UINT MapFlags, + /* [annotation] */ + _Out_ void **ppData); + + void ( STDMETHODCALLTYPE *Unmap )( + ID3D10Texture1D * This, + /* [annotation] */ + _In_ UINT Subresource); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D10Texture1D * This, + /* [annotation] */ + _Out_ D3D10_TEXTURE1D_DESC *pDesc); + + END_INTERFACE + } ID3D10Texture1DVtbl; + + interface ID3D10Texture1D + { + CONST_VTBL struct ID3D10Texture1DVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10Texture1D_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10Texture1D_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10Texture1D_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10Texture1D_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10Texture1D_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10Texture1D_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10Texture1D_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D10Texture1D_GetType(This,rType) \ + ( (This)->lpVtbl -> GetType(This,rType) ) + +#define ID3D10Texture1D_SetEvictionPriority(This,EvictionPriority) \ + ( (This)->lpVtbl -> SetEvictionPriority(This,EvictionPriority) ) + +#define ID3D10Texture1D_GetEvictionPriority(This) \ + ( (This)->lpVtbl -> GetEvictionPriority(This) ) + + +#define ID3D10Texture1D_Map(This,Subresource,MapType,MapFlags,ppData) \ + ( (This)->lpVtbl -> Map(This,Subresource,MapType,MapFlags,ppData) ) + +#define ID3D10Texture1D_Unmap(This,Subresource) \ + ( (This)->lpVtbl -> Unmap(This,Subresource) ) + +#define ID3D10Texture1D_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10Texture1D_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10_0000_0007 */ +/* [local] */ + +typedef struct D3D10_TEXTURE2D_DESC + { + UINT Width; + UINT Height; + UINT MipLevels; + UINT ArraySize; + DXGI_FORMAT Format; + DXGI_SAMPLE_DESC SampleDesc; + D3D10_USAGE Usage; + UINT BindFlags; + UINT CPUAccessFlags; + UINT MiscFlags; + } D3D10_TEXTURE2D_DESC; + +#if !defined( D3D10_NO_HELPERS ) && defined( __cplusplus ) +struct CD3D10_TEXTURE2D_DESC : public D3D10_TEXTURE2D_DESC +{ + CD3D10_TEXTURE2D_DESC() + {} + explicit CD3D10_TEXTURE2D_DESC( const D3D10_TEXTURE2D_DESC& o ) : + D3D10_TEXTURE2D_DESC( o ) + {} + explicit CD3D10_TEXTURE2D_DESC( + DXGI_FORMAT format, + UINT width, + UINT height, + UINT arraySize = 1, + UINT mipLevels = 0, + UINT bindFlags = D3D10_BIND_SHADER_RESOURCE, + D3D10_USAGE usage = D3D10_USAGE_DEFAULT, + UINT cpuaccessFlags = 0, + UINT sampleCount = 1, + UINT sampleQuality = 0, + UINT miscFlags = 0 ) + { + Width = width; + Height = height; + MipLevels = mipLevels; + ArraySize = arraySize; + Format = format; + SampleDesc.Count = sampleCount; + SampleDesc.Quality = sampleQuality; + Usage = usage; + BindFlags = bindFlags; + CPUAccessFlags = cpuaccessFlags; + MiscFlags = miscFlags; + } + ~CD3D10_TEXTURE2D_DESC() {} + operator const D3D10_TEXTURE2D_DESC&() const { return *this; } +}; +#endif +typedef struct D3D10_MAPPED_TEXTURE2D + { + void *pData; + UINT RowPitch; + } D3D10_MAPPED_TEXTURE2D; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0007_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0007_v0_0_s_ifspec; + +#ifndef __ID3D10Texture2D_INTERFACE_DEFINED__ +#define __ID3D10Texture2D_INTERFACE_DEFINED__ + +/* interface ID3D10Texture2D */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10Texture2D; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4C04-342C-4106-A19F-4F2704F689F0") + ID3D10Texture2D : public ID3D10Resource + { + public: + virtual HRESULT STDMETHODCALLTYPE Map( + /* [annotation] */ + _In_ UINT Subresource, + /* [annotation] */ + _In_ D3D10_MAP MapType, + /* [annotation] */ + _In_ UINT MapFlags, + /* [annotation] */ + _Out_ D3D10_MAPPED_TEXTURE2D *pMappedTex2D) = 0; + + virtual void STDMETHODCALLTYPE Unmap( + /* [annotation] */ + _In_ UINT Subresource) = 0; + + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D10_TEXTURE2D_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10Texture2DVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10Texture2D * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10Texture2D * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10Texture2D * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10Texture2D * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10Texture2D * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10Texture2D * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10Texture2D * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetType )( + ID3D10Texture2D * This, + /* [annotation] */ + _Out_ D3D10_RESOURCE_DIMENSION *rType); + + void ( STDMETHODCALLTYPE *SetEvictionPriority )( + ID3D10Texture2D * This, + /* [annotation] */ + _In_ UINT EvictionPriority); + + UINT ( STDMETHODCALLTYPE *GetEvictionPriority )( + ID3D10Texture2D * This); + + HRESULT ( STDMETHODCALLTYPE *Map )( + ID3D10Texture2D * This, + /* [annotation] */ + _In_ UINT Subresource, + /* [annotation] */ + _In_ D3D10_MAP MapType, + /* [annotation] */ + _In_ UINT MapFlags, + /* [annotation] */ + _Out_ D3D10_MAPPED_TEXTURE2D *pMappedTex2D); + + void ( STDMETHODCALLTYPE *Unmap )( + ID3D10Texture2D * This, + /* [annotation] */ + _In_ UINT Subresource); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D10Texture2D * This, + /* [annotation] */ + _Out_ D3D10_TEXTURE2D_DESC *pDesc); + + END_INTERFACE + } ID3D10Texture2DVtbl; + + interface ID3D10Texture2D + { + CONST_VTBL struct ID3D10Texture2DVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10Texture2D_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10Texture2D_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10Texture2D_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10Texture2D_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10Texture2D_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10Texture2D_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10Texture2D_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D10Texture2D_GetType(This,rType) \ + ( (This)->lpVtbl -> GetType(This,rType) ) + +#define ID3D10Texture2D_SetEvictionPriority(This,EvictionPriority) \ + ( (This)->lpVtbl -> SetEvictionPriority(This,EvictionPriority) ) + +#define ID3D10Texture2D_GetEvictionPriority(This) \ + ( (This)->lpVtbl -> GetEvictionPriority(This) ) + + +#define ID3D10Texture2D_Map(This,Subresource,MapType,MapFlags,pMappedTex2D) \ + ( (This)->lpVtbl -> Map(This,Subresource,MapType,MapFlags,pMappedTex2D) ) + +#define ID3D10Texture2D_Unmap(This,Subresource) \ + ( (This)->lpVtbl -> Unmap(This,Subresource) ) + +#define ID3D10Texture2D_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10Texture2D_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10_0000_0008 */ +/* [local] */ + +typedef struct D3D10_TEXTURE3D_DESC + { + UINT Width; + UINT Height; + UINT Depth; + UINT MipLevels; + DXGI_FORMAT Format; + D3D10_USAGE Usage; + UINT BindFlags; + UINT CPUAccessFlags; + UINT MiscFlags; + } D3D10_TEXTURE3D_DESC; + +#if !defined( D3D10_NO_HELPERS ) && defined( __cplusplus ) +struct CD3D10_TEXTURE3D_DESC : public D3D10_TEXTURE3D_DESC +{ + CD3D10_TEXTURE3D_DESC() + {} + explicit CD3D10_TEXTURE3D_DESC( const D3D10_TEXTURE3D_DESC& o ) : + D3D10_TEXTURE3D_DESC( o ) + {} + explicit CD3D10_TEXTURE3D_DESC( + DXGI_FORMAT format, + UINT width, + UINT height, + UINT depth, + UINT mipLevels = 0, + UINT bindFlags = D3D10_BIND_SHADER_RESOURCE, + D3D10_USAGE usage = D3D10_USAGE_DEFAULT, + UINT cpuaccessFlags = 0, + UINT miscFlags = 0 ) + { + Width = width; + Height = height; + Depth = depth; + MipLevels = mipLevels; + Format = format; + Usage = usage; + BindFlags = bindFlags; + CPUAccessFlags = cpuaccessFlags; + MiscFlags = miscFlags; + } + ~CD3D10_TEXTURE3D_DESC() {} + operator const D3D10_TEXTURE3D_DESC&() const { return *this; } +}; +#endif +typedef struct D3D10_MAPPED_TEXTURE3D + { + void *pData; + UINT RowPitch; + UINT DepthPitch; + } D3D10_MAPPED_TEXTURE3D; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0008_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0008_v0_0_s_ifspec; + +#ifndef __ID3D10Texture3D_INTERFACE_DEFINED__ +#define __ID3D10Texture3D_INTERFACE_DEFINED__ + +/* interface ID3D10Texture3D */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10Texture3D; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4C05-342C-4106-A19F-4F2704F689F0") + ID3D10Texture3D : public ID3D10Resource + { + public: + virtual HRESULT STDMETHODCALLTYPE Map( + /* [annotation] */ + _In_ UINT Subresource, + /* [annotation] */ + _In_ D3D10_MAP MapType, + /* [annotation] */ + _In_ UINT MapFlags, + /* [annotation] */ + _Out_ D3D10_MAPPED_TEXTURE3D *pMappedTex3D) = 0; + + virtual void STDMETHODCALLTYPE Unmap( + /* [annotation] */ + _In_ UINT Subresource) = 0; + + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D10_TEXTURE3D_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10Texture3DVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10Texture3D * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10Texture3D * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10Texture3D * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10Texture3D * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10Texture3D * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10Texture3D * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10Texture3D * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetType )( + ID3D10Texture3D * This, + /* [annotation] */ + _Out_ D3D10_RESOURCE_DIMENSION *rType); + + void ( STDMETHODCALLTYPE *SetEvictionPriority )( + ID3D10Texture3D * This, + /* [annotation] */ + _In_ UINT EvictionPriority); + + UINT ( STDMETHODCALLTYPE *GetEvictionPriority )( + ID3D10Texture3D * This); + + HRESULT ( STDMETHODCALLTYPE *Map )( + ID3D10Texture3D * This, + /* [annotation] */ + _In_ UINT Subresource, + /* [annotation] */ + _In_ D3D10_MAP MapType, + /* [annotation] */ + _In_ UINT MapFlags, + /* [annotation] */ + _Out_ D3D10_MAPPED_TEXTURE3D *pMappedTex3D); + + void ( STDMETHODCALLTYPE *Unmap )( + ID3D10Texture3D * This, + /* [annotation] */ + _In_ UINT Subresource); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D10Texture3D * This, + /* [annotation] */ + _Out_ D3D10_TEXTURE3D_DESC *pDesc); + + END_INTERFACE + } ID3D10Texture3DVtbl; + + interface ID3D10Texture3D + { + CONST_VTBL struct ID3D10Texture3DVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10Texture3D_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10Texture3D_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10Texture3D_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10Texture3D_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10Texture3D_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10Texture3D_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10Texture3D_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D10Texture3D_GetType(This,rType) \ + ( (This)->lpVtbl -> GetType(This,rType) ) + +#define ID3D10Texture3D_SetEvictionPriority(This,EvictionPriority) \ + ( (This)->lpVtbl -> SetEvictionPriority(This,EvictionPriority) ) + +#define ID3D10Texture3D_GetEvictionPriority(This) \ + ( (This)->lpVtbl -> GetEvictionPriority(This) ) + + +#define ID3D10Texture3D_Map(This,Subresource,MapType,MapFlags,pMappedTex3D) \ + ( (This)->lpVtbl -> Map(This,Subresource,MapType,MapFlags,pMappedTex3D) ) + +#define ID3D10Texture3D_Unmap(This,Subresource) \ + ( (This)->lpVtbl -> Unmap(This,Subresource) ) + +#define ID3D10Texture3D_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10Texture3D_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10_0000_0009 */ +/* [local] */ + +typedef +enum D3D10_TEXTURECUBE_FACE + { + D3D10_TEXTURECUBE_FACE_POSITIVE_X = 0, + D3D10_TEXTURECUBE_FACE_NEGATIVE_X = 1, + D3D10_TEXTURECUBE_FACE_POSITIVE_Y = 2, + D3D10_TEXTURECUBE_FACE_NEGATIVE_Y = 3, + D3D10_TEXTURECUBE_FACE_POSITIVE_Z = 4, + D3D10_TEXTURECUBE_FACE_NEGATIVE_Z = 5 + } D3D10_TEXTURECUBE_FACE; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0009_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0009_v0_0_s_ifspec; + +#ifndef __ID3D10View_INTERFACE_DEFINED__ +#define __ID3D10View_INTERFACE_DEFINED__ + +/* interface ID3D10View */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10View; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C902B03F-60A7-49BA-9936-2A3AB37A7E33") + ID3D10View : public ID3D10DeviceChild + { + public: + virtual void STDMETHODCALLTYPE GetResource( + /* [annotation] */ + _Out_ ID3D10Resource **ppResource) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10ViewVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10View * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10View * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10View * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10View * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10View * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10View * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10View * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetResource )( + ID3D10View * This, + /* [annotation] */ + _Out_ ID3D10Resource **ppResource); + + END_INTERFACE + } ID3D10ViewVtbl; + + interface ID3D10View + { + CONST_VTBL struct ID3D10ViewVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10View_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10View_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10View_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10View_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10View_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10View_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10View_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D10View_GetResource(This,ppResource) \ + ( (This)->lpVtbl -> GetResource(This,ppResource) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10View_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10_0000_0010 */ +/* [local] */ + +typedef struct D3D10_BUFFER_SRV + { + union + { + UINT FirstElement; + UINT ElementOffset; + } ; + union + { + UINT NumElements; + UINT ElementWidth; + } ; + } D3D10_BUFFER_SRV; + +typedef struct D3D10_TEX1D_SRV + { + UINT MostDetailedMip; + UINT MipLevels; + } D3D10_TEX1D_SRV; + +typedef struct D3D10_TEX1D_ARRAY_SRV + { + UINT MostDetailedMip; + UINT MipLevels; + UINT FirstArraySlice; + UINT ArraySize; + } D3D10_TEX1D_ARRAY_SRV; + +typedef struct D3D10_TEX2D_SRV + { + UINT MostDetailedMip; + UINT MipLevels; + } D3D10_TEX2D_SRV; + +typedef struct D3D10_TEX2D_ARRAY_SRV + { + UINT MostDetailedMip; + UINT MipLevels; + UINT FirstArraySlice; + UINT ArraySize; + } D3D10_TEX2D_ARRAY_SRV; + +typedef struct D3D10_TEX3D_SRV + { + UINT MostDetailedMip; + UINT MipLevels; + } D3D10_TEX3D_SRV; + +typedef struct D3D10_TEXCUBE_SRV + { + UINT MostDetailedMip; + UINT MipLevels; + } D3D10_TEXCUBE_SRV; + +typedef struct D3D10_TEX2DMS_SRV + { + UINT UnusedField_NothingToDefine; + } D3D10_TEX2DMS_SRV; + +typedef struct D3D10_TEX2DMS_ARRAY_SRV + { + UINT FirstArraySlice; + UINT ArraySize; + } D3D10_TEX2DMS_ARRAY_SRV; + +typedef struct D3D10_SHADER_RESOURCE_VIEW_DESC + { + DXGI_FORMAT Format; + D3D10_SRV_DIMENSION ViewDimension; + union + { + D3D10_BUFFER_SRV Buffer; + D3D10_TEX1D_SRV Texture1D; + D3D10_TEX1D_ARRAY_SRV Texture1DArray; + D3D10_TEX2D_SRV Texture2D; + D3D10_TEX2D_ARRAY_SRV Texture2DArray; + D3D10_TEX2DMS_SRV Texture2DMS; + D3D10_TEX2DMS_ARRAY_SRV Texture2DMSArray; + D3D10_TEX3D_SRV Texture3D; + D3D10_TEXCUBE_SRV TextureCube; + } ; + } D3D10_SHADER_RESOURCE_VIEW_DESC; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0010_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0010_v0_0_s_ifspec; + +#ifndef __ID3D10ShaderResourceView_INTERFACE_DEFINED__ +#define __ID3D10ShaderResourceView_INTERFACE_DEFINED__ + +/* interface ID3D10ShaderResourceView */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10ShaderResourceView; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4C07-342C-4106-A19F-4F2704F689F0") + ID3D10ShaderResourceView : public ID3D10View + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D10_SHADER_RESOURCE_VIEW_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10ShaderResourceViewVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10ShaderResourceView * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10ShaderResourceView * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10ShaderResourceView * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10ShaderResourceView * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10ShaderResourceView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10ShaderResourceView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10ShaderResourceView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetResource )( + ID3D10ShaderResourceView * This, + /* [annotation] */ + _Out_ ID3D10Resource **ppResource); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D10ShaderResourceView * This, + /* [annotation] */ + _Out_ D3D10_SHADER_RESOURCE_VIEW_DESC *pDesc); + + END_INTERFACE + } ID3D10ShaderResourceViewVtbl; + + interface ID3D10ShaderResourceView + { + CONST_VTBL struct ID3D10ShaderResourceViewVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10ShaderResourceView_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10ShaderResourceView_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10ShaderResourceView_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10ShaderResourceView_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10ShaderResourceView_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10ShaderResourceView_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10ShaderResourceView_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D10ShaderResourceView_GetResource(This,ppResource) \ + ( (This)->lpVtbl -> GetResource(This,ppResource) ) + + +#define ID3D10ShaderResourceView_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10ShaderResourceView_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10_0000_0011 */ +/* [local] */ + +typedef struct D3D10_BUFFER_RTV + { + union + { + UINT FirstElement; + UINT ElementOffset; + } ; + union + { + UINT NumElements; + UINT ElementWidth; + } ; + } D3D10_BUFFER_RTV; + +typedef struct D3D10_TEX1D_RTV + { + UINT MipSlice; + } D3D10_TEX1D_RTV; + +typedef struct D3D10_TEX1D_ARRAY_RTV + { + UINT MipSlice; + UINT FirstArraySlice; + UINT ArraySize; + } D3D10_TEX1D_ARRAY_RTV; + +typedef struct D3D10_TEX2D_RTV + { + UINT MipSlice; + } D3D10_TEX2D_RTV; + +typedef struct D3D10_TEX2DMS_RTV + { + UINT UnusedField_NothingToDefine; + } D3D10_TEX2DMS_RTV; + +typedef struct D3D10_TEX2D_ARRAY_RTV + { + UINT MipSlice; + UINT FirstArraySlice; + UINT ArraySize; + } D3D10_TEX2D_ARRAY_RTV; + +typedef struct D3D10_TEX2DMS_ARRAY_RTV + { + UINT FirstArraySlice; + UINT ArraySize; + } D3D10_TEX2DMS_ARRAY_RTV; + +typedef struct D3D10_TEX3D_RTV + { + UINT MipSlice; + UINT FirstWSlice; + UINT WSize; + } D3D10_TEX3D_RTV; + +typedef struct D3D10_RENDER_TARGET_VIEW_DESC + { + DXGI_FORMAT Format; + D3D10_RTV_DIMENSION ViewDimension; + union + { + D3D10_BUFFER_RTV Buffer; + D3D10_TEX1D_RTV Texture1D; + D3D10_TEX1D_ARRAY_RTV Texture1DArray; + D3D10_TEX2D_RTV Texture2D; + D3D10_TEX2D_ARRAY_RTV Texture2DArray; + D3D10_TEX2DMS_RTV Texture2DMS; + D3D10_TEX2DMS_ARRAY_RTV Texture2DMSArray; + D3D10_TEX3D_RTV Texture3D; + } ; + } D3D10_RENDER_TARGET_VIEW_DESC; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0011_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0011_v0_0_s_ifspec; + +#ifndef __ID3D10RenderTargetView_INTERFACE_DEFINED__ +#define __ID3D10RenderTargetView_INTERFACE_DEFINED__ + +/* interface ID3D10RenderTargetView */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10RenderTargetView; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4C08-342C-4106-A19F-4F2704F689F0") + ID3D10RenderTargetView : public ID3D10View + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D10_RENDER_TARGET_VIEW_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10RenderTargetViewVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10RenderTargetView * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10RenderTargetView * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10RenderTargetView * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10RenderTargetView * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10RenderTargetView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10RenderTargetView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10RenderTargetView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetResource )( + ID3D10RenderTargetView * This, + /* [annotation] */ + _Out_ ID3D10Resource **ppResource); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D10RenderTargetView * This, + /* [annotation] */ + _Out_ D3D10_RENDER_TARGET_VIEW_DESC *pDesc); + + END_INTERFACE + } ID3D10RenderTargetViewVtbl; + + interface ID3D10RenderTargetView + { + CONST_VTBL struct ID3D10RenderTargetViewVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10RenderTargetView_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10RenderTargetView_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10RenderTargetView_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10RenderTargetView_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10RenderTargetView_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10RenderTargetView_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10RenderTargetView_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D10RenderTargetView_GetResource(This,ppResource) \ + ( (This)->lpVtbl -> GetResource(This,ppResource) ) + + +#define ID3D10RenderTargetView_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10RenderTargetView_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10_0000_0012 */ +/* [local] */ + +typedef struct D3D10_TEX1D_DSV + { + UINT MipSlice; + } D3D10_TEX1D_DSV; + +typedef struct D3D10_TEX1D_ARRAY_DSV + { + UINT MipSlice; + UINT FirstArraySlice; + UINT ArraySize; + } D3D10_TEX1D_ARRAY_DSV; + +typedef struct D3D10_TEX2D_DSV + { + UINT MipSlice; + } D3D10_TEX2D_DSV; + +typedef struct D3D10_TEX2D_ARRAY_DSV + { + UINT MipSlice; + UINT FirstArraySlice; + UINT ArraySize; + } D3D10_TEX2D_ARRAY_DSV; + +typedef struct D3D10_TEX2DMS_DSV + { + UINT UnusedField_NothingToDefine; + } D3D10_TEX2DMS_DSV; + +typedef struct D3D10_TEX2DMS_ARRAY_DSV + { + UINT FirstArraySlice; + UINT ArraySize; + } D3D10_TEX2DMS_ARRAY_DSV; + +typedef struct D3D10_DEPTH_STENCIL_VIEW_DESC + { + DXGI_FORMAT Format; + D3D10_DSV_DIMENSION ViewDimension; + union + { + D3D10_TEX1D_DSV Texture1D; + D3D10_TEX1D_ARRAY_DSV Texture1DArray; + D3D10_TEX2D_DSV Texture2D; + D3D10_TEX2D_ARRAY_DSV Texture2DArray; + D3D10_TEX2DMS_DSV Texture2DMS; + D3D10_TEX2DMS_ARRAY_DSV Texture2DMSArray; + } ; + } D3D10_DEPTH_STENCIL_VIEW_DESC; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0012_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0012_v0_0_s_ifspec; + +#ifndef __ID3D10DepthStencilView_INTERFACE_DEFINED__ +#define __ID3D10DepthStencilView_INTERFACE_DEFINED__ + +/* interface ID3D10DepthStencilView */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10DepthStencilView; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4C09-342C-4106-A19F-4F2704F689F0") + ID3D10DepthStencilView : public ID3D10View + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D10_DEPTH_STENCIL_VIEW_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10DepthStencilViewVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10DepthStencilView * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10DepthStencilView * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10DepthStencilView * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10DepthStencilView * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10DepthStencilView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10DepthStencilView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10DepthStencilView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetResource )( + ID3D10DepthStencilView * This, + /* [annotation] */ + _Out_ ID3D10Resource **ppResource); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D10DepthStencilView * This, + /* [annotation] */ + _Out_ D3D10_DEPTH_STENCIL_VIEW_DESC *pDesc); + + END_INTERFACE + } ID3D10DepthStencilViewVtbl; + + interface ID3D10DepthStencilView + { + CONST_VTBL struct ID3D10DepthStencilViewVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10DepthStencilView_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10DepthStencilView_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10DepthStencilView_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10DepthStencilView_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10DepthStencilView_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10DepthStencilView_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10DepthStencilView_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D10DepthStencilView_GetResource(This,ppResource) \ + ( (This)->lpVtbl -> GetResource(This,ppResource) ) + + +#define ID3D10DepthStencilView_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10DepthStencilView_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D10VertexShader_INTERFACE_DEFINED__ +#define __ID3D10VertexShader_INTERFACE_DEFINED__ + +/* interface ID3D10VertexShader */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10VertexShader; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4C0A-342C-4106-A19F-4F2704F689F0") + ID3D10VertexShader : public ID3D10DeviceChild + { + public: + }; + + +#else /* C style interface */ + + typedef struct ID3D10VertexShaderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10VertexShader * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10VertexShader * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10VertexShader * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10VertexShader * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10VertexShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10VertexShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10VertexShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + END_INTERFACE + } ID3D10VertexShaderVtbl; + + interface ID3D10VertexShader + { + CONST_VTBL struct ID3D10VertexShaderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10VertexShader_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10VertexShader_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10VertexShader_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10VertexShader_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10VertexShader_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10VertexShader_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10VertexShader_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10VertexShader_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D10GeometryShader_INTERFACE_DEFINED__ +#define __ID3D10GeometryShader_INTERFACE_DEFINED__ + +/* interface ID3D10GeometryShader */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10GeometryShader; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6316BE88-54CD-4040-AB44-20461BC81F68") + ID3D10GeometryShader : public ID3D10DeviceChild + { + public: + }; + + +#else /* C style interface */ + + typedef struct ID3D10GeometryShaderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10GeometryShader * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10GeometryShader * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10GeometryShader * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10GeometryShader * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10GeometryShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10GeometryShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10GeometryShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + END_INTERFACE + } ID3D10GeometryShaderVtbl; + + interface ID3D10GeometryShader + { + CONST_VTBL struct ID3D10GeometryShaderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10GeometryShader_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10GeometryShader_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10GeometryShader_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10GeometryShader_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10GeometryShader_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10GeometryShader_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10GeometryShader_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10GeometryShader_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D10PixelShader_INTERFACE_DEFINED__ +#define __ID3D10PixelShader_INTERFACE_DEFINED__ + +/* interface ID3D10PixelShader */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10PixelShader; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("4968B601-9D00-4cde-8346-8E7F675819B6") + ID3D10PixelShader : public ID3D10DeviceChild + { + public: + }; + + +#else /* C style interface */ + + typedef struct ID3D10PixelShaderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10PixelShader * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10PixelShader * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10PixelShader * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10PixelShader * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10PixelShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10PixelShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10PixelShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + END_INTERFACE + } ID3D10PixelShaderVtbl; + + interface ID3D10PixelShader + { + CONST_VTBL struct ID3D10PixelShaderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10PixelShader_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10PixelShader_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10PixelShader_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10PixelShader_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10PixelShader_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10PixelShader_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10PixelShader_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10PixelShader_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D10InputLayout_INTERFACE_DEFINED__ +#define __ID3D10InputLayout_INTERFACE_DEFINED__ + +/* interface ID3D10InputLayout */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10InputLayout; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4C0B-342C-4106-A19F-4F2704F689F0") + ID3D10InputLayout : public ID3D10DeviceChild + { + public: + }; + + +#else /* C style interface */ + + typedef struct ID3D10InputLayoutVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10InputLayout * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10InputLayout * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10InputLayout * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10InputLayout * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10InputLayout * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10InputLayout * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10InputLayout * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + END_INTERFACE + } ID3D10InputLayoutVtbl; + + interface ID3D10InputLayout + { + CONST_VTBL struct ID3D10InputLayoutVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10InputLayout_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10InputLayout_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10InputLayout_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10InputLayout_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10InputLayout_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10InputLayout_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10InputLayout_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10InputLayout_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10_0000_0017 */ +/* [local] */ + +typedef +enum D3D10_FILTER + { + D3D10_FILTER_MIN_MAG_MIP_POINT = 0, + D3D10_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x1, + D3D10_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x4, + D3D10_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x5, + D3D10_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x10, + D3D10_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x11, + D3D10_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x14, + D3D10_FILTER_MIN_MAG_MIP_LINEAR = 0x15, + D3D10_FILTER_ANISOTROPIC = 0x55, + D3D10_FILTER_COMPARISON_MIN_MAG_MIP_POINT = 0x80, + D3D10_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 0x81, + D3D10_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x84, + D3D10_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 0x85, + D3D10_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 0x90, + D3D10_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x91, + D3D10_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 0x94, + D3D10_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR = 0x95, + D3D10_FILTER_COMPARISON_ANISOTROPIC = 0xd5, + D3D10_FILTER_TEXT_1BIT = 0x80000000 + } D3D10_FILTER; + +typedef +enum D3D10_FILTER_TYPE + { + D3D10_FILTER_TYPE_POINT = 0, + D3D10_FILTER_TYPE_LINEAR = 1 + } D3D10_FILTER_TYPE; + +#define D3D10_FILTER_TYPE_MASK ( 0x3 ) + +#define D3D10_MIN_FILTER_SHIFT ( 4 ) + +#define D3D10_MAG_FILTER_SHIFT ( 2 ) + +#define D3D10_MIP_FILTER_SHIFT ( 0 ) + +#define D3D10_COMPARISON_FILTERING_BIT ( 0x80 ) + +#define D3D10_ANISOTROPIC_FILTERING_BIT ( 0x40 ) + +#define D3D10_TEXT_1BIT_BIT ( 0x80000000 ) + +#define D3D10_ENCODE_BASIC_FILTER( min, mag, mip, bComparison ) \ + ( ( D3D10_FILTER ) ( \ + ( ( bComparison ) ? D3D10_COMPARISON_FILTERING_BIT : 0 ) | \ + ( ( ( min ) & D3D10_FILTER_TYPE_MASK ) << D3D10_MIN_FILTER_SHIFT ) | \ + ( ( ( mag ) & D3D10_FILTER_TYPE_MASK ) << D3D10_MAG_FILTER_SHIFT ) | \ + ( ( ( mip ) & D3D10_FILTER_TYPE_MASK ) << D3D10_MIP_FILTER_SHIFT ) ) ) +#define D3D10_ENCODE_ANISOTROPIC_FILTER( bComparison ) \ + ( ( D3D10_FILTER ) ( \ + D3D10_ANISOTROPIC_FILTERING_BIT | \ + D3D10_ENCODE_BASIC_FILTER( D3D10_FILTER_TYPE_LINEAR, \ + D3D10_FILTER_TYPE_LINEAR, \ + D3D10_FILTER_TYPE_LINEAR, \ + bComparison ) ) ) +#define D3D10_DECODE_MIN_FILTER( d3d10Filter ) \ + ( ( D3D10_FILTER_TYPE ) \ + ( ( ( d3d10Filter ) >> D3D10_MIN_FILTER_SHIFT ) & D3D10_FILTER_TYPE_MASK ) ) +#define D3D10_DECODE_MAG_FILTER( d3d10Filter ) \ + ( ( D3D10_FILTER_TYPE ) \ + ( ( ( d3d10Filter ) >> D3D10_MAG_FILTER_SHIFT ) & D3D10_FILTER_TYPE_MASK ) ) +#define D3D10_DECODE_MIP_FILTER( d3d10Filter ) \ + ( ( D3D10_FILTER_TYPE ) \ + ( ( ( d3d10Filter ) >> D3D10_MIP_FILTER_SHIFT ) & D3D10_FILTER_TYPE_MASK ) ) +#define D3D10_DECODE_IS_COMPARISON_FILTER( d3d10Filter ) \ + ( ( d3d10Filter ) & D3D10_COMPARISON_FILTERING_BIT ) +#define D3D10_DECODE_IS_ANISOTROPIC_FILTER( d3d10Filter ) \ + ( ( ( d3d10Filter ) & D3D10_ANISOTROPIC_FILTERING_BIT ) && \ + ( D3D10_FILTER_TYPE_LINEAR == D3D10_DECODE_MIN_FILTER( d3d10Filter ) ) && \ + ( D3D10_FILTER_TYPE_LINEAR == D3D10_DECODE_MAG_FILTER( d3d10Filter ) ) && \ + ( D3D10_FILTER_TYPE_LINEAR == D3D10_DECODE_MIP_FILTER( d3d10Filter ) ) ) +#define D3D10_DECODE_IS_TEXT_1BIT_FILTER( d3d10Filter ) \ + ( ( d3d10Filter ) == D3D10_TEXT_1BIT_BIT ) +typedef +enum D3D10_TEXTURE_ADDRESS_MODE + { + D3D10_TEXTURE_ADDRESS_WRAP = 1, + D3D10_TEXTURE_ADDRESS_MIRROR = 2, + D3D10_TEXTURE_ADDRESS_CLAMP = 3, + D3D10_TEXTURE_ADDRESS_BORDER = 4, + D3D10_TEXTURE_ADDRESS_MIRROR_ONCE = 5 + } D3D10_TEXTURE_ADDRESS_MODE; + +typedef struct D3D10_SAMPLER_DESC + { + D3D10_FILTER Filter; + D3D10_TEXTURE_ADDRESS_MODE AddressU; + D3D10_TEXTURE_ADDRESS_MODE AddressV; + D3D10_TEXTURE_ADDRESS_MODE AddressW; + FLOAT MipLODBias; + UINT MaxAnisotropy; + D3D10_COMPARISON_FUNC ComparisonFunc; + FLOAT BorderColor[ 4 ]; + FLOAT MinLOD; + FLOAT MaxLOD; + } D3D10_SAMPLER_DESC; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0017_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0017_v0_0_s_ifspec; + +#ifndef __ID3D10SamplerState_INTERFACE_DEFINED__ +#define __ID3D10SamplerState_INTERFACE_DEFINED__ + +/* interface ID3D10SamplerState */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10SamplerState; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4C0C-342C-4106-A19F-4F2704F689F0") + ID3D10SamplerState : public ID3D10DeviceChild + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D10_SAMPLER_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10SamplerStateVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10SamplerState * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10SamplerState * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10SamplerState * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10SamplerState * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10SamplerState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10SamplerState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10SamplerState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D10SamplerState * This, + /* [annotation] */ + _Out_ D3D10_SAMPLER_DESC *pDesc); + + END_INTERFACE + } ID3D10SamplerStateVtbl; + + interface ID3D10SamplerState + { + CONST_VTBL struct ID3D10SamplerStateVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10SamplerState_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10SamplerState_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10SamplerState_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10SamplerState_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10SamplerState_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10SamplerState_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10SamplerState_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D10SamplerState_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10SamplerState_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10_0000_0018 */ +/* [local] */ + +typedef +enum D3D10_FORMAT_SUPPORT + { + D3D10_FORMAT_SUPPORT_BUFFER = 0x1, + D3D10_FORMAT_SUPPORT_IA_VERTEX_BUFFER = 0x2, + D3D10_FORMAT_SUPPORT_IA_INDEX_BUFFER = 0x4, + D3D10_FORMAT_SUPPORT_SO_BUFFER = 0x8, + D3D10_FORMAT_SUPPORT_TEXTURE1D = 0x10, + D3D10_FORMAT_SUPPORT_TEXTURE2D = 0x20, + D3D10_FORMAT_SUPPORT_TEXTURE3D = 0x40, + D3D10_FORMAT_SUPPORT_TEXTURECUBE = 0x80, + D3D10_FORMAT_SUPPORT_SHADER_LOAD = 0x100, + D3D10_FORMAT_SUPPORT_SHADER_SAMPLE = 0x200, + D3D10_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON = 0x400, + D3D10_FORMAT_SUPPORT_SHADER_SAMPLE_MONO_TEXT = 0x800, + D3D10_FORMAT_SUPPORT_MIP = 0x1000, + D3D10_FORMAT_SUPPORT_MIP_AUTOGEN = 0x2000, + D3D10_FORMAT_SUPPORT_RENDER_TARGET = 0x4000, + D3D10_FORMAT_SUPPORT_BLENDABLE = 0x8000, + D3D10_FORMAT_SUPPORT_DEPTH_STENCIL = 0x10000, + D3D10_FORMAT_SUPPORT_CPU_LOCKABLE = 0x20000, + D3D10_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE = 0x40000, + D3D10_FORMAT_SUPPORT_DISPLAY = 0x80000, + D3D10_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT = 0x100000, + D3D10_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET = 0x200000, + D3D10_FORMAT_SUPPORT_MULTISAMPLE_LOAD = 0x400000, + D3D10_FORMAT_SUPPORT_SHADER_GATHER = 0x800000, + D3D10_FORMAT_SUPPORT_BACK_BUFFER_CAST = 0x1000000 + } D3D10_FORMAT_SUPPORT; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0018_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0018_v0_0_s_ifspec; + +#ifndef __ID3D10Asynchronous_INTERFACE_DEFINED__ +#define __ID3D10Asynchronous_INTERFACE_DEFINED__ + +/* interface ID3D10Asynchronous */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10Asynchronous; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4C0D-342C-4106-A19F-4F2704F689F0") + ID3D10Asynchronous : public ID3D10DeviceChild + { + public: + virtual void STDMETHODCALLTYPE Begin( void) = 0; + + virtual void STDMETHODCALLTYPE End( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetData( + /* [annotation] */ + _Out_writes_bytes_opt_(DataSize) void *pData, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_ UINT GetDataFlags) = 0; + + virtual UINT STDMETHODCALLTYPE GetDataSize( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10AsynchronousVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10Asynchronous * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10Asynchronous * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10Asynchronous * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10Asynchronous * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10Asynchronous * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10Asynchronous * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10Asynchronous * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *Begin )( + ID3D10Asynchronous * This); + + void ( STDMETHODCALLTYPE *End )( + ID3D10Asynchronous * This); + + HRESULT ( STDMETHODCALLTYPE *GetData )( + ID3D10Asynchronous * This, + /* [annotation] */ + _Out_writes_bytes_opt_(DataSize) void *pData, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_ UINT GetDataFlags); + + UINT ( STDMETHODCALLTYPE *GetDataSize )( + ID3D10Asynchronous * This); + + END_INTERFACE + } ID3D10AsynchronousVtbl; + + interface ID3D10Asynchronous + { + CONST_VTBL struct ID3D10AsynchronousVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10Asynchronous_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10Asynchronous_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10Asynchronous_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10Asynchronous_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10Asynchronous_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10Asynchronous_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10Asynchronous_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D10Asynchronous_Begin(This) \ + ( (This)->lpVtbl -> Begin(This) ) + +#define ID3D10Asynchronous_End(This) \ + ( (This)->lpVtbl -> End(This) ) + +#define ID3D10Asynchronous_GetData(This,pData,DataSize,GetDataFlags) \ + ( (This)->lpVtbl -> GetData(This,pData,DataSize,GetDataFlags) ) + +#define ID3D10Asynchronous_GetDataSize(This) \ + ( (This)->lpVtbl -> GetDataSize(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10Asynchronous_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10_0000_0019 */ +/* [local] */ + +typedef +enum D3D10_ASYNC_GETDATA_FLAG + { + D3D10_ASYNC_GETDATA_DONOTFLUSH = 0x1 + } D3D10_ASYNC_GETDATA_FLAG; + +typedef +enum D3D10_QUERY + { + D3D10_QUERY_EVENT = 0, + D3D10_QUERY_OCCLUSION = ( D3D10_QUERY_EVENT + 1 ) , + D3D10_QUERY_TIMESTAMP = ( D3D10_QUERY_OCCLUSION + 1 ) , + D3D10_QUERY_TIMESTAMP_DISJOINT = ( D3D10_QUERY_TIMESTAMP + 1 ) , + D3D10_QUERY_PIPELINE_STATISTICS = ( D3D10_QUERY_TIMESTAMP_DISJOINT + 1 ) , + D3D10_QUERY_OCCLUSION_PREDICATE = ( D3D10_QUERY_PIPELINE_STATISTICS + 1 ) , + D3D10_QUERY_SO_STATISTICS = ( D3D10_QUERY_OCCLUSION_PREDICATE + 1 ) , + D3D10_QUERY_SO_OVERFLOW_PREDICATE = ( D3D10_QUERY_SO_STATISTICS + 1 ) + } D3D10_QUERY; + +typedef +enum D3D10_QUERY_MISC_FLAG + { + D3D10_QUERY_MISC_PREDICATEHINT = 0x1 + } D3D10_QUERY_MISC_FLAG; + +typedef struct D3D10_QUERY_DESC + { + D3D10_QUERY Query; + UINT MiscFlags; + } D3D10_QUERY_DESC; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0019_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0019_v0_0_s_ifspec; + +#ifndef __ID3D10Query_INTERFACE_DEFINED__ +#define __ID3D10Query_INTERFACE_DEFINED__ + +/* interface ID3D10Query */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10Query; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4C0E-342C-4106-A19F-4F2704F689F0") + ID3D10Query : public ID3D10Asynchronous + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D10_QUERY_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10QueryVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10Query * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10Query * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10Query * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10Query * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10Query * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10Query * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10Query * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *Begin )( + ID3D10Query * This); + + void ( STDMETHODCALLTYPE *End )( + ID3D10Query * This); + + HRESULT ( STDMETHODCALLTYPE *GetData )( + ID3D10Query * This, + /* [annotation] */ + _Out_writes_bytes_opt_(DataSize) void *pData, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_ UINT GetDataFlags); + + UINT ( STDMETHODCALLTYPE *GetDataSize )( + ID3D10Query * This); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D10Query * This, + /* [annotation] */ + _Out_ D3D10_QUERY_DESC *pDesc); + + END_INTERFACE + } ID3D10QueryVtbl; + + interface ID3D10Query + { + CONST_VTBL struct ID3D10QueryVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10Query_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10Query_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10Query_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10Query_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10Query_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10Query_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10Query_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D10Query_Begin(This) \ + ( (This)->lpVtbl -> Begin(This) ) + +#define ID3D10Query_End(This) \ + ( (This)->lpVtbl -> End(This) ) + +#define ID3D10Query_GetData(This,pData,DataSize,GetDataFlags) \ + ( (This)->lpVtbl -> GetData(This,pData,DataSize,GetDataFlags) ) + +#define ID3D10Query_GetDataSize(This) \ + ( (This)->lpVtbl -> GetDataSize(This) ) + + +#define ID3D10Query_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10Query_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D10Predicate_INTERFACE_DEFINED__ +#define __ID3D10Predicate_INTERFACE_DEFINED__ + +/* interface ID3D10Predicate */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10Predicate; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4C10-342C-4106-A19F-4F2704F689F0") + ID3D10Predicate : public ID3D10Query + { + public: + }; + + +#else /* C style interface */ + + typedef struct ID3D10PredicateVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10Predicate * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10Predicate * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10Predicate * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10Predicate * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10Predicate * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10Predicate * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10Predicate * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *Begin )( + ID3D10Predicate * This); + + void ( STDMETHODCALLTYPE *End )( + ID3D10Predicate * This); + + HRESULT ( STDMETHODCALLTYPE *GetData )( + ID3D10Predicate * This, + /* [annotation] */ + _Out_writes_bytes_opt_(DataSize) void *pData, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_ UINT GetDataFlags); + + UINT ( STDMETHODCALLTYPE *GetDataSize )( + ID3D10Predicate * This); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D10Predicate * This, + /* [annotation] */ + _Out_ D3D10_QUERY_DESC *pDesc); + + END_INTERFACE + } ID3D10PredicateVtbl; + + interface ID3D10Predicate + { + CONST_VTBL struct ID3D10PredicateVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10Predicate_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10Predicate_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10Predicate_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10Predicate_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10Predicate_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10Predicate_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10Predicate_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D10Predicate_Begin(This) \ + ( (This)->lpVtbl -> Begin(This) ) + +#define ID3D10Predicate_End(This) \ + ( (This)->lpVtbl -> End(This) ) + +#define ID3D10Predicate_GetData(This,pData,DataSize,GetDataFlags) \ + ( (This)->lpVtbl -> GetData(This,pData,DataSize,GetDataFlags) ) + +#define ID3D10Predicate_GetDataSize(This) \ + ( (This)->lpVtbl -> GetDataSize(This) ) + + +#define ID3D10Predicate_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10Predicate_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10_0000_0021 */ +/* [local] */ + +typedef struct D3D10_QUERY_DATA_TIMESTAMP_DISJOINT + { + UINT64 Frequency; + BOOL Disjoint; + } D3D10_QUERY_DATA_TIMESTAMP_DISJOINT; + +typedef struct D3D10_QUERY_DATA_PIPELINE_STATISTICS + { + UINT64 IAVertices; + UINT64 IAPrimitives; + UINT64 VSInvocations; + UINT64 GSInvocations; + UINT64 GSPrimitives; + UINT64 CInvocations; + UINT64 CPrimitives; + UINT64 PSInvocations; + } D3D10_QUERY_DATA_PIPELINE_STATISTICS; + +typedef struct D3D10_QUERY_DATA_SO_STATISTICS + { + UINT64 NumPrimitivesWritten; + UINT64 PrimitivesStorageNeeded; + } D3D10_QUERY_DATA_SO_STATISTICS; + +typedef +enum D3D10_COUNTER + { + D3D10_COUNTER_GPU_IDLE = 0, + D3D10_COUNTER_VERTEX_PROCESSING = ( D3D10_COUNTER_GPU_IDLE + 1 ) , + D3D10_COUNTER_GEOMETRY_PROCESSING = ( D3D10_COUNTER_VERTEX_PROCESSING + 1 ) , + D3D10_COUNTER_PIXEL_PROCESSING = ( D3D10_COUNTER_GEOMETRY_PROCESSING + 1 ) , + D3D10_COUNTER_OTHER_GPU_PROCESSING = ( D3D10_COUNTER_PIXEL_PROCESSING + 1 ) , + D3D10_COUNTER_HOST_ADAPTER_BANDWIDTH_UTILIZATION = ( D3D10_COUNTER_OTHER_GPU_PROCESSING + 1 ) , + D3D10_COUNTER_LOCAL_VIDMEM_BANDWIDTH_UTILIZATION = ( D3D10_COUNTER_HOST_ADAPTER_BANDWIDTH_UTILIZATION + 1 ) , + D3D10_COUNTER_VERTEX_THROUGHPUT_UTILIZATION = ( D3D10_COUNTER_LOCAL_VIDMEM_BANDWIDTH_UTILIZATION + 1 ) , + D3D10_COUNTER_TRIANGLE_SETUP_THROUGHPUT_UTILIZATION = ( D3D10_COUNTER_VERTEX_THROUGHPUT_UTILIZATION + 1 ) , + D3D10_COUNTER_FILLRATE_THROUGHPUT_UTILIZATION = ( D3D10_COUNTER_TRIANGLE_SETUP_THROUGHPUT_UTILIZATION + 1 ) , + D3D10_COUNTER_VS_MEMORY_LIMITED = ( D3D10_COUNTER_FILLRATE_THROUGHPUT_UTILIZATION + 1 ) , + D3D10_COUNTER_VS_COMPUTATION_LIMITED = ( D3D10_COUNTER_VS_MEMORY_LIMITED + 1 ) , + D3D10_COUNTER_GS_MEMORY_LIMITED = ( D3D10_COUNTER_VS_COMPUTATION_LIMITED + 1 ) , + D3D10_COUNTER_GS_COMPUTATION_LIMITED = ( D3D10_COUNTER_GS_MEMORY_LIMITED + 1 ) , + D3D10_COUNTER_PS_MEMORY_LIMITED = ( D3D10_COUNTER_GS_COMPUTATION_LIMITED + 1 ) , + D3D10_COUNTER_PS_COMPUTATION_LIMITED = ( D3D10_COUNTER_PS_MEMORY_LIMITED + 1 ) , + D3D10_COUNTER_POST_TRANSFORM_CACHE_HIT_RATE = ( D3D10_COUNTER_PS_COMPUTATION_LIMITED + 1 ) , + D3D10_COUNTER_TEXTURE_CACHE_HIT_RATE = ( D3D10_COUNTER_POST_TRANSFORM_CACHE_HIT_RATE + 1 ) , + D3D10_COUNTER_DEVICE_DEPENDENT_0 = 0x40000000 + } D3D10_COUNTER; + +typedef +enum D3D10_COUNTER_TYPE + { + D3D10_COUNTER_TYPE_FLOAT32 = 0, + D3D10_COUNTER_TYPE_UINT16 = ( D3D10_COUNTER_TYPE_FLOAT32 + 1 ) , + D3D10_COUNTER_TYPE_UINT32 = ( D3D10_COUNTER_TYPE_UINT16 + 1 ) , + D3D10_COUNTER_TYPE_UINT64 = ( D3D10_COUNTER_TYPE_UINT32 + 1 ) + } D3D10_COUNTER_TYPE; + +typedef struct D3D10_COUNTER_DESC + { + D3D10_COUNTER Counter; + UINT MiscFlags; + } D3D10_COUNTER_DESC; + +typedef struct D3D10_COUNTER_INFO + { + D3D10_COUNTER LastDeviceDependentCounter; + UINT NumSimultaneousCounters; + UINT8 NumDetectableParallelUnits; + } D3D10_COUNTER_INFO; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0021_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0021_v0_0_s_ifspec; + +#ifndef __ID3D10Counter_INTERFACE_DEFINED__ +#define __ID3D10Counter_INTERFACE_DEFINED__ + +/* interface ID3D10Counter */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10Counter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4C11-342C-4106-A19F-4F2704F689F0") + ID3D10Counter : public ID3D10Asynchronous + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D10_COUNTER_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10CounterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10Counter * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10Counter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10Counter * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10Counter * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10Counter * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10Counter * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10Counter * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *Begin )( + ID3D10Counter * This); + + void ( STDMETHODCALLTYPE *End )( + ID3D10Counter * This); + + HRESULT ( STDMETHODCALLTYPE *GetData )( + ID3D10Counter * This, + /* [annotation] */ + _Out_writes_bytes_opt_(DataSize) void *pData, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_ UINT GetDataFlags); + + UINT ( STDMETHODCALLTYPE *GetDataSize )( + ID3D10Counter * This); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D10Counter * This, + /* [annotation] */ + _Out_ D3D10_COUNTER_DESC *pDesc); + + END_INTERFACE + } ID3D10CounterVtbl; + + interface ID3D10Counter + { + CONST_VTBL struct ID3D10CounterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10Counter_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10Counter_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10Counter_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10Counter_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10Counter_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10Counter_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10Counter_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D10Counter_Begin(This) \ + ( (This)->lpVtbl -> Begin(This) ) + +#define ID3D10Counter_End(This) \ + ( (This)->lpVtbl -> End(This) ) + +#define ID3D10Counter_GetData(This,pData,DataSize,GetDataFlags) \ + ( (This)->lpVtbl -> GetData(This,pData,DataSize,GetDataFlags) ) + +#define ID3D10Counter_GetDataSize(This) \ + ( (This)->lpVtbl -> GetDataSize(This) ) + + +#define ID3D10Counter_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10Counter_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D10Device_INTERFACE_DEFINED__ +#define __ID3D10Device_INTERFACE_DEFINED__ + +/* interface ID3D10Device */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10Device; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4C0F-342C-4106-A19F-4F2704F689F0") + ID3D10Device : public IUnknown + { + public: + virtual void STDMETHODCALLTYPE VSSetConstantBuffers( + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D10Buffer *const *ppConstantBuffers) = 0; + + virtual void STDMETHODCALLTYPE PSSetShaderResources( + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D10ShaderResourceView *const *ppShaderResourceViews) = 0; + + virtual void STDMETHODCALLTYPE PSSetShader( + /* [annotation] */ + _In_opt_ ID3D10PixelShader *pPixelShader) = 0; + + virtual void STDMETHODCALLTYPE PSSetSamplers( + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D10SamplerState *const *ppSamplers) = 0; + + virtual void STDMETHODCALLTYPE VSSetShader( + /* [annotation] */ + _In_opt_ ID3D10VertexShader *pVertexShader) = 0; + + virtual void STDMETHODCALLTYPE DrawIndexed( + /* [annotation] */ + _In_ UINT IndexCount, + /* [annotation] */ + _In_ UINT StartIndexLocation, + /* [annotation] */ + _In_ INT BaseVertexLocation) = 0; + + virtual void STDMETHODCALLTYPE Draw( + /* [annotation] */ + _In_ UINT VertexCount, + /* [annotation] */ + _In_ UINT StartVertexLocation) = 0; + + virtual void STDMETHODCALLTYPE PSSetConstantBuffers( + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D10Buffer *const *ppConstantBuffers) = 0; + + virtual void STDMETHODCALLTYPE IASetInputLayout( + /* [annotation] */ + _In_opt_ ID3D10InputLayout *pInputLayout) = 0; + + virtual void STDMETHODCALLTYPE IASetVertexBuffers( + /* [annotation] */ + _In_range_( 0, D3D10_1_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_1_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D10Buffer *const *ppVertexBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pStrides, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pOffsets) = 0; + + virtual void STDMETHODCALLTYPE IASetIndexBuffer( + /* [annotation] */ + _In_opt_ ID3D10Buffer *pIndexBuffer, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT Offset) = 0; + + virtual void STDMETHODCALLTYPE DrawIndexedInstanced( + /* [annotation] */ + _In_ UINT IndexCountPerInstance, + /* [annotation] */ + _In_ UINT InstanceCount, + /* [annotation] */ + _In_ UINT StartIndexLocation, + /* [annotation] */ + _In_ INT BaseVertexLocation, + /* [annotation] */ + _In_ UINT StartInstanceLocation) = 0; + + virtual void STDMETHODCALLTYPE DrawInstanced( + /* [annotation] */ + _In_ UINT VertexCountPerInstance, + /* [annotation] */ + _In_ UINT InstanceCount, + /* [annotation] */ + _In_ UINT StartVertexLocation, + /* [annotation] */ + _In_ UINT StartInstanceLocation) = 0; + + virtual void STDMETHODCALLTYPE GSSetConstantBuffers( + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D10Buffer *const *ppConstantBuffers) = 0; + + virtual void STDMETHODCALLTYPE GSSetShader( + /* [annotation] */ + _In_opt_ ID3D10GeometryShader *pShader) = 0; + + virtual void STDMETHODCALLTYPE IASetPrimitiveTopology( + /* [annotation] */ + _In_ D3D10_PRIMITIVE_TOPOLOGY Topology) = 0; + + virtual void STDMETHODCALLTYPE VSSetShaderResources( + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D10ShaderResourceView *const *ppShaderResourceViews) = 0; + + virtual void STDMETHODCALLTYPE VSSetSamplers( + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D10SamplerState *const *ppSamplers) = 0; + + virtual void STDMETHODCALLTYPE SetPredication( + /* [annotation] */ + _In_opt_ ID3D10Predicate *pPredicate, + /* [annotation] */ + _In_ BOOL PredicateValue) = 0; + + virtual void STDMETHODCALLTYPE GSSetShaderResources( + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D10ShaderResourceView *const *ppShaderResourceViews) = 0; + + virtual void STDMETHODCALLTYPE GSSetSamplers( + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D10SamplerState *const *ppSamplers) = 0; + + virtual void STDMETHODCALLTYPE OMSetRenderTargets( + /* [annotation] */ + _In_range_( 0, D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D10RenderTargetView *const *ppRenderTargetViews, + /* [annotation] */ + _In_opt_ ID3D10DepthStencilView *pDepthStencilView) = 0; + + virtual void STDMETHODCALLTYPE OMSetBlendState( + /* [annotation] */ + _In_opt_ ID3D10BlendState *pBlendState, + /* [annotation] */ + _In_ const FLOAT BlendFactor[ 4 ], + /* [annotation] */ + _In_ UINT SampleMask) = 0; + + virtual void STDMETHODCALLTYPE OMSetDepthStencilState( + /* [annotation] */ + _In_opt_ ID3D10DepthStencilState *pDepthStencilState, + /* [annotation] */ + _In_ UINT StencilRef) = 0; + + virtual void STDMETHODCALLTYPE SOSetTargets( + /* [annotation] */ + _In_range_( 0, D3D10_SO_BUFFER_SLOT_COUNT) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D10Buffer *const *ppSOTargets, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pOffsets) = 0; + + virtual void STDMETHODCALLTYPE DrawAuto( void) = 0; + + virtual void STDMETHODCALLTYPE RSSetState( + /* [annotation] */ + _In_opt_ ID3D10RasterizerState *pRasterizerState) = 0; + + virtual void STDMETHODCALLTYPE RSSetViewports( + /* [annotation] */ + _In_range_(0, D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumViewports, + /* [annotation] */ + _In_reads_opt_(NumViewports) const D3D10_VIEWPORT *pViewports) = 0; + + virtual void STDMETHODCALLTYPE RSSetScissorRects( + /* [annotation] */ + _In_range_(0, D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumRects, + /* [annotation] */ + _In_reads_opt_(NumRects) const D3D10_RECT *pRects) = 0; + + virtual void STDMETHODCALLTYPE CopySubresourceRegion( + /* [annotation] */ + _In_ ID3D10Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ UINT DstX, + /* [annotation] */ + _In_ UINT DstY, + /* [annotation] */ + _In_ UINT DstZ, + /* [annotation] */ + _In_ ID3D10Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_opt_ const D3D10_BOX *pSrcBox) = 0; + + virtual void STDMETHODCALLTYPE CopyResource( + /* [annotation] */ + _In_ ID3D10Resource *pDstResource, + /* [annotation] */ + _In_ ID3D10Resource *pSrcResource) = 0; + + virtual void STDMETHODCALLTYPE UpdateSubresource( + /* [annotation] */ + _In_ ID3D10Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_opt_ const D3D10_BOX *pDstBox, + /* [annotation] */ + _In_ const void *pSrcData, + /* [annotation] */ + _In_ UINT SrcRowPitch, + /* [annotation] */ + _In_ UINT SrcDepthPitch) = 0; + + virtual void STDMETHODCALLTYPE ClearRenderTargetView( + /* [annotation] */ + _In_ ID3D10RenderTargetView *pRenderTargetView, + /* [annotation] */ + _In_ const FLOAT ColorRGBA[ 4 ]) = 0; + + virtual void STDMETHODCALLTYPE ClearDepthStencilView( + /* [annotation] */ + _In_ ID3D10DepthStencilView *pDepthStencilView, + /* [annotation] */ + _In_ UINT ClearFlags, + /* [annotation] */ + _In_ FLOAT Depth, + /* [annotation] */ + _In_ UINT8 Stencil) = 0; + + virtual void STDMETHODCALLTYPE GenerateMips( + /* [annotation] */ + _In_ ID3D10ShaderResourceView *pShaderResourceView) = 0; + + virtual void STDMETHODCALLTYPE ResolveSubresource( + /* [annotation] */ + _In_ ID3D10Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ ID3D10Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_ DXGI_FORMAT Format) = 0; + + virtual void STDMETHODCALLTYPE VSGetConstantBuffers( + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D10Buffer **ppConstantBuffers) = 0; + + virtual void STDMETHODCALLTYPE PSGetShaderResources( + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D10ShaderResourceView **ppShaderResourceViews) = 0; + + virtual void STDMETHODCALLTYPE PSGetShader( + /* [annotation] */ + _Out_ ID3D10PixelShader **ppPixelShader) = 0; + + virtual void STDMETHODCALLTYPE PSGetSamplers( + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D10SamplerState **ppSamplers) = 0; + + virtual void STDMETHODCALLTYPE VSGetShader( + /* [annotation] */ + _Out_ ID3D10VertexShader **ppVertexShader) = 0; + + virtual void STDMETHODCALLTYPE PSGetConstantBuffers( + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D10Buffer **ppConstantBuffers) = 0; + + virtual void STDMETHODCALLTYPE IAGetInputLayout( + /* [annotation] */ + _Out_ ID3D10InputLayout **ppInputLayout) = 0; + + virtual void STDMETHODCALLTYPE IAGetVertexBuffers( + /* [annotation] */ + _In_range_( 0, D3D10_1_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_1_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D10Buffer **ppVertexBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pStrides, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pOffsets) = 0; + + virtual void STDMETHODCALLTYPE IAGetIndexBuffer( + /* [annotation] */ + _Out_opt_ ID3D10Buffer **pIndexBuffer, + /* [annotation] */ + _Out_opt_ DXGI_FORMAT *Format, + /* [annotation] */ + _Out_opt_ UINT *Offset) = 0; + + virtual void STDMETHODCALLTYPE GSGetConstantBuffers( + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D10Buffer **ppConstantBuffers) = 0; + + virtual void STDMETHODCALLTYPE GSGetShader( + /* [annotation] */ + _Out_ ID3D10GeometryShader **ppGeometryShader) = 0; + + virtual void STDMETHODCALLTYPE IAGetPrimitiveTopology( + /* [annotation] */ + _Out_ D3D10_PRIMITIVE_TOPOLOGY *pTopology) = 0; + + virtual void STDMETHODCALLTYPE VSGetShaderResources( + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D10ShaderResourceView **ppShaderResourceViews) = 0; + + virtual void STDMETHODCALLTYPE VSGetSamplers( + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D10SamplerState **ppSamplers) = 0; + + virtual void STDMETHODCALLTYPE GetPredication( + /* [annotation] */ + _Out_opt_ ID3D10Predicate **ppPredicate, + /* [annotation] */ + _Out_opt_ BOOL *pPredicateValue) = 0; + + virtual void STDMETHODCALLTYPE GSGetShaderResources( + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D10ShaderResourceView **ppShaderResourceViews) = 0; + + virtual void STDMETHODCALLTYPE GSGetSamplers( + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D10SamplerState **ppSamplers) = 0; + + virtual void STDMETHODCALLTYPE OMGetRenderTargets( + /* [annotation] */ + _In_range_( 0, D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D10RenderTargetView **ppRenderTargetViews, + /* [annotation] */ + _Out_opt_ ID3D10DepthStencilView **ppDepthStencilView) = 0; + + virtual void STDMETHODCALLTYPE OMGetBlendState( + /* [annotation] */ + _Out_opt_ ID3D10BlendState **ppBlendState, + /* [annotation] */ + _Out_opt_ FLOAT BlendFactor[ 4 ], + /* [annotation] */ + _Out_opt_ UINT *pSampleMask) = 0; + + virtual void STDMETHODCALLTYPE OMGetDepthStencilState( + /* [annotation] */ + _Out_opt_ ID3D10DepthStencilState **ppDepthStencilState, + /* [annotation] */ + _Out_opt_ UINT *pStencilRef) = 0; + + virtual void STDMETHODCALLTYPE SOGetTargets( + /* [annotation] */ + _In_range_( 0, D3D10_SO_BUFFER_SLOT_COUNT ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D10Buffer **ppSOTargets, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pOffsets) = 0; + + virtual void STDMETHODCALLTYPE RSGetState( + /* [annotation] */ + _Out_ ID3D10RasterizerState **ppRasterizerState) = 0; + + virtual void STDMETHODCALLTYPE RSGetViewports( + /* [annotation] */ + _Inout_ /*_range(0, D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE )*/ UINT *NumViewports, + /* [annotation] */ + _Out_writes_opt_(*NumViewports) D3D10_VIEWPORT *pViewports) = 0; + + virtual void STDMETHODCALLTYPE RSGetScissorRects( + /* [annotation] */ + _Inout_ /*_range(0, D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE )*/ UINT *NumRects, + /* [annotation] */ + _Out_writes_opt_(*NumRects) D3D10_RECT *pRects) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDeviceRemovedReason( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetExceptionMode( + UINT RaiseFlags) = 0; + + virtual UINT STDMETHODCALLTYPE GetExceptionMode( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPrivateData( + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPrivateData( + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPrivateDataInterface( + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData) = 0; + + virtual void STDMETHODCALLTYPE ClearState( void) = 0; + + virtual void STDMETHODCALLTYPE Flush( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateBuffer( + /* [annotation] */ + _In_ const D3D10_BUFFER_DESC *pDesc, + /* [annotation] */ + _In_opt_ const D3D10_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _Out_opt_ ID3D10Buffer **ppBuffer) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateTexture1D( + /* [annotation] */ + _In_ const D3D10_TEXTURE1D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels * pDesc->ArraySize)) const D3D10_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _Out_ ID3D10Texture1D **ppTexture1D) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateTexture2D( + /* [annotation] */ + _In_ const D3D10_TEXTURE2D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels * pDesc->ArraySize)) const D3D10_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _Out_ ID3D10Texture2D **ppTexture2D) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateTexture3D( + /* [annotation] */ + _In_ const D3D10_TEXTURE3D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels)) const D3D10_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _Out_ ID3D10Texture3D **ppTexture3D) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateShaderResourceView( + /* [annotation] */ + _In_ ID3D10Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D10_SHADER_RESOURCE_VIEW_DESC *pDesc, + /* [annotation] */ + _Out_opt_ ID3D10ShaderResourceView **ppSRView) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateRenderTargetView( + /* [annotation] */ + _In_ ID3D10Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D10_RENDER_TARGET_VIEW_DESC *pDesc, + /* [annotation] */ + _Out_opt_ ID3D10RenderTargetView **ppRTView) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateDepthStencilView( + /* [annotation] */ + _In_ ID3D10Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D10_DEPTH_STENCIL_VIEW_DESC *pDesc, + /* [annotation] */ + _Out_opt_ ID3D10DepthStencilView **ppDepthStencilView) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateInputLayout( + /* [annotation] */ + _In_reads_(NumElements) const D3D10_INPUT_ELEMENT_DESC *pInputElementDescs, + /* [annotation] */ + _In_range_( 0, D3D10_1_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT ) UINT NumElements, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecodeWithInputSignature, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _Out_opt_ ID3D10InputLayout **ppInputLayout) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateVertexShader( + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _Out_opt_ ID3D10VertexShader **ppVertexShader) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateGeometryShader( + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _Out_opt_ ID3D10GeometryShader **ppGeometryShader) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateGeometryShaderWithStreamOutput( + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_reads_opt_(NumEntries) const D3D10_SO_DECLARATION_ENTRY *pSODeclaration, + /* [annotation] */ + _In_range_( 0, D3D10_SO_SINGLE_BUFFER_COMPONENT_LIMIT ) UINT NumEntries, + /* [annotation] */ + _In_ UINT OutputStreamStride, + /* [annotation] */ + _Out_opt_ ID3D10GeometryShader **ppGeometryShader) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreatePixelShader( + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _Out_opt_ ID3D10PixelShader **ppPixelShader) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateBlendState( + /* [annotation] */ + _In_ const D3D10_BLEND_DESC *pBlendStateDesc, + /* [annotation] */ + _Out_opt_ ID3D10BlendState **ppBlendState) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateDepthStencilState( + /* [annotation] */ + _In_ const D3D10_DEPTH_STENCIL_DESC *pDepthStencilDesc, + /* [annotation] */ + _Out_opt_ ID3D10DepthStencilState **ppDepthStencilState) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateRasterizerState( + /* [annotation] */ + _In_ const D3D10_RASTERIZER_DESC *pRasterizerDesc, + /* [annotation] */ + _Out_opt_ ID3D10RasterizerState **ppRasterizerState) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSamplerState( + /* [annotation] */ + _In_ const D3D10_SAMPLER_DESC *pSamplerDesc, + /* [annotation] */ + _Out_opt_ ID3D10SamplerState **ppSamplerState) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateQuery( + /* [annotation] */ + _In_ const D3D10_QUERY_DESC *pQueryDesc, + /* [annotation] */ + _Out_opt_ ID3D10Query **ppQuery) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreatePredicate( + /* [annotation] */ + _In_ const D3D10_QUERY_DESC *pPredicateDesc, + /* [annotation] */ + _Out_opt_ ID3D10Predicate **ppPredicate) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateCounter( + /* [annotation] */ + _In_ const D3D10_COUNTER_DESC *pCounterDesc, + /* [annotation] */ + _Out_opt_ ID3D10Counter **ppCounter) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckFormatSupport( + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _Out_ UINT *pFormatSupport) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckMultisampleQualityLevels( + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT SampleCount, + /* [annotation] */ + _Out_ UINT *pNumQualityLevels) = 0; + + virtual void STDMETHODCALLTYPE CheckCounterInfo( + /* [annotation] */ + _Out_ D3D10_COUNTER_INFO *pCounterInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckCounter( + /* [annotation] */ + _In_ const D3D10_COUNTER_DESC *pDesc, + /* [annotation] */ + _Out_ D3D10_COUNTER_TYPE *pType, + /* [annotation] */ + _Out_ UINT *pActiveCounters, + /* [annotation] */ + _Out_writes_opt_(*pNameLength) LPSTR szName, + /* [annotation] */ + _Inout_opt_ UINT *pNameLength, + /* [annotation] */ + _Out_writes_opt_(*pUnitsLength) LPSTR szUnits, + /* [annotation] */ + _Inout_opt_ UINT *pUnitsLength, + /* [annotation] */ + _Out_writes_opt_(*pDescriptionLength) LPSTR szDescription, + /* [annotation] */ + _Inout_opt_ UINT *pDescriptionLength) = 0; + + virtual UINT STDMETHODCALLTYPE GetCreationFlags( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE OpenSharedResource( + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _In_ REFIID ReturnedInterface, + /* [annotation] */ + _Out_opt_ void **ppResource) = 0; + + virtual void STDMETHODCALLTYPE SetTextFilterSize( + /* [annotation] */ + _In_ UINT Width, + /* [annotation] */ + _In_ UINT Height) = 0; + + virtual void STDMETHODCALLTYPE GetTextFilterSize( + /* [annotation] */ + _Out_opt_ UINT *pWidth, + /* [annotation] */ + _Out_opt_ UINT *pHeight) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10DeviceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10Device * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10Device * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10Device * This); + + void ( STDMETHODCALLTYPE *VSSetConstantBuffers )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D10Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *PSSetShaderResources )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D10ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *PSSetShader )( + ID3D10Device * This, + /* [annotation] */ + _In_opt_ ID3D10PixelShader *pPixelShader); + + void ( STDMETHODCALLTYPE *PSSetSamplers )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D10SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *VSSetShader )( + ID3D10Device * This, + /* [annotation] */ + _In_opt_ ID3D10VertexShader *pVertexShader); + + void ( STDMETHODCALLTYPE *DrawIndexed )( + ID3D10Device * This, + /* [annotation] */ + _In_ UINT IndexCount, + /* [annotation] */ + _In_ UINT StartIndexLocation, + /* [annotation] */ + _In_ INT BaseVertexLocation); + + void ( STDMETHODCALLTYPE *Draw )( + ID3D10Device * This, + /* [annotation] */ + _In_ UINT VertexCount, + /* [annotation] */ + _In_ UINT StartVertexLocation); + + void ( STDMETHODCALLTYPE *PSSetConstantBuffers )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D10Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *IASetInputLayout )( + ID3D10Device * This, + /* [annotation] */ + _In_opt_ ID3D10InputLayout *pInputLayout); + + void ( STDMETHODCALLTYPE *IASetVertexBuffers )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_1_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_1_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D10Buffer *const *ppVertexBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pStrides, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pOffsets); + + void ( STDMETHODCALLTYPE *IASetIndexBuffer )( + ID3D10Device * This, + /* [annotation] */ + _In_opt_ ID3D10Buffer *pIndexBuffer, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT Offset); + + void ( STDMETHODCALLTYPE *DrawIndexedInstanced )( + ID3D10Device * This, + /* [annotation] */ + _In_ UINT IndexCountPerInstance, + /* [annotation] */ + _In_ UINT InstanceCount, + /* [annotation] */ + _In_ UINT StartIndexLocation, + /* [annotation] */ + _In_ INT BaseVertexLocation, + /* [annotation] */ + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *DrawInstanced )( + ID3D10Device * This, + /* [annotation] */ + _In_ UINT VertexCountPerInstance, + /* [annotation] */ + _In_ UINT InstanceCount, + /* [annotation] */ + _In_ UINT StartVertexLocation, + /* [annotation] */ + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *GSSetConstantBuffers )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D10Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *GSSetShader )( + ID3D10Device * This, + /* [annotation] */ + _In_opt_ ID3D10GeometryShader *pShader); + + void ( STDMETHODCALLTYPE *IASetPrimitiveTopology )( + ID3D10Device * This, + /* [annotation] */ + _In_ D3D10_PRIMITIVE_TOPOLOGY Topology); + + void ( STDMETHODCALLTYPE *VSSetShaderResources )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D10ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *VSSetSamplers )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D10SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *SetPredication )( + ID3D10Device * This, + /* [annotation] */ + _In_opt_ ID3D10Predicate *pPredicate, + /* [annotation] */ + _In_ BOOL PredicateValue); + + void ( STDMETHODCALLTYPE *GSSetShaderResources )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D10ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *GSSetSamplers )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D10SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *OMSetRenderTargets )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D10RenderTargetView *const *ppRenderTargetViews, + /* [annotation] */ + _In_opt_ ID3D10DepthStencilView *pDepthStencilView); + + void ( STDMETHODCALLTYPE *OMSetBlendState )( + ID3D10Device * This, + /* [annotation] */ + _In_opt_ ID3D10BlendState *pBlendState, + /* [annotation] */ + _In_ const FLOAT BlendFactor[ 4 ], + /* [annotation] */ + _In_ UINT SampleMask); + + void ( STDMETHODCALLTYPE *OMSetDepthStencilState )( + ID3D10Device * This, + /* [annotation] */ + _In_opt_ ID3D10DepthStencilState *pDepthStencilState, + /* [annotation] */ + _In_ UINT StencilRef); + + void ( STDMETHODCALLTYPE *SOSetTargets )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_SO_BUFFER_SLOT_COUNT) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D10Buffer *const *ppSOTargets, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pOffsets); + + void ( STDMETHODCALLTYPE *DrawAuto )( + ID3D10Device * This); + + void ( STDMETHODCALLTYPE *RSSetState )( + ID3D10Device * This, + /* [annotation] */ + _In_opt_ ID3D10RasterizerState *pRasterizerState); + + void ( STDMETHODCALLTYPE *RSSetViewports )( + ID3D10Device * This, + /* [annotation] */ + _In_range_(0, D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumViewports, + /* [annotation] */ + _In_reads_opt_(NumViewports) const D3D10_VIEWPORT *pViewports); + + void ( STDMETHODCALLTYPE *RSSetScissorRects )( + ID3D10Device * This, + /* [annotation] */ + _In_range_(0, D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumRects, + /* [annotation] */ + _In_reads_opt_(NumRects) const D3D10_RECT *pRects); + + void ( STDMETHODCALLTYPE *CopySubresourceRegion )( + ID3D10Device * This, + /* [annotation] */ + _In_ ID3D10Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ UINT DstX, + /* [annotation] */ + _In_ UINT DstY, + /* [annotation] */ + _In_ UINT DstZ, + /* [annotation] */ + _In_ ID3D10Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_opt_ const D3D10_BOX *pSrcBox); + + void ( STDMETHODCALLTYPE *CopyResource )( + ID3D10Device * This, + /* [annotation] */ + _In_ ID3D10Resource *pDstResource, + /* [annotation] */ + _In_ ID3D10Resource *pSrcResource); + + void ( STDMETHODCALLTYPE *UpdateSubresource )( + ID3D10Device * This, + /* [annotation] */ + _In_ ID3D10Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_opt_ const D3D10_BOX *pDstBox, + /* [annotation] */ + _In_ const void *pSrcData, + /* [annotation] */ + _In_ UINT SrcRowPitch, + /* [annotation] */ + _In_ UINT SrcDepthPitch); + + void ( STDMETHODCALLTYPE *ClearRenderTargetView )( + ID3D10Device * This, + /* [annotation] */ + _In_ ID3D10RenderTargetView *pRenderTargetView, + /* [annotation] */ + _In_ const FLOAT ColorRGBA[ 4 ]); + + void ( STDMETHODCALLTYPE *ClearDepthStencilView )( + ID3D10Device * This, + /* [annotation] */ + _In_ ID3D10DepthStencilView *pDepthStencilView, + /* [annotation] */ + _In_ UINT ClearFlags, + /* [annotation] */ + _In_ FLOAT Depth, + /* [annotation] */ + _In_ UINT8 Stencil); + + void ( STDMETHODCALLTYPE *GenerateMips )( + ID3D10Device * This, + /* [annotation] */ + _In_ ID3D10ShaderResourceView *pShaderResourceView); + + void ( STDMETHODCALLTYPE *ResolveSubresource )( + ID3D10Device * This, + /* [annotation] */ + _In_ ID3D10Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ ID3D10Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_ DXGI_FORMAT Format); + + void ( STDMETHODCALLTYPE *VSGetConstantBuffers )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D10Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *PSGetShaderResources )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D10ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *PSGetShader )( + ID3D10Device * This, + /* [annotation] */ + _Out_ ID3D10PixelShader **ppPixelShader); + + void ( STDMETHODCALLTYPE *PSGetSamplers )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D10SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *VSGetShader )( + ID3D10Device * This, + /* [annotation] */ + _Out_ ID3D10VertexShader **ppVertexShader); + + void ( STDMETHODCALLTYPE *PSGetConstantBuffers )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D10Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *IAGetInputLayout )( + ID3D10Device * This, + /* [annotation] */ + _Out_ ID3D10InputLayout **ppInputLayout); + + void ( STDMETHODCALLTYPE *IAGetVertexBuffers )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_1_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_1_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D10Buffer **ppVertexBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pStrides, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pOffsets); + + void ( STDMETHODCALLTYPE *IAGetIndexBuffer )( + ID3D10Device * This, + /* [annotation] */ + _Out_opt_ ID3D10Buffer **pIndexBuffer, + /* [annotation] */ + _Out_opt_ DXGI_FORMAT *Format, + /* [annotation] */ + _Out_opt_ UINT *Offset); + + void ( STDMETHODCALLTYPE *GSGetConstantBuffers )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D10Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *GSGetShader )( + ID3D10Device * This, + /* [annotation] */ + _Out_ ID3D10GeometryShader **ppGeometryShader); + + void ( STDMETHODCALLTYPE *IAGetPrimitiveTopology )( + ID3D10Device * This, + /* [annotation] */ + _Out_ D3D10_PRIMITIVE_TOPOLOGY *pTopology); + + void ( STDMETHODCALLTYPE *VSGetShaderResources )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D10ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *VSGetSamplers )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D10SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *GetPredication )( + ID3D10Device * This, + /* [annotation] */ + _Out_opt_ ID3D10Predicate **ppPredicate, + /* [annotation] */ + _Out_opt_ BOOL *pPredicateValue); + + void ( STDMETHODCALLTYPE *GSGetShaderResources )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D10ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *GSGetSamplers )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D10SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *OMGetRenderTargets )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D10RenderTargetView **ppRenderTargetViews, + /* [annotation] */ + _Out_opt_ ID3D10DepthStencilView **ppDepthStencilView); + + void ( STDMETHODCALLTYPE *OMGetBlendState )( + ID3D10Device * This, + /* [annotation] */ + _Out_opt_ ID3D10BlendState **ppBlendState, + /* [annotation] */ + _Out_opt_ FLOAT BlendFactor[ 4 ], + /* [annotation] */ + _Out_opt_ UINT *pSampleMask); + + void ( STDMETHODCALLTYPE *OMGetDepthStencilState )( + ID3D10Device * This, + /* [annotation] */ + _Out_opt_ ID3D10DepthStencilState **ppDepthStencilState, + /* [annotation] */ + _Out_opt_ UINT *pStencilRef); + + void ( STDMETHODCALLTYPE *SOGetTargets )( + ID3D10Device * This, + /* [annotation] */ + _In_range_( 0, D3D10_SO_BUFFER_SLOT_COUNT ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D10Buffer **ppSOTargets, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pOffsets); + + void ( STDMETHODCALLTYPE *RSGetState )( + ID3D10Device * This, + /* [annotation] */ + _Out_ ID3D10RasterizerState **ppRasterizerState); + + void ( STDMETHODCALLTYPE *RSGetViewports )( + ID3D10Device * This, + /* [annotation] */ + _Inout_ /*_range(0, D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE )*/ UINT *NumViewports, + /* [annotation] */ + _Out_writes_opt_(*NumViewports) D3D10_VIEWPORT *pViewports); + + void ( STDMETHODCALLTYPE *RSGetScissorRects )( + ID3D10Device * This, + /* [annotation] */ + _Inout_ /*_range(0, D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE )*/ UINT *NumRects, + /* [annotation] */ + _Out_writes_opt_(*NumRects) D3D10_RECT *pRects); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceRemovedReason )( + ID3D10Device * This); + + HRESULT ( STDMETHODCALLTYPE *SetExceptionMode )( + ID3D10Device * This, + UINT RaiseFlags); + + UINT ( STDMETHODCALLTYPE *GetExceptionMode )( + ID3D10Device * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10Device * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10Device * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10Device * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *ClearState )( + ID3D10Device * This); + + void ( STDMETHODCALLTYPE *Flush )( + ID3D10Device * This); + + HRESULT ( STDMETHODCALLTYPE *CreateBuffer )( + ID3D10Device * This, + /* [annotation] */ + _In_ const D3D10_BUFFER_DESC *pDesc, + /* [annotation] */ + _In_opt_ const D3D10_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _Out_opt_ ID3D10Buffer **ppBuffer); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture1D )( + ID3D10Device * This, + /* [annotation] */ + _In_ const D3D10_TEXTURE1D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels * pDesc->ArraySize)) const D3D10_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _Out_ ID3D10Texture1D **ppTexture1D); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture2D )( + ID3D10Device * This, + /* [annotation] */ + _In_ const D3D10_TEXTURE2D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels * pDesc->ArraySize)) const D3D10_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _Out_ ID3D10Texture2D **ppTexture2D); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture3D )( + ID3D10Device * This, + /* [annotation] */ + _In_ const D3D10_TEXTURE3D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels)) const D3D10_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _Out_ ID3D10Texture3D **ppTexture3D); + + HRESULT ( STDMETHODCALLTYPE *CreateShaderResourceView )( + ID3D10Device * This, + /* [annotation] */ + _In_ ID3D10Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D10_SHADER_RESOURCE_VIEW_DESC *pDesc, + /* [annotation] */ + _Out_opt_ ID3D10ShaderResourceView **ppSRView); + + HRESULT ( STDMETHODCALLTYPE *CreateRenderTargetView )( + ID3D10Device * This, + /* [annotation] */ + _In_ ID3D10Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D10_RENDER_TARGET_VIEW_DESC *pDesc, + /* [annotation] */ + _Out_opt_ ID3D10RenderTargetView **ppRTView); + + HRESULT ( STDMETHODCALLTYPE *CreateDepthStencilView )( + ID3D10Device * This, + /* [annotation] */ + _In_ ID3D10Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D10_DEPTH_STENCIL_VIEW_DESC *pDesc, + /* [annotation] */ + _Out_opt_ ID3D10DepthStencilView **ppDepthStencilView); + + HRESULT ( STDMETHODCALLTYPE *CreateInputLayout )( + ID3D10Device * This, + /* [annotation] */ + _In_reads_(NumElements) const D3D10_INPUT_ELEMENT_DESC *pInputElementDescs, + /* [annotation] */ + _In_range_( 0, D3D10_1_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT ) UINT NumElements, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecodeWithInputSignature, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _Out_opt_ ID3D10InputLayout **ppInputLayout); + + HRESULT ( STDMETHODCALLTYPE *CreateVertexShader )( + ID3D10Device * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _Out_opt_ ID3D10VertexShader **ppVertexShader); + + HRESULT ( STDMETHODCALLTYPE *CreateGeometryShader )( + ID3D10Device * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _Out_opt_ ID3D10GeometryShader **ppGeometryShader); + + HRESULT ( STDMETHODCALLTYPE *CreateGeometryShaderWithStreamOutput )( + ID3D10Device * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_reads_opt_(NumEntries) const D3D10_SO_DECLARATION_ENTRY *pSODeclaration, + /* [annotation] */ + _In_range_( 0, D3D10_SO_SINGLE_BUFFER_COMPONENT_LIMIT ) UINT NumEntries, + /* [annotation] */ + _In_ UINT OutputStreamStride, + /* [annotation] */ + _Out_opt_ ID3D10GeometryShader **ppGeometryShader); + + HRESULT ( STDMETHODCALLTYPE *CreatePixelShader )( + ID3D10Device * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _Out_opt_ ID3D10PixelShader **ppPixelShader); + + HRESULT ( STDMETHODCALLTYPE *CreateBlendState )( + ID3D10Device * This, + /* [annotation] */ + _In_ const D3D10_BLEND_DESC *pBlendStateDesc, + /* [annotation] */ + _Out_opt_ ID3D10BlendState **ppBlendState); + + HRESULT ( STDMETHODCALLTYPE *CreateDepthStencilState )( + ID3D10Device * This, + /* [annotation] */ + _In_ const D3D10_DEPTH_STENCIL_DESC *pDepthStencilDesc, + /* [annotation] */ + _Out_opt_ ID3D10DepthStencilState **ppDepthStencilState); + + HRESULT ( STDMETHODCALLTYPE *CreateRasterizerState )( + ID3D10Device * This, + /* [annotation] */ + _In_ const D3D10_RASTERIZER_DESC *pRasterizerDesc, + /* [annotation] */ + _Out_opt_ ID3D10RasterizerState **ppRasterizerState); + + HRESULT ( STDMETHODCALLTYPE *CreateSamplerState )( + ID3D10Device * This, + /* [annotation] */ + _In_ const D3D10_SAMPLER_DESC *pSamplerDesc, + /* [annotation] */ + _Out_opt_ ID3D10SamplerState **ppSamplerState); + + HRESULT ( STDMETHODCALLTYPE *CreateQuery )( + ID3D10Device * This, + /* [annotation] */ + _In_ const D3D10_QUERY_DESC *pQueryDesc, + /* [annotation] */ + _Out_opt_ ID3D10Query **ppQuery); + + HRESULT ( STDMETHODCALLTYPE *CreatePredicate )( + ID3D10Device * This, + /* [annotation] */ + _In_ const D3D10_QUERY_DESC *pPredicateDesc, + /* [annotation] */ + _Out_opt_ ID3D10Predicate **ppPredicate); + + HRESULT ( STDMETHODCALLTYPE *CreateCounter )( + ID3D10Device * This, + /* [annotation] */ + _In_ const D3D10_COUNTER_DESC *pCounterDesc, + /* [annotation] */ + _Out_opt_ ID3D10Counter **ppCounter); + + HRESULT ( STDMETHODCALLTYPE *CheckFormatSupport )( + ID3D10Device * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _Out_ UINT *pFormatSupport); + + HRESULT ( STDMETHODCALLTYPE *CheckMultisampleQualityLevels )( + ID3D10Device * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT SampleCount, + /* [annotation] */ + _Out_ UINT *pNumQualityLevels); + + void ( STDMETHODCALLTYPE *CheckCounterInfo )( + ID3D10Device * This, + /* [annotation] */ + _Out_ D3D10_COUNTER_INFO *pCounterInfo); + + HRESULT ( STDMETHODCALLTYPE *CheckCounter )( + ID3D10Device * This, + /* [annotation] */ + _In_ const D3D10_COUNTER_DESC *pDesc, + /* [annotation] */ + _Out_ D3D10_COUNTER_TYPE *pType, + /* [annotation] */ + _Out_ UINT *pActiveCounters, + /* [annotation] */ + _Out_writes_opt_(*pNameLength) LPSTR szName, + /* [annotation] */ + _Inout_opt_ UINT *pNameLength, + /* [annotation] */ + _Out_writes_opt_(*pUnitsLength) LPSTR szUnits, + /* [annotation] */ + _Inout_opt_ UINT *pUnitsLength, + /* [annotation] */ + _Out_writes_opt_(*pDescriptionLength) LPSTR szDescription, + /* [annotation] */ + _Inout_opt_ UINT *pDescriptionLength); + + UINT ( STDMETHODCALLTYPE *GetCreationFlags )( + ID3D10Device * This); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedResource )( + ID3D10Device * This, + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _In_ REFIID ReturnedInterface, + /* [annotation] */ + _Out_opt_ void **ppResource); + + void ( STDMETHODCALLTYPE *SetTextFilterSize )( + ID3D10Device * This, + /* [annotation] */ + _In_ UINT Width, + /* [annotation] */ + _In_ UINT Height); + + void ( STDMETHODCALLTYPE *GetTextFilterSize )( + ID3D10Device * This, + /* [annotation] */ + _Out_opt_ UINT *pWidth, + /* [annotation] */ + _Out_opt_ UINT *pHeight); + + END_INTERFACE + } ID3D10DeviceVtbl; + + interface ID3D10Device + { + CONST_VTBL struct ID3D10DeviceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10Device_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10Device_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10Device_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10Device_VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D10Device_PSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> PSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D10Device_PSSetShader(This,pPixelShader) \ + ( (This)->lpVtbl -> PSSetShader(This,pPixelShader) ) + +#define ID3D10Device_PSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> PSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D10Device_VSSetShader(This,pVertexShader) \ + ( (This)->lpVtbl -> VSSetShader(This,pVertexShader) ) + +#define ID3D10Device_DrawIndexed(This,IndexCount,StartIndexLocation,BaseVertexLocation) \ + ( (This)->lpVtbl -> DrawIndexed(This,IndexCount,StartIndexLocation,BaseVertexLocation) ) + +#define ID3D10Device_Draw(This,VertexCount,StartVertexLocation) \ + ( (This)->lpVtbl -> Draw(This,VertexCount,StartVertexLocation) ) + +#define ID3D10Device_PSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> PSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D10Device_IASetInputLayout(This,pInputLayout) \ + ( (This)->lpVtbl -> IASetInputLayout(This,pInputLayout) ) + +#define ID3D10Device_IASetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) \ + ( (This)->lpVtbl -> IASetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) ) + +#define ID3D10Device_IASetIndexBuffer(This,pIndexBuffer,Format,Offset) \ + ( (This)->lpVtbl -> IASetIndexBuffer(This,pIndexBuffer,Format,Offset) ) + +#define ID3D10Device_DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) ) + +#define ID3D10Device_DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) ) + +#define ID3D10Device_GSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> GSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D10Device_GSSetShader(This,pShader) \ + ( (This)->lpVtbl -> GSSetShader(This,pShader) ) + +#define ID3D10Device_IASetPrimitiveTopology(This,Topology) \ + ( (This)->lpVtbl -> IASetPrimitiveTopology(This,Topology) ) + +#define ID3D10Device_VSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> VSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D10Device_VSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> VSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D10Device_SetPredication(This,pPredicate,PredicateValue) \ + ( (This)->lpVtbl -> SetPredication(This,pPredicate,PredicateValue) ) + +#define ID3D10Device_GSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> GSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D10Device_GSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> GSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D10Device_OMSetRenderTargets(This,NumViews,ppRenderTargetViews,pDepthStencilView) \ + ( (This)->lpVtbl -> OMSetRenderTargets(This,NumViews,ppRenderTargetViews,pDepthStencilView) ) + +#define ID3D10Device_OMSetBlendState(This,pBlendState,BlendFactor,SampleMask) \ + ( (This)->lpVtbl -> OMSetBlendState(This,pBlendState,BlendFactor,SampleMask) ) + +#define ID3D10Device_OMSetDepthStencilState(This,pDepthStencilState,StencilRef) \ + ( (This)->lpVtbl -> OMSetDepthStencilState(This,pDepthStencilState,StencilRef) ) + +#define ID3D10Device_SOSetTargets(This,NumBuffers,ppSOTargets,pOffsets) \ + ( (This)->lpVtbl -> SOSetTargets(This,NumBuffers,ppSOTargets,pOffsets) ) + +#define ID3D10Device_DrawAuto(This) \ + ( (This)->lpVtbl -> DrawAuto(This) ) + +#define ID3D10Device_RSSetState(This,pRasterizerState) \ + ( (This)->lpVtbl -> RSSetState(This,pRasterizerState) ) + +#define ID3D10Device_RSSetViewports(This,NumViewports,pViewports) \ + ( (This)->lpVtbl -> RSSetViewports(This,NumViewports,pViewports) ) + +#define ID3D10Device_RSSetScissorRects(This,NumRects,pRects) \ + ( (This)->lpVtbl -> RSSetScissorRects(This,NumRects,pRects) ) + +#define ID3D10Device_CopySubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox) \ + ( (This)->lpVtbl -> CopySubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox) ) + +#define ID3D10Device_CopyResource(This,pDstResource,pSrcResource) \ + ( (This)->lpVtbl -> CopyResource(This,pDstResource,pSrcResource) ) + +#define ID3D10Device_UpdateSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) \ + ( (This)->lpVtbl -> UpdateSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) ) + +#define ID3D10Device_ClearRenderTargetView(This,pRenderTargetView,ColorRGBA) \ + ( (This)->lpVtbl -> ClearRenderTargetView(This,pRenderTargetView,ColorRGBA) ) + +#define ID3D10Device_ClearDepthStencilView(This,pDepthStencilView,ClearFlags,Depth,Stencil) \ + ( (This)->lpVtbl -> ClearDepthStencilView(This,pDepthStencilView,ClearFlags,Depth,Stencil) ) + +#define ID3D10Device_GenerateMips(This,pShaderResourceView) \ + ( (This)->lpVtbl -> GenerateMips(This,pShaderResourceView) ) + +#define ID3D10Device_ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) \ + ( (This)->lpVtbl -> ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) ) + +#define ID3D10Device_VSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> VSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D10Device_PSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> PSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D10Device_PSGetShader(This,ppPixelShader) \ + ( (This)->lpVtbl -> PSGetShader(This,ppPixelShader) ) + +#define ID3D10Device_PSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> PSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D10Device_VSGetShader(This,ppVertexShader) \ + ( (This)->lpVtbl -> VSGetShader(This,ppVertexShader) ) + +#define ID3D10Device_PSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> PSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D10Device_IAGetInputLayout(This,ppInputLayout) \ + ( (This)->lpVtbl -> IAGetInputLayout(This,ppInputLayout) ) + +#define ID3D10Device_IAGetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) \ + ( (This)->lpVtbl -> IAGetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) ) + +#define ID3D10Device_IAGetIndexBuffer(This,pIndexBuffer,Format,Offset) \ + ( (This)->lpVtbl -> IAGetIndexBuffer(This,pIndexBuffer,Format,Offset) ) + +#define ID3D10Device_GSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> GSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D10Device_GSGetShader(This,ppGeometryShader) \ + ( (This)->lpVtbl -> GSGetShader(This,ppGeometryShader) ) + +#define ID3D10Device_IAGetPrimitiveTopology(This,pTopology) \ + ( (This)->lpVtbl -> IAGetPrimitiveTopology(This,pTopology) ) + +#define ID3D10Device_VSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> VSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D10Device_VSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> VSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D10Device_GetPredication(This,ppPredicate,pPredicateValue) \ + ( (This)->lpVtbl -> GetPredication(This,ppPredicate,pPredicateValue) ) + +#define ID3D10Device_GSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> GSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D10Device_GSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> GSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D10Device_OMGetRenderTargets(This,NumViews,ppRenderTargetViews,ppDepthStencilView) \ + ( (This)->lpVtbl -> OMGetRenderTargets(This,NumViews,ppRenderTargetViews,ppDepthStencilView) ) + +#define ID3D10Device_OMGetBlendState(This,ppBlendState,BlendFactor,pSampleMask) \ + ( (This)->lpVtbl -> OMGetBlendState(This,ppBlendState,BlendFactor,pSampleMask) ) + +#define ID3D10Device_OMGetDepthStencilState(This,ppDepthStencilState,pStencilRef) \ + ( (This)->lpVtbl -> OMGetDepthStencilState(This,ppDepthStencilState,pStencilRef) ) + +#define ID3D10Device_SOGetTargets(This,NumBuffers,ppSOTargets,pOffsets) \ + ( (This)->lpVtbl -> SOGetTargets(This,NumBuffers,ppSOTargets,pOffsets) ) + +#define ID3D10Device_RSGetState(This,ppRasterizerState) \ + ( (This)->lpVtbl -> RSGetState(This,ppRasterizerState) ) + +#define ID3D10Device_RSGetViewports(This,NumViewports,pViewports) \ + ( (This)->lpVtbl -> RSGetViewports(This,NumViewports,pViewports) ) + +#define ID3D10Device_RSGetScissorRects(This,NumRects,pRects) \ + ( (This)->lpVtbl -> RSGetScissorRects(This,NumRects,pRects) ) + +#define ID3D10Device_GetDeviceRemovedReason(This) \ + ( (This)->lpVtbl -> GetDeviceRemovedReason(This) ) + +#define ID3D10Device_SetExceptionMode(This,RaiseFlags) \ + ( (This)->lpVtbl -> SetExceptionMode(This,RaiseFlags) ) + +#define ID3D10Device_GetExceptionMode(This) \ + ( (This)->lpVtbl -> GetExceptionMode(This) ) + +#define ID3D10Device_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10Device_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10Device_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D10Device_ClearState(This) \ + ( (This)->lpVtbl -> ClearState(This) ) + +#define ID3D10Device_Flush(This) \ + ( (This)->lpVtbl -> Flush(This) ) + +#define ID3D10Device_CreateBuffer(This,pDesc,pInitialData,ppBuffer) \ + ( (This)->lpVtbl -> CreateBuffer(This,pDesc,pInitialData,ppBuffer) ) + +#define ID3D10Device_CreateTexture1D(This,pDesc,pInitialData,ppTexture1D) \ + ( (This)->lpVtbl -> CreateTexture1D(This,pDesc,pInitialData,ppTexture1D) ) + +#define ID3D10Device_CreateTexture2D(This,pDesc,pInitialData,ppTexture2D) \ + ( (This)->lpVtbl -> CreateTexture2D(This,pDesc,pInitialData,ppTexture2D) ) + +#define ID3D10Device_CreateTexture3D(This,pDesc,pInitialData,ppTexture3D) \ + ( (This)->lpVtbl -> CreateTexture3D(This,pDesc,pInitialData,ppTexture3D) ) + +#define ID3D10Device_CreateShaderResourceView(This,pResource,pDesc,ppSRView) \ + ( (This)->lpVtbl -> CreateShaderResourceView(This,pResource,pDesc,ppSRView) ) + +#define ID3D10Device_CreateRenderTargetView(This,pResource,pDesc,ppRTView) \ + ( (This)->lpVtbl -> CreateRenderTargetView(This,pResource,pDesc,ppRTView) ) + +#define ID3D10Device_CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView) \ + ( (This)->lpVtbl -> CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView) ) + +#define ID3D10Device_CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout) \ + ( (This)->lpVtbl -> CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout) ) + +#define ID3D10Device_CreateVertexShader(This,pShaderBytecode,BytecodeLength,ppVertexShader) \ + ( (This)->lpVtbl -> CreateVertexShader(This,pShaderBytecode,BytecodeLength,ppVertexShader) ) + +#define ID3D10Device_CreateGeometryShader(This,pShaderBytecode,BytecodeLength,ppGeometryShader) \ + ( (This)->lpVtbl -> CreateGeometryShader(This,pShaderBytecode,BytecodeLength,ppGeometryShader) ) + +#define ID3D10Device_CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,OutputStreamStride,ppGeometryShader) \ + ( (This)->lpVtbl -> CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,OutputStreamStride,ppGeometryShader) ) + +#define ID3D10Device_CreatePixelShader(This,pShaderBytecode,BytecodeLength,ppPixelShader) \ + ( (This)->lpVtbl -> CreatePixelShader(This,pShaderBytecode,BytecodeLength,ppPixelShader) ) + +#define ID3D10Device_CreateBlendState(This,pBlendStateDesc,ppBlendState) \ + ( (This)->lpVtbl -> CreateBlendState(This,pBlendStateDesc,ppBlendState) ) + +#define ID3D10Device_CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState) \ + ( (This)->lpVtbl -> CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState) ) + +#define ID3D10Device_CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState) \ + ( (This)->lpVtbl -> CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState) ) + +#define ID3D10Device_CreateSamplerState(This,pSamplerDesc,ppSamplerState) \ + ( (This)->lpVtbl -> CreateSamplerState(This,pSamplerDesc,ppSamplerState) ) + +#define ID3D10Device_CreateQuery(This,pQueryDesc,ppQuery) \ + ( (This)->lpVtbl -> CreateQuery(This,pQueryDesc,ppQuery) ) + +#define ID3D10Device_CreatePredicate(This,pPredicateDesc,ppPredicate) \ + ( (This)->lpVtbl -> CreatePredicate(This,pPredicateDesc,ppPredicate) ) + +#define ID3D10Device_CreateCounter(This,pCounterDesc,ppCounter) \ + ( (This)->lpVtbl -> CreateCounter(This,pCounterDesc,ppCounter) ) + +#define ID3D10Device_CheckFormatSupport(This,Format,pFormatSupport) \ + ( (This)->lpVtbl -> CheckFormatSupport(This,Format,pFormatSupport) ) + +#define ID3D10Device_CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels) \ + ( (This)->lpVtbl -> CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels) ) + +#define ID3D10Device_CheckCounterInfo(This,pCounterInfo) \ + ( (This)->lpVtbl -> CheckCounterInfo(This,pCounterInfo) ) + +#define ID3D10Device_CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength) \ + ( (This)->lpVtbl -> CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength) ) + +#define ID3D10Device_GetCreationFlags(This) \ + ( (This)->lpVtbl -> GetCreationFlags(This) ) + +#define ID3D10Device_OpenSharedResource(This,hResource,ReturnedInterface,ppResource) \ + ( (This)->lpVtbl -> OpenSharedResource(This,hResource,ReturnedInterface,ppResource) ) + +#define ID3D10Device_SetTextFilterSize(This,Width,Height) \ + ( (This)->lpVtbl -> SetTextFilterSize(This,Width,Height) ) + +#define ID3D10Device_GetTextFilterSize(This,pWidth,pHeight) \ + ( (This)->lpVtbl -> GetTextFilterSize(This,pWidth,pHeight) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10Device_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10_0000_0023 */ +/* [local] */ + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ +/*#pragma region Application Family*/ +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0023_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0023_v0_0_s_ifspec; + +#ifndef __ID3D10Multithread_INTERFACE_DEFINED__ +#define __ID3D10Multithread_INTERFACE_DEFINED__ + +/* interface ID3D10Multithread */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10Multithread; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4E00-342C-4106-A19F-4F2704F689F0") + ID3D10Multithread : public IUnknown + { + public: + virtual void STDMETHODCALLTYPE Enter( void) = 0; + + virtual void STDMETHODCALLTYPE Leave( void) = 0; + + virtual BOOL STDMETHODCALLTYPE SetMultithreadProtected( + /* [annotation] */ + _In_ BOOL bMTProtect) = 0; + + virtual BOOL STDMETHODCALLTYPE GetMultithreadProtected( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10MultithreadVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10Multithread * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10Multithread * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10Multithread * This); + + void ( STDMETHODCALLTYPE *Enter )( + ID3D10Multithread * This); + + void ( STDMETHODCALLTYPE *Leave )( + ID3D10Multithread * This); + + BOOL ( STDMETHODCALLTYPE *SetMultithreadProtected )( + ID3D10Multithread * This, + /* [annotation] */ + _In_ BOOL bMTProtect); + + BOOL ( STDMETHODCALLTYPE *GetMultithreadProtected )( + ID3D10Multithread * This); + + END_INTERFACE + } ID3D10MultithreadVtbl; + + interface ID3D10Multithread + { + CONST_VTBL struct ID3D10MultithreadVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10Multithread_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10Multithread_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10Multithread_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10Multithread_Enter(This) \ + ( (This)->lpVtbl -> Enter(This) ) + +#define ID3D10Multithread_Leave(This) \ + ( (This)->lpVtbl -> Leave(This) ) + +#define ID3D10Multithread_SetMultithreadProtected(This,bMTProtect) \ + ( (This)->lpVtbl -> SetMultithreadProtected(This,bMTProtect) ) + +#define ID3D10Multithread_GetMultithreadProtected(This) \ + ( (This)->lpVtbl -> GetMultithreadProtected(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10Multithread_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10_0000_0024 */ +/* [local] */ + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ +/*#pragma endregion*/ +/*#pragma region Desktop Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ +typedef +enum D3D10_CREATE_DEVICE_FLAG + { + D3D10_CREATE_DEVICE_SINGLETHREADED = 0x1, + D3D10_CREATE_DEVICE_DEBUG = 0x2, + D3D10_CREATE_DEVICE_SWITCH_TO_REF = 0x4, + D3D10_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS = 0x8, + D3D10_CREATE_DEVICE_ALLOW_NULL_FROM_MAP = 0x10, + D3D10_CREATE_DEVICE_BGRA_SUPPORT = 0x20, + D3D10_CREATE_DEVICE_PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRY = 0x80, + D3D10_CREATE_DEVICE_STRICT_VALIDATION = 0x200, + D3D10_CREATE_DEVICE_DEBUGGABLE = 0x400 + } D3D10_CREATE_DEVICE_FLAG; + + +#define D3D10_SDK_VERSION ( 29 ) + +#if !defined( D3D10_IGNORE_SDK_LAYERS ) +#include "d3d10sdklayers.h" +#endif +#include "d3d10misc.h" +#include "d3d10shader.h" +#include "d3d10effect.h" +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ +DEFINE_GUID(IID_ID3D10DeviceChild,0x9B7E4C00,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); +DEFINE_GUID(IID_ID3D10DepthStencilState,0x2B4B1CC8,0xA4AD,0x41f8,0x83,0x22,0xCA,0x86,0xFC,0x3E,0xC6,0x75); +DEFINE_GUID(IID_ID3D10BlendState,0xEDAD8D19,0x8A35,0x4d6d,0x85,0x66,0x2E,0xA2,0x76,0xCD,0xE1,0x61); +DEFINE_GUID(IID_ID3D10RasterizerState,0xA2A07292,0x89AF,0x4345,0xBE,0x2E,0xC5,0x3D,0x9F,0xBB,0x6E,0x9F); +DEFINE_GUID(IID_ID3D10Resource,0x9B7E4C01,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); +DEFINE_GUID(IID_ID3D10Buffer,0x9B7E4C02,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); +DEFINE_GUID(IID_ID3D10Texture1D,0x9B7E4C03,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); +DEFINE_GUID(IID_ID3D10Texture2D,0x9B7E4C04,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); +DEFINE_GUID(IID_ID3D10Texture3D,0x9B7E4C05,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); +DEFINE_GUID(IID_ID3D10View,0xC902B03F,0x60A7,0x49BA,0x99,0x36,0x2A,0x3A,0xB3,0x7A,0x7E,0x33); +DEFINE_GUID(IID_ID3D10ShaderResourceView,0x9B7E4C07,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); +DEFINE_GUID(IID_ID3D10RenderTargetView,0x9B7E4C08,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); +DEFINE_GUID(IID_ID3D10DepthStencilView,0x9B7E4C09,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); +DEFINE_GUID(IID_ID3D10VertexShader,0x9B7E4C0A,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); +DEFINE_GUID(IID_ID3D10GeometryShader,0x6316BE88,0x54CD,0x4040,0xAB,0x44,0x20,0x46,0x1B,0xC8,0x1F,0x68); +DEFINE_GUID(IID_ID3D10PixelShader,0x4968B601,0x9D00,0x4cde,0x83,0x46,0x8E,0x7F,0x67,0x58,0x19,0xB6); +DEFINE_GUID(IID_ID3D10InputLayout,0x9B7E4C0B,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); +DEFINE_GUID(IID_ID3D10SamplerState,0x9B7E4C0C,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); +DEFINE_GUID(IID_ID3D10Asynchronous,0x9B7E4C0D,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); +DEFINE_GUID(IID_ID3D10Query,0x9B7E4C0E,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); +DEFINE_GUID(IID_ID3D10Predicate,0x9B7E4C10,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); +DEFINE_GUID(IID_ID3D10Counter,0x9B7E4C11,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); +DEFINE_GUID(IID_ID3D10Device,0x9B7E4C0F,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); +DEFINE_GUID(IID_ID3D10Multithread,0x9B7E4E00,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0024_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0024_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/d3d10_1.h b/gfx/include/dxsdk/d3d10_1.h new file mode 100644 index 0000000000..cf959831c2 --- /dev/null +++ b/gfx/include/dxsdk/d3d10_1.h @@ -0,0 +1,1793 @@ +/*------------------------------------------------------------------------------------- + * + * Copyright (c) Microsoft Corporation + * + *-------------------------------------------------------------------------------------*/ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ +/* @@MIDL_FILE_HEADING( ) */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __d3d10_1_h__ +#define __d3d10_1_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __ID3D10BlendState1_FWD_DEFINED__ +#define __ID3D10BlendState1_FWD_DEFINED__ +typedef interface ID3D10BlendState1 ID3D10BlendState1; + +#endif /* __ID3D10BlendState1_FWD_DEFINED__ */ + + +#ifndef __ID3D10ShaderResourceView1_FWD_DEFINED__ +#define __ID3D10ShaderResourceView1_FWD_DEFINED__ +typedef interface ID3D10ShaderResourceView1 ID3D10ShaderResourceView1; + +#endif /* __ID3D10ShaderResourceView1_FWD_DEFINED__ */ + + +#ifndef __ID3D10Device1_FWD_DEFINED__ +#define __ID3D10Device1_FWD_DEFINED__ +typedef interface ID3D10Device1 ID3D10Device1; + +#endif /* __ID3D10Device1_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_d3d10_1_0000_0000 */ +/* [local] */ + +#if defined( __d3d10_h__ ) && !defined( D3D10_ARBITRARY_HEADER_ORDERING ) +#error d3d10.h is included before d3d10_1.h, and it will confuse tools that honor SAL annotations. \ +If possibly targeting d3d10.1, include d3d10_1.h instead of d3d10.h, or ensure d3d10_1.h is included before d3d10.h +#endif +#ifndef _D3D10_1_CONSTANTS +#define _D3D10_1_CONSTANTS +#define D3D10_1_DEFAULT_SAMPLE_MASK ( 0xffffffff ) + +#define D3D10_1_FLOAT16_FUSED_TOLERANCE_IN_ULP ( 0.6 ) +#define D3D10_1_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP ( 0.6f ) +#define D3D10_1_GS_INPUT_REGISTER_COUNT ( 32 ) + +#define D3D10_1_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT ( 32 ) + +#define D3D10_1_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS ( 128 ) + +#define D3D10_1_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT ( 32 ) + +#define D3D10_1_PS_OUTPUT_MASK_REGISTER_COMPONENTS ( 1 ) + +#define D3D10_1_PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D10_1_PS_OUTPUT_MASK_REGISTER_COUNT ( 1 ) + +#define D3D10_1_SHADER_MAJOR_VERSION ( 4 ) + +#define D3D10_1_SHADER_MINOR_VERSION ( 1 ) + +#define D3D10_1_SO_BUFFER_MAX_STRIDE_IN_BYTES ( 2048 ) + +#define D3D10_1_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES ( 256 ) + +#define D3D10_1_SO_BUFFER_SLOT_COUNT ( 4 ) + +#define D3D10_1_SO_MULTIPLE_BUFFER_ELEMENTS_PER_BUFFER ( 1 ) + +#define D3D10_1_SO_SINGLE_BUFFER_COMPONENT_LIMIT ( 64 ) + +#define D3D10_1_STANDARD_VERTEX_ELEMENT_COUNT ( 32 ) + +#define D3D10_1_SUBPIXEL_FRACTIONAL_BIT_COUNT ( 8 ) + +#define D3D10_1_VS_INPUT_REGISTER_COUNT ( 32 ) + +#define D3D10_1_VS_OUTPUT_REGISTER_COUNT ( 32 ) + +#endif +/*#include */ +#include "d3d10.h" // +/*#pragma region Desktop Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ + +typedef +enum D3D10_FEATURE_LEVEL1 + { + D3D10_FEATURE_LEVEL_10_0 = 0xa000, + D3D10_FEATURE_LEVEL_10_1 = 0xa100, + D3D10_FEATURE_LEVEL_9_1 = 0x9100, + D3D10_FEATURE_LEVEL_9_2 = 0x9200, + D3D10_FEATURE_LEVEL_9_3 = 0x9300 + } D3D10_FEATURE_LEVEL1; + +typedef struct D3D10_RENDER_TARGET_BLEND_DESC1 + { + BOOL BlendEnable; + D3D10_BLEND SrcBlend; + D3D10_BLEND DestBlend; + D3D10_BLEND_OP BlendOp; + D3D10_BLEND SrcBlendAlpha; + D3D10_BLEND DestBlendAlpha; + D3D10_BLEND_OP BlendOpAlpha; + UINT8 RenderTargetWriteMask; + } D3D10_RENDER_TARGET_BLEND_DESC1; + +typedef struct D3D10_BLEND_DESC1 + { + BOOL AlphaToCoverageEnable; + BOOL IndependentBlendEnable; + D3D10_RENDER_TARGET_BLEND_DESC1 RenderTarget[ 8 ]; + } D3D10_BLEND_DESC1; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_1_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_1_0000_0000_v0_0_s_ifspec; + +#ifndef __ID3D10BlendState1_INTERFACE_DEFINED__ +#define __ID3D10BlendState1_INTERFACE_DEFINED__ + +/* interface ID3D10BlendState1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10BlendState1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("EDAD8D99-8A35-4d6d-8566-2EA276CDE161") + ID3D10BlendState1 : public ID3D10BlendState + { + public: + virtual void STDMETHODCALLTYPE GetDesc1( + /* [annotation] */ + _Out_ D3D10_BLEND_DESC1 *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10BlendState1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10BlendState1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10BlendState1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10BlendState1 * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10BlendState1 * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10BlendState1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10BlendState1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10BlendState1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D10BlendState1 * This, + /* [annotation] */ + _Out_ D3D10_BLEND_DESC *pDesc); + + void ( STDMETHODCALLTYPE *GetDesc1 )( + ID3D10BlendState1 * This, + /* [annotation] */ + _Out_ D3D10_BLEND_DESC1 *pDesc); + + END_INTERFACE + } ID3D10BlendState1Vtbl; + + interface ID3D10BlendState1 + { + CONST_VTBL struct ID3D10BlendState1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10BlendState1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10BlendState1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10BlendState1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10BlendState1_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10BlendState1_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10BlendState1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10BlendState1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D10BlendState1_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + + +#define ID3D10BlendState1_GetDesc1(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10BlendState1_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10_1_0000_0001 */ +/* [local] */ + +typedef struct D3D10_TEXCUBE_ARRAY_SRV1 + { + UINT MostDetailedMip; + UINT MipLevels; + UINT First2DArrayFace; + UINT NumCubes; + } D3D10_TEXCUBE_ARRAY_SRV1; + +typedef D3D_SRV_DIMENSION D3D10_SRV_DIMENSION1; + +typedef struct D3D10_SHADER_RESOURCE_VIEW_DESC1 + { + DXGI_FORMAT Format; + D3D10_SRV_DIMENSION1 ViewDimension; + union + { + D3D10_BUFFER_SRV Buffer; + D3D10_TEX1D_SRV Texture1D; + D3D10_TEX1D_ARRAY_SRV Texture1DArray; + D3D10_TEX2D_SRV Texture2D; + D3D10_TEX2D_ARRAY_SRV Texture2DArray; + D3D10_TEX2DMS_SRV Texture2DMS; + D3D10_TEX2DMS_ARRAY_SRV Texture2DMSArray; + D3D10_TEX3D_SRV Texture3D; + D3D10_TEXCUBE_SRV TextureCube; + D3D10_TEXCUBE_ARRAY_SRV1 TextureCubeArray; + } ; + } D3D10_SHADER_RESOURCE_VIEW_DESC1; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_1_0000_0001_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_1_0000_0001_v0_0_s_ifspec; + +#ifndef __ID3D10ShaderResourceView1_INTERFACE_DEFINED__ +#define __ID3D10ShaderResourceView1_INTERFACE_DEFINED__ + +/* interface ID3D10ShaderResourceView1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10ShaderResourceView1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4C87-342C-4106-A19F-4F2704F689F0") + ID3D10ShaderResourceView1 : public ID3D10ShaderResourceView + { + public: + virtual void STDMETHODCALLTYPE GetDesc1( + /* [annotation] */ + _Out_ D3D10_SHADER_RESOURCE_VIEW_DESC1 *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10ShaderResourceView1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10ShaderResourceView1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10ShaderResourceView1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10ShaderResourceView1 * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D10ShaderResourceView1 * This, + /* [annotation] */ + _Out_ ID3D10Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10ShaderResourceView1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10ShaderResourceView1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10ShaderResourceView1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetResource )( + ID3D10ShaderResourceView1 * This, + /* [annotation] */ + _Out_ ID3D10Resource **ppResource); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D10ShaderResourceView1 * This, + /* [annotation] */ + _Out_ D3D10_SHADER_RESOURCE_VIEW_DESC *pDesc); + + void ( STDMETHODCALLTYPE *GetDesc1 )( + ID3D10ShaderResourceView1 * This, + /* [annotation] */ + _Out_ D3D10_SHADER_RESOURCE_VIEW_DESC1 *pDesc); + + END_INTERFACE + } ID3D10ShaderResourceView1Vtbl; + + interface ID3D10ShaderResourceView1 + { + CONST_VTBL struct ID3D10ShaderResourceView1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10ShaderResourceView1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10ShaderResourceView1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10ShaderResourceView1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10ShaderResourceView1_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D10ShaderResourceView1_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10ShaderResourceView1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10ShaderResourceView1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D10ShaderResourceView1_GetResource(This,ppResource) \ + ( (This)->lpVtbl -> GetResource(This,ppResource) ) + + +#define ID3D10ShaderResourceView1_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + + +#define ID3D10ShaderResourceView1_GetDesc1(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10ShaderResourceView1_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10_1_0000_0002 */ +/* [local] */ + +typedef +enum D3D10_STANDARD_MULTISAMPLE_QUALITY_LEVELS + { + D3D10_STANDARD_MULTISAMPLE_PATTERN = 0xffffffff, + D3D10_CENTER_MULTISAMPLE_PATTERN = 0xfffffffe + } D3D10_STANDARD_MULTISAMPLE_QUALITY_LEVELS; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_1_0000_0002_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_1_0000_0002_v0_0_s_ifspec; + +#ifndef __ID3D10Device1_INTERFACE_DEFINED__ +#define __ID3D10Device1_INTERFACE_DEFINED__ + +/* interface ID3D10Device1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10Device1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4C8F-342C-4106-A19F-4F2704F689F0") + ID3D10Device1 : public ID3D10Device + { + public: + virtual HRESULT STDMETHODCALLTYPE CreateShaderResourceView1( + /* [annotation] */ + _In_ ID3D10Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D10_SHADER_RESOURCE_VIEW_DESC1 *pDesc, + /* [annotation] */ + _Out_opt_ ID3D10ShaderResourceView1 **ppSRView) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateBlendState1( + /* [annotation] */ + _In_ const D3D10_BLEND_DESC1 *pBlendStateDesc, + /* [annotation] */ + _Out_opt_ ID3D10BlendState1 **ppBlendState) = 0; + + virtual D3D10_FEATURE_LEVEL1 STDMETHODCALLTYPE GetFeatureLevel( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10Device1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10Device1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10Device1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10Device1 * This); + + void ( STDMETHODCALLTYPE *VSSetConstantBuffers )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D10Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *PSSetShaderResources )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D10ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *PSSetShader )( + ID3D10Device1 * This, + /* [annotation] */ + _In_opt_ ID3D10PixelShader *pPixelShader); + + void ( STDMETHODCALLTYPE *PSSetSamplers )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D10SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *VSSetShader )( + ID3D10Device1 * This, + /* [annotation] */ + _In_opt_ ID3D10VertexShader *pVertexShader); + + void ( STDMETHODCALLTYPE *DrawIndexed )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ UINT IndexCount, + /* [annotation] */ + _In_ UINT StartIndexLocation, + /* [annotation] */ + _In_ INT BaseVertexLocation); + + void ( STDMETHODCALLTYPE *Draw )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ UINT VertexCount, + /* [annotation] */ + _In_ UINT StartVertexLocation); + + void ( STDMETHODCALLTYPE *PSSetConstantBuffers )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D10Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *IASetInputLayout )( + ID3D10Device1 * This, + /* [annotation] */ + _In_opt_ ID3D10InputLayout *pInputLayout); + + void ( STDMETHODCALLTYPE *IASetVertexBuffers )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_1_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_1_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D10Buffer *const *ppVertexBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pStrides, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pOffsets); + + void ( STDMETHODCALLTYPE *IASetIndexBuffer )( + ID3D10Device1 * This, + /* [annotation] */ + _In_opt_ ID3D10Buffer *pIndexBuffer, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT Offset); + + void ( STDMETHODCALLTYPE *DrawIndexedInstanced )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ UINT IndexCountPerInstance, + /* [annotation] */ + _In_ UINT InstanceCount, + /* [annotation] */ + _In_ UINT StartIndexLocation, + /* [annotation] */ + _In_ INT BaseVertexLocation, + /* [annotation] */ + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *DrawInstanced )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ UINT VertexCountPerInstance, + /* [annotation] */ + _In_ UINT InstanceCount, + /* [annotation] */ + _In_ UINT StartVertexLocation, + /* [annotation] */ + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *GSSetConstantBuffers )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D10Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *GSSetShader )( + ID3D10Device1 * This, + /* [annotation] */ + _In_opt_ ID3D10GeometryShader *pShader); + + void ( STDMETHODCALLTYPE *IASetPrimitiveTopology )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ D3D10_PRIMITIVE_TOPOLOGY Topology); + + void ( STDMETHODCALLTYPE *VSSetShaderResources )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D10ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *VSSetSamplers )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D10SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *SetPredication )( + ID3D10Device1 * This, + /* [annotation] */ + _In_opt_ ID3D10Predicate *pPredicate, + /* [annotation] */ + _In_ BOOL PredicateValue); + + void ( STDMETHODCALLTYPE *GSSetShaderResources )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D10ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *GSSetSamplers )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D10SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *OMSetRenderTargets )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D10RenderTargetView *const *ppRenderTargetViews, + /* [annotation] */ + _In_opt_ ID3D10DepthStencilView *pDepthStencilView); + + void ( STDMETHODCALLTYPE *OMSetBlendState )( + ID3D10Device1 * This, + /* [annotation] */ + _In_opt_ ID3D10BlendState *pBlendState, + /* [annotation] */ + _In_ const FLOAT BlendFactor[ 4 ], + /* [annotation] */ + _In_ UINT SampleMask); + + void ( STDMETHODCALLTYPE *OMSetDepthStencilState )( + ID3D10Device1 * This, + /* [annotation] */ + _In_opt_ ID3D10DepthStencilState *pDepthStencilState, + /* [annotation] */ + _In_ UINT StencilRef); + + void ( STDMETHODCALLTYPE *SOSetTargets )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_SO_BUFFER_SLOT_COUNT) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D10Buffer *const *ppSOTargets, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pOffsets); + + void ( STDMETHODCALLTYPE *DrawAuto )( + ID3D10Device1 * This); + + void ( STDMETHODCALLTYPE *RSSetState )( + ID3D10Device1 * This, + /* [annotation] */ + _In_opt_ ID3D10RasterizerState *pRasterizerState); + + void ( STDMETHODCALLTYPE *RSSetViewports )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_(0, D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumViewports, + /* [annotation] */ + _In_reads_opt_(NumViewports) const D3D10_VIEWPORT *pViewports); + + void ( STDMETHODCALLTYPE *RSSetScissorRects )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_(0, D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumRects, + /* [annotation] */ + _In_reads_opt_(NumRects) const D3D10_RECT *pRects); + + void ( STDMETHODCALLTYPE *CopySubresourceRegion )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ ID3D10Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ UINT DstX, + /* [annotation] */ + _In_ UINT DstY, + /* [annotation] */ + _In_ UINT DstZ, + /* [annotation] */ + _In_ ID3D10Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_opt_ const D3D10_BOX *pSrcBox); + + void ( STDMETHODCALLTYPE *CopyResource )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ ID3D10Resource *pDstResource, + /* [annotation] */ + _In_ ID3D10Resource *pSrcResource); + + void ( STDMETHODCALLTYPE *UpdateSubresource )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ ID3D10Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_opt_ const D3D10_BOX *pDstBox, + /* [annotation] */ + _In_ const void *pSrcData, + /* [annotation] */ + _In_ UINT SrcRowPitch, + /* [annotation] */ + _In_ UINT SrcDepthPitch); + + void ( STDMETHODCALLTYPE *ClearRenderTargetView )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ ID3D10RenderTargetView *pRenderTargetView, + /* [annotation] */ + _In_ const FLOAT ColorRGBA[ 4 ]); + + void ( STDMETHODCALLTYPE *ClearDepthStencilView )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ ID3D10DepthStencilView *pDepthStencilView, + /* [annotation] */ + _In_ UINT ClearFlags, + /* [annotation] */ + _In_ FLOAT Depth, + /* [annotation] */ + _In_ UINT8 Stencil); + + void ( STDMETHODCALLTYPE *GenerateMips )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ ID3D10ShaderResourceView *pShaderResourceView); + + void ( STDMETHODCALLTYPE *ResolveSubresource )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ ID3D10Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ ID3D10Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_ DXGI_FORMAT Format); + + void ( STDMETHODCALLTYPE *VSGetConstantBuffers )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D10Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *PSGetShaderResources )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D10ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *PSGetShader )( + ID3D10Device1 * This, + /* [annotation] */ + _Out_ ID3D10PixelShader **ppPixelShader); + + void ( STDMETHODCALLTYPE *PSGetSamplers )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D10SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *VSGetShader )( + ID3D10Device1 * This, + /* [annotation] */ + _Out_ ID3D10VertexShader **ppVertexShader); + + void ( STDMETHODCALLTYPE *PSGetConstantBuffers )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D10Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *IAGetInputLayout )( + ID3D10Device1 * This, + /* [annotation] */ + _Out_ ID3D10InputLayout **ppInputLayout); + + void ( STDMETHODCALLTYPE *IAGetVertexBuffers )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_1_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_1_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D10Buffer **ppVertexBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pStrides, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pOffsets); + + void ( STDMETHODCALLTYPE *IAGetIndexBuffer )( + ID3D10Device1 * This, + /* [annotation] */ + _Out_opt_ ID3D10Buffer **pIndexBuffer, + /* [annotation] */ + _Out_opt_ DXGI_FORMAT *Format, + /* [annotation] */ + _Out_opt_ UINT *Offset); + + void ( STDMETHODCALLTYPE *GSGetConstantBuffers )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D10Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *GSGetShader )( + ID3D10Device1 * This, + /* [annotation] */ + _Out_ ID3D10GeometryShader **ppGeometryShader); + + void ( STDMETHODCALLTYPE *IAGetPrimitiveTopology )( + ID3D10Device1 * This, + /* [annotation] */ + _Out_ D3D10_PRIMITIVE_TOPOLOGY *pTopology); + + void ( STDMETHODCALLTYPE *VSGetShaderResources )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D10ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *VSGetSamplers )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D10SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *GetPredication )( + ID3D10Device1 * This, + /* [annotation] */ + _Out_opt_ ID3D10Predicate **ppPredicate, + /* [annotation] */ + _Out_opt_ BOOL *pPredicateValue); + + void ( STDMETHODCALLTYPE *GSGetShaderResources )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D10ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *GSGetSamplers )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D10SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *OMGetRenderTargets )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D10RenderTargetView **ppRenderTargetViews, + /* [annotation] */ + _Out_opt_ ID3D10DepthStencilView **ppDepthStencilView); + + void ( STDMETHODCALLTYPE *OMGetBlendState )( + ID3D10Device1 * This, + /* [annotation] */ + _Out_opt_ ID3D10BlendState **ppBlendState, + /* [annotation] */ + _Out_opt_ FLOAT BlendFactor[ 4 ], + /* [annotation] */ + _Out_opt_ UINT *pSampleMask); + + void ( STDMETHODCALLTYPE *OMGetDepthStencilState )( + ID3D10Device1 * This, + /* [annotation] */ + _Out_opt_ ID3D10DepthStencilState **ppDepthStencilState, + /* [annotation] */ + _Out_opt_ UINT *pStencilRef); + + void ( STDMETHODCALLTYPE *SOGetTargets )( + ID3D10Device1 * This, + /* [annotation] */ + _In_range_( 0, D3D10_SO_BUFFER_SLOT_COUNT ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D10Buffer **ppSOTargets, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pOffsets); + + void ( STDMETHODCALLTYPE *RSGetState )( + ID3D10Device1 * This, + /* [annotation] */ + _Out_ ID3D10RasterizerState **ppRasterizerState); + + void ( STDMETHODCALLTYPE *RSGetViewports )( + ID3D10Device1 * This, + /* [annotation] */ + _Inout_ /*_range(0, D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE )*/ UINT *NumViewports, + /* [annotation] */ + _Out_writes_opt_(*NumViewports) D3D10_VIEWPORT *pViewports); + + void ( STDMETHODCALLTYPE *RSGetScissorRects )( + ID3D10Device1 * This, + /* [annotation] */ + _Inout_ /*_range(0, D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE )*/ UINT *NumRects, + /* [annotation] */ + _Out_writes_opt_(*NumRects) D3D10_RECT *pRects); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceRemovedReason )( + ID3D10Device1 * This); + + HRESULT ( STDMETHODCALLTYPE *SetExceptionMode )( + ID3D10Device1 * This, + UINT RaiseFlags); + + UINT ( STDMETHODCALLTYPE *GetExceptionMode )( + ID3D10Device1 * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *ClearState )( + ID3D10Device1 * This); + + void ( STDMETHODCALLTYPE *Flush )( + ID3D10Device1 * This); + + HRESULT ( STDMETHODCALLTYPE *CreateBuffer )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ const D3D10_BUFFER_DESC *pDesc, + /* [annotation] */ + _In_opt_ const D3D10_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _Out_opt_ ID3D10Buffer **ppBuffer); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture1D )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ const D3D10_TEXTURE1D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels * pDesc->ArraySize)) const D3D10_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _Out_ ID3D10Texture1D **ppTexture1D); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture2D )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ const D3D10_TEXTURE2D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels * pDesc->ArraySize)) const D3D10_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _Out_ ID3D10Texture2D **ppTexture2D); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture3D )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ const D3D10_TEXTURE3D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels)) const D3D10_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _Out_ ID3D10Texture3D **ppTexture3D); + + HRESULT ( STDMETHODCALLTYPE *CreateShaderResourceView )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ ID3D10Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D10_SHADER_RESOURCE_VIEW_DESC *pDesc, + /* [annotation] */ + _Out_opt_ ID3D10ShaderResourceView **ppSRView); + + HRESULT ( STDMETHODCALLTYPE *CreateRenderTargetView )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ ID3D10Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D10_RENDER_TARGET_VIEW_DESC *pDesc, + /* [annotation] */ + _Out_opt_ ID3D10RenderTargetView **ppRTView); + + HRESULT ( STDMETHODCALLTYPE *CreateDepthStencilView )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ ID3D10Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D10_DEPTH_STENCIL_VIEW_DESC *pDesc, + /* [annotation] */ + _Out_opt_ ID3D10DepthStencilView **ppDepthStencilView); + + HRESULT ( STDMETHODCALLTYPE *CreateInputLayout )( + ID3D10Device1 * This, + /* [annotation] */ + _In_reads_(NumElements) const D3D10_INPUT_ELEMENT_DESC *pInputElementDescs, + /* [annotation] */ + _In_range_( 0, D3D10_1_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT ) UINT NumElements, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecodeWithInputSignature, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _Out_opt_ ID3D10InputLayout **ppInputLayout); + + HRESULT ( STDMETHODCALLTYPE *CreateVertexShader )( + ID3D10Device1 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _Out_opt_ ID3D10VertexShader **ppVertexShader); + + HRESULT ( STDMETHODCALLTYPE *CreateGeometryShader )( + ID3D10Device1 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _Out_opt_ ID3D10GeometryShader **ppGeometryShader); + + HRESULT ( STDMETHODCALLTYPE *CreateGeometryShaderWithStreamOutput )( + ID3D10Device1 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_reads_opt_(NumEntries) const D3D10_SO_DECLARATION_ENTRY *pSODeclaration, + /* [annotation] */ + _In_range_( 0, D3D10_SO_SINGLE_BUFFER_COMPONENT_LIMIT ) UINT NumEntries, + /* [annotation] */ + _In_ UINT OutputStreamStride, + /* [annotation] */ + _Out_opt_ ID3D10GeometryShader **ppGeometryShader); + + HRESULT ( STDMETHODCALLTYPE *CreatePixelShader )( + ID3D10Device1 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _Out_opt_ ID3D10PixelShader **ppPixelShader); + + HRESULT ( STDMETHODCALLTYPE *CreateBlendState )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ const D3D10_BLEND_DESC *pBlendStateDesc, + /* [annotation] */ + _Out_opt_ ID3D10BlendState **ppBlendState); + + HRESULT ( STDMETHODCALLTYPE *CreateDepthStencilState )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ const D3D10_DEPTH_STENCIL_DESC *pDepthStencilDesc, + /* [annotation] */ + _Out_opt_ ID3D10DepthStencilState **ppDepthStencilState); + + HRESULT ( STDMETHODCALLTYPE *CreateRasterizerState )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ const D3D10_RASTERIZER_DESC *pRasterizerDesc, + /* [annotation] */ + _Out_opt_ ID3D10RasterizerState **ppRasterizerState); + + HRESULT ( STDMETHODCALLTYPE *CreateSamplerState )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ const D3D10_SAMPLER_DESC *pSamplerDesc, + /* [annotation] */ + _Out_opt_ ID3D10SamplerState **ppSamplerState); + + HRESULT ( STDMETHODCALLTYPE *CreateQuery )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ const D3D10_QUERY_DESC *pQueryDesc, + /* [annotation] */ + _Out_opt_ ID3D10Query **ppQuery); + + HRESULT ( STDMETHODCALLTYPE *CreatePredicate )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ const D3D10_QUERY_DESC *pPredicateDesc, + /* [annotation] */ + _Out_opt_ ID3D10Predicate **ppPredicate); + + HRESULT ( STDMETHODCALLTYPE *CreateCounter )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ const D3D10_COUNTER_DESC *pCounterDesc, + /* [annotation] */ + _Out_opt_ ID3D10Counter **ppCounter); + + HRESULT ( STDMETHODCALLTYPE *CheckFormatSupport )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _Out_ UINT *pFormatSupport); + + HRESULT ( STDMETHODCALLTYPE *CheckMultisampleQualityLevels )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT SampleCount, + /* [annotation] */ + _Out_ UINT *pNumQualityLevels); + + void ( STDMETHODCALLTYPE *CheckCounterInfo )( + ID3D10Device1 * This, + /* [annotation] */ + _Out_ D3D10_COUNTER_INFO *pCounterInfo); + + HRESULT ( STDMETHODCALLTYPE *CheckCounter )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ const D3D10_COUNTER_DESC *pDesc, + /* [annotation] */ + _Out_ D3D10_COUNTER_TYPE *pType, + /* [annotation] */ + _Out_ UINT *pActiveCounters, + /* [annotation] */ + _Out_writes_opt_(*pNameLength) LPSTR szName, + /* [annotation] */ + _Inout_opt_ UINT *pNameLength, + /* [annotation] */ + _Out_writes_opt_(*pUnitsLength) LPSTR szUnits, + /* [annotation] */ + _Inout_opt_ UINT *pUnitsLength, + /* [annotation] */ + _Out_writes_opt_(*pDescriptionLength) LPSTR szDescription, + /* [annotation] */ + _Inout_opt_ UINT *pDescriptionLength); + + UINT ( STDMETHODCALLTYPE *GetCreationFlags )( + ID3D10Device1 * This); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedResource )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _In_ REFIID ReturnedInterface, + /* [annotation] */ + _Out_opt_ void **ppResource); + + void ( STDMETHODCALLTYPE *SetTextFilterSize )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ UINT Width, + /* [annotation] */ + _In_ UINT Height); + + void ( STDMETHODCALLTYPE *GetTextFilterSize )( + ID3D10Device1 * This, + /* [annotation] */ + _Out_opt_ UINT *pWidth, + /* [annotation] */ + _Out_opt_ UINT *pHeight); + + HRESULT ( STDMETHODCALLTYPE *CreateShaderResourceView1 )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ ID3D10Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D10_SHADER_RESOURCE_VIEW_DESC1 *pDesc, + /* [annotation] */ + _Out_opt_ ID3D10ShaderResourceView1 **ppSRView); + + HRESULT ( STDMETHODCALLTYPE *CreateBlendState1 )( + ID3D10Device1 * This, + /* [annotation] */ + _In_ const D3D10_BLEND_DESC1 *pBlendStateDesc, + /* [annotation] */ + _Out_opt_ ID3D10BlendState1 **ppBlendState); + + D3D10_FEATURE_LEVEL1 ( STDMETHODCALLTYPE *GetFeatureLevel )( + ID3D10Device1 * This); + + END_INTERFACE + } ID3D10Device1Vtbl; + + interface ID3D10Device1 + { + CONST_VTBL struct ID3D10Device1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10Device1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10Device1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10Device1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10Device1_VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D10Device1_PSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> PSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D10Device1_PSSetShader(This,pPixelShader) \ + ( (This)->lpVtbl -> PSSetShader(This,pPixelShader) ) + +#define ID3D10Device1_PSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> PSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D10Device1_VSSetShader(This,pVertexShader) \ + ( (This)->lpVtbl -> VSSetShader(This,pVertexShader) ) + +#define ID3D10Device1_DrawIndexed(This,IndexCount,StartIndexLocation,BaseVertexLocation) \ + ( (This)->lpVtbl -> DrawIndexed(This,IndexCount,StartIndexLocation,BaseVertexLocation) ) + +#define ID3D10Device1_Draw(This,VertexCount,StartVertexLocation) \ + ( (This)->lpVtbl -> Draw(This,VertexCount,StartVertexLocation) ) + +#define ID3D10Device1_PSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> PSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D10Device1_IASetInputLayout(This,pInputLayout) \ + ( (This)->lpVtbl -> IASetInputLayout(This,pInputLayout) ) + +#define ID3D10Device1_IASetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) \ + ( (This)->lpVtbl -> IASetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) ) + +#define ID3D10Device1_IASetIndexBuffer(This,pIndexBuffer,Format,Offset) \ + ( (This)->lpVtbl -> IASetIndexBuffer(This,pIndexBuffer,Format,Offset) ) + +#define ID3D10Device1_DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) ) + +#define ID3D10Device1_DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) ) + +#define ID3D10Device1_GSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> GSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D10Device1_GSSetShader(This,pShader) \ + ( (This)->lpVtbl -> GSSetShader(This,pShader) ) + +#define ID3D10Device1_IASetPrimitiveTopology(This,Topology) \ + ( (This)->lpVtbl -> IASetPrimitiveTopology(This,Topology) ) + +#define ID3D10Device1_VSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> VSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D10Device1_VSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> VSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D10Device1_SetPredication(This,pPredicate,PredicateValue) \ + ( (This)->lpVtbl -> SetPredication(This,pPredicate,PredicateValue) ) + +#define ID3D10Device1_GSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> GSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D10Device1_GSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> GSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D10Device1_OMSetRenderTargets(This,NumViews,ppRenderTargetViews,pDepthStencilView) \ + ( (This)->lpVtbl -> OMSetRenderTargets(This,NumViews,ppRenderTargetViews,pDepthStencilView) ) + +#define ID3D10Device1_OMSetBlendState(This,pBlendState,BlendFactor,SampleMask) \ + ( (This)->lpVtbl -> OMSetBlendState(This,pBlendState,BlendFactor,SampleMask) ) + +#define ID3D10Device1_OMSetDepthStencilState(This,pDepthStencilState,StencilRef) \ + ( (This)->lpVtbl -> OMSetDepthStencilState(This,pDepthStencilState,StencilRef) ) + +#define ID3D10Device1_SOSetTargets(This,NumBuffers,ppSOTargets,pOffsets) \ + ( (This)->lpVtbl -> SOSetTargets(This,NumBuffers,ppSOTargets,pOffsets) ) + +#define ID3D10Device1_DrawAuto(This) \ + ( (This)->lpVtbl -> DrawAuto(This) ) + +#define ID3D10Device1_RSSetState(This,pRasterizerState) \ + ( (This)->lpVtbl -> RSSetState(This,pRasterizerState) ) + +#define ID3D10Device1_RSSetViewports(This,NumViewports,pViewports) \ + ( (This)->lpVtbl -> RSSetViewports(This,NumViewports,pViewports) ) + +#define ID3D10Device1_RSSetScissorRects(This,NumRects,pRects) \ + ( (This)->lpVtbl -> RSSetScissorRects(This,NumRects,pRects) ) + +#define ID3D10Device1_CopySubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox) \ + ( (This)->lpVtbl -> CopySubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox) ) + +#define ID3D10Device1_CopyResource(This,pDstResource,pSrcResource) \ + ( (This)->lpVtbl -> CopyResource(This,pDstResource,pSrcResource) ) + +#define ID3D10Device1_UpdateSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) \ + ( (This)->lpVtbl -> UpdateSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) ) + +#define ID3D10Device1_ClearRenderTargetView(This,pRenderTargetView,ColorRGBA) \ + ( (This)->lpVtbl -> ClearRenderTargetView(This,pRenderTargetView,ColorRGBA) ) + +#define ID3D10Device1_ClearDepthStencilView(This,pDepthStencilView,ClearFlags,Depth,Stencil) \ + ( (This)->lpVtbl -> ClearDepthStencilView(This,pDepthStencilView,ClearFlags,Depth,Stencil) ) + +#define ID3D10Device1_GenerateMips(This,pShaderResourceView) \ + ( (This)->lpVtbl -> GenerateMips(This,pShaderResourceView) ) + +#define ID3D10Device1_ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) \ + ( (This)->lpVtbl -> ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) ) + +#define ID3D10Device1_VSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> VSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D10Device1_PSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> PSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D10Device1_PSGetShader(This,ppPixelShader) \ + ( (This)->lpVtbl -> PSGetShader(This,ppPixelShader) ) + +#define ID3D10Device1_PSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> PSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D10Device1_VSGetShader(This,ppVertexShader) \ + ( (This)->lpVtbl -> VSGetShader(This,ppVertexShader) ) + +#define ID3D10Device1_PSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> PSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D10Device1_IAGetInputLayout(This,ppInputLayout) \ + ( (This)->lpVtbl -> IAGetInputLayout(This,ppInputLayout) ) + +#define ID3D10Device1_IAGetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) \ + ( (This)->lpVtbl -> IAGetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) ) + +#define ID3D10Device1_IAGetIndexBuffer(This,pIndexBuffer,Format,Offset) \ + ( (This)->lpVtbl -> IAGetIndexBuffer(This,pIndexBuffer,Format,Offset) ) + +#define ID3D10Device1_GSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> GSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D10Device1_GSGetShader(This,ppGeometryShader) \ + ( (This)->lpVtbl -> GSGetShader(This,ppGeometryShader) ) + +#define ID3D10Device1_IAGetPrimitiveTopology(This,pTopology) \ + ( (This)->lpVtbl -> IAGetPrimitiveTopology(This,pTopology) ) + +#define ID3D10Device1_VSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> VSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D10Device1_VSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> VSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D10Device1_GetPredication(This,ppPredicate,pPredicateValue) \ + ( (This)->lpVtbl -> GetPredication(This,ppPredicate,pPredicateValue) ) + +#define ID3D10Device1_GSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> GSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D10Device1_GSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> GSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D10Device1_OMGetRenderTargets(This,NumViews,ppRenderTargetViews,ppDepthStencilView) \ + ( (This)->lpVtbl -> OMGetRenderTargets(This,NumViews,ppRenderTargetViews,ppDepthStencilView) ) + +#define ID3D10Device1_OMGetBlendState(This,ppBlendState,BlendFactor,pSampleMask) \ + ( (This)->lpVtbl -> OMGetBlendState(This,ppBlendState,BlendFactor,pSampleMask) ) + +#define ID3D10Device1_OMGetDepthStencilState(This,ppDepthStencilState,pStencilRef) \ + ( (This)->lpVtbl -> OMGetDepthStencilState(This,ppDepthStencilState,pStencilRef) ) + +#define ID3D10Device1_SOGetTargets(This,NumBuffers,ppSOTargets,pOffsets) \ + ( (This)->lpVtbl -> SOGetTargets(This,NumBuffers,ppSOTargets,pOffsets) ) + +#define ID3D10Device1_RSGetState(This,ppRasterizerState) \ + ( (This)->lpVtbl -> RSGetState(This,ppRasterizerState) ) + +#define ID3D10Device1_RSGetViewports(This,NumViewports,pViewports) \ + ( (This)->lpVtbl -> RSGetViewports(This,NumViewports,pViewports) ) + +#define ID3D10Device1_RSGetScissorRects(This,NumRects,pRects) \ + ( (This)->lpVtbl -> RSGetScissorRects(This,NumRects,pRects) ) + +#define ID3D10Device1_GetDeviceRemovedReason(This) \ + ( (This)->lpVtbl -> GetDeviceRemovedReason(This) ) + +#define ID3D10Device1_SetExceptionMode(This,RaiseFlags) \ + ( (This)->lpVtbl -> SetExceptionMode(This,RaiseFlags) ) + +#define ID3D10Device1_GetExceptionMode(This) \ + ( (This)->lpVtbl -> GetExceptionMode(This) ) + +#define ID3D10Device1_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D10Device1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D10Device1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D10Device1_ClearState(This) \ + ( (This)->lpVtbl -> ClearState(This) ) + +#define ID3D10Device1_Flush(This) \ + ( (This)->lpVtbl -> Flush(This) ) + +#define ID3D10Device1_CreateBuffer(This,pDesc,pInitialData,ppBuffer) \ + ( (This)->lpVtbl -> CreateBuffer(This,pDesc,pInitialData,ppBuffer) ) + +#define ID3D10Device1_CreateTexture1D(This,pDesc,pInitialData,ppTexture1D) \ + ( (This)->lpVtbl -> CreateTexture1D(This,pDesc,pInitialData,ppTexture1D) ) + +#define ID3D10Device1_CreateTexture2D(This,pDesc,pInitialData,ppTexture2D) \ + ( (This)->lpVtbl -> CreateTexture2D(This,pDesc,pInitialData,ppTexture2D) ) + +#define ID3D10Device1_CreateTexture3D(This,pDesc,pInitialData,ppTexture3D) \ + ( (This)->lpVtbl -> CreateTexture3D(This,pDesc,pInitialData,ppTexture3D) ) + +#define ID3D10Device1_CreateShaderResourceView(This,pResource,pDesc,ppSRView) \ + ( (This)->lpVtbl -> CreateShaderResourceView(This,pResource,pDesc,ppSRView) ) + +#define ID3D10Device1_CreateRenderTargetView(This,pResource,pDesc,ppRTView) \ + ( (This)->lpVtbl -> CreateRenderTargetView(This,pResource,pDesc,ppRTView) ) + +#define ID3D10Device1_CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView) \ + ( (This)->lpVtbl -> CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView) ) + +#define ID3D10Device1_CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout) \ + ( (This)->lpVtbl -> CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout) ) + +#define ID3D10Device1_CreateVertexShader(This,pShaderBytecode,BytecodeLength,ppVertexShader) \ + ( (This)->lpVtbl -> CreateVertexShader(This,pShaderBytecode,BytecodeLength,ppVertexShader) ) + +#define ID3D10Device1_CreateGeometryShader(This,pShaderBytecode,BytecodeLength,ppGeometryShader) \ + ( (This)->lpVtbl -> CreateGeometryShader(This,pShaderBytecode,BytecodeLength,ppGeometryShader) ) + +#define ID3D10Device1_CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,OutputStreamStride,ppGeometryShader) \ + ( (This)->lpVtbl -> CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,OutputStreamStride,ppGeometryShader) ) + +#define ID3D10Device1_CreatePixelShader(This,pShaderBytecode,BytecodeLength,ppPixelShader) \ + ( (This)->lpVtbl -> CreatePixelShader(This,pShaderBytecode,BytecodeLength,ppPixelShader) ) + +#define ID3D10Device1_CreateBlendState(This,pBlendStateDesc,ppBlendState) \ + ( (This)->lpVtbl -> CreateBlendState(This,pBlendStateDesc,ppBlendState) ) + +#define ID3D10Device1_CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState) \ + ( (This)->lpVtbl -> CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState) ) + +#define ID3D10Device1_CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState) \ + ( (This)->lpVtbl -> CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState) ) + +#define ID3D10Device1_CreateSamplerState(This,pSamplerDesc,ppSamplerState) \ + ( (This)->lpVtbl -> CreateSamplerState(This,pSamplerDesc,ppSamplerState) ) + +#define ID3D10Device1_CreateQuery(This,pQueryDesc,ppQuery) \ + ( (This)->lpVtbl -> CreateQuery(This,pQueryDesc,ppQuery) ) + +#define ID3D10Device1_CreatePredicate(This,pPredicateDesc,ppPredicate) \ + ( (This)->lpVtbl -> CreatePredicate(This,pPredicateDesc,ppPredicate) ) + +#define ID3D10Device1_CreateCounter(This,pCounterDesc,ppCounter) \ + ( (This)->lpVtbl -> CreateCounter(This,pCounterDesc,ppCounter) ) + +#define ID3D10Device1_CheckFormatSupport(This,Format,pFormatSupport) \ + ( (This)->lpVtbl -> CheckFormatSupport(This,Format,pFormatSupport) ) + +#define ID3D10Device1_CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels) \ + ( (This)->lpVtbl -> CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels) ) + +#define ID3D10Device1_CheckCounterInfo(This,pCounterInfo) \ + ( (This)->lpVtbl -> CheckCounterInfo(This,pCounterInfo) ) + +#define ID3D10Device1_CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength) \ + ( (This)->lpVtbl -> CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength) ) + +#define ID3D10Device1_GetCreationFlags(This) \ + ( (This)->lpVtbl -> GetCreationFlags(This) ) + +#define ID3D10Device1_OpenSharedResource(This,hResource,ReturnedInterface,ppResource) \ + ( (This)->lpVtbl -> OpenSharedResource(This,hResource,ReturnedInterface,ppResource) ) + +#define ID3D10Device1_SetTextFilterSize(This,Width,Height) \ + ( (This)->lpVtbl -> SetTextFilterSize(This,Width,Height) ) + +#define ID3D10Device1_GetTextFilterSize(This,pWidth,pHeight) \ + ( (This)->lpVtbl -> GetTextFilterSize(This,pWidth,pHeight) ) + + +#define ID3D10Device1_CreateShaderResourceView1(This,pResource,pDesc,ppSRView) \ + ( (This)->lpVtbl -> CreateShaderResourceView1(This,pResource,pDesc,ppSRView) ) + +#define ID3D10Device1_CreateBlendState1(This,pBlendStateDesc,ppBlendState) \ + ( (This)->lpVtbl -> CreateBlendState1(This,pBlendStateDesc,ppBlendState) ) + +#define ID3D10Device1_GetFeatureLevel(This) \ + ( (This)->lpVtbl -> GetFeatureLevel(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10Device1_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10_1_0000_0003 */ +/* [local] */ + +#define D3D10_1_SDK_VERSION ( ( 0 + 0x20 ) ) + +#include "d3d10_1shader.h" + +/////////////////////////////////////////////////////////////////////////// +// D3D10CreateDevice1 +// ------------------ +// +// pAdapter +// If NULL, D3D10CreateDevice1 will choose the primary adapter and +// create a new instance from a temporarily created IDXGIFactory. +// If non-NULL, D3D10CreateDevice1 will register the appropriate +// device, if necessary (via IDXGIAdapter::RegisterDrver), before +// creating the device. +// DriverType +// Specifies the driver type to be created: hardware, reference or +// null. +// Software +// HMODULE of a DLL implementing a software rasterizer. Must be NULL for +// non-Software driver types. +// Flags +// Any of those documented for D3D10CreateDeviceAndSwapChain1. +// HardwareLevel +// Any of those documented for D3D10CreateDeviceAndSwapChain1. +// SDKVersion +// SDK version. Use the D3D10_1_SDK_VERSION macro. +// ppDevice +// Pointer to returned interface. +// +// Return Values +// Any of those documented for +// CreateDXGIFactory +// IDXGIFactory::EnumAdapters +// IDXGIAdapter::RegisterDriver +// D3D10CreateDevice1 +// +/////////////////////////////////////////////////////////////////////////// +typedef HRESULT (WINAPI* PFN_D3D10_CREATE_DEVICE1)(IDXGIAdapter *, + D3D10_DRIVER_TYPE, HMODULE, UINT, D3D10_FEATURE_LEVEL1, UINT, ID3D10Device1**); + +HRESULT WINAPI D3D10CreateDevice1( + _In_opt_ IDXGIAdapter *pAdapter, + D3D10_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + D3D10_FEATURE_LEVEL1 HardwareLevel, + UINT SDKVersion, + _Out_opt_ ID3D10Device1 **ppDevice); + +/////////////////////////////////////////////////////////////////////////// +// D3D10CreateDeviceAndSwapChain1 +// ------------------------------ +// +// ppAdapter +// If NULL, D3D10CreateDevice1 will choose the primary adapter and +// create a new instance from a temporarily created IDXGIFactory. +// If non-NULL, D3D10CreateDevice1 will register the appropriate +// device, if necessary (via IDXGIAdapter::RegisterDrver), before +// creating the device. +// DriverType +// Specifies the driver type to be created: hardware, reference or +// null. +// Software +// HMODULE of a DLL implementing a software rasterizer. Must be NULL for +// non-Software driver types. +// Flags +// Any of those documented for D3D10CreateDevice1. +// HardwareLevel +// Any of: +// D3D10_CREATE_LEVEL_10_0 +// D3D10_CREATE_LEVEL_10_1 +// SDKVersion +// SDK version. Use the D3D10_1_SDK_VERSION macro. +// pSwapChainDesc +// Swap chain description, may be NULL. +// ppSwapChain +// Pointer to returned interface. May be NULL. +// ppDevice +// Pointer to returned interface. +// +// Return Values +// Any of those documented for +// CreateDXGIFactory +// IDXGIFactory::EnumAdapters +// IDXGIAdapter::RegisterDriver +// D3D10CreateDevice1 +// IDXGIFactory::CreateSwapChain +// +/////////////////////////////////////////////////////////////////////////// +typedef HRESULT (WINAPI* PFN_D3D10_CREATE_DEVICE_AND_SWAP_CHAIN1)(IDXGIAdapter *, + D3D10_DRIVER_TYPE, HMODULE, UINT, D3D10_FEATURE_LEVEL1, UINT, DXGI_SWAP_CHAIN_DESC *, IDXGISwapChain **, ID3D10Device1 **); + +HRESULT WINAPI D3D10CreateDeviceAndSwapChain1( + _In_opt_ IDXGIAdapter *pAdapter, + D3D10_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + D3D10_FEATURE_LEVEL1 HardwareLevel, + UINT SDKVersion, + _In_opt_ DXGI_SWAP_CHAIN_DESC *pSwapChainDesc, + _Out_opt_ IDXGISwapChain **ppSwapChain, + _Out_opt_ ID3D10Device1 **ppDevice); + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ +DEFINE_GUID(IID_ID3D10BlendState1,0xEDAD8D99,0x8A35,0x4d6d,0x85,0x66,0x2E,0xA2,0x76,0xCD,0xE1,0x61); +DEFINE_GUID(IID_ID3D10ShaderResourceView1,0x9B7E4C87,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); +DEFINE_GUID(IID_ID3D10Device1,0x9B7E4C8F,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10_1_0000_0003_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10_1_0000_0003_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/d3d10_1shader.h b/gfx/include/dxsdk/d3d10_1shader.h new file mode 100644 index 0000000000..7da84274c3 --- /dev/null +++ b/gfx/include/dxsdk/d3d10_1shader.h @@ -0,0 +1,306 @@ +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// File: D3D10_1Shader.h +// Content: D3D10.1 Shader Types and APIs +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef __D3D10_1SHADER_H__ +#define __D3D10_1SHADER_H__ + +#include "d3d10shader.h" + +/*#include */ + + + +//---------------------------------------------------------------------------- +// Shader debugging structures +//---------------------------------------------------------------------------- + +typedef enum _D3D10_SHADER_DEBUG_REGTYPE +{ + D3D10_SHADER_DEBUG_REG_INPUT, + D3D10_SHADER_DEBUG_REG_OUTPUT, + D3D10_SHADER_DEBUG_REG_CBUFFER, + D3D10_SHADER_DEBUG_REG_TBUFFER, + D3D10_SHADER_DEBUG_REG_TEMP, + D3D10_SHADER_DEBUG_REG_TEMPARRAY, + D3D10_SHADER_DEBUG_REG_TEXTURE, + D3D10_SHADER_DEBUG_REG_SAMPLER, + D3D10_SHADER_DEBUG_REG_IMMEDIATECBUFFER, + D3D10_SHADER_DEBUG_REG_LITERAL, + D3D10_SHADER_DEBUG_REG_UNUSED, + D3D11_SHADER_DEBUG_REG_INTERFACE_POINTERS, + D3D11_SHADER_DEBUG_REG_UAV, + D3D10_SHADER_DEBUG_REG_FORCE_DWORD = 0x7fffffff, +} D3D10_SHADER_DEBUG_REGTYPE; + +typedef enum _D3D10_SHADER_DEBUG_SCOPETYPE +{ + D3D10_SHADER_DEBUG_SCOPE_GLOBAL, + D3D10_SHADER_DEBUG_SCOPE_BLOCK, + D3D10_SHADER_DEBUG_SCOPE_FORLOOP, + D3D10_SHADER_DEBUG_SCOPE_STRUCT, + D3D10_SHADER_DEBUG_SCOPE_FUNC_PARAMS, + D3D10_SHADER_DEBUG_SCOPE_STATEBLOCK, + D3D10_SHADER_DEBUG_SCOPE_NAMESPACE, + D3D10_SHADER_DEBUG_SCOPE_ANNOTATION, + D3D10_SHADER_DEBUG_SCOPE_FORCE_DWORD = 0x7fffffff, +} D3D10_SHADER_DEBUG_SCOPETYPE; + +typedef enum _D3D10_SHADER_DEBUG_VARTYPE +{ + D3D10_SHADER_DEBUG_VAR_VARIABLE, + D3D10_SHADER_DEBUG_VAR_FUNCTION, + D3D10_SHADER_DEBUG_VAR_FORCE_DWORD = 0x7fffffff, +} D3D10_SHADER_DEBUG_VARTYPE; + +///////////////////////////////////////////////////////////////////// +// These are the serialized structures that get written to the file +///////////////////////////////////////////////////////////////////// + +typedef struct _D3D10_SHADER_DEBUG_TOKEN_INFO +{ + UINT File; // offset into file list + UINT Line; // line # + UINT Column; // column # + + UINT TokenLength; + UINT TokenId; // offset to LPCSTR of length TokenLength in string datastore +} D3D10_SHADER_DEBUG_TOKEN_INFO; + +// Variable list +typedef struct _D3D10_SHADER_DEBUG_VAR_INFO +{ + // Index into token list for declaring identifier + UINT TokenId; + D3D10_SHADER_VARIABLE_TYPE Type; + // register and component for this variable, only valid/necessary for arrays + UINT Register; + UINT Component; + // gives the original variable that declared this variable + UINT ScopeVar; + // this variable's offset in its ScopeVar + UINT ScopeVarOffset; +} D3D10_SHADER_DEBUG_VAR_INFO; + +typedef struct _D3D10_SHADER_DEBUG_INPUT_INFO +{ + // index into array of variables of variable to initialize + UINT Var; + // input, cbuffer, tbuffer + D3D10_SHADER_DEBUG_REGTYPE InitialRegisterSet; + // set to cbuffer or tbuffer slot, geometry shader input primitive #, + // identifying register for indexable temp, or -1 + UINT InitialBank; + // -1 if temp, otherwise gives register in register set + UINT InitialRegister; + // -1 if temp, otherwise gives component + UINT InitialComponent; + // initial value if literal + UINT InitialValue; +} D3D10_SHADER_DEBUG_INPUT_INFO; + +typedef struct _D3D10_SHADER_DEBUG_SCOPEVAR_INFO +{ + // Index into variable token + UINT TokenId; + + D3D10_SHADER_DEBUG_VARTYPE VarType; // variable or function (different namespaces) + D3D10_SHADER_VARIABLE_CLASS Class; + UINT Rows; // number of rows (matrices) + UINT Columns; // number of columns (vectors and matrices) + + // In an array of structures, one struct member scope is provided, and + // you'll have to add the array stride times the index to the variable + // index you find, then find that variable in this structure's list of + // variables. + + // gives a scope to look up struct members. -1 if not a struct + UINT StructMemberScope; + + // number of array indices + UINT uArrayIndices; // a[3][2][1] has 3 indices + // maximum array index for each index + // offset to UINT[uArrayIndices] in UINT datastore + UINT ArrayElements; // a[3][2][1] has {3, 2, 1} + // how many variables each array index moves + // offset to UINT[uArrayIndices] in UINT datastore + UINT ArrayStrides; // a[3][2][1] has {2, 1, 1} + + UINT uVariables; + // index of the first variable, later variables are offsets from this one + UINT uFirstVariable; +} D3D10_SHADER_DEBUG_SCOPEVAR_INFO; + +// scope data, this maps variable names to debug variables (useful for the watch window) +typedef struct _D3D10_SHADER_DEBUG_SCOPE_INFO +{ + D3D10_SHADER_DEBUG_SCOPETYPE ScopeType; + UINT Name; // offset to name of scope in strings list + UINT uNameLen; // length of name string + UINT uVariables; + UINT VariableData; // Offset to UINT[uVariables] indexing the Scope Variable list +} D3D10_SHADER_DEBUG_SCOPE_INFO; + +// instruction outputs +typedef struct _D3D10_SHADER_DEBUG_OUTPUTVAR +{ + // index variable being written to, if -1 it's not going to a variable + UINT Var; + // range data that the compiler expects to be true + UINT uValueMin, uValueMax; + INT iValueMin, iValueMax; + FLOAT fValueMin, fValueMax; + + BOOL bNaNPossible, bInfPossible; +} D3D10_SHADER_DEBUG_OUTPUTVAR; + +typedef struct _D3D10_SHADER_DEBUG_OUTPUTREG_INFO +{ + // Only temp, indexable temp, and output are valid here + D3D10_SHADER_DEBUG_REGTYPE OutputRegisterSet; + // -1 means no output + UINT OutputReg; + // if a temp array, identifier for which one + UINT TempArrayReg; + // -1 means masked out + UINT OutputComponents[4]; + D3D10_SHADER_DEBUG_OUTPUTVAR OutputVars[4]; + // when indexing the output, get the value of this register, then add + // that to uOutputReg. If uIndexReg is -1, then there is no index. + // find the variable whose register is the sum (by looking in the ScopeVar) + // and component matches, then set it. This should only happen for indexable + // temps and outputs. + UINT IndexReg; + UINT IndexComp; +} D3D10_SHADER_DEBUG_OUTPUTREG_INFO; + +// per instruction data +typedef struct _D3D10_SHADER_DEBUG_INST_INFO +{ + UINT Id; // Which instruction this is in the bytecode + UINT Opcode; // instruction type + + // 0, 1, or 2 + UINT uOutputs; + + // up to two outputs per instruction + D3D10_SHADER_DEBUG_OUTPUTREG_INFO pOutputs[2]; + + // index into the list of tokens for this instruction's token + UINT TokenId; + + // how many function calls deep this instruction is + UINT NestingLevel; + + // list of scopes from outer-most to inner-most + // Number of scopes + UINT Scopes; + UINT ScopeInfo; // Offset to UINT[uScopes] specifying indices of the ScopeInfo Array + + // list of variables accessed by this instruction + // Number of variables + UINT AccessedVars; + UINT AccessedVarsInfo; // Offset to UINT[AccessedVars] specifying indices of the ScopeVariableInfo Array +} D3D10_SHADER_DEBUG_INST_INFO; + +typedef struct _D3D10_SHADER_DEBUG_FILE_INFO +{ + UINT FileName; // Offset to LPCSTR for file name + UINT FileNameLen; // Length of file name + UINT FileData; // Offset to LPCSTR of length FileLen + UINT FileLen; // Length of file +} D3D10_SHADER_DEBUG_FILE_INFO; + +typedef struct _D3D10_SHADER_DEBUG_INFO +{ + UINT Size; // sizeof(D3D10_SHADER_DEBUG_INFO) + UINT Creator; // Offset to LPCSTR for compiler version + UINT EntrypointName; // Offset to LPCSTR for Entry point name + UINT ShaderTarget; // Offset to LPCSTR for shader target + UINT CompileFlags; // flags used to compile + UINT Files; // number of included files + UINT FileInfo; // Offset to D3D10_SHADER_DEBUG_FILE_INFO[Files] + UINT Instructions; // number of instructions + UINT InstructionInfo; // Offset to D3D10_SHADER_DEBUG_INST_INFO[Instructions] + UINT Variables; // number of variables + UINT VariableInfo; // Offset to D3D10_SHADER_DEBUG_VAR_INFO[Variables] + UINT InputVariables; // number of variables to initialize before running + UINT InputVariableInfo; // Offset to D3D10_SHADER_DEBUG_INPUT_INFO[InputVariables] + UINT Tokens; // number of tokens to initialize + UINT TokenInfo; // Offset to D3D10_SHADER_DEBUG_TOKEN_INFO[Tokens] + UINT Scopes; // number of scopes + UINT ScopeInfo; // Offset to D3D10_SHADER_DEBUG_SCOPE_INFO[Scopes] + UINT ScopeVariables; // number of variables declared + UINT ScopeVariableInfo; // Offset to D3D10_SHADER_DEBUG_SCOPEVAR_INFO[Scopes] + UINT UintOffset; // Offset to the UINT datastore, all UINT offsets are from this offset + UINT StringOffset; // Offset to the string datastore, all string offsets are from this offset +} D3D10_SHADER_DEBUG_INFO; + +//---------------------------------------------------------------------------- +// ID3D10ShaderReflection1: +//---------------------------------------------------------------------------- + +// +// Interface definitions +// + + +typedef interface ID3D10ShaderReflection1 ID3D10ShaderReflection1; +typedef interface ID3D10ShaderReflection1 *LPD3D10SHADERREFLECTION1; + +// {C3457783-A846-47CE-9520-CEA6F66E7447} +DEFINE_GUID(IID_ID3D10ShaderReflection1, +0xc3457783, 0xa846, 0x47ce, 0x95, 0x20, 0xce, 0xa6, 0xf6, 0x6e, 0x74, 0x47); + +#undef INTERFACE +#define INTERFACE ID3D10ShaderReflection1 + +DECLARE_INTERFACE_(ID3D10ShaderReflection1, IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_SHADER_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10ShaderReflectionConstantBuffer*, GetConstantBufferByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10ShaderReflectionConstantBuffer*, GetConstantBufferByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD(GetResourceBindingDesc)(THIS_ UINT ResourceIndex, _Out_ D3D10_SHADER_INPUT_BIND_DESC *pDesc) PURE; + + STDMETHOD(GetInputParameterDesc)(THIS_ UINT ParameterIndex, _Out_ D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE; + STDMETHOD(GetOutputParameterDesc)(THIS_ UINT ParameterIndex, _Out_ D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10ShaderReflectionVariable*, GetVariableByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD(GetResourceBindingDescByName)(THIS_ LPCSTR Name, _Out_ D3D10_SHADER_INPUT_BIND_DESC *pDesc) PURE; + + STDMETHOD(GetMovInstructionCount)(THIS_ _Out_ UINT* pCount) PURE; + STDMETHOD(GetMovcInstructionCount)(THIS_ _Out_ UINT* pCount) PURE; + STDMETHOD(GetConversionInstructionCount)(THIS_ _Out_ UINT* pCount) PURE; + STDMETHOD(GetBitwiseInstructionCount)(THIS_ _Out_ UINT* pCount) PURE; + + STDMETHOD(GetGSInputPrimitive)(THIS_ _Out_ D3D10_PRIMITIVE* pPrim) PURE; + STDMETHOD(IsLevel9Shader)(THIS_ _Out_ BOOL* pbLevel9Shader) PURE; + STDMETHOD(IsSampleFrequencyShader)(THIS_ _Out_ BOOL* pbSampleFrequency) PURE; +}; + +////////////////////////////////////////////////////////////////////////////// +// APIs ////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + +#ifdef __cplusplus +} +#endif //__cplusplus + +#endif //__D3D10_1SHADER_H__ + diff --git a/gfx/include/dxsdk/d3d10effect.h b/gfx/include/dxsdk/d3d10effect.h new file mode 100644 index 0000000000..67582bd36f --- /dev/null +++ b/gfx/include/dxsdk/d3d10effect.h @@ -0,0 +1,1463 @@ + +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// File: D3D10Effect.h +// Content: D3D10 Stateblock/Effect Types & APIs +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef __D3D10EFFECT_H__ +#define __D3D10EFFECT_H__ + +/*#include */ + +/*#pragma region Desktop Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ + +#include "d3d10.h" + +////////////////////////////////////////////////////////////////////////////// +// File contents: +// +// 1) Stateblock enums, structs, interfaces, flat APIs +// 2) Effect enums, structs, interfaces, flat APIs +////////////////////////////////////////////////////////////////////////////// + +//---------------------------------------------------------------------------- +// D3D10_DEVICE_STATE_TYPES: +// +// Used in ID3D10StateBlockMask function calls +// +//---------------------------------------------------------------------------- + +typedef enum _D3D10_DEVICE_STATE_TYPES +{ + + D3D10_DST_SO_BUFFERS=1, // Single-value state (atomical gets/sets) + D3D10_DST_OM_RENDER_TARGETS, // Single-value state (atomical gets/sets) + D3D10_DST_OM_DEPTH_STENCIL_STATE, // Single-value state + D3D10_DST_OM_BLEND_STATE, // Single-value state + + D3D10_DST_VS, // Single-value state + D3D10_DST_VS_SAMPLERS, // Count: D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT + D3D10_DST_VS_SHADER_RESOURCES, // Count: D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT + D3D10_DST_VS_CONSTANT_BUFFERS, // Count: + + D3D10_DST_GS, // Single-value state + D3D10_DST_GS_SAMPLERS, // Count: D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT + D3D10_DST_GS_SHADER_RESOURCES, // Count: D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT + D3D10_DST_GS_CONSTANT_BUFFERS, // Count: D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT + + D3D10_DST_PS, // Single-value state + D3D10_DST_PS_SAMPLERS, // Count: D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT + D3D10_DST_PS_SHADER_RESOURCES, // Count: D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT + D3D10_DST_PS_CONSTANT_BUFFERS, // Count: D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT + + D3D10_DST_IA_VERTEX_BUFFERS, // Count: D3D10_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT + D3D10_DST_IA_INDEX_BUFFER, // Single-value state + D3D10_DST_IA_INPUT_LAYOUT, // Single-value state + D3D10_DST_IA_PRIMITIVE_TOPOLOGY, // Single-value state + + D3D10_DST_RS_VIEWPORTS, // Single-value state (atomical gets/sets) + D3D10_DST_RS_SCISSOR_RECTS, // Single-value state (atomical gets/sets) + D3D10_DST_RS_RASTERIZER_STATE, // Single-value state + + D3D10_DST_PREDICATION, // Single-value state +} D3D10_DEVICE_STATE_TYPES; + +//---------------------------------------------------------------------------- +// D3D10_DEVICE_STATE_TYPES: +// +// Used in ID3D10StateBlockMask function calls +// +//---------------------------------------------------------------------------- + +#ifndef D3D10_BYTES_FROM_BITS +#define D3D10_BYTES_FROM_BITS(x) (((x) + 7) / 8) +#endif // D3D10_BYTES_FROM_BITS + +typedef struct _D3D10_STATE_BLOCK_MASK +{ + BYTE VS; + BYTE VSSamplers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT)]; + BYTE VSShaderResources[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT)]; + BYTE VSConstantBuffers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT)]; + + BYTE GS; + BYTE GSSamplers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT)]; + BYTE GSShaderResources[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT)]; + BYTE GSConstantBuffers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT)]; + + BYTE PS; + BYTE PSSamplers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT)]; + BYTE PSShaderResources[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT)]; + BYTE PSConstantBuffers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT)]; + + BYTE IAVertexBuffers[D3D10_BYTES_FROM_BITS(D3D10_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT)]; + BYTE IAIndexBuffer; + BYTE IAInputLayout; + BYTE IAPrimitiveTopology; + + BYTE OMRenderTargets; + BYTE OMDepthStencilState; + BYTE OMBlendState; + + BYTE RSViewports; + BYTE RSScissorRects; + BYTE RSRasterizerState; + + BYTE SOBuffers; + + BYTE Predication; +} D3D10_STATE_BLOCK_MASK; + +////////////////////////////////////////////////////////////////////////////// +// ID3D10StateBlock ////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +typedef interface ID3D10StateBlock ID3D10StateBlock; +typedef interface ID3D10StateBlock *LPD3D10STATEBLOCK; + +// {0803425A-57F5-4dd6-9465-A87570834A08} +DEFINE_GUID(IID_ID3D10StateBlock, +0x803425a, 0x57f5, 0x4dd6, 0x94, 0x65, 0xa8, 0x75, 0x70, 0x83, 0x4a, 0x8); + +#undef INTERFACE +#define INTERFACE ID3D10StateBlock + +DECLARE_INTERFACE_(ID3D10StateBlock, IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + STDMETHOD(Capture)(THIS) PURE; + STDMETHOD(Apply)(THIS) PURE; + STDMETHOD(ReleaseAllDeviceObjects)(THIS) PURE; + STDMETHOD(GetDevice)(_Out_ THIS_ ID3D10Device **ppDevice) PURE; +}; + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + +//---------------------------------------------------------------------------- +// D3D10_STATE_BLOCK_MASK and manipulation functions +// ------------------------------------------------- +// +// These functions exist to facilitate working with the D3D10_STATE_BLOCK_MASK +// structure. +// +// D3D10_STATE_BLOCK_MASK *pResult or *pMask +// The state block mask to operate on +// +// D3D10_STATE_BLOCK_MASK *pA, *pB +// The source state block masks for the binary union/intersect/difference +// operations. +// +// D3D10_DEVICE_STATE_TYPES StateType +// The specific state type to enable/disable/query +// +// UINT RangeStart, RangeLength, Entry +// The specific bit or range of bits for a given state type to operate on. +// Consult the comments for D3D10_DEVICE_STATE_TYPES and +// D3D10_STATE_BLOCK_MASK for information on the valid bit ranges for +// each state. +// +//---------------------------------------------------------------------------- + +HRESULT WINAPI D3D10StateBlockMaskUnion(_In_ D3D10_STATE_BLOCK_MASK *pA, _In_ D3D10_STATE_BLOCK_MASK *pB, _Out_ D3D10_STATE_BLOCK_MASK *pResult); +HRESULT WINAPI D3D10StateBlockMaskIntersect(_In_ D3D10_STATE_BLOCK_MASK *pA, _In_ D3D10_STATE_BLOCK_MASK *pB, _Out_ D3D10_STATE_BLOCK_MASK *pResult); +HRESULT WINAPI D3D10StateBlockMaskDifference(_In_ D3D10_STATE_BLOCK_MASK *pA, _In_ D3D10_STATE_BLOCK_MASK *pB, _Out_ D3D10_STATE_BLOCK_MASK *pResult); +HRESULT WINAPI D3D10StateBlockMaskEnableCapture(_Inout_ D3D10_STATE_BLOCK_MASK *pMask, D3D10_DEVICE_STATE_TYPES StateType, UINT RangeStart, UINT RangeLength); +HRESULT WINAPI D3D10StateBlockMaskDisableCapture(_Inout_ D3D10_STATE_BLOCK_MASK *pMask, D3D10_DEVICE_STATE_TYPES StateType, UINT RangeStart, UINT RangeLength); +HRESULT WINAPI D3D10StateBlockMaskEnableAll(_Out_ D3D10_STATE_BLOCK_MASK *pMask); +HRESULT WINAPI D3D10StateBlockMaskDisableAll(_Out_ D3D10_STATE_BLOCK_MASK *pMask); +BOOL WINAPI D3D10StateBlockMaskGetSetting(_In_ D3D10_STATE_BLOCK_MASK *pMask, D3D10_DEVICE_STATE_TYPES StateType, UINT Entry); + +//---------------------------------------------------------------------------- +// D3D10CreateStateBlock +// --------------------- +// +// Creates a state block object based on the mask settings specified +// in a D3D10_STATE_BLOCK_MASK structure. +// +// ID3D10Device *pDevice +// The device interface to associate with this state block +// +// D3D10_STATE_BLOCK_MASK *pStateBlockMask +// A bit mask whose settings are used to generate a state block +// object. +// +// ID3D10StateBlock **ppStateBlock +// The resulting state block object. This object will save/restore +// only those pieces of state that were set in the state block +// bit mask +//---------------------------------------------------------------------------- + +HRESULT WINAPI D3D10CreateStateBlock(_In_ ID3D10Device *pDevice, _In_ D3D10_STATE_BLOCK_MASK *pStateBlockMask, _Out_ ID3D10StateBlock **ppStateBlock); + +#ifdef __cplusplus +} +#endif //__cplusplus + +//---------------------------------------------------------------------------- +// D3D10_COMPILE & D3D10_EFFECT flags: +// ------------------------------------- +// +// These flags are passed in when creating an effect, and affect +// either compilation behavior or runtime effect behavior +// +// D3D10_EFFECT_COMPILE_CHILD_EFFECT +// Compile this .fx file to a child effect. Child effects have no initializers +// for any shared values as these are initialied in the master effect (pool). +// +// D3D10_EFFECT_COMPILE_ALLOW_SLOW_OPS +// By default, performance mode is enabled. Performance mode disallows +// mutable state objects by preventing non-literal expressions from appearing in +// state object definitions. Specifying this flag will disable the mode and allow +// for mutable state objects. +// +// D3D10_EFFECT_SINGLE_THREADED +// Do not attempt to synchronize with other threads loading effects into the +// same pool. +// +//---------------------------------------------------------------------------- + +#define D3D10_EFFECT_COMPILE_CHILD_EFFECT (1 << 0) +#define D3D10_EFFECT_COMPILE_ALLOW_SLOW_OPS (1 << 1) +#define D3D10_EFFECT_SINGLE_THREADED (1 << 3) + + +//---------------------------------------------------------------------------- +// D3D10_EFFECT_VARIABLE flags: +// ---------------------------- +// +// These flags describe an effect variable (global or annotation), +// and are returned in D3D10_EFFECT_VARIABLE_DESC::Flags. +// +// D3D10_EFFECT_VARIABLE_POOLED +// Indicates that the this variable or constant buffer resides +// in an effect pool. If this flag is not set, then the variable resides +// in a standalone effect (if ID3D10Effect::GetPool returns NULL) +// or a child effect (if ID3D10Effect::GetPool returns non-NULL) +// +// D3D10_EFFECT_VARIABLE_ANNOTATION +// Indicates that this is an annotation on a technique, pass, or global +// variable. Otherwise, this is a global variable. Annotations cannot +// be shared. +// +// D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT +// Indicates that the variable has been explicitly bound using the +// register keyword. +//---------------------------------------------------------------------------- + +#define D3D10_EFFECT_VARIABLE_POOLED (1 << 0) +#define D3D10_EFFECT_VARIABLE_ANNOTATION (1 << 1) +#define D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT (1 << 2) + +////////////////////////////////////////////////////////////////////////////// +// ID3D10EffectType ////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +//---------------------------------------------------------------------------- +// D3D10_EFFECT_TYPE_DESC: +// +// Retrieved by ID3D10EffectType::GetDesc() +//---------------------------------------------------------------------------- + +typedef struct _D3D10_EFFECT_TYPE_DESC +{ + LPCSTR TypeName; // Name of the type + // (e.g. "float4" or "MyStruct") + + D3D10_SHADER_VARIABLE_CLASS Class; // (e.g. scalar, vector, object, etc.) + D3D10_SHADER_VARIABLE_TYPE Type; // (e.g. float, texture, vertexshader, etc.) + + UINT Elements; // Number of elements in this type + // (0 if not an array) + UINT Members; // Number of members + // (0 if not a structure) + UINT Rows; // Number of rows in this type + // (0 if not a numeric primitive) + UINT Columns; // Number of columns in this type + // (0 if not a numeric primitive) + + UINT PackedSize; // Number of bytes required to represent + // this data type, when tightly packed + UINT UnpackedSize; // Number of bytes occupied by this data + // type, when laid out in a constant buffer + UINT Stride; // Number of bytes to seek between elements, + // when laid out in a constant buffer +} D3D10_EFFECT_TYPE_DESC; + +typedef interface ID3D10EffectType ID3D10EffectType; +typedef interface ID3D10EffectType *LPD3D10EFFECTTYPE; + +// {4E9E1DDC-CD9D-4772-A837-00180B9B88FD} +DEFINE_GUID(IID_ID3D10EffectType, +0x4e9e1ddc, 0xcd9d, 0x4772, 0xa8, 0x37, 0x0, 0x18, 0xb, 0x9b, 0x88, 0xfd); + +#undef INTERFACE +#define INTERFACE ID3D10EffectType + +DECLARE_INTERFACE(ID3D10EffectType) +{ + STDMETHOD_(BOOL, IsValid)(THIS) PURE; + STDMETHOD(GetDesc)(THIS_ D3D10_EFFECT_TYPE_DESC *pDesc) PURE; + STDMETHOD_(ID3D10EffectType*, GetMemberTypeByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectType*, GetMemberTypeByName)(THIS_ LPCSTR Name) PURE; + STDMETHOD_(ID3D10EffectType*, GetMemberTypeBySemantic)(THIS_ LPCSTR Semantic) PURE; + STDMETHOD_(LPCSTR, GetMemberName)(THIS_ UINT Index) PURE; + STDMETHOD_(LPCSTR, GetMemberSemantic)(THIS_ UINT Index) PURE; +}; + +////////////////////////////////////////////////////////////////////////////// +// ID3D10EffectVariable ////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +//---------------------------------------------------------------------------- +// D3D10_EFFECT_VARIABLE_DESC: +// +// Retrieved by ID3D10EffectVariable::GetDesc() +//---------------------------------------------------------------------------- + +typedef struct _D3D10_EFFECT_VARIABLE_DESC +{ + LPCSTR Name; // Name of this variable, annotation, + // or structure member + LPCSTR Semantic; // Semantic string of this variable + // or structure member (NULL for + // annotations or if not present) + + UINT Flags; // D3D10_EFFECT_VARIABLE_* flags + UINT Annotations; // Number of annotations on this variable + // (always 0 for annotations) + + UINT BufferOffset; // Offset into containing cbuffer or tbuffer + // (always 0 for annotations or variables + // not in constant buffers) + + UINT ExplicitBindPoint; // Used if the variable has been explicitly bound + // using the register keyword. Check Flags for + // D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT; +} D3D10_EFFECT_VARIABLE_DESC; + +typedef interface ID3D10EffectVariable ID3D10EffectVariable; +typedef interface ID3D10EffectVariable *LPD3D10EFFECTVARIABLE; + +// {AE897105-00E6-45bf-BB8E-281DD6DB8E1B} +DEFINE_GUID(IID_ID3D10EffectVariable, +0xae897105, 0xe6, 0x45bf, 0xbb, 0x8e, 0x28, 0x1d, 0xd6, 0xdb, 0x8e, 0x1b); + +#undef INTERFACE +#define INTERFACE ID3D10EffectVariable + +// Forward defines +typedef interface ID3D10EffectScalarVariable ID3D10EffectScalarVariable; +typedef interface ID3D10EffectVectorVariable ID3D10EffectVectorVariable; +typedef interface ID3D10EffectMatrixVariable ID3D10EffectMatrixVariable; +typedef interface ID3D10EffectStringVariable ID3D10EffectStringVariable; +typedef interface ID3D10EffectShaderResourceVariable ID3D10EffectShaderResourceVariable; +typedef interface ID3D10EffectRenderTargetViewVariable ID3D10EffectRenderTargetViewVariable; +typedef interface ID3D10EffectDepthStencilViewVariable ID3D10EffectDepthStencilViewVariable; +typedef interface ID3D10EffectConstantBuffer ID3D10EffectConstantBuffer; +typedef interface ID3D10EffectShaderVariable ID3D10EffectShaderVariable; +typedef interface ID3D10EffectBlendVariable ID3D10EffectBlendVariable; +typedef interface ID3D10EffectDepthStencilVariable ID3D10EffectDepthStencilVariable; +typedef interface ID3D10EffectRasterizerVariable ID3D10EffectRasterizerVariable; +typedef interface ID3D10EffectSamplerVariable ID3D10EffectSamplerVariable; + +DECLARE_INTERFACE(ID3D10EffectVariable) +{ + STDMETHOD_(BOOL, IsValid)(THIS) PURE; + STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE; + STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE; + + STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE; + + STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE; + STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE; + STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE; + STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE; + STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE; + STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE; + STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE; + STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE; + STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE; + + STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; + STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; +}; + +////////////////////////////////////////////////////////////////////////////// +// ID3D10EffectScalarVariable //////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +typedef interface ID3D10EffectScalarVariable ID3D10EffectScalarVariable; +typedef interface ID3D10EffectScalarVariable *LPD3D10EFFECTSCALARVARIABLE; + +// {00E48F7B-D2C8-49e8-A86C-022DEE53431F} +DEFINE_GUID(IID_ID3D10EffectScalarVariable, +0xe48f7b, 0xd2c8, 0x49e8, 0xa8, 0x6c, 0x2, 0x2d, 0xee, 0x53, 0x43, 0x1f); + +#undef INTERFACE +#define INTERFACE ID3D10EffectScalarVariable + +DECLARE_INTERFACE_(ID3D10EffectScalarVariable, ID3D10EffectVariable) +{ + STDMETHOD_(BOOL, IsValid)(THIS) PURE; + STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE; + STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE; + + STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE; + + STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE; + STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE; + STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE; + STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE; + STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE; + STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE; + STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE; + STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE; + STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE; + + STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT ByteOffset, UINT ByteCount) PURE; + STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT ByteOffset, UINT ByteCount) PURE; + + STDMETHOD(SetFloat)(THIS_ float Value) PURE; + STDMETHOD(GetFloat)(THIS_ _Out_ float *pValue) PURE; + + STDMETHOD(SetFloatArray)(THIS_ _In_reads_(Count) float *pData, UINT Offset, UINT Count) PURE; + STDMETHOD(GetFloatArray)(THIS_ _Out_writes_(Count) float *pData, UINT Offset, UINT Count) PURE; + + STDMETHOD(SetInt)(THIS_ int Value) PURE; + STDMETHOD(GetInt)(THIS_ _Out_ int *pValue) PURE; + + STDMETHOD(SetIntArray)(THIS_ _In_reads_(Count) int *pData, UINT Offset, UINT Count) PURE; + STDMETHOD(GetIntArray)(THIS_ _Out_writes_(Count) int *pData, UINT Offset, UINT Count) PURE; + + STDMETHOD(SetBool)(THIS_ BOOL Value) PURE; + STDMETHOD(GetBool)(THIS_ _Out_ BOOL *pValue) PURE; + + STDMETHOD(SetBoolArray)(THIS_ _In_reads_(Count) BOOL *pData, UINT Offset, UINT Count) PURE; + STDMETHOD(GetBoolArray)(THIS_ _Out_writes_(Count) BOOL *pData, UINT Offset, UINT Count) PURE; +}; + +////////////////////////////////////////////////////////////////////////////// +// ID3D10EffectVectorVariable //////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +typedef interface ID3D10EffectVectorVariable ID3D10EffectVectorVariable; +typedef interface ID3D10EffectVectorVariable *LPD3D10EFFECTVECTORVARIABLE; + +// {62B98C44-1F82-4c67-BCD0-72CF8F217E81} +DEFINE_GUID(IID_ID3D10EffectVectorVariable, +0x62b98c44, 0x1f82, 0x4c67, 0xbc, 0xd0, 0x72, 0xcf, 0x8f, 0x21, 0x7e, 0x81); + +#undef INTERFACE +#define INTERFACE ID3D10EffectVectorVariable + +DECLARE_INTERFACE_(ID3D10EffectVectorVariable, ID3D10EffectVariable) +{ + STDMETHOD_(BOOL, IsValid)(THIS) PURE; + STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE; + STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE; + + STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE; + + STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE; + STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE; + STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE; + STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE; + STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE; + STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE; + STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE; + STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE; + STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE; + + STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT ByteOffset, UINT ByteCount) PURE; + STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT ByteOffset, UINT ByteCount) PURE; + + STDMETHOD(SetBoolVector) (THIS_ BOOL *pData) PURE; + STDMETHOD(SetIntVector) (THIS_ int *pData) PURE; + STDMETHOD(SetFloatVector)(THIS_ float *pData) PURE; + + STDMETHOD(GetBoolVector) (THIS_ BOOL *pData) PURE; + STDMETHOD(GetIntVector) (THIS_ int *pData) PURE; + STDMETHOD(GetFloatVector)(THIS_ float *pData) PURE; + + STDMETHOD(SetBoolVectorArray) (THIS_ BOOL *pData, UINT Offset, UINT Count) PURE; + STDMETHOD(SetIntVectorArray) (THIS_ int *pData, UINT Offset, UINT Count) PURE; + STDMETHOD(SetFloatVectorArray)(THIS_ float *pData, UINT Offset, UINT Count) PURE; + + STDMETHOD(GetBoolVectorArray) (THIS_ BOOL *pData, UINT Offset, UINT Count) PURE; + STDMETHOD(GetIntVectorArray) (THIS_ int *pData, UINT Offset, UINT Count) PURE; + STDMETHOD(GetFloatVectorArray)(THIS_ float *pData, UINT Offset, UINT Count) PURE; +}; + +////////////////////////////////////////////////////////////////////////////// +// ID3D10EffectMatrixVariable //////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +typedef interface ID3D10EffectMatrixVariable ID3D10EffectMatrixVariable; +typedef interface ID3D10EffectMatrixVariable *LPD3D10EFFECTMATRIXVARIABLE; + +// {50666C24-B82F-4eed-A172-5B6E7E8522E0} +DEFINE_GUID(IID_ID3D10EffectMatrixVariable, +0x50666c24, 0xb82f, 0x4eed, 0xa1, 0x72, 0x5b, 0x6e, 0x7e, 0x85, 0x22, 0xe0); + +#undef INTERFACE +#define INTERFACE ID3D10EffectMatrixVariable + +DECLARE_INTERFACE_(ID3D10EffectMatrixVariable, ID3D10EffectVariable) +{ + STDMETHOD_(BOOL, IsValid)(THIS) PURE; + STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE; + STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE; + + STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE; + + STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE; + STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE; + STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE; + STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE; + STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE; + STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE; + STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE; + STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE; + STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE; + + STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT ByteOffset, UINT ByteCount) PURE; + STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT ByteOffset, UINT ByteCount) PURE; + + STDMETHOD(SetMatrix)(THIS_ float *pData) PURE; + STDMETHOD(GetMatrix)(THIS_ float *pData) PURE; + + STDMETHOD(SetMatrixArray)(THIS_ float *pData, UINT Offset, UINT Count) PURE; + STDMETHOD(GetMatrixArray)(THIS_ float *pData, UINT Offset, UINT Count) PURE; + + STDMETHOD(SetMatrixTranspose)(THIS_ float *pData) PURE; + STDMETHOD(GetMatrixTranspose)(THIS_ float *pData) PURE; + + STDMETHOD(SetMatrixTransposeArray)(THIS_ float *pData, UINT Offset, UINT Count) PURE; + STDMETHOD(GetMatrixTransposeArray)(THIS_ float *pData, UINT Offset, UINT Count) PURE; +}; + +////////////////////////////////////////////////////////////////////////////// +// ID3D10EffectStringVariable //////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +typedef interface ID3D10EffectStringVariable ID3D10EffectStringVariable; +typedef interface ID3D10EffectStringVariable *LPD3D10EFFECTSTRINGVARIABLE; + +// {71417501-8DF9-4e0a-A78A-255F9756BAFF} +DEFINE_GUID(IID_ID3D10EffectStringVariable, +0x71417501, 0x8df9, 0x4e0a, 0xa7, 0x8a, 0x25, 0x5f, 0x97, 0x56, 0xba, 0xff); + +#undef INTERFACE +#define INTERFACE ID3D10EffectStringVariable + +DECLARE_INTERFACE_(ID3D10EffectStringVariable, ID3D10EffectVariable) +{ + STDMETHOD_(BOOL, IsValid)(THIS) PURE; + STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE; + STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE; + + STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE; + + STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE; + STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE; + STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE; + STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE; + STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE; + STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE; + STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE; + STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE; + STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE; + + STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; + STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; + + STDMETHOD(GetString)(THIS_ _Out_ LPCSTR *ppString) PURE; + STDMETHOD(GetStringArray)(THIS_ _Out_writes_(Count) LPCSTR *ppStrings, UINT Offset, UINT Count) PURE; +}; + +////////////////////////////////////////////////////////////////////////////// +// ID3D10EffectShaderResourceVariable //////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +typedef interface ID3D10EffectShaderResourceVariable ID3D10EffectShaderResourceVariable; +typedef interface ID3D10EffectShaderResourceVariable *LPD3D10EFFECTSHADERRESOURCEVARIABLE; + +// {C0A7157B-D872-4b1d-8073-EFC2ACD4B1FC} +DEFINE_GUID(IID_ID3D10EffectShaderResourceVariable, +0xc0a7157b, 0xd872, 0x4b1d, 0x80, 0x73, 0xef, 0xc2, 0xac, 0xd4, 0xb1, 0xfc); + + +#undef INTERFACE +#define INTERFACE ID3D10EffectShaderResourceVariable + +DECLARE_INTERFACE_(ID3D10EffectShaderResourceVariable, ID3D10EffectVariable) +{ + STDMETHOD_(BOOL, IsValid)(THIS) PURE; + STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE; + STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE; + + STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE; + + STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE; + STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE; + STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE; + STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE; + STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE; + STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE; + STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE; + STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE; + STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE; + + STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; + STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; + + STDMETHOD(SetResource)(THIS_ _In_opt_ ID3D10ShaderResourceView *pResource) PURE; + STDMETHOD(GetResource)(THIS_ _Out_ ID3D10ShaderResourceView **ppResource) PURE; + + STDMETHOD(SetResourceArray)(THIS_ _In_reads_(Count) ID3D10ShaderResourceView **ppResources, UINT Offset, UINT Count) PURE; + STDMETHOD(GetResourceArray)(THIS_ _Out_writes_(Count) ID3D10ShaderResourceView **ppResources, UINT Offset, UINT Count) PURE; +}; + +////////////////////////////////////////////////////////////////////////////// +// ID3D10EffectRenderTargetViewVariable ////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +typedef interface ID3D10EffectRenderTargetViewVariable ID3D10EffectRenderTargetViewVariable; +typedef interface ID3D10EffectRenderTargetViewVariable *LPD3D10EFFECTRENDERTARGETVIEWVARIABLE; + +// {28CA0CC3-C2C9-40bb-B57F-67B737122B17} +DEFINE_GUID(IID_ID3D10EffectRenderTargetViewVariable, +0x28ca0cc3, 0xc2c9, 0x40bb, 0xb5, 0x7f, 0x67, 0xb7, 0x37, 0x12, 0x2b, 0x17); + +#undef INTERFACE +#define INTERFACE ID3D10EffectRenderTargetViewVariable + +DECLARE_INTERFACE_(ID3D10EffectRenderTargetViewVariable, ID3D10EffectVariable) +{ + STDMETHOD_(BOOL, IsValid)(THIS) PURE; + STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE; + STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE; + + STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE; + + STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE; + STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE; + STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE; + STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE; + STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE; + STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE; + STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE; + STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE; + STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE; + + STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; + STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; + + STDMETHOD(SetRenderTarget)(THIS_ _In_opt_ ID3D10RenderTargetView *pResource) PURE; + STDMETHOD(GetRenderTarget)(THIS_ _Out_ ID3D10RenderTargetView **ppResource) PURE; + + STDMETHOD(SetRenderTargetArray)(THIS_ _In_reads_(Count) ID3D10RenderTargetView **ppResources, UINT Offset, UINT Count) PURE; + STDMETHOD(GetRenderTargetArray)(THIS_ _Out_writes_(Count) ID3D10RenderTargetView **ppResources, UINT Offset, UINT Count) PURE; +}; + +////////////////////////////////////////////////////////////////////////////// +// ID3D10EffectDepthStencilViewVariable ////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +typedef interface ID3D10EffectDepthStencilViewVariable ID3D10EffectDepthStencilViewVariable; +typedef interface ID3D10EffectDepthStencilViewVariable *LPD3D10EFFECTDEPTHSTENCILVIEWVARIABLE; + +// {3E02C918-CC79-4985-B622-2D92AD701623} +DEFINE_GUID(IID_ID3D10EffectDepthStencilViewVariable, +0x3e02c918, 0xcc79, 0x4985, 0xb6, 0x22, 0x2d, 0x92, 0xad, 0x70, 0x16, 0x23); + +#undef INTERFACE +#define INTERFACE ID3D10EffectDepthStencilViewVariable + +DECLARE_INTERFACE_(ID3D10EffectDepthStencilViewVariable, ID3D10EffectVariable) +{ + STDMETHOD_(BOOL, IsValid)(THIS) PURE; + STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE; + STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE; + + STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE; + + STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE; + STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE; + STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE; + STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE; + STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE; + STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE; + STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE; + STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE; + STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE; + + STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; + STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; + + STDMETHOD(SetDepthStencil)(THIS_ _In_opt_ ID3D10DepthStencilView *pResource) PURE; + STDMETHOD(GetDepthStencil)(THIS_ _Out_ ID3D10DepthStencilView **ppResource) PURE; + + STDMETHOD(SetDepthStencilArray)(THIS_ _In_reads_(Count) ID3D10DepthStencilView **ppResources, UINT Offset, UINT Count) PURE; + STDMETHOD(GetDepthStencilArray)(THIS_ _Out_writes_(Count) ID3D10DepthStencilView **ppResources, UINT Offset, UINT Count) PURE; +}; + +////////////////////////////////////////////////////////////////////////////// +// ID3D10EffectConstantBuffer //////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +typedef interface ID3D10EffectConstantBuffer ID3D10EffectConstantBuffer; +typedef interface ID3D10EffectConstantBuffer *LPD3D10EFFECTCONSTANTBUFFER; + +// {56648F4D-CC8B-4444-A5AD-B5A3D76E91B3} +DEFINE_GUID(IID_ID3D10EffectConstantBuffer, +0x56648f4d, 0xcc8b, 0x4444, 0xa5, 0xad, 0xb5, 0xa3, 0xd7, 0x6e, 0x91, 0xb3); + +#undef INTERFACE +#define INTERFACE ID3D10EffectConstantBuffer + +DECLARE_INTERFACE_(ID3D10EffectConstantBuffer, ID3D10EffectVariable) +{ + STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE; + STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE; + + STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE; + + STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE; + STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE; + STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE; + STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE; + STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE; + STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE; + STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE; + STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE; + STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE; + + STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; + STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; + + STDMETHOD(SetConstantBuffer)(THIS_ _In_opt_ ID3D10Buffer *pConstantBuffer) PURE; + STDMETHOD(GetConstantBuffer)(THIS_ _Out_ ID3D10Buffer **ppConstantBuffer) PURE; + + STDMETHOD(SetTextureBuffer)(THIS_ _In_opt_ ID3D10ShaderResourceView *pTextureBuffer) PURE; + STDMETHOD(GetTextureBuffer)(THIS_ _Out_ ID3D10ShaderResourceView **ppTextureBuffer) PURE; +}; + +////////////////////////////////////////////////////////////////////////////// +// ID3D10EffectShaderVariable //////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +//---------------------------------------------------------------------------- +// D3D10_EFFECT_SHADER_DESC: +// +// Retrieved by ID3D10EffectShaderVariable::GetShaderDesc() +//---------------------------------------------------------------------------- + +typedef struct _D3D10_EFFECT_SHADER_DESC +{ + CONST BYTE *pInputSignature; // Passed into CreateInputLayout, + // valid on VS and GS only + + BOOL IsInline; // Is this an anonymous shader variable + // resulting from an inline shader assignment? + + + // -- The following fields are not valid after Optimize() -- + CONST BYTE *pBytecode; // Shader bytecode + UINT BytecodeLength; + + LPCSTR SODecl; // Stream out declaration string (for GS with SO) + + UINT NumInputSignatureEntries; // Number of entries in the input signature + UINT NumOutputSignatureEntries; // Number of entries in the output signature +} D3D10_EFFECT_SHADER_DESC; + + +typedef interface ID3D10EffectShaderVariable ID3D10EffectShaderVariable; +typedef interface ID3D10EffectShaderVariable *LPD3D10EFFECTSHADERVARIABLE; + +// {80849279-C799-4797-8C33-0407A07D9E06} +DEFINE_GUID(IID_ID3D10EffectShaderVariable, +0x80849279, 0xc799, 0x4797, 0x8c, 0x33, 0x4, 0x7, 0xa0, 0x7d, 0x9e, 0x6); + +#undef INTERFACE +#define INTERFACE ID3D10EffectShaderVariable + +DECLARE_INTERFACE_(ID3D10EffectShaderVariable, ID3D10EffectVariable) +{ + STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE; + STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE; + + STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE; + + STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE; + STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE; + STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE; + STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE; + STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE; + STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE; + STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE; + STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE; + STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE; + + STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; + STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; + + STDMETHOD(GetShaderDesc)(THIS_ UINT ShaderIndex, _Out_ D3D10_EFFECT_SHADER_DESC *pDesc) PURE; + + STDMETHOD(GetVertexShader)(THIS_ UINT ShaderIndex, _Out_ ID3D10VertexShader **ppVS) PURE; + STDMETHOD(GetGeometryShader)(THIS_ UINT ShaderIndex, _Out_ ID3D10GeometryShader **ppGS) PURE; + STDMETHOD(GetPixelShader)(THIS_ UINT ShaderIndex, _Out_ ID3D10PixelShader **ppPS) PURE; + + STDMETHOD(GetInputSignatureElementDesc)(THIS_ UINT ShaderIndex, UINT Element, _Out_ D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE; + STDMETHOD(GetOutputSignatureElementDesc)(THIS_ UINT ShaderIndex, UINT Element, _Out_ D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE; +}; + +////////////////////////////////////////////////////////////////////////////// +// ID3D10EffectBlendVariable ///////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +typedef interface ID3D10EffectBlendVariable ID3D10EffectBlendVariable; +typedef interface ID3D10EffectBlendVariable *LPD3D10EFFECTBLENDVARIABLE; + +// {1FCD2294-DF6D-4eae-86B3-0E9160CFB07B} +DEFINE_GUID(IID_ID3D10EffectBlendVariable, +0x1fcd2294, 0xdf6d, 0x4eae, 0x86, 0xb3, 0xe, 0x91, 0x60, 0xcf, 0xb0, 0x7b); + +#undef INTERFACE +#define INTERFACE ID3D10EffectBlendVariable + +DECLARE_INTERFACE_(ID3D10EffectBlendVariable, ID3D10EffectVariable) +{ + STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE; + STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE; + + STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE; + + STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE; + STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE; + STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE; + STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE; + STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE; + STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE; + STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE; + STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE; + STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE; + + STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; + STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; + + STDMETHOD(GetBlendState)(THIS_ UINT Index, ID3D10BlendState **ppBlendState) PURE; + STDMETHOD(GetBackingStore)(THIS_ UINT Index, D3D10_BLEND_DESC *pBlendDesc) PURE; +}; + +////////////////////////////////////////////////////////////////////////////// +// ID3D10EffectDepthStencilVariable ////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +typedef interface ID3D10EffectDepthStencilVariable ID3D10EffectDepthStencilVariable; +typedef interface ID3D10EffectDepthStencilVariable *LPD3D10EFFECTDEPTHSTENCILVARIABLE; + +// {AF482368-330A-46a5-9A5C-01C71AF24C8D} +DEFINE_GUID(IID_ID3D10EffectDepthStencilVariable, +0xaf482368, 0x330a, 0x46a5, 0x9a, 0x5c, 0x1, 0xc7, 0x1a, 0xf2, 0x4c, 0x8d); + +#undef INTERFACE +#define INTERFACE ID3D10EffectDepthStencilVariable + +DECLARE_INTERFACE_(ID3D10EffectDepthStencilVariable, ID3D10EffectVariable) +{ + STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE; + STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE; + + STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE; + + STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE; + STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE; + STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE; + STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE; + STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE; + STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE; + STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE; + STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE; + STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE; + + STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; + STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; + + STDMETHOD(GetDepthStencilState)(THIS_ UINT Index, _Out_ ID3D10DepthStencilState **ppDepthStencilState) PURE; + STDMETHOD(GetBackingStore)(THIS_ UINT Index, _Out_ D3D10_DEPTH_STENCIL_DESC *pDepthStencilDesc) PURE; +}; + +////////////////////////////////////////////////////////////////////////////// +// ID3D10EffectRasterizerVariable //////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +typedef interface ID3D10EffectRasterizerVariable ID3D10EffectRasterizerVariable; +typedef interface ID3D10EffectRasterizerVariable *LPD3D10EFFECTRASTERIZERVARIABLE; + +// {21AF9F0E-4D94-4ea9-9785-2CB76B8C0B34} +DEFINE_GUID(IID_ID3D10EffectRasterizerVariable, +0x21af9f0e, 0x4d94, 0x4ea9, 0x97, 0x85, 0x2c, 0xb7, 0x6b, 0x8c, 0xb, 0x34); + +#undef INTERFACE +#define INTERFACE ID3D10EffectRasterizerVariable + +DECLARE_INTERFACE_(ID3D10EffectRasterizerVariable, ID3D10EffectVariable) +{ + STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE; + STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE; + + STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE; + + STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE; + STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE; + STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE; + STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE; + STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE; + STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE; + STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE; + STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE; + STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE; + + STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; + STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; + + STDMETHOD(GetRasterizerState)(THIS_ UINT Index, _Out_ ID3D10RasterizerState **ppRasterizerState) PURE; + STDMETHOD(GetBackingStore)(THIS_ UINT Index, _Out_ D3D10_RASTERIZER_DESC *pRasterizerDesc) PURE; +}; + +////////////////////////////////////////////////////////////////////////////// +// ID3D10EffectSamplerVariable /////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +typedef interface ID3D10EffectSamplerVariable ID3D10EffectSamplerVariable; +typedef interface ID3D10EffectSamplerVariable *LPD3D10EFFECTSAMPLERVARIABLE; + +// {6530D5C7-07E9-4271-A418-E7CE4BD1E480} +DEFINE_GUID(IID_ID3D10EffectSamplerVariable, +0x6530d5c7, 0x7e9, 0x4271, 0xa4, 0x18, 0xe7, 0xce, 0x4b, 0xd1, 0xe4, 0x80); + +#undef INTERFACE +#define INTERFACE ID3D10EffectSamplerVariable + +DECLARE_INTERFACE_(ID3D10EffectSamplerVariable, ID3D10EffectVariable) +{ + STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE; + STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE; + + STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE; + + STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE; + STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE; + STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE; + STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE; + STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE; + STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE; + STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE; + STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE; + STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE; + STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE; + STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE; + + STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; + STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE; + + STDMETHOD(GetSampler)(THIS_ UINT Index, _Out_ ID3D10SamplerState **ppSampler) PURE; + STDMETHOD(GetBackingStore)(THIS_ UINT Index, _Out_ D3D10_SAMPLER_DESC *pSamplerDesc) PURE; +}; + +////////////////////////////////////////////////////////////////////////////// +// ID3D10EffectPass ////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +//---------------------------------------------------------------------------- +// D3D10_PASS_DESC: +// +// Retrieved by ID3D10EffectPass::GetDesc() +//---------------------------------------------------------------------------- + +typedef struct _D3D10_PASS_DESC +{ + LPCSTR Name; // Name of this pass (NULL if not anonymous) + UINT Annotations; // Number of annotations on this pass + + BYTE *pIAInputSignature; // Signature from VS or GS (if there is no VS) + // or NULL if neither exists + SIZE_T IAInputSignatureSize; // Singature size in bytes + + UINT StencilRef; // Specified in SetDepthStencilState() + UINT SampleMask; // Specified in SetBlendState() + FLOAT BlendFactor[4]; // Specified in SetBlendState() +} D3D10_PASS_DESC; + +//---------------------------------------------------------------------------- +// D3D10_PASS_SHADER_DESC: +// +// Retrieved by ID3D10EffectPass::Get**ShaderDesc() +//---------------------------------------------------------------------------- + +typedef struct _D3D10_PASS_SHADER_DESC +{ + ID3D10EffectShaderVariable *pShaderVariable; // The variable that this shader came from. + // If this is an inline shader assignment, + // the returned interface will be an + // anonymous shader variable, which is + // not retrievable any other way. It's + // name in the variable description will + // be "$Anonymous". + // If there is no assignment of this type in + // the pass block, pShaderVariable != NULL, + // but pShaderVariable->IsValid() == FALSE. + + UINT ShaderIndex; // The element of pShaderVariable (if an array) + // or 0 if not applicable +} D3D10_PASS_SHADER_DESC; + +typedef interface ID3D10EffectPass ID3D10EffectPass; +typedef interface ID3D10EffectPass *LPD3D10EFFECTPASS; + +// {5CFBEB89-1A06-46e0-B282-E3F9BFA36A54} +DEFINE_GUID(IID_ID3D10EffectPass, +0x5cfbeb89, 0x1a06, 0x46e0, 0xb2, 0x82, 0xe3, 0xf9, 0xbf, 0xa3, 0x6a, 0x54); + +#undef INTERFACE +#define INTERFACE ID3D10EffectPass + +DECLARE_INTERFACE(ID3D10EffectPass) +{ + STDMETHOD_(BOOL, IsValid)(THIS) PURE; + STDMETHOD(GetDesc)(THIS_ D3D10_PASS_DESC *pDesc) PURE; + + STDMETHOD(GetVertexShaderDesc)(THIS_ D3D10_PASS_SHADER_DESC *pDesc) PURE; + STDMETHOD(GetGeometryShaderDesc)(THIS_ D3D10_PASS_SHADER_DESC *pDesc) PURE; + STDMETHOD(GetPixelShaderDesc)(THIS_ D3D10_PASS_SHADER_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD(Apply)(THIS_ UINT Flags) PURE; + + STDMETHOD(ComputeStateBlockMask)(THIS_ _Out_ D3D10_STATE_BLOCK_MASK *pStateBlockMask) PURE; +}; + +////////////////////////////////////////////////////////////////////////////// +// ID3D10EffectTechnique ///////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +//---------------------------------------------------------------------------- +// D3D10_TECHNIQUE_DESC: +// +// Retrieved by ID3D10EffectTechnique::GetDesc() +//---------------------------------------------------------------------------- + +typedef struct _D3D10_TECHNIQUE_DESC +{ + LPCSTR Name; // Name of this technique (NULL if not anonymous) + UINT Passes; // Number of passes contained within + UINT Annotations; // Number of annotations on this technique +} D3D10_TECHNIQUE_DESC; + +typedef interface ID3D10EffectTechnique ID3D10EffectTechnique; +typedef interface ID3D10EffectTechnique *LPD3D10EFFECTTECHNIQUE; + +// {DB122CE8-D1C9-4292-B237-24ED3DE8B175} +DEFINE_GUID(IID_ID3D10EffectTechnique, +0xdb122ce8, 0xd1c9, 0x4292, 0xb2, 0x37, 0x24, 0xed, 0x3d, 0xe8, 0xb1, 0x75); + +#undef INTERFACE +#define INTERFACE ID3D10EffectTechnique + +DECLARE_INTERFACE(ID3D10EffectTechnique) +{ + STDMETHOD_(BOOL, IsValid)(THIS) PURE; + STDMETHOD(GetDesc)(THIS_ D3D10_TECHNIQUE_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD_(ID3D10EffectPass*, GetPassByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectPass*, GetPassByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD(ComputeStateBlockMask)(THIS_ _Out_ D3D10_STATE_BLOCK_MASK *pStateBlockMask) PURE; +}; + +////////////////////////////////////////////////////////////////////////////// +// ID3D10Effect ////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +//---------------------------------------------------------------------------- +// D3D10_EFFECT_DESC: +// +// Retrieved by ID3D10Effect::GetDesc() +//---------------------------------------------------------------------------- + +typedef struct _D3D10_EFFECT_DESC +{ + + BOOL IsChildEffect; // TRUE if this is a child effect, + // FALSE if this is standalone or an effect pool. + + UINT ConstantBuffers; // Number of constant buffers in this effect, + // excluding the effect pool. + UINT SharedConstantBuffers; // Number of constant buffers shared in this + // effect's pool. + + UINT GlobalVariables; // Number of global variables in this effect, + // excluding the effect pool. + UINT SharedGlobalVariables; // Number of global variables shared in this + // effect's pool. + + UINT Techniques; // Number of techniques in this effect, + // excluding the effect pool. +} D3D10_EFFECT_DESC; + +typedef interface ID3D10Effect ID3D10Effect; +typedef interface ID3D10Effect *LPD3D10EFFECT; + +// {51B0CA8B-EC0B-4519-870D-8EE1CB5017C7} +DEFINE_GUID(IID_ID3D10Effect, +0x51b0ca8b, 0xec0b, 0x4519, 0x87, 0xd, 0x8e, 0xe1, 0xcb, 0x50, 0x17, 0xc7); + +#undef INTERFACE +#define INTERFACE ID3D10Effect + +DECLARE_INTERFACE_(ID3D10Effect, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + STDMETHOD_(BOOL, IsValid)(THIS) PURE; + STDMETHOD_(BOOL, IsPool)(THIS) PURE; + + // Managing D3D Device + STDMETHOD(GetDevice)(THIS_ _Out_ ID3D10Device** ppDevice) PURE; + + // New Reflection APIs + STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10EffectConstantBuffer*, GetConstantBufferByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectConstantBuffer*, GetConstantBufferByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD_(ID3D10EffectVariable*, GetVariableByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetVariableByName)(THIS_ LPCSTR Name) PURE; + STDMETHOD_(ID3D10EffectVariable*, GetVariableBySemantic)(THIS_ LPCSTR Semantic) PURE; + + STDMETHOD_(ID3D10EffectTechnique*, GetTechniqueByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10EffectTechnique*, GetTechniqueByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD(Optimize)(THIS) PURE; + STDMETHOD_(BOOL, IsOptimized)(THIS) PURE; + +}; + +////////////////////////////////////////////////////////////////////////////// +// ID3D10EffectPool ////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +typedef interface ID3D10EffectPool ID3D10EffectPool; +typedef interface ID3D10EffectPool *LPD3D10EFFECTPOOL; + +// {9537AB04-3250-412e-8213-FCD2F8677933} +DEFINE_GUID(IID_ID3D10EffectPool, +0x9537ab04, 0x3250, 0x412e, 0x82, 0x13, 0xfc, 0xd2, 0xf8, 0x67, 0x79, 0x33); + +#undef INTERFACE +#define INTERFACE ID3D10EffectPool + +DECLARE_INTERFACE_(ID3D10EffectPool, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + STDMETHOD_(ID3D10Effect*, AsEffect)(THIS) PURE; + + // No public methods +}; + +////////////////////////////////////////////////////////////////////////////// +// APIs ////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + +//---------------------------------------------------------------------------- +// D3D10CreateEffectFromXXXX: +// -------------------------- +// Creates an effect from a binary effect or file +// +// Parameters: +// +// [in] +// +// +// pData +// Blob of effect data, either ASCII (uncompiled, for D3D10CompileEffectFromMemory) or binary (compiled, for D3D10CreateEffect*) +// DataLength +// Length of the data blob +// +// pSrcFileName +// Name of the ASCII Effect file pData was obtained from +// +// pDefines +// Optional NULL-terminated array of preprocessor macro definitions. +// pInclude +// Optional interface pointer to use for handling #include directives. +// If this parameter is NULL, #includes will be honored when compiling +// from file, and will error when compiling from resource or memory. +// HLSLFlags +// Compilation flags pertaining to shaders and data types, honored by +// the HLSL compiler +// FXFlags +// Compilation flags pertaining to Effect compilation, honored +// by the Effect compiler +// pDevice +// Pointer to the D3D10 device on which to create Effect resources +// pEffectPool +// Pointer to an Effect pool to share variables with or NULL +// +// [out] +// +// ppEffect +// Address of the newly created Effect interface +// ppEffectPool +// Address of the newly created Effect pool interface +// ppErrors +// If non-NULL, address of a buffer with error messages that occurred +// during parsing or compilation +// +//---------------------------------------------------------------------------- + +HRESULT WINAPI D3D10CompileEffectFromMemory(_In_reads_bytes_(DataLength) void *pData, SIZE_T DataLength, LPCSTR pSrcFileName, _In_opt_ CONST D3D10_SHADER_MACRO *pDefines, + _In_opt_ ID3D10Include *pInclude, UINT HLSLFlags, UINT FXFlags, + _Out_ ID3D10Blob **ppCompiledEffect, _Out_opt_ ID3D10Blob **ppErrors); + +HRESULT WINAPI D3D10CreateEffectFromMemory(_In_reads_bytes_(DataLength) void *pData, SIZE_T DataLength, UINT FXFlags, _In_ ID3D10Device *pDevice, + _In_opt_ ID3D10EffectPool *pEffectPool, _Out_ ID3D10Effect **ppEffect); + +HRESULT WINAPI D3D10CreateEffectPoolFromMemory(_In_reads_bytes_(DataLength) void *pData, SIZE_T DataLength, UINT FXFlags, _In_ ID3D10Device *pDevice, + _Out_ ID3D10EffectPool **ppEffectPool); + + +//---------------------------------------------------------------------------- +// D3D10DisassembleEffect: +// ----------------------- +// Takes an effect interface, and returns a buffer containing text assembly. +// +// Parameters: +// pEffect +// Pointer to the runtime effect interface. +// EnableColorCode +// Emit HTML tags for color coding the output? +// ppDisassembly +// Returns a buffer containing the disassembled effect. +//---------------------------------------------------------------------------- + +HRESULT WINAPI D3D10DisassembleEffect(_In_ ID3D10Effect *pEffect, BOOL EnableColorCode, _Out_ ID3D10Blob **ppDisassembly); + +#ifdef __cplusplus +} +#endif //__cplusplus + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ + +#endif //__D3D10EFFECT_H__ + + diff --git a/gfx/include/dxsdk/d3d10misc.h b/gfx/include/dxsdk/d3d10misc.h new file mode 100644 index 0000000000..59da4e1c00 --- /dev/null +++ b/gfx/include/dxsdk/d3d10misc.h @@ -0,0 +1,151 @@ +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// File: D3D10Misc.h +// Content: D3D10 Device Creation APIs +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef __D3D10MISC_H__ +#define __D3D10MISC_H__ + +#include "d3d10.h" + +// ID3D10Blob has been made version-neutral and moved to d3dcommon.h. + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + +/*#include */ + +/*#pragma region Desktop Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ + +/////////////////////////////////////////////////////////////////////////// +// D3D10_DRIVER_TYPE +// ---------------- +// +// This identifier is used to determine the implementation of Direct3D10 +// to be used. +// +// Pass one of these values to D3D10CreateDevice +// +/////////////////////////////////////////////////////////////////////////// +typedef enum D3D10_DRIVER_TYPE +{ + D3D10_DRIVER_TYPE_HARDWARE = 0, + D3D10_DRIVER_TYPE_REFERENCE = 1, + D3D10_DRIVER_TYPE_NULL = 2, + D3D10_DRIVER_TYPE_SOFTWARE = 3, + D3D10_DRIVER_TYPE_WARP = 5, +} D3D10_DRIVER_TYPE; + +DEFINE_GUID(GUID_DeviceType, +0xd722fb4d, 0x7a68, 0x437a, 0xb2, 0x0c, 0x58, 0x04, 0xee, 0x24, 0x94, 0xa6); + +/////////////////////////////////////////////////////////////////////////// +// D3D10CreateDevice +// ------------------ +// +// pAdapter +// If NULL, D3D10CreateDevice will choose the primary adapter and +// create a new instance from a temporarily created IDXGIFactory. +// If non-NULL, D3D10CreateDevice will register the appropriate +// device, if necessary (via IDXGIAdapter::RegisterDrver), before +// creating the device. +// DriverType +// Specifies the driver type to be created: hardware, reference or +// null. +// Software +// HMODULE of a DLL implementing a software rasterizer. Must be NULL for +// non-Software driver types. +// Flags +// Any of those documented for D3D10CreateDevice. +// SDKVersion +// SDK version. Use the D3D10_SDK_VERSION macro. +// ppDevice +// Pointer to returned interface. +// +// Return Values +// Any of those documented for +// CreateDXGIFactory +// IDXGIFactory::EnumAdapters +// IDXGIAdapter::RegisterDriver +// D3D10CreateDevice +// +/////////////////////////////////////////////////////////////////////////// +HRESULT WINAPI D3D10CreateDevice( + _In_opt_ IDXGIAdapter *pAdapter, + D3D10_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + UINT SDKVersion, + _Out_opt_ ID3D10Device **ppDevice); + +/////////////////////////////////////////////////////////////////////////// +// D3D10CreateDeviceAndSwapChain +// ------------------------------ +// +// ppAdapter +// If NULL, D3D10CreateDevice will choose the primary adapter and +// create a new instance from a temporarily created IDXGIFactory. +// If non-NULL, D3D10CreateDevice will register the appropriate +// device, if necessary (via IDXGIAdapter::RegisterDrver), before +// creating the device. +// DriverType +// Specifies the driver type to be created: hardware, reference or +// null. +// Software +// HMODULE of a DLL implementing a software rasterizer. Must be NULL for +// non-Software driver types. +// Flags +// Any of those documented for D3D10CreateDevice. +// SDKVersion +// SDK version. Use the D3D10_SDK_VERSION macro. +// pSwapChainDesc +// Swap chain description, may be NULL. +// ppSwapChain +// Pointer to returned interface. May be NULL. +// ppDevice +// Pointer to returned interface. +// +// Return Values +// Any of those documented for +// CreateDXGIFactory +// IDXGIFactory::EnumAdapters +// IDXGIAdapter::RegisterDriver +// D3D10CreateDevice +// IDXGIFactory::CreateSwapChain +// +/////////////////////////////////////////////////////////////////////////// +HRESULT WINAPI D3D10CreateDeviceAndSwapChain( + _In_opt_ IDXGIAdapter *pAdapter, + D3D10_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + UINT SDKVersion, + _In_opt_ DXGI_SWAP_CHAIN_DESC *pSwapChainDesc, + _Out_opt_ IDXGISwapChain **ppSwapChain, + _Out_opt_ ID3D10Device **ppDevice); + + +/////////////////////////////////////////////////////////////////////////// +// D3D10CreateBlob: +// ----------------- +// Creates a Buffer of n Bytes +////////////////////////////////////////////////////////////////////////// + +HRESULT WINAPI D3D10CreateBlob(SIZE_T NumBytes, _Out_ LPD3D10BLOB *ppBuffer); + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ + +#ifdef __cplusplus +} +#endif //__cplusplus + +#endif //__D3D10EFFECT_H__ + + diff --git a/gfx/include/dxsdk/d3d10sdklayers.h b/gfx/include/dxsdk/d3d10sdklayers.h new file mode 100644 index 0000000000..c2ee81e700 --- /dev/null +++ b/gfx/include/dxsdk/d3d10sdklayers.h @@ -0,0 +1,1400 @@ +/*------------------------------------------------------------------------------------- + * + * Copyright (c) Microsoft Corporation + * + *-------------------------------------------------------------------------------------*/ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ +/* @@MIDL_FILE_HEADING( ) */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __d3d10sdklayers_h__ +#define __d3d10sdklayers_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __ID3D10Debug_FWD_DEFINED__ +#define __ID3D10Debug_FWD_DEFINED__ +typedef interface ID3D10Debug ID3D10Debug; + +#endif /* __ID3D10Debug_FWD_DEFINED__ */ + + +#ifndef __ID3D10SwitchToRef_FWD_DEFINED__ +#define __ID3D10SwitchToRef_FWD_DEFINED__ +typedef interface ID3D10SwitchToRef ID3D10SwitchToRef; + +#endif /* __ID3D10SwitchToRef_FWD_DEFINED__ */ + + +#ifndef __ID3D10InfoQueue_FWD_DEFINED__ +#define __ID3D10InfoQueue_FWD_DEFINED__ +typedef interface ID3D10InfoQueue ID3D10InfoQueue; + +#endif /* __ID3D10InfoQueue_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "dxgi.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_d3d10sdklayers_0000_0000 */ +/* [local] */ + +/*#include */ +/*#pragma region Desktop Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ +#define D3D10_SDK_LAYERS_VERSION ( 11 ) + +#define D3D10_DEBUG_FEATURE_FLUSH_PER_RENDER_OP ( 0x1 ) + +#define D3D10_DEBUG_FEATURE_FINISH_PER_RENDER_OP ( 0x2 ) + +#define D3D10_DEBUG_FEATURE_PRESENT_PER_RENDER_OP ( 0x4 ) + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10sdklayers_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10sdklayers_0000_0000_v0_0_s_ifspec; + +#ifndef __ID3D10Debug_INTERFACE_DEFINED__ +#define __ID3D10Debug_INTERFACE_DEFINED__ + +/* interface ID3D10Debug */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10Debug; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4E01-342C-4106-A19F-4F2704F689F0") + ID3D10Debug : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetFeatureMask( + UINT Mask) = 0; + + virtual UINT STDMETHODCALLTYPE GetFeatureMask( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPresentPerRenderOpDelay( + UINT Milliseconds) = 0; + + virtual UINT STDMETHODCALLTYPE GetPresentPerRenderOpDelay( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetSwapChain( + /* [annotation] */ + _In_opt_ IDXGISwapChain *pSwapChain) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSwapChain( + /* [annotation] */ + _Out_ IDXGISwapChain **ppSwapChain) = 0; + + virtual HRESULT STDMETHODCALLTYPE Validate( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10DebugVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10Debug * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10Debug * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10Debug * This); + + HRESULT ( STDMETHODCALLTYPE *SetFeatureMask )( + ID3D10Debug * This, + UINT Mask); + + UINT ( STDMETHODCALLTYPE *GetFeatureMask )( + ID3D10Debug * This); + + HRESULT ( STDMETHODCALLTYPE *SetPresentPerRenderOpDelay )( + ID3D10Debug * This, + UINT Milliseconds); + + UINT ( STDMETHODCALLTYPE *GetPresentPerRenderOpDelay )( + ID3D10Debug * This); + + HRESULT ( STDMETHODCALLTYPE *SetSwapChain )( + ID3D10Debug * This, + /* [annotation] */ + _In_opt_ IDXGISwapChain *pSwapChain); + + HRESULT ( STDMETHODCALLTYPE *GetSwapChain )( + ID3D10Debug * This, + /* [annotation] */ + _Out_ IDXGISwapChain **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *Validate )( + ID3D10Debug * This); + + END_INTERFACE + } ID3D10DebugVtbl; + + interface ID3D10Debug + { + CONST_VTBL struct ID3D10DebugVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10Debug_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10Debug_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10Debug_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10Debug_SetFeatureMask(This,Mask) \ + ( (This)->lpVtbl -> SetFeatureMask(This,Mask) ) + +#define ID3D10Debug_GetFeatureMask(This) \ + ( (This)->lpVtbl -> GetFeatureMask(This) ) + +#define ID3D10Debug_SetPresentPerRenderOpDelay(This,Milliseconds) \ + ( (This)->lpVtbl -> SetPresentPerRenderOpDelay(This,Milliseconds) ) + +#define ID3D10Debug_GetPresentPerRenderOpDelay(This) \ + ( (This)->lpVtbl -> GetPresentPerRenderOpDelay(This) ) + +#define ID3D10Debug_SetSwapChain(This,pSwapChain) \ + ( (This)->lpVtbl -> SetSwapChain(This,pSwapChain) ) + +#define ID3D10Debug_GetSwapChain(This,ppSwapChain) \ + ( (This)->lpVtbl -> GetSwapChain(This,ppSwapChain) ) + +#define ID3D10Debug_Validate(This) \ + ( (This)->lpVtbl -> Validate(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10Debug_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D10SwitchToRef_INTERFACE_DEFINED__ +#define __ID3D10SwitchToRef_INTERFACE_DEFINED__ + +/* interface ID3D10SwitchToRef */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10SwitchToRef; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4E02-342C-4106-A19F-4F2704F689F0") + ID3D10SwitchToRef : public IUnknown + { + public: + virtual BOOL STDMETHODCALLTYPE SetUseRef( + BOOL UseRef) = 0; + + virtual BOOL STDMETHODCALLTYPE GetUseRef( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10SwitchToRefVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10SwitchToRef * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10SwitchToRef * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10SwitchToRef * This); + + BOOL ( STDMETHODCALLTYPE *SetUseRef )( + ID3D10SwitchToRef * This, + BOOL UseRef); + + BOOL ( STDMETHODCALLTYPE *GetUseRef )( + ID3D10SwitchToRef * This); + + END_INTERFACE + } ID3D10SwitchToRefVtbl; + + interface ID3D10SwitchToRef + { + CONST_VTBL struct ID3D10SwitchToRefVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10SwitchToRef_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10SwitchToRef_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10SwitchToRef_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10SwitchToRef_SetUseRef(This,UseRef) \ + ( (This)->lpVtbl -> SetUseRef(This,UseRef) ) + +#define ID3D10SwitchToRef_GetUseRef(This) \ + ( (This)->lpVtbl -> GetUseRef(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10SwitchToRef_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10sdklayers_0000_0002 */ +/* [local] */ + +DEFINE_GUID(DXGI_DEBUG_D3D10, 0x243b4c52, 0x3606, 0x4d3a, 0x99, 0xd7, 0xa7, 0xe7, 0xb3, 0x3e, 0xd7, 0x6); +#define D3D10_REGKEY_PATH __TEXT("Software\\Microsoft\\Direct3D") +#define D3D10_MUTE_DEBUG_OUTPUT __TEXT("MuteDebugOutput") +#define D3D10_ENABLE_BREAK_ON_MESSAGE __TEXT("EnableBreakOnMessage") +#define D3D10_INFOQUEUE_STORAGE_FILTER_OVERRIDE __TEXT("InfoQueueStorageFilterOverride") +#define D3D10_MUTE_CATEGORY __TEXT("Mute_CATEGORY_%s") +#define D3D10_MUTE_SEVERITY __TEXT("Mute_SEVERITY_%s") +#define D3D10_MUTE_ID_STRING __TEXT("Mute_ID_%s") +#define D3D10_MUTE_ID_DECIMAL __TEXT("Mute_ID_%d") +#define D3D10_UNMUTE_SEVERITY_INFO __TEXT("Unmute_SEVERITY_INFO") +#define D3D10_BREAKON_CATEGORY __TEXT("BreakOn_CATEGORY_%s") +#define D3D10_BREAKON_SEVERITY __TEXT("BreakOn_SEVERITY_%s") +#define D3D10_BREAKON_ID_STRING __TEXT("BreakOn_ID_%s") +#define D3D10_BREAKON_ID_DECIMAL __TEXT("BreakOn_ID_%d") +#define D3D10_APPSIZE_STRING __TEXT("Size") +#define D3D10_APPNAME_STRING __TEXT("Name") +typedef +enum D3D10_MESSAGE_CATEGORY + { + D3D10_MESSAGE_CATEGORY_APPLICATION_DEFINED = 0, + D3D10_MESSAGE_CATEGORY_MISCELLANEOUS = ( D3D10_MESSAGE_CATEGORY_APPLICATION_DEFINED + 1 ) , + D3D10_MESSAGE_CATEGORY_INITIALIZATION = ( D3D10_MESSAGE_CATEGORY_MISCELLANEOUS + 1 ) , + D3D10_MESSAGE_CATEGORY_CLEANUP = ( D3D10_MESSAGE_CATEGORY_INITIALIZATION + 1 ) , + D3D10_MESSAGE_CATEGORY_COMPILATION = ( D3D10_MESSAGE_CATEGORY_CLEANUP + 1 ) , + D3D10_MESSAGE_CATEGORY_STATE_CREATION = ( D3D10_MESSAGE_CATEGORY_COMPILATION + 1 ) , + D3D10_MESSAGE_CATEGORY_STATE_SETTING = ( D3D10_MESSAGE_CATEGORY_STATE_CREATION + 1 ) , + D3D10_MESSAGE_CATEGORY_STATE_GETTING = ( D3D10_MESSAGE_CATEGORY_STATE_SETTING + 1 ) , + D3D10_MESSAGE_CATEGORY_RESOURCE_MANIPULATION = ( D3D10_MESSAGE_CATEGORY_STATE_GETTING + 1 ) , + D3D10_MESSAGE_CATEGORY_EXECUTION = ( D3D10_MESSAGE_CATEGORY_RESOURCE_MANIPULATION + 1 ) , + D3D10_MESSAGE_CATEGORY_SHADER = ( D3D10_MESSAGE_CATEGORY_EXECUTION + 1 ) + } D3D10_MESSAGE_CATEGORY; + +typedef +enum D3D10_MESSAGE_SEVERITY + { + D3D10_MESSAGE_SEVERITY_CORRUPTION = 0, + D3D10_MESSAGE_SEVERITY_ERROR = ( D3D10_MESSAGE_SEVERITY_CORRUPTION + 1 ) , + D3D10_MESSAGE_SEVERITY_WARNING = ( D3D10_MESSAGE_SEVERITY_ERROR + 1 ) , + D3D10_MESSAGE_SEVERITY_INFO = ( D3D10_MESSAGE_SEVERITY_WARNING + 1 ) , + D3D10_MESSAGE_SEVERITY_MESSAGE = ( D3D10_MESSAGE_SEVERITY_INFO + 1 ) + } D3D10_MESSAGE_SEVERITY; + +typedef +enum D3D10_MESSAGE_ID + { + D3D10_MESSAGE_ID_UNKNOWN = 0, + D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_HAZARD = ( D3D10_MESSAGE_ID_UNKNOWN + 1 ) , + D3D10_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_HAZARD = ( D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_HAZARD + 1 ) , + D3D10_MESSAGE_ID_DEVICE_VSSETSHADERRESOURCES_HAZARD = ( D3D10_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_HAZARD + 1 ) , + D3D10_MESSAGE_ID_DEVICE_VSSETCONSTANTBUFFERS_HAZARD = ( D3D10_MESSAGE_ID_DEVICE_VSSETSHADERRESOURCES_HAZARD + 1 ) , + D3D10_MESSAGE_ID_DEVICE_GSSETSHADERRESOURCES_HAZARD = ( D3D10_MESSAGE_ID_DEVICE_VSSETCONSTANTBUFFERS_HAZARD + 1 ) , + D3D10_MESSAGE_ID_DEVICE_GSSETCONSTANTBUFFERS_HAZARD = ( D3D10_MESSAGE_ID_DEVICE_GSSETSHADERRESOURCES_HAZARD + 1 ) , + D3D10_MESSAGE_ID_DEVICE_PSSETSHADERRESOURCES_HAZARD = ( D3D10_MESSAGE_ID_DEVICE_GSSETCONSTANTBUFFERS_HAZARD + 1 ) , + D3D10_MESSAGE_ID_DEVICE_PSSETCONSTANTBUFFERS_HAZARD = ( D3D10_MESSAGE_ID_DEVICE_PSSETSHADERRESOURCES_HAZARD + 1 ) , + D3D10_MESSAGE_ID_DEVICE_OMSETRENDERTARGETS_HAZARD = ( D3D10_MESSAGE_ID_DEVICE_PSSETCONSTANTBUFFERS_HAZARD + 1 ) , + D3D10_MESSAGE_ID_DEVICE_SOSETTARGETS_HAZARD = ( D3D10_MESSAGE_ID_DEVICE_OMSETRENDERTARGETS_HAZARD + 1 ) , + D3D10_MESSAGE_ID_STRING_FROM_APPLICATION = ( D3D10_MESSAGE_ID_DEVICE_SOSETTARGETS_HAZARD + 1 ) , + D3D10_MESSAGE_ID_CORRUPTED_THIS = ( D3D10_MESSAGE_ID_STRING_FROM_APPLICATION + 1 ) , + D3D10_MESSAGE_ID_CORRUPTED_PARAMETER1 = ( D3D10_MESSAGE_ID_CORRUPTED_THIS + 1 ) , + D3D10_MESSAGE_ID_CORRUPTED_PARAMETER2 = ( D3D10_MESSAGE_ID_CORRUPTED_PARAMETER1 + 1 ) , + D3D10_MESSAGE_ID_CORRUPTED_PARAMETER3 = ( D3D10_MESSAGE_ID_CORRUPTED_PARAMETER2 + 1 ) , + D3D10_MESSAGE_ID_CORRUPTED_PARAMETER4 = ( D3D10_MESSAGE_ID_CORRUPTED_PARAMETER3 + 1 ) , + D3D10_MESSAGE_ID_CORRUPTED_PARAMETER5 = ( D3D10_MESSAGE_ID_CORRUPTED_PARAMETER4 + 1 ) , + D3D10_MESSAGE_ID_CORRUPTED_PARAMETER6 = ( D3D10_MESSAGE_ID_CORRUPTED_PARAMETER5 + 1 ) , + D3D10_MESSAGE_ID_CORRUPTED_PARAMETER7 = ( D3D10_MESSAGE_ID_CORRUPTED_PARAMETER6 + 1 ) , + D3D10_MESSAGE_ID_CORRUPTED_PARAMETER8 = ( D3D10_MESSAGE_ID_CORRUPTED_PARAMETER7 + 1 ) , + D3D10_MESSAGE_ID_CORRUPTED_PARAMETER9 = ( D3D10_MESSAGE_ID_CORRUPTED_PARAMETER8 + 1 ) , + D3D10_MESSAGE_ID_CORRUPTED_PARAMETER10 = ( D3D10_MESSAGE_ID_CORRUPTED_PARAMETER9 + 1 ) , + D3D10_MESSAGE_ID_CORRUPTED_PARAMETER11 = ( D3D10_MESSAGE_ID_CORRUPTED_PARAMETER10 + 1 ) , + D3D10_MESSAGE_ID_CORRUPTED_PARAMETER12 = ( D3D10_MESSAGE_ID_CORRUPTED_PARAMETER11 + 1 ) , + D3D10_MESSAGE_ID_CORRUPTED_PARAMETER13 = ( D3D10_MESSAGE_ID_CORRUPTED_PARAMETER12 + 1 ) , + D3D10_MESSAGE_ID_CORRUPTED_PARAMETER14 = ( D3D10_MESSAGE_ID_CORRUPTED_PARAMETER13 + 1 ) , + D3D10_MESSAGE_ID_CORRUPTED_PARAMETER15 = ( D3D10_MESSAGE_ID_CORRUPTED_PARAMETER14 + 1 ) , + D3D10_MESSAGE_ID_CORRUPTED_MULTITHREADING = ( D3D10_MESSAGE_ID_CORRUPTED_PARAMETER15 + 1 ) , + D3D10_MESSAGE_ID_MESSAGE_REPORTING_OUTOFMEMORY = ( D3D10_MESSAGE_ID_CORRUPTED_MULTITHREADING + 1 ) , + D3D10_MESSAGE_ID_IASETINPUTLAYOUT_UNBINDDELETINGOBJECT = ( D3D10_MESSAGE_ID_MESSAGE_REPORTING_OUTOFMEMORY + 1 ) , + D3D10_MESSAGE_ID_IASETVERTEXBUFFERS_UNBINDDELETINGOBJECT = ( D3D10_MESSAGE_ID_IASETINPUTLAYOUT_UNBINDDELETINGOBJECT + 1 ) , + D3D10_MESSAGE_ID_IASETINDEXBUFFER_UNBINDDELETINGOBJECT = ( D3D10_MESSAGE_ID_IASETVERTEXBUFFERS_UNBINDDELETINGOBJECT + 1 ) , + D3D10_MESSAGE_ID_VSSETSHADER_UNBINDDELETINGOBJECT = ( D3D10_MESSAGE_ID_IASETINDEXBUFFER_UNBINDDELETINGOBJECT + 1 ) , + D3D10_MESSAGE_ID_VSSETSHADERRESOURCES_UNBINDDELETINGOBJECT = ( D3D10_MESSAGE_ID_VSSETSHADER_UNBINDDELETINGOBJECT + 1 ) , + D3D10_MESSAGE_ID_VSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT = ( D3D10_MESSAGE_ID_VSSETSHADERRESOURCES_UNBINDDELETINGOBJECT + 1 ) , + D3D10_MESSAGE_ID_VSSETSAMPLERS_UNBINDDELETINGOBJECT = ( D3D10_MESSAGE_ID_VSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT + 1 ) , + D3D10_MESSAGE_ID_GSSETSHADER_UNBINDDELETINGOBJECT = ( D3D10_MESSAGE_ID_VSSETSAMPLERS_UNBINDDELETINGOBJECT + 1 ) , + D3D10_MESSAGE_ID_GSSETSHADERRESOURCES_UNBINDDELETINGOBJECT = ( D3D10_MESSAGE_ID_GSSETSHADER_UNBINDDELETINGOBJECT + 1 ) , + D3D10_MESSAGE_ID_GSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT = ( D3D10_MESSAGE_ID_GSSETSHADERRESOURCES_UNBINDDELETINGOBJECT + 1 ) , + D3D10_MESSAGE_ID_GSSETSAMPLERS_UNBINDDELETINGOBJECT = ( D3D10_MESSAGE_ID_GSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT + 1 ) , + D3D10_MESSAGE_ID_SOSETTARGETS_UNBINDDELETINGOBJECT = ( D3D10_MESSAGE_ID_GSSETSAMPLERS_UNBINDDELETINGOBJECT + 1 ) , + D3D10_MESSAGE_ID_PSSETSHADER_UNBINDDELETINGOBJECT = ( D3D10_MESSAGE_ID_SOSETTARGETS_UNBINDDELETINGOBJECT + 1 ) , + D3D10_MESSAGE_ID_PSSETSHADERRESOURCES_UNBINDDELETINGOBJECT = ( D3D10_MESSAGE_ID_PSSETSHADER_UNBINDDELETINGOBJECT + 1 ) , + D3D10_MESSAGE_ID_PSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT = ( D3D10_MESSAGE_ID_PSSETSHADERRESOURCES_UNBINDDELETINGOBJECT + 1 ) , + D3D10_MESSAGE_ID_PSSETSAMPLERS_UNBINDDELETINGOBJECT = ( D3D10_MESSAGE_ID_PSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT + 1 ) , + D3D10_MESSAGE_ID_RSSETSTATE_UNBINDDELETINGOBJECT = ( D3D10_MESSAGE_ID_PSSETSAMPLERS_UNBINDDELETINGOBJECT + 1 ) , + D3D10_MESSAGE_ID_OMSETBLENDSTATE_UNBINDDELETINGOBJECT = ( D3D10_MESSAGE_ID_RSSETSTATE_UNBINDDELETINGOBJECT + 1 ) , + D3D10_MESSAGE_ID_OMSETDEPTHSTENCILSTATE_UNBINDDELETINGOBJECT = ( D3D10_MESSAGE_ID_OMSETBLENDSTATE_UNBINDDELETINGOBJECT + 1 ) , + D3D10_MESSAGE_ID_OMSETRENDERTARGETS_UNBINDDELETINGOBJECT = ( D3D10_MESSAGE_ID_OMSETDEPTHSTENCILSTATE_UNBINDDELETINGOBJECT + 1 ) , + D3D10_MESSAGE_ID_SETPREDICATION_UNBINDDELETINGOBJECT = ( D3D10_MESSAGE_ID_OMSETRENDERTARGETS_UNBINDDELETINGOBJECT + 1 ) , + D3D10_MESSAGE_ID_GETPRIVATEDATA_MOREDATA = ( D3D10_MESSAGE_ID_SETPREDICATION_UNBINDDELETINGOBJECT + 1 ) , + D3D10_MESSAGE_ID_SETPRIVATEDATA_INVALIDFREEDATA = ( D3D10_MESSAGE_ID_GETPRIVATEDATA_MOREDATA + 1 ) , + D3D10_MESSAGE_ID_SETPRIVATEDATA_INVALIDIUNKNOWN = ( D3D10_MESSAGE_ID_SETPRIVATEDATA_INVALIDFREEDATA + 1 ) , + D3D10_MESSAGE_ID_SETPRIVATEDATA_INVALIDFLAGS = ( D3D10_MESSAGE_ID_SETPRIVATEDATA_INVALIDIUNKNOWN + 1 ) , + D3D10_MESSAGE_ID_SETPRIVATEDATA_CHANGINGPARAMS = ( D3D10_MESSAGE_ID_SETPRIVATEDATA_INVALIDFLAGS + 1 ) , + D3D10_MESSAGE_ID_SETPRIVATEDATA_OUTOFMEMORY = ( D3D10_MESSAGE_ID_SETPRIVATEDATA_CHANGINGPARAMS + 1 ) , + D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDFORMAT = ( D3D10_MESSAGE_ID_SETPRIVATEDATA_OUTOFMEMORY + 1 ) , + D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDSAMPLES = ( D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDFORMAT + 1 ) , + D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDUSAGE = ( D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDSAMPLES + 1 ) , + D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDBINDFLAGS = ( D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDUSAGE + 1 ) , + D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDCPUACCESSFLAGS = ( D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDBINDFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDMISCFLAGS = ( D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDCPUACCESSFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDCPUACCESSFLAGS = ( D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDMISCFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDBINDFLAGS = ( D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDCPUACCESSFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDINITIALDATA = ( D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDBINDFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDDIMENSIONS = ( D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDINITIALDATA + 1 ) , + D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDMIPLEVELS = ( D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDDIMENSIONS + 1 ) , + D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDMISCFLAGS = ( D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDMIPLEVELS + 1 ) , + D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDARG_RETURN = ( D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDMISCFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATEBUFFER_OUTOFMEMORY_RETURN = ( D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDARG_RETURN + 1 ) , + D3D10_MESSAGE_ID_CREATEBUFFER_NULLDESC = ( D3D10_MESSAGE_ID_CREATEBUFFER_OUTOFMEMORY_RETURN + 1 ) , + D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDCONSTANTBUFFERBINDINGS = ( D3D10_MESSAGE_ID_CREATEBUFFER_NULLDESC + 1 ) , + D3D10_MESSAGE_ID_CREATEBUFFER_LARGEALLOCATION = ( D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDCONSTANTBUFFERBINDINGS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDFORMAT = ( D3D10_MESSAGE_ID_CREATEBUFFER_LARGEALLOCATION + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE1D_UNSUPPORTEDFORMAT = ( D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDFORMAT + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDSAMPLES = ( D3D10_MESSAGE_ID_CREATETEXTURE1D_UNSUPPORTEDFORMAT + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDUSAGE = ( D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDSAMPLES + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDBINDFLAGS = ( D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDUSAGE + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDCPUACCESSFLAGS = ( D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDBINDFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDMISCFLAGS = ( D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDCPUACCESSFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDCPUACCESSFLAGS = ( D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDMISCFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDBINDFLAGS = ( D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDCPUACCESSFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDINITIALDATA = ( D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDBINDFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDDIMENSIONS = ( D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDINITIALDATA + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDMIPLEVELS = ( D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDDIMENSIONS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDMISCFLAGS = ( D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDMIPLEVELS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDARG_RETURN = ( D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDMISCFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE1D_OUTOFMEMORY_RETURN = ( D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDARG_RETURN + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE1D_NULLDESC = ( D3D10_MESSAGE_ID_CREATETEXTURE1D_OUTOFMEMORY_RETURN + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE1D_LARGEALLOCATION = ( D3D10_MESSAGE_ID_CREATETEXTURE1D_NULLDESC + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDFORMAT = ( D3D10_MESSAGE_ID_CREATETEXTURE1D_LARGEALLOCATION + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE2D_UNSUPPORTEDFORMAT = ( D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDFORMAT + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDSAMPLES = ( D3D10_MESSAGE_ID_CREATETEXTURE2D_UNSUPPORTEDFORMAT + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDUSAGE = ( D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDSAMPLES + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDBINDFLAGS = ( D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDUSAGE + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDCPUACCESSFLAGS = ( D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDBINDFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDMISCFLAGS = ( D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDCPUACCESSFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDCPUACCESSFLAGS = ( D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDMISCFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDBINDFLAGS = ( D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDCPUACCESSFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDINITIALDATA = ( D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDBINDFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDDIMENSIONS = ( D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDINITIALDATA + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDMIPLEVELS = ( D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDDIMENSIONS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDMISCFLAGS = ( D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDMIPLEVELS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDARG_RETURN = ( D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDMISCFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE2D_OUTOFMEMORY_RETURN = ( D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDARG_RETURN + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE2D_NULLDESC = ( D3D10_MESSAGE_ID_CREATETEXTURE2D_OUTOFMEMORY_RETURN + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE2D_LARGEALLOCATION = ( D3D10_MESSAGE_ID_CREATETEXTURE2D_NULLDESC + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDFORMAT = ( D3D10_MESSAGE_ID_CREATETEXTURE2D_LARGEALLOCATION + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE3D_UNSUPPORTEDFORMAT = ( D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDFORMAT + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDSAMPLES = ( D3D10_MESSAGE_ID_CREATETEXTURE3D_UNSUPPORTEDFORMAT + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDUSAGE = ( D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDSAMPLES + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDBINDFLAGS = ( D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDUSAGE + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDCPUACCESSFLAGS = ( D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDBINDFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDMISCFLAGS = ( D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDCPUACCESSFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDCPUACCESSFLAGS = ( D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDMISCFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDBINDFLAGS = ( D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDCPUACCESSFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDINITIALDATA = ( D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDBINDFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDDIMENSIONS = ( D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDINITIALDATA + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDMIPLEVELS = ( D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDDIMENSIONS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDMISCFLAGS = ( D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDMIPLEVELS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDARG_RETURN = ( D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDMISCFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE3D_OUTOFMEMORY_RETURN = ( D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDARG_RETURN + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE3D_NULLDESC = ( D3D10_MESSAGE_ID_CREATETEXTURE3D_OUTOFMEMORY_RETURN + 1 ) , + D3D10_MESSAGE_ID_CREATETEXTURE3D_LARGEALLOCATION = ( D3D10_MESSAGE_ID_CREATETEXTURE3D_NULLDESC + 1 ) , + D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_UNRECOGNIZEDFORMAT = ( D3D10_MESSAGE_ID_CREATETEXTURE3D_LARGEALLOCATION + 1 ) , + D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDESC = ( D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_UNRECOGNIZEDFORMAT + 1 ) , + D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDFORMAT = ( D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDESC + 1 ) , + D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDIMENSIONS = ( D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDFORMAT + 1 ) , + D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDRESOURCE = ( D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDIMENSIONS + 1 ) , + D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_TOOMANYOBJECTS = ( D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDRESOURCE + 1 ) , + D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDARG_RETURN = ( D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_TOOMANYOBJECTS + 1 ) , + D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_OUTOFMEMORY_RETURN = ( D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDARG_RETURN + 1 ) , + D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_UNRECOGNIZEDFORMAT = ( D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_OUTOFMEMORY_RETURN + 1 ) , + D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_UNSUPPORTEDFORMAT = ( D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_UNRECOGNIZEDFORMAT + 1 ) , + D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDESC = ( D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_UNSUPPORTEDFORMAT + 1 ) , + D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDFORMAT = ( D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDESC + 1 ) , + D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDIMENSIONS = ( D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDFORMAT + 1 ) , + D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDRESOURCE = ( D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDIMENSIONS + 1 ) , + D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_TOOMANYOBJECTS = ( D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDRESOURCE + 1 ) , + D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDARG_RETURN = ( D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_TOOMANYOBJECTS + 1 ) , + D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_OUTOFMEMORY_RETURN = ( D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDARG_RETURN + 1 ) , + D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_UNRECOGNIZEDFORMAT = ( D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_OUTOFMEMORY_RETURN + 1 ) , + D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDESC = ( D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_UNRECOGNIZEDFORMAT + 1 ) , + D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDFORMAT = ( D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDESC + 1 ) , + D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDIMENSIONS = ( D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDFORMAT + 1 ) , + D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDRESOURCE = ( D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDIMENSIONS + 1 ) , + D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_TOOMANYOBJECTS = ( D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDRESOURCE + 1 ) , + D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDARG_RETURN = ( D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_TOOMANYOBJECTS + 1 ) , + D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_OUTOFMEMORY_RETURN = ( D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDARG_RETURN + 1 ) , + D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_OUTOFMEMORY = ( D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_OUTOFMEMORY_RETURN + 1 ) , + D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_TOOMANYELEMENTS = ( D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_OUTOFMEMORY + 1 ) , + D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDFORMAT = ( D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_TOOMANYELEMENTS + 1 ) , + D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INCOMPATIBLEFORMAT = ( D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDFORMAT + 1 ) , + D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOT = ( D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INCOMPATIBLEFORMAT + 1 ) , + D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDINPUTSLOTCLASS = ( D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOT + 1 ) , + D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_STEPRATESLOTCLASSMISMATCH = ( D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDINPUTSLOTCLASS + 1 ) , + D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOTCLASSCHANGE = ( D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_STEPRATESLOTCLASSMISMATCH + 1 ) , + D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSTEPRATECHANGE = ( D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOTCLASSCHANGE + 1 ) , + D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDALIGNMENT = ( D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSTEPRATECHANGE + 1 ) , + D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_DUPLICATESEMANTIC = ( D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDALIGNMENT + 1 ) , + D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_UNPARSEABLEINPUTSIGNATURE = ( D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_DUPLICATESEMANTIC + 1 ) , + D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_NULLSEMANTIC = ( D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_UNPARSEABLEINPUTSIGNATURE + 1 ) , + D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_MISSINGELEMENT = ( D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_NULLSEMANTIC + 1 ) , + D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_NULLDESC = ( D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_MISSINGELEMENT + 1 ) , + D3D10_MESSAGE_ID_CREATEVERTEXSHADER_OUTOFMEMORY = ( D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_NULLDESC + 1 ) , + D3D10_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERBYTECODE = ( D3D10_MESSAGE_ID_CREATEVERTEXSHADER_OUTOFMEMORY + 1 ) , + D3D10_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERTYPE = ( D3D10_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERBYTECODE + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADER_OUTOFMEMORY = ( D3D10_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERTYPE + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERBYTECODE = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADER_OUTOFMEMORY + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERTYPE = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERBYTECODE + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTOFMEMORY = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERTYPE + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERBYTECODE = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTOFMEMORY + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERTYPE = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERBYTECODE + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMENTRIES = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERTYPE + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSTREAMSTRIDEUNUSED = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMENTRIES + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDDECL = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSTREAMSTRIDEUNUSED + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_EXPECTEDDECL = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDDECL + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSLOT0EXPECTED = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_EXPECTEDDECL + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSLOT = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSLOT0EXPECTED + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_ONLYONEELEMENTPERSLOT = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSLOT + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDCOMPONENTCOUNT = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_ONLYONEELEMENTPERSLOT + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTARTCOMPONENTANDCOMPONENTCOUNT = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDCOMPONENTCOUNT + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDGAPDEFINITION = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTARTCOMPONENTANDCOMPONENTCOUNT + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_REPEATEDOUTPUT = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDGAPDEFINITION + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSTREAMSTRIDE = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_REPEATEDOUTPUT + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGSEMANTIC = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSTREAMSTRIDE + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MASKMISMATCH = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGSEMANTIC + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_CANTHAVEONLYGAPS = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MASKMISMATCH + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DECLTOOCOMPLEX = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_CANTHAVEONLYGAPS + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGOUTPUTSIGNATURE = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DECLTOOCOMPLEX + 1 ) , + D3D10_MESSAGE_ID_CREATEPIXELSHADER_OUTOFMEMORY = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGOUTPUTSIGNATURE + 1 ) , + D3D10_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERBYTECODE = ( D3D10_MESSAGE_ID_CREATEPIXELSHADER_OUTOFMEMORY + 1 ) , + D3D10_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERTYPE = ( D3D10_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERBYTECODE + 1 ) , + D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDFILLMODE = ( D3D10_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERTYPE + 1 ) , + D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDCULLMODE = ( D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDFILLMODE + 1 ) , + D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDDEPTHBIASCLAMP = ( D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDCULLMODE + 1 ) , + D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDSLOPESCALEDDEPTHBIAS = ( D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDDEPTHBIASCLAMP + 1 ) , + D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_TOOMANYOBJECTS = ( D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDSLOPESCALEDDEPTHBIAS + 1 ) , + D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_NULLDESC = ( D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_TOOMANYOBJECTS + 1 ) , + D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHWRITEMASK = ( D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_NULLDESC + 1 ) , + D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHFUNC = ( D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHWRITEMASK + 1 ) , + D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFAILOP = ( D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHFUNC + 1 ) , + D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILZFAILOP = ( D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFAILOP + 1 ) , + D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILPASSOP = ( D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILZFAILOP + 1 ) , + D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFUNC = ( D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILPASSOP + 1 ) , + D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFAILOP = ( D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFUNC + 1 ) , + D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILZFAILOP = ( D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFAILOP + 1 ) , + D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILPASSOP = ( D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILZFAILOP + 1 ) , + D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFUNC = ( D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILPASSOP + 1 ) , + D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_TOOMANYOBJECTS = ( D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFUNC + 1 ) , + D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_NULLDESC = ( D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_TOOMANYOBJECTS + 1 ) , + D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLEND = ( D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_NULLDESC + 1 ) , + D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLEND = ( D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLEND + 1 ) , + D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOP = ( D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLEND + 1 ) , + D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLENDALPHA = ( D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOP + 1 ) , + D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLENDALPHA = ( D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLENDALPHA + 1 ) , + D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOPALPHA = ( D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLENDALPHA + 1 ) , + D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDRENDERTARGETWRITEMASK = ( D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOPALPHA + 1 ) , + D3D10_MESSAGE_ID_CREATEBLENDSTATE_TOOMANYOBJECTS = ( D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDRENDERTARGETWRITEMASK + 1 ) , + D3D10_MESSAGE_ID_CREATEBLENDSTATE_NULLDESC = ( D3D10_MESSAGE_ID_CREATEBLENDSTATE_TOOMANYOBJECTS + 1 ) , + D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDFILTER = ( D3D10_MESSAGE_ID_CREATEBLENDSTATE_NULLDESC + 1 ) , + D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSU = ( D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDFILTER + 1 ) , + D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSV = ( D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSU + 1 ) , + D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSW = ( D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSV + 1 ) , + D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMIPLODBIAS = ( D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSW + 1 ) , + D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXANISOTROPY = ( D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMIPLODBIAS + 1 ) , + D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDCOMPARISONFUNC = ( D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXANISOTROPY + 1 ) , + D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMINLOD = ( D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDCOMPARISONFUNC + 1 ) , + D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXLOD = ( D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMINLOD + 1 ) , + D3D10_MESSAGE_ID_CREATESAMPLERSTATE_TOOMANYOBJECTS = ( D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXLOD + 1 ) , + D3D10_MESSAGE_ID_CREATESAMPLERSTATE_NULLDESC = ( D3D10_MESSAGE_ID_CREATESAMPLERSTATE_TOOMANYOBJECTS + 1 ) , + D3D10_MESSAGE_ID_CREATEQUERYORPREDICATE_INVALIDQUERY = ( D3D10_MESSAGE_ID_CREATESAMPLERSTATE_NULLDESC + 1 ) , + D3D10_MESSAGE_ID_CREATEQUERYORPREDICATE_INVALIDMISCFLAGS = ( D3D10_MESSAGE_ID_CREATEQUERYORPREDICATE_INVALIDQUERY + 1 ) , + D3D10_MESSAGE_ID_CREATEQUERYORPREDICATE_UNEXPECTEDMISCFLAG = ( D3D10_MESSAGE_ID_CREATEQUERYORPREDICATE_INVALIDMISCFLAGS + 1 ) , + D3D10_MESSAGE_ID_CREATEQUERYORPREDICATE_NULLDESC = ( D3D10_MESSAGE_ID_CREATEQUERYORPREDICATE_UNEXPECTEDMISCFLAG + 1 ) , + D3D10_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNRECOGNIZED = ( D3D10_MESSAGE_ID_CREATEQUERYORPREDICATE_NULLDESC + 1 ) , + D3D10_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNDEFINED = ( D3D10_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNRECOGNIZED + 1 ) , + D3D10_MESSAGE_ID_IASETVERTEXBUFFERS_INVALIDBUFFER = ( D3D10_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNDEFINED + 1 ) , + D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_OFFSET_TOO_LARGE = ( D3D10_MESSAGE_ID_IASETVERTEXBUFFERS_INVALIDBUFFER + 1 ) , + D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_BUFFERS_EMPTY = ( D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_OFFSET_TOO_LARGE + 1 ) , + D3D10_MESSAGE_ID_IASETINDEXBUFFER_INVALIDBUFFER = ( D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_FORMAT_INVALID = ( D3D10_MESSAGE_ID_IASETINDEXBUFFER_INVALIDBUFFER + 1 ) , + D3D10_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_OFFSET_TOO_LARGE = ( D3D10_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_FORMAT_INVALID + 1 ) , + D3D10_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_OFFSET_UNALIGNED = ( D3D10_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_OFFSET_TOO_LARGE + 1 ) , + D3D10_MESSAGE_ID_DEVICE_VSSETSHADERRESOURCES_VIEWS_EMPTY = ( D3D10_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_OFFSET_UNALIGNED + 1 ) , + D3D10_MESSAGE_ID_VSSETCONSTANTBUFFERS_INVALIDBUFFER = ( D3D10_MESSAGE_ID_DEVICE_VSSETSHADERRESOURCES_VIEWS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_VSSETCONSTANTBUFFERS_BUFFERS_EMPTY = ( D3D10_MESSAGE_ID_VSSETCONSTANTBUFFERS_INVALIDBUFFER + 1 ) , + D3D10_MESSAGE_ID_DEVICE_VSSETSAMPLERS_SAMPLERS_EMPTY = ( D3D10_MESSAGE_ID_DEVICE_VSSETCONSTANTBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_GSSETSHADERRESOURCES_VIEWS_EMPTY = ( D3D10_MESSAGE_ID_DEVICE_VSSETSAMPLERS_SAMPLERS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_GSSETCONSTANTBUFFERS_INVALIDBUFFER = ( D3D10_MESSAGE_ID_DEVICE_GSSETSHADERRESOURCES_VIEWS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_GSSETCONSTANTBUFFERS_BUFFERS_EMPTY = ( D3D10_MESSAGE_ID_GSSETCONSTANTBUFFERS_INVALIDBUFFER + 1 ) , + D3D10_MESSAGE_ID_DEVICE_GSSETSAMPLERS_SAMPLERS_EMPTY = ( D3D10_MESSAGE_ID_DEVICE_GSSETCONSTANTBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_SOSETTARGETS_INVALIDBUFFER = ( D3D10_MESSAGE_ID_DEVICE_GSSETSAMPLERS_SAMPLERS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_SOSETTARGETS_OFFSET_UNALIGNED = ( D3D10_MESSAGE_ID_SOSETTARGETS_INVALIDBUFFER + 1 ) , + D3D10_MESSAGE_ID_DEVICE_PSSETSHADERRESOURCES_VIEWS_EMPTY = ( D3D10_MESSAGE_ID_DEVICE_SOSETTARGETS_OFFSET_UNALIGNED + 1 ) , + D3D10_MESSAGE_ID_PSSETCONSTANTBUFFERS_INVALIDBUFFER = ( D3D10_MESSAGE_ID_DEVICE_PSSETSHADERRESOURCES_VIEWS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_PSSETCONSTANTBUFFERS_BUFFERS_EMPTY = ( D3D10_MESSAGE_ID_PSSETCONSTANTBUFFERS_INVALIDBUFFER + 1 ) , + D3D10_MESSAGE_ID_DEVICE_PSSETSAMPLERS_SAMPLERS_EMPTY = ( D3D10_MESSAGE_ID_DEVICE_PSSETCONSTANTBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_INVALIDVIEWPORT = ( D3D10_MESSAGE_ID_DEVICE_PSSETSAMPLERS_SAMPLERS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_INVALIDSCISSOR = ( D3D10_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_INVALIDVIEWPORT + 1 ) , + D3D10_MESSAGE_ID_CLEARRENDERTARGETVIEW_DENORMFLUSH = ( D3D10_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_INVALIDSCISSOR + 1 ) , + D3D10_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_DENORMFLUSH = ( D3D10_MESSAGE_ID_CLEARRENDERTARGETVIEW_DENORMFLUSH + 1 ) , + D3D10_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_INVALID = ( D3D10_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_DENORMFLUSH + 1 ) , + D3D10_MESSAGE_ID_DEVICE_IAGETVERTEXBUFFERS_BUFFERS_EMPTY = ( D3D10_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_INVALID + 1 ) , + D3D10_MESSAGE_ID_DEVICE_VSGETSHADERRESOURCES_VIEWS_EMPTY = ( D3D10_MESSAGE_ID_DEVICE_IAGETVERTEXBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_VSGETCONSTANTBUFFERS_BUFFERS_EMPTY = ( D3D10_MESSAGE_ID_DEVICE_VSGETSHADERRESOURCES_VIEWS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_VSGETSAMPLERS_SAMPLERS_EMPTY = ( D3D10_MESSAGE_ID_DEVICE_VSGETCONSTANTBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_GSGETSHADERRESOURCES_VIEWS_EMPTY = ( D3D10_MESSAGE_ID_DEVICE_VSGETSAMPLERS_SAMPLERS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_GSGETCONSTANTBUFFERS_BUFFERS_EMPTY = ( D3D10_MESSAGE_ID_DEVICE_GSGETSHADERRESOURCES_VIEWS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_GSGETSAMPLERS_SAMPLERS_EMPTY = ( D3D10_MESSAGE_ID_DEVICE_GSGETCONSTANTBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_SOGETTARGETS_BUFFERS_EMPTY = ( D3D10_MESSAGE_ID_DEVICE_GSGETSAMPLERS_SAMPLERS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_PSGETSHADERRESOURCES_VIEWS_EMPTY = ( D3D10_MESSAGE_ID_DEVICE_SOGETTARGETS_BUFFERS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_PSGETCONSTANTBUFFERS_BUFFERS_EMPTY = ( D3D10_MESSAGE_ID_DEVICE_PSGETSHADERRESOURCES_VIEWS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_PSGETSAMPLERS_SAMPLERS_EMPTY = ( D3D10_MESSAGE_ID_DEVICE_PSGETCONSTANTBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_RSGETVIEWPORTS_VIEWPORTS_EMPTY = ( D3D10_MESSAGE_ID_DEVICE_PSGETSAMPLERS_SAMPLERS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_RSGETSCISSORRECTS_RECTS_EMPTY = ( D3D10_MESSAGE_ID_DEVICE_RSGETVIEWPORTS_VIEWPORTS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_GENERATEMIPS_RESOURCE_INVALID = ( D3D10_MESSAGE_ID_DEVICE_RSGETSCISSORRECTS_RECTS_EMPTY + 1 ) , + D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDDESTINATIONSUBRESOURCE = ( D3D10_MESSAGE_ID_DEVICE_GENERATEMIPS_RESOURCE_INVALID + 1 ) , + D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCESUBRESOURCE = ( D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDDESTINATIONSUBRESOURCE + 1 ) , + D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCEBOX = ( D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCESUBRESOURCE + 1 ) , + D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCE = ( D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCEBOX + 1 ) , + D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDDESTINATIONSTATE = ( D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCE + 1 ) , + D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCESTATE = ( D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDDESTINATIONSTATE + 1 ) , + D3D10_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCE = ( D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCESTATE + 1 ) , + D3D10_MESSAGE_ID_COPYRESOURCE_INVALIDDESTINATIONSTATE = ( D3D10_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCE + 1 ) , + D3D10_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCESTATE = ( D3D10_MESSAGE_ID_COPYRESOURCE_INVALIDDESTINATIONSTATE + 1 ) , + D3D10_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSUBRESOURCE = ( D3D10_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCESTATE + 1 ) , + D3D10_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONBOX = ( D3D10_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSUBRESOURCE + 1 ) , + D3D10_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSTATE = ( D3D10_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONBOX + 1 ) , + D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_INVALID = ( D3D10_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSTATE + 1 ) , + D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_SUBRESOURCE_INVALID = ( D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_INVALID + 1 ) , + D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_INVALID = ( D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_SUBRESOURCE_INVALID + 1 ) , + D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_SUBRESOURCE_INVALID = ( D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_INVALID + 1 ) , + D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_FORMAT_INVALID = ( D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_SUBRESOURCE_INVALID + 1 ) , + D3D10_MESSAGE_ID_BUFFER_MAP_INVALIDMAPTYPE = ( D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_FORMAT_INVALID + 1 ) , + D3D10_MESSAGE_ID_BUFFER_MAP_INVALIDFLAGS = ( D3D10_MESSAGE_ID_BUFFER_MAP_INVALIDMAPTYPE + 1 ) , + D3D10_MESSAGE_ID_BUFFER_MAP_ALREADYMAPPED = ( D3D10_MESSAGE_ID_BUFFER_MAP_INVALIDFLAGS + 1 ) , + D3D10_MESSAGE_ID_BUFFER_MAP_DEVICEREMOVED_RETURN = ( D3D10_MESSAGE_ID_BUFFER_MAP_ALREADYMAPPED + 1 ) , + D3D10_MESSAGE_ID_BUFFER_UNMAP_NOTMAPPED = ( D3D10_MESSAGE_ID_BUFFER_MAP_DEVICEREMOVED_RETURN + 1 ) , + D3D10_MESSAGE_ID_TEXTURE1D_MAP_INVALIDMAPTYPE = ( D3D10_MESSAGE_ID_BUFFER_UNMAP_NOTMAPPED + 1 ) , + D3D10_MESSAGE_ID_TEXTURE1D_MAP_INVALIDSUBRESOURCE = ( D3D10_MESSAGE_ID_TEXTURE1D_MAP_INVALIDMAPTYPE + 1 ) , + D3D10_MESSAGE_ID_TEXTURE1D_MAP_INVALIDFLAGS = ( D3D10_MESSAGE_ID_TEXTURE1D_MAP_INVALIDSUBRESOURCE + 1 ) , + D3D10_MESSAGE_ID_TEXTURE1D_MAP_ALREADYMAPPED = ( D3D10_MESSAGE_ID_TEXTURE1D_MAP_INVALIDFLAGS + 1 ) , + D3D10_MESSAGE_ID_TEXTURE1D_MAP_DEVICEREMOVED_RETURN = ( D3D10_MESSAGE_ID_TEXTURE1D_MAP_ALREADYMAPPED + 1 ) , + D3D10_MESSAGE_ID_TEXTURE1D_UNMAP_INVALIDSUBRESOURCE = ( D3D10_MESSAGE_ID_TEXTURE1D_MAP_DEVICEREMOVED_RETURN + 1 ) , + D3D10_MESSAGE_ID_TEXTURE1D_UNMAP_NOTMAPPED = ( D3D10_MESSAGE_ID_TEXTURE1D_UNMAP_INVALIDSUBRESOURCE + 1 ) , + D3D10_MESSAGE_ID_TEXTURE2D_MAP_INVALIDMAPTYPE = ( D3D10_MESSAGE_ID_TEXTURE1D_UNMAP_NOTMAPPED + 1 ) , + D3D10_MESSAGE_ID_TEXTURE2D_MAP_INVALIDSUBRESOURCE = ( D3D10_MESSAGE_ID_TEXTURE2D_MAP_INVALIDMAPTYPE + 1 ) , + D3D10_MESSAGE_ID_TEXTURE2D_MAP_INVALIDFLAGS = ( D3D10_MESSAGE_ID_TEXTURE2D_MAP_INVALIDSUBRESOURCE + 1 ) , + D3D10_MESSAGE_ID_TEXTURE2D_MAP_ALREADYMAPPED = ( D3D10_MESSAGE_ID_TEXTURE2D_MAP_INVALIDFLAGS + 1 ) , + D3D10_MESSAGE_ID_TEXTURE2D_MAP_DEVICEREMOVED_RETURN = ( D3D10_MESSAGE_ID_TEXTURE2D_MAP_ALREADYMAPPED + 1 ) , + D3D10_MESSAGE_ID_TEXTURE2D_UNMAP_INVALIDSUBRESOURCE = ( D3D10_MESSAGE_ID_TEXTURE2D_MAP_DEVICEREMOVED_RETURN + 1 ) , + D3D10_MESSAGE_ID_TEXTURE2D_UNMAP_NOTMAPPED = ( D3D10_MESSAGE_ID_TEXTURE2D_UNMAP_INVALIDSUBRESOURCE + 1 ) , + D3D10_MESSAGE_ID_TEXTURE3D_MAP_INVALIDMAPTYPE = ( D3D10_MESSAGE_ID_TEXTURE2D_UNMAP_NOTMAPPED + 1 ) , + D3D10_MESSAGE_ID_TEXTURE3D_MAP_INVALIDSUBRESOURCE = ( D3D10_MESSAGE_ID_TEXTURE3D_MAP_INVALIDMAPTYPE + 1 ) , + D3D10_MESSAGE_ID_TEXTURE3D_MAP_INVALIDFLAGS = ( D3D10_MESSAGE_ID_TEXTURE3D_MAP_INVALIDSUBRESOURCE + 1 ) , + D3D10_MESSAGE_ID_TEXTURE3D_MAP_ALREADYMAPPED = ( D3D10_MESSAGE_ID_TEXTURE3D_MAP_INVALIDFLAGS + 1 ) , + D3D10_MESSAGE_ID_TEXTURE3D_MAP_DEVICEREMOVED_RETURN = ( D3D10_MESSAGE_ID_TEXTURE3D_MAP_ALREADYMAPPED + 1 ) , + D3D10_MESSAGE_ID_TEXTURE3D_UNMAP_INVALIDSUBRESOURCE = ( D3D10_MESSAGE_ID_TEXTURE3D_MAP_DEVICEREMOVED_RETURN + 1 ) , + D3D10_MESSAGE_ID_TEXTURE3D_UNMAP_NOTMAPPED = ( D3D10_MESSAGE_ID_TEXTURE3D_UNMAP_INVALIDSUBRESOURCE + 1 ) , + D3D10_MESSAGE_ID_CHECKFORMATSUPPORT_FORMAT_DEPRECATED = ( D3D10_MESSAGE_ID_TEXTURE3D_UNMAP_NOTMAPPED + 1 ) , + D3D10_MESSAGE_ID_CHECKMULTISAMPLEQUALITYLEVELS_FORMAT_DEPRECATED = ( D3D10_MESSAGE_ID_CHECKFORMATSUPPORT_FORMAT_DEPRECATED + 1 ) , + D3D10_MESSAGE_ID_SETEXCEPTIONMODE_UNRECOGNIZEDFLAGS = ( D3D10_MESSAGE_ID_CHECKMULTISAMPLEQUALITYLEVELS_FORMAT_DEPRECATED + 1 ) , + D3D10_MESSAGE_ID_SETEXCEPTIONMODE_INVALIDARG_RETURN = ( D3D10_MESSAGE_ID_SETEXCEPTIONMODE_UNRECOGNIZEDFLAGS + 1 ) , + D3D10_MESSAGE_ID_SETEXCEPTIONMODE_DEVICEREMOVED_RETURN = ( D3D10_MESSAGE_ID_SETEXCEPTIONMODE_INVALIDARG_RETURN + 1 ) , + D3D10_MESSAGE_ID_REF_SIMULATING_INFINITELY_FAST_HARDWARE = ( D3D10_MESSAGE_ID_SETEXCEPTIONMODE_DEVICEREMOVED_RETURN + 1 ) , + D3D10_MESSAGE_ID_REF_THREADING_MODE = ( D3D10_MESSAGE_ID_REF_SIMULATING_INFINITELY_FAST_HARDWARE + 1 ) , + D3D10_MESSAGE_ID_REF_UMDRIVER_EXCEPTION = ( D3D10_MESSAGE_ID_REF_THREADING_MODE + 1 ) , + D3D10_MESSAGE_ID_REF_KMDRIVER_EXCEPTION = ( D3D10_MESSAGE_ID_REF_UMDRIVER_EXCEPTION + 1 ) , + D3D10_MESSAGE_ID_REF_HARDWARE_EXCEPTION = ( D3D10_MESSAGE_ID_REF_KMDRIVER_EXCEPTION + 1 ) , + D3D10_MESSAGE_ID_REF_ACCESSING_INDEXABLE_TEMP_OUT_OF_RANGE = ( D3D10_MESSAGE_ID_REF_HARDWARE_EXCEPTION + 1 ) , + D3D10_MESSAGE_ID_REF_PROBLEM_PARSING_SHADER = ( D3D10_MESSAGE_ID_REF_ACCESSING_INDEXABLE_TEMP_OUT_OF_RANGE + 1 ) , + D3D10_MESSAGE_ID_REF_OUT_OF_MEMORY = ( D3D10_MESSAGE_ID_REF_PROBLEM_PARSING_SHADER + 1 ) , + D3D10_MESSAGE_ID_REF_INFO = ( D3D10_MESSAGE_ID_REF_OUT_OF_MEMORY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEXPOS_OVERFLOW = ( D3D10_MESSAGE_ID_REF_INFO + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAWINDEXED_INDEXPOS_OVERFLOW = ( D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEXPOS_OVERFLOW + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAWINSTANCED_VERTEXPOS_OVERFLOW = ( D3D10_MESSAGE_ID_DEVICE_DRAWINDEXED_INDEXPOS_OVERFLOW + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAWINSTANCED_INSTANCEPOS_OVERFLOW = ( D3D10_MESSAGE_ID_DEVICE_DRAWINSTANCED_VERTEXPOS_OVERFLOW + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INSTANCEPOS_OVERFLOW = ( D3D10_MESSAGE_ID_DEVICE_DRAWINSTANCED_INSTANCEPOS_OVERFLOW + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INDEXPOS_OVERFLOW = ( D3D10_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INSTANCEPOS_OVERFLOW + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_SHADER_NOT_SET = ( D3D10_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INDEXPOS_OVERFLOW + 1 ) , + D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND = ( D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_SHADER_NOT_SET + 1 ) , + D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERINDEX = ( D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND + 1 ) , + D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_COMPONENTTYPE = ( D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERINDEX + 1 ) , + D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERMASK = ( D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_COMPONENTTYPE + 1 ) , + D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SYSTEMVALUE = ( D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERMASK + 1 ) , + D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_NEVERWRITTEN_ALWAYSREADS = ( D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SYSTEMVALUE + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_BUFFER_NOT_SET = ( D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_NEVERWRITTEN_ALWAYSREADS + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_INPUTLAYOUT_NOT_SET = ( D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_BUFFER_NOT_SET + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_CONSTANT_BUFFER_NOT_SET = ( D3D10_MESSAGE_ID_DEVICE_DRAW_INPUTLAYOUT_NOT_SET + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_CONSTANT_BUFFER_TOO_SMALL = ( D3D10_MESSAGE_ID_DEVICE_DRAW_CONSTANT_BUFFER_NOT_SET + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_SAMPLER_NOT_SET = ( D3D10_MESSAGE_ID_DEVICE_DRAW_CONSTANT_BUFFER_TOO_SMALL + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET = ( D3D10_MESSAGE_ID_DEVICE_DRAW_SAMPLER_NOT_SET + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_VIEW_DIMENSION_MISMATCH = ( D3D10_MESSAGE_ID_DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_BUFFER_STRIDE_TOO_SMALL = ( D3D10_MESSAGE_ID_DEVICE_DRAW_VIEW_DIMENSION_MISMATCH + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_BUFFER_TOO_SMALL = ( D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_BUFFER_STRIDE_TOO_SMALL + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_INDEX_BUFFER_NOT_SET = ( D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_BUFFER_TOO_SMALL + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_INDEX_BUFFER_FORMAT_INVALID = ( D3D10_MESSAGE_ID_DEVICE_DRAW_INDEX_BUFFER_NOT_SET + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_INDEX_BUFFER_TOO_SMALL = ( D3D10_MESSAGE_ID_DEVICE_DRAW_INDEX_BUFFER_FORMAT_INVALID + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_GS_INPUT_PRIMITIVE_MISMATCH = ( D3D10_MESSAGE_ID_DEVICE_DRAW_INDEX_BUFFER_TOO_SMALL + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_RETURN_TYPE_MISMATCH = ( D3D10_MESSAGE_ID_DEVICE_DRAW_GS_INPUT_PRIMITIVE_MISMATCH + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_POSITION_NOT_PRESENT = ( D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_RETURN_TYPE_MISMATCH + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_OUTPUT_STREAM_NOT_SET = ( D3D10_MESSAGE_ID_DEVICE_DRAW_POSITION_NOT_PRESENT + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_BOUND_RESOURCE_MAPPED = ( D3D10_MESSAGE_ID_DEVICE_DRAW_OUTPUT_STREAM_NOT_SET + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_INVALID_PRIMITIVETOPOLOGY = ( D3D10_MESSAGE_ID_DEVICE_DRAW_BOUND_RESOURCE_MAPPED + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_OFFSET_UNALIGNED = ( D3D10_MESSAGE_ID_DEVICE_DRAW_INVALID_PRIMITIVETOPOLOGY + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_STRIDE_UNALIGNED = ( D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_OFFSET_UNALIGNED + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_INDEX_OFFSET_UNALIGNED = ( D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_STRIDE_UNALIGNED + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_OUTPUT_STREAM_OFFSET_UNALIGNED = ( D3D10_MESSAGE_ID_DEVICE_DRAW_INDEX_OFFSET_UNALIGNED + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_LD_UNSUPPORTED = ( D3D10_MESSAGE_ID_DEVICE_DRAW_OUTPUT_STREAM_OFFSET_UNALIGNED + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_SAMPLE_UNSUPPORTED = ( D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_LD_UNSUPPORTED + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_SAMPLE_C_UNSUPPORTED = ( D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_SAMPLE_UNSUPPORTED + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_MULTISAMPLE_UNSUPPORTED = ( D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_SAMPLE_C_UNSUPPORTED + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_SO_TARGETS_BOUND_WITHOUT_SOURCE = ( D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_MULTISAMPLE_UNSUPPORTED + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_SO_STRIDE_LARGER_THAN_BUFFER = ( D3D10_MESSAGE_ID_DEVICE_DRAW_SO_TARGETS_BOUND_WITHOUT_SOURCE + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_OM_RENDER_TARGET_DOES_NOT_SUPPORT_BLENDING = ( D3D10_MESSAGE_ID_DEVICE_DRAW_SO_STRIDE_LARGER_THAN_BUFFER + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_OM_DUAL_SOURCE_BLENDING_CAN_ONLY_HAVE_RENDER_TARGET_0 = ( D3D10_MESSAGE_ID_DEVICE_DRAW_OM_RENDER_TARGET_DOES_NOT_SUPPORT_BLENDING + 1 ) , + D3D10_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_AT_FAULT = ( D3D10_MESSAGE_ID_DEVICE_DRAW_OM_DUAL_SOURCE_BLENDING_CAN_ONLY_HAVE_RENDER_TARGET_0 + 1 ) , + D3D10_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_POSSIBLY_AT_FAULT = ( D3D10_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_AT_FAULT + 1 ) , + D3D10_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_NOT_AT_FAULT = ( D3D10_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_POSSIBLY_AT_FAULT + 1 ) , + D3D10_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_INVALIDARG_RETURN = ( D3D10_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_NOT_AT_FAULT + 1 ) , + D3D10_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_OUTOFMEMORY_RETURN = ( D3D10_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_INVALIDARG_RETURN + 1 ) , + D3D10_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_BADINTERFACE_RETURN = ( D3D10_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_OUTOFMEMORY_RETURN + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_VIEWPORT_NOT_SET = ( D3D10_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_BADINTERFACE_RETURN + 1 ) , + D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_TRAILING_DIGIT_IN_SEMANTIC = ( D3D10_MESSAGE_ID_DEVICE_DRAW_VIEWPORT_NOT_SET + 1 ) , + D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_TRAILING_DIGIT_IN_SEMANTIC = ( D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_TRAILING_DIGIT_IN_SEMANTIC + 1 ) , + D3D10_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_DENORMFLUSH = ( D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_TRAILING_DIGIT_IN_SEMANTIC + 1 ) , + D3D10_MESSAGE_ID_OMSETRENDERTARGETS_INVALIDVIEW = ( D3D10_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_DENORMFLUSH + 1 ) , + D3D10_MESSAGE_ID_DEVICE_SETTEXTFILTERSIZE_INVALIDDIMENSIONS = ( D3D10_MESSAGE_ID_OMSETRENDERTARGETS_INVALIDVIEW + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_SAMPLER_MISMATCH = ( D3D10_MESSAGE_ID_DEVICE_SETTEXTFILTERSIZE_INVALIDDIMENSIONS + 1 ) , + D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_TYPE_MISMATCH = ( D3D10_MESSAGE_ID_DEVICE_DRAW_SAMPLER_MISMATCH + 1 ) , + D3D10_MESSAGE_ID_BLENDSTATE_GETDESC_LEGACY = ( D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_TYPE_MISMATCH + 1 ) , + D3D10_MESSAGE_ID_SHADERRESOURCEVIEW_GETDESC_LEGACY = ( D3D10_MESSAGE_ID_BLENDSTATE_GETDESC_LEGACY + 1 ) , + D3D10_MESSAGE_ID_CREATEQUERY_OUTOFMEMORY_RETURN = ( D3D10_MESSAGE_ID_SHADERRESOURCEVIEW_GETDESC_LEGACY + 1 ) , + D3D10_MESSAGE_ID_CREATEPREDICATE_OUTOFMEMORY_RETURN = ( D3D10_MESSAGE_ID_CREATEQUERY_OUTOFMEMORY_RETURN + 1 ) , + D3D10_MESSAGE_ID_CREATECOUNTER_OUTOFRANGE_COUNTER = ( D3D10_MESSAGE_ID_CREATEPREDICATE_OUTOFMEMORY_RETURN + 1 ) , + D3D10_MESSAGE_ID_CREATECOUNTER_SIMULTANEOUS_ACTIVE_COUNTERS_EXHAUSTED = ( D3D10_MESSAGE_ID_CREATECOUNTER_OUTOFRANGE_COUNTER + 1 ) , + D3D10_MESSAGE_ID_CREATECOUNTER_UNSUPPORTED_WELLKNOWN_COUNTER = ( D3D10_MESSAGE_ID_CREATECOUNTER_SIMULTANEOUS_ACTIVE_COUNTERS_EXHAUSTED + 1 ) , + D3D10_MESSAGE_ID_CREATECOUNTER_OUTOFMEMORY_RETURN = ( D3D10_MESSAGE_ID_CREATECOUNTER_UNSUPPORTED_WELLKNOWN_COUNTER + 1 ) , + D3D10_MESSAGE_ID_CREATECOUNTER_NONEXCLUSIVE_RETURN = ( D3D10_MESSAGE_ID_CREATECOUNTER_OUTOFMEMORY_RETURN + 1 ) , + D3D10_MESSAGE_ID_CREATECOUNTER_NULLDESC = ( D3D10_MESSAGE_ID_CREATECOUNTER_NONEXCLUSIVE_RETURN + 1 ) , + D3D10_MESSAGE_ID_CHECKCOUNTER_OUTOFRANGE_COUNTER = ( D3D10_MESSAGE_ID_CREATECOUNTER_NULLDESC + 1 ) , + D3D10_MESSAGE_ID_CHECKCOUNTER_UNSUPPORTED_WELLKNOWN_COUNTER = ( D3D10_MESSAGE_ID_CHECKCOUNTER_OUTOFRANGE_COUNTER + 1 ) , + D3D10_MESSAGE_ID_SETPREDICATION_INVALID_PREDICATE_STATE = ( D3D10_MESSAGE_ID_CHECKCOUNTER_UNSUPPORTED_WELLKNOWN_COUNTER + 1 ) , + D3D10_MESSAGE_ID_QUERY_BEGIN_UNSUPPORTED = ( D3D10_MESSAGE_ID_SETPREDICATION_INVALID_PREDICATE_STATE + 1 ) , + D3D10_MESSAGE_ID_PREDICATE_BEGIN_DURING_PREDICATION = ( D3D10_MESSAGE_ID_QUERY_BEGIN_UNSUPPORTED + 1 ) , + D3D10_MESSAGE_ID_QUERY_BEGIN_DUPLICATE = ( D3D10_MESSAGE_ID_PREDICATE_BEGIN_DURING_PREDICATION + 1 ) , + D3D10_MESSAGE_ID_QUERY_BEGIN_ABANDONING_PREVIOUS_RESULTS = ( D3D10_MESSAGE_ID_QUERY_BEGIN_DUPLICATE + 1 ) , + D3D10_MESSAGE_ID_PREDICATE_END_DURING_PREDICATION = ( D3D10_MESSAGE_ID_QUERY_BEGIN_ABANDONING_PREVIOUS_RESULTS + 1 ) , + D3D10_MESSAGE_ID_QUERY_END_ABANDONING_PREVIOUS_RESULTS = ( D3D10_MESSAGE_ID_PREDICATE_END_DURING_PREDICATION + 1 ) , + D3D10_MESSAGE_ID_QUERY_END_WITHOUT_BEGIN = ( D3D10_MESSAGE_ID_QUERY_END_ABANDONING_PREVIOUS_RESULTS + 1 ) , + D3D10_MESSAGE_ID_QUERY_GETDATA_INVALID_DATASIZE = ( D3D10_MESSAGE_ID_QUERY_END_WITHOUT_BEGIN + 1 ) , + D3D10_MESSAGE_ID_QUERY_GETDATA_INVALID_FLAGS = ( D3D10_MESSAGE_ID_QUERY_GETDATA_INVALID_DATASIZE + 1 ) , + D3D10_MESSAGE_ID_QUERY_GETDATA_INVALID_CALL = ( D3D10_MESSAGE_ID_QUERY_GETDATA_INVALID_FLAGS + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_PS_OUTPUT_TYPE_MISMATCH = ( D3D10_MESSAGE_ID_QUERY_GETDATA_INVALID_CALL + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_GATHER_UNSUPPORTED = ( D3D10_MESSAGE_ID_DEVICE_DRAW_PS_OUTPUT_TYPE_MISMATCH + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_INVALID_USE_OF_CENTER_MULTISAMPLE_PATTERN = ( D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_GATHER_UNSUPPORTED + 1 ) , + D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_STRIDE_TOO_LARGE = ( D3D10_MESSAGE_ID_DEVICE_DRAW_INVALID_USE_OF_CENTER_MULTISAMPLE_PATTERN + 1 ) , + D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_INVALIDRANGE = ( D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_STRIDE_TOO_LARGE + 1 ) , + D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_EMPTY_LAYOUT = ( D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_INVALIDRANGE + 1 ) , + D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_SAMPLE_COUNT_MISMATCH = ( D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_EMPTY_LAYOUT + 1 ) , + D3D10_MESSAGE_ID_LIVE_OBJECT_SUMMARY = ( D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_SAMPLE_COUNT_MISMATCH + 1 ) , + D3D10_MESSAGE_ID_LIVE_BUFFER = ( D3D10_MESSAGE_ID_LIVE_OBJECT_SUMMARY + 1 ) , + D3D10_MESSAGE_ID_LIVE_TEXTURE1D = ( D3D10_MESSAGE_ID_LIVE_BUFFER + 1 ) , + D3D10_MESSAGE_ID_LIVE_TEXTURE2D = ( D3D10_MESSAGE_ID_LIVE_TEXTURE1D + 1 ) , + D3D10_MESSAGE_ID_LIVE_TEXTURE3D = ( D3D10_MESSAGE_ID_LIVE_TEXTURE2D + 1 ) , + D3D10_MESSAGE_ID_LIVE_SHADERRESOURCEVIEW = ( D3D10_MESSAGE_ID_LIVE_TEXTURE3D + 1 ) , + D3D10_MESSAGE_ID_LIVE_RENDERTARGETVIEW = ( D3D10_MESSAGE_ID_LIVE_SHADERRESOURCEVIEW + 1 ) , + D3D10_MESSAGE_ID_LIVE_DEPTHSTENCILVIEW = ( D3D10_MESSAGE_ID_LIVE_RENDERTARGETVIEW + 1 ) , + D3D10_MESSAGE_ID_LIVE_VERTEXSHADER = ( D3D10_MESSAGE_ID_LIVE_DEPTHSTENCILVIEW + 1 ) , + D3D10_MESSAGE_ID_LIVE_GEOMETRYSHADER = ( D3D10_MESSAGE_ID_LIVE_VERTEXSHADER + 1 ) , + D3D10_MESSAGE_ID_LIVE_PIXELSHADER = ( D3D10_MESSAGE_ID_LIVE_GEOMETRYSHADER + 1 ) , + D3D10_MESSAGE_ID_LIVE_INPUTLAYOUT = ( D3D10_MESSAGE_ID_LIVE_PIXELSHADER + 1 ) , + D3D10_MESSAGE_ID_LIVE_SAMPLER = ( D3D10_MESSAGE_ID_LIVE_INPUTLAYOUT + 1 ) , + D3D10_MESSAGE_ID_LIVE_BLENDSTATE = ( D3D10_MESSAGE_ID_LIVE_SAMPLER + 1 ) , + D3D10_MESSAGE_ID_LIVE_DEPTHSTENCILSTATE = ( D3D10_MESSAGE_ID_LIVE_BLENDSTATE + 1 ) , + D3D10_MESSAGE_ID_LIVE_RASTERIZERSTATE = ( D3D10_MESSAGE_ID_LIVE_DEPTHSTENCILSTATE + 1 ) , + D3D10_MESSAGE_ID_LIVE_QUERY = ( D3D10_MESSAGE_ID_LIVE_RASTERIZERSTATE + 1 ) , + D3D10_MESSAGE_ID_LIVE_PREDICATE = ( D3D10_MESSAGE_ID_LIVE_QUERY + 1 ) , + D3D10_MESSAGE_ID_LIVE_COUNTER = ( D3D10_MESSAGE_ID_LIVE_PREDICATE + 1 ) , + D3D10_MESSAGE_ID_LIVE_DEVICE = ( D3D10_MESSAGE_ID_LIVE_COUNTER + 1 ) , + D3D10_MESSAGE_ID_LIVE_SWAPCHAIN = ( D3D10_MESSAGE_ID_LIVE_DEVICE + 1 ) , + D3D10_MESSAGE_ID_D3D10_MESSAGES_END = ( D3D10_MESSAGE_ID_LIVE_SWAPCHAIN + 1 ) , + D3D10_MESSAGE_ID_D3D10L9_MESSAGES_START = 0x100000, + D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_STENCIL_NO_TWO_SIDED = ( D3D10_MESSAGE_ID_D3D10L9_MESSAGES_START + 1 ) , + D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_DepthBiasClamp_NOT_SUPPORTED = ( D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_STENCIL_NO_TWO_SIDED + 1 ) , + D3D10_MESSAGE_ID_CREATESAMPLERSTATE_NO_COMPARISON_SUPPORT = ( D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_DepthBiasClamp_NOT_SUPPORTED + 1 ) , + D3D10_MESSAGE_ID_CREATESAMPLERSTATE_EXCESSIVE_ANISOTROPY = ( D3D10_MESSAGE_ID_CREATESAMPLERSTATE_NO_COMPARISON_SUPPORT + 1 ) , + D3D10_MESSAGE_ID_CREATESAMPLERSTATE_BORDER_OUT_OF_RANGE = ( D3D10_MESSAGE_ID_CREATESAMPLERSTATE_EXCESSIVE_ANISOTROPY + 1 ) , + D3D10_MESSAGE_ID_VSSETSAMPLERS_NOT_SUPPORTED = ( D3D10_MESSAGE_ID_CREATESAMPLERSTATE_BORDER_OUT_OF_RANGE + 1 ) , + D3D10_MESSAGE_ID_VSSETSAMPLERS_TOO_MANY_SAMPLERS = ( D3D10_MESSAGE_ID_VSSETSAMPLERS_NOT_SUPPORTED + 1 ) , + D3D10_MESSAGE_ID_PSSETSAMPLERS_TOO_MANY_SAMPLERS = ( D3D10_MESSAGE_ID_VSSETSAMPLERS_TOO_MANY_SAMPLERS + 1 ) , + D3D10_MESSAGE_ID_CREATERESOURCE_NO_ARRAYS = ( D3D10_MESSAGE_ID_PSSETSAMPLERS_TOO_MANY_SAMPLERS + 1 ) , + D3D10_MESSAGE_ID_CREATERESOURCE_NO_VB_AND_IB_BIND = ( D3D10_MESSAGE_ID_CREATERESOURCE_NO_ARRAYS + 1 ) , + D3D10_MESSAGE_ID_CREATERESOURCE_NO_TEXTURE_1D = ( D3D10_MESSAGE_ID_CREATERESOURCE_NO_VB_AND_IB_BIND + 1 ) , + D3D10_MESSAGE_ID_CREATERESOURCE_DIMENSION_OUT_OF_RANGE = ( D3D10_MESSAGE_ID_CREATERESOURCE_NO_TEXTURE_1D + 1 ) , + D3D10_MESSAGE_ID_CREATERESOURCE_NOT_BINDABLE_AS_SHADER_RESOURCE = ( D3D10_MESSAGE_ID_CREATERESOURCE_DIMENSION_OUT_OF_RANGE + 1 ) , + D3D10_MESSAGE_ID_OMSETRENDERTARGETS_TOO_MANY_RENDER_TARGETS = ( D3D10_MESSAGE_ID_CREATERESOURCE_NOT_BINDABLE_AS_SHADER_RESOURCE + 1 ) , + D3D10_MESSAGE_ID_OMSETRENDERTARGETS_NO_DIFFERING_BIT_DEPTHS = ( D3D10_MESSAGE_ID_OMSETRENDERTARGETS_TOO_MANY_RENDER_TARGETS + 1 ) , + D3D10_MESSAGE_ID_IASETVERTEXBUFFERS_BAD_BUFFER_INDEX = ( D3D10_MESSAGE_ID_OMSETRENDERTARGETS_NO_DIFFERING_BIT_DEPTHS + 1 ) , + D3D10_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_TOO_MANY_VIEWPORTS = ( D3D10_MESSAGE_ID_IASETVERTEXBUFFERS_BAD_BUFFER_INDEX + 1 ) , + D3D10_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_ADJACENCY_UNSUPPORTED = ( D3D10_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_TOO_MANY_VIEWPORTS + 1 ) , + D3D10_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_TOO_MANY_SCISSORS = ( D3D10_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_ADJACENCY_UNSUPPORTED + 1 ) , + D3D10_MESSAGE_ID_COPYRESOURCE_ONLY_TEXTURE_2D_WITHIN_GPU_MEMORY = ( D3D10_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_TOO_MANY_SCISSORS + 1 ) , + D3D10_MESSAGE_ID_COPYRESOURCE_NO_TEXTURE_3D_READBACK = ( D3D10_MESSAGE_ID_COPYRESOURCE_ONLY_TEXTURE_2D_WITHIN_GPU_MEMORY + 1 ) , + D3D10_MESSAGE_ID_COPYRESOURCE_NO_TEXTURE_ONLY_READBACK = ( D3D10_MESSAGE_ID_COPYRESOURCE_NO_TEXTURE_3D_READBACK + 1 ) , + D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_UNSUPPORTED_FORMAT = ( D3D10_MESSAGE_ID_COPYRESOURCE_NO_TEXTURE_ONLY_READBACK + 1 ) , + D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_ALPHA_TO_COVERAGE = ( D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_UNSUPPORTED_FORMAT + 1 ) , + D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_DepthClipEnable_MUST_BE_TRUE = ( D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_ALPHA_TO_COVERAGE + 1 ) , + D3D10_MESSAGE_ID_DRAWINDEXED_STARTINDEXLOCATION_MUST_BE_POSITIVE = ( D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_DepthClipEnable_MUST_BE_TRUE + 1 ) , + D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_MUST_USE_LOWEST_LOD = ( D3D10_MESSAGE_ID_DRAWINDEXED_STARTINDEXLOCATION_MUST_BE_POSITIVE + 1 ) , + D3D10_MESSAGE_ID_CREATESAMPLERSTATE_MINLOD_MUST_NOT_BE_FRACTIONAL = ( D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_MUST_USE_LOWEST_LOD + 1 ) , + D3D10_MESSAGE_ID_CREATESAMPLERSTATE_MAXLOD_MUST_BE_FLT_MAX = ( D3D10_MESSAGE_ID_CREATESAMPLERSTATE_MINLOD_MUST_NOT_BE_FRACTIONAL + 1 ) , + D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_FIRSTARRAYSLICE_MUST_BE_ZERO = ( D3D10_MESSAGE_ID_CREATESAMPLERSTATE_MAXLOD_MUST_BE_FLT_MAX + 1 ) , + D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_CUBES_MUST_HAVE_6_SIDES = ( D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_FIRSTARRAYSLICE_MUST_BE_ZERO + 1 ) , + D3D10_MESSAGE_ID_CREATERESOURCE_NOT_BINDABLE_AS_RENDER_TARGET = ( D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_CUBES_MUST_HAVE_6_SIDES + 1 ) , + D3D10_MESSAGE_ID_CREATERESOURCE_NO_DWORD_INDEX_BUFFER = ( D3D10_MESSAGE_ID_CREATERESOURCE_NOT_BINDABLE_AS_RENDER_TARGET + 1 ) , + D3D10_MESSAGE_ID_CREATERESOURCE_MSAA_PRECLUDES_SHADER_RESOURCE = ( D3D10_MESSAGE_ID_CREATERESOURCE_NO_DWORD_INDEX_BUFFER + 1 ) , + D3D10_MESSAGE_ID_CREATERESOURCE_PRESENTATION_PRECLUDES_SHADER_RESOURCE = ( D3D10_MESSAGE_ID_CREATERESOURCE_MSAA_PRECLUDES_SHADER_RESOURCE + 1 ) , + D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_INDEPENDENT_BLEND_ENABLE = ( D3D10_MESSAGE_ID_CREATERESOURCE_PRESENTATION_PRECLUDES_SHADER_RESOURCE + 1 ) , + D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_INDEPENDENT_WRITE_MASKS = ( D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_INDEPENDENT_BLEND_ENABLE + 1 ) , + D3D10_MESSAGE_ID_CREATERESOURCE_NO_STREAM_OUT = ( D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_INDEPENDENT_WRITE_MASKS + 1 ) , + D3D10_MESSAGE_ID_CREATERESOURCE_ONLY_VB_IB_FOR_BUFFERS = ( D3D10_MESSAGE_ID_CREATERESOURCE_NO_STREAM_OUT + 1 ) , + D3D10_MESSAGE_ID_CREATERESOURCE_NO_AUTOGEN_FOR_VOLUMES = ( D3D10_MESSAGE_ID_CREATERESOURCE_ONLY_VB_IB_FOR_BUFFERS + 1 ) , + D3D10_MESSAGE_ID_CREATERESOURCE_DXGI_FORMAT_R8G8B8A8_CANNOT_BE_SHARED = ( D3D10_MESSAGE_ID_CREATERESOURCE_NO_AUTOGEN_FOR_VOLUMES + 1 ) , + D3D10_MESSAGE_ID_VSSHADERRESOURCES_NOT_SUPPORTED = ( D3D10_MESSAGE_ID_CREATERESOURCE_DXGI_FORMAT_R8G8B8A8_CANNOT_BE_SHARED + 1 ) , + D3D10_MESSAGE_ID_GEOMETRY_SHADER_NOT_SUPPORTED = ( D3D10_MESSAGE_ID_VSSHADERRESOURCES_NOT_SUPPORTED + 1 ) , + D3D10_MESSAGE_ID_STREAM_OUT_NOT_SUPPORTED = ( D3D10_MESSAGE_ID_GEOMETRY_SHADER_NOT_SUPPORTED + 1 ) , + D3D10_MESSAGE_ID_TEXT_FILTER_NOT_SUPPORTED = ( D3D10_MESSAGE_ID_STREAM_OUT_NOT_SUPPORTED + 1 ) , + D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_SEPARATE_ALPHA_BLEND = ( D3D10_MESSAGE_ID_TEXT_FILTER_NOT_SUPPORTED + 1 ) , + D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_MRT_BLEND = ( D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_SEPARATE_ALPHA_BLEND + 1 ) , + D3D10_MESSAGE_ID_CREATEBLENDSTATE_OPERATION_NOT_SUPPORTED = ( D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_MRT_BLEND + 1 ) , + D3D10_MESSAGE_ID_CREATESAMPLERSTATE_NO_MIRRORONCE = ( D3D10_MESSAGE_ID_CREATEBLENDSTATE_OPERATION_NOT_SUPPORTED + 1 ) , + D3D10_MESSAGE_ID_DRAWINSTANCED_NOT_SUPPORTED = ( D3D10_MESSAGE_ID_CREATESAMPLERSTATE_NO_MIRRORONCE + 1 ) , + D3D10_MESSAGE_ID_DRAWINDEXEDINSTANCED_NOT_SUPPORTED_BELOW_9_3 = ( D3D10_MESSAGE_ID_DRAWINSTANCED_NOT_SUPPORTED + 1 ) , + D3D10_MESSAGE_ID_DRAWINDEXED_POINTLIST_UNSUPPORTED = ( D3D10_MESSAGE_ID_DRAWINDEXEDINSTANCED_NOT_SUPPORTED_BELOW_9_3 + 1 ) , + D3D10_MESSAGE_ID_SETBLENDSTATE_SAMPLE_MASK_CANNOT_BE_ZERO = ( D3D10_MESSAGE_ID_DRAWINDEXED_POINTLIST_UNSUPPORTED + 1 ) , + D3D10_MESSAGE_ID_CREATERESOURCE_DIMENSION_EXCEEDS_FEATURE_LEVEL_DEFINITION = ( D3D10_MESSAGE_ID_SETBLENDSTATE_SAMPLE_MASK_CANNOT_BE_ZERO + 1 ) , + D3D10_MESSAGE_ID_CREATERESOURCE_ONLY_SINGLE_MIP_LEVEL_DEPTH_STENCIL_SUPPORTED = ( D3D10_MESSAGE_ID_CREATERESOURCE_DIMENSION_EXCEEDS_FEATURE_LEVEL_DEFINITION + 1 ) , + D3D10_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_NEGATIVESCISSOR = ( D3D10_MESSAGE_ID_CREATERESOURCE_ONLY_SINGLE_MIP_LEVEL_DEPTH_STENCIL_SUPPORTED + 1 ) , + D3D10_MESSAGE_ID_SLOT_ZERO_MUST_BE_D3D10_INPUT_PER_VERTEX_DATA = ( D3D10_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_NEGATIVESCISSOR + 1 ) , + D3D10_MESSAGE_ID_CREATERESOURCE_NON_POW_2_MIPMAP = ( D3D10_MESSAGE_ID_SLOT_ZERO_MUST_BE_D3D10_INPUT_PER_VERTEX_DATA + 1 ) , + D3D10_MESSAGE_ID_CREATESAMPLERSTATE_BORDER_NOT_SUPPORTED = ( D3D10_MESSAGE_ID_CREATERESOURCE_NON_POW_2_MIPMAP + 1 ) , + D3D10_MESSAGE_ID_OMSETRENDERTARGETS_NO_SRGB_MRT = ( D3D10_MESSAGE_ID_CREATESAMPLERSTATE_BORDER_NOT_SUPPORTED + 1 ) , + D3D10_MESSAGE_ID_COPYRESOURCE_NO_3D_MISMATCHED_UPDATES = ( D3D10_MESSAGE_ID_OMSETRENDERTARGETS_NO_SRGB_MRT + 1 ) , + D3D10_MESSAGE_ID_D3D10L9_MESSAGES_END = ( D3D10_MESSAGE_ID_COPYRESOURCE_NO_3D_MISMATCHED_UPDATES + 1 ) + } D3D10_MESSAGE_ID; + +typedef struct D3D10_MESSAGE + { + D3D10_MESSAGE_CATEGORY Category; + D3D10_MESSAGE_SEVERITY Severity; + D3D10_MESSAGE_ID ID; + /* [annotation] */ + _Field_size_(DescriptionByteLength) const char *pDescription; + SIZE_T DescriptionByteLength; + } D3D10_MESSAGE; + +typedef struct D3D10_INFO_QUEUE_FILTER_DESC + { + UINT NumCategories; + /* [annotation] */ + _Field_size_(NumCategories) D3D10_MESSAGE_CATEGORY *pCategoryList; + UINT NumSeverities; + /* [annotation] */ + _Field_size_(NumSeverities) D3D10_MESSAGE_SEVERITY *pSeverityList; + UINT NumIDs; + /* [annotation] */ + _Field_size_(NumIDs) D3D10_MESSAGE_ID *pIDList; + } D3D10_INFO_QUEUE_FILTER_DESC; + +typedef struct D3D10_INFO_QUEUE_FILTER + { + D3D10_INFO_QUEUE_FILTER_DESC AllowList; + D3D10_INFO_QUEUE_FILTER_DESC DenyList; + } D3D10_INFO_QUEUE_FILTER; + +#define D3D10_INFO_QUEUE_DEFAULT_MESSAGE_COUNT_LIMIT 1024 + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10sdklayers_0000_0002_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10sdklayers_0000_0002_v0_0_s_ifspec; + +#ifndef __ID3D10InfoQueue_INTERFACE_DEFINED__ +#define __ID3D10InfoQueue_INTERFACE_DEFINED__ + +/* interface ID3D10InfoQueue */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10InfoQueue; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1b940b17-2642-4d1f-ab1f-b99bad0c395f") + ID3D10InfoQueue : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetMessageCountLimit( + /* [annotation] */ + _In_ UINT64 MessageCountLimit) = 0; + + virtual void STDMETHODCALLTYPE ClearStoredMessages( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMessage( + /* [annotation] */ + _In_ UINT64 MessageIndex, + /* [annotation] */ + _Out_writes_bytes_opt_(*pMessageByteLength) D3D10_MESSAGE *pMessage, + /* [annotation] */ + _Inout_ SIZE_T *pMessageByteLength) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetNumMessagesAllowedByStorageFilter( void) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetNumMessagesDeniedByStorageFilter( void) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetNumStoredMessages( void) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetNumStoredMessagesAllowedByRetrievalFilter( void) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetNumMessagesDiscardedByMessageCountLimit( void) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetMessageCountLimit( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddStorageFilterEntries( + /* [annotation] */ + _In_ D3D10_INFO_QUEUE_FILTER *pFilter) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStorageFilter( + /* [annotation] */ + _Out_writes_bytes_opt_(*pFilterByteLength) D3D10_INFO_QUEUE_FILTER *pFilter, + /* [annotation] */ + _Inout_ SIZE_T *pFilterByteLength) = 0; + + virtual void STDMETHODCALLTYPE ClearStorageFilter( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushEmptyStorageFilter( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushCopyOfStorageFilter( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushStorageFilter( + /* [annotation] */ + _In_ D3D10_INFO_QUEUE_FILTER *pFilter) = 0; + + virtual void STDMETHODCALLTYPE PopStorageFilter( void) = 0; + + virtual UINT STDMETHODCALLTYPE GetStorageFilterStackSize( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddRetrievalFilterEntries( + /* [annotation] */ + _In_ D3D10_INFO_QUEUE_FILTER *pFilter) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRetrievalFilter( + /* [annotation] */ + _Out_writes_bytes_opt_(*pFilterByteLength) D3D10_INFO_QUEUE_FILTER *pFilter, + /* [annotation] */ + _Inout_ SIZE_T *pFilterByteLength) = 0; + + virtual void STDMETHODCALLTYPE ClearRetrievalFilter( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushEmptyRetrievalFilter( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushCopyOfRetrievalFilter( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushRetrievalFilter( + /* [annotation] */ + _In_ D3D10_INFO_QUEUE_FILTER *pFilter) = 0; + + virtual void STDMETHODCALLTYPE PopRetrievalFilter( void) = 0; + + virtual UINT STDMETHODCALLTYPE GetRetrievalFilterStackSize( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddMessage( + /* [annotation] */ + _In_ D3D10_MESSAGE_CATEGORY Category, + /* [annotation] */ + _In_ D3D10_MESSAGE_SEVERITY Severity, + /* [annotation] */ + _In_ D3D10_MESSAGE_ID ID, + /* [annotation] */ + _In_ LPCSTR pDescription) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddApplicationMessage( + /* [annotation] */ + _In_ D3D10_MESSAGE_SEVERITY Severity, + /* [annotation] */ + _In_ LPCSTR pDescription) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetBreakOnCategory( + /* [annotation] */ + _In_ D3D10_MESSAGE_CATEGORY Category, + /* [annotation] */ + _In_ BOOL bEnable) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetBreakOnSeverity( + /* [annotation] */ + _In_ D3D10_MESSAGE_SEVERITY Severity, + /* [annotation] */ + _In_ BOOL bEnable) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetBreakOnID( + /* [annotation] */ + _In_ D3D10_MESSAGE_ID ID, + /* [annotation] */ + _In_ BOOL bEnable) = 0; + + virtual BOOL STDMETHODCALLTYPE GetBreakOnCategory( + /* [annotation] */ + _In_ D3D10_MESSAGE_CATEGORY Category) = 0; + + virtual BOOL STDMETHODCALLTYPE GetBreakOnSeverity( + /* [annotation] */ + _In_ D3D10_MESSAGE_SEVERITY Severity) = 0; + + virtual BOOL STDMETHODCALLTYPE GetBreakOnID( + /* [annotation] */ + _In_ D3D10_MESSAGE_ID ID) = 0; + + virtual void STDMETHODCALLTYPE SetMuteDebugOutput( + /* [annotation] */ + _In_ BOOL bMute) = 0; + + virtual BOOL STDMETHODCALLTYPE GetMuteDebugOutput( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10InfoQueueVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10InfoQueue * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10InfoQueue * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *SetMessageCountLimit )( + ID3D10InfoQueue * This, + /* [annotation] */ + _In_ UINT64 MessageCountLimit); + + void ( STDMETHODCALLTYPE *ClearStoredMessages )( + ID3D10InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *GetMessage )( + ID3D10InfoQueue * This, + /* [annotation] */ + _In_ UINT64 MessageIndex, + /* [annotation] */ + _Out_writes_bytes_opt_(*pMessageByteLength) D3D10_MESSAGE *pMessage, + /* [annotation] */ + _Inout_ SIZE_T *pMessageByteLength); + + UINT64 ( STDMETHODCALLTYPE *GetNumMessagesAllowedByStorageFilter )( + ID3D10InfoQueue * This); + + UINT64 ( STDMETHODCALLTYPE *GetNumMessagesDeniedByStorageFilter )( + ID3D10InfoQueue * This); + + UINT64 ( STDMETHODCALLTYPE *GetNumStoredMessages )( + ID3D10InfoQueue * This); + + UINT64 ( STDMETHODCALLTYPE *GetNumStoredMessagesAllowedByRetrievalFilter )( + ID3D10InfoQueue * This); + + UINT64 ( STDMETHODCALLTYPE *GetNumMessagesDiscardedByMessageCountLimit )( + ID3D10InfoQueue * This); + + UINT64 ( STDMETHODCALLTYPE *GetMessageCountLimit )( + ID3D10InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *AddStorageFilterEntries )( + ID3D10InfoQueue * This, + /* [annotation] */ + _In_ D3D10_INFO_QUEUE_FILTER *pFilter); + + HRESULT ( STDMETHODCALLTYPE *GetStorageFilter )( + ID3D10InfoQueue * This, + /* [annotation] */ + _Out_writes_bytes_opt_(*pFilterByteLength) D3D10_INFO_QUEUE_FILTER *pFilter, + /* [annotation] */ + _Inout_ SIZE_T *pFilterByteLength); + + void ( STDMETHODCALLTYPE *ClearStorageFilter )( + ID3D10InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *PushEmptyStorageFilter )( + ID3D10InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *PushCopyOfStorageFilter )( + ID3D10InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *PushStorageFilter )( + ID3D10InfoQueue * This, + /* [annotation] */ + _In_ D3D10_INFO_QUEUE_FILTER *pFilter); + + void ( STDMETHODCALLTYPE *PopStorageFilter )( + ID3D10InfoQueue * This); + + UINT ( STDMETHODCALLTYPE *GetStorageFilterStackSize )( + ID3D10InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *AddRetrievalFilterEntries )( + ID3D10InfoQueue * This, + /* [annotation] */ + _In_ D3D10_INFO_QUEUE_FILTER *pFilter); + + HRESULT ( STDMETHODCALLTYPE *GetRetrievalFilter )( + ID3D10InfoQueue * This, + /* [annotation] */ + _Out_writes_bytes_opt_(*pFilterByteLength) D3D10_INFO_QUEUE_FILTER *pFilter, + /* [annotation] */ + _Inout_ SIZE_T *pFilterByteLength); + + void ( STDMETHODCALLTYPE *ClearRetrievalFilter )( + ID3D10InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *PushEmptyRetrievalFilter )( + ID3D10InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *PushCopyOfRetrievalFilter )( + ID3D10InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *PushRetrievalFilter )( + ID3D10InfoQueue * This, + /* [annotation] */ + _In_ D3D10_INFO_QUEUE_FILTER *pFilter); + + void ( STDMETHODCALLTYPE *PopRetrievalFilter )( + ID3D10InfoQueue * This); + + UINT ( STDMETHODCALLTYPE *GetRetrievalFilterStackSize )( + ID3D10InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *AddMessage )( + ID3D10InfoQueue * This, + /* [annotation] */ + _In_ D3D10_MESSAGE_CATEGORY Category, + /* [annotation] */ + _In_ D3D10_MESSAGE_SEVERITY Severity, + /* [annotation] */ + _In_ D3D10_MESSAGE_ID ID, + /* [annotation] */ + _In_ LPCSTR pDescription); + + HRESULT ( STDMETHODCALLTYPE *AddApplicationMessage )( + ID3D10InfoQueue * This, + /* [annotation] */ + _In_ D3D10_MESSAGE_SEVERITY Severity, + /* [annotation] */ + _In_ LPCSTR pDescription); + + HRESULT ( STDMETHODCALLTYPE *SetBreakOnCategory )( + ID3D10InfoQueue * This, + /* [annotation] */ + _In_ D3D10_MESSAGE_CATEGORY Category, + /* [annotation] */ + _In_ BOOL bEnable); + + HRESULT ( STDMETHODCALLTYPE *SetBreakOnSeverity )( + ID3D10InfoQueue * This, + /* [annotation] */ + _In_ D3D10_MESSAGE_SEVERITY Severity, + /* [annotation] */ + _In_ BOOL bEnable); + + HRESULT ( STDMETHODCALLTYPE *SetBreakOnID )( + ID3D10InfoQueue * This, + /* [annotation] */ + _In_ D3D10_MESSAGE_ID ID, + /* [annotation] */ + _In_ BOOL bEnable); + + BOOL ( STDMETHODCALLTYPE *GetBreakOnCategory )( + ID3D10InfoQueue * This, + /* [annotation] */ + _In_ D3D10_MESSAGE_CATEGORY Category); + + BOOL ( STDMETHODCALLTYPE *GetBreakOnSeverity )( + ID3D10InfoQueue * This, + /* [annotation] */ + _In_ D3D10_MESSAGE_SEVERITY Severity); + + BOOL ( STDMETHODCALLTYPE *GetBreakOnID )( + ID3D10InfoQueue * This, + /* [annotation] */ + _In_ D3D10_MESSAGE_ID ID); + + void ( STDMETHODCALLTYPE *SetMuteDebugOutput )( + ID3D10InfoQueue * This, + /* [annotation] */ + _In_ BOOL bMute); + + BOOL ( STDMETHODCALLTYPE *GetMuteDebugOutput )( + ID3D10InfoQueue * This); + + END_INTERFACE + } ID3D10InfoQueueVtbl; + + interface ID3D10InfoQueue + { + CONST_VTBL struct ID3D10InfoQueueVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10InfoQueue_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10InfoQueue_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10InfoQueue_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10InfoQueue_SetMessageCountLimit(This,MessageCountLimit) \ + ( (This)->lpVtbl -> SetMessageCountLimit(This,MessageCountLimit) ) + +#define ID3D10InfoQueue_ClearStoredMessages(This) \ + ( (This)->lpVtbl -> ClearStoredMessages(This) ) + +#define ID3D10InfoQueue_GetMessage(This,MessageIndex,pMessage,pMessageByteLength) \ + ( (This)->lpVtbl -> GetMessage(This,MessageIndex,pMessage,pMessageByteLength) ) + +#define ID3D10InfoQueue_GetNumMessagesAllowedByStorageFilter(This) \ + ( (This)->lpVtbl -> GetNumMessagesAllowedByStorageFilter(This) ) + +#define ID3D10InfoQueue_GetNumMessagesDeniedByStorageFilter(This) \ + ( (This)->lpVtbl -> GetNumMessagesDeniedByStorageFilter(This) ) + +#define ID3D10InfoQueue_GetNumStoredMessages(This) \ + ( (This)->lpVtbl -> GetNumStoredMessages(This) ) + +#define ID3D10InfoQueue_GetNumStoredMessagesAllowedByRetrievalFilter(This) \ + ( (This)->lpVtbl -> GetNumStoredMessagesAllowedByRetrievalFilter(This) ) + +#define ID3D10InfoQueue_GetNumMessagesDiscardedByMessageCountLimit(This) \ + ( (This)->lpVtbl -> GetNumMessagesDiscardedByMessageCountLimit(This) ) + +#define ID3D10InfoQueue_GetMessageCountLimit(This) \ + ( (This)->lpVtbl -> GetMessageCountLimit(This) ) + +#define ID3D10InfoQueue_AddStorageFilterEntries(This,pFilter) \ + ( (This)->lpVtbl -> AddStorageFilterEntries(This,pFilter) ) + +#define ID3D10InfoQueue_GetStorageFilter(This,pFilter,pFilterByteLength) \ + ( (This)->lpVtbl -> GetStorageFilter(This,pFilter,pFilterByteLength) ) + +#define ID3D10InfoQueue_ClearStorageFilter(This) \ + ( (This)->lpVtbl -> ClearStorageFilter(This) ) + +#define ID3D10InfoQueue_PushEmptyStorageFilter(This) \ + ( (This)->lpVtbl -> PushEmptyStorageFilter(This) ) + +#define ID3D10InfoQueue_PushCopyOfStorageFilter(This) \ + ( (This)->lpVtbl -> PushCopyOfStorageFilter(This) ) + +#define ID3D10InfoQueue_PushStorageFilter(This,pFilter) \ + ( (This)->lpVtbl -> PushStorageFilter(This,pFilter) ) + +#define ID3D10InfoQueue_PopStorageFilter(This) \ + ( (This)->lpVtbl -> PopStorageFilter(This) ) + +#define ID3D10InfoQueue_GetStorageFilterStackSize(This) \ + ( (This)->lpVtbl -> GetStorageFilterStackSize(This) ) + +#define ID3D10InfoQueue_AddRetrievalFilterEntries(This,pFilter) \ + ( (This)->lpVtbl -> AddRetrievalFilterEntries(This,pFilter) ) + +#define ID3D10InfoQueue_GetRetrievalFilter(This,pFilter,pFilterByteLength) \ + ( (This)->lpVtbl -> GetRetrievalFilter(This,pFilter,pFilterByteLength) ) + +#define ID3D10InfoQueue_ClearRetrievalFilter(This) \ + ( (This)->lpVtbl -> ClearRetrievalFilter(This) ) + +#define ID3D10InfoQueue_PushEmptyRetrievalFilter(This) \ + ( (This)->lpVtbl -> PushEmptyRetrievalFilter(This) ) + +#define ID3D10InfoQueue_PushCopyOfRetrievalFilter(This) \ + ( (This)->lpVtbl -> PushCopyOfRetrievalFilter(This) ) + +#define ID3D10InfoQueue_PushRetrievalFilter(This,pFilter) \ + ( (This)->lpVtbl -> PushRetrievalFilter(This,pFilter) ) + +#define ID3D10InfoQueue_PopRetrievalFilter(This) \ + ( (This)->lpVtbl -> PopRetrievalFilter(This) ) + +#define ID3D10InfoQueue_GetRetrievalFilterStackSize(This) \ + ( (This)->lpVtbl -> GetRetrievalFilterStackSize(This) ) + +#define ID3D10InfoQueue_AddMessage(This,Category,Severity,ID,pDescription) \ + ( (This)->lpVtbl -> AddMessage(This,Category,Severity,ID,pDescription) ) + +#define ID3D10InfoQueue_AddApplicationMessage(This,Severity,pDescription) \ + ( (This)->lpVtbl -> AddApplicationMessage(This,Severity,pDescription) ) + +#define ID3D10InfoQueue_SetBreakOnCategory(This,Category,bEnable) \ + ( (This)->lpVtbl -> SetBreakOnCategory(This,Category,bEnable) ) + +#define ID3D10InfoQueue_SetBreakOnSeverity(This,Severity,bEnable) \ + ( (This)->lpVtbl -> SetBreakOnSeverity(This,Severity,bEnable) ) + +#define ID3D10InfoQueue_SetBreakOnID(This,ID,bEnable) \ + ( (This)->lpVtbl -> SetBreakOnID(This,ID,bEnable) ) + +#define ID3D10InfoQueue_GetBreakOnCategory(This,Category) \ + ( (This)->lpVtbl -> GetBreakOnCategory(This,Category) ) + +#define ID3D10InfoQueue_GetBreakOnSeverity(This,Severity) \ + ( (This)->lpVtbl -> GetBreakOnSeverity(This,Severity) ) + +#define ID3D10InfoQueue_GetBreakOnID(This,ID) \ + ( (This)->lpVtbl -> GetBreakOnID(This,ID) ) + +#define ID3D10InfoQueue_SetMuteDebugOutput(This,bMute) \ + ( (This)->lpVtbl -> SetMuteDebugOutput(This,bMute) ) + +#define ID3D10InfoQueue_GetMuteDebugOutput(This) \ + ( (This)->lpVtbl -> GetMuteDebugOutput(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10InfoQueue_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d10sdklayers_0000_0003 */ +/* [local] */ + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ +DEFINE_GUID(IID_ID3D10Debug,0x9B7E4E01,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); +DEFINE_GUID(IID_ID3D10SwitchToRef,0x9B7E4E02,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); +DEFINE_GUID(IID_ID3D10InfoQueue,0x1b940b17,0x2642,0x4d1f,0xab,0x1f,0xb9,0x9b,0xad,0x0c,0x39,0x5f); + + +extern RPC_IF_HANDLE __MIDL_itf_d3d10sdklayers_0000_0003_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d10sdklayers_0000_0003_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/d3d10shader.h b/gfx/include/dxsdk/d3d10shader.h new file mode 100644 index 0000000000..c4a6227656 --- /dev/null +++ b/gfx/include/dxsdk/d3d10shader.h @@ -0,0 +1,560 @@ +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// File: D3D10Shader.h +// Content: D3D10 Shader Types and APIs +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef __D3D10SHADER_H__ +#define __D3D10SHADER_H__ + + +#include "d3d10.h" + +/*#include */ + +/*#pragma region Desktop Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ + + +//--------------------------------------------------------------------------- +// D3D10_TX_VERSION: +// -------------- +// Version token used to create a procedural texture filler in effects +// Used by D3D10Fill[]TX functions +//--------------------------------------------------------------------------- +#define D3D10_TX_VERSION(_Major,_Minor) (('T' << 24) | ('X' << 16) | ((_Major) << 8) | (_Minor)) + + +//---------------------------------------------------------------------------- +// D3D10SHADER flags: +// ----------------- +// D3D10_SHADER_DEBUG +// Insert debug file/line/type/symbol information. +// +// D3D10_SHADER_SKIP_VALIDATION +// Do not validate the generated code against known capabilities and +// constraints. This option is only recommended when compiling shaders +// you KNOW will work. (ie. have compiled before without this option.) +// Shaders are always validated by D3D before they are set to the device. +// +// D3D10_SHADER_SKIP_OPTIMIZATION +// Instructs the compiler to skip optimization steps during code generation. +// Unless you are trying to isolate a problem in your code using this option +// is not recommended. +// +// D3D10_SHADER_PACK_MATRIX_ROW_MAJOR +// Unless explicitly specified, matrices will be packed in row-major order +// on input and output from the shader. +// +// D3D10_SHADER_PACK_MATRIX_COLUMN_MAJOR +// Unless explicitly specified, matrices will be packed in column-major +// order on input and output from the shader. This is generally more +// efficient, since it allows vector-matrix multiplication to be performed +// using a series of dot-products. +// +// D3D10_SHADER_PARTIAL_PRECISION +// Force all computations in resulting shader to occur at partial precision. +// This may result in faster evaluation of shaders on some hardware. +// +// D3D10_SHADER_FORCE_VS_SOFTWARE_NO_OPT +// Force compiler to compile against the next highest available software +// target for vertex shaders. This flag also turns optimizations off, +// and debugging on. +// +// D3D10_SHADER_FORCE_PS_SOFTWARE_NO_OPT +// Force compiler to compile against the next highest available software +// target for pixel shaders. This flag also turns optimizations off, +// and debugging on. +// +// D3D10_SHADER_NO_PRESHADER +// Disables Preshaders. Using this flag will cause the compiler to not +// pull out static expression for evaluation on the host cpu +// +// D3D10_SHADER_AVOID_FLOW_CONTROL +// Hint compiler to avoid flow-control constructs where possible. +// +// D3D10_SHADER_PREFER_FLOW_CONTROL +// Hint compiler to prefer flow-control constructs where possible. +// +// D3D10_SHADER_ENABLE_STRICTNESS +// By default, the HLSL/Effect compilers are not strict on deprecated syntax. +// Specifying this flag enables the strict mode. Deprecated syntax may be +// removed in a future release, and enabling syntax is a good way to make sure +// your shaders comply to the latest spec. +// +// D3D10_SHADER_ENABLE_BACKWARDS_COMPATIBILITY +// This enables older shaders to compile to 4_0 targets. +// +//---------------------------------------------------------------------------- + +#define D3D10_SHADER_DEBUG (1 << 0) +#define D3D10_SHADER_SKIP_VALIDATION (1 << 1) +#define D3D10_SHADER_SKIP_OPTIMIZATION (1 << 2) +#define D3D10_SHADER_PACK_MATRIX_ROW_MAJOR (1 << 3) +#define D3D10_SHADER_PACK_MATRIX_COLUMN_MAJOR (1 << 4) +#define D3D10_SHADER_PARTIAL_PRECISION (1 << 5) +#define D3D10_SHADER_FORCE_VS_SOFTWARE_NO_OPT (1 << 6) +#define D3D10_SHADER_FORCE_PS_SOFTWARE_NO_OPT (1 << 7) +#define D3D10_SHADER_NO_PRESHADER (1 << 8) +#define D3D10_SHADER_AVOID_FLOW_CONTROL (1 << 9) +#define D3D10_SHADER_PREFER_FLOW_CONTROL (1 << 10) +#define D3D10_SHADER_ENABLE_STRICTNESS (1 << 11) +#define D3D10_SHADER_ENABLE_BACKWARDS_COMPATIBILITY (1 << 12) +#define D3D10_SHADER_IEEE_STRICTNESS (1 << 13) +#define D3D10_SHADER_WARNINGS_ARE_ERRORS (1 << 18) +#define D3D10_SHADER_RESOURCES_MAY_ALIAS (1 << 19) +#define D3D10_ENABLE_UNBOUNDED_DESCRIPTOR_TABLES (1 << 20) +#define D3D10_ALL_RESOURCES_BOUND (1 << 21) +#define D3D10_SHADER_DEBUG_NAME_FOR_SOURCE (1 << 22) +#define D3D10_SHADER_DEBUG_NAME_FOR_BINARY (1 << 23) + + +// optimization level flags +#define D3D10_SHADER_OPTIMIZATION_LEVEL0 (1 << 14) +#define D3D10_SHADER_OPTIMIZATION_LEVEL1 0 +#define D3D10_SHADER_OPTIMIZATION_LEVEL2 ((1 << 14) | (1 << 15)) +#define D3D10_SHADER_OPTIMIZATION_LEVEL3 (1 << 15) + + +// Force root signature flags. (Passed in Flags2) +#define D3D10_SHADER_FLAGS2_FORCE_ROOT_SIGNATURE_LATEST 0 +#define D3D10_SHADER_FLAGS2_FORCE_ROOT_SIGNATURE_1_0 (1 << 4) +#define D3D10_SHADER_FLAGS2_FORCE_ROOT_SIGNATURE_1_1 (1 << 5) + + + + +typedef D3D_SHADER_MACRO D3D10_SHADER_MACRO; +typedef D3D10_SHADER_MACRO* LPD3D10_SHADER_MACRO; + + +typedef D3D_SHADER_VARIABLE_CLASS D3D10_SHADER_VARIABLE_CLASS; +typedef D3D10_SHADER_VARIABLE_CLASS* LPD3D10_SHADER_VARIABLE_CLASS; + +typedef D3D_SHADER_VARIABLE_FLAGS D3D10_SHADER_VARIABLE_FLAGS; +typedef D3D10_SHADER_VARIABLE_FLAGS* LPD3D10_SHADER_VARIABLE_FLAGS; + +typedef D3D_SHADER_VARIABLE_TYPE D3D10_SHADER_VARIABLE_TYPE; +typedef D3D10_SHADER_VARIABLE_TYPE* LPD3D10_SHADER_VARIABLE_TYPE; + +typedef D3D_SHADER_INPUT_FLAGS D3D10_SHADER_INPUT_FLAGS; +typedef D3D10_SHADER_INPUT_FLAGS* LPD3D10_SHADER_INPUT_FLAGS; + +typedef D3D_SHADER_INPUT_TYPE D3D10_SHADER_INPUT_TYPE; +typedef D3D10_SHADER_INPUT_TYPE* LPD3D10_SHADER_INPUT_TYPE; + +typedef D3D_SHADER_CBUFFER_FLAGS D3D10_SHADER_CBUFFER_FLAGS; +typedef D3D10_SHADER_CBUFFER_FLAGS* LPD3D10_SHADER_CBUFFER_FLAGS; + +typedef D3D_CBUFFER_TYPE D3D10_CBUFFER_TYPE; +typedef D3D10_CBUFFER_TYPE* LPD3D10_CBUFFER_TYPE; + +typedef D3D_NAME D3D10_NAME; + +typedef D3D_RESOURCE_RETURN_TYPE D3D10_RESOURCE_RETURN_TYPE; + +typedef D3D_REGISTER_COMPONENT_TYPE D3D10_REGISTER_COMPONENT_TYPE; + +typedef D3D_INCLUDE_TYPE D3D10_INCLUDE_TYPE; + +// ID3D10Include has been made version-neutral and moved to d3dcommon.h. +typedef interface ID3DInclude ID3D10Include; +typedef interface ID3DInclude* LPD3D10INCLUDE; +#define IID_ID3D10Include IID_ID3DInclude + + +//---------------------------------------------------------------------------- +// ID3D10ShaderReflection: +//---------------------------------------------------------------------------- + +// +// Structure definitions +// + +typedef struct _D3D10_SHADER_DESC +{ + UINT Version; // Shader version + LPCSTR Creator; // Creator string + UINT Flags; // Shader compilation/parse flags + + UINT ConstantBuffers; // Number of constant buffers + UINT BoundResources; // Number of bound resources + UINT InputParameters; // Number of parameters in the input signature + UINT OutputParameters; // Number of parameters in the output signature + + UINT InstructionCount; // Number of emitted instructions + UINT TempRegisterCount; // Number of temporary registers used + UINT TempArrayCount; // Number of temporary arrays used + UINT DefCount; // Number of constant defines + UINT DclCount; // Number of declarations (input + output) + UINT TextureNormalInstructions; // Number of non-categorized texture instructions + UINT TextureLoadInstructions; // Number of texture load instructions + UINT TextureCompInstructions; // Number of texture comparison instructions + UINT TextureBiasInstructions; // Number of texture bias instructions + UINT TextureGradientInstructions; // Number of texture gradient instructions + UINT FloatInstructionCount; // Number of floating point arithmetic instructions used + UINT IntInstructionCount; // Number of signed integer arithmetic instructions used + UINT UintInstructionCount; // Number of unsigned integer arithmetic instructions used + UINT StaticFlowControlCount; // Number of static flow control instructions used + UINT DynamicFlowControlCount; // Number of dynamic flow control instructions used + UINT MacroInstructionCount; // Number of macro instructions used + UINT ArrayInstructionCount; // Number of array instructions used + UINT CutInstructionCount; // Number of cut instructions used + UINT EmitInstructionCount; // Number of emit instructions used + D3D10_PRIMITIVE_TOPOLOGY GSOutputTopology; // Geometry shader output topology + UINT GSMaxOutputVertexCount; // Geometry shader maximum output vertex count +} D3D10_SHADER_DESC; + +typedef struct _D3D10_SHADER_BUFFER_DESC +{ + LPCSTR Name; // Name of the constant buffer + D3D10_CBUFFER_TYPE Type; // Indicates that this is a CBuffer or TBuffer + UINT Variables; // Number of member variables + UINT Size; // Size of CB (in bytes) + UINT uFlags; // Buffer description flags +} D3D10_SHADER_BUFFER_DESC; + +typedef struct _D3D10_SHADER_VARIABLE_DESC +{ + LPCSTR Name; // Name of the variable + UINT StartOffset; // Offset in constant buffer's backing store + UINT Size; // Size of variable (in bytes) + UINT uFlags; // Variable flags + LPVOID DefaultValue; // Raw pointer to default value +} D3D10_SHADER_VARIABLE_DESC; + +typedef struct _D3D10_SHADER_TYPE_DESC +{ + D3D10_SHADER_VARIABLE_CLASS Class; // Variable class (e.g. object, matrix, etc.) + D3D10_SHADER_VARIABLE_TYPE Type; // Variable type (e.g. float, sampler, etc.) + UINT Rows; // Number of rows (for matrices, 1 for other numeric, 0 if not applicable) + UINT Columns; // Number of columns (for vectors & matrices, 1 for other numeric, 0 if not applicable) + UINT Elements; // Number of elements (0 if not an array) + UINT Members; // Number of members (0 if not a structure) + UINT Offset; // Offset from the start of structure (0 if not a structure member) +} D3D10_SHADER_TYPE_DESC; + +typedef struct _D3D10_SHADER_INPUT_BIND_DESC +{ + LPCSTR Name; // Name of the resource + D3D10_SHADER_INPUT_TYPE Type; // Type of resource (e.g. texture, cbuffer, etc.) + UINT BindPoint; // Starting bind point + UINT BindCount; // Number of contiguous bind points (for arrays) + + UINT uFlags; // Input binding flags + D3D10_RESOURCE_RETURN_TYPE ReturnType; // Return type (if texture) + D3D10_SRV_DIMENSION Dimension; // Dimension (if texture) + UINT NumSamples; // Number of samples (0 if not MS texture) +} D3D10_SHADER_INPUT_BIND_DESC; + +typedef struct _D3D10_SIGNATURE_PARAMETER_DESC +{ + LPCSTR SemanticName; // Name of the semantic + UINT SemanticIndex; // Index of the semantic + UINT Register; // Number of member variables + D3D10_NAME SystemValueType;// A predefined system value, or D3D10_NAME_UNDEFINED if not applicable + D3D10_REGISTER_COMPONENT_TYPE ComponentType;// Scalar type (e.g. uint, float, etc.) + BYTE Mask; // Mask to indicate which components of the register + // are used (combination of D3D10_COMPONENT_MASK values) + BYTE ReadWriteMask; // Mask to indicate whether a given component is + // never written (if this is an output signature) or + // always read (if this is an input signature). + // (combination of D3D10_COMPONENT_MASK values) + +} D3D10_SIGNATURE_PARAMETER_DESC; + + +// +// Interface definitions +// + + + + +typedef interface ID3D10ShaderReflectionType ID3D10ShaderReflectionType; +typedef interface ID3D10ShaderReflectionType *LPD3D10SHADERREFLECTIONTYPE; + +// {C530AD7D-9B16-4395-A979-BA2ECFF83ADD} +interface DECLSPEC_UUID("C530AD7D-9B16-4395-A979-BA2ECFF83ADD") ID3D10ShaderReflectionType; +DEFINE_GUID(IID_ID3D10ShaderReflectionType, +0xc530ad7d, 0x9b16, 0x4395, 0xa9, 0x79, 0xba, 0x2e, 0xcf, 0xf8, 0x3a, 0xdd); + +#undef INTERFACE +#define INTERFACE ID3D10ShaderReflectionType + +DECLARE_INTERFACE(ID3D10ShaderReflectionType) +{ + STDMETHOD(GetDesc)(THIS_ D3D10_SHADER_TYPE_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10ShaderReflectionType*, GetMemberTypeByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10ShaderReflectionType*, GetMemberTypeByName)(THIS_ LPCSTR Name) PURE; + STDMETHOD_(LPCSTR, GetMemberTypeName)(THIS_ UINT Index) PURE; +}; + +typedef interface ID3D10ShaderReflectionVariable ID3D10ShaderReflectionVariable; +typedef interface ID3D10ShaderReflectionVariable *LPD3D10SHADERREFLECTIONVARIABLE; + +// {1BF63C95-2650-405d-99C1-3636BD1DA0A1} +interface DECLSPEC_UUID("1BF63C95-2650-405d-99C1-3636BD1DA0A1") ID3D10ShaderReflectionVariable; +DEFINE_GUID(IID_ID3D10ShaderReflectionVariable, +0x1bf63c95, 0x2650, 0x405d, 0x99, 0xc1, 0x36, 0x36, 0xbd, 0x1d, 0xa0, 0xa1); + +#undef INTERFACE +#define INTERFACE ID3D10ShaderReflectionVariable + +DECLARE_INTERFACE(ID3D10ShaderReflectionVariable) +{ + STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_SHADER_VARIABLE_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10ShaderReflectionType*, GetType)(THIS) PURE; +}; + +typedef interface ID3D10ShaderReflectionConstantBuffer ID3D10ShaderReflectionConstantBuffer; +typedef interface ID3D10ShaderReflectionConstantBuffer *LPD3D10SHADERREFLECTIONCONSTANTBUFFER; + +// {66C66A94-DDDD-4b62-A66A-F0DA33C2B4D0} +interface DECLSPEC_UUID("66C66A94-DDDD-4b62-A66A-F0DA33C2B4D0") ID3D10ShaderReflectionConstantBuffer; +DEFINE_GUID(IID_ID3D10ShaderReflectionConstantBuffer, +0x66c66a94, 0xdddd, 0x4b62, 0xa6, 0x6a, 0xf0, 0xda, 0x33, 0xc2, 0xb4, 0xd0); + +#undef INTERFACE +#define INTERFACE ID3D10ShaderReflectionConstantBuffer + +DECLARE_INTERFACE(ID3D10ShaderReflectionConstantBuffer) +{ + STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_SHADER_BUFFER_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10ShaderReflectionVariable*, GetVariableByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10ShaderReflectionVariable*, GetVariableByName)(THIS_ LPCSTR Name) PURE; +}; + +typedef interface ID3D10ShaderReflection ID3D10ShaderReflection; +typedef interface ID3D10ShaderReflection *LPD3D10SHADERREFLECTION; + +// {D40E20B6-F8F7-42ad-AB20-4BAF8F15DFAA} +interface DECLSPEC_UUID("D40E20B6-F8F7-42ad-AB20-4BAF8F15DFAA") ID3D10ShaderReflection; +DEFINE_GUID(IID_ID3D10ShaderReflection, +0xd40e20b6, 0xf8f7, 0x42ad, 0xab, 0x20, 0x4b, 0xaf, 0x8f, 0x15, 0xdf, 0xaa); + +#undef INTERFACE +#define INTERFACE ID3D10ShaderReflection + +DECLARE_INTERFACE_(ID3D10ShaderReflection, IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_SHADER_DESC *pDesc) PURE; + + STDMETHOD_(ID3D10ShaderReflectionConstantBuffer*, GetConstantBufferByIndex)(THIS_ UINT Index) PURE; + STDMETHOD_(ID3D10ShaderReflectionConstantBuffer*, GetConstantBufferByName)(THIS_ LPCSTR Name) PURE; + + STDMETHOD(GetResourceBindingDesc)(THIS_ UINT ResourceIndex, _Out_ D3D10_SHADER_INPUT_BIND_DESC *pDesc) PURE; + + STDMETHOD(GetInputParameterDesc)(THIS_ UINT ParameterIndex, _Out_ D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE; + STDMETHOD(GetOutputParameterDesc)(THIS_ UINT ParameterIndex, _Out_ D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE; + +}; + +////////////////////////////////////////////////////////////////////////////// +// APIs ////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + +//---------------------------------------------------------------------------- +// D3D10CompileShader: +// ------------------ +// Compiles a shader. +// +// Parameters: +// pSrcFile +// Source file name. +// hSrcModule +// Module handle. if NULL, current module will be used. +// pSrcResource +// Resource name in module. +// pSrcData +// Pointer to source code. +// SrcDataSize +// Size of source code, in bytes. +// pDefines +// Optional NULL-terminated array of preprocessor macro definitions. +// pInclude +// Optional interface pointer to use for handling #include directives. +// If this parameter is NULL, #includes will be honored when compiling +// from file, and will error when compiling from resource or memory. +// pFunctionName +// Name of the entrypoint function where execution should begin. +// pProfile +// Instruction set to be used when generating code. The D3D10 entry +// point currently supports only "vs_4_0", "ps_4_0", and "gs_4_0". +// Flags +// See D3D10_SHADER_xxx flags. +// ppShader +// Returns a buffer containing the created shader. This buffer contains +// the compiled shader code, as well as any embedded debug and symbol +// table info. (See D3D10GetShaderConstantTable) +// ppErrorMsgs +// Returns a buffer containing a listing of errors and warnings that were +// encountered during the compile. If you are running in a debugger, +// these are the same messages you will see in your debug output. +//---------------------------------------------------------------------------- + +HRESULT WINAPI D3D10CompileShader(_In_reads_bytes_(SrcDataSize) LPCSTR pSrcData, SIZE_T SrcDataSize, _In_opt_ LPCSTR pFileName, _In_opt_ CONST D3D10_SHADER_MACRO* pDefines, _In_opt_ LPD3D10INCLUDE pInclude, + LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags, _Out_ ID3D10Blob** ppShader, _Out_opt_ ID3D10Blob** ppErrorMsgs); + +//---------------------------------------------------------------------------- +// D3D10DisassembleShader: +// ---------------------- +// Takes a binary shader, and returns a buffer containing text assembly. +// +// Parameters: +// pShader +// Pointer to the shader byte code. +// BytecodeLength +// Size of the shader byte code in bytes. +// EnableColorCode +// Emit HTML tags for color coding the output? +// pComments +// Pointer to a comment string to include at the top of the shader. +// ppDisassembly +// Returns a buffer containing the disassembled shader. +//---------------------------------------------------------------------------- + +HRESULT WINAPI D3D10DisassembleShader(_In_reads_bytes_(BytecodeLength) CONST void *pShader, SIZE_T BytecodeLength, BOOL EnableColorCode, _In_opt_ LPCSTR pComments, _Out_ ID3D10Blob** ppDisassembly); + + +//---------------------------------------------------------------------------- +// D3D10GetPixelShaderProfile/D3D10GetVertexShaderProfile/D3D10GetGeometryShaderProfile: +// ----------------------------------------------------- +// Returns the name of the HLSL profile best suited to a given device. +// +// Parameters: +// pDevice +// Pointer to the device in question +//---------------------------------------------------------------------------- + +LPCSTR WINAPI D3D10GetPixelShaderProfile(_In_ ID3D10Device *pDevice); + +LPCSTR WINAPI D3D10GetVertexShaderProfile(_In_ ID3D10Device *pDevice); + +LPCSTR WINAPI D3D10GetGeometryShaderProfile(_In_ ID3D10Device *pDevice); + +//---------------------------------------------------------------------------- +// D3D10ReflectShader: +// ------------------ +// Creates a shader reflection object that can be used to retrieve information +// about a compiled shader +// +// Parameters: +// pShaderBytecode +// Pointer to a compiled shader (same pointer that is passed into +// ID3D10Device::CreateShader) +// BytecodeLength +// Length of the shader bytecode buffer +// ppReflector +// [out] Returns a ID3D10ShaderReflection object that can be used to +// retrieve shader resource and constant buffer information +// +//---------------------------------------------------------------------------- + +HRESULT WINAPI D3D10ReflectShader(_In_reads_bytes_(BytecodeLength) CONST void *pShaderBytecode, SIZE_T BytecodeLength, _Out_ ID3D10ShaderReflection **ppReflector); + +//---------------------------------------------------------------------------- +// D3D10PreprocessShader +// --------------------- +// Creates a shader reflection object that can be used to retrieve information +// about a compiled shader +// +// Parameters: +// pSrcData +// Pointer to source code +// SrcDataSize +// Size of source code, in bytes +// pFileName +// Source file name (used for error output) +// pDefines +// Optional NULL-terminated array of preprocessor macro definitions. +// pInclude +// Optional interface pointer to use for handling #include directives. +// If this parameter is NULL, #includes will be honored when assembling +// from file, and will error when assembling from resource or memory. +// ppShaderText +// Returns a buffer containing a single large string that represents +// the resulting formatted token stream +// ppErrorMsgs +// Returns a buffer containing a listing of errors and warnings that were +// encountered during assembly. If you are running in a debugger, +// these are the same messages you will see in your debug output. +//---------------------------------------------------------------------------- + +HRESULT WINAPI D3D10PreprocessShader(_In_reads_bytes_(SrcDataSize) LPCSTR pSrcData, SIZE_T SrcDataSize, _In_opt_ LPCSTR pFileName, _In_opt_ CONST D3D10_SHADER_MACRO* pDefines, + _In_opt_ LPD3D10INCLUDE pInclude, _Out_ ID3D10Blob** ppShaderText, _Out_opt_ ID3D10Blob** ppErrorMsgs); + +////////////////////////////////////////////////////////////////////////// +// +// Shader blob manipulation routines +// --------------------------------- +// +// void *pShaderBytecode - a buffer containing the result of an HLSL +// compilation. Typically this opaque buffer contains several +// discrete sections including the shader executable code, the input +// signature, and the output signature. This can typically be retrieved +// by calling ID3D10Blob::GetBufferPointer() on the returned blob +// from HLSL's compile APIs. +// +// UINT BytecodeLength - the length of pShaderBytecode. This can +// typically be retrieved by calling ID3D10Blob::GetBufferSize() +// on the returned blob from HLSL's compile APIs. +// +// ID3D10Blob **ppSignatureBlob(s) - a newly created buffer that +// contains only the signature portions of the original bytecode. +// This is a copy; the original bytecode is not modified. You may +// specify NULL for this parameter to have the bytecode validated +// for the presence of the corresponding signatures without actually +// copying them and creating a new blob. +// +// Returns E_INVALIDARG if any required parameters are NULL +// Returns E_FAIL is the bytecode is corrupt or missing signatures +// Returns S_OK on success +// +////////////////////////////////////////////////////////////////////////// + +HRESULT WINAPI D3D10GetInputSignatureBlob(_In_reads_bytes_(BytecodeLength) CONST void *pShaderBytecode, SIZE_T BytecodeLength, _Out_ ID3D10Blob **ppSignatureBlob); +HRESULT WINAPI D3D10GetOutputSignatureBlob(_In_reads_bytes_(BytecodeLength) CONST void *pShaderBytecode, SIZE_T BytecodeLength, _Out_ ID3D10Blob **ppSignatureBlob); +HRESULT WINAPI D3D10GetInputAndOutputSignatureBlob(_In_reads_bytes_(BytecodeLength) CONST void *pShaderBytecode, SIZE_T BytecodeLength, _Out_ ID3D10Blob **ppSignatureBlob); + +//---------------------------------------------------------------------------- +// D3D10GetShaderDebugInfo: +// ----------------------- +// Gets shader debug info. Debug info is generated by D3D10CompileShader and is +// embedded in the body of the shader. +// +// Parameters: +// pShaderBytecode +// Pointer to the function bytecode +// BytecodeLength +// Length of the shader bytecode buffer +// ppDebugInfo +// Buffer used to return debug info. For information about the layout +// of this buffer, see definition of D3D10_SHADER_DEBUG_INFO above. +//---------------------------------------------------------------------------- + +HRESULT WINAPI D3D10GetShaderDebugInfo(_In_reads_bytes_(BytecodeLength) CONST void *pShaderBytecode, SIZE_T BytecodeLength, _Out_ ID3D10Blob** ppDebugInfo); + +#ifdef __cplusplus +} +#endif //__cplusplus + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ + +#endif //__D3D10SHADER_H__ + diff --git a/gfx/include/dxsdk/d3d11.h b/gfx/include/dxsdk/d3d11.h new file mode 100644 index 0000000000..b597d4e850 --- /dev/null +++ b/gfx/include/dxsdk/d3d11.h @@ -0,0 +1,14605 @@ +/*------------------------------------------------------------------------------------- + * + * Copyright (c) Microsoft Corporation + * + *-------------------------------------------------------------------------------------*/ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ +/* @@MIDL_FILE_HEADING( ) */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __d3d11_h__ +#define __d3d11_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __ID3D11DeviceChild_FWD_DEFINED__ +#define __ID3D11DeviceChild_FWD_DEFINED__ +typedef interface ID3D11DeviceChild ID3D11DeviceChild; + +#endif /* __ID3D11DeviceChild_FWD_DEFINED__ */ + + +#ifndef __ID3D11DepthStencilState_FWD_DEFINED__ +#define __ID3D11DepthStencilState_FWD_DEFINED__ +typedef interface ID3D11DepthStencilState ID3D11DepthStencilState; + +#endif /* __ID3D11DepthStencilState_FWD_DEFINED__ */ + + +#ifndef __ID3D11BlendState_FWD_DEFINED__ +#define __ID3D11BlendState_FWD_DEFINED__ +typedef interface ID3D11BlendState ID3D11BlendState; + +#endif /* __ID3D11BlendState_FWD_DEFINED__ */ + + +#ifndef __ID3D11RasterizerState_FWD_DEFINED__ +#define __ID3D11RasterizerState_FWD_DEFINED__ +typedef interface ID3D11RasterizerState ID3D11RasterizerState; + +#endif /* __ID3D11RasterizerState_FWD_DEFINED__ */ + + +#ifndef __ID3D11Resource_FWD_DEFINED__ +#define __ID3D11Resource_FWD_DEFINED__ +typedef interface ID3D11Resource ID3D11Resource; + +#endif /* __ID3D11Resource_FWD_DEFINED__ */ + + +#ifndef __ID3D11Buffer_FWD_DEFINED__ +#define __ID3D11Buffer_FWD_DEFINED__ +typedef interface ID3D11Buffer ID3D11Buffer; + +#endif /* __ID3D11Buffer_FWD_DEFINED__ */ + + +#ifndef __ID3D11Texture1D_FWD_DEFINED__ +#define __ID3D11Texture1D_FWD_DEFINED__ +typedef interface ID3D11Texture1D ID3D11Texture1D; + +#endif /* __ID3D11Texture1D_FWD_DEFINED__ */ + + +#ifndef __ID3D11Texture2D_FWD_DEFINED__ +#define __ID3D11Texture2D_FWD_DEFINED__ +typedef interface ID3D11Texture2D ID3D11Texture2D; + +#endif /* __ID3D11Texture2D_FWD_DEFINED__ */ + + +#ifndef __ID3D11Texture3D_FWD_DEFINED__ +#define __ID3D11Texture3D_FWD_DEFINED__ +typedef interface ID3D11Texture3D ID3D11Texture3D; + +#endif /* __ID3D11Texture3D_FWD_DEFINED__ */ + + +#ifndef __ID3D11View_FWD_DEFINED__ +#define __ID3D11View_FWD_DEFINED__ +typedef interface ID3D11View ID3D11View; + +#endif /* __ID3D11View_FWD_DEFINED__ */ + + +#ifndef __ID3D11ShaderResourceView_FWD_DEFINED__ +#define __ID3D11ShaderResourceView_FWD_DEFINED__ +typedef interface ID3D11ShaderResourceView ID3D11ShaderResourceView; + +#endif /* __ID3D11ShaderResourceView_FWD_DEFINED__ */ + + +#ifndef __ID3D11RenderTargetView_FWD_DEFINED__ +#define __ID3D11RenderTargetView_FWD_DEFINED__ +typedef interface ID3D11RenderTargetView ID3D11RenderTargetView; + +#endif /* __ID3D11RenderTargetView_FWD_DEFINED__ */ + + +#ifndef __ID3D11DepthStencilView_FWD_DEFINED__ +#define __ID3D11DepthStencilView_FWD_DEFINED__ +typedef interface ID3D11DepthStencilView ID3D11DepthStencilView; + +#endif /* __ID3D11DepthStencilView_FWD_DEFINED__ */ + + +#ifndef __ID3D11UnorderedAccessView_FWD_DEFINED__ +#define __ID3D11UnorderedAccessView_FWD_DEFINED__ +typedef interface ID3D11UnorderedAccessView ID3D11UnorderedAccessView; + +#endif /* __ID3D11UnorderedAccessView_FWD_DEFINED__ */ + + +#ifndef __ID3D11VertexShader_FWD_DEFINED__ +#define __ID3D11VertexShader_FWD_DEFINED__ +typedef interface ID3D11VertexShader ID3D11VertexShader; + +#endif /* __ID3D11VertexShader_FWD_DEFINED__ */ + + +#ifndef __ID3D11HullShader_FWD_DEFINED__ +#define __ID3D11HullShader_FWD_DEFINED__ +typedef interface ID3D11HullShader ID3D11HullShader; + +#endif /* __ID3D11HullShader_FWD_DEFINED__ */ + + +#ifndef __ID3D11DomainShader_FWD_DEFINED__ +#define __ID3D11DomainShader_FWD_DEFINED__ +typedef interface ID3D11DomainShader ID3D11DomainShader; + +#endif /* __ID3D11DomainShader_FWD_DEFINED__ */ + + +#ifndef __ID3D11GeometryShader_FWD_DEFINED__ +#define __ID3D11GeometryShader_FWD_DEFINED__ +typedef interface ID3D11GeometryShader ID3D11GeometryShader; + +#endif /* __ID3D11GeometryShader_FWD_DEFINED__ */ + + +#ifndef __ID3D11PixelShader_FWD_DEFINED__ +#define __ID3D11PixelShader_FWD_DEFINED__ +typedef interface ID3D11PixelShader ID3D11PixelShader; + +#endif /* __ID3D11PixelShader_FWD_DEFINED__ */ + + +#ifndef __ID3D11ComputeShader_FWD_DEFINED__ +#define __ID3D11ComputeShader_FWD_DEFINED__ +typedef interface ID3D11ComputeShader ID3D11ComputeShader; + +#endif /* __ID3D11ComputeShader_FWD_DEFINED__ */ + + +#ifndef __ID3D11InputLayout_FWD_DEFINED__ +#define __ID3D11InputLayout_FWD_DEFINED__ +typedef interface ID3D11InputLayout ID3D11InputLayout; + +#endif /* __ID3D11InputLayout_FWD_DEFINED__ */ + + +#ifndef __ID3D11SamplerState_FWD_DEFINED__ +#define __ID3D11SamplerState_FWD_DEFINED__ +typedef interface ID3D11SamplerState ID3D11SamplerState; + +#endif /* __ID3D11SamplerState_FWD_DEFINED__ */ + + +#ifndef __ID3D11Asynchronous_FWD_DEFINED__ +#define __ID3D11Asynchronous_FWD_DEFINED__ +typedef interface ID3D11Asynchronous ID3D11Asynchronous; + +#endif /* __ID3D11Asynchronous_FWD_DEFINED__ */ + + +#ifndef __ID3D11Query_FWD_DEFINED__ +#define __ID3D11Query_FWD_DEFINED__ +typedef interface ID3D11Query ID3D11Query; + +#endif /* __ID3D11Query_FWD_DEFINED__ */ + + +#ifndef __ID3D11Predicate_FWD_DEFINED__ +#define __ID3D11Predicate_FWD_DEFINED__ +typedef interface ID3D11Predicate ID3D11Predicate; + +#endif /* __ID3D11Predicate_FWD_DEFINED__ */ + + +#ifndef __ID3D11Counter_FWD_DEFINED__ +#define __ID3D11Counter_FWD_DEFINED__ +typedef interface ID3D11Counter ID3D11Counter; + +#endif /* __ID3D11Counter_FWD_DEFINED__ */ + + +#ifndef __ID3D11ClassInstance_FWD_DEFINED__ +#define __ID3D11ClassInstance_FWD_DEFINED__ +typedef interface ID3D11ClassInstance ID3D11ClassInstance; + +#endif /* __ID3D11ClassInstance_FWD_DEFINED__ */ + + +#ifndef __ID3D11ClassLinkage_FWD_DEFINED__ +#define __ID3D11ClassLinkage_FWD_DEFINED__ +typedef interface ID3D11ClassLinkage ID3D11ClassLinkage; + +#endif /* __ID3D11ClassLinkage_FWD_DEFINED__ */ + + +#ifndef __ID3D11CommandList_FWD_DEFINED__ +#define __ID3D11CommandList_FWD_DEFINED__ +typedef interface ID3D11CommandList ID3D11CommandList; + +#endif /* __ID3D11CommandList_FWD_DEFINED__ */ + + +#ifndef __ID3D11DeviceContext_FWD_DEFINED__ +#define __ID3D11DeviceContext_FWD_DEFINED__ +typedef interface ID3D11DeviceContext ID3D11DeviceContext; + +#endif /* __ID3D11DeviceContext_FWD_DEFINED__ */ + + +#ifndef __ID3D11VideoDecoder_FWD_DEFINED__ +#define __ID3D11VideoDecoder_FWD_DEFINED__ +typedef interface ID3D11VideoDecoder ID3D11VideoDecoder; + +#endif /* __ID3D11VideoDecoder_FWD_DEFINED__ */ + + +#ifndef __ID3D11VideoProcessorEnumerator_FWD_DEFINED__ +#define __ID3D11VideoProcessorEnumerator_FWD_DEFINED__ +typedef interface ID3D11VideoProcessorEnumerator ID3D11VideoProcessorEnumerator; + +#endif /* __ID3D11VideoProcessorEnumerator_FWD_DEFINED__ */ + + +#ifndef __ID3D11VideoProcessor_FWD_DEFINED__ +#define __ID3D11VideoProcessor_FWD_DEFINED__ +typedef interface ID3D11VideoProcessor ID3D11VideoProcessor; + +#endif /* __ID3D11VideoProcessor_FWD_DEFINED__ */ + + +#ifndef __ID3D11AuthenticatedChannel_FWD_DEFINED__ +#define __ID3D11AuthenticatedChannel_FWD_DEFINED__ +typedef interface ID3D11AuthenticatedChannel ID3D11AuthenticatedChannel; + +#endif /* __ID3D11AuthenticatedChannel_FWD_DEFINED__ */ + + +#ifndef __ID3D11CryptoSession_FWD_DEFINED__ +#define __ID3D11CryptoSession_FWD_DEFINED__ +typedef interface ID3D11CryptoSession ID3D11CryptoSession; + +#endif /* __ID3D11CryptoSession_FWD_DEFINED__ */ + + +#ifndef __ID3D11VideoDecoderOutputView_FWD_DEFINED__ +#define __ID3D11VideoDecoderOutputView_FWD_DEFINED__ +typedef interface ID3D11VideoDecoderOutputView ID3D11VideoDecoderOutputView; + +#endif /* __ID3D11VideoDecoderOutputView_FWD_DEFINED__ */ + + +#ifndef __ID3D11VideoProcessorInputView_FWD_DEFINED__ +#define __ID3D11VideoProcessorInputView_FWD_DEFINED__ +typedef interface ID3D11VideoProcessorInputView ID3D11VideoProcessorInputView; + +#endif /* __ID3D11VideoProcessorInputView_FWD_DEFINED__ */ + + +#ifndef __ID3D11VideoProcessorOutputView_FWD_DEFINED__ +#define __ID3D11VideoProcessorOutputView_FWD_DEFINED__ +typedef interface ID3D11VideoProcessorOutputView ID3D11VideoProcessorOutputView; + +#endif /* __ID3D11VideoProcessorOutputView_FWD_DEFINED__ */ + + +#ifndef __ID3D11VideoContext_FWD_DEFINED__ +#define __ID3D11VideoContext_FWD_DEFINED__ +typedef interface ID3D11VideoContext ID3D11VideoContext; + +#endif /* __ID3D11VideoContext_FWD_DEFINED__ */ + + +#ifndef __ID3D11VideoDevice_FWD_DEFINED__ +#define __ID3D11VideoDevice_FWD_DEFINED__ +typedef interface ID3D11VideoDevice ID3D11VideoDevice; + +#endif /* __ID3D11VideoDevice_FWD_DEFINED__ */ + + +#ifndef __ID3D11Device_FWD_DEFINED__ +#define __ID3D11Device_FWD_DEFINED__ +typedef interface ID3D11Device ID3D11Device; + +#endif /* __ID3D11Device_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "dxgi.h" +#include "d3dcommon.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_d3d11_0000_0000 */ +/* [local] */ + +#ifndef _D3D11_CONSTANTS +#define _D3D11_CONSTANTS +#define D3D11_16BIT_INDEX_STRIP_CUT_VALUE ( 0xffff ) + +#define D3D11_32BIT_INDEX_STRIP_CUT_VALUE ( 0xffffffff ) + +#define D3D11_8BIT_INDEX_STRIP_CUT_VALUE ( 0xff ) + +#define D3D11_ARRAY_AXIS_ADDRESS_RANGE_BIT_COUNT ( 9 ) + +#define D3D11_CLIP_OR_CULL_DISTANCE_COUNT ( 8 ) + +#define D3D11_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT ( 2 ) + +#define D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT ( 14 ) + +#define D3D11_COMMONSHADER_CONSTANT_BUFFER_COMPONENTS ( 4 ) + +#define D3D11_COMMONSHADER_CONSTANT_BUFFER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_COMMONSHADER_CONSTANT_BUFFER_HW_SLOT_COUNT ( 15 ) + +#define D3D11_COMMONSHADER_CONSTANT_BUFFER_PARTIAL_UPDATE_EXTENTS_BYTE_ALIGNMENT ( 16 ) + +#define D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COMPONENTS ( 4 ) + +#define D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT ( 15 ) + +#define D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READS_PER_INST ( 1 ) + +#define D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READ_PORTS ( 1 ) + +#define D3D11_COMMONSHADER_FLOWCONTROL_NESTING_LIMIT ( 64 ) + +#define D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COMPONENTS ( 4 ) + +#define D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COUNT ( 1 ) + +#define D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READS_PER_INST ( 1 ) + +#define D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READ_PORTS ( 1 ) + +#define D3D11_COMMONSHADER_IMMEDIATE_VALUE_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_COMPONENTS ( 1 ) + +#define D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_COUNT ( 128 ) + +#define D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_READS_PER_INST ( 1 ) + +#define D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_READ_PORTS ( 1 ) + +#define D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT ( 128 ) + +#define D3D11_COMMONSHADER_SAMPLER_REGISTER_COMPONENTS ( 1 ) + +#define D3D11_COMMONSHADER_SAMPLER_REGISTER_COUNT ( 16 ) + +#define D3D11_COMMONSHADER_SAMPLER_REGISTER_READS_PER_INST ( 1 ) + +#define D3D11_COMMONSHADER_SAMPLER_REGISTER_READ_PORTS ( 1 ) + +#define D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT ( 16 ) + +#define D3D11_COMMONSHADER_SUBROUTINE_NESTING_LIMIT ( 32 ) + +#define D3D11_COMMONSHADER_TEMP_REGISTER_COMPONENTS ( 4 ) + +#define D3D11_COMMONSHADER_TEMP_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_COMMONSHADER_TEMP_REGISTER_COUNT ( 4096 ) + +#define D3D11_COMMONSHADER_TEMP_REGISTER_READS_PER_INST ( 3 ) + +#define D3D11_COMMONSHADER_TEMP_REGISTER_READ_PORTS ( 3 ) + +#define D3D11_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MAX ( 10 ) + +#define D3D11_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MIN ( -10 ) + +#define D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE ( -8 ) + +#define D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE ( 7 ) + +#define D3D11_CS_4_X_BUCKET00_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 256 ) + +#define D3D11_CS_4_X_BUCKET00_MAX_NUM_THREADS_PER_GROUP ( 64 ) + +#define D3D11_CS_4_X_BUCKET01_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 240 ) + +#define D3D11_CS_4_X_BUCKET01_MAX_NUM_THREADS_PER_GROUP ( 68 ) + +#define D3D11_CS_4_X_BUCKET02_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 224 ) + +#define D3D11_CS_4_X_BUCKET02_MAX_NUM_THREADS_PER_GROUP ( 72 ) + +#define D3D11_CS_4_X_BUCKET03_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 208 ) + +#define D3D11_CS_4_X_BUCKET03_MAX_NUM_THREADS_PER_GROUP ( 76 ) + +#define D3D11_CS_4_X_BUCKET04_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 192 ) + +#define D3D11_CS_4_X_BUCKET04_MAX_NUM_THREADS_PER_GROUP ( 84 ) + +#define D3D11_CS_4_X_BUCKET05_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 176 ) + +#define D3D11_CS_4_X_BUCKET05_MAX_NUM_THREADS_PER_GROUP ( 92 ) + +#define D3D11_CS_4_X_BUCKET06_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 160 ) + +#define D3D11_CS_4_X_BUCKET06_MAX_NUM_THREADS_PER_GROUP ( 100 ) + +#define D3D11_CS_4_X_BUCKET07_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 144 ) + +#define D3D11_CS_4_X_BUCKET07_MAX_NUM_THREADS_PER_GROUP ( 112 ) + +#define D3D11_CS_4_X_BUCKET08_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 128 ) + +#define D3D11_CS_4_X_BUCKET08_MAX_NUM_THREADS_PER_GROUP ( 128 ) + +#define D3D11_CS_4_X_BUCKET09_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 112 ) + +#define D3D11_CS_4_X_BUCKET09_MAX_NUM_THREADS_PER_GROUP ( 144 ) + +#define D3D11_CS_4_X_BUCKET10_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 96 ) + +#define D3D11_CS_4_X_BUCKET10_MAX_NUM_THREADS_PER_GROUP ( 168 ) + +#define D3D11_CS_4_X_BUCKET11_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 80 ) + +#define D3D11_CS_4_X_BUCKET11_MAX_NUM_THREADS_PER_GROUP ( 204 ) + +#define D3D11_CS_4_X_BUCKET12_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 64 ) + +#define D3D11_CS_4_X_BUCKET12_MAX_NUM_THREADS_PER_GROUP ( 256 ) + +#define D3D11_CS_4_X_BUCKET13_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 48 ) + +#define D3D11_CS_4_X_BUCKET13_MAX_NUM_THREADS_PER_GROUP ( 340 ) + +#define D3D11_CS_4_X_BUCKET14_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 32 ) + +#define D3D11_CS_4_X_BUCKET14_MAX_NUM_THREADS_PER_GROUP ( 512 ) + +#define D3D11_CS_4_X_BUCKET15_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 16 ) + +#define D3D11_CS_4_X_BUCKET15_MAX_NUM_THREADS_PER_GROUP ( 768 ) + +#define D3D11_CS_4_X_DISPATCH_MAX_THREAD_GROUPS_IN_Z_DIMENSION ( 1 ) + +#define D3D11_CS_4_X_RAW_UAV_BYTE_ALIGNMENT ( 256 ) + +#define D3D11_CS_4_X_THREAD_GROUP_MAX_THREADS_PER_GROUP ( 768 ) + +#define D3D11_CS_4_X_THREAD_GROUP_MAX_X ( 768 ) + +#define D3D11_CS_4_X_THREAD_GROUP_MAX_Y ( 768 ) + +#define D3D11_CS_4_X_UAV_REGISTER_COUNT ( 1 ) + +#define D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION ( 65535 ) + +#define D3D11_CS_TGSM_REGISTER_COUNT ( 8192 ) + +#define D3D11_CS_TGSM_REGISTER_READS_PER_INST ( 1 ) + +#define D3D11_CS_TGSM_RESOURCE_REGISTER_COMPONENTS ( 1 ) + +#define D3D11_CS_TGSM_RESOURCE_REGISTER_READ_PORTS ( 1 ) + +#define D3D11_CS_THREADGROUPID_REGISTER_COMPONENTS ( 3 ) + +#define D3D11_CS_THREADGROUPID_REGISTER_COUNT ( 1 ) + +#define D3D11_CS_THREADIDINGROUPFLATTENED_REGISTER_COMPONENTS ( 1 ) + +#define D3D11_CS_THREADIDINGROUPFLATTENED_REGISTER_COUNT ( 1 ) + +#define D3D11_CS_THREADIDINGROUP_REGISTER_COMPONENTS ( 3 ) + +#define D3D11_CS_THREADIDINGROUP_REGISTER_COUNT ( 1 ) + +#define D3D11_CS_THREADID_REGISTER_COMPONENTS ( 3 ) + +#define D3D11_CS_THREADID_REGISTER_COUNT ( 1 ) + +#define D3D11_CS_THREAD_GROUP_MAX_THREADS_PER_GROUP ( 1024 ) + +#define D3D11_CS_THREAD_GROUP_MAX_X ( 1024 ) + +#define D3D11_CS_THREAD_GROUP_MAX_Y ( 1024 ) + +#define D3D11_CS_THREAD_GROUP_MAX_Z ( 64 ) + +#define D3D11_CS_THREAD_GROUP_MIN_X ( 1 ) + +#define D3D11_CS_THREAD_GROUP_MIN_Y ( 1 ) + +#define D3D11_CS_THREAD_GROUP_MIN_Z ( 1 ) + +#define D3D11_CS_THREAD_LOCAL_TEMP_REGISTER_POOL ( 16384 ) + +#define D3D11_DEFAULT_BLEND_FACTOR_ALPHA ( 1.0f ) +#define D3D11_DEFAULT_BLEND_FACTOR_BLUE ( 1.0f ) +#define D3D11_DEFAULT_BLEND_FACTOR_GREEN ( 1.0f ) +#define D3D11_DEFAULT_BLEND_FACTOR_RED ( 1.0f ) +#define D3D11_DEFAULT_BORDER_COLOR_COMPONENT ( 0.0f ) +#define D3D11_DEFAULT_DEPTH_BIAS ( 0 ) + +#define D3D11_DEFAULT_DEPTH_BIAS_CLAMP ( 0.0f ) +#define D3D11_DEFAULT_MAX_ANISOTROPY ( 16 ) + +#define D3D11_DEFAULT_MIP_LOD_BIAS ( 0.0f ) +#define D3D11_DEFAULT_RENDER_TARGET_ARRAY_INDEX ( 0 ) + +#define D3D11_DEFAULT_SAMPLE_MASK ( 0xffffffff ) + +#define D3D11_DEFAULT_SCISSOR_ENDX ( 0 ) + +#define D3D11_DEFAULT_SCISSOR_ENDY ( 0 ) + +#define D3D11_DEFAULT_SCISSOR_STARTX ( 0 ) + +#define D3D11_DEFAULT_SCISSOR_STARTY ( 0 ) + +#define D3D11_DEFAULT_SLOPE_SCALED_DEPTH_BIAS ( 0.0f ) +#define D3D11_DEFAULT_STENCIL_READ_MASK ( 0xff ) + +#define D3D11_DEFAULT_STENCIL_REFERENCE ( 0 ) + +#define D3D11_DEFAULT_STENCIL_WRITE_MASK ( 0xff ) + +#define D3D11_DEFAULT_VIEWPORT_AND_SCISSORRECT_INDEX ( 0 ) + +#define D3D11_DEFAULT_VIEWPORT_HEIGHT ( 0 ) + +#define D3D11_DEFAULT_VIEWPORT_MAX_DEPTH ( 0.0f ) +#define D3D11_DEFAULT_VIEWPORT_MIN_DEPTH ( 0.0f ) +#define D3D11_DEFAULT_VIEWPORT_TOPLEFTX ( 0 ) + +#define D3D11_DEFAULT_VIEWPORT_TOPLEFTY ( 0 ) + +#define D3D11_DEFAULT_VIEWPORT_WIDTH ( 0 ) + +#define D3D11_DS_INPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS ( 3968 ) + +#define D3D11_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENTS ( 4 ) + +#define D3D11_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_DS_INPUT_CONTROL_POINT_REGISTER_COUNT ( 32 ) + +#define D3D11_DS_INPUT_CONTROL_POINT_REGISTER_READS_PER_INST ( 2 ) + +#define D3D11_DS_INPUT_CONTROL_POINT_REGISTER_READ_PORTS ( 1 ) + +#define D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENTS ( 3 ) + +#define D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_COUNT ( 1 ) + +#define D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_READS_PER_INST ( 2 ) + +#define D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_READ_PORTS ( 1 ) + +#define D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENTS ( 4 ) + +#define D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_COUNT ( 32 ) + +#define D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST ( 2 ) + +#define D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_READ_PORTS ( 1 ) + +#define D3D11_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS ( 1 ) + +#define D3D11_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_DS_INPUT_PRIMITIVE_ID_REGISTER_COUNT ( 1 ) + +#define D3D11_DS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST ( 2 ) + +#define D3D11_DS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS ( 1 ) + +#define D3D11_DS_OUTPUT_REGISTER_COMPONENTS ( 4 ) + +#define D3D11_DS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_DS_OUTPUT_REGISTER_COUNT ( 32 ) + +#define D3D11_FLOAT16_FUSED_TOLERANCE_IN_ULP ( 0.6 ) +#define D3D11_FLOAT32_MAX ( 3.402823466e+38f ) +#define D3D11_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP ( 0.6f ) +#define D3D11_FLOAT_TO_SRGB_EXPONENT_DENOMINATOR ( 2.4f ) +#define D3D11_FLOAT_TO_SRGB_EXPONENT_NUMERATOR ( 1.0f ) +#define D3D11_FLOAT_TO_SRGB_OFFSET ( 0.055f ) +#define D3D11_FLOAT_TO_SRGB_SCALE_1 ( 12.92f ) +#define D3D11_FLOAT_TO_SRGB_SCALE_2 ( 1.055f ) +#define D3D11_FLOAT_TO_SRGB_THRESHOLD ( 0.0031308f ) +#define D3D11_FTOI_INSTRUCTION_MAX_INPUT ( 2147483647.999f ) +#define D3D11_FTOI_INSTRUCTION_MIN_INPUT ( -2147483648.999f ) +#define D3D11_FTOU_INSTRUCTION_MAX_INPUT ( 4294967295.999f ) +#define D3D11_FTOU_INSTRUCTION_MIN_INPUT ( 0.0f ) +#define D3D11_GS_INPUT_INSTANCE_ID_READS_PER_INST ( 2 ) + +#define D3D11_GS_INPUT_INSTANCE_ID_READ_PORTS ( 1 ) + +#define D3D11_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENTS ( 1 ) + +#define D3D11_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_GS_INPUT_INSTANCE_ID_REGISTER_COUNT ( 1 ) + +#define D3D11_GS_INPUT_PRIM_CONST_REGISTER_COMPONENTS ( 1 ) + +#define D3D11_GS_INPUT_PRIM_CONST_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_GS_INPUT_PRIM_CONST_REGISTER_COUNT ( 1 ) + +#define D3D11_GS_INPUT_PRIM_CONST_REGISTER_READS_PER_INST ( 2 ) + +#define D3D11_GS_INPUT_PRIM_CONST_REGISTER_READ_PORTS ( 1 ) + +#define D3D11_GS_INPUT_REGISTER_COMPONENTS ( 4 ) + +#define D3D11_GS_INPUT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_GS_INPUT_REGISTER_COUNT ( 32 ) + +#define D3D11_GS_INPUT_REGISTER_READS_PER_INST ( 2 ) + +#define D3D11_GS_INPUT_REGISTER_READ_PORTS ( 1 ) + +#define D3D11_GS_INPUT_REGISTER_VERTICES ( 32 ) + +#define D3D11_GS_MAX_INSTANCE_COUNT ( 32 ) + +#define D3D11_GS_MAX_OUTPUT_VERTEX_COUNT_ACROSS_INSTANCES ( 1024 ) + +#define D3D11_GS_OUTPUT_ELEMENTS ( 32 ) + +#define D3D11_GS_OUTPUT_REGISTER_COMPONENTS ( 4 ) + +#define D3D11_GS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_GS_OUTPUT_REGISTER_COUNT ( 32 ) + +#define D3D11_HS_CONTROL_POINT_PHASE_INPUT_REGISTER_COUNT ( 32 ) + +#define D3D11_HS_CONTROL_POINT_PHASE_OUTPUT_REGISTER_COUNT ( 32 ) + +#define D3D11_HS_CONTROL_POINT_REGISTER_COMPONENTS ( 4 ) + +#define D3D11_HS_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_HS_CONTROL_POINT_REGISTER_READS_PER_INST ( 2 ) + +#define D3D11_HS_CONTROL_POINT_REGISTER_READ_PORTS ( 1 ) + +#define D3D11_HS_FORK_PHASE_INSTANCE_COUNT_UPPER_BOUND ( 0xffffffff ) + +#define D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENTS ( 1 ) + +#define D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COUNT ( 1 ) + +#define D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READS_PER_INST ( 2 ) + +#define D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READ_PORTS ( 1 ) + +#define D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENTS ( 1 ) + +#define D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COUNT ( 1 ) + +#define D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READS_PER_INST ( 2 ) + +#define D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READ_PORTS ( 1 ) + +#define D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS ( 1 ) + +#define D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_COUNT ( 1 ) + +#define D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST ( 2 ) + +#define D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS ( 1 ) + +#define D3D11_HS_JOIN_PHASE_INSTANCE_COUNT_UPPER_BOUND ( 0xffffffff ) + +#define D3D11_HS_MAXTESSFACTOR_LOWER_BOUND ( 1.0f ) +#define D3D11_HS_MAXTESSFACTOR_UPPER_BOUND ( 64.0f ) +#define D3D11_HS_OUTPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS ( 3968 ) + +#define D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENTS ( 1 ) + +#define D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COUNT ( 1 ) + +#define D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READS_PER_INST ( 2 ) + +#define D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READ_PORTS ( 1 ) + +#define D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENTS ( 4 ) + +#define D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COUNT ( 32 ) + +#define D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST ( 2 ) + +#define D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READ_PORTS ( 1 ) + +#define D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_SCALAR_COMPONENTS ( 128 ) + +#define D3D11_IA_DEFAULT_INDEX_BUFFER_OFFSET_IN_BYTES ( 0 ) + +#define D3D11_IA_DEFAULT_PRIMITIVE_TOPOLOGY ( 0 ) + +#define D3D11_IA_DEFAULT_VERTEX_BUFFER_OFFSET_IN_BYTES ( 0 ) + +#define D3D11_IA_INDEX_INPUT_RESOURCE_SLOT_COUNT ( 1 ) + +#define D3D11_IA_INSTANCE_ID_BIT_COUNT ( 32 ) + +#define D3D11_IA_INTEGER_ARITHMETIC_BIT_COUNT ( 32 ) + +#define D3D11_IA_PATCH_MAX_CONTROL_POINT_COUNT ( 32 ) + +#define D3D11_IA_PRIMITIVE_ID_BIT_COUNT ( 32 ) + +#define D3D11_IA_VERTEX_ID_BIT_COUNT ( 32 ) + +#define D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT ( 32 ) + +#define D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS ( 128 ) + +#define D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT ( 32 ) + +#define D3D11_INTEGER_DIVIDE_BY_ZERO_QUOTIENT ( 0xffffffff ) + +#define D3D11_INTEGER_DIVIDE_BY_ZERO_REMAINDER ( 0xffffffff ) + +#define D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL ( 0xffffffff ) + +#define D3D11_KEEP_UNORDERED_ACCESS_VIEWS ( 0xffffffff ) + +#define D3D11_LINEAR_GAMMA ( 1.0f ) +#define D3D11_MAJOR_VERSION ( 11 ) + +#define D3D11_MAX_BORDER_COLOR_COMPONENT ( 1.0f ) +#define D3D11_MAX_DEPTH ( 1.0f ) +#define D3D11_MAX_MAXANISOTROPY ( 16 ) + +#define D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT ( 32 ) + +#define D3D11_MAX_POSITION_VALUE ( 3.402823466e+34f ) +#define D3D11_MAX_TEXTURE_DIMENSION_2_TO_EXP ( 17 ) + +#define D3D11_MINOR_VERSION ( 0 ) + +#define D3D11_MIN_BORDER_COLOR_COMPONENT ( 0.0f ) +#define D3D11_MIN_DEPTH ( 0.0f ) +#define D3D11_MIN_MAXANISOTROPY ( 0 ) + +#define D3D11_MIP_LOD_BIAS_MAX ( 15.99f ) +#define D3D11_MIP_LOD_BIAS_MIN ( -16.0f ) +#define D3D11_MIP_LOD_FRACTIONAL_BIT_COUNT ( 8 ) + +#define D3D11_MIP_LOD_RANGE_BIT_COUNT ( 8 ) + +#define D3D11_MULTISAMPLE_ANTIALIAS_LINE_WIDTH ( 1.4f ) +#define D3D11_NONSAMPLE_FETCH_OUT_OF_RANGE_ACCESS_RESULT ( 0 ) + +#define D3D11_PIXEL_ADDRESS_RANGE_BIT_COUNT ( 15 ) + +#define D3D11_PRE_SCISSOR_PIXEL_ADDRESS_RANGE_BIT_COUNT ( 16 ) + +#define D3D11_PS_CS_UAV_REGISTER_COMPONENTS ( 1 ) + +#define D3D11_PS_CS_UAV_REGISTER_COUNT ( 8 ) + +#define D3D11_PS_CS_UAV_REGISTER_READS_PER_INST ( 1 ) + +#define D3D11_PS_CS_UAV_REGISTER_READ_PORTS ( 1 ) + +#define D3D11_PS_FRONTFACING_DEFAULT_VALUE ( 0xffffffff ) + +#define D3D11_PS_FRONTFACING_FALSE_VALUE ( 0 ) + +#define D3D11_PS_FRONTFACING_TRUE_VALUE ( 0xffffffff ) + +#define D3D11_PS_INPUT_REGISTER_COMPONENTS ( 4 ) + +#define D3D11_PS_INPUT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_PS_INPUT_REGISTER_COUNT ( 32 ) + +#define D3D11_PS_INPUT_REGISTER_READS_PER_INST ( 2 ) + +#define D3D11_PS_INPUT_REGISTER_READ_PORTS ( 1 ) + +#define D3D11_PS_LEGACY_PIXEL_CENTER_FRACTIONAL_COMPONENT ( 0.0f ) +#define D3D11_PS_OUTPUT_DEPTH_REGISTER_COMPONENTS ( 1 ) + +#define D3D11_PS_OUTPUT_DEPTH_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_PS_OUTPUT_DEPTH_REGISTER_COUNT ( 1 ) + +#define D3D11_PS_OUTPUT_MASK_REGISTER_COMPONENTS ( 1 ) + +#define D3D11_PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_PS_OUTPUT_MASK_REGISTER_COUNT ( 1 ) + +#define D3D11_PS_OUTPUT_REGISTER_COMPONENTS ( 4 ) + +#define D3D11_PS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_PS_OUTPUT_REGISTER_COUNT ( 8 ) + +#define D3D11_PS_PIXEL_CENTER_FRACTIONAL_COMPONENT ( 0.5f ) +#define D3D11_RAW_UAV_SRV_BYTE_ALIGNMENT ( 16 ) + +#define D3D11_REQ_BLEND_OBJECT_COUNT_PER_DEVICE ( 4096 ) + +#define D3D11_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP ( 27 ) + +#define D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT ( 4096 ) + +#define D3D11_REQ_DEPTH_STENCIL_OBJECT_COUNT_PER_DEVICE ( 4096 ) + +#define D3D11_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP ( 32 ) + +#define D3D11_REQ_DRAW_VERTEX_COUNT_2_TO_EXP ( 32 ) + +#define D3D11_REQ_FILTERING_HW_ADDRESSABLE_RESOURCE_DIMENSION ( 16384 ) + +#define D3D11_REQ_GS_INVOCATION_32BIT_OUTPUT_COMPONENT_LIMIT ( 1024 ) + +#define D3D11_REQ_IMMEDIATE_CONSTANT_BUFFER_ELEMENT_COUNT ( 4096 ) + +#define D3D11_REQ_MAXANISOTROPY ( 16 ) + +#define D3D11_REQ_MIP_LEVELS ( 15 ) + +#define D3D11_REQ_MULTI_ELEMENT_STRUCTURE_SIZE_IN_BYTES ( 2048 ) + +#define D3D11_REQ_RASTERIZER_OBJECT_COUNT_PER_DEVICE ( 4096 ) + +#define D3D11_REQ_RENDER_TO_BUFFER_WINDOW_WIDTH ( 16384 ) + +#define D3D11_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_A_TERM ( 128 ) + +#define D3D11_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_B_TERM ( 0.25f ) +#define D3D11_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_C_TERM ( 2048 ) + +#define D3D11_REQ_RESOURCE_VIEW_COUNT_PER_DEVICE_2_TO_EXP ( 20 ) + +#define D3D11_REQ_SAMPLER_OBJECT_COUNT_PER_DEVICE ( 4096 ) + +#define D3D11_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION ( 2048 ) + +#define D3D11_REQ_TEXTURE1D_U_DIMENSION ( 16384 ) + +#define D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION ( 2048 ) + +#define D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION ( 16384 ) + +#define D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION ( 2048 ) + +#define D3D11_REQ_TEXTURECUBE_DIMENSION ( 16384 ) + +#define D3D11_RESINFO_INSTRUCTION_MISSING_COMPONENT_RETVAL ( 0 ) + +#define D3D11_SHADER_MAJOR_VERSION ( 5 ) + +#define D3D11_SHADER_MAX_INSTANCES ( 65535 ) + +#define D3D11_SHADER_MAX_INTERFACES ( 253 ) + +#define D3D11_SHADER_MAX_INTERFACE_CALL_SITES ( 4096 ) + +#define D3D11_SHADER_MAX_TYPES ( 65535 ) + +#define D3D11_SHADER_MINOR_VERSION ( 0 ) + +#define D3D11_SHIFT_INSTRUCTION_PAD_VALUE ( 0 ) + +#define D3D11_SHIFT_INSTRUCTION_SHIFT_VALUE_BIT_COUNT ( 5 ) + +#define D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT ( 8 ) + +#define D3D11_SO_BUFFER_MAX_STRIDE_IN_BYTES ( 2048 ) + +#define D3D11_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES ( 512 ) + +#define D3D11_SO_BUFFER_SLOT_COUNT ( 4 ) + +#define D3D11_SO_DDI_REGISTER_INDEX_DENOTING_GAP ( 0xffffffff ) + +#define D3D11_SO_NO_RASTERIZED_STREAM ( 0xffffffff ) + +#define D3D11_SO_OUTPUT_COMPONENT_COUNT ( 128 ) + +#define D3D11_SO_STREAM_COUNT ( 4 ) + +#define D3D11_SPEC_DATE_DAY ( 16 ) + +#define D3D11_SPEC_DATE_MONTH ( 05 ) + +#define D3D11_SPEC_DATE_YEAR ( 2011 ) + +#define D3D11_SPEC_VERSION ( 1.07 ) +#define D3D11_SRGB_GAMMA ( 2.2f ) +#define D3D11_SRGB_TO_FLOAT_DENOMINATOR_1 ( 12.92f ) +#define D3D11_SRGB_TO_FLOAT_DENOMINATOR_2 ( 1.055f ) +#define D3D11_SRGB_TO_FLOAT_EXPONENT ( 2.4f ) +#define D3D11_SRGB_TO_FLOAT_OFFSET ( 0.055f ) +#define D3D11_SRGB_TO_FLOAT_THRESHOLD ( 0.04045f ) +#define D3D11_SRGB_TO_FLOAT_TOLERANCE_IN_ULP ( 0.5f ) +#define D3D11_STANDARD_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_STANDARD_COMPONENT_BIT_COUNT_DOUBLED ( 64 ) + +#define D3D11_STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE ( 4 ) + +#define D3D11_STANDARD_PIXEL_COMPONENT_COUNT ( 128 ) + +#define D3D11_STANDARD_PIXEL_ELEMENT_COUNT ( 32 ) + +#define D3D11_STANDARD_VECTOR_SIZE ( 4 ) + +#define D3D11_STANDARD_VERTEX_ELEMENT_COUNT ( 32 ) + +#define D3D11_STANDARD_VERTEX_TOTAL_COMPONENT_COUNT ( 64 ) + +#define D3D11_SUBPIXEL_FRACTIONAL_BIT_COUNT ( 8 ) + +#define D3D11_SUBTEXEL_FRACTIONAL_BIT_COUNT ( 8 ) + +#define D3D11_TESSELLATOR_MAX_EVEN_TESSELLATION_FACTOR ( 64 ) + +#define D3D11_TESSELLATOR_MAX_ISOLINE_DENSITY_TESSELLATION_FACTOR ( 64 ) + +#define D3D11_TESSELLATOR_MAX_ODD_TESSELLATION_FACTOR ( 63 ) + +#define D3D11_TESSELLATOR_MAX_TESSELLATION_FACTOR ( 64 ) + +#define D3D11_TESSELLATOR_MIN_EVEN_TESSELLATION_FACTOR ( 2 ) + +#define D3D11_TESSELLATOR_MIN_ISOLINE_DENSITY_TESSELLATION_FACTOR ( 1 ) + +#define D3D11_TESSELLATOR_MIN_ODD_TESSELLATION_FACTOR ( 1 ) + +#define D3D11_TEXEL_ADDRESS_RANGE_BIT_COUNT ( 16 ) + +#define D3D11_UNBOUND_MEMORY_ACCESS_RESULT ( 0 ) + +#define D3D11_VIEWPORT_AND_SCISSORRECT_MAX_INDEX ( 15 ) + +#define D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE ( 16 ) + +#define D3D11_VIEWPORT_BOUNDS_MAX ( 32767 ) + +#define D3D11_VIEWPORT_BOUNDS_MIN ( -32768 ) + +#define D3D11_VS_INPUT_REGISTER_COMPONENTS ( 4 ) + +#define D3D11_VS_INPUT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_VS_INPUT_REGISTER_COUNT ( 32 ) + +#define D3D11_VS_INPUT_REGISTER_READS_PER_INST ( 2 ) + +#define D3D11_VS_INPUT_REGISTER_READ_PORTS ( 1 ) + +#define D3D11_VS_OUTPUT_REGISTER_COMPONENTS ( 4 ) + +#define D3D11_VS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D11_VS_OUTPUT_REGISTER_COUNT ( 32 ) + +#define D3D11_WHQL_CONTEXT_COUNT_FOR_RESOURCE_LIMIT ( 10 ) + +#define D3D11_WHQL_DRAWINDEXED_INDEX_COUNT_2_TO_EXP ( 25 ) + +#define D3D11_WHQL_DRAW_VERTEX_COUNT_2_TO_EXP ( 25 ) + +#endif +#ifndef _D3D11_1_CONSTANTS +#define _D3D11_1_CONSTANTS +#define D3D11_1_UAV_SLOT_COUNT ( 64 ) + +#endif +#ifndef _D3D11_2_CONSTANTS +#define _D3D11_2_CONSTANTS +#define D3D11_2_TILED_RESOURCE_TILE_SIZE_IN_BYTES ( 65536 ) + +#endif +#define _FACD3D11 ( 0x87c ) + +#define _FACD3D11DEBUG ( ( _FACD3D11 + 1 ) ) + +/* Direct3D errors are now found in winerror.h */ +#define MAKE_D3D11_HRESULT( code ) MAKE_HRESULT( 1, _FACD3D11, code ) +#define MAKE_D3D11_STATUS( code ) MAKE_HRESULT( 0, _FACD3D11, code ) +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_DEFAULT {}; +extern const DECLSPEC_SELECTANY CD3D11_DEFAULT D3D11_DEFAULT; +extern "C"{ +#endif +typedef +enum D3D11_INPUT_CLASSIFICATION + { + D3D11_INPUT_PER_VERTEX_DATA = 0, + D3D11_INPUT_PER_INSTANCE_DATA = 1 + } D3D11_INPUT_CLASSIFICATION; + +#define D3D11_APPEND_ALIGNED_ELEMENT ( 0xffffffff ) + +typedef struct D3D11_INPUT_ELEMENT_DESC + { + LPCSTR SemanticName; + UINT SemanticIndex; + DXGI_FORMAT Format; + UINT InputSlot; + UINT AlignedByteOffset; + D3D11_INPUT_CLASSIFICATION InputSlotClass; + UINT InstanceDataStepRate; + } D3D11_INPUT_ELEMENT_DESC; + +typedef +enum D3D11_FILL_MODE + { + D3D11_FILL_WIREFRAME = 2, + D3D11_FILL_SOLID = 3 + } D3D11_FILL_MODE; + +typedef D3D_PRIMITIVE_TOPOLOGY D3D11_PRIMITIVE_TOPOLOGY; + +typedef D3D_PRIMITIVE D3D11_PRIMITIVE; + +typedef +enum D3D11_CULL_MODE + { + D3D11_CULL_NONE = 1, + D3D11_CULL_FRONT = 2, + D3D11_CULL_BACK = 3 + } D3D11_CULL_MODE; + +typedef struct D3D11_SO_DECLARATION_ENTRY + { + UINT Stream; + LPCSTR SemanticName; + UINT SemanticIndex; + BYTE StartComponent; + BYTE ComponentCount; + BYTE OutputSlot; + } D3D11_SO_DECLARATION_ENTRY; + +typedef struct D3D11_VIEWPORT + { + FLOAT TopLeftX; + FLOAT TopLeftY; + FLOAT Width; + FLOAT Height; + FLOAT MinDepth; + FLOAT MaxDepth; + } D3D11_VIEWPORT; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +inline bool operator==( const D3D11_VIEWPORT& l, const D3D11_VIEWPORT& r ) +{ + return l.TopLeftX == r.TopLeftX && l.TopLeftY == r.TopLeftY && l.Width == r.Width && + l.Height == r.Height && l.MinDepth == r.MinDepth && l.MaxDepth == r.MaxDepth; +} +inline bool operator!=( const D3D11_VIEWPORT& l, const D3D11_VIEWPORT& r ) +{ return !( l == r ); } +extern "C"{ +#endif +typedef struct D3D11_DRAW_INSTANCED_INDIRECT_ARGS + { + UINT VertexCountPerInstance; + UINT InstanceCount; + UINT StartVertexLocation; + UINT StartInstanceLocation; + } D3D11_DRAW_INSTANCED_INDIRECT_ARGS; + +typedef struct D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS + { + UINT IndexCountPerInstance; + UINT InstanceCount; + UINT StartIndexLocation; + INT BaseVertexLocation; + UINT StartInstanceLocation; + } D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS; + +typedef +enum D3D11_RESOURCE_DIMENSION + { + D3D11_RESOURCE_DIMENSION_UNKNOWN = 0, + D3D11_RESOURCE_DIMENSION_BUFFER = 1, + D3D11_RESOURCE_DIMENSION_TEXTURE1D = 2, + D3D11_RESOURCE_DIMENSION_TEXTURE2D = 3, + D3D11_RESOURCE_DIMENSION_TEXTURE3D = 4 + } D3D11_RESOURCE_DIMENSION; + +typedef D3D_SRV_DIMENSION D3D11_SRV_DIMENSION; + +typedef +enum D3D11_DSV_DIMENSION + { + D3D11_DSV_DIMENSION_UNKNOWN = 0, + D3D11_DSV_DIMENSION_TEXTURE1D = 1, + D3D11_DSV_DIMENSION_TEXTURE1DARRAY = 2, + D3D11_DSV_DIMENSION_TEXTURE2D = 3, + D3D11_DSV_DIMENSION_TEXTURE2DARRAY = 4, + D3D11_DSV_DIMENSION_TEXTURE2DMS = 5, + D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY = 6 + } D3D11_DSV_DIMENSION; + +typedef +enum D3D11_RTV_DIMENSION + { + D3D11_RTV_DIMENSION_UNKNOWN = 0, + D3D11_RTV_DIMENSION_BUFFER = 1, + D3D11_RTV_DIMENSION_TEXTURE1D = 2, + D3D11_RTV_DIMENSION_TEXTURE1DARRAY = 3, + D3D11_RTV_DIMENSION_TEXTURE2D = 4, + D3D11_RTV_DIMENSION_TEXTURE2DARRAY = 5, + D3D11_RTV_DIMENSION_TEXTURE2DMS = 6, + D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY = 7, + D3D11_RTV_DIMENSION_TEXTURE3D = 8 + } D3D11_RTV_DIMENSION; + +typedef +enum D3D11_UAV_DIMENSION + { + D3D11_UAV_DIMENSION_UNKNOWN = 0, + D3D11_UAV_DIMENSION_BUFFER = 1, + D3D11_UAV_DIMENSION_TEXTURE1D = 2, + D3D11_UAV_DIMENSION_TEXTURE1DARRAY = 3, + D3D11_UAV_DIMENSION_TEXTURE2D = 4, + D3D11_UAV_DIMENSION_TEXTURE2DARRAY = 5, + D3D11_UAV_DIMENSION_TEXTURE3D = 8 + } D3D11_UAV_DIMENSION; + +typedef +enum D3D11_USAGE + { + D3D11_USAGE_DEFAULT = 0, + D3D11_USAGE_IMMUTABLE = 1, + D3D11_USAGE_DYNAMIC = 2, + D3D11_USAGE_STAGING = 3 + } D3D11_USAGE; + +typedef +enum D3D11_BIND_FLAG + { + D3D11_BIND_VERTEX_BUFFER = 0x1L, + D3D11_BIND_INDEX_BUFFER = 0x2L, + D3D11_BIND_CONSTANT_BUFFER = 0x4L, + D3D11_BIND_SHADER_RESOURCE = 0x8L, + D3D11_BIND_STREAM_OUTPUT = 0x10L, + D3D11_BIND_RENDER_TARGET = 0x20L, + D3D11_BIND_DEPTH_STENCIL = 0x40L, + D3D11_BIND_UNORDERED_ACCESS = 0x80L, + D3D11_BIND_DECODER = 0x200L, + D3D11_BIND_VIDEO_ENCODER = 0x400L + } D3D11_BIND_FLAG; + +typedef +enum D3D11_CPU_ACCESS_FLAG + { + D3D11_CPU_ACCESS_WRITE = 0x10000L, + D3D11_CPU_ACCESS_READ = 0x20000L + } D3D11_CPU_ACCESS_FLAG; + +typedef +enum D3D11_RESOURCE_MISC_FLAG + { + D3D11_RESOURCE_MISC_GENERATE_MIPS = 0x1L, + D3D11_RESOURCE_MISC_SHARED = 0x2L, + D3D11_RESOURCE_MISC_TEXTURECUBE = 0x4L, + D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS = 0x10L, + D3D11_RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS = 0x20L, + D3D11_RESOURCE_MISC_BUFFER_STRUCTURED = 0x40L, + D3D11_RESOURCE_MISC_RESOURCE_CLAMP = 0x80L, + D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX = 0x100L, + D3D11_RESOURCE_MISC_GDI_COMPATIBLE = 0x200L, + D3D11_RESOURCE_MISC_SHARED_NTHANDLE = 0x800L, + D3D11_RESOURCE_MISC_RESTRICTED_CONTENT = 0x1000L, + D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE = 0x2000L, + D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE_DRIVER = 0x4000L, + D3D11_RESOURCE_MISC_GUARDED = 0x8000L, + D3D11_RESOURCE_MISC_TILE_POOL = 0x20000L, + D3D11_RESOURCE_MISC_TILED = 0x40000L, + D3D11_RESOURCE_MISC_HW_PROTECTED = 0x80000L + } D3D11_RESOURCE_MISC_FLAG; + +typedef +enum D3D11_MAP + { + D3D11_MAP_READ = 1, + D3D11_MAP_WRITE = 2, + D3D11_MAP_READ_WRITE = 3, + D3D11_MAP_WRITE_DISCARD = 4, + D3D11_MAP_WRITE_NO_OVERWRITE = 5 + } D3D11_MAP; + +typedef +enum D3D11_MAP_FLAG + { + D3D11_MAP_FLAG_DO_NOT_WAIT = 0x100000L + } D3D11_MAP_FLAG; + +typedef +enum D3D11_RAISE_FLAG + { + D3D11_RAISE_FLAG_DRIVER_INTERNAL_ERROR = 0x1L + } D3D11_RAISE_FLAG; + +typedef +enum D3D11_CLEAR_FLAG + { + D3D11_CLEAR_DEPTH = 0x1L, + D3D11_CLEAR_STENCIL = 0x2L + } D3D11_CLEAR_FLAG; + +typedef RECT D3D11_RECT; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_RECT : public D3D11_RECT +{ + CD3D11_RECT() + {} + explicit CD3D11_RECT( const D3D11_RECT& o ) : + D3D11_RECT( o ) + {} + explicit CD3D11_RECT( + LONG Left, + LONG Top, + LONG Right, + LONG Bottom ) + { + left = Left; + top = Top; + right = Right; + bottom = Bottom; + } + ~CD3D11_RECT() {} + operator const D3D11_RECT&() const { return *this; } +}; +inline bool operator==( const D3D11_RECT& l, const D3D11_RECT& r ) +{ + return l.left == r.left && l.top == r.top && + l.right == r.right && l.bottom == r.bottom; +} +inline bool operator!=( const D3D11_RECT& l, const D3D11_RECT& r ) +{ return !( l == r ); } +extern "C"{ +#endif +typedef struct D3D11_BOX + { + UINT left; + UINT top; + UINT front; + UINT right; + UINT bottom; + UINT back; + } D3D11_BOX; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_BOX : public D3D11_BOX +{ + CD3D11_BOX() + {} + explicit CD3D11_BOX( const D3D11_BOX& o ) : + D3D11_BOX( o ) + {} + explicit CD3D11_BOX( + LONG Left, + LONG Top, + LONG Front, + LONG Right, + LONG Bottom, + LONG Back ) + { + left = Left; + top = Top; + front = Front; + right = Right; + bottom = Bottom; + back = Back; + } + ~CD3D11_BOX() {} + operator const D3D11_BOX&() const { return *this; } +}; +inline bool operator==( const D3D11_BOX& l, const D3D11_BOX& r ) +{ + return l.left == r.left && l.top == r.top && l.front == r.front && + l.right == r.right && l.bottom == r.bottom && l.back == r.back; +} +inline bool operator!=( const D3D11_BOX& l, const D3D11_BOX& r ) +{ return !( l == r ); } +extern "C"{ +#endif + + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0000_v0_0_s_ifspec; + +#ifndef __ID3D11DeviceChild_INTERFACE_DEFINED__ +#define __ID3D11DeviceChild_INTERFACE_DEFINED__ + +/* interface ID3D11DeviceChild */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11DeviceChild; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1841e5c8-16b0-489b-bcc8-44cfb0d5deae") + ID3D11DeviceChild : public IUnknown + { + public: + virtual void STDMETHODCALLTYPE GetDevice( + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPrivateData( + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPrivateData( + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPrivateDataInterface( + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11DeviceChildVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11DeviceChild * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11DeviceChild * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11DeviceChild * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11DeviceChild * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11DeviceChild * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11DeviceChild * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11DeviceChild * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + END_INTERFACE + } ID3D11DeviceChildVtbl; + + interface ID3D11DeviceChild + { + CONST_VTBL struct ID3D11DeviceChildVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11DeviceChild_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11DeviceChild_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11DeviceChild_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11DeviceChild_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11DeviceChild_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11DeviceChild_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11DeviceChild_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11DeviceChild_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0001 */ +/* [local] */ + +typedef +enum D3D11_COMPARISON_FUNC + { + D3D11_COMPARISON_NEVER = 1, + D3D11_COMPARISON_LESS = 2, + D3D11_COMPARISON_EQUAL = 3, + D3D11_COMPARISON_LESS_EQUAL = 4, + D3D11_COMPARISON_GREATER = 5, + D3D11_COMPARISON_NOT_EQUAL = 6, + D3D11_COMPARISON_GREATER_EQUAL = 7, + D3D11_COMPARISON_ALWAYS = 8 + } D3D11_COMPARISON_FUNC; + +typedef +enum D3D11_DEPTH_WRITE_MASK + { + D3D11_DEPTH_WRITE_MASK_ZERO = 0, + D3D11_DEPTH_WRITE_MASK_ALL = 1 + } D3D11_DEPTH_WRITE_MASK; + +typedef +enum D3D11_STENCIL_OP + { + D3D11_STENCIL_OP_KEEP = 1, + D3D11_STENCIL_OP_ZERO = 2, + D3D11_STENCIL_OP_REPLACE = 3, + D3D11_STENCIL_OP_INCR_SAT = 4, + D3D11_STENCIL_OP_DECR_SAT = 5, + D3D11_STENCIL_OP_INVERT = 6, + D3D11_STENCIL_OP_INCR = 7, + D3D11_STENCIL_OP_DECR = 8 + } D3D11_STENCIL_OP; + +typedef struct D3D11_DEPTH_STENCILOP_DESC + { + D3D11_STENCIL_OP StencilFailOp; + D3D11_STENCIL_OP StencilDepthFailOp; + D3D11_STENCIL_OP StencilPassOp; + D3D11_COMPARISON_FUNC StencilFunc; + } D3D11_DEPTH_STENCILOP_DESC; + +typedef struct D3D11_DEPTH_STENCIL_DESC + { + BOOL DepthEnable; + D3D11_DEPTH_WRITE_MASK DepthWriteMask; + D3D11_COMPARISON_FUNC DepthFunc; + BOOL StencilEnable; + UINT8 StencilReadMask; + UINT8 StencilWriteMask; + D3D11_DEPTH_STENCILOP_DESC FrontFace; + D3D11_DEPTH_STENCILOP_DESC BackFace; + } D3D11_DEPTH_STENCIL_DESC; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_DEPTH_STENCIL_DESC : public D3D11_DEPTH_STENCIL_DESC +{ + CD3D11_DEPTH_STENCIL_DESC() + {} + explicit CD3D11_DEPTH_STENCIL_DESC( const D3D11_DEPTH_STENCIL_DESC& o ) : + D3D11_DEPTH_STENCIL_DESC( o ) + {} + explicit CD3D11_DEPTH_STENCIL_DESC( CD3D11_DEFAULT ) + { + DepthEnable = TRUE; + DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL; + DepthFunc = D3D11_COMPARISON_LESS; + StencilEnable = FALSE; + StencilReadMask = D3D11_DEFAULT_STENCIL_READ_MASK; + StencilWriteMask = D3D11_DEFAULT_STENCIL_WRITE_MASK; + const D3D11_DEPTH_STENCILOP_DESC defaultStencilOp = + { D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_COMPARISON_ALWAYS }; + FrontFace = defaultStencilOp; + BackFace = defaultStencilOp; + } + explicit CD3D11_DEPTH_STENCIL_DESC( + BOOL depthEnable, + D3D11_DEPTH_WRITE_MASK depthWriteMask, + D3D11_COMPARISON_FUNC depthFunc, + BOOL stencilEnable, + UINT8 stencilReadMask, + UINT8 stencilWriteMask, + D3D11_STENCIL_OP frontStencilFailOp, + D3D11_STENCIL_OP frontStencilDepthFailOp, + D3D11_STENCIL_OP frontStencilPassOp, + D3D11_COMPARISON_FUNC frontStencilFunc, + D3D11_STENCIL_OP backStencilFailOp, + D3D11_STENCIL_OP backStencilDepthFailOp, + D3D11_STENCIL_OP backStencilPassOp, + D3D11_COMPARISON_FUNC backStencilFunc ) + { + DepthEnable = depthEnable; + DepthWriteMask = depthWriteMask; + DepthFunc = depthFunc; + StencilEnable = stencilEnable; + StencilReadMask = stencilReadMask; + StencilWriteMask = stencilWriteMask; + FrontFace.StencilFailOp = frontStencilFailOp; + FrontFace.StencilDepthFailOp = frontStencilDepthFailOp; + FrontFace.StencilPassOp = frontStencilPassOp; + FrontFace.StencilFunc = frontStencilFunc; + BackFace.StencilFailOp = backStencilFailOp; + BackFace.StencilDepthFailOp = backStencilDepthFailOp; + BackFace.StencilPassOp = backStencilPassOp; + BackFace.StencilFunc = backStencilFunc; + } + ~CD3D11_DEPTH_STENCIL_DESC() {} + operator const D3D11_DEPTH_STENCIL_DESC&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0001_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0001_v0_0_s_ifspec; + +#ifndef __ID3D11DepthStencilState_INTERFACE_DEFINED__ +#define __ID3D11DepthStencilState_INTERFACE_DEFINED__ + +/* interface ID3D11DepthStencilState */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11DepthStencilState; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("03823efb-8d8f-4e1c-9aa2-f64bb2cbfdf1") + ID3D11DepthStencilState : public ID3D11DeviceChild + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D11_DEPTH_STENCIL_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11DepthStencilStateVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11DepthStencilState * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11DepthStencilState * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11DepthStencilState * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11DepthStencilState * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11DepthStencilState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11DepthStencilState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11DepthStencilState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11DepthStencilState * This, + /* [annotation] */ + _Out_ D3D11_DEPTH_STENCIL_DESC *pDesc); + + END_INTERFACE + } ID3D11DepthStencilStateVtbl; + + interface ID3D11DepthStencilState + { + CONST_VTBL struct ID3D11DepthStencilStateVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11DepthStencilState_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11DepthStencilState_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11DepthStencilState_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11DepthStencilState_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11DepthStencilState_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11DepthStencilState_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11DepthStencilState_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11DepthStencilState_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11DepthStencilState_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0002 */ +/* [local] */ + +typedef +enum D3D11_BLEND + { + D3D11_BLEND_ZERO = 1, + D3D11_BLEND_ONE = 2, + D3D11_BLEND_SRC_COLOR = 3, + D3D11_BLEND_INV_SRC_COLOR = 4, + D3D11_BLEND_SRC_ALPHA = 5, + D3D11_BLEND_INV_SRC_ALPHA = 6, + D3D11_BLEND_DEST_ALPHA = 7, + D3D11_BLEND_INV_DEST_ALPHA = 8, + D3D11_BLEND_DEST_COLOR = 9, + D3D11_BLEND_INV_DEST_COLOR = 10, + D3D11_BLEND_SRC_ALPHA_SAT = 11, + D3D11_BLEND_BLEND_FACTOR = 14, + D3D11_BLEND_INV_BLEND_FACTOR = 15, + D3D11_BLEND_SRC1_COLOR = 16, + D3D11_BLEND_INV_SRC1_COLOR = 17, + D3D11_BLEND_SRC1_ALPHA = 18, + D3D11_BLEND_INV_SRC1_ALPHA = 19 + } D3D11_BLEND; + +typedef +enum D3D11_BLEND_OP + { + D3D11_BLEND_OP_ADD = 1, + D3D11_BLEND_OP_SUBTRACT = 2, + D3D11_BLEND_OP_REV_SUBTRACT = 3, + D3D11_BLEND_OP_MIN = 4, + D3D11_BLEND_OP_MAX = 5 + } D3D11_BLEND_OP; + +typedef +enum D3D11_COLOR_WRITE_ENABLE + { + D3D11_COLOR_WRITE_ENABLE_RED = 1, + D3D11_COLOR_WRITE_ENABLE_GREEN = 2, + D3D11_COLOR_WRITE_ENABLE_BLUE = 4, + D3D11_COLOR_WRITE_ENABLE_ALPHA = 8, + D3D11_COLOR_WRITE_ENABLE_ALL = ( ( ( D3D11_COLOR_WRITE_ENABLE_RED | D3D11_COLOR_WRITE_ENABLE_GREEN ) | D3D11_COLOR_WRITE_ENABLE_BLUE ) | D3D11_COLOR_WRITE_ENABLE_ALPHA ) + } D3D11_COLOR_WRITE_ENABLE; + +typedef struct D3D11_RENDER_TARGET_BLEND_DESC + { + BOOL BlendEnable; + D3D11_BLEND SrcBlend; + D3D11_BLEND DestBlend; + D3D11_BLEND_OP BlendOp; + D3D11_BLEND SrcBlendAlpha; + D3D11_BLEND DestBlendAlpha; + D3D11_BLEND_OP BlendOpAlpha; + UINT8 RenderTargetWriteMask; + } D3D11_RENDER_TARGET_BLEND_DESC; + +typedef struct D3D11_BLEND_DESC + { + BOOL AlphaToCoverageEnable; + BOOL IndependentBlendEnable; + D3D11_RENDER_TARGET_BLEND_DESC RenderTarget[ 8 ]; + } D3D11_BLEND_DESC; + +/* Note, the array size for RenderTarget[] above is D3D11_SIMULTANEOUS_RENDERTARGET_COUNT. + IDL processing/generation of this header replaces the define; this comment is merely explaining what happened. */ +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_BLEND_DESC : public D3D11_BLEND_DESC +{ + CD3D11_BLEND_DESC() + {} + explicit CD3D11_BLEND_DESC( const D3D11_BLEND_DESC& o ) : + D3D11_BLEND_DESC( o ) + {} + explicit CD3D11_BLEND_DESC( CD3D11_DEFAULT ) + { + AlphaToCoverageEnable = FALSE; + IndependentBlendEnable = FALSE; + const D3D11_RENDER_TARGET_BLEND_DESC defaultRenderTargetBlendDesc = + { + FALSE, + D3D11_BLEND_ONE, D3D11_BLEND_ZERO, D3D11_BLEND_OP_ADD, + D3D11_BLEND_ONE, D3D11_BLEND_ZERO, D3D11_BLEND_OP_ADD, + D3D11_COLOR_WRITE_ENABLE_ALL, + }; + for (UINT i = 0; i < D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT; ++i) + RenderTarget[ i ] = defaultRenderTargetBlendDesc; + } + ~CD3D11_BLEND_DESC() {} + operator const D3D11_BLEND_DESC&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0002_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0002_v0_0_s_ifspec; + +#ifndef __ID3D11BlendState_INTERFACE_DEFINED__ +#define __ID3D11BlendState_INTERFACE_DEFINED__ + +/* interface ID3D11BlendState */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11BlendState; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("75b68faa-347d-4159-8f45-a0640f01cd9a") + ID3D11BlendState : public ID3D11DeviceChild + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D11_BLEND_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11BlendStateVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11BlendState * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11BlendState * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11BlendState * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11BlendState * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11BlendState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11BlendState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11BlendState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11BlendState * This, + /* [annotation] */ + _Out_ D3D11_BLEND_DESC *pDesc); + + END_INTERFACE + } ID3D11BlendStateVtbl; + + interface ID3D11BlendState + { + CONST_VTBL struct ID3D11BlendStateVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11BlendState_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11BlendState_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11BlendState_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11BlendState_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11BlendState_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11BlendState_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11BlendState_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11BlendState_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11BlendState_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0003 */ +/* [local] */ + +typedef struct D3D11_RASTERIZER_DESC + { + D3D11_FILL_MODE FillMode; + D3D11_CULL_MODE CullMode; + BOOL FrontCounterClockwise; + INT DepthBias; + FLOAT DepthBiasClamp; + FLOAT SlopeScaledDepthBias; + BOOL DepthClipEnable; + BOOL ScissorEnable; + BOOL MultisampleEnable; + BOOL AntialiasedLineEnable; + } D3D11_RASTERIZER_DESC; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_RASTERIZER_DESC : public D3D11_RASTERIZER_DESC +{ + CD3D11_RASTERIZER_DESC() + {} + explicit CD3D11_RASTERIZER_DESC( const D3D11_RASTERIZER_DESC& o ) : + D3D11_RASTERIZER_DESC( o ) + {} + explicit CD3D11_RASTERIZER_DESC( CD3D11_DEFAULT ) + { + FillMode = D3D11_FILL_SOLID; + CullMode = D3D11_CULL_BACK; + FrontCounterClockwise = FALSE; + DepthBias = D3D11_DEFAULT_DEPTH_BIAS; + DepthBiasClamp = D3D11_DEFAULT_DEPTH_BIAS_CLAMP; + SlopeScaledDepthBias = D3D11_DEFAULT_SLOPE_SCALED_DEPTH_BIAS; + DepthClipEnable = TRUE; + ScissorEnable = FALSE; + MultisampleEnable = FALSE; + AntialiasedLineEnable = FALSE; + } + explicit CD3D11_RASTERIZER_DESC( + D3D11_FILL_MODE fillMode, + D3D11_CULL_MODE cullMode, + BOOL frontCounterClockwise, + INT depthBias, + FLOAT depthBiasClamp, + FLOAT slopeScaledDepthBias, + BOOL depthClipEnable, + BOOL scissorEnable, + BOOL multisampleEnable, + BOOL antialiasedLineEnable ) + { + FillMode = fillMode; + CullMode = cullMode; + FrontCounterClockwise = frontCounterClockwise; + DepthBias = depthBias; + DepthBiasClamp = depthBiasClamp; + SlopeScaledDepthBias = slopeScaledDepthBias; + DepthClipEnable = depthClipEnable; + ScissorEnable = scissorEnable; + MultisampleEnable = multisampleEnable; + AntialiasedLineEnable = antialiasedLineEnable; + } + ~CD3D11_RASTERIZER_DESC() {} + operator const D3D11_RASTERIZER_DESC&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0003_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0003_v0_0_s_ifspec; + +#ifndef __ID3D11RasterizerState_INTERFACE_DEFINED__ +#define __ID3D11RasterizerState_INTERFACE_DEFINED__ + +/* interface ID3D11RasterizerState */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11RasterizerState; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9bb4ab81-ab1a-4d8f-b506-fc04200b6ee7") + ID3D11RasterizerState : public ID3D11DeviceChild + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D11_RASTERIZER_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11RasterizerStateVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11RasterizerState * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11RasterizerState * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11RasterizerState * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11RasterizerState * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11RasterizerState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11RasterizerState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11RasterizerState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11RasterizerState * This, + /* [annotation] */ + _Out_ D3D11_RASTERIZER_DESC *pDesc); + + END_INTERFACE + } ID3D11RasterizerStateVtbl; + + interface ID3D11RasterizerState + { + CONST_VTBL struct ID3D11RasterizerStateVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11RasterizerState_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11RasterizerState_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11RasterizerState_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11RasterizerState_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11RasterizerState_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11RasterizerState_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11RasterizerState_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11RasterizerState_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11RasterizerState_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0004 */ +/* [local] */ + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +inline UINT D3D11CalcSubresource( UINT MipSlice, UINT ArraySlice, UINT MipLevels ) +{ return MipSlice + ArraySlice * MipLevels; } +extern "C"{ +#endif +typedef struct D3D11_SUBRESOURCE_DATA + { + const void *pSysMem; + UINT SysMemPitch; + UINT SysMemSlicePitch; + } D3D11_SUBRESOURCE_DATA; + +typedef struct D3D11_MAPPED_SUBRESOURCE + { + void *pData; + UINT RowPitch; + UINT DepthPitch; + } D3D11_MAPPED_SUBRESOURCE; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0004_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0004_v0_0_s_ifspec; + +#ifndef __ID3D11Resource_INTERFACE_DEFINED__ +#define __ID3D11Resource_INTERFACE_DEFINED__ + +/* interface ID3D11Resource */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11Resource; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("dc8e63f3-d12b-4952-b47b-5e45026a862d") + ID3D11Resource : public ID3D11DeviceChild + { + public: + virtual void STDMETHODCALLTYPE GetType( + /* [annotation] */ + _Out_ D3D11_RESOURCE_DIMENSION *pResourceDimension) = 0; + + virtual void STDMETHODCALLTYPE SetEvictionPriority( + /* [annotation] */ + _In_ UINT EvictionPriority) = 0; + + virtual UINT STDMETHODCALLTYPE GetEvictionPriority( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11ResourceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11Resource * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11Resource * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11Resource * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11Resource * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11Resource * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11Resource * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11Resource * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetType )( + ID3D11Resource * This, + /* [annotation] */ + _Out_ D3D11_RESOURCE_DIMENSION *pResourceDimension); + + void ( STDMETHODCALLTYPE *SetEvictionPriority )( + ID3D11Resource * This, + /* [annotation] */ + _In_ UINT EvictionPriority); + + UINT ( STDMETHODCALLTYPE *GetEvictionPriority )( + ID3D11Resource * This); + + END_INTERFACE + } ID3D11ResourceVtbl; + + interface ID3D11Resource + { + CONST_VTBL struct ID3D11ResourceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11Resource_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11Resource_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11Resource_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11Resource_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11Resource_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11Resource_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11Resource_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11Resource_GetType(This,pResourceDimension) \ + ( (This)->lpVtbl -> GetType(This,pResourceDimension) ) + +#define ID3D11Resource_SetEvictionPriority(This,EvictionPriority) \ + ( (This)->lpVtbl -> SetEvictionPriority(This,EvictionPriority) ) + +#define ID3D11Resource_GetEvictionPriority(This) \ + ( (This)->lpVtbl -> GetEvictionPriority(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11Resource_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0005 */ +/* [local] */ + +typedef struct D3D11_BUFFER_DESC + { + UINT ByteWidth; + D3D11_USAGE Usage; + UINT BindFlags; + UINT CPUAccessFlags; + UINT MiscFlags; + UINT StructureByteStride; + } D3D11_BUFFER_DESC; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_BUFFER_DESC : public D3D11_BUFFER_DESC +{ + CD3D11_BUFFER_DESC() + {} + explicit CD3D11_BUFFER_DESC( const D3D11_BUFFER_DESC& o ) : + D3D11_BUFFER_DESC( o ) + {} + explicit CD3D11_BUFFER_DESC( + UINT byteWidth, + UINT bindFlags, + D3D11_USAGE usage = D3D11_USAGE_DEFAULT, + UINT cpuaccessFlags = 0, + UINT miscFlags = 0, + UINT structureByteStride = 0 ) + { + ByteWidth = byteWidth; + Usage = usage; + BindFlags = bindFlags; + CPUAccessFlags = cpuaccessFlags ; + MiscFlags = miscFlags; + StructureByteStride = structureByteStride; + } + ~CD3D11_BUFFER_DESC() {} + operator const D3D11_BUFFER_DESC&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0005_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0005_v0_0_s_ifspec; + +#ifndef __ID3D11Buffer_INTERFACE_DEFINED__ +#define __ID3D11Buffer_INTERFACE_DEFINED__ + +/* interface ID3D11Buffer */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11Buffer; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("48570b85-d1ee-4fcd-a250-eb350722b037") + ID3D11Buffer : public ID3D11Resource + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D11_BUFFER_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11BufferVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11Buffer * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11Buffer * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11Buffer * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11Buffer * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11Buffer * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11Buffer * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11Buffer * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetType )( + ID3D11Buffer * This, + /* [annotation] */ + _Out_ D3D11_RESOURCE_DIMENSION *pResourceDimension); + + void ( STDMETHODCALLTYPE *SetEvictionPriority )( + ID3D11Buffer * This, + /* [annotation] */ + _In_ UINT EvictionPriority); + + UINT ( STDMETHODCALLTYPE *GetEvictionPriority )( + ID3D11Buffer * This); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11Buffer * This, + /* [annotation] */ + _Out_ D3D11_BUFFER_DESC *pDesc); + + END_INTERFACE + } ID3D11BufferVtbl; + + interface ID3D11Buffer + { + CONST_VTBL struct ID3D11BufferVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11Buffer_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11Buffer_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11Buffer_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11Buffer_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11Buffer_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11Buffer_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11Buffer_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11Buffer_GetType(This,pResourceDimension) \ + ( (This)->lpVtbl -> GetType(This,pResourceDimension) ) + +#define ID3D11Buffer_SetEvictionPriority(This,EvictionPriority) \ + ( (This)->lpVtbl -> SetEvictionPriority(This,EvictionPriority) ) + +#define ID3D11Buffer_GetEvictionPriority(This) \ + ( (This)->lpVtbl -> GetEvictionPriority(This) ) + + +#define ID3D11Buffer_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11Buffer_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0006 */ +/* [local] */ + +typedef struct D3D11_TEXTURE1D_DESC + { + UINT Width; + UINT MipLevels; + UINT ArraySize; + DXGI_FORMAT Format; + D3D11_USAGE Usage; + UINT BindFlags; + UINT CPUAccessFlags; + UINT MiscFlags; + } D3D11_TEXTURE1D_DESC; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_TEXTURE1D_DESC : public D3D11_TEXTURE1D_DESC +{ + CD3D11_TEXTURE1D_DESC() + {} + explicit CD3D11_TEXTURE1D_DESC( const D3D11_TEXTURE1D_DESC& o ) : + D3D11_TEXTURE1D_DESC( o ) + {} + explicit CD3D11_TEXTURE1D_DESC( + DXGI_FORMAT format, + UINT width, + UINT arraySize = 1, + UINT mipLevels = 0, + UINT bindFlags = D3D11_BIND_SHADER_RESOURCE, + D3D11_USAGE usage = D3D11_USAGE_DEFAULT, + UINT cpuaccessFlags= 0, + UINT miscFlags = 0 ) + { + Width = width; + MipLevels = mipLevels; + ArraySize = arraySize; + Format = format; + Usage = usage; + BindFlags = bindFlags; + CPUAccessFlags = cpuaccessFlags; + MiscFlags = miscFlags; + } + ~CD3D11_TEXTURE1D_DESC() {} + operator const D3D11_TEXTURE1D_DESC&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0006_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0006_v0_0_s_ifspec; + +#ifndef __ID3D11Texture1D_INTERFACE_DEFINED__ +#define __ID3D11Texture1D_INTERFACE_DEFINED__ + +/* interface ID3D11Texture1D */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11Texture1D; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("f8fb5c27-c6b3-4f75-a4c8-439af2ef564c") + ID3D11Texture1D : public ID3D11Resource + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D11_TEXTURE1D_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11Texture1DVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11Texture1D * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11Texture1D * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11Texture1D * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11Texture1D * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11Texture1D * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11Texture1D * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11Texture1D * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetType )( + ID3D11Texture1D * This, + /* [annotation] */ + _Out_ D3D11_RESOURCE_DIMENSION *pResourceDimension); + + void ( STDMETHODCALLTYPE *SetEvictionPriority )( + ID3D11Texture1D * This, + /* [annotation] */ + _In_ UINT EvictionPriority); + + UINT ( STDMETHODCALLTYPE *GetEvictionPriority )( + ID3D11Texture1D * This); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11Texture1D * This, + /* [annotation] */ + _Out_ D3D11_TEXTURE1D_DESC *pDesc); + + END_INTERFACE + } ID3D11Texture1DVtbl; + + interface ID3D11Texture1D + { + CONST_VTBL struct ID3D11Texture1DVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11Texture1D_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11Texture1D_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11Texture1D_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11Texture1D_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11Texture1D_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11Texture1D_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11Texture1D_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11Texture1D_GetType(This,pResourceDimension) \ + ( (This)->lpVtbl -> GetType(This,pResourceDimension) ) + +#define ID3D11Texture1D_SetEvictionPriority(This,EvictionPriority) \ + ( (This)->lpVtbl -> SetEvictionPriority(This,EvictionPriority) ) + +#define ID3D11Texture1D_GetEvictionPriority(This) \ + ( (This)->lpVtbl -> GetEvictionPriority(This) ) + + +#define ID3D11Texture1D_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11Texture1D_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0007 */ +/* [local] */ + +typedef struct D3D11_TEXTURE2D_DESC + { + UINT Width; + UINT Height; + UINT MipLevels; + UINT ArraySize; + DXGI_FORMAT Format; + DXGI_SAMPLE_DESC SampleDesc; + D3D11_USAGE Usage; + UINT BindFlags; + UINT CPUAccessFlags; + UINT MiscFlags; + } D3D11_TEXTURE2D_DESC; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_TEXTURE2D_DESC : public D3D11_TEXTURE2D_DESC +{ + CD3D11_TEXTURE2D_DESC() + {} + explicit CD3D11_TEXTURE2D_DESC( const D3D11_TEXTURE2D_DESC& o ) : + D3D11_TEXTURE2D_DESC( o ) + {} + explicit CD3D11_TEXTURE2D_DESC( + DXGI_FORMAT format, + UINT width, + UINT height, + UINT arraySize = 1, + UINT mipLevels = 0, + UINT bindFlags = D3D11_BIND_SHADER_RESOURCE, + D3D11_USAGE usage = D3D11_USAGE_DEFAULT, + UINT cpuaccessFlags = 0, + UINT sampleCount = 1, + UINT sampleQuality = 0, + UINT miscFlags = 0 ) + { + Width = width; + Height = height; + MipLevels = mipLevels; + ArraySize = arraySize; + Format = format; + SampleDesc.Count = sampleCount; + SampleDesc.Quality = sampleQuality; + Usage = usage; + BindFlags = bindFlags; + CPUAccessFlags = cpuaccessFlags; + MiscFlags = miscFlags; + } + ~CD3D11_TEXTURE2D_DESC() {} + operator const D3D11_TEXTURE2D_DESC&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0007_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0007_v0_0_s_ifspec; + +#ifndef __ID3D11Texture2D_INTERFACE_DEFINED__ +#define __ID3D11Texture2D_INTERFACE_DEFINED__ + +/* interface ID3D11Texture2D */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11Texture2D; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6f15aaf2-d208-4e89-9ab4-489535d34f9c") + ID3D11Texture2D : public ID3D11Resource + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D11_TEXTURE2D_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11Texture2DVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11Texture2D * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11Texture2D * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11Texture2D * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11Texture2D * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11Texture2D * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11Texture2D * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11Texture2D * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetType )( + ID3D11Texture2D * This, + /* [annotation] */ + _Out_ D3D11_RESOURCE_DIMENSION *pResourceDimension); + + void ( STDMETHODCALLTYPE *SetEvictionPriority )( + ID3D11Texture2D * This, + /* [annotation] */ + _In_ UINT EvictionPriority); + + UINT ( STDMETHODCALLTYPE *GetEvictionPriority )( + ID3D11Texture2D * This); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11Texture2D * This, + /* [annotation] */ + _Out_ D3D11_TEXTURE2D_DESC *pDesc); + + END_INTERFACE + } ID3D11Texture2DVtbl; + + interface ID3D11Texture2D + { + CONST_VTBL struct ID3D11Texture2DVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11Texture2D_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11Texture2D_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11Texture2D_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11Texture2D_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11Texture2D_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11Texture2D_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11Texture2D_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11Texture2D_GetType(This,pResourceDimension) \ + ( (This)->lpVtbl -> GetType(This,pResourceDimension) ) + +#define ID3D11Texture2D_SetEvictionPriority(This,EvictionPriority) \ + ( (This)->lpVtbl -> SetEvictionPriority(This,EvictionPriority) ) + +#define ID3D11Texture2D_GetEvictionPriority(This) \ + ( (This)->lpVtbl -> GetEvictionPriority(This) ) + + +#define ID3D11Texture2D_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11Texture2D_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0008 */ +/* [local] */ + +typedef struct D3D11_TEXTURE3D_DESC + { + UINT Width; + UINT Height; + UINT Depth; + UINT MipLevels; + DXGI_FORMAT Format; + D3D11_USAGE Usage; + UINT BindFlags; + UINT CPUAccessFlags; + UINT MiscFlags; + } D3D11_TEXTURE3D_DESC; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_TEXTURE3D_DESC : public D3D11_TEXTURE3D_DESC +{ + CD3D11_TEXTURE3D_DESC() + {} + explicit CD3D11_TEXTURE3D_DESC( const D3D11_TEXTURE3D_DESC& o ) : + D3D11_TEXTURE3D_DESC( o ) + {} + explicit CD3D11_TEXTURE3D_DESC( + DXGI_FORMAT format, + UINT width, + UINT height, + UINT depth, + UINT mipLevels = 0, + UINT bindFlags = D3D11_BIND_SHADER_RESOURCE, + D3D11_USAGE usage = D3D11_USAGE_DEFAULT, + UINT cpuaccessFlags = 0, + UINT miscFlags = 0 ) + { + Width = width; + Height = height; + Depth = depth; + MipLevels = mipLevels; + Format = format; + Usage = usage; + BindFlags = bindFlags; + CPUAccessFlags = cpuaccessFlags; + MiscFlags = miscFlags; + } + ~CD3D11_TEXTURE3D_DESC() {} + operator const D3D11_TEXTURE3D_DESC&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0008_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0008_v0_0_s_ifspec; + +#ifndef __ID3D11Texture3D_INTERFACE_DEFINED__ +#define __ID3D11Texture3D_INTERFACE_DEFINED__ + +/* interface ID3D11Texture3D */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11Texture3D; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("037e866e-f56d-4357-a8af-9dabbe6e250e") + ID3D11Texture3D : public ID3D11Resource + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D11_TEXTURE3D_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11Texture3DVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11Texture3D * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11Texture3D * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11Texture3D * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11Texture3D * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11Texture3D * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11Texture3D * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11Texture3D * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetType )( + ID3D11Texture3D * This, + /* [annotation] */ + _Out_ D3D11_RESOURCE_DIMENSION *pResourceDimension); + + void ( STDMETHODCALLTYPE *SetEvictionPriority )( + ID3D11Texture3D * This, + /* [annotation] */ + _In_ UINT EvictionPriority); + + UINT ( STDMETHODCALLTYPE *GetEvictionPriority )( + ID3D11Texture3D * This); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11Texture3D * This, + /* [annotation] */ + _Out_ D3D11_TEXTURE3D_DESC *pDesc); + + END_INTERFACE + } ID3D11Texture3DVtbl; + + interface ID3D11Texture3D + { + CONST_VTBL struct ID3D11Texture3DVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11Texture3D_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11Texture3D_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11Texture3D_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11Texture3D_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11Texture3D_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11Texture3D_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11Texture3D_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11Texture3D_GetType(This,pResourceDimension) \ + ( (This)->lpVtbl -> GetType(This,pResourceDimension) ) + +#define ID3D11Texture3D_SetEvictionPriority(This,EvictionPriority) \ + ( (This)->lpVtbl -> SetEvictionPriority(This,EvictionPriority) ) + +#define ID3D11Texture3D_GetEvictionPriority(This) \ + ( (This)->lpVtbl -> GetEvictionPriority(This) ) + + +#define ID3D11Texture3D_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11Texture3D_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0009 */ +/* [local] */ + +typedef +enum D3D11_TEXTURECUBE_FACE + { + D3D11_TEXTURECUBE_FACE_POSITIVE_X = 0, + D3D11_TEXTURECUBE_FACE_NEGATIVE_X = 1, + D3D11_TEXTURECUBE_FACE_POSITIVE_Y = 2, + D3D11_TEXTURECUBE_FACE_NEGATIVE_Y = 3, + D3D11_TEXTURECUBE_FACE_POSITIVE_Z = 4, + D3D11_TEXTURECUBE_FACE_NEGATIVE_Z = 5 + } D3D11_TEXTURECUBE_FACE; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0009_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0009_v0_0_s_ifspec; + +#ifndef __ID3D11View_INTERFACE_DEFINED__ +#define __ID3D11View_INTERFACE_DEFINED__ + +/* interface ID3D11View */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11View; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("839d1216-bb2e-412b-b7f4-a9dbebe08ed1") + ID3D11View : public ID3D11DeviceChild + { + public: + virtual void STDMETHODCALLTYPE GetResource( + /* [annotation] */ + _Outptr_ ID3D11Resource **ppResource) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11ViewVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11View * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11View * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11View * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11View * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11View * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11View * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11View * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetResource )( + ID3D11View * This, + /* [annotation] */ + _Outptr_ ID3D11Resource **ppResource); + + END_INTERFACE + } ID3D11ViewVtbl; + + interface ID3D11View + { + CONST_VTBL struct ID3D11ViewVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11View_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11View_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11View_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11View_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11View_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11View_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11View_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11View_GetResource(This,ppResource) \ + ( (This)->lpVtbl -> GetResource(This,ppResource) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11View_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0010 */ +/* [local] */ + +typedef struct D3D11_BUFFER_SRV + { + union + { + UINT FirstElement; + UINT ElementOffset; + } ; + union + { + UINT NumElements; + UINT ElementWidth; + } ; + } D3D11_BUFFER_SRV; + +typedef +enum D3D11_BUFFEREX_SRV_FLAG + { + D3D11_BUFFEREX_SRV_FLAG_RAW = 0x1 + } D3D11_BUFFEREX_SRV_FLAG; + +typedef struct D3D11_BUFFEREX_SRV + { + UINT FirstElement; + UINT NumElements; + UINT Flags; + } D3D11_BUFFEREX_SRV; + +typedef struct D3D11_TEX1D_SRV + { + UINT MostDetailedMip; + UINT MipLevels; + } D3D11_TEX1D_SRV; + +typedef struct D3D11_TEX1D_ARRAY_SRV + { + UINT MostDetailedMip; + UINT MipLevels; + UINT FirstArraySlice; + UINT ArraySize; + } D3D11_TEX1D_ARRAY_SRV; + +typedef struct D3D11_TEX2D_SRV + { + UINT MostDetailedMip; + UINT MipLevels; + } D3D11_TEX2D_SRV; + +typedef struct D3D11_TEX2D_ARRAY_SRV + { + UINT MostDetailedMip; + UINT MipLevels; + UINT FirstArraySlice; + UINT ArraySize; + } D3D11_TEX2D_ARRAY_SRV; + +typedef struct D3D11_TEX3D_SRV + { + UINT MostDetailedMip; + UINT MipLevels; + } D3D11_TEX3D_SRV; + +typedef struct D3D11_TEXCUBE_SRV + { + UINT MostDetailedMip; + UINT MipLevels; + } D3D11_TEXCUBE_SRV; + +typedef struct D3D11_TEXCUBE_ARRAY_SRV + { + UINT MostDetailedMip; + UINT MipLevels; + UINT First2DArrayFace; + UINT NumCubes; + } D3D11_TEXCUBE_ARRAY_SRV; + +typedef struct D3D11_TEX2DMS_SRV + { + UINT UnusedField_NothingToDefine; + } D3D11_TEX2DMS_SRV; + +typedef struct D3D11_TEX2DMS_ARRAY_SRV + { + UINT FirstArraySlice; + UINT ArraySize; + } D3D11_TEX2DMS_ARRAY_SRV; + +typedef struct D3D11_SHADER_RESOURCE_VIEW_DESC + { + DXGI_FORMAT Format; + D3D11_SRV_DIMENSION ViewDimension; + union + { + D3D11_BUFFER_SRV Buffer; + D3D11_TEX1D_SRV Texture1D; + D3D11_TEX1D_ARRAY_SRV Texture1DArray; + D3D11_TEX2D_SRV Texture2D; + D3D11_TEX2D_ARRAY_SRV Texture2DArray; + D3D11_TEX2DMS_SRV Texture2DMS; + D3D11_TEX2DMS_ARRAY_SRV Texture2DMSArray; + D3D11_TEX3D_SRV Texture3D; + D3D11_TEXCUBE_SRV TextureCube; + D3D11_TEXCUBE_ARRAY_SRV TextureCubeArray; + D3D11_BUFFEREX_SRV BufferEx; + } ; + } D3D11_SHADER_RESOURCE_VIEW_DESC; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_SHADER_RESOURCE_VIEW_DESC : public D3D11_SHADER_RESOURCE_VIEW_DESC +{ + CD3D11_SHADER_RESOURCE_VIEW_DESC() + {} + explicit CD3D11_SHADER_RESOURCE_VIEW_DESC( const D3D11_SHADER_RESOURCE_VIEW_DESC& o ) : + D3D11_SHADER_RESOURCE_VIEW_DESC( o ) + {} + explicit CD3D11_SHADER_RESOURCE_VIEW_DESC( + D3D11_SRV_DIMENSION viewDimension, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mostDetailedMip = 0, // FirstElement for BUFFER + UINT mipLevels = -1, // NumElements for BUFFER + UINT firstArraySlice = 0, // First2DArrayFace for TEXTURECUBEARRAY + UINT arraySize = -1, // NumCubes for TEXTURECUBEARRAY + UINT flags = 0 ) // BUFFEREX only + { + Format = format; + ViewDimension = viewDimension; + switch (viewDimension) + { + case D3D11_SRV_DIMENSION_BUFFER: + Buffer.FirstElement = mostDetailedMip; + Buffer.NumElements = mipLevels; + break; + case D3D11_SRV_DIMENSION_TEXTURE1D: + Texture1D.MostDetailedMip = mostDetailedMip; + Texture1D.MipLevels = mipLevels; + break; + case D3D11_SRV_DIMENSION_TEXTURE1DARRAY: + Texture1DArray.MostDetailedMip = mostDetailedMip; + Texture1DArray.MipLevels = mipLevels; + Texture1DArray.FirstArraySlice = firstArraySlice; + Texture1DArray.ArraySize = arraySize; + break; + case D3D11_SRV_DIMENSION_TEXTURE2D: + Texture2D.MostDetailedMip = mostDetailedMip; + Texture2D.MipLevels = mipLevels; + break; + case D3D11_SRV_DIMENSION_TEXTURE2DARRAY: + Texture2DArray.MostDetailedMip = mostDetailedMip; + Texture2DArray.MipLevels = mipLevels; + Texture2DArray.FirstArraySlice = firstArraySlice; + Texture2DArray.ArraySize = arraySize; + break; + case D3D11_SRV_DIMENSION_TEXTURE2DMS: + break; + case D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY: + Texture2DMSArray.FirstArraySlice = firstArraySlice; + Texture2DMSArray.ArraySize = arraySize; + break; + case D3D11_SRV_DIMENSION_TEXTURE3D: + Texture3D.MostDetailedMip = mostDetailedMip; + Texture3D.MipLevels = mipLevels; + break; + case D3D11_SRV_DIMENSION_TEXTURECUBE: + TextureCube.MostDetailedMip = mostDetailedMip; + TextureCube.MipLevels = mipLevels; + break; + case D3D11_SRV_DIMENSION_TEXTURECUBEARRAY: + TextureCubeArray.MostDetailedMip = mostDetailedMip; + TextureCubeArray.MipLevels = mipLevels; + TextureCubeArray.First2DArrayFace = firstArraySlice; + TextureCubeArray.NumCubes = arraySize; + break; + case D3D11_SRV_DIMENSION_BUFFEREX: + BufferEx.FirstElement = mostDetailedMip; + BufferEx.NumElements = mipLevels; + BufferEx.Flags = flags; + break; + default: break; + } + } + explicit CD3D11_SHADER_RESOURCE_VIEW_DESC( + _In_ ID3D11Buffer*, + DXGI_FORMAT format, + UINT firstElement, + UINT numElements, + UINT flags = 0 ) + { + Format = format; + ViewDimension = D3D11_SRV_DIMENSION_BUFFEREX; + BufferEx.FirstElement = firstElement; + BufferEx.NumElements = numElements; + BufferEx.Flags = flags; + } + explicit CD3D11_SHADER_RESOURCE_VIEW_DESC( + _In_ ID3D11Texture1D* pTex1D, + D3D11_SRV_DIMENSION viewDimension, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mostDetailedMip = 0, + UINT mipLevels = -1, + UINT firstArraySlice = 0, + UINT arraySize = -1 ) + { + ViewDimension = viewDimension; + if (DXGI_FORMAT_UNKNOWN == format || -1 == mipLevels || + (-1 == arraySize && D3D11_SRV_DIMENSION_TEXTURE1DARRAY == viewDimension)) + { + D3D11_TEXTURE1D_DESC TexDesc; + pTex1D->GetDesc( &TexDesc ); + if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format; + if (-1 == mipLevels) mipLevels = TexDesc.MipLevels - mostDetailedMip; + if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlice; + } + Format = format; + switch (viewDimension) + { + case D3D11_SRV_DIMENSION_TEXTURE1D: + Texture1D.MostDetailedMip = mostDetailedMip; + Texture1D.MipLevels = mipLevels; + break; + case D3D11_SRV_DIMENSION_TEXTURE1DARRAY: + Texture1DArray.MostDetailedMip = mostDetailedMip; + Texture1DArray.MipLevels = mipLevels; + Texture1DArray.FirstArraySlice = firstArraySlice; + Texture1DArray.ArraySize = arraySize; + break; + default: break; + } + } + explicit CD3D11_SHADER_RESOURCE_VIEW_DESC( + _In_ ID3D11Texture2D* pTex2D, + D3D11_SRV_DIMENSION viewDimension, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mostDetailedMip = 0, + UINT mipLevels = -1, + UINT firstArraySlice = 0, // First2DArrayFace for TEXTURECUBEARRAY + UINT arraySize = -1 ) // NumCubes for TEXTURECUBEARRAY + { + ViewDimension = viewDimension; + if (DXGI_FORMAT_UNKNOWN == format || + (-1 == mipLevels && + D3D11_SRV_DIMENSION_TEXTURE2DMS != viewDimension && + D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY != viewDimension) || + (-1 == arraySize && + (D3D11_SRV_DIMENSION_TEXTURE2DARRAY == viewDimension || + D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY == viewDimension || + D3D11_SRV_DIMENSION_TEXTURECUBEARRAY == viewDimension))) + { + D3D11_TEXTURE2D_DESC TexDesc; + pTex2D->GetDesc( &TexDesc ); + if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format; + if (-1 == mipLevels) mipLevels = TexDesc.MipLevels - mostDetailedMip; + if (-1 == arraySize) + { + arraySize = TexDesc.ArraySize - firstArraySlice; + if (D3D11_SRV_DIMENSION_TEXTURECUBEARRAY == viewDimension) arraySize /= 6; + } + } + Format = format; + switch (viewDimension) + { + case D3D11_SRV_DIMENSION_TEXTURE2D: + Texture2D.MostDetailedMip = mostDetailedMip; + Texture2D.MipLevels = mipLevels; + break; + case D3D11_SRV_DIMENSION_TEXTURE2DARRAY: + Texture2DArray.MostDetailedMip = mostDetailedMip; + Texture2DArray.MipLevels = mipLevels; + Texture2DArray.FirstArraySlice = firstArraySlice; + Texture2DArray.ArraySize = arraySize; + break; + case D3D11_SRV_DIMENSION_TEXTURE2DMS: + break; + case D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY: + Texture2DMSArray.FirstArraySlice = firstArraySlice; + Texture2DMSArray.ArraySize = arraySize; + break; + case D3D11_SRV_DIMENSION_TEXTURECUBE: + TextureCube.MostDetailedMip = mostDetailedMip; + TextureCube.MipLevels = mipLevels; + break; + case D3D11_SRV_DIMENSION_TEXTURECUBEARRAY: + TextureCubeArray.MostDetailedMip = mostDetailedMip; + TextureCubeArray.MipLevels = mipLevels; + TextureCubeArray.First2DArrayFace = firstArraySlice; + TextureCubeArray.NumCubes = arraySize; + break; + default: break; + } + } + explicit CD3D11_SHADER_RESOURCE_VIEW_DESC( + _In_ ID3D11Texture3D* pTex3D, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mostDetailedMip = 0, + UINT mipLevels = -1 ) + { + ViewDimension = D3D11_SRV_DIMENSION_TEXTURE3D; + if (DXGI_FORMAT_UNKNOWN == format || -1 == mipLevels) + { + D3D11_TEXTURE3D_DESC TexDesc; + pTex3D->GetDesc( &TexDesc ); + if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format; + if (-1 == mipLevels) mipLevels = TexDesc.MipLevels - mostDetailedMip; + } + Format = format; + Texture3D.MostDetailedMip = mostDetailedMip; + Texture3D.MipLevels = mipLevels; + } + ~CD3D11_SHADER_RESOURCE_VIEW_DESC() {} + operator const D3D11_SHADER_RESOURCE_VIEW_DESC&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0010_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0010_v0_0_s_ifspec; + +#ifndef __ID3D11ShaderResourceView_INTERFACE_DEFINED__ +#define __ID3D11ShaderResourceView_INTERFACE_DEFINED__ + +/* interface ID3D11ShaderResourceView */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11ShaderResourceView; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("b0e06fe0-8192-4e1a-b1ca-36d7414710b2") + ID3D11ShaderResourceView : public ID3D11View + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11ShaderResourceViewVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11ShaderResourceView * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11ShaderResourceView * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11ShaderResourceView * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11ShaderResourceView * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11ShaderResourceView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11ShaderResourceView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11ShaderResourceView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetResource )( + ID3D11ShaderResourceView * This, + /* [annotation] */ + _Outptr_ ID3D11Resource **ppResource); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11ShaderResourceView * This, + /* [annotation] */ + _Out_ D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc); + + END_INTERFACE + } ID3D11ShaderResourceViewVtbl; + + interface ID3D11ShaderResourceView + { + CONST_VTBL struct ID3D11ShaderResourceViewVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11ShaderResourceView_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11ShaderResourceView_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11ShaderResourceView_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11ShaderResourceView_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11ShaderResourceView_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11ShaderResourceView_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11ShaderResourceView_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11ShaderResourceView_GetResource(This,ppResource) \ + ( (This)->lpVtbl -> GetResource(This,ppResource) ) + + +#define ID3D11ShaderResourceView_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11ShaderResourceView_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0011 */ +/* [local] */ + +typedef struct D3D11_BUFFER_RTV + { + union + { + UINT FirstElement; + UINT ElementOffset; + } ; + union + { + UINT NumElements; + UINT ElementWidth; + } ; + } D3D11_BUFFER_RTV; + +typedef struct D3D11_TEX1D_RTV + { + UINT MipSlice; + } D3D11_TEX1D_RTV; + +typedef struct D3D11_TEX1D_ARRAY_RTV + { + UINT MipSlice; + UINT FirstArraySlice; + UINT ArraySize; + } D3D11_TEX1D_ARRAY_RTV; + +typedef struct D3D11_TEX2D_RTV + { + UINT MipSlice; + } D3D11_TEX2D_RTV; + +typedef struct D3D11_TEX2DMS_RTV + { + UINT UnusedField_NothingToDefine; + } D3D11_TEX2DMS_RTV; + +typedef struct D3D11_TEX2D_ARRAY_RTV + { + UINT MipSlice; + UINT FirstArraySlice; + UINT ArraySize; + } D3D11_TEX2D_ARRAY_RTV; + +typedef struct D3D11_TEX2DMS_ARRAY_RTV + { + UINT FirstArraySlice; + UINT ArraySize; + } D3D11_TEX2DMS_ARRAY_RTV; + +typedef struct D3D11_TEX3D_RTV + { + UINT MipSlice; + UINT FirstWSlice; + UINT WSize; + } D3D11_TEX3D_RTV; + +typedef struct D3D11_RENDER_TARGET_VIEW_DESC + { + DXGI_FORMAT Format; + D3D11_RTV_DIMENSION ViewDimension; + union + { + D3D11_BUFFER_RTV Buffer; + D3D11_TEX1D_RTV Texture1D; + D3D11_TEX1D_ARRAY_RTV Texture1DArray; + D3D11_TEX2D_RTV Texture2D; + D3D11_TEX2D_ARRAY_RTV Texture2DArray; + D3D11_TEX2DMS_RTV Texture2DMS; + D3D11_TEX2DMS_ARRAY_RTV Texture2DMSArray; + D3D11_TEX3D_RTV Texture3D; + } ; + } D3D11_RENDER_TARGET_VIEW_DESC; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_RENDER_TARGET_VIEW_DESC : public D3D11_RENDER_TARGET_VIEW_DESC +{ + CD3D11_RENDER_TARGET_VIEW_DESC() + {} + explicit CD3D11_RENDER_TARGET_VIEW_DESC( const D3D11_RENDER_TARGET_VIEW_DESC& o ) : + D3D11_RENDER_TARGET_VIEW_DESC( o ) + {} + explicit CD3D11_RENDER_TARGET_VIEW_DESC( + D3D11_RTV_DIMENSION viewDimension, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mipSlice = 0, // FirstElement for BUFFER + UINT firstArraySlice = 0, // NumElements for BUFFER, FirstWSlice for TEXTURE3D + UINT arraySize = -1 ) // WSize for TEXTURE3D + { + Format = format; + ViewDimension = viewDimension; + switch (viewDimension) + { + case D3D11_RTV_DIMENSION_BUFFER: + Buffer.FirstElement = mipSlice; + Buffer.NumElements = firstArraySlice; + break; + case D3D11_RTV_DIMENSION_TEXTURE1D: + Texture1D.MipSlice = mipSlice; + break; + case D3D11_RTV_DIMENSION_TEXTURE1DARRAY: + Texture1DArray.MipSlice = mipSlice; + Texture1DArray.FirstArraySlice = firstArraySlice; + Texture1DArray.ArraySize = arraySize; + break; + case D3D11_RTV_DIMENSION_TEXTURE2D: + Texture2D.MipSlice = mipSlice; + break; + case D3D11_RTV_DIMENSION_TEXTURE2DARRAY: + Texture2DArray.MipSlice = mipSlice; + Texture2DArray.FirstArraySlice = firstArraySlice; + Texture2DArray.ArraySize = arraySize; + break; + case D3D11_RTV_DIMENSION_TEXTURE2DMS: + break; + case D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY: + Texture2DMSArray.FirstArraySlice = firstArraySlice; + Texture2DMSArray.ArraySize = arraySize; + break; + case D3D11_RTV_DIMENSION_TEXTURE3D: + Texture3D.MipSlice = mipSlice; + Texture3D.FirstWSlice = firstArraySlice; + Texture3D.WSize = arraySize; + break; + default: break; + } + } + explicit CD3D11_RENDER_TARGET_VIEW_DESC( + _In_ ID3D11Buffer*, + DXGI_FORMAT format, + UINT firstElement, + UINT numElements ) + { + Format = format; + ViewDimension = D3D11_RTV_DIMENSION_BUFFER; + Buffer.FirstElement = firstElement; + Buffer.NumElements = numElements; + } + explicit CD3D11_RENDER_TARGET_VIEW_DESC( + _In_ ID3D11Texture1D* pTex1D, + D3D11_RTV_DIMENSION viewDimension, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mipSlice = 0, + UINT firstArraySlice = 0, + UINT arraySize = -1 ) + { + ViewDimension = viewDimension; + if (DXGI_FORMAT_UNKNOWN == format || + (-1 == arraySize && D3D11_RTV_DIMENSION_TEXTURE1DARRAY == viewDimension)) + { + D3D11_TEXTURE1D_DESC TexDesc; + pTex1D->GetDesc( &TexDesc ); + if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format; + if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlice; + } + Format = format; + switch (viewDimension) + { + case D3D11_RTV_DIMENSION_TEXTURE1D: + Texture1D.MipSlice = mipSlice; + break; + case D3D11_RTV_DIMENSION_TEXTURE1DARRAY: + Texture1DArray.MipSlice = mipSlice; + Texture1DArray.FirstArraySlice = firstArraySlice; + Texture1DArray.ArraySize = arraySize; + break; + default: break; + } + } + explicit CD3D11_RENDER_TARGET_VIEW_DESC( + _In_ ID3D11Texture2D* pTex2D, + D3D11_RTV_DIMENSION viewDimension, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mipSlice = 0, + UINT firstArraySlice = 0, + UINT arraySize = -1 ) + { + ViewDimension = viewDimension; + if (DXGI_FORMAT_UNKNOWN == format || + (-1 == arraySize && + (D3D11_RTV_DIMENSION_TEXTURE2DARRAY == viewDimension || + D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY == viewDimension))) + { + D3D11_TEXTURE2D_DESC TexDesc; + pTex2D->GetDesc( &TexDesc ); + if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format; + if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlice; + } + Format = format; + switch (viewDimension) + { + case D3D11_RTV_DIMENSION_TEXTURE2D: + Texture2D.MipSlice = mipSlice; + break; + case D3D11_RTV_DIMENSION_TEXTURE2DARRAY: + Texture2DArray.MipSlice = mipSlice; + Texture2DArray.FirstArraySlice = firstArraySlice; + Texture2DArray.ArraySize = arraySize; + break; + case D3D11_RTV_DIMENSION_TEXTURE2DMS: + break; + case D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY: + Texture2DMSArray.FirstArraySlice = firstArraySlice; + Texture2DMSArray.ArraySize = arraySize; + break; + default: break; + } + } + explicit CD3D11_RENDER_TARGET_VIEW_DESC( + _In_ ID3D11Texture3D* pTex3D, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mipSlice = 0, + UINT firstWSlice = 0, + UINT wSize = -1 ) + { + ViewDimension = D3D11_RTV_DIMENSION_TEXTURE3D; + if (DXGI_FORMAT_UNKNOWN == format || -1 == wSize) + { + D3D11_TEXTURE3D_DESC TexDesc; + pTex3D->GetDesc( &TexDesc ); + if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format; + if (-1 == wSize) wSize = TexDesc.Depth - firstWSlice; + } + Format = format; + Texture3D.MipSlice = mipSlice; + Texture3D.FirstWSlice = firstWSlice; + Texture3D.WSize = wSize; + } + ~CD3D11_RENDER_TARGET_VIEW_DESC() {} + operator const D3D11_RENDER_TARGET_VIEW_DESC&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0011_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0011_v0_0_s_ifspec; + +#ifndef __ID3D11RenderTargetView_INTERFACE_DEFINED__ +#define __ID3D11RenderTargetView_INTERFACE_DEFINED__ + +/* interface ID3D11RenderTargetView */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11RenderTargetView; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("dfdba067-0b8d-4865-875b-d7b4516cc164") + ID3D11RenderTargetView : public ID3D11View + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D11_RENDER_TARGET_VIEW_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11RenderTargetViewVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11RenderTargetView * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11RenderTargetView * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11RenderTargetView * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11RenderTargetView * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11RenderTargetView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11RenderTargetView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11RenderTargetView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetResource )( + ID3D11RenderTargetView * This, + /* [annotation] */ + _Outptr_ ID3D11Resource **ppResource); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11RenderTargetView * This, + /* [annotation] */ + _Out_ D3D11_RENDER_TARGET_VIEW_DESC *pDesc); + + END_INTERFACE + } ID3D11RenderTargetViewVtbl; + + interface ID3D11RenderTargetView + { + CONST_VTBL struct ID3D11RenderTargetViewVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11RenderTargetView_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11RenderTargetView_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11RenderTargetView_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11RenderTargetView_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11RenderTargetView_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11RenderTargetView_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11RenderTargetView_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11RenderTargetView_GetResource(This,ppResource) \ + ( (This)->lpVtbl -> GetResource(This,ppResource) ) + + +#define ID3D11RenderTargetView_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11RenderTargetView_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0012 */ +/* [local] */ + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_VIEWPORT : public D3D11_VIEWPORT +{ + CD3D11_VIEWPORT() + {} + explicit CD3D11_VIEWPORT( const D3D11_VIEWPORT& o ) : + D3D11_VIEWPORT( o ) + {} + explicit CD3D11_VIEWPORT( + FLOAT topLeftX, + FLOAT topLeftY, + FLOAT width, + FLOAT height, + FLOAT minDepth = D3D11_MIN_DEPTH, + FLOAT maxDepth = D3D11_MAX_DEPTH ) + { + TopLeftX = topLeftX; + TopLeftY = topLeftY; + Width = width; + Height = height; + MinDepth = minDepth; + MaxDepth = maxDepth; + } + explicit CD3D11_VIEWPORT( + _In_ ID3D11Buffer*, + _In_ ID3D11RenderTargetView* pRTView, + FLOAT topLeftX = 0.0f, + FLOAT minDepth = D3D11_MIN_DEPTH, + FLOAT maxDepth = D3D11_MAX_DEPTH ) + { + D3D11_RENDER_TARGET_VIEW_DESC RTVDesc; + pRTView->GetDesc( &RTVDesc ); + UINT NumElements = 0; + switch (RTVDesc.ViewDimension) + { + case D3D11_RTV_DIMENSION_BUFFER: + NumElements = RTVDesc.Buffer.NumElements; + break; + default: break; + } + TopLeftX = topLeftX; + TopLeftY = 0.0f; + Width = NumElements - topLeftX; + Height = 1.0f; + MinDepth = minDepth; + MaxDepth = maxDepth; + } + explicit CD3D11_VIEWPORT( + _In_ ID3D11Texture1D* pTex1D, + _In_ ID3D11RenderTargetView* pRTView, + FLOAT topLeftX = 0.0f, + FLOAT minDepth = D3D11_MIN_DEPTH, + FLOAT maxDepth = D3D11_MAX_DEPTH ) + { + D3D11_TEXTURE1D_DESC TexDesc; + pTex1D->GetDesc( &TexDesc ); + D3D11_RENDER_TARGET_VIEW_DESC RTVDesc; + pRTView->GetDesc( &RTVDesc ); + UINT MipSlice = 0; + switch (RTVDesc.ViewDimension) + { + case D3D11_RTV_DIMENSION_TEXTURE1D: + MipSlice = RTVDesc.Texture1D.MipSlice; + break; + case D3D11_RTV_DIMENSION_TEXTURE1DARRAY: + MipSlice = RTVDesc.Texture1DArray.MipSlice; + break; + default: break; + } + const UINT SubResourceWidth = TexDesc.Width / (UINT( 1 ) << MipSlice); + TopLeftX = topLeftX; + TopLeftY = 0.0f; + Width = (SubResourceWidth ? SubResourceWidth : 1) - topLeftX; + Height = 1.0f; + MinDepth = minDepth; + MaxDepth = maxDepth; + } + explicit CD3D11_VIEWPORT( + _In_ ID3D11Texture2D* pTex2D, + _In_ ID3D11RenderTargetView* pRTView, + FLOAT topLeftX = 0.0f, + FLOAT topLeftY = 0.0f, + FLOAT minDepth = D3D11_MIN_DEPTH, + FLOAT maxDepth = D3D11_MAX_DEPTH ) + { + D3D11_TEXTURE2D_DESC TexDesc; + pTex2D->GetDesc( &TexDesc ); + D3D11_RENDER_TARGET_VIEW_DESC RTVDesc; + pRTView->GetDesc( &RTVDesc ); + UINT MipSlice = 0; + switch (RTVDesc.ViewDimension) + { + case D3D11_RTV_DIMENSION_TEXTURE2D: + MipSlice = RTVDesc.Texture2D.MipSlice; + break; + case D3D11_RTV_DIMENSION_TEXTURE2DARRAY: + MipSlice = RTVDesc.Texture2DArray.MipSlice; + break; + case D3D11_RTV_DIMENSION_TEXTURE2DMS: + case D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY: + break; + default: break; + } + const UINT SubResourceWidth = TexDesc.Width / (UINT( 1 ) << MipSlice); + const UINT SubResourceHeight = TexDesc.Height / (UINT( 1 ) << MipSlice); + TopLeftX = topLeftX; + TopLeftY = topLeftY; + Width = (SubResourceWidth ? SubResourceWidth : 1) - topLeftX; + Height = (SubResourceHeight ? SubResourceHeight : 1) - topLeftY; + MinDepth = minDepth; + MaxDepth = maxDepth; + } + explicit CD3D11_VIEWPORT( + _In_ ID3D11Texture3D* pTex3D, + _In_ ID3D11RenderTargetView* pRTView, + FLOAT topLeftX = 0.0f, + FLOAT topLeftY = 0.0f, + FLOAT minDepth = D3D11_MIN_DEPTH, + FLOAT maxDepth = D3D11_MAX_DEPTH ) + { + D3D11_TEXTURE3D_DESC TexDesc; + pTex3D->GetDesc( &TexDesc ); + D3D11_RENDER_TARGET_VIEW_DESC RTVDesc; + pRTView->GetDesc( &RTVDesc ); + UINT MipSlice = 0; + switch (RTVDesc.ViewDimension) + { + case D3D11_RTV_DIMENSION_TEXTURE3D: + MipSlice = RTVDesc.Texture3D.MipSlice; + break; + default: break; + } + const UINT SubResourceWidth = TexDesc.Width / (UINT( 1 ) << MipSlice); + const UINT SubResourceHeight = TexDesc.Height / (UINT( 1 ) << MipSlice); + TopLeftX = topLeftX; + TopLeftY = topLeftY; + Width = (SubResourceWidth ? SubResourceWidth : 1) - topLeftX; + Height = (SubResourceHeight ? SubResourceHeight : 1) - topLeftY; + MinDepth = minDepth; + MaxDepth = maxDepth; + } + ~CD3D11_VIEWPORT() {} + operator const D3D11_VIEWPORT&() const { return *this; } +}; +extern "C"{ +#endif +typedef struct D3D11_TEX1D_DSV + { + UINT MipSlice; + } D3D11_TEX1D_DSV; + +typedef struct D3D11_TEX1D_ARRAY_DSV + { + UINT MipSlice; + UINT FirstArraySlice; + UINT ArraySize; + } D3D11_TEX1D_ARRAY_DSV; + +typedef struct D3D11_TEX2D_DSV + { + UINT MipSlice; + } D3D11_TEX2D_DSV; + +typedef struct D3D11_TEX2D_ARRAY_DSV + { + UINT MipSlice; + UINT FirstArraySlice; + UINT ArraySize; + } D3D11_TEX2D_ARRAY_DSV; + +typedef struct D3D11_TEX2DMS_DSV + { + UINT UnusedField_NothingToDefine; + } D3D11_TEX2DMS_DSV; + +typedef struct D3D11_TEX2DMS_ARRAY_DSV + { + UINT FirstArraySlice; + UINT ArraySize; + } D3D11_TEX2DMS_ARRAY_DSV; + +typedef +enum D3D11_DSV_FLAG + { + D3D11_DSV_READ_ONLY_DEPTH = 0x1L, + D3D11_DSV_READ_ONLY_STENCIL = 0x2L + } D3D11_DSV_FLAG; + +typedef struct D3D11_DEPTH_STENCIL_VIEW_DESC + { + DXGI_FORMAT Format; + D3D11_DSV_DIMENSION ViewDimension; + UINT Flags; + union + { + D3D11_TEX1D_DSV Texture1D; + D3D11_TEX1D_ARRAY_DSV Texture1DArray; + D3D11_TEX2D_DSV Texture2D; + D3D11_TEX2D_ARRAY_DSV Texture2DArray; + D3D11_TEX2DMS_DSV Texture2DMS; + D3D11_TEX2DMS_ARRAY_DSV Texture2DMSArray; + } ; + } D3D11_DEPTH_STENCIL_VIEW_DESC; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_DEPTH_STENCIL_VIEW_DESC : public D3D11_DEPTH_STENCIL_VIEW_DESC +{ + CD3D11_DEPTH_STENCIL_VIEW_DESC() + {} + explicit CD3D11_DEPTH_STENCIL_VIEW_DESC( const D3D11_DEPTH_STENCIL_VIEW_DESC& o ) : + D3D11_DEPTH_STENCIL_VIEW_DESC( o ) + {} + explicit CD3D11_DEPTH_STENCIL_VIEW_DESC( + D3D11_DSV_DIMENSION viewDimension, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mipSlice = 0, + UINT firstArraySlice = 0, + UINT arraySize = -1, + UINT flags = 0 ) + { + Format = format; + ViewDimension = viewDimension; + Flags = flags; + switch (viewDimension) + { + case D3D11_DSV_DIMENSION_TEXTURE1D: + Texture1D.MipSlice = mipSlice; + break; + case D3D11_DSV_DIMENSION_TEXTURE1DARRAY: + Texture1DArray.MipSlice = mipSlice; + Texture1DArray.FirstArraySlice = firstArraySlice; + Texture1DArray.ArraySize = arraySize; + break; + case D3D11_DSV_DIMENSION_TEXTURE2D: + Texture2D.MipSlice = mipSlice; + break; + case D3D11_DSV_DIMENSION_TEXTURE2DARRAY: + Texture2DArray.MipSlice = mipSlice; + Texture2DArray.FirstArraySlice = firstArraySlice; + Texture2DArray.ArraySize = arraySize; + break; + case D3D11_DSV_DIMENSION_TEXTURE2DMS: + break; + case D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY: + Texture2DMSArray.FirstArraySlice = firstArraySlice; + Texture2DMSArray.ArraySize = arraySize; + break; + default: break; + } + } + explicit CD3D11_DEPTH_STENCIL_VIEW_DESC( + _In_ ID3D11Texture1D* pTex1D, + D3D11_DSV_DIMENSION viewDimension, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mipSlice = 0, + UINT firstArraySlice = 0, + UINT arraySize = -1, + UINT flags = 0 ) + { + ViewDimension = viewDimension; + Flags = flags; + if (DXGI_FORMAT_UNKNOWN == format || + (-1 == arraySize && D3D11_DSV_DIMENSION_TEXTURE1DARRAY == viewDimension)) + { + D3D11_TEXTURE1D_DESC TexDesc; + pTex1D->GetDesc( &TexDesc ); + if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format; + if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlice; + } + Format = format; + switch (viewDimension) + { + case D3D11_DSV_DIMENSION_TEXTURE1D: + Texture1D.MipSlice = mipSlice; + break; + case D3D11_DSV_DIMENSION_TEXTURE1DARRAY: + Texture1DArray.MipSlice = mipSlice; + Texture1DArray.FirstArraySlice = firstArraySlice; + Texture1DArray.ArraySize = arraySize; + break; + default: break; + } + } + explicit CD3D11_DEPTH_STENCIL_VIEW_DESC( + _In_ ID3D11Texture2D* pTex2D, + D3D11_DSV_DIMENSION viewDimension, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mipSlice = 0, + UINT firstArraySlice = 0, + UINT arraySize = -1, + UINT flags = 0 ) + { + ViewDimension = viewDimension; + Flags = flags; + if (DXGI_FORMAT_UNKNOWN == format || + (-1 == arraySize && + (D3D11_DSV_DIMENSION_TEXTURE2DARRAY == viewDimension || + D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY == viewDimension))) + { + D3D11_TEXTURE2D_DESC TexDesc; + pTex2D->GetDesc( &TexDesc ); + if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format; + if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlice; + } + Format = format; + switch (viewDimension) + { + case D3D11_DSV_DIMENSION_TEXTURE2D: + Texture2D.MipSlice = mipSlice; + break; + case D3D11_DSV_DIMENSION_TEXTURE2DARRAY: + Texture2DArray.MipSlice = mipSlice; + Texture2DArray.FirstArraySlice = firstArraySlice; + Texture2DArray.ArraySize = arraySize; + break; + case D3D11_DSV_DIMENSION_TEXTURE2DMS: + break; + case D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY: + Texture2DMSArray.FirstArraySlice = firstArraySlice; + Texture2DMSArray.ArraySize = arraySize; + break; + default: break; + } + } + ~CD3D11_DEPTH_STENCIL_VIEW_DESC() {} + operator const D3D11_DEPTH_STENCIL_VIEW_DESC&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0012_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0012_v0_0_s_ifspec; + +#ifndef __ID3D11DepthStencilView_INTERFACE_DEFINED__ +#define __ID3D11DepthStencilView_INTERFACE_DEFINED__ + +/* interface ID3D11DepthStencilView */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11DepthStencilView; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9fdac92a-1876-48c3-afad-25b94f84a9b6") + ID3D11DepthStencilView : public ID3D11View + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11DepthStencilViewVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11DepthStencilView * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11DepthStencilView * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11DepthStencilView * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11DepthStencilView * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11DepthStencilView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11DepthStencilView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11DepthStencilView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetResource )( + ID3D11DepthStencilView * This, + /* [annotation] */ + _Outptr_ ID3D11Resource **ppResource); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11DepthStencilView * This, + /* [annotation] */ + _Out_ D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc); + + END_INTERFACE + } ID3D11DepthStencilViewVtbl; + + interface ID3D11DepthStencilView + { + CONST_VTBL struct ID3D11DepthStencilViewVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11DepthStencilView_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11DepthStencilView_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11DepthStencilView_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11DepthStencilView_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11DepthStencilView_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11DepthStencilView_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11DepthStencilView_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11DepthStencilView_GetResource(This,ppResource) \ + ( (This)->lpVtbl -> GetResource(This,ppResource) ) + + +#define ID3D11DepthStencilView_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11DepthStencilView_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0013 */ +/* [local] */ + +typedef +enum D3D11_BUFFER_UAV_FLAG + { + D3D11_BUFFER_UAV_FLAG_RAW = 0x1, + D3D11_BUFFER_UAV_FLAG_APPEND = 0x2, + D3D11_BUFFER_UAV_FLAG_COUNTER = 0x4 + } D3D11_BUFFER_UAV_FLAG; + +typedef struct D3D11_BUFFER_UAV + { + UINT FirstElement; + UINT NumElements; + UINT Flags; + } D3D11_BUFFER_UAV; + +typedef struct D3D11_TEX1D_UAV + { + UINT MipSlice; + } D3D11_TEX1D_UAV; + +typedef struct D3D11_TEX1D_ARRAY_UAV + { + UINT MipSlice; + UINT FirstArraySlice; + UINT ArraySize; + } D3D11_TEX1D_ARRAY_UAV; + +typedef struct D3D11_TEX2D_UAV + { + UINT MipSlice; + } D3D11_TEX2D_UAV; + +typedef struct D3D11_TEX2D_ARRAY_UAV + { + UINT MipSlice; + UINT FirstArraySlice; + UINT ArraySize; + } D3D11_TEX2D_ARRAY_UAV; + +typedef struct D3D11_TEX3D_UAV + { + UINT MipSlice; + UINT FirstWSlice; + UINT WSize; + } D3D11_TEX3D_UAV; + +typedef struct D3D11_UNORDERED_ACCESS_VIEW_DESC + { + DXGI_FORMAT Format; + D3D11_UAV_DIMENSION ViewDimension; + union + { + D3D11_BUFFER_UAV Buffer; + D3D11_TEX1D_UAV Texture1D; + D3D11_TEX1D_ARRAY_UAV Texture1DArray; + D3D11_TEX2D_UAV Texture2D; + D3D11_TEX2D_ARRAY_UAV Texture2DArray; + D3D11_TEX3D_UAV Texture3D; + } ; + } D3D11_UNORDERED_ACCESS_VIEW_DESC; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_UNORDERED_ACCESS_VIEW_DESC : public D3D11_UNORDERED_ACCESS_VIEW_DESC +{ + CD3D11_UNORDERED_ACCESS_VIEW_DESC() + {} + explicit CD3D11_UNORDERED_ACCESS_VIEW_DESC( const D3D11_UNORDERED_ACCESS_VIEW_DESC& o ) : + D3D11_UNORDERED_ACCESS_VIEW_DESC( o ) + {} + explicit CD3D11_UNORDERED_ACCESS_VIEW_DESC( + D3D11_UAV_DIMENSION viewDimension, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mipSlice = 0, // FirstElement for BUFFER + UINT firstArraySlice = 0, // NumElements for BUFFER, FirstWSlice for TEXTURE3D + UINT arraySize = -1, // WSize for TEXTURE3D + UINT flags = 0 ) // BUFFER only + { + Format = format; + ViewDimension = viewDimension; + switch (viewDimension) + { + case D3D11_UAV_DIMENSION_BUFFER: + Buffer.FirstElement = mipSlice; + Buffer.NumElements = firstArraySlice; + Buffer.Flags = flags; + break; + case D3D11_UAV_DIMENSION_TEXTURE1D: + Texture1D.MipSlice = mipSlice; + break; + case D3D11_UAV_DIMENSION_TEXTURE1DARRAY: + Texture1DArray.MipSlice = mipSlice; + Texture1DArray.FirstArraySlice = firstArraySlice; + Texture1DArray.ArraySize = arraySize; + break; + case D3D11_UAV_DIMENSION_TEXTURE2D: + Texture2D.MipSlice = mipSlice; + break; + case D3D11_UAV_DIMENSION_TEXTURE2DARRAY: + Texture2DArray.MipSlice = mipSlice; + Texture2DArray.FirstArraySlice = firstArraySlice; + Texture2DArray.ArraySize = arraySize; + break; + case D3D11_UAV_DIMENSION_TEXTURE3D: + Texture3D.MipSlice = mipSlice; + Texture3D.FirstWSlice = firstArraySlice; + Texture3D.WSize = arraySize; + break; + default: break; + } + } + explicit CD3D11_UNORDERED_ACCESS_VIEW_DESC( + _In_ ID3D11Buffer*, + DXGI_FORMAT format, + UINT firstElement, + UINT numElements, + UINT flags = 0 ) + { + Format = format; + ViewDimension = D3D11_UAV_DIMENSION_BUFFER; + Buffer.FirstElement = firstElement; + Buffer.NumElements = numElements; + Buffer.Flags = flags; + } + explicit CD3D11_UNORDERED_ACCESS_VIEW_DESC( + _In_ ID3D11Texture1D* pTex1D, + D3D11_UAV_DIMENSION viewDimension, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mipSlice = 0, + UINT firstArraySlice = 0, + UINT arraySize = -1 ) + { + ViewDimension = viewDimension; + if (DXGI_FORMAT_UNKNOWN == format || + (-1 == arraySize && D3D11_UAV_DIMENSION_TEXTURE1DARRAY == viewDimension)) + { + D3D11_TEXTURE1D_DESC TexDesc; + pTex1D->GetDesc( &TexDesc ); + if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format; + if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlice; + } + Format = format; + switch (viewDimension) + { + case D3D11_UAV_DIMENSION_TEXTURE1D: + Texture1D.MipSlice = mipSlice; + break; + case D3D11_UAV_DIMENSION_TEXTURE1DARRAY: + Texture1DArray.MipSlice = mipSlice; + Texture1DArray.FirstArraySlice = firstArraySlice; + Texture1DArray.ArraySize = arraySize; + break; + default: break; + } + } + explicit CD3D11_UNORDERED_ACCESS_VIEW_DESC( + _In_ ID3D11Texture2D* pTex2D, + D3D11_UAV_DIMENSION viewDimension, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mipSlice = 0, + UINT firstArraySlice = 0, + UINT arraySize = -1 ) + { + ViewDimension = viewDimension; + if (DXGI_FORMAT_UNKNOWN == format || + (-1 == arraySize && D3D11_UAV_DIMENSION_TEXTURE2DARRAY == viewDimension)) + { + D3D11_TEXTURE2D_DESC TexDesc; + pTex2D->GetDesc( &TexDesc ); + if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format; + if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlice; + } + Format = format; + switch (viewDimension) + { + case D3D11_UAV_DIMENSION_TEXTURE2D: + Texture2D.MipSlice = mipSlice; + break; + case D3D11_UAV_DIMENSION_TEXTURE2DARRAY: + Texture2DArray.MipSlice = mipSlice; + Texture2DArray.FirstArraySlice = firstArraySlice; + Texture2DArray.ArraySize = arraySize; + break; + default: break; + } + } + explicit CD3D11_UNORDERED_ACCESS_VIEW_DESC( + _In_ ID3D11Texture3D* pTex3D, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mipSlice = 0, + UINT firstWSlice = 0, + UINT wSize = -1 ) + { + ViewDimension = D3D11_UAV_DIMENSION_TEXTURE3D; + if (DXGI_FORMAT_UNKNOWN == format || -1 == wSize) + { + D3D11_TEXTURE3D_DESC TexDesc; + pTex3D->GetDesc( &TexDesc ); + if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format; + if (-1 == wSize) wSize = TexDesc.Depth - firstWSlice; + } + Format = format; + Texture3D.MipSlice = mipSlice; + Texture3D.FirstWSlice = firstWSlice; + Texture3D.WSize = wSize; + } + ~CD3D11_UNORDERED_ACCESS_VIEW_DESC() {} + operator const D3D11_UNORDERED_ACCESS_VIEW_DESC&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0013_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0013_v0_0_s_ifspec; + +#ifndef __ID3D11UnorderedAccessView_INTERFACE_DEFINED__ +#define __ID3D11UnorderedAccessView_INTERFACE_DEFINED__ + +/* interface ID3D11UnorderedAccessView */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11UnorderedAccessView; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("28acf509-7f5c-48f6-8611-f316010a6380") + ID3D11UnorderedAccessView : public ID3D11View + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11UnorderedAccessViewVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11UnorderedAccessView * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11UnorderedAccessView * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11UnorderedAccessView * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11UnorderedAccessView * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11UnorderedAccessView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11UnorderedAccessView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11UnorderedAccessView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetResource )( + ID3D11UnorderedAccessView * This, + /* [annotation] */ + _Outptr_ ID3D11Resource **ppResource); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11UnorderedAccessView * This, + /* [annotation] */ + _Out_ D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc); + + END_INTERFACE + } ID3D11UnorderedAccessViewVtbl; + + interface ID3D11UnorderedAccessView + { + CONST_VTBL struct ID3D11UnorderedAccessViewVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11UnorderedAccessView_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11UnorderedAccessView_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11UnorderedAccessView_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11UnorderedAccessView_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11UnorderedAccessView_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11UnorderedAccessView_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11UnorderedAccessView_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11UnorderedAccessView_GetResource(This,ppResource) \ + ( (This)->lpVtbl -> GetResource(This,ppResource) ) + + +#define ID3D11UnorderedAccessView_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11UnorderedAccessView_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11VertexShader_INTERFACE_DEFINED__ +#define __ID3D11VertexShader_INTERFACE_DEFINED__ + +/* interface ID3D11VertexShader */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11VertexShader; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3b301d64-d678-4289-8897-22f8928b72f3") + ID3D11VertexShader : public ID3D11DeviceChild + { + public: + }; + + +#else /* C style interface */ + + typedef struct ID3D11VertexShaderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11VertexShader * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11VertexShader * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11VertexShader * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11VertexShader * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11VertexShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11VertexShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11VertexShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + END_INTERFACE + } ID3D11VertexShaderVtbl; + + interface ID3D11VertexShader + { + CONST_VTBL struct ID3D11VertexShaderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11VertexShader_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11VertexShader_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11VertexShader_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11VertexShader_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11VertexShader_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11VertexShader_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11VertexShader_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11VertexShader_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11HullShader_INTERFACE_DEFINED__ +#define __ID3D11HullShader_INTERFACE_DEFINED__ + +/* interface ID3D11HullShader */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11HullShader; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("8e5c6061-628a-4c8e-8264-bbe45cb3d5dd") + ID3D11HullShader : public ID3D11DeviceChild + { + public: + }; + + +#else /* C style interface */ + + typedef struct ID3D11HullShaderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11HullShader * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11HullShader * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11HullShader * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11HullShader * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11HullShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11HullShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11HullShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + END_INTERFACE + } ID3D11HullShaderVtbl; + + interface ID3D11HullShader + { + CONST_VTBL struct ID3D11HullShaderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11HullShader_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11HullShader_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11HullShader_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11HullShader_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11HullShader_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11HullShader_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11HullShader_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11HullShader_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11DomainShader_INTERFACE_DEFINED__ +#define __ID3D11DomainShader_INTERFACE_DEFINED__ + +/* interface ID3D11DomainShader */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11DomainShader; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("f582c508-0f36-490c-9977-31eece268cfa") + ID3D11DomainShader : public ID3D11DeviceChild + { + public: + }; + + +#else /* C style interface */ + + typedef struct ID3D11DomainShaderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11DomainShader * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11DomainShader * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11DomainShader * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11DomainShader * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11DomainShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11DomainShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11DomainShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + END_INTERFACE + } ID3D11DomainShaderVtbl; + + interface ID3D11DomainShader + { + CONST_VTBL struct ID3D11DomainShaderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11DomainShader_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11DomainShader_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11DomainShader_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11DomainShader_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11DomainShader_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11DomainShader_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11DomainShader_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11DomainShader_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11GeometryShader_INTERFACE_DEFINED__ +#define __ID3D11GeometryShader_INTERFACE_DEFINED__ + +/* interface ID3D11GeometryShader */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11GeometryShader; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("38325b96-effb-4022-ba02-2e795b70275c") + ID3D11GeometryShader : public ID3D11DeviceChild + { + public: + }; + + +#else /* C style interface */ + + typedef struct ID3D11GeometryShaderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11GeometryShader * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11GeometryShader * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11GeometryShader * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11GeometryShader * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11GeometryShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11GeometryShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11GeometryShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + END_INTERFACE + } ID3D11GeometryShaderVtbl; + + interface ID3D11GeometryShader + { + CONST_VTBL struct ID3D11GeometryShaderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11GeometryShader_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11GeometryShader_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11GeometryShader_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11GeometryShader_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11GeometryShader_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11GeometryShader_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11GeometryShader_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11GeometryShader_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11PixelShader_INTERFACE_DEFINED__ +#define __ID3D11PixelShader_INTERFACE_DEFINED__ + +/* interface ID3D11PixelShader */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11PixelShader; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("ea82e40d-51dc-4f33-93d4-db7c9125ae8c") + ID3D11PixelShader : public ID3D11DeviceChild + { + public: + }; + + +#else /* C style interface */ + + typedef struct ID3D11PixelShaderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11PixelShader * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11PixelShader * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11PixelShader * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11PixelShader * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11PixelShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11PixelShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11PixelShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + END_INTERFACE + } ID3D11PixelShaderVtbl; + + interface ID3D11PixelShader + { + CONST_VTBL struct ID3D11PixelShaderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11PixelShader_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11PixelShader_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11PixelShader_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11PixelShader_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11PixelShader_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11PixelShader_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11PixelShader_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11PixelShader_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11ComputeShader_INTERFACE_DEFINED__ +#define __ID3D11ComputeShader_INTERFACE_DEFINED__ + +/* interface ID3D11ComputeShader */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11ComputeShader; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("4f5b196e-c2bd-495e-bd01-1fded38e4969") + ID3D11ComputeShader : public ID3D11DeviceChild + { + public: + }; + + +#else /* C style interface */ + + typedef struct ID3D11ComputeShaderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11ComputeShader * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11ComputeShader * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11ComputeShader * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11ComputeShader * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11ComputeShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11ComputeShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11ComputeShader * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + END_INTERFACE + } ID3D11ComputeShaderVtbl; + + interface ID3D11ComputeShader + { + CONST_VTBL struct ID3D11ComputeShaderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11ComputeShader_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11ComputeShader_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11ComputeShader_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11ComputeShader_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11ComputeShader_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11ComputeShader_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11ComputeShader_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11ComputeShader_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11InputLayout_INTERFACE_DEFINED__ +#define __ID3D11InputLayout_INTERFACE_DEFINED__ + +/* interface ID3D11InputLayout */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11InputLayout; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("e4819ddc-4cf0-4025-bd26-5de82a3e07b7") + ID3D11InputLayout : public ID3D11DeviceChild + { + public: + }; + + +#else /* C style interface */ + + typedef struct ID3D11InputLayoutVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11InputLayout * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11InputLayout * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11InputLayout * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11InputLayout * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11InputLayout * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11InputLayout * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11InputLayout * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + END_INTERFACE + } ID3D11InputLayoutVtbl; + + interface ID3D11InputLayout + { + CONST_VTBL struct ID3D11InputLayoutVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11InputLayout_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11InputLayout_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11InputLayout_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11InputLayout_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11InputLayout_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11InputLayout_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11InputLayout_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11InputLayout_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0021 */ +/* [local] */ + +typedef +enum D3D11_FILTER + { + D3D11_FILTER_MIN_MAG_MIP_POINT = 0, + D3D11_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x1, + D3D11_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x4, + D3D11_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x5, + D3D11_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x10, + D3D11_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x11, + D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x14, + D3D11_FILTER_MIN_MAG_MIP_LINEAR = 0x15, + D3D11_FILTER_ANISOTROPIC = 0x55, + D3D11_FILTER_COMPARISON_MIN_MAG_MIP_POINT = 0x80, + D3D11_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 0x81, + D3D11_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x84, + D3D11_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 0x85, + D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 0x90, + D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x91, + D3D11_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 0x94, + D3D11_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR = 0x95, + D3D11_FILTER_COMPARISON_ANISOTROPIC = 0xd5, + D3D11_FILTER_MINIMUM_MIN_MAG_MIP_POINT = 0x100, + D3D11_FILTER_MINIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x101, + D3D11_FILTER_MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x104, + D3D11_FILTER_MINIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x105, + D3D11_FILTER_MINIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x110, + D3D11_FILTER_MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x111, + D3D11_FILTER_MINIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x114, + D3D11_FILTER_MINIMUM_MIN_MAG_MIP_LINEAR = 0x115, + D3D11_FILTER_MINIMUM_ANISOTROPIC = 0x155, + D3D11_FILTER_MAXIMUM_MIN_MAG_MIP_POINT = 0x180, + D3D11_FILTER_MAXIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x181, + D3D11_FILTER_MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x184, + D3D11_FILTER_MAXIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x185, + D3D11_FILTER_MAXIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x190, + D3D11_FILTER_MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x191, + D3D11_FILTER_MAXIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x194, + D3D11_FILTER_MAXIMUM_MIN_MAG_MIP_LINEAR = 0x195, + D3D11_FILTER_MAXIMUM_ANISOTROPIC = 0x1d5 + } D3D11_FILTER; + +typedef +enum D3D11_FILTER_TYPE + { + D3D11_FILTER_TYPE_POINT = 0, + D3D11_FILTER_TYPE_LINEAR = 1 + } D3D11_FILTER_TYPE; + +typedef +enum D3D11_FILTER_REDUCTION_TYPE + { + D3D11_FILTER_REDUCTION_TYPE_STANDARD = 0, + D3D11_FILTER_REDUCTION_TYPE_COMPARISON = 1, + D3D11_FILTER_REDUCTION_TYPE_MINIMUM = 2, + D3D11_FILTER_REDUCTION_TYPE_MAXIMUM = 3 + } D3D11_FILTER_REDUCTION_TYPE; + +#define D3D11_FILTER_REDUCTION_TYPE_MASK ( 0x3 ) + +#define D3D11_FILTER_REDUCTION_TYPE_SHIFT ( 7 ) + +#define D3D11_FILTER_TYPE_MASK ( 0x3 ) + +#define D3D11_MIN_FILTER_SHIFT ( 4 ) + +#define D3D11_MAG_FILTER_SHIFT ( 2 ) + +#define D3D11_MIP_FILTER_SHIFT ( 0 ) + +// D3D11_COMPARISON_FILTERING_BIT is no longer used / meaningless. The D3D11_FILTER_REDUCTION_TYPE enum replaced it. +// Old code that uses D3D11_COMPARISON_FILTERING_BIT and would never use D3D11_FILTER_MINIMUM_* or D3D11_FILTER_MAXIMUM_* +// will still work fine though, so the define is left to avoid breaks. +#define D3D11_COMPARISON_FILTERING_BIT ( 0x80 ) + +#define D3D11_ANISOTROPIC_FILTERING_BIT ( 0x40 ) + +#define D3D11_ENCODE_BASIC_FILTER( min, mag, mip, reduction ) \ + ( ( D3D11_FILTER ) ( \ + ( ( ( min ) & D3D11_FILTER_TYPE_MASK ) << D3D11_MIN_FILTER_SHIFT ) | \ + ( ( ( mag ) & D3D11_FILTER_TYPE_MASK ) << D3D11_MAG_FILTER_SHIFT ) | \ + ( ( ( mip ) & D3D11_FILTER_TYPE_MASK ) << D3D11_MIP_FILTER_SHIFT ) | \ + ( ( ( reduction ) & D3D11_FILTER_REDUCTION_TYPE_MASK ) << D3D11_FILTER_REDUCTION_TYPE_SHIFT ) ) ) +#define D3D11_ENCODE_ANISOTROPIC_FILTER( reduction ) \ + ( ( D3D11_FILTER ) ( \ + D3D11_ANISOTROPIC_FILTERING_BIT | \ + D3D11_ENCODE_BASIC_FILTER( D3D11_FILTER_TYPE_LINEAR, \ + D3D11_FILTER_TYPE_LINEAR, \ + D3D11_FILTER_TYPE_LINEAR, \ + reduction ) ) ) +#define D3D11_DECODE_MIN_FILTER( d3d11Filter ) \ + ( ( D3D11_FILTER_TYPE ) \ + ( ( ( d3d11Filter ) >> D3D11_MIN_FILTER_SHIFT ) & D3D11_FILTER_TYPE_MASK ) ) +#define D3D11_DECODE_MAG_FILTER( d3d11Filter ) \ + ( ( D3D11_FILTER_TYPE ) \ + ( ( ( d3d11Filter ) >> D3D11_MAG_FILTER_SHIFT ) & D3D11_FILTER_TYPE_MASK ) ) +#define D3D11_DECODE_MIP_FILTER( d3d11Filter ) \ + ( ( D3D11_FILTER_TYPE ) \ + ( ( ( d3d11Filter ) >> D3D11_MIP_FILTER_SHIFT ) & D3D11_FILTER_TYPE_MASK ) ) +#define D3D11_DECODE_FILTER_REDUCTION( d3d11Filter ) \ + ( ( D3D11_FILTER_REDUCTION_TYPE ) \ + ( ( ( d3d11Filter ) >> D3D11_FILTER_REDUCTION_TYPE_SHIFT ) & D3D11_FILTER_REDUCTION_TYPE_MASK ) ) +#define D3D11_DECODE_IS_COMPARISON_FILTER( d3d11Filter ) \ + ( D3D11_DECODE_FILTER_REDUCTION( d3d11Filter ) == D3D11_FILTER_REDUCTION_TYPE_COMPARISON ) +#define D3D11_DECODE_IS_ANISOTROPIC_FILTER( d3d11Filter ) \ + ( ( ( d3d11Filter ) & D3D11_ANISOTROPIC_FILTERING_BIT ) && \ + ( D3D11_FILTER_TYPE_LINEAR == D3D11_DECODE_MIN_FILTER( d3d11Filter ) ) && \ + ( D3D11_FILTER_TYPE_LINEAR == D3D11_DECODE_MAG_FILTER( d3d11Filter ) ) && \ + ( D3D11_FILTER_TYPE_LINEAR == D3D11_DECODE_MIP_FILTER( d3d11Filter ) ) ) +typedef +enum D3D11_TEXTURE_ADDRESS_MODE + { + D3D11_TEXTURE_ADDRESS_WRAP = 1, + D3D11_TEXTURE_ADDRESS_MIRROR = 2, + D3D11_TEXTURE_ADDRESS_CLAMP = 3, + D3D11_TEXTURE_ADDRESS_BORDER = 4, + D3D11_TEXTURE_ADDRESS_MIRROR_ONCE = 5 + } D3D11_TEXTURE_ADDRESS_MODE; + +typedef struct D3D11_SAMPLER_DESC + { + D3D11_FILTER Filter; + D3D11_TEXTURE_ADDRESS_MODE AddressU; + D3D11_TEXTURE_ADDRESS_MODE AddressV; + D3D11_TEXTURE_ADDRESS_MODE AddressW; + FLOAT MipLODBias; + UINT MaxAnisotropy; + D3D11_COMPARISON_FUNC ComparisonFunc; + FLOAT BorderColor[ 4 ]; + FLOAT MinLOD; + FLOAT MaxLOD; + } D3D11_SAMPLER_DESC; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_SAMPLER_DESC : public D3D11_SAMPLER_DESC +{ + CD3D11_SAMPLER_DESC() + {} + explicit CD3D11_SAMPLER_DESC( const D3D11_SAMPLER_DESC& o ) : + D3D11_SAMPLER_DESC( o ) + {} + explicit CD3D11_SAMPLER_DESC( CD3D11_DEFAULT ) + { + Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR; + AddressU = D3D11_TEXTURE_ADDRESS_CLAMP; + AddressV = D3D11_TEXTURE_ADDRESS_CLAMP; + AddressW = D3D11_TEXTURE_ADDRESS_CLAMP; + MipLODBias = 0; + MaxAnisotropy = 1; + ComparisonFunc = D3D11_COMPARISON_NEVER; + BorderColor[ 0 ] = 1.0f; + BorderColor[ 1 ] = 1.0f; + BorderColor[ 2 ] = 1.0f; + BorderColor[ 3 ] = 1.0f; + MinLOD = -3.402823466e+38F; // -FLT_MAX + MaxLOD = 3.402823466e+38F; // FLT_MAX + } + explicit CD3D11_SAMPLER_DESC( + D3D11_FILTER filter, + D3D11_TEXTURE_ADDRESS_MODE addressU, + D3D11_TEXTURE_ADDRESS_MODE addressV, + D3D11_TEXTURE_ADDRESS_MODE addressW, + FLOAT mipLODBias, + UINT maxAnisotropy, + D3D11_COMPARISON_FUNC comparisonFunc, + _In_reads_opt_( 4 ) const FLOAT* borderColor, // RGBA + FLOAT minLOD, + FLOAT maxLOD ) + { + Filter = filter; + AddressU = addressU; + AddressV = addressV; + AddressW = addressW; + MipLODBias = mipLODBias; + MaxAnisotropy = maxAnisotropy; + ComparisonFunc = comparisonFunc; + const float defaultColor[ 4 ] = { 1.0f, 1.0f, 1.0f, 1.0f }; + if (!borderColor) borderColor = defaultColor; + BorderColor[ 0 ] = borderColor[ 0 ]; + BorderColor[ 1 ] = borderColor[ 1 ]; + BorderColor[ 2 ] = borderColor[ 2 ]; + BorderColor[ 3 ] = borderColor[ 3 ]; + MinLOD = minLOD; + MaxLOD = maxLOD; + } + ~CD3D11_SAMPLER_DESC() {} + operator const D3D11_SAMPLER_DESC&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0021_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0021_v0_0_s_ifspec; + +#ifndef __ID3D11SamplerState_INTERFACE_DEFINED__ +#define __ID3D11SamplerState_INTERFACE_DEFINED__ + +/* interface ID3D11SamplerState */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11SamplerState; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("da6fea51-564c-4487-9810-f0d0f9b4e3a5") + ID3D11SamplerState : public ID3D11DeviceChild + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D11_SAMPLER_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11SamplerStateVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11SamplerState * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11SamplerState * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11SamplerState * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11SamplerState * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11SamplerState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11SamplerState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11SamplerState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11SamplerState * This, + /* [annotation] */ + _Out_ D3D11_SAMPLER_DESC *pDesc); + + END_INTERFACE + } ID3D11SamplerStateVtbl; + + interface ID3D11SamplerState + { + CONST_VTBL struct ID3D11SamplerStateVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11SamplerState_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11SamplerState_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11SamplerState_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11SamplerState_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11SamplerState_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11SamplerState_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11SamplerState_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11SamplerState_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11SamplerState_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0022 */ +/* [local] */ + +typedef +enum D3D11_FORMAT_SUPPORT + { + D3D11_FORMAT_SUPPORT_BUFFER = 0x1, + D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER = 0x2, + D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER = 0x4, + D3D11_FORMAT_SUPPORT_SO_BUFFER = 0x8, + D3D11_FORMAT_SUPPORT_TEXTURE1D = 0x10, + D3D11_FORMAT_SUPPORT_TEXTURE2D = 0x20, + D3D11_FORMAT_SUPPORT_TEXTURE3D = 0x40, + D3D11_FORMAT_SUPPORT_TEXTURECUBE = 0x80, + D3D11_FORMAT_SUPPORT_SHADER_LOAD = 0x100, + D3D11_FORMAT_SUPPORT_SHADER_SAMPLE = 0x200, + D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON = 0x400, + D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_MONO_TEXT = 0x800, + D3D11_FORMAT_SUPPORT_MIP = 0x1000, + D3D11_FORMAT_SUPPORT_MIP_AUTOGEN = 0x2000, + D3D11_FORMAT_SUPPORT_RENDER_TARGET = 0x4000, + D3D11_FORMAT_SUPPORT_BLENDABLE = 0x8000, + D3D11_FORMAT_SUPPORT_DEPTH_STENCIL = 0x10000, + D3D11_FORMAT_SUPPORT_CPU_LOCKABLE = 0x20000, + D3D11_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE = 0x40000, + D3D11_FORMAT_SUPPORT_DISPLAY = 0x80000, + D3D11_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT = 0x100000, + D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET = 0x200000, + D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD = 0x400000, + D3D11_FORMAT_SUPPORT_SHADER_GATHER = 0x800000, + D3D11_FORMAT_SUPPORT_BACK_BUFFER_CAST = 0x1000000, + D3D11_FORMAT_SUPPORT_TYPED_UNORDERED_ACCESS_VIEW = 0x2000000, + D3D11_FORMAT_SUPPORT_SHADER_GATHER_COMPARISON = 0x4000000, + D3D11_FORMAT_SUPPORT_DECODER_OUTPUT = 0x8000000, + D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_OUTPUT = 0x10000000, + D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_INPUT = 0x20000000, + D3D11_FORMAT_SUPPORT_VIDEO_ENCODER = 0x40000000 + } D3D11_FORMAT_SUPPORT; + +typedef +enum D3D11_FORMAT_SUPPORT2 + { + D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_ADD = 0x1, + D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_BITWISE_OPS = 0x2, + D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE = 0x4, + D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE = 0x8, + D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX = 0x10, + D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX = 0x20, + D3D11_FORMAT_SUPPORT2_UAV_TYPED_LOAD = 0x40, + D3D11_FORMAT_SUPPORT2_UAV_TYPED_STORE = 0x80, + D3D11_FORMAT_SUPPORT2_OUTPUT_MERGER_LOGIC_OP = 0x100, + D3D11_FORMAT_SUPPORT2_TILED = 0x200, + D3D11_FORMAT_SUPPORT2_SHAREABLE = 0x400, + D3D11_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY = 0x4000 + } D3D11_FORMAT_SUPPORT2; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0022_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0022_v0_0_s_ifspec; + +#ifndef __ID3D11Asynchronous_INTERFACE_DEFINED__ +#define __ID3D11Asynchronous_INTERFACE_DEFINED__ + +/* interface ID3D11Asynchronous */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11Asynchronous; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("4b35d0cd-1e15-4258-9c98-1b1333f6dd3b") + ID3D11Asynchronous : public ID3D11DeviceChild + { + public: + virtual UINT STDMETHODCALLTYPE GetDataSize( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11AsynchronousVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11Asynchronous * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11Asynchronous * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11Asynchronous * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11Asynchronous * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11Asynchronous * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11Asynchronous * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11Asynchronous * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + UINT ( STDMETHODCALLTYPE *GetDataSize )( + ID3D11Asynchronous * This); + + END_INTERFACE + } ID3D11AsynchronousVtbl; + + interface ID3D11Asynchronous + { + CONST_VTBL struct ID3D11AsynchronousVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11Asynchronous_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11Asynchronous_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11Asynchronous_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11Asynchronous_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11Asynchronous_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11Asynchronous_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11Asynchronous_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11Asynchronous_GetDataSize(This) \ + ( (This)->lpVtbl -> GetDataSize(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11Asynchronous_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0023 */ +/* [local] */ + +typedef +enum D3D11_ASYNC_GETDATA_FLAG + { + D3D11_ASYNC_GETDATA_DONOTFLUSH = 0x1 + } D3D11_ASYNC_GETDATA_FLAG; + +typedef +enum D3D11_QUERY + { + D3D11_QUERY_EVENT = 0, + D3D11_QUERY_OCCLUSION = ( D3D11_QUERY_EVENT + 1 ) , + D3D11_QUERY_TIMESTAMP = ( D3D11_QUERY_OCCLUSION + 1 ) , + D3D11_QUERY_TIMESTAMP_DISJOINT = ( D3D11_QUERY_TIMESTAMP + 1 ) , + D3D11_QUERY_PIPELINE_STATISTICS = ( D3D11_QUERY_TIMESTAMP_DISJOINT + 1 ) , + D3D11_QUERY_OCCLUSION_PREDICATE = ( D3D11_QUERY_PIPELINE_STATISTICS + 1 ) , + D3D11_QUERY_SO_STATISTICS = ( D3D11_QUERY_OCCLUSION_PREDICATE + 1 ) , + D3D11_QUERY_SO_OVERFLOW_PREDICATE = ( D3D11_QUERY_SO_STATISTICS + 1 ) , + D3D11_QUERY_SO_STATISTICS_STREAM0 = ( D3D11_QUERY_SO_OVERFLOW_PREDICATE + 1 ) , + D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0 = ( D3D11_QUERY_SO_STATISTICS_STREAM0 + 1 ) , + D3D11_QUERY_SO_STATISTICS_STREAM1 = ( D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0 + 1 ) , + D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM1 = ( D3D11_QUERY_SO_STATISTICS_STREAM1 + 1 ) , + D3D11_QUERY_SO_STATISTICS_STREAM2 = ( D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM1 + 1 ) , + D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM2 = ( D3D11_QUERY_SO_STATISTICS_STREAM2 + 1 ) , + D3D11_QUERY_SO_STATISTICS_STREAM3 = ( D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM2 + 1 ) , + D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM3 = ( D3D11_QUERY_SO_STATISTICS_STREAM3 + 1 ) + } D3D11_QUERY; + +typedef +enum D3D11_QUERY_MISC_FLAG + { + D3D11_QUERY_MISC_PREDICATEHINT = 0x1 + } D3D11_QUERY_MISC_FLAG; + +typedef struct D3D11_QUERY_DESC + { + D3D11_QUERY Query; + UINT MiscFlags; + } D3D11_QUERY_DESC; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_QUERY_DESC : public D3D11_QUERY_DESC +{ + CD3D11_QUERY_DESC() + {} + explicit CD3D11_QUERY_DESC( const D3D11_QUERY_DESC& o ) : + D3D11_QUERY_DESC( o ) + {} + explicit CD3D11_QUERY_DESC( + D3D11_QUERY query, + UINT miscFlags = 0 ) + { + Query = query; + MiscFlags = miscFlags; + } + ~CD3D11_QUERY_DESC() {} + operator const D3D11_QUERY_DESC&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0023_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0023_v0_0_s_ifspec; + +#ifndef __ID3D11Query_INTERFACE_DEFINED__ +#define __ID3D11Query_INTERFACE_DEFINED__ + +/* interface ID3D11Query */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11Query; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("d6c00747-87b7-425e-b84d-44d108560afd") + ID3D11Query : public ID3D11Asynchronous + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D11_QUERY_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11QueryVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11Query * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11Query * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11Query * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11Query * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11Query * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11Query * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11Query * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + UINT ( STDMETHODCALLTYPE *GetDataSize )( + ID3D11Query * This); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11Query * This, + /* [annotation] */ + _Out_ D3D11_QUERY_DESC *pDesc); + + END_INTERFACE + } ID3D11QueryVtbl; + + interface ID3D11Query + { + CONST_VTBL struct ID3D11QueryVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11Query_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11Query_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11Query_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11Query_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11Query_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11Query_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11Query_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11Query_GetDataSize(This) \ + ( (This)->lpVtbl -> GetDataSize(This) ) + + +#define ID3D11Query_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11Query_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11Predicate_INTERFACE_DEFINED__ +#define __ID3D11Predicate_INTERFACE_DEFINED__ + +/* interface ID3D11Predicate */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11Predicate; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9eb576dd-9f77-4d86-81aa-8bab5fe490e2") + ID3D11Predicate : public ID3D11Query + { + public: + }; + + +#else /* C style interface */ + + typedef struct ID3D11PredicateVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11Predicate * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11Predicate * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11Predicate * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11Predicate * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11Predicate * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11Predicate * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11Predicate * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + UINT ( STDMETHODCALLTYPE *GetDataSize )( + ID3D11Predicate * This); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11Predicate * This, + /* [annotation] */ + _Out_ D3D11_QUERY_DESC *pDesc); + + END_INTERFACE + } ID3D11PredicateVtbl; + + interface ID3D11Predicate + { + CONST_VTBL struct ID3D11PredicateVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11Predicate_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11Predicate_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11Predicate_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11Predicate_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11Predicate_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11Predicate_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11Predicate_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11Predicate_GetDataSize(This) \ + ( (This)->lpVtbl -> GetDataSize(This) ) + + +#define ID3D11Predicate_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11Predicate_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0025 */ +/* [local] */ + +typedef struct D3D11_QUERY_DATA_TIMESTAMP_DISJOINT + { + UINT64 Frequency; + BOOL Disjoint; + } D3D11_QUERY_DATA_TIMESTAMP_DISJOINT; + +typedef struct D3D11_QUERY_DATA_PIPELINE_STATISTICS + { + UINT64 IAVertices; + UINT64 IAPrimitives; + UINT64 VSInvocations; + UINT64 GSInvocations; + UINT64 GSPrimitives; + UINT64 CInvocations; + UINT64 CPrimitives; + UINT64 PSInvocations; + UINT64 HSInvocations; + UINT64 DSInvocations; + UINT64 CSInvocations; + } D3D11_QUERY_DATA_PIPELINE_STATISTICS; + +typedef struct D3D11_QUERY_DATA_SO_STATISTICS + { + UINT64 NumPrimitivesWritten; + UINT64 PrimitivesStorageNeeded; + } D3D11_QUERY_DATA_SO_STATISTICS; + +typedef +enum D3D11_COUNTER + { + D3D11_COUNTER_DEVICE_DEPENDENT_0 = 0x40000000 + } D3D11_COUNTER; + +typedef +enum D3D11_COUNTER_TYPE + { + D3D11_COUNTER_TYPE_FLOAT32 = 0, + D3D11_COUNTER_TYPE_UINT16 = ( D3D11_COUNTER_TYPE_FLOAT32 + 1 ) , + D3D11_COUNTER_TYPE_UINT32 = ( D3D11_COUNTER_TYPE_UINT16 + 1 ) , + D3D11_COUNTER_TYPE_UINT64 = ( D3D11_COUNTER_TYPE_UINT32 + 1 ) + } D3D11_COUNTER_TYPE; + +typedef struct D3D11_COUNTER_DESC + { + D3D11_COUNTER Counter; + UINT MiscFlags; + } D3D11_COUNTER_DESC; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_COUNTER_DESC : public D3D11_COUNTER_DESC +{ + CD3D11_COUNTER_DESC() + {} + explicit CD3D11_COUNTER_DESC( const D3D11_COUNTER_DESC& o ) : + D3D11_COUNTER_DESC( o ) + {} + explicit CD3D11_COUNTER_DESC( + D3D11_COUNTER counter, + UINT miscFlags = 0 ) + { + Counter = counter; + MiscFlags = miscFlags; + } + ~CD3D11_COUNTER_DESC() {} + operator const D3D11_COUNTER_DESC&() const { return *this; } +}; +extern "C"{ +#endif +typedef struct D3D11_COUNTER_INFO + { + D3D11_COUNTER LastDeviceDependentCounter; + UINT NumSimultaneousCounters; + UINT8 NumDetectableParallelUnits; + } D3D11_COUNTER_INFO; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0025_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0025_v0_0_s_ifspec; + +#ifndef __ID3D11Counter_INTERFACE_DEFINED__ +#define __ID3D11Counter_INTERFACE_DEFINED__ + +/* interface ID3D11Counter */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11Counter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6e8c49fb-a371-4770-b440-29086022b741") + ID3D11Counter : public ID3D11Asynchronous + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D11_COUNTER_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11CounterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11Counter * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11Counter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11Counter * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11Counter * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11Counter * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11Counter * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11Counter * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + UINT ( STDMETHODCALLTYPE *GetDataSize )( + ID3D11Counter * This); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11Counter * This, + /* [annotation] */ + _Out_ D3D11_COUNTER_DESC *pDesc); + + END_INTERFACE + } ID3D11CounterVtbl; + + interface ID3D11Counter + { + CONST_VTBL struct ID3D11CounterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11Counter_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11Counter_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11Counter_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11Counter_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11Counter_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11Counter_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11Counter_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11Counter_GetDataSize(This) \ + ( (This)->lpVtbl -> GetDataSize(This) ) + + +#define ID3D11Counter_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11Counter_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0026 */ +/* [local] */ + +typedef +enum D3D11_STANDARD_MULTISAMPLE_QUALITY_LEVELS + { + D3D11_STANDARD_MULTISAMPLE_PATTERN = 0xffffffff, + D3D11_CENTER_MULTISAMPLE_PATTERN = 0xfffffffe + } D3D11_STANDARD_MULTISAMPLE_QUALITY_LEVELS; + +typedef +enum D3D11_DEVICE_CONTEXT_TYPE + { + D3D11_DEVICE_CONTEXT_IMMEDIATE = 0, + D3D11_DEVICE_CONTEXT_DEFERRED = ( D3D11_DEVICE_CONTEXT_IMMEDIATE + 1 ) + } D3D11_DEVICE_CONTEXT_TYPE; + +typedef struct D3D11_CLASS_INSTANCE_DESC + { + UINT InstanceId; + UINT InstanceIndex; + UINT TypeId; + UINT ConstantBuffer; + UINT BaseConstantBufferOffset; + UINT BaseTexture; + UINT BaseSampler; + BOOL Created; + } D3D11_CLASS_INSTANCE_DESC; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0026_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0026_v0_0_s_ifspec; + +#ifndef __ID3D11ClassInstance_INTERFACE_DEFINED__ +#define __ID3D11ClassInstance_INTERFACE_DEFINED__ + +/* interface ID3D11ClassInstance */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11ClassInstance; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("a6cd7faa-b0b7-4a2f-9436-8662a65797cb") + ID3D11ClassInstance : public ID3D11DeviceChild + { + public: + virtual void STDMETHODCALLTYPE GetClassLinkage( + /* [annotation] */ + _Outptr_ ID3D11ClassLinkage **ppLinkage) = 0; + + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D11_CLASS_INSTANCE_DESC *pDesc) = 0; + + virtual void STDMETHODCALLTYPE GetInstanceName( + /* [annotation] */ + _Out_writes_opt_(*pBufferLength) LPSTR pInstanceName, + /* [annotation] */ + _Inout_ SIZE_T *pBufferLength) = 0; + + virtual void STDMETHODCALLTYPE GetTypeName( + /* [annotation] */ + _Out_writes_opt_(*pBufferLength) LPSTR pTypeName, + /* [annotation] */ + _Inout_ SIZE_T *pBufferLength) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11ClassInstanceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11ClassInstance * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11ClassInstance * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11ClassInstance * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11ClassInstance * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11ClassInstance * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11ClassInstance * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11ClassInstance * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetClassLinkage )( + ID3D11ClassInstance * This, + /* [annotation] */ + _Outptr_ ID3D11ClassLinkage **ppLinkage); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11ClassInstance * This, + /* [annotation] */ + _Out_ D3D11_CLASS_INSTANCE_DESC *pDesc); + + void ( STDMETHODCALLTYPE *GetInstanceName )( + ID3D11ClassInstance * This, + /* [annotation] */ + _Out_writes_opt_(*pBufferLength) LPSTR pInstanceName, + /* [annotation] */ + _Inout_ SIZE_T *pBufferLength); + + void ( STDMETHODCALLTYPE *GetTypeName )( + ID3D11ClassInstance * This, + /* [annotation] */ + _Out_writes_opt_(*pBufferLength) LPSTR pTypeName, + /* [annotation] */ + _Inout_ SIZE_T *pBufferLength); + + END_INTERFACE + } ID3D11ClassInstanceVtbl; + + interface ID3D11ClassInstance + { + CONST_VTBL struct ID3D11ClassInstanceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11ClassInstance_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11ClassInstance_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11ClassInstance_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11ClassInstance_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11ClassInstance_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11ClassInstance_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11ClassInstance_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11ClassInstance_GetClassLinkage(This,ppLinkage) \ + ( (This)->lpVtbl -> GetClassLinkage(This,ppLinkage) ) + +#define ID3D11ClassInstance_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define ID3D11ClassInstance_GetInstanceName(This,pInstanceName,pBufferLength) \ + ( (This)->lpVtbl -> GetInstanceName(This,pInstanceName,pBufferLength) ) + +#define ID3D11ClassInstance_GetTypeName(This,pTypeName,pBufferLength) \ + ( (This)->lpVtbl -> GetTypeName(This,pTypeName,pBufferLength) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11ClassInstance_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11ClassLinkage_INTERFACE_DEFINED__ +#define __ID3D11ClassLinkage_INTERFACE_DEFINED__ + +/* interface ID3D11ClassLinkage */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11ClassLinkage; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("ddf57cba-9543-46e4-a12b-f207a0fe7fed") + ID3D11ClassLinkage : public ID3D11DeviceChild + { + public: + virtual HRESULT STDMETHODCALLTYPE GetClassInstance( + /* [annotation] */ + _In_ LPCSTR pClassInstanceName, + /* [annotation] */ + _In_ UINT InstanceIndex, + /* [annotation] */ + _COM_Outptr_ ID3D11ClassInstance **ppInstance) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateClassInstance( + /* [annotation] */ + _In_ LPCSTR pClassTypeName, + /* [annotation] */ + _In_ UINT ConstantBufferOffset, + /* [annotation] */ + _In_ UINT ConstantVectorOffset, + /* [annotation] */ + _In_ UINT TextureOffset, + /* [annotation] */ + _In_ UINT SamplerOffset, + /* [annotation] */ + _COM_Outptr_ ID3D11ClassInstance **ppInstance) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11ClassLinkageVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11ClassLinkage * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11ClassLinkage * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11ClassLinkage * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11ClassLinkage * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11ClassLinkage * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11ClassLinkage * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11ClassLinkage * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *GetClassInstance )( + ID3D11ClassLinkage * This, + /* [annotation] */ + _In_ LPCSTR pClassInstanceName, + /* [annotation] */ + _In_ UINT InstanceIndex, + /* [annotation] */ + _COM_Outptr_ ID3D11ClassInstance **ppInstance); + + HRESULT ( STDMETHODCALLTYPE *CreateClassInstance )( + ID3D11ClassLinkage * This, + /* [annotation] */ + _In_ LPCSTR pClassTypeName, + /* [annotation] */ + _In_ UINT ConstantBufferOffset, + /* [annotation] */ + _In_ UINT ConstantVectorOffset, + /* [annotation] */ + _In_ UINT TextureOffset, + /* [annotation] */ + _In_ UINT SamplerOffset, + /* [annotation] */ + _COM_Outptr_ ID3D11ClassInstance **ppInstance); + + END_INTERFACE + } ID3D11ClassLinkageVtbl; + + interface ID3D11ClassLinkage + { + CONST_VTBL struct ID3D11ClassLinkageVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11ClassLinkage_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11ClassLinkage_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11ClassLinkage_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11ClassLinkage_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11ClassLinkage_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11ClassLinkage_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11ClassLinkage_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11ClassLinkage_GetClassInstance(This,pClassInstanceName,InstanceIndex,ppInstance) \ + ( (This)->lpVtbl -> GetClassInstance(This,pClassInstanceName,InstanceIndex,ppInstance) ) + +#define ID3D11ClassLinkage_CreateClassInstance(This,pClassTypeName,ConstantBufferOffset,ConstantVectorOffset,TextureOffset,SamplerOffset,ppInstance) \ + ( (This)->lpVtbl -> CreateClassInstance(This,pClassTypeName,ConstantBufferOffset,ConstantVectorOffset,TextureOffset,SamplerOffset,ppInstance) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11ClassLinkage_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11CommandList_INTERFACE_DEFINED__ +#define __ID3D11CommandList_INTERFACE_DEFINED__ + +/* interface ID3D11CommandList */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11CommandList; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("a24bc4d1-769e-43f7-8013-98ff566c18e2") + ID3D11CommandList : public ID3D11DeviceChild + { + public: + virtual UINT STDMETHODCALLTYPE GetContextFlags( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11CommandListVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11CommandList * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11CommandList * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11CommandList * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11CommandList * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11CommandList * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11CommandList * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11CommandList * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + UINT ( STDMETHODCALLTYPE *GetContextFlags )( + ID3D11CommandList * This); + + END_INTERFACE + } ID3D11CommandListVtbl; + + interface ID3D11CommandList + { + CONST_VTBL struct ID3D11CommandListVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11CommandList_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11CommandList_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11CommandList_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11CommandList_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11CommandList_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11CommandList_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11CommandList_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11CommandList_GetContextFlags(This) \ + ( (This)->lpVtbl -> GetContextFlags(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11CommandList_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0029 */ +/* [local] */ + +typedef +enum D3D11_FEATURE + { + D3D11_FEATURE_THREADING = 0, + D3D11_FEATURE_DOUBLES = ( D3D11_FEATURE_THREADING + 1 ) , + D3D11_FEATURE_FORMAT_SUPPORT = ( D3D11_FEATURE_DOUBLES + 1 ) , + D3D11_FEATURE_FORMAT_SUPPORT2 = ( D3D11_FEATURE_FORMAT_SUPPORT + 1 ) , + D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS = ( D3D11_FEATURE_FORMAT_SUPPORT2 + 1 ) , + D3D11_FEATURE_D3D11_OPTIONS = ( D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS + 1 ) , + D3D11_FEATURE_ARCHITECTURE_INFO = ( D3D11_FEATURE_D3D11_OPTIONS + 1 ) , + D3D11_FEATURE_D3D9_OPTIONS = ( D3D11_FEATURE_ARCHITECTURE_INFO + 1 ) , + D3D11_FEATURE_SHADER_MIN_PRECISION_SUPPORT = ( D3D11_FEATURE_D3D9_OPTIONS + 1 ) , + D3D11_FEATURE_D3D9_SHADOW_SUPPORT = ( D3D11_FEATURE_SHADER_MIN_PRECISION_SUPPORT + 1 ) , + D3D11_FEATURE_D3D11_OPTIONS1 = ( D3D11_FEATURE_D3D9_SHADOW_SUPPORT + 1 ) , + D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT = ( D3D11_FEATURE_D3D11_OPTIONS1 + 1 ) , + D3D11_FEATURE_MARKER_SUPPORT = ( D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT + 1 ) , + D3D11_FEATURE_D3D9_OPTIONS1 = ( D3D11_FEATURE_MARKER_SUPPORT + 1 ) , + D3D11_FEATURE_D3D11_OPTIONS2 = ( D3D11_FEATURE_D3D9_OPTIONS1 + 1 ) , + D3D11_FEATURE_D3D11_OPTIONS3 = ( D3D11_FEATURE_D3D11_OPTIONS2 + 1 ) , + D3D11_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT = ( D3D11_FEATURE_D3D11_OPTIONS3 + 1 ) , + D3D11_FEATURE_D3D11_OPTIONS4 = ( D3D11_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT + 1 ) , + D3D11_FEATURE_SHADER_CACHE = ( D3D11_FEATURE_D3D11_OPTIONS4 + 1 ) + } D3D11_FEATURE; + +typedef struct D3D11_FEATURE_DATA_THREADING + { + BOOL DriverConcurrentCreates; + BOOL DriverCommandLists; + } D3D11_FEATURE_DATA_THREADING; + +typedef struct D3D11_FEATURE_DATA_DOUBLES + { + BOOL DoublePrecisionFloatShaderOps; + } D3D11_FEATURE_DATA_DOUBLES; + +typedef struct D3D11_FEATURE_DATA_FORMAT_SUPPORT + { + DXGI_FORMAT InFormat; + UINT OutFormatSupport; + } D3D11_FEATURE_DATA_FORMAT_SUPPORT; + +typedef struct D3D11_FEATURE_DATA_FORMAT_SUPPORT2 + { + DXGI_FORMAT InFormat; + UINT OutFormatSupport2; + } D3D11_FEATURE_DATA_FORMAT_SUPPORT2; + +typedef struct D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS + { + BOOL ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x; + } D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS; + +// ============================================================================= +// In the D3D11_FEATURE_DATA_D3D11_OPTIONS struct below, +// the following groupings of capabilities will always be set identically. +// That is, all the BOOLs in a grouping will be TRUE or FALSE together. +// +// Group: DiscardAPIsSeenByDriver, FlagsForUpdateAndCopySeenByDriver +// +// Group: ClearView, CopyWithOverlap, ConstantBufferPartialUpdate +// ConstantBufferOffsetting, MapNoOverwriteOnDynamicConstantBuffer +// +// Group: MapNoOverwriteOnDynamicBufferSRV, +// MultisampleRTVWithForcedSampleCountOne +// +typedef struct D3D11_FEATURE_DATA_D3D11_OPTIONS + { + BOOL OutputMergerLogicOp; + BOOL UAVOnlyRenderingForcedSampleCount; + BOOL DiscardAPIsSeenByDriver; + BOOL FlagsForUpdateAndCopySeenByDriver; + BOOL ClearView; + BOOL CopyWithOverlap; + BOOL ConstantBufferPartialUpdate; + BOOL ConstantBufferOffsetting; + BOOL MapNoOverwriteOnDynamicConstantBuffer; + BOOL MapNoOverwriteOnDynamicBufferSRV; + BOOL MultisampleRTVWithForcedSampleCountOne; + BOOL SAD4ShaderInstructions; + BOOL ExtendedDoublesShaderInstructions; + BOOL ExtendedResourceSharing; + } D3D11_FEATURE_DATA_D3D11_OPTIONS; + +typedef struct D3D11_FEATURE_DATA_ARCHITECTURE_INFO + { + BOOL TileBasedDeferredRenderer; + } D3D11_FEATURE_DATA_ARCHITECTURE_INFO; + +typedef struct D3D11_FEATURE_DATA_D3D9_OPTIONS + { + BOOL FullNonPow2TextureSupport; + } D3D11_FEATURE_DATA_D3D9_OPTIONS; + +typedef struct D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT + { + BOOL SupportsDepthAsTextureWithLessEqualComparisonFilter; + } D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT; + +typedef +enum D3D11_SHADER_MIN_PRECISION_SUPPORT + { + D3D11_SHADER_MIN_PRECISION_10_BIT = 0x1, + D3D11_SHADER_MIN_PRECISION_16_BIT = 0x2 + } D3D11_SHADER_MIN_PRECISION_SUPPORT; + +typedef struct D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT + { + UINT PixelShaderMinPrecision; + UINT AllOtherShaderStagesMinPrecision; + } D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT; + +typedef +enum D3D11_TILED_RESOURCES_TIER + { + D3D11_TILED_RESOURCES_NOT_SUPPORTED = 0, + D3D11_TILED_RESOURCES_TIER_1 = 1, + D3D11_TILED_RESOURCES_TIER_2 = 2, + D3D11_TILED_RESOURCES_TIER_3 = 3 + } D3D11_TILED_RESOURCES_TIER; + +typedef struct D3D11_FEATURE_DATA_D3D11_OPTIONS1 + { + D3D11_TILED_RESOURCES_TIER TiledResourcesTier; + BOOL MinMaxFiltering; + BOOL ClearViewAlsoSupportsDepthOnlyFormats; + BOOL MapOnDefaultBuffers; + } D3D11_FEATURE_DATA_D3D11_OPTIONS1; + +typedef struct D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT + { + BOOL SimpleInstancingSupported; + } D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT; + +typedef struct D3D11_FEATURE_DATA_MARKER_SUPPORT + { + BOOL Profile; + } D3D11_FEATURE_DATA_MARKER_SUPPORT; + +typedef struct D3D11_FEATURE_DATA_D3D9_OPTIONS1 + { + BOOL FullNonPow2TextureSupported; + BOOL DepthAsTextureWithLessEqualComparisonFilterSupported; + BOOL SimpleInstancingSupported; + BOOL TextureCubeFaceRenderTargetWithNonCubeDepthStencilSupported; + } D3D11_FEATURE_DATA_D3D9_OPTIONS1; + +typedef +enum D3D11_CONSERVATIVE_RASTERIZATION_TIER + { + D3D11_CONSERVATIVE_RASTERIZATION_NOT_SUPPORTED = 0, + D3D11_CONSERVATIVE_RASTERIZATION_TIER_1 = 1, + D3D11_CONSERVATIVE_RASTERIZATION_TIER_2 = 2, + D3D11_CONSERVATIVE_RASTERIZATION_TIER_3 = 3 + } D3D11_CONSERVATIVE_RASTERIZATION_TIER; + +typedef struct D3D11_FEATURE_DATA_D3D11_OPTIONS2 + { + BOOL PSSpecifiedStencilRefSupported; + BOOL TypedUAVLoadAdditionalFormats; + BOOL ROVsSupported; + D3D11_CONSERVATIVE_RASTERIZATION_TIER ConservativeRasterizationTier; + D3D11_TILED_RESOURCES_TIER TiledResourcesTier; + BOOL MapOnDefaultTextures; + BOOL StandardSwizzle; + BOOL UnifiedMemoryArchitecture; + } D3D11_FEATURE_DATA_D3D11_OPTIONS2; + +typedef struct D3D11_FEATURE_DATA_D3D11_OPTIONS3 + { + BOOL VPAndRTArrayIndexFromAnyShaderFeedingRasterizer; + } D3D11_FEATURE_DATA_D3D11_OPTIONS3; + +typedef struct D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT + { + UINT MaxGPUVirtualAddressBitsPerResource; + UINT MaxGPUVirtualAddressBitsPerProcess; + } D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT; + +typedef +enum D3D11_SHADER_CACHE_SUPPORT_FLAGS + { + D3D11_SHADER_CACHE_SUPPORT_NONE = 0, + D3D11_SHADER_CACHE_SUPPORT_AUTOMATIC_INPROC_CACHE = 0x1, + D3D11_SHADER_CACHE_SUPPORT_AUTOMATIC_DISK_CACHE = 0x2 + } D3D11_SHADER_CACHE_SUPPORT_FLAGS; + +typedef struct D3D11_FEATURE_DATA_SHADER_CACHE + { + UINT SupportFlags; + } D3D11_FEATURE_DATA_SHADER_CACHE; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0029_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0029_v0_0_s_ifspec; + +#ifndef __ID3D11DeviceContext_INTERFACE_DEFINED__ +#define __ID3D11DeviceContext_INTERFACE_DEFINED__ + +/* interface ID3D11DeviceContext */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11DeviceContext; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("c0bfa96c-e089-44fb-8eaf-26f8796190da") + ID3D11DeviceContext : public ID3D11DeviceChild + { + public: + virtual void STDMETHODCALLTYPE VSSetConstantBuffers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers) = 0; + + virtual void STDMETHODCALLTYPE PSSetShaderResources( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews) = 0; + + virtual void STDMETHODCALLTYPE PSSetShader( + /* [annotation] */ + _In_opt_ ID3D11PixelShader *pPixelShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances) = 0; + + virtual void STDMETHODCALLTYPE PSSetSamplers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers) = 0; + + virtual void STDMETHODCALLTYPE VSSetShader( + /* [annotation] */ + _In_opt_ ID3D11VertexShader *pVertexShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances) = 0; + + virtual void STDMETHODCALLTYPE DrawIndexed( + /* [annotation] */ + _In_ UINT IndexCount, + /* [annotation] */ + _In_ UINT StartIndexLocation, + /* [annotation] */ + _In_ INT BaseVertexLocation) = 0; + + virtual void STDMETHODCALLTYPE Draw( + /* [annotation] */ + _In_ UINT VertexCount, + /* [annotation] */ + _In_ UINT StartVertexLocation) = 0; + + virtual HRESULT STDMETHODCALLTYPE Map( + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_ UINT Subresource, + /* [annotation] */ + _In_ D3D11_MAP MapType, + /* [annotation] */ + _In_ UINT MapFlags, + /* [annotation] */ + _Out_opt_ D3D11_MAPPED_SUBRESOURCE *pMappedResource) = 0; + + virtual void STDMETHODCALLTYPE Unmap( + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_ UINT Subresource) = 0; + + virtual void STDMETHODCALLTYPE PSSetConstantBuffers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers) = 0; + + virtual void STDMETHODCALLTYPE IASetInputLayout( + /* [annotation] */ + _In_opt_ ID3D11InputLayout *pInputLayout) = 0; + + virtual void STDMETHODCALLTYPE IASetVertexBuffers( + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppVertexBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pStrides, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pOffsets) = 0; + + virtual void STDMETHODCALLTYPE IASetIndexBuffer( + /* [annotation] */ + _In_opt_ ID3D11Buffer *pIndexBuffer, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT Offset) = 0; + + virtual void STDMETHODCALLTYPE DrawIndexedInstanced( + /* [annotation] */ + _In_ UINT IndexCountPerInstance, + /* [annotation] */ + _In_ UINT InstanceCount, + /* [annotation] */ + _In_ UINT StartIndexLocation, + /* [annotation] */ + _In_ INT BaseVertexLocation, + /* [annotation] */ + _In_ UINT StartInstanceLocation) = 0; + + virtual void STDMETHODCALLTYPE DrawInstanced( + /* [annotation] */ + _In_ UINT VertexCountPerInstance, + /* [annotation] */ + _In_ UINT InstanceCount, + /* [annotation] */ + _In_ UINT StartVertexLocation, + /* [annotation] */ + _In_ UINT StartInstanceLocation) = 0; + + virtual void STDMETHODCALLTYPE GSSetConstantBuffers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers) = 0; + + virtual void STDMETHODCALLTYPE GSSetShader( + /* [annotation] */ + _In_opt_ ID3D11GeometryShader *pShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances) = 0; + + virtual void STDMETHODCALLTYPE IASetPrimitiveTopology( + /* [annotation] */ + _In_ D3D11_PRIMITIVE_TOPOLOGY Topology) = 0; + + virtual void STDMETHODCALLTYPE VSSetShaderResources( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews) = 0; + + virtual void STDMETHODCALLTYPE VSSetSamplers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers) = 0; + + virtual void STDMETHODCALLTYPE Begin( + /* [annotation] */ + _In_ ID3D11Asynchronous *pAsync) = 0; + + virtual void STDMETHODCALLTYPE End( + /* [annotation] */ + _In_ ID3D11Asynchronous *pAsync) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetData( + /* [annotation] */ + _In_ ID3D11Asynchronous *pAsync, + /* [annotation] */ + _Out_writes_bytes_opt_( DataSize ) void *pData, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_ UINT GetDataFlags) = 0; + + virtual void STDMETHODCALLTYPE SetPredication( + /* [annotation] */ + _In_opt_ ID3D11Predicate *pPredicate, + /* [annotation] */ + _In_ BOOL PredicateValue) = 0; + + virtual void STDMETHODCALLTYPE GSSetShaderResources( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews) = 0; + + virtual void STDMETHODCALLTYPE GSSetSamplers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers) = 0; + + virtual void STDMETHODCALLTYPE OMSetRenderTargets( + /* [annotation] */ + _In_range_( 0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11RenderTargetView *const *ppRenderTargetViews, + /* [annotation] */ + _In_opt_ ID3D11DepthStencilView *pDepthStencilView) = 0; + + virtual void STDMETHODCALLTYPE OMSetRenderTargetsAndUnorderedAccessViews( + /* [annotation] */ + _In_ UINT NumRTVs, + /* [annotation] */ + _In_reads_opt_(NumRTVs) ID3D11RenderTargetView *const *ppRenderTargetViews, + /* [annotation] */ + _In_opt_ ID3D11DepthStencilView *pDepthStencilView, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - 1 ) UINT UAVStartSlot, + /* [annotation] */ + _In_ UINT NumUAVs, + /* [annotation] */ + _In_reads_opt_(NumUAVs) ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, + /* [annotation] */ + _In_reads_opt_(NumUAVs) const UINT *pUAVInitialCounts) = 0; + + virtual void STDMETHODCALLTYPE OMSetBlendState( + /* [annotation] */ + _In_opt_ ID3D11BlendState *pBlendState, + /* [annotation] */ + _In_opt_ const FLOAT BlendFactor[ 4 ], + /* [annotation] */ + _In_ UINT SampleMask) = 0; + + virtual void STDMETHODCALLTYPE OMSetDepthStencilState( + /* [annotation] */ + _In_opt_ ID3D11DepthStencilState *pDepthStencilState, + /* [annotation] */ + _In_ UINT StencilRef) = 0; + + virtual void STDMETHODCALLTYPE SOSetTargets( + /* [annotation] */ + _In_range_( 0, D3D11_SO_BUFFER_SLOT_COUNT) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppSOTargets, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pOffsets) = 0; + + virtual void STDMETHODCALLTYPE DrawAuto( void) = 0; + + virtual void STDMETHODCALLTYPE DrawIndexedInstancedIndirect( + /* [annotation] */ + _In_ ID3D11Buffer *pBufferForArgs, + /* [annotation] */ + _In_ UINT AlignedByteOffsetForArgs) = 0; + + virtual void STDMETHODCALLTYPE DrawInstancedIndirect( + /* [annotation] */ + _In_ ID3D11Buffer *pBufferForArgs, + /* [annotation] */ + _In_ UINT AlignedByteOffsetForArgs) = 0; + + virtual void STDMETHODCALLTYPE Dispatch( + /* [annotation] */ + _In_ UINT ThreadGroupCountX, + /* [annotation] */ + _In_ UINT ThreadGroupCountY, + /* [annotation] */ + _In_ UINT ThreadGroupCountZ) = 0; + + virtual void STDMETHODCALLTYPE DispatchIndirect( + /* [annotation] */ + _In_ ID3D11Buffer *pBufferForArgs, + /* [annotation] */ + _In_ UINT AlignedByteOffsetForArgs) = 0; + + virtual void STDMETHODCALLTYPE RSSetState( + /* [annotation] */ + _In_opt_ ID3D11RasterizerState *pRasterizerState) = 0; + + virtual void STDMETHODCALLTYPE RSSetViewports( + /* [annotation] */ + _In_range_(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumViewports, + /* [annotation] */ + _In_reads_opt_(NumViewports) const D3D11_VIEWPORT *pViewports) = 0; + + virtual void STDMETHODCALLTYPE RSSetScissorRects( + /* [annotation] */ + _In_range_(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumRects, + /* [annotation] */ + _In_reads_opt_(NumRects) const D3D11_RECT *pRects) = 0; + + virtual void STDMETHODCALLTYPE CopySubresourceRegion( + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ UINT DstX, + /* [annotation] */ + _In_ UINT DstY, + /* [annotation] */ + _In_ UINT DstZ, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pSrcBox) = 0; + + virtual void STDMETHODCALLTYPE CopyResource( + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource) = 0; + + virtual void STDMETHODCALLTYPE UpdateSubresource( + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pDstBox, + /* [annotation] */ + _In_ const void *pSrcData, + /* [annotation] */ + _In_ UINT SrcRowPitch, + /* [annotation] */ + _In_ UINT SrcDepthPitch) = 0; + + virtual void STDMETHODCALLTYPE CopyStructureCount( + /* [annotation] */ + _In_ ID3D11Buffer *pDstBuffer, + /* [annotation] */ + _In_ UINT DstAlignedByteOffset, + /* [annotation] */ + _In_ ID3D11UnorderedAccessView *pSrcView) = 0; + + virtual void STDMETHODCALLTYPE ClearRenderTargetView( + /* [annotation] */ + _In_ ID3D11RenderTargetView *pRenderTargetView, + /* [annotation] */ + _In_ const FLOAT ColorRGBA[ 4 ]) = 0; + + virtual void STDMETHODCALLTYPE ClearUnorderedAccessViewUint( + /* [annotation] */ + _In_ ID3D11UnorderedAccessView *pUnorderedAccessView, + /* [annotation] */ + _In_ const UINT Values[ 4 ]) = 0; + + virtual void STDMETHODCALLTYPE ClearUnorderedAccessViewFloat( + /* [annotation] */ + _In_ ID3D11UnorderedAccessView *pUnorderedAccessView, + /* [annotation] */ + _In_ const FLOAT Values[ 4 ]) = 0; + + virtual void STDMETHODCALLTYPE ClearDepthStencilView( + /* [annotation] */ + _In_ ID3D11DepthStencilView *pDepthStencilView, + /* [annotation] */ + _In_ UINT ClearFlags, + /* [annotation] */ + _In_ FLOAT Depth, + /* [annotation] */ + _In_ UINT8 Stencil) = 0; + + virtual void STDMETHODCALLTYPE GenerateMips( + /* [annotation] */ + _In_ ID3D11ShaderResourceView *pShaderResourceView) = 0; + + virtual void STDMETHODCALLTYPE SetResourceMinLOD( + /* [annotation] */ + _In_ ID3D11Resource *pResource, + FLOAT MinLOD) = 0; + + virtual FLOAT STDMETHODCALLTYPE GetResourceMinLOD( + /* [annotation] */ + _In_ ID3D11Resource *pResource) = 0; + + virtual void STDMETHODCALLTYPE ResolveSubresource( + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_ DXGI_FORMAT Format) = 0; + + virtual void STDMETHODCALLTYPE ExecuteCommandList( + /* [annotation] */ + _In_ ID3D11CommandList *pCommandList, + BOOL RestoreContextState) = 0; + + virtual void STDMETHODCALLTYPE HSSetShaderResources( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews) = 0; + + virtual void STDMETHODCALLTYPE HSSetShader( + /* [annotation] */ + _In_opt_ ID3D11HullShader *pHullShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances) = 0; + + virtual void STDMETHODCALLTYPE HSSetSamplers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers) = 0; + + virtual void STDMETHODCALLTYPE HSSetConstantBuffers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers) = 0; + + virtual void STDMETHODCALLTYPE DSSetShaderResources( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews) = 0; + + virtual void STDMETHODCALLTYPE DSSetShader( + /* [annotation] */ + _In_opt_ ID3D11DomainShader *pDomainShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances) = 0; + + virtual void STDMETHODCALLTYPE DSSetSamplers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers) = 0; + + virtual void STDMETHODCALLTYPE DSSetConstantBuffers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers) = 0; + + virtual void STDMETHODCALLTYPE CSSetShaderResources( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews) = 0; + + virtual void STDMETHODCALLTYPE CSSetUnorderedAccessViews( + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - StartSlot ) UINT NumUAVs, + /* [annotation] */ + _In_reads_opt_(NumUAVs) ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, + /* [annotation] */ + _In_reads_opt_(NumUAVs) const UINT *pUAVInitialCounts) = 0; + + virtual void STDMETHODCALLTYPE CSSetShader( + /* [annotation] */ + _In_opt_ ID3D11ComputeShader *pComputeShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances) = 0; + + virtual void STDMETHODCALLTYPE CSSetSamplers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers) = 0; + + virtual void STDMETHODCALLTYPE CSSetConstantBuffers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers) = 0; + + virtual void STDMETHODCALLTYPE VSGetConstantBuffers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers) = 0; + + virtual void STDMETHODCALLTYPE PSGetShaderResources( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews) = 0; + + virtual void STDMETHODCALLTYPE PSGetShader( + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11PixelShader **ppPixelShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances) = 0; + + virtual void STDMETHODCALLTYPE PSGetSamplers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers) = 0; + + virtual void STDMETHODCALLTYPE VSGetShader( + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11VertexShader **ppVertexShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances) = 0; + + virtual void STDMETHODCALLTYPE PSGetConstantBuffers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers) = 0; + + virtual void STDMETHODCALLTYPE IAGetInputLayout( + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11InputLayout **ppInputLayout) = 0; + + virtual void STDMETHODCALLTYPE IAGetVertexBuffers( + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppVertexBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pStrides, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pOffsets) = 0; + + virtual void STDMETHODCALLTYPE IAGetIndexBuffer( + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11Buffer **pIndexBuffer, + /* [annotation] */ + _Out_opt_ DXGI_FORMAT *Format, + /* [annotation] */ + _Out_opt_ UINT *Offset) = 0; + + virtual void STDMETHODCALLTYPE GSGetConstantBuffers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers) = 0; + + virtual void STDMETHODCALLTYPE GSGetShader( + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11GeometryShader **ppGeometryShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances) = 0; + + virtual void STDMETHODCALLTYPE IAGetPrimitiveTopology( + /* [annotation] */ + _Out_ D3D11_PRIMITIVE_TOPOLOGY *pTopology) = 0; + + virtual void STDMETHODCALLTYPE VSGetShaderResources( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews) = 0; + + virtual void STDMETHODCALLTYPE VSGetSamplers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers) = 0; + + virtual void STDMETHODCALLTYPE GetPredication( + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11Predicate **ppPredicate, + /* [annotation] */ + _Out_opt_ BOOL *pPredicateValue) = 0; + + virtual void STDMETHODCALLTYPE GSGetShaderResources( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews) = 0; + + virtual void STDMETHODCALLTYPE GSGetSamplers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers) = 0; + + virtual void STDMETHODCALLTYPE OMGetRenderTargets( + /* [annotation] */ + _In_range_( 0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11RenderTargetView **ppRenderTargetViews, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11DepthStencilView **ppDepthStencilView) = 0; + + virtual void STDMETHODCALLTYPE OMGetRenderTargetsAndUnorderedAccessViews( + /* [annotation] */ + _In_range_( 0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumRTVs, + /* [annotation] */ + _Out_writes_opt_(NumRTVs) ID3D11RenderTargetView **ppRenderTargetViews, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11DepthStencilView **ppDepthStencilView, + /* [annotation] */ + _In_range_( 0, D3D11_PS_CS_UAV_REGISTER_COUNT - 1 ) UINT UAVStartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_PS_CS_UAV_REGISTER_COUNT - UAVStartSlot ) UINT NumUAVs, + /* [annotation] */ + _Out_writes_opt_(NumUAVs) ID3D11UnorderedAccessView **ppUnorderedAccessViews) = 0; + + virtual void STDMETHODCALLTYPE OMGetBlendState( + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11BlendState **ppBlendState, + /* [annotation] */ + _Out_opt_ FLOAT BlendFactor[ 4 ], + /* [annotation] */ + _Out_opt_ UINT *pSampleMask) = 0; + + virtual void STDMETHODCALLTYPE OMGetDepthStencilState( + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11DepthStencilState **ppDepthStencilState, + /* [annotation] */ + _Out_opt_ UINT *pStencilRef) = 0; + + virtual void STDMETHODCALLTYPE SOGetTargets( + /* [annotation] */ + _In_range_( 0, D3D11_SO_BUFFER_SLOT_COUNT ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppSOTargets) = 0; + + virtual void STDMETHODCALLTYPE RSGetState( + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11RasterizerState **ppRasterizerState) = 0; + + virtual void STDMETHODCALLTYPE RSGetViewports( + /* [annotation] */ + _Inout_ /*_range(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE )*/ UINT *pNumViewports, + /* [annotation] */ + _Out_writes_opt_(*pNumViewports) D3D11_VIEWPORT *pViewports) = 0; + + virtual void STDMETHODCALLTYPE RSGetScissorRects( + /* [annotation] */ + _Inout_ /*_range(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE )*/ UINT *pNumRects, + /* [annotation] */ + _Out_writes_opt_(*pNumRects) D3D11_RECT *pRects) = 0; + + virtual void STDMETHODCALLTYPE HSGetShaderResources( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews) = 0; + + virtual void STDMETHODCALLTYPE HSGetShader( + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11HullShader **ppHullShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances) = 0; + + virtual void STDMETHODCALLTYPE HSGetSamplers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers) = 0; + + virtual void STDMETHODCALLTYPE HSGetConstantBuffers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers) = 0; + + virtual void STDMETHODCALLTYPE DSGetShaderResources( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews) = 0; + + virtual void STDMETHODCALLTYPE DSGetShader( + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11DomainShader **ppDomainShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances) = 0; + + virtual void STDMETHODCALLTYPE DSGetSamplers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers) = 0; + + virtual void STDMETHODCALLTYPE DSGetConstantBuffers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers) = 0; + + virtual void STDMETHODCALLTYPE CSGetShaderResources( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews) = 0; + + virtual void STDMETHODCALLTYPE CSGetUnorderedAccessViews( + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - StartSlot ) UINT NumUAVs, + /* [annotation] */ + _Out_writes_opt_(NumUAVs) ID3D11UnorderedAccessView **ppUnorderedAccessViews) = 0; + + virtual void STDMETHODCALLTYPE CSGetShader( + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11ComputeShader **ppComputeShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances) = 0; + + virtual void STDMETHODCALLTYPE CSGetSamplers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers) = 0; + + virtual void STDMETHODCALLTYPE CSGetConstantBuffers( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers) = 0; + + virtual void STDMETHODCALLTYPE ClearState( void) = 0; + + virtual void STDMETHODCALLTYPE Flush( void) = 0; + + virtual D3D11_DEVICE_CONTEXT_TYPE STDMETHODCALLTYPE GetType( void) = 0; + + virtual UINT STDMETHODCALLTYPE GetContextFlags( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE FinishCommandList( + BOOL RestoreDeferredContextState, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11CommandList **ppCommandList) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11DeviceContextVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11DeviceContext * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11DeviceContext * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11DeviceContext * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11DeviceContext * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *VSSetConstantBuffers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *PSSetShaderResources )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *PSSetShader )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_opt_ ID3D11PixelShader *pPixelShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *PSSetSamplers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *VSSetShader )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_opt_ ID3D11VertexShader *pVertexShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *DrawIndexed )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ UINT IndexCount, + /* [annotation] */ + _In_ UINT StartIndexLocation, + /* [annotation] */ + _In_ INT BaseVertexLocation); + + void ( STDMETHODCALLTYPE *Draw )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ UINT VertexCount, + /* [annotation] */ + _In_ UINT StartVertexLocation); + + HRESULT ( STDMETHODCALLTYPE *Map )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_ UINT Subresource, + /* [annotation] */ + _In_ D3D11_MAP MapType, + /* [annotation] */ + _In_ UINT MapFlags, + /* [annotation] */ + _Out_opt_ D3D11_MAPPED_SUBRESOURCE *pMappedResource); + + void ( STDMETHODCALLTYPE *Unmap )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_ UINT Subresource); + + void ( STDMETHODCALLTYPE *PSSetConstantBuffers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *IASetInputLayout )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_opt_ ID3D11InputLayout *pInputLayout); + + void ( STDMETHODCALLTYPE *IASetVertexBuffers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppVertexBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pStrides, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pOffsets); + + void ( STDMETHODCALLTYPE *IASetIndexBuffer )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_opt_ ID3D11Buffer *pIndexBuffer, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT Offset); + + void ( STDMETHODCALLTYPE *DrawIndexedInstanced )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ UINT IndexCountPerInstance, + /* [annotation] */ + _In_ UINT InstanceCount, + /* [annotation] */ + _In_ UINT StartIndexLocation, + /* [annotation] */ + _In_ INT BaseVertexLocation, + /* [annotation] */ + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *DrawInstanced )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ UINT VertexCountPerInstance, + /* [annotation] */ + _In_ UINT InstanceCount, + /* [annotation] */ + _In_ UINT StartVertexLocation, + /* [annotation] */ + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *GSSetConstantBuffers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *GSSetShader )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_opt_ ID3D11GeometryShader *pShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *IASetPrimitiveTopology )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ D3D11_PRIMITIVE_TOPOLOGY Topology); + + void ( STDMETHODCALLTYPE *VSSetShaderResources )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *VSSetSamplers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *Begin )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ ID3D11Asynchronous *pAsync); + + void ( STDMETHODCALLTYPE *End )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ ID3D11Asynchronous *pAsync); + + HRESULT ( STDMETHODCALLTYPE *GetData )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ ID3D11Asynchronous *pAsync, + /* [annotation] */ + _Out_writes_bytes_opt_( DataSize ) void *pData, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_ UINT GetDataFlags); + + void ( STDMETHODCALLTYPE *SetPredication )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_opt_ ID3D11Predicate *pPredicate, + /* [annotation] */ + _In_ BOOL PredicateValue); + + void ( STDMETHODCALLTYPE *GSSetShaderResources )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *GSSetSamplers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *OMSetRenderTargets )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11RenderTargetView *const *ppRenderTargetViews, + /* [annotation] */ + _In_opt_ ID3D11DepthStencilView *pDepthStencilView); + + void ( STDMETHODCALLTYPE *OMSetRenderTargetsAndUnorderedAccessViews )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ UINT NumRTVs, + /* [annotation] */ + _In_reads_opt_(NumRTVs) ID3D11RenderTargetView *const *ppRenderTargetViews, + /* [annotation] */ + _In_opt_ ID3D11DepthStencilView *pDepthStencilView, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - 1 ) UINT UAVStartSlot, + /* [annotation] */ + _In_ UINT NumUAVs, + /* [annotation] */ + _In_reads_opt_(NumUAVs) ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, + /* [annotation] */ + _In_reads_opt_(NumUAVs) const UINT *pUAVInitialCounts); + + void ( STDMETHODCALLTYPE *OMSetBlendState )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_opt_ ID3D11BlendState *pBlendState, + /* [annotation] */ + _In_opt_ const FLOAT BlendFactor[ 4 ], + /* [annotation] */ + _In_ UINT SampleMask); + + void ( STDMETHODCALLTYPE *OMSetDepthStencilState )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_opt_ ID3D11DepthStencilState *pDepthStencilState, + /* [annotation] */ + _In_ UINT StencilRef); + + void ( STDMETHODCALLTYPE *SOSetTargets )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_SO_BUFFER_SLOT_COUNT) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppSOTargets, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pOffsets); + + void ( STDMETHODCALLTYPE *DrawAuto )( + ID3D11DeviceContext * This); + + void ( STDMETHODCALLTYPE *DrawIndexedInstancedIndirect )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ ID3D11Buffer *pBufferForArgs, + /* [annotation] */ + _In_ UINT AlignedByteOffsetForArgs); + + void ( STDMETHODCALLTYPE *DrawInstancedIndirect )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ ID3D11Buffer *pBufferForArgs, + /* [annotation] */ + _In_ UINT AlignedByteOffsetForArgs); + + void ( STDMETHODCALLTYPE *Dispatch )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ UINT ThreadGroupCountX, + /* [annotation] */ + _In_ UINT ThreadGroupCountY, + /* [annotation] */ + _In_ UINT ThreadGroupCountZ); + + void ( STDMETHODCALLTYPE *DispatchIndirect )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ ID3D11Buffer *pBufferForArgs, + /* [annotation] */ + _In_ UINT AlignedByteOffsetForArgs); + + void ( STDMETHODCALLTYPE *RSSetState )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_opt_ ID3D11RasterizerState *pRasterizerState); + + void ( STDMETHODCALLTYPE *RSSetViewports )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumViewports, + /* [annotation] */ + _In_reads_opt_(NumViewports) const D3D11_VIEWPORT *pViewports); + + void ( STDMETHODCALLTYPE *RSSetScissorRects )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumRects, + /* [annotation] */ + _In_reads_opt_(NumRects) const D3D11_RECT *pRects); + + void ( STDMETHODCALLTYPE *CopySubresourceRegion )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ UINT DstX, + /* [annotation] */ + _In_ UINT DstY, + /* [annotation] */ + _In_ UINT DstZ, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pSrcBox); + + void ( STDMETHODCALLTYPE *CopyResource )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource); + + void ( STDMETHODCALLTYPE *UpdateSubresource )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pDstBox, + /* [annotation] */ + _In_ const void *pSrcData, + /* [annotation] */ + _In_ UINT SrcRowPitch, + /* [annotation] */ + _In_ UINT SrcDepthPitch); + + void ( STDMETHODCALLTYPE *CopyStructureCount )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ ID3D11Buffer *pDstBuffer, + /* [annotation] */ + _In_ UINT DstAlignedByteOffset, + /* [annotation] */ + _In_ ID3D11UnorderedAccessView *pSrcView); + + void ( STDMETHODCALLTYPE *ClearRenderTargetView )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ ID3D11RenderTargetView *pRenderTargetView, + /* [annotation] */ + _In_ const FLOAT ColorRGBA[ 4 ]); + + void ( STDMETHODCALLTYPE *ClearUnorderedAccessViewUint )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ ID3D11UnorderedAccessView *pUnorderedAccessView, + /* [annotation] */ + _In_ const UINT Values[ 4 ]); + + void ( STDMETHODCALLTYPE *ClearUnorderedAccessViewFloat )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ ID3D11UnorderedAccessView *pUnorderedAccessView, + /* [annotation] */ + _In_ const FLOAT Values[ 4 ]); + + void ( STDMETHODCALLTYPE *ClearDepthStencilView )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ ID3D11DepthStencilView *pDepthStencilView, + /* [annotation] */ + _In_ UINT ClearFlags, + /* [annotation] */ + _In_ FLOAT Depth, + /* [annotation] */ + _In_ UINT8 Stencil); + + void ( STDMETHODCALLTYPE *GenerateMips )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ ID3D11ShaderResourceView *pShaderResourceView); + + void ( STDMETHODCALLTYPE *SetResourceMinLOD )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + FLOAT MinLOD); + + FLOAT ( STDMETHODCALLTYPE *GetResourceMinLOD )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource); + + void ( STDMETHODCALLTYPE *ResolveSubresource )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_ DXGI_FORMAT Format); + + void ( STDMETHODCALLTYPE *ExecuteCommandList )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_ ID3D11CommandList *pCommandList, + BOOL RestoreContextState); + + void ( STDMETHODCALLTYPE *HSSetShaderResources )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *HSSetShader )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_opt_ ID3D11HullShader *pHullShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *HSSetSamplers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *HSSetConstantBuffers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *DSSetShaderResources )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *DSSetShader )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_opt_ ID3D11DomainShader *pDomainShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *DSSetSamplers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *DSSetConstantBuffers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *CSSetShaderResources )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *CSSetUnorderedAccessViews )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - StartSlot ) UINT NumUAVs, + /* [annotation] */ + _In_reads_opt_(NumUAVs) ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, + /* [annotation] */ + _In_reads_opt_(NumUAVs) const UINT *pUAVInitialCounts); + + void ( STDMETHODCALLTYPE *CSSetShader )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_opt_ ID3D11ComputeShader *pComputeShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *CSSetSamplers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *CSSetConstantBuffers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *VSGetConstantBuffers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *PSGetShaderResources )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *PSGetShader )( + ID3D11DeviceContext * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11PixelShader **ppPixelShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *PSGetSamplers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *VSGetShader )( + ID3D11DeviceContext * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11VertexShader **ppVertexShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *PSGetConstantBuffers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *IAGetInputLayout )( + ID3D11DeviceContext * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11InputLayout **ppInputLayout); + + void ( STDMETHODCALLTYPE *IAGetVertexBuffers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppVertexBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pStrides, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pOffsets); + + void ( STDMETHODCALLTYPE *IAGetIndexBuffer )( + ID3D11DeviceContext * This, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11Buffer **pIndexBuffer, + /* [annotation] */ + _Out_opt_ DXGI_FORMAT *Format, + /* [annotation] */ + _Out_opt_ UINT *Offset); + + void ( STDMETHODCALLTYPE *GSGetConstantBuffers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *GSGetShader )( + ID3D11DeviceContext * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11GeometryShader **ppGeometryShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *IAGetPrimitiveTopology )( + ID3D11DeviceContext * This, + /* [annotation] */ + _Out_ D3D11_PRIMITIVE_TOPOLOGY *pTopology); + + void ( STDMETHODCALLTYPE *VSGetShaderResources )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *VSGetSamplers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *GetPredication )( + ID3D11DeviceContext * This, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11Predicate **ppPredicate, + /* [annotation] */ + _Out_opt_ BOOL *pPredicateValue); + + void ( STDMETHODCALLTYPE *GSGetShaderResources )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *GSGetSamplers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *OMGetRenderTargets )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11RenderTargetView **ppRenderTargetViews, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11DepthStencilView **ppDepthStencilView); + + void ( STDMETHODCALLTYPE *OMGetRenderTargetsAndUnorderedAccessViews )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumRTVs, + /* [annotation] */ + _Out_writes_opt_(NumRTVs) ID3D11RenderTargetView **ppRenderTargetViews, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11DepthStencilView **ppDepthStencilView, + /* [annotation] */ + _In_range_( 0, D3D11_PS_CS_UAV_REGISTER_COUNT - 1 ) UINT UAVStartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_PS_CS_UAV_REGISTER_COUNT - UAVStartSlot ) UINT NumUAVs, + /* [annotation] */ + _Out_writes_opt_(NumUAVs) ID3D11UnorderedAccessView **ppUnorderedAccessViews); + + void ( STDMETHODCALLTYPE *OMGetBlendState )( + ID3D11DeviceContext * This, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11BlendState **ppBlendState, + /* [annotation] */ + _Out_opt_ FLOAT BlendFactor[ 4 ], + /* [annotation] */ + _Out_opt_ UINT *pSampleMask); + + void ( STDMETHODCALLTYPE *OMGetDepthStencilState )( + ID3D11DeviceContext * This, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11DepthStencilState **ppDepthStencilState, + /* [annotation] */ + _Out_opt_ UINT *pStencilRef); + + void ( STDMETHODCALLTYPE *SOGetTargets )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_SO_BUFFER_SLOT_COUNT ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppSOTargets); + + void ( STDMETHODCALLTYPE *RSGetState )( + ID3D11DeviceContext * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11RasterizerState **ppRasterizerState); + + void ( STDMETHODCALLTYPE *RSGetViewports )( + ID3D11DeviceContext * This, + /* [annotation] */ + _Inout_ /*_range(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE )*/ UINT *pNumViewports, + /* [annotation] */ + _Out_writes_opt_(*pNumViewports) D3D11_VIEWPORT *pViewports); + + void ( STDMETHODCALLTYPE *RSGetScissorRects )( + ID3D11DeviceContext * This, + /* [annotation] */ + _Inout_ /*_range(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE )*/ UINT *pNumRects, + /* [annotation] */ + _Out_writes_opt_(*pNumRects) D3D11_RECT *pRects); + + void ( STDMETHODCALLTYPE *HSGetShaderResources )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *HSGetShader )( + ID3D11DeviceContext * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11HullShader **ppHullShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *HSGetSamplers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *HSGetConstantBuffers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *DSGetShaderResources )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *DSGetShader )( + ID3D11DeviceContext * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11DomainShader **ppDomainShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *DSGetSamplers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *DSGetConstantBuffers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *CSGetShaderResources )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *CSGetUnorderedAccessViews )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - StartSlot ) UINT NumUAVs, + /* [annotation] */ + _Out_writes_opt_(NumUAVs) ID3D11UnorderedAccessView **ppUnorderedAccessViews); + + void ( STDMETHODCALLTYPE *CSGetShader )( + ID3D11DeviceContext * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11ComputeShader **ppComputeShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *CSGetSamplers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *CSGetConstantBuffers )( + ID3D11DeviceContext * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *ClearState )( + ID3D11DeviceContext * This); + + void ( STDMETHODCALLTYPE *Flush )( + ID3D11DeviceContext * This); + + D3D11_DEVICE_CONTEXT_TYPE ( STDMETHODCALLTYPE *GetType )( + ID3D11DeviceContext * This); + + UINT ( STDMETHODCALLTYPE *GetContextFlags )( + ID3D11DeviceContext * This); + + HRESULT ( STDMETHODCALLTYPE *FinishCommandList )( + ID3D11DeviceContext * This, + BOOL RestoreDeferredContextState, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11CommandList **ppCommandList); + + END_INTERFACE + } ID3D11DeviceContextVtbl; + + interface ID3D11DeviceContext + { + CONST_VTBL struct ID3D11DeviceContextVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11DeviceContext_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11DeviceContext_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11DeviceContext_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11DeviceContext_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11DeviceContext_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11DeviceContext_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11DeviceContext_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11DeviceContext_VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext_PSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> PSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext_PSSetShader(This,pPixelShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> PSSetShader(This,pPixelShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext_PSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> PSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext_VSSetShader(This,pVertexShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> VSSetShader(This,pVertexShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext_DrawIndexed(This,IndexCount,StartIndexLocation,BaseVertexLocation) \ + ( (This)->lpVtbl -> DrawIndexed(This,IndexCount,StartIndexLocation,BaseVertexLocation) ) + +#define ID3D11DeviceContext_Draw(This,VertexCount,StartVertexLocation) \ + ( (This)->lpVtbl -> Draw(This,VertexCount,StartVertexLocation) ) + +#define ID3D11DeviceContext_Map(This,pResource,Subresource,MapType,MapFlags,pMappedResource) \ + ( (This)->lpVtbl -> Map(This,pResource,Subresource,MapType,MapFlags,pMappedResource) ) + +#define ID3D11DeviceContext_Unmap(This,pResource,Subresource) \ + ( (This)->lpVtbl -> Unmap(This,pResource,Subresource) ) + +#define ID3D11DeviceContext_PSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> PSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext_IASetInputLayout(This,pInputLayout) \ + ( (This)->lpVtbl -> IASetInputLayout(This,pInputLayout) ) + +#define ID3D11DeviceContext_IASetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) \ + ( (This)->lpVtbl -> IASetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) ) + +#define ID3D11DeviceContext_IASetIndexBuffer(This,pIndexBuffer,Format,Offset) \ + ( (This)->lpVtbl -> IASetIndexBuffer(This,pIndexBuffer,Format,Offset) ) + +#define ID3D11DeviceContext_DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) ) + +#define ID3D11DeviceContext_DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) ) + +#define ID3D11DeviceContext_GSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> GSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext_GSSetShader(This,pShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> GSSetShader(This,pShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext_IASetPrimitiveTopology(This,Topology) \ + ( (This)->lpVtbl -> IASetPrimitiveTopology(This,Topology) ) + +#define ID3D11DeviceContext_VSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> VSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext_VSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> VSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext_Begin(This,pAsync) \ + ( (This)->lpVtbl -> Begin(This,pAsync) ) + +#define ID3D11DeviceContext_End(This,pAsync) \ + ( (This)->lpVtbl -> End(This,pAsync) ) + +#define ID3D11DeviceContext_GetData(This,pAsync,pData,DataSize,GetDataFlags) \ + ( (This)->lpVtbl -> GetData(This,pAsync,pData,DataSize,GetDataFlags) ) + +#define ID3D11DeviceContext_SetPredication(This,pPredicate,PredicateValue) \ + ( (This)->lpVtbl -> SetPredication(This,pPredicate,PredicateValue) ) + +#define ID3D11DeviceContext_GSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> GSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext_GSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> GSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext_OMSetRenderTargets(This,NumViews,ppRenderTargetViews,pDepthStencilView) \ + ( (This)->lpVtbl -> OMSetRenderTargets(This,NumViews,ppRenderTargetViews,pDepthStencilView) ) + +#define ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,pDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) \ + ( (This)->lpVtbl -> OMSetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,pDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) ) + +#define ID3D11DeviceContext_OMSetBlendState(This,pBlendState,BlendFactor,SampleMask) \ + ( (This)->lpVtbl -> OMSetBlendState(This,pBlendState,BlendFactor,SampleMask) ) + +#define ID3D11DeviceContext_OMSetDepthStencilState(This,pDepthStencilState,StencilRef) \ + ( (This)->lpVtbl -> OMSetDepthStencilState(This,pDepthStencilState,StencilRef) ) + +#define ID3D11DeviceContext_SOSetTargets(This,NumBuffers,ppSOTargets,pOffsets) \ + ( (This)->lpVtbl -> SOSetTargets(This,NumBuffers,ppSOTargets,pOffsets) ) + +#define ID3D11DeviceContext_DrawAuto(This) \ + ( (This)->lpVtbl -> DrawAuto(This) ) + +#define ID3D11DeviceContext_DrawIndexedInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) \ + ( (This)->lpVtbl -> DrawIndexedInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) ) + +#define ID3D11DeviceContext_DrawInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) \ + ( (This)->lpVtbl -> DrawInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) ) + +#define ID3D11DeviceContext_Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) \ + ( (This)->lpVtbl -> Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) ) + +#define ID3D11DeviceContext_DispatchIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) \ + ( (This)->lpVtbl -> DispatchIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) ) + +#define ID3D11DeviceContext_RSSetState(This,pRasterizerState) \ + ( (This)->lpVtbl -> RSSetState(This,pRasterizerState) ) + +#define ID3D11DeviceContext_RSSetViewports(This,NumViewports,pViewports) \ + ( (This)->lpVtbl -> RSSetViewports(This,NumViewports,pViewports) ) + +#define ID3D11DeviceContext_RSSetScissorRects(This,NumRects,pRects) \ + ( (This)->lpVtbl -> RSSetScissorRects(This,NumRects,pRects) ) + +#define ID3D11DeviceContext_CopySubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox) \ + ( (This)->lpVtbl -> CopySubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox) ) + +#define ID3D11DeviceContext_CopyResource(This,pDstResource,pSrcResource) \ + ( (This)->lpVtbl -> CopyResource(This,pDstResource,pSrcResource) ) + +#define ID3D11DeviceContext_UpdateSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) \ + ( (This)->lpVtbl -> UpdateSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) ) + +#define ID3D11DeviceContext_CopyStructureCount(This,pDstBuffer,DstAlignedByteOffset,pSrcView) \ + ( (This)->lpVtbl -> CopyStructureCount(This,pDstBuffer,DstAlignedByteOffset,pSrcView) ) + +#define ID3D11DeviceContext_ClearRenderTargetView(This,pRenderTargetView,ColorRGBA) \ + ( (This)->lpVtbl -> ClearRenderTargetView(This,pRenderTargetView,ColorRGBA) ) + +#define ID3D11DeviceContext_ClearUnorderedAccessViewUint(This,pUnorderedAccessView,Values) \ + ( (This)->lpVtbl -> ClearUnorderedAccessViewUint(This,pUnorderedAccessView,Values) ) + +#define ID3D11DeviceContext_ClearUnorderedAccessViewFloat(This,pUnorderedAccessView,Values) \ + ( (This)->lpVtbl -> ClearUnorderedAccessViewFloat(This,pUnorderedAccessView,Values) ) + +#define ID3D11DeviceContext_ClearDepthStencilView(This,pDepthStencilView,ClearFlags,Depth,Stencil) \ + ( (This)->lpVtbl -> ClearDepthStencilView(This,pDepthStencilView,ClearFlags,Depth,Stencil) ) + +#define ID3D11DeviceContext_GenerateMips(This,pShaderResourceView) \ + ( (This)->lpVtbl -> GenerateMips(This,pShaderResourceView) ) + +#define ID3D11DeviceContext_SetResourceMinLOD(This,pResource,MinLOD) \ + ( (This)->lpVtbl -> SetResourceMinLOD(This,pResource,MinLOD) ) + +#define ID3D11DeviceContext_GetResourceMinLOD(This,pResource) \ + ( (This)->lpVtbl -> GetResourceMinLOD(This,pResource) ) + +#define ID3D11DeviceContext_ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) \ + ( (This)->lpVtbl -> ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) ) + +#define ID3D11DeviceContext_ExecuteCommandList(This,pCommandList,RestoreContextState) \ + ( (This)->lpVtbl -> ExecuteCommandList(This,pCommandList,RestoreContextState) ) + +#define ID3D11DeviceContext_HSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> HSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext_HSSetShader(This,pHullShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> HSSetShader(This,pHullShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext_HSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> HSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext_HSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> HSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext_DSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> DSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext_DSSetShader(This,pDomainShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> DSSetShader(This,pDomainShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext_DSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> DSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext_DSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> DSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext_CSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> CSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext_CSSetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) \ + ( (This)->lpVtbl -> CSSetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) ) + +#define ID3D11DeviceContext_CSSetShader(This,pComputeShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> CSSetShader(This,pComputeShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext_CSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> CSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext_CSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> CSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext_VSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> VSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext_PSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> PSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext_PSGetShader(This,ppPixelShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> PSGetShader(This,ppPixelShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext_PSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> PSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext_VSGetShader(This,ppVertexShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> VSGetShader(This,ppVertexShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext_PSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> PSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext_IAGetInputLayout(This,ppInputLayout) \ + ( (This)->lpVtbl -> IAGetInputLayout(This,ppInputLayout) ) + +#define ID3D11DeviceContext_IAGetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) \ + ( (This)->lpVtbl -> IAGetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) ) + +#define ID3D11DeviceContext_IAGetIndexBuffer(This,pIndexBuffer,Format,Offset) \ + ( (This)->lpVtbl -> IAGetIndexBuffer(This,pIndexBuffer,Format,Offset) ) + +#define ID3D11DeviceContext_GSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> GSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext_GSGetShader(This,ppGeometryShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> GSGetShader(This,ppGeometryShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext_IAGetPrimitiveTopology(This,pTopology) \ + ( (This)->lpVtbl -> IAGetPrimitiveTopology(This,pTopology) ) + +#define ID3D11DeviceContext_VSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> VSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext_VSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> VSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext_GetPredication(This,ppPredicate,pPredicateValue) \ + ( (This)->lpVtbl -> GetPredication(This,ppPredicate,pPredicateValue) ) + +#define ID3D11DeviceContext_GSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> GSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext_GSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> GSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext_OMGetRenderTargets(This,NumViews,ppRenderTargetViews,ppDepthStencilView) \ + ( (This)->lpVtbl -> OMGetRenderTargets(This,NumViews,ppRenderTargetViews,ppDepthStencilView) ) + +#define ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,ppDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews) \ + ( (This)->lpVtbl -> OMGetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,ppDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews) ) + +#define ID3D11DeviceContext_OMGetBlendState(This,ppBlendState,BlendFactor,pSampleMask) \ + ( (This)->lpVtbl -> OMGetBlendState(This,ppBlendState,BlendFactor,pSampleMask) ) + +#define ID3D11DeviceContext_OMGetDepthStencilState(This,ppDepthStencilState,pStencilRef) \ + ( (This)->lpVtbl -> OMGetDepthStencilState(This,ppDepthStencilState,pStencilRef) ) + +#define ID3D11DeviceContext_SOGetTargets(This,NumBuffers,ppSOTargets) \ + ( (This)->lpVtbl -> SOGetTargets(This,NumBuffers,ppSOTargets) ) + +#define ID3D11DeviceContext_RSGetState(This,ppRasterizerState) \ + ( (This)->lpVtbl -> RSGetState(This,ppRasterizerState) ) + +#define ID3D11DeviceContext_RSGetViewports(This,pNumViewports,pViewports) \ + ( (This)->lpVtbl -> RSGetViewports(This,pNumViewports,pViewports) ) + +#define ID3D11DeviceContext_RSGetScissorRects(This,pNumRects,pRects) \ + ( (This)->lpVtbl -> RSGetScissorRects(This,pNumRects,pRects) ) + +#define ID3D11DeviceContext_HSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> HSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext_HSGetShader(This,ppHullShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> HSGetShader(This,ppHullShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext_HSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> HSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext_HSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> HSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext_DSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> DSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext_DSGetShader(This,ppDomainShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> DSGetShader(This,ppDomainShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext_DSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> DSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext_DSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> DSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext_CSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> CSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext_CSGetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews) \ + ( (This)->lpVtbl -> CSGetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews) ) + +#define ID3D11DeviceContext_CSGetShader(This,ppComputeShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> CSGetShader(This,ppComputeShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext_CSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> CSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext_CSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> CSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext_ClearState(This) \ + ( (This)->lpVtbl -> ClearState(This) ) + +#define ID3D11DeviceContext_Flush(This) \ + ( (This)->lpVtbl -> Flush(This) ) + +#define ID3D11DeviceContext_GetType(This) \ + ( (This)->lpVtbl -> GetType(This) ) + +#define ID3D11DeviceContext_GetContextFlags(This) \ + ( (This)->lpVtbl -> GetContextFlags(This) ) + +#define ID3D11DeviceContext_FinishCommandList(This,RestoreDeferredContextState,ppCommandList) \ + ( (This)->lpVtbl -> FinishCommandList(This,RestoreDeferredContextState,ppCommandList) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11DeviceContext_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0030 */ +/* [local] */ + +#if !defined( D3D11_VIDEO_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_VIDEO_DEFAULT {}; +extern const DECLSPEC_SELECTANY CD3D11_VIDEO_DEFAULT D3D11_VIDEO_DEFAULT; +extern "C"{ +#endif + + +#if !defined(APP_DEPRECATED_HRESULT) && !defined(APP_DEPRECATED_HRESULT_TYPEDEF) +#define APP_DEPRECATED_HRESULT_TYPEDEF +typedef HRESULT APP_DEPRECATED_HRESULT; + +#endif +DEFINE_GUID(D3D11_DECODER_PROFILE_MPEG2_MOCOMP, 0xe6a9f44b, 0x61b0, 0x4563,0x9e,0xa4,0x63,0xd2,0xa3,0xc6,0xfe,0x66); +DEFINE_GUID(D3D11_DECODER_PROFILE_MPEG2_IDCT, 0xbf22ad00, 0x03ea, 0x4690,0x80,0x77,0x47,0x33,0x46,0x20,0x9b,0x7e); +DEFINE_GUID(D3D11_DECODER_PROFILE_MPEG2_VLD, 0xee27417f, 0x5e28, 0x4e65,0xbe,0xea,0x1d,0x26,0xb5,0x08,0xad,0xc9); +DEFINE_GUID(D3D11_DECODER_PROFILE_MPEG1_VLD, 0x6f3ec719, 0x3735, 0x42cc,0x80,0x63,0x65,0xcc,0x3c,0xb3,0x66,0x16); +DEFINE_GUID(D3D11_DECODER_PROFILE_MPEG2and1_VLD, 0x86695f12, 0x340e, 0x4f04,0x9f,0xd3,0x92,0x53,0xdd,0x32,0x74,0x60); +DEFINE_GUID(D3D11_DECODER_PROFILE_H264_MOCOMP_NOFGT, 0x1b81be64, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(D3D11_DECODER_PROFILE_H264_MOCOMP_FGT, 0x1b81be65, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(D3D11_DECODER_PROFILE_H264_IDCT_NOFGT, 0x1b81be66, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(D3D11_DECODER_PROFILE_H264_IDCT_FGT, 0x1b81be67, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(D3D11_DECODER_PROFILE_H264_VLD_NOFGT, 0x1b81be68, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(D3D11_DECODER_PROFILE_H264_VLD_FGT, 0x1b81be69, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(D3D11_DECODER_PROFILE_H264_VLD_WITHFMOASO_NOFGT, 0xd5f04ff9, 0x3418,0x45d8,0x95,0x61,0x32,0xa7,0x6a,0xae,0x2d,0xdd); +DEFINE_GUID(D3D11_DECODER_PROFILE_H264_VLD_STEREO_PROGRESSIVE_NOFGT, 0xd79be8da, 0x0cf1,0x4c81,0xb8,0x2a,0x69,0xa4,0xe2,0x36,0xf4,0x3d); +DEFINE_GUID(D3D11_DECODER_PROFILE_H264_VLD_STEREO_NOFGT, 0xf9aaccbb, 0xc2b6,0x4cfc,0x87,0x79,0x57,0x07,0xb1,0x76,0x05,0x52); +DEFINE_GUID(D3D11_DECODER_PROFILE_H264_VLD_MULTIVIEW_NOFGT, 0x705b9d82, 0x76cf,0x49d6,0xb7,0xe6,0xac,0x88,0x72,0xdb,0x01,0x3c); +DEFINE_GUID(D3D11_DECODER_PROFILE_WMV8_POSTPROC, 0x1b81be80, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(D3D11_DECODER_PROFILE_WMV8_MOCOMP, 0x1b81be81, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(D3D11_DECODER_PROFILE_WMV9_POSTPROC, 0x1b81be90, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(D3D11_DECODER_PROFILE_WMV9_MOCOMP, 0x1b81be91, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(D3D11_DECODER_PROFILE_WMV9_IDCT, 0x1b81be94, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(D3D11_DECODER_PROFILE_VC1_POSTPROC, 0x1b81beA0, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(D3D11_DECODER_PROFILE_VC1_MOCOMP, 0x1b81beA1, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(D3D11_DECODER_PROFILE_VC1_IDCT, 0x1b81beA2, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(D3D11_DECODER_PROFILE_VC1_VLD, 0x1b81beA3, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(D3D11_DECODER_PROFILE_VC1_D2010, 0x1b81beA4, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(D3D11_DECODER_PROFILE_MPEG4PT2_VLD_SIMPLE, 0xefd64d74, 0xc9e8,0x41d7,0xa5,0xe9,0xe9,0xb0,0xe3,0x9f,0xa3,0x19); +DEFINE_GUID(D3D11_DECODER_PROFILE_MPEG4PT2_VLD_ADVSIMPLE_NOGMC, 0xed418a9f, 0x010d,0x4eda,0x9a,0xe3,0x9a,0x65,0x35,0x8d,0x8d,0x2e); +DEFINE_GUID(D3D11_DECODER_PROFILE_MPEG4PT2_VLD_ADVSIMPLE_GMC, 0xab998b5b, 0x4258,0x44a9,0x9f,0xeb,0x94,0xe5,0x97,0xa6,0xba,0xae); +DEFINE_GUID(D3D11_DECODER_PROFILE_HEVC_VLD_MAIN, 0x5b11d51b, 0x2f4c,0x4452,0xbc,0xc3,0x09,0xf2,0xa1,0x16,0x0c,0xc0); +DEFINE_GUID(D3D11_DECODER_PROFILE_HEVC_VLD_MAIN10, 0x107af0e0, 0xef1a,0x4d19,0xab,0xa8,0x67,0xa1,0x63,0x07,0x3d,0x13); +DEFINE_GUID(D3D11_DECODER_PROFILE_VP9_VLD_PROFILE0, 0x463707f8, 0xa1d0, 0x4585, 0x87, 0x6d, 0x83, 0xaa, 0x6d, 0x60, 0xb8, 0x9e); +DEFINE_GUID(D3D11_DECODER_PROFILE_VP9_VLD_10BIT_PROFILE2, 0xa4c749ef, 0x6ecf, 0x48aa, 0x84, 0x48, 0x50, 0xa7, 0xa1, 0x16, 0x5f, 0xf7); +DEFINE_GUID(D3D11_DECODER_PROFILE_VP8_VLD, 0x90b899ea, 0x3a62, 0x4705, 0x88, 0xb3, 0x8d, 0xf0, 0x4b, 0x27, 0x44, 0xe7); +typedef struct D3D11_VIDEO_DECODER_DESC + { + GUID Guid; + UINT SampleWidth; + UINT SampleHeight; + DXGI_FORMAT OutputFormat; + } D3D11_VIDEO_DECODER_DESC; + +typedef struct D3D11_VIDEO_DECODER_CONFIG + { + GUID guidConfigBitstreamEncryption; + GUID guidConfigMBcontrolEncryption; + GUID guidConfigResidDiffEncryption; + UINT ConfigBitstreamRaw; + UINT ConfigMBcontrolRasterOrder; + UINT ConfigResidDiffHost; + UINT ConfigSpatialResid8; + UINT ConfigResid8Subtraction; + UINT ConfigSpatialHost8or9Clipping; + UINT ConfigSpatialResidInterleaved; + UINT ConfigIntraResidUnsigned; + UINT ConfigResidDiffAccelerator; + UINT ConfigHostInverseScan; + UINT ConfigSpecificIDCT; + UINT Config4GroupedCoefs; + USHORT ConfigMinRenderTargetBuffCount; + USHORT ConfigDecoderSpecific; + } D3D11_VIDEO_DECODER_CONFIG; + +typedef +enum D3D11_VIDEO_DECODER_BUFFER_TYPE + { + D3D11_VIDEO_DECODER_BUFFER_PICTURE_PARAMETERS = 0, + D3D11_VIDEO_DECODER_BUFFER_MACROBLOCK_CONTROL = 1, + D3D11_VIDEO_DECODER_BUFFER_RESIDUAL_DIFFERENCE = 2, + D3D11_VIDEO_DECODER_BUFFER_DEBLOCKING_CONTROL = 3, + D3D11_VIDEO_DECODER_BUFFER_INVERSE_QUANTIZATION_MATRIX = 4, + D3D11_VIDEO_DECODER_BUFFER_SLICE_CONTROL = 5, + D3D11_VIDEO_DECODER_BUFFER_BITSTREAM = 6, + D3D11_VIDEO_DECODER_BUFFER_MOTION_VECTOR = 7, + D3D11_VIDEO_DECODER_BUFFER_FILM_GRAIN = 8 + } D3D11_VIDEO_DECODER_BUFFER_TYPE; + +typedef struct _D3D11_AES_CTR_IV + { + UINT64 IV; + UINT64 Count; + } D3D11_AES_CTR_IV; + +typedef struct D3D11_ENCRYPTED_BLOCK_INFO + { + UINT NumEncryptedBytesAtBeginning; + UINT NumBytesInSkipPattern; + UINT NumBytesInEncryptPattern; + } D3D11_ENCRYPTED_BLOCK_INFO; + +typedef struct D3D11_VIDEO_DECODER_BUFFER_DESC + { + D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType; + UINT BufferIndex; + UINT DataOffset; + UINT DataSize; + UINT FirstMBaddress; + UINT NumMBsInBuffer; + UINT Width; + UINT Height; + UINT Stride; + UINT ReservedBits; + /* [annotation] */ + _Field_size_opt_(IVSize) void *pIV; + UINT IVSize; + BOOL PartialEncryption; + D3D11_ENCRYPTED_BLOCK_INFO EncryptedBlockInfo; + } D3D11_VIDEO_DECODER_BUFFER_DESC; + +typedef struct D3D11_VIDEO_DECODER_EXTENSION + { + UINT Function; + /* [annotation] */ + _Field_size_(PrivateInputDataSize) void *pPrivateInputData; + UINT PrivateInputDataSize; + /* [annotation] */ + _Field_size_(PrivateOutputDataSize) void *pPrivateOutputData; + UINT PrivateOutputDataSize; + UINT ResourceCount; + /* [annotation] */ + _Field_size_opt_(ResourceCount) ID3D11Resource **ppResourceList; + } D3D11_VIDEO_DECODER_EXTENSION; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0030_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0030_v0_0_s_ifspec; + +#ifndef __ID3D11VideoDecoder_INTERFACE_DEFINED__ +#define __ID3D11VideoDecoder_INTERFACE_DEFINED__ + +/* interface ID3D11VideoDecoder */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11VideoDecoder; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3C9C5B51-995D-48d1-9B8D-FA5CAEDED65C") + ID3D11VideoDecoder : public ID3D11DeviceChild + { + public: + virtual HRESULT STDMETHODCALLTYPE GetCreationParameters( + /* [annotation] */ + _Out_ D3D11_VIDEO_DECODER_DESC *pVideoDesc, + /* [annotation] */ + _Out_ D3D11_VIDEO_DECODER_CONFIG *pConfig) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDriverHandle( + /* [annotation] */ + _Out_ HANDLE *pDriverHandle) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11VideoDecoderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11VideoDecoder * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11VideoDecoder * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11VideoDecoder * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11VideoDecoder * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11VideoDecoder * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11VideoDecoder * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11VideoDecoder * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *GetCreationParameters )( + ID3D11VideoDecoder * This, + /* [annotation] */ + _Out_ D3D11_VIDEO_DECODER_DESC *pVideoDesc, + /* [annotation] */ + _Out_ D3D11_VIDEO_DECODER_CONFIG *pConfig); + + HRESULT ( STDMETHODCALLTYPE *GetDriverHandle )( + ID3D11VideoDecoder * This, + /* [annotation] */ + _Out_ HANDLE *pDriverHandle); + + END_INTERFACE + } ID3D11VideoDecoderVtbl; + + interface ID3D11VideoDecoder + { + CONST_VTBL struct ID3D11VideoDecoderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11VideoDecoder_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11VideoDecoder_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11VideoDecoder_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11VideoDecoder_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11VideoDecoder_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11VideoDecoder_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11VideoDecoder_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11VideoDecoder_GetCreationParameters(This,pVideoDesc,pConfig) \ + ( (This)->lpVtbl -> GetCreationParameters(This,pVideoDesc,pConfig) ) + +#define ID3D11VideoDecoder_GetDriverHandle(This,pDriverHandle) \ + ( (This)->lpVtbl -> GetDriverHandle(This,pDriverHandle) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11VideoDecoder_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0031 */ +/* [local] */ + +typedef +enum D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT + { + D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_INPUT = 0x1, + D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_OUTPUT = 0x2 + } D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT; + +typedef +enum D3D11_VIDEO_PROCESSOR_DEVICE_CAPS + { + D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_LINEAR_SPACE = 0x1, + D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_xvYCC = 0x2, + D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_RGB_RANGE_CONVERSION = 0x4, + D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_YCbCr_MATRIX_CONVERSION = 0x8, + D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_NOMINAL_RANGE = 0x10 + } D3D11_VIDEO_PROCESSOR_DEVICE_CAPS; + +typedef +enum D3D11_VIDEO_PROCESSOR_FEATURE_CAPS + { + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_FILL = 0x1, + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_CONSTRICTION = 0x2, + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_LUMA_KEY = 0x4, + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_PALETTE = 0x8, + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_LEGACY = 0x10, + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_STEREO = 0x20, + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ROTATION = 0x40, + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_STREAM = 0x80, + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_PIXEL_ASPECT_RATIO = 0x100, + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_MIRROR = 0x200, + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_SHADER_USAGE = 0x400, + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_METADATA_HDR10 = 0x800 + } D3D11_VIDEO_PROCESSOR_FEATURE_CAPS; + +typedef +enum D3D11_VIDEO_PROCESSOR_FILTER_CAPS + { + D3D11_VIDEO_PROCESSOR_FILTER_CAPS_BRIGHTNESS = 0x1, + D3D11_VIDEO_PROCESSOR_FILTER_CAPS_CONTRAST = 0x2, + D3D11_VIDEO_PROCESSOR_FILTER_CAPS_HUE = 0x4, + D3D11_VIDEO_PROCESSOR_FILTER_CAPS_SATURATION = 0x8, + D3D11_VIDEO_PROCESSOR_FILTER_CAPS_NOISE_REDUCTION = 0x10, + D3D11_VIDEO_PROCESSOR_FILTER_CAPS_EDGE_ENHANCEMENT = 0x20, + D3D11_VIDEO_PROCESSOR_FILTER_CAPS_ANAMORPHIC_SCALING = 0x40, + D3D11_VIDEO_PROCESSOR_FILTER_CAPS_STEREO_ADJUSTMENT = 0x80 + } D3D11_VIDEO_PROCESSOR_FILTER_CAPS; + +typedef +enum D3D11_VIDEO_PROCESSOR_FORMAT_CAPS + { + D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_RGB_INTERLACED = 0x1, + D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_RGB_PROCAMP = 0x2, + D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_RGB_LUMA_KEY = 0x4, + D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_PALETTE_INTERLACED = 0x8 + } D3D11_VIDEO_PROCESSOR_FORMAT_CAPS; + +typedef +enum D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS + { + D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_DENOISE = 0x1, + D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_DERINGING = 0x2, + D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_EDGE_ENHANCEMENT = 0x4, + D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_COLOR_CORRECTION = 0x8, + D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_FLESH_TONE_MAPPING = 0x10, + D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_IMAGE_STABILIZATION = 0x20, + D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_SUPER_RESOLUTION = 0x40, + D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_ANAMORPHIC_SCALING = 0x80 + } D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS; + +typedef +enum D3D11_VIDEO_PROCESSOR_STEREO_CAPS + { + D3D11_VIDEO_PROCESSOR_STEREO_CAPS_MONO_OFFSET = 0x1, + D3D11_VIDEO_PROCESSOR_STEREO_CAPS_ROW_INTERLEAVED = 0x2, + D3D11_VIDEO_PROCESSOR_STEREO_CAPS_COLUMN_INTERLEAVED = 0x4, + D3D11_VIDEO_PROCESSOR_STEREO_CAPS_CHECKERBOARD = 0x8, + D3D11_VIDEO_PROCESSOR_STEREO_CAPS_FLIP_MODE = 0x10 + } D3D11_VIDEO_PROCESSOR_STEREO_CAPS; + +typedef struct D3D11_VIDEO_PROCESSOR_CAPS + { + UINT DeviceCaps; + UINT FeatureCaps; + UINT FilterCaps; + UINT InputFormatCaps; + UINT AutoStreamCaps; + UINT StereoCaps; + UINT RateConversionCapsCount; + UINT MaxInputStreams; + UINT MaxStreamStates; + } D3D11_VIDEO_PROCESSOR_CAPS; + +typedef +enum D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS + { + D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BLEND = 0x1, + D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BOB = 0x2, + D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_ADAPTIVE = 0x4, + D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_MOTION_COMPENSATION = 0x8, + D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_INVERSE_TELECINE = 0x10, + D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_FRAME_RATE_CONVERSION = 0x20 + } D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS; + +typedef +enum D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS + { + D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_32 = 0x1, + D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_22 = 0x2, + D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_2224 = 0x4, + D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_2332 = 0x8, + D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_32322 = 0x10, + D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_55 = 0x20, + D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_64 = 0x40, + D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_87 = 0x80, + D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_222222222223 = 0x100, + D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_OTHER = 0x80000000 + } D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS; + +typedef struct D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS + { + UINT PastFrames; + UINT FutureFrames; + UINT ProcessorCaps; + UINT ITelecineCaps; + UINT CustomRateCount; + } D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS; + +typedef +enum D3D11_CONTENT_PROTECTION_CAPS + { + D3D11_CONTENT_PROTECTION_CAPS_SOFTWARE = 0x1, + D3D11_CONTENT_PROTECTION_CAPS_HARDWARE = 0x2, + D3D11_CONTENT_PROTECTION_CAPS_PROTECTION_ALWAYS_ON = 0x4, + D3D11_CONTENT_PROTECTION_CAPS_PARTIAL_DECRYPTION = 0x8, + D3D11_CONTENT_PROTECTION_CAPS_CONTENT_KEY = 0x10, + D3D11_CONTENT_PROTECTION_CAPS_FRESHEN_SESSION_KEY = 0x20, + D3D11_CONTENT_PROTECTION_CAPS_ENCRYPTED_READ_BACK = 0x40, + D3D11_CONTENT_PROTECTION_CAPS_ENCRYPTED_READ_BACK_KEY = 0x80, + D3D11_CONTENT_PROTECTION_CAPS_SEQUENTIAL_CTR_IV = 0x100, + D3D11_CONTENT_PROTECTION_CAPS_ENCRYPT_SLICEDATA_ONLY = 0x200, + D3D11_CONTENT_PROTECTION_CAPS_DECRYPTION_BLT = 0x400, + D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_PROTECT_UNCOMPRESSED = 0x800, + D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_PROTECTED_MEMORY_PAGEABLE = 0x1000, + D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_TEARDOWN = 0x2000, + D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_DRM_COMMUNICATION = 0x4000 + } D3D11_CONTENT_PROTECTION_CAPS; + +DEFINE_GUID(D3D11_CRYPTO_TYPE_AES128_CTR, 0x9b6bd711, 0x4f74, 0x41c9, 0x9e, 0x7b, 0xb, 0xe2, 0xd7, 0xd9, 0x3b, 0x4f ); +DEFINE_GUID(D3D11_DECODER_ENCRYPTION_HW_CENC, 0x89d6ac4f, 0x9f2, 0x4229, 0xb2, 0xcd, 0x37, 0x74, 0xa, 0x6d, 0xfd, 0x81); +DEFINE_GUID(D3D11_KEY_EXCHANGE_HW_PROTECTION, 0xb1170d8a, 0x628d, 0x4da3, 0xad, 0x3b, 0x82, 0xdd, 0xb0, 0x8b, 0x49, 0x70); +typedef struct D3D11_VIDEO_CONTENT_PROTECTION_CAPS + { + UINT Caps; + UINT KeyExchangeTypeCount; + UINT BlockAlignmentSize; + ULONGLONG ProtectedMemorySize; + } D3D11_VIDEO_CONTENT_PROTECTION_CAPS; + +typedef struct D3D11_VIDEO_PROCESSOR_CUSTOM_RATE + { + DXGI_RATIONAL CustomRate; + UINT OutputFrames; + BOOL InputInterlaced; + UINT InputFramesOrFields; + } D3D11_VIDEO_PROCESSOR_CUSTOM_RATE; + +typedef +enum D3D11_VIDEO_PROCESSOR_FILTER + { + D3D11_VIDEO_PROCESSOR_FILTER_BRIGHTNESS = 0, + D3D11_VIDEO_PROCESSOR_FILTER_CONTRAST = 1, + D3D11_VIDEO_PROCESSOR_FILTER_HUE = 2, + D3D11_VIDEO_PROCESSOR_FILTER_SATURATION = 3, + D3D11_VIDEO_PROCESSOR_FILTER_NOISE_REDUCTION = 4, + D3D11_VIDEO_PROCESSOR_FILTER_EDGE_ENHANCEMENT = 5, + D3D11_VIDEO_PROCESSOR_FILTER_ANAMORPHIC_SCALING = 6, + D3D11_VIDEO_PROCESSOR_FILTER_STEREO_ADJUSTMENT = 7 + } D3D11_VIDEO_PROCESSOR_FILTER; + +typedef struct D3D11_VIDEO_PROCESSOR_FILTER_RANGE + { + int Minimum; + int Maximum; + int Default; + float Multiplier; + } D3D11_VIDEO_PROCESSOR_FILTER_RANGE; + +typedef +enum D3D11_VIDEO_FRAME_FORMAT + { + D3D11_VIDEO_FRAME_FORMAT_PROGRESSIVE = 0, + D3D11_VIDEO_FRAME_FORMAT_INTERLACED_TOP_FIELD_FIRST = 1, + D3D11_VIDEO_FRAME_FORMAT_INTERLACED_BOTTOM_FIELD_FIRST = 2 + } D3D11_VIDEO_FRAME_FORMAT; + +typedef +enum D3D11_VIDEO_USAGE + { + D3D11_VIDEO_USAGE_PLAYBACK_NORMAL = 0, + D3D11_VIDEO_USAGE_OPTIMAL_SPEED = 1, + D3D11_VIDEO_USAGE_OPTIMAL_QUALITY = 2 + } D3D11_VIDEO_USAGE; + +typedef struct D3D11_VIDEO_PROCESSOR_CONTENT_DESC + { + D3D11_VIDEO_FRAME_FORMAT InputFrameFormat; + DXGI_RATIONAL InputFrameRate; + UINT InputWidth; + UINT InputHeight; + DXGI_RATIONAL OutputFrameRate; + UINT OutputWidth; + UINT OutputHeight; + D3D11_VIDEO_USAGE Usage; + } D3D11_VIDEO_PROCESSOR_CONTENT_DESC; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0031_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0031_v0_0_s_ifspec; + +#ifndef __ID3D11VideoProcessorEnumerator_INTERFACE_DEFINED__ +#define __ID3D11VideoProcessorEnumerator_INTERFACE_DEFINED__ + +/* interface ID3D11VideoProcessorEnumerator */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11VideoProcessorEnumerator; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("31627037-53AB-4200-9061-05FAA9AB45F9") + ID3D11VideoProcessorEnumerator : public ID3D11DeviceChild + { + public: + virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorContentDesc( + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_CONTENT_DESC *pContentDesc) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckVideoProcessorFormat( + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _Out_ UINT *pFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorCaps( + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_CAPS *pCaps) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorRateConversionCaps( + /* [annotation] */ + _In_ UINT TypeIndex, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS *pCaps) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorCustomRate( + /* [annotation] */ + _In_ UINT TypeIndex, + /* [annotation] */ + _In_ UINT CustomRateIndex, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_CUSTOM_RATE *pRate) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorFilterRange( + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_FILTER Filter, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_FILTER_RANGE *pRange) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11VideoProcessorEnumeratorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11VideoProcessorEnumerator * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11VideoProcessorEnumerator * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11VideoProcessorEnumerator * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11VideoProcessorEnumerator * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11VideoProcessorEnumerator * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11VideoProcessorEnumerator * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11VideoProcessorEnumerator * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *GetVideoProcessorContentDesc )( + ID3D11VideoProcessorEnumerator * This, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_CONTENT_DESC *pContentDesc); + + HRESULT ( STDMETHODCALLTYPE *CheckVideoProcessorFormat )( + ID3D11VideoProcessorEnumerator * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _Out_ UINT *pFlags); + + HRESULT ( STDMETHODCALLTYPE *GetVideoProcessorCaps )( + ID3D11VideoProcessorEnumerator * This, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_CAPS *pCaps); + + HRESULT ( STDMETHODCALLTYPE *GetVideoProcessorRateConversionCaps )( + ID3D11VideoProcessorEnumerator * This, + /* [annotation] */ + _In_ UINT TypeIndex, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS *pCaps); + + HRESULT ( STDMETHODCALLTYPE *GetVideoProcessorCustomRate )( + ID3D11VideoProcessorEnumerator * This, + /* [annotation] */ + _In_ UINT TypeIndex, + /* [annotation] */ + _In_ UINT CustomRateIndex, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_CUSTOM_RATE *pRate); + + HRESULT ( STDMETHODCALLTYPE *GetVideoProcessorFilterRange )( + ID3D11VideoProcessorEnumerator * This, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_FILTER Filter, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_FILTER_RANGE *pRange); + + END_INTERFACE + } ID3D11VideoProcessorEnumeratorVtbl; + + interface ID3D11VideoProcessorEnumerator + { + CONST_VTBL struct ID3D11VideoProcessorEnumeratorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11VideoProcessorEnumerator_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11VideoProcessorEnumerator_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11VideoProcessorEnumerator_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11VideoProcessorEnumerator_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11VideoProcessorEnumerator_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11VideoProcessorEnumerator_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11VideoProcessorEnumerator_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc(This,pContentDesc) \ + ( (This)->lpVtbl -> GetVideoProcessorContentDesc(This,pContentDesc) ) + +#define ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat(This,Format,pFlags) \ + ( (This)->lpVtbl -> CheckVideoProcessorFormat(This,Format,pFlags) ) + +#define ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps(This,pCaps) \ + ( (This)->lpVtbl -> GetVideoProcessorCaps(This,pCaps) ) + +#define ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps(This,TypeIndex,pCaps) \ + ( (This)->lpVtbl -> GetVideoProcessorRateConversionCaps(This,TypeIndex,pCaps) ) + +#define ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate(This,TypeIndex,CustomRateIndex,pRate) \ + ( (This)->lpVtbl -> GetVideoProcessorCustomRate(This,TypeIndex,CustomRateIndex,pRate) ) + +#define ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange(This,Filter,pRange) \ + ( (This)->lpVtbl -> GetVideoProcessorFilterRange(This,Filter,pRange) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11VideoProcessorEnumerator_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0032 */ +/* [local] */ + +typedef struct D3D11_VIDEO_COLOR_RGBA + { + float R; + float G; + float B; + float A; + } D3D11_VIDEO_COLOR_RGBA; + +typedef struct D3D11_VIDEO_COLOR_YCbCrA + { + float Y; + float Cb; + float Cr; + float A; + } D3D11_VIDEO_COLOR_YCbCrA; + +typedef struct D3D11_VIDEO_COLOR + { + union + { + D3D11_VIDEO_COLOR_YCbCrA YCbCr; + D3D11_VIDEO_COLOR_RGBA RGBA; + } ; + } D3D11_VIDEO_COLOR; + +typedef +enum D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE + { + D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_UNDEFINED = 0, + D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_16_235 = 1, + D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_0_255 = 2 + } D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE; + +typedef struct D3D11_VIDEO_PROCESSOR_COLOR_SPACE + { + UINT Usage : 1; + UINT RGB_Range : 1; + UINT YCbCr_Matrix : 1; + UINT YCbCr_xvYCC : 1; + UINT Nominal_Range : 2; + UINT Reserved : 26; + } D3D11_VIDEO_PROCESSOR_COLOR_SPACE; + +typedef +enum D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE + { + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_OPAQUE = 0, + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_BACKGROUND = 1, + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_DESTINATION = 2, + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_SOURCE_STREAM = 3 + } D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE; + +typedef +enum D3D11_VIDEO_PROCESSOR_OUTPUT_RATE + { + D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_NORMAL = 0, + D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_HALF = 1, + D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_CUSTOM = 2 + } D3D11_VIDEO_PROCESSOR_OUTPUT_RATE; + +typedef +enum D3D11_VIDEO_PROCESSOR_STEREO_FORMAT + { + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO = 0, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_HORIZONTAL = 1, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_VERTICAL = 2, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_SEPARATE = 3, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO_OFFSET = 4, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_ROW_INTERLEAVED = 5, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_COLUMN_INTERLEAVED = 6, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_CHECKERBOARD = 7 + } D3D11_VIDEO_PROCESSOR_STEREO_FORMAT; + +typedef +enum D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE + { + D3D11_VIDEO_PROCESSOR_STEREO_FLIP_NONE = 0, + D3D11_VIDEO_PROCESSOR_STEREO_FLIP_FRAME0 = 1, + D3D11_VIDEO_PROCESSOR_STEREO_FLIP_FRAME1 = 2 + } D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE; + +typedef +enum D3D11_VIDEO_PROCESSOR_ROTATION + { + D3D11_VIDEO_PROCESSOR_ROTATION_IDENTITY = 0, + D3D11_VIDEO_PROCESSOR_ROTATION_90 = 1, + D3D11_VIDEO_PROCESSOR_ROTATION_180 = 2, + D3D11_VIDEO_PROCESSOR_ROTATION_270 = 3 + } D3D11_VIDEO_PROCESSOR_ROTATION; + +typedef struct D3D11_VIDEO_PROCESSOR_STREAM + { + BOOL Enable; + UINT OutputIndex; + UINT InputFrameOrField; + UINT PastFrames; + UINT FutureFrames; + /* [annotation] */ + _Field_size_(PastFrames) ID3D11VideoProcessorInputView **ppPastSurfaces; + ID3D11VideoProcessorInputView *pInputSurface; + /* [annotation] */ + _Field_size_(FutureFrames) ID3D11VideoProcessorInputView **ppFutureSurfaces; + /* [annotation] */ + _Field_size_opt_(PastFrames) ID3D11VideoProcessorInputView **ppPastSurfacesRight; + ID3D11VideoProcessorInputView *pInputSurfaceRight; + /* [annotation] */ + _Field_size_(FutureFrames) ID3D11VideoProcessorInputView **ppFutureSurfacesRight; + } D3D11_VIDEO_PROCESSOR_STREAM; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0032_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0032_v0_0_s_ifspec; + +#ifndef __ID3D11VideoProcessor_INTERFACE_DEFINED__ +#define __ID3D11VideoProcessor_INTERFACE_DEFINED__ + +/* interface ID3D11VideoProcessor */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11VideoProcessor; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1D7B0652-185F-41c6-85CE-0C5BE3D4AE6C") + ID3D11VideoProcessor : public ID3D11DeviceChild + { + public: + virtual void STDMETHODCALLTYPE GetContentDesc( + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_CONTENT_DESC *pDesc) = 0; + + virtual void STDMETHODCALLTYPE GetRateConversionCaps( + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS *pCaps) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11VideoProcessorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11VideoProcessor * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11VideoProcessor * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11VideoProcessor * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11VideoProcessor * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11VideoProcessor * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11VideoProcessor * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11VideoProcessor * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetContentDesc )( + ID3D11VideoProcessor * This, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_CONTENT_DESC *pDesc); + + void ( STDMETHODCALLTYPE *GetRateConversionCaps )( + ID3D11VideoProcessor * This, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS *pCaps); + + END_INTERFACE + } ID3D11VideoProcessorVtbl; + + interface ID3D11VideoProcessor + { + CONST_VTBL struct ID3D11VideoProcessorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11VideoProcessor_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11VideoProcessor_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11VideoProcessor_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11VideoProcessor_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11VideoProcessor_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11VideoProcessor_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11VideoProcessor_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11VideoProcessor_GetContentDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetContentDesc(This,pDesc) ) + +#define ID3D11VideoProcessor_GetRateConversionCaps(This,pCaps) \ + ( (This)->lpVtbl -> GetRateConversionCaps(This,pCaps) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11VideoProcessor_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0033 */ +/* [local] */ + +typedef struct D3D11_OMAC + { + BYTE Omac[ 16 ]; + } D3D11_OMAC; + +typedef +enum D3D11_AUTHENTICATED_CHANNEL_TYPE + { + D3D11_AUTHENTICATED_CHANNEL_D3D11 = 1, + D3D11_AUTHENTICATED_CHANNEL_DRIVER_SOFTWARE = 2, + D3D11_AUTHENTICATED_CHANNEL_DRIVER_HARDWARE = 3 + } D3D11_AUTHENTICATED_CHANNEL_TYPE; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0033_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0033_v0_0_s_ifspec; + +#ifndef __ID3D11AuthenticatedChannel_INTERFACE_DEFINED__ +#define __ID3D11AuthenticatedChannel_INTERFACE_DEFINED__ + +/* interface ID3D11AuthenticatedChannel */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11AuthenticatedChannel; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3015A308-DCBD-47aa-A747-192486D14D4A") + ID3D11AuthenticatedChannel : public ID3D11DeviceChild + { + public: + virtual HRESULT STDMETHODCALLTYPE GetCertificateSize( + /* [annotation] */ + _Out_ UINT *pCertificateSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCertificate( + /* [annotation] */ + _In_ UINT CertificateSize, + /* [annotation] */ + _Out_writes_bytes_(CertificateSize) BYTE *pCertificate) = 0; + + virtual void STDMETHODCALLTYPE GetChannelHandle( + /* [annotation] */ + _Out_ HANDLE *pChannelHandle) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11AuthenticatedChannelVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11AuthenticatedChannel * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11AuthenticatedChannel * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11AuthenticatedChannel * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11AuthenticatedChannel * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11AuthenticatedChannel * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11AuthenticatedChannel * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11AuthenticatedChannel * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *GetCertificateSize )( + ID3D11AuthenticatedChannel * This, + /* [annotation] */ + _Out_ UINT *pCertificateSize); + + HRESULT ( STDMETHODCALLTYPE *GetCertificate )( + ID3D11AuthenticatedChannel * This, + /* [annotation] */ + _In_ UINT CertificateSize, + /* [annotation] */ + _Out_writes_bytes_(CertificateSize) BYTE *pCertificate); + + void ( STDMETHODCALLTYPE *GetChannelHandle )( + ID3D11AuthenticatedChannel * This, + /* [annotation] */ + _Out_ HANDLE *pChannelHandle); + + END_INTERFACE + } ID3D11AuthenticatedChannelVtbl; + + interface ID3D11AuthenticatedChannel + { + CONST_VTBL struct ID3D11AuthenticatedChannelVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11AuthenticatedChannel_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11AuthenticatedChannel_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11AuthenticatedChannel_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11AuthenticatedChannel_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11AuthenticatedChannel_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11AuthenticatedChannel_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11AuthenticatedChannel_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11AuthenticatedChannel_GetCertificateSize(This,pCertificateSize) \ + ( (This)->lpVtbl -> GetCertificateSize(This,pCertificateSize) ) + +#define ID3D11AuthenticatedChannel_GetCertificate(This,CertificateSize,pCertificate) \ + ( (This)->lpVtbl -> GetCertificate(This,CertificateSize,pCertificate) ) + +#define ID3D11AuthenticatedChannel_GetChannelHandle(This,pChannelHandle) \ + ( (This)->lpVtbl -> GetChannelHandle(This,pChannelHandle) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11AuthenticatedChannel_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0034 */ +/* [local] */ + +DEFINE_GUID( D3D11_AUTHENTICATED_QUERY_PROTECTION, 0xa84eb584, 0xc495, 0x48aa, 0xb9, 0x4d, 0x8b, 0xd2, 0xd6, 0xfb, 0xce, 0x5 ); +DEFINE_GUID( D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE, 0xbc1b18a5, 0xb1fb, 0x42ab, 0xbd, 0x94, 0xb5, 0x82, 0x8b, 0x4b, 0xf7, 0xbe ); +DEFINE_GUID( D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE, 0xec1c539d, 0x8cff, 0x4e2a, 0xbc, 0xc4, 0xf5, 0x69, 0x2f, 0x99, 0xf4, 0x80 ); +DEFINE_GUID( D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION, 0x2634499e, 0xd018, 0x4d74, 0xac, 0x17, 0x7f, 0x72, 0x40, 0x59, 0x52, 0x8d ); +DEFINE_GUID( D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT, 0xdb207b3, 0x9450, 0x46a6, 0x82, 0xde, 0x1b, 0x96, 0xd4, 0x4f, 0x9c, 0xf2 ); +DEFINE_GUID( D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS, 0x649bbadb, 0xf0f4, 0x4639, 0xa1, 0x5b, 0x24, 0x39, 0x3f, 0xc3, 0xab, 0xac ); +DEFINE_GUID( D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT, 0x12f0bd6, 0xe662, 0x4474, 0xbe, 0xfd, 0xaa, 0x53, 0xe5, 0x14, 0x3c, 0x6d ); +DEFINE_GUID( D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT, 0x2c042b5e, 0x8c07, 0x46d5, 0xaa, 0xbe, 0x8f, 0x75, 0xcb, 0xad, 0x4c, 0x31 ); +DEFINE_GUID( D3D11_AUTHENTICATED_QUERY_OUTPUT_ID, 0x839ddca3, 0x9b4e, 0x41e4, 0xb0, 0x53, 0x89, 0x2b, 0xd2, 0xa1, 0x1e, 0xe7 ); +DEFINE_GUID( D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ATTRIBUTES, 0x6214d9d2, 0x432c, 0x4abb, 0x9f, 0xce, 0x21, 0x6e, 0xea, 0x26, 0x9e, 0x3b ); +DEFINE_GUID( D3D11_AUTHENTICATED_QUERY_ENCRYPTION_WHEN_ACCESSIBLE_GUID_COUNT, 0xb30f7066, 0x203c, 0x4b07, 0x93, 0xfc, 0xce, 0xaa, 0xfd, 0x61, 0x24, 0x1e ); +DEFINE_GUID( D3D11_AUTHENTICATED_QUERY_ENCRYPTION_WHEN_ACCESSIBLE_GUID, 0xf83a5958, 0xe986, 0x4bda, 0xbe, 0xb0, 0x41, 0x1f, 0x6a, 0x7a, 0x1, 0xb7 ); +DEFINE_GUID( D3D11_AUTHENTICATED_QUERY_CURRENT_ENCRYPTION_WHEN_ACCESSIBLE, 0xec1791c7, 0xdad3, 0x4f15, 0x9e, 0xc3, 0xfa, 0xa9, 0x3d, 0x60, 0xd4, 0xf0 ); +DEFINE_GUID( D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE, 0x6114bdb, 0x3523, 0x470a, 0x8d, 0xca, 0xfb, 0xc2, 0x84, 0x51, 0x54, 0xf0 ); +DEFINE_GUID( D3D11_AUTHENTICATED_CONFIGURE_PROTECTION, 0x50455658, 0x3f47, 0x4362, 0xbf, 0x99, 0xbf, 0xdf, 0xcd, 0xe9, 0xed, 0x29 ); +DEFINE_GUID( D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION, 0x6346cc54, 0x2cfc, 0x4ad4, 0x82, 0x24, 0xd1, 0x58, 0x37, 0xde, 0x77, 0x0 ); +DEFINE_GUID( D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE, 0x772d047, 0x1b40, 0x48e8, 0x9c, 0xa6, 0xb5, 0xf5, 0x10, 0xde, 0x9f, 0x1 ); +DEFINE_GUID( D3D11_AUTHENTICATED_CONFIGURE_ENCRYPTION_WHEN_ACCESSIBLE, 0x41fff286, 0x6ae0, 0x4d43, 0x9d, 0x55, 0xa4, 0x6e, 0x9e, 0xfd, 0x15, 0x8a ); +typedef struct D3D11_AUTHENTICATED_QUERY_INPUT + { + GUID QueryType; + HANDLE hChannel; + UINT SequenceNumber; + } D3D11_AUTHENTICATED_QUERY_INPUT; + +typedef struct D3D11_AUTHENTICATED_QUERY_OUTPUT + { + D3D11_OMAC omac; + GUID QueryType; + HANDLE hChannel; + UINT SequenceNumber; + HRESULT ReturnCode; + } D3D11_AUTHENTICATED_QUERY_OUTPUT; + +typedef union D3D11_AUTHENTICATED_PROTECTION_FLAGS + { + struct __MIDL___MIDL_itf_d3d11_0000_0034_0001 + { + UINT ProtectionEnabled : 1; + UINT OverlayOrFullscreenRequired : 1; + UINT Reserved : 30; + } Flags; + UINT Value; + } D3D11_AUTHENTICATED_PROTECTION_FLAGS; + +typedef struct D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT + { + D3D11_AUTHENTICATED_QUERY_OUTPUT Output; + D3D11_AUTHENTICATED_PROTECTION_FLAGS ProtectionFlags; + } D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT; + +typedef struct D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT + { + D3D11_AUTHENTICATED_QUERY_OUTPUT Output; + D3D11_AUTHENTICATED_CHANNEL_TYPE ChannelType; + } D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT; + +typedef struct D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT + { + D3D11_AUTHENTICATED_QUERY_OUTPUT Output; + HANDLE DeviceHandle; + } D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT; + +typedef struct D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT + { + D3D11_AUTHENTICATED_QUERY_INPUT Input; + HANDLE DecoderHandle; + } D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT; + +typedef struct D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT + { + D3D11_AUTHENTICATED_QUERY_OUTPUT Output; + HANDLE DecoderHandle; + HANDLE CryptoSessionHandle; + HANDLE DeviceHandle; + } D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT; + +typedef struct D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT + { + D3D11_AUTHENTICATED_QUERY_OUTPUT Output; + UINT RestrictedSharedResourceProcessCount; + } D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT; + +typedef struct D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT + { + D3D11_AUTHENTICATED_QUERY_INPUT Input; + UINT ProcessIndex; + } D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT; + +typedef +enum D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE + { + D3D11_PROCESSIDTYPE_UNKNOWN = 0, + D3D11_PROCESSIDTYPE_DWM = 1, + D3D11_PROCESSIDTYPE_HANDLE = 2 + } D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE; + +typedef struct D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT + { + D3D11_AUTHENTICATED_QUERY_OUTPUT Output; + UINT ProcessIndex; + D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE ProcessIdentifier; + HANDLE ProcessHandle; + } D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT; + +typedef struct D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT + { + D3D11_AUTHENTICATED_QUERY_OUTPUT Output; + UINT UnrestrictedProtectedSharedResourceCount; + } D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT; + +typedef struct D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT + { + D3D11_AUTHENTICATED_QUERY_INPUT Input; + HANDLE DeviceHandle; + HANDLE CryptoSessionHandle; + } D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT; + +typedef struct D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT + { + D3D11_AUTHENTICATED_QUERY_OUTPUT Output; + HANDLE DeviceHandle; + HANDLE CryptoSessionHandle; + UINT OutputIDCount; + } D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT; + +typedef struct D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT + { + D3D11_AUTHENTICATED_QUERY_INPUT Input; + HANDLE DeviceHandle; + HANDLE CryptoSessionHandle; + UINT OutputIDIndex; + } D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT; + +typedef struct D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT + { + D3D11_AUTHENTICATED_QUERY_OUTPUT Output; + HANDLE DeviceHandle; + HANDLE CryptoSessionHandle; + UINT OutputIDIndex; + UINT64 OutputID; + } D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT; + +typedef +enum D3D11_BUS_TYPE + { + D3D11_BUS_TYPE_OTHER = 0, + D3D11_BUS_TYPE_PCI = 0x1, + D3D11_BUS_TYPE_PCIX = 0x2, + D3D11_BUS_TYPE_PCIEXPRESS = 0x3, + D3D11_BUS_TYPE_AGP = 0x4, + D3D11_BUS_IMPL_MODIFIER_INSIDE_OF_CHIPSET = 0x10000, + D3D11_BUS_IMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_CHIP = 0x20000, + D3D11_BUS_IMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_SOCKET = 0x30000, + D3D11_BUS_IMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR = 0x40000, + D3D11_BUS_IMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR_INSIDE_OF_NUAE = 0x50000, + D3D11_BUS_IMPL_MODIFIER_NON_STANDARD = 0x80000000 + } D3D11_BUS_TYPE; + +typedef struct D3D11_AUTHENTICATED_QUERY_ACESSIBILITY_OUTPUT + { + D3D11_AUTHENTICATED_QUERY_OUTPUT Output; + D3D11_BUS_TYPE BusType; + BOOL AccessibleInContiguousBlocks; + BOOL AccessibleInNonContiguousBlocks; + } D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_OUTPUT; + +typedef struct D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT + { + D3D11_AUTHENTICATED_QUERY_OUTPUT Output; + UINT EncryptionGuidCount; + } D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT; + +typedef struct D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT + { + D3D11_AUTHENTICATED_QUERY_INPUT Input; + UINT EncryptionGuidIndex; + } D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT; + +typedef struct D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT + { + D3D11_AUTHENTICATED_QUERY_OUTPUT Output; + UINT EncryptionGuidIndex; + GUID EncryptionGuid; + } D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT; + +typedef struct D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT + { + D3D11_AUTHENTICATED_QUERY_OUTPUT Output; + GUID EncryptionGuid; + } D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT; + +typedef struct D3D11_AUTHENTICATED_CONFIGURE_INPUT + { + D3D11_OMAC omac; + GUID ConfigureType; + HANDLE hChannel; + UINT SequenceNumber; + } D3D11_AUTHENTICATED_CONFIGURE_INPUT; + +typedef struct D3D11_AUTHENTICATED_CONFIGURE_OUTPUT + { + D3D11_OMAC omac; + GUID ConfigureType; + HANDLE hChannel; + UINT SequenceNumber; + HRESULT ReturnCode; + } D3D11_AUTHENTICATED_CONFIGURE_OUTPUT; + +typedef struct D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT + { + D3D11_AUTHENTICATED_CONFIGURE_INPUT Parameters; + UINT StartSequenceQuery; + UINT StartSequenceConfigure; + } D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT; + +typedef struct D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT + { + D3D11_AUTHENTICATED_CONFIGURE_INPUT Parameters; + D3D11_AUTHENTICATED_PROTECTION_FLAGS Protections; + } D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT; + +typedef struct D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT + { + D3D11_AUTHENTICATED_CONFIGURE_INPUT Parameters; + HANDLE DecoderHandle; + HANDLE CryptoSessionHandle; + HANDLE DeviceHandle; + } D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT; + +typedef struct D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT + { + D3D11_AUTHENTICATED_CONFIGURE_INPUT Parameters; + D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE ProcessType; + HANDLE ProcessHandle; + BOOL AllowAccess; + } D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT; + +typedef struct D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT + { + D3D11_AUTHENTICATED_CONFIGURE_INPUT Parameters; + GUID EncryptionGuid; + } D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT; + +DEFINE_GUID(D3D11_KEY_EXCHANGE_RSAES_OAEP, 0xc1949895, 0xd72a, 0x4a1d, 0x8e, 0x5d, 0xed, 0x85, 0x7d, 0x17, 0x15, 0x20); + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0034_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0034_v0_0_s_ifspec; + +#ifndef __ID3D11CryptoSession_INTERFACE_DEFINED__ +#define __ID3D11CryptoSession_INTERFACE_DEFINED__ + +/* interface ID3D11CryptoSession */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11CryptoSession; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B32F9AD-BDCC-40a6-A39D-D5C865845720") + ID3D11CryptoSession : public ID3D11DeviceChild + { + public: + virtual void STDMETHODCALLTYPE GetCryptoType( + /* [annotation] */ + _Out_ GUID *pCryptoType) = 0; + + virtual void STDMETHODCALLTYPE GetDecoderProfile( + /* [annotation] */ + _Out_ GUID *pDecoderProfile) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCertificateSize( + /* [annotation] */ + _Out_ UINT *pCertificateSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCertificate( + /* [annotation] */ + _In_ UINT CertificateSize, + /* [annotation] */ + _Out_writes_bytes_(CertificateSize) BYTE *pCertificate) = 0; + + virtual void STDMETHODCALLTYPE GetCryptoSessionHandle( + /* [annotation] */ + _Out_ HANDLE *pCryptoSessionHandle) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11CryptoSessionVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11CryptoSession * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11CryptoSession * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11CryptoSession * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11CryptoSession * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11CryptoSession * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11CryptoSession * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11CryptoSession * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetCryptoType )( + ID3D11CryptoSession * This, + /* [annotation] */ + _Out_ GUID *pCryptoType); + + void ( STDMETHODCALLTYPE *GetDecoderProfile )( + ID3D11CryptoSession * This, + /* [annotation] */ + _Out_ GUID *pDecoderProfile); + + HRESULT ( STDMETHODCALLTYPE *GetCertificateSize )( + ID3D11CryptoSession * This, + /* [annotation] */ + _Out_ UINT *pCertificateSize); + + HRESULT ( STDMETHODCALLTYPE *GetCertificate )( + ID3D11CryptoSession * This, + /* [annotation] */ + _In_ UINT CertificateSize, + /* [annotation] */ + _Out_writes_bytes_(CertificateSize) BYTE *pCertificate); + + void ( STDMETHODCALLTYPE *GetCryptoSessionHandle )( + ID3D11CryptoSession * This, + /* [annotation] */ + _Out_ HANDLE *pCryptoSessionHandle); + + END_INTERFACE + } ID3D11CryptoSessionVtbl; + + interface ID3D11CryptoSession + { + CONST_VTBL struct ID3D11CryptoSessionVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11CryptoSession_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11CryptoSession_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11CryptoSession_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11CryptoSession_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11CryptoSession_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11CryptoSession_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11CryptoSession_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11CryptoSession_GetCryptoType(This,pCryptoType) \ + ( (This)->lpVtbl -> GetCryptoType(This,pCryptoType) ) + +#define ID3D11CryptoSession_GetDecoderProfile(This,pDecoderProfile) \ + ( (This)->lpVtbl -> GetDecoderProfile(This,pDecoderProfile) ) + +#define ID3D11CryptoSession_GetCertificateSize(This,pCertificateSize) \ + ( (This)->lpVtbl -> GetCertificateSize(This,pCertificateSize) ) + +#define ID3D11CryptoSession_GetCertificate(This,CertificateSize,pCertificate) \ + ( (This)->lpVtbl -> GetCertificate(This,CertificateSize,pCertificate) ) + +#define ID3D11CryptoSession_GetCryptoSessionHandle(This,pCryptoSessionHandle) \ + ( (This)->lpVtbl -> GetCryptoSessionHandle(This,pCryptoSessionHandle) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11CryptoSession_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0035 */ +/* [local] */ + +typedef +enum D3D11_VDOV_DIMENSION + { + D3D11_VDOV_DIMENSION_UNKNOWN = 0, + D3D11_VDOV_DIMENSION_TEXTURE2D = 1 + } D3D11_VDOV_DIMENSION; + +typedef struct D3D11_TEX2D_VDOV + { + UINT ArraySlice; + } D3D11_TEX2D_VDOV; + +typedef struct D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC + { + GUID DecodeProfile; + D3D11_VDOV_DIMENSION ViewDimension; + union + { + D3D11_TEX2D_VDOV Texture2D; + } ; + } D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0035_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0035_v0_0_s_ifspec; + +#ifndef __ID3D11VideoDecoderOutputView_INTERFACE_DEFINED__ +#define __ID3D11VideoDecoderOutputView_INTERFACE_DEFINED__ + +/* interface ID3D11VideoDecoderOutputView */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11VideoDecoderOutputView; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C2931AEA-2A85-4f20-860F-FBA1FD256E18") + ID3D11VideoDecoderOutputView : public ID3D11View + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11VideoDecoderOutputViewVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11VideoDecoderOutputView * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11VideoDecoderOutputView * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11VideoDecoderOutputView * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11VideoDecoderOutputView * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11VideoDecoderOutputView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11VideoDecoderOutputView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11VideoDecoderOutputView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetResource )( + ID3D11VideoDecoderOutputView * This, + /* [annotation] */ + _Outptr_ ID3D11Resource **ppResource); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11VideoDecoderOutputView * This, + /* [annotation] */ + _Out_ D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *pDesc); + + END_INTERFACE + } ID3D11VideoDecoderOutputViewVtbl; + + interface ID3D11VideoDecoderOutputView + { + CONST_VTBL struct ID3D11VideoDecoderOutputViewVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11VideoDecoderOutputView_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11VideoDecoderOutputView_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11VideoDecoderOutputView_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11VideoDecoderOutputView_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11VideoDecoderOutputView_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11VideoDecoderOutputView_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11VideoDecoderOutputView_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11VideoDecoderOutputView_GetResource(This,ppResource) \ + ( (This)->lpVtbl -> GetResource(This,ppResource) ) + + +#define ID3D11VideoDecoderOutputView_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11VideoDecoderOutputView_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0036 */ +/* [local] */ + +typedef +enum D3D11_VPIV_DIMENSION + { + D3D11_VPIV_DIMENSION_UNKNOWN = 0, + D3D11_VPIV_DIMENSION_TEXTURE2D = 1 + } D3D11_VPIV_DIMENSION; + +typedef struct D3D11_TEX2D_VPIV + { + UINT MipSlice; + UINT ArraySlice; + } D3D11_TEX2D_VPIV; + +typedef struct D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC + { + UINT FourCC; + D3D11_VPIV_DIMENSION ViewDimension; + union + { + D3D11_TEX2D_VPIV Texture2D; + } ; + } D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0036_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0036_v0_0_s_ifspec; + +#ifndef __ID3D11VideoProcessorInputView_INTERFACE_DEFINED__ +#define __ID3D11VideoProcessorInputView_INTERFACE_DEFINED__ + +/* interface ID3D11VideoProcessorInputView */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11VideoProcessorInputView; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("11EC5A5F-51DC-4945-AB34-6E8C21300EA5") + ID3D11VideoProcessorInputView : public ID3D11View + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11VideoProcessorInputViewVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11VideoProcessorInputView * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11VideoProcessorInputView * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11VideoProcessorInputView * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11VideoProcessorInputView * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11VideoProcessorInputView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11VideoProcessorInputView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11VideoProcessorInputView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetResource )( + ID3D11VideoProcessorInputView * This, + /* [annotation] */ + _Outptr_ ID3D11Resource **ppResource); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11VideoProcessorInputView * This, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC *pDesc); + + END_INTERFACE + } ID3D11VideoProcessorInputViewVtbl; + + interface ID3D11VideoProcessorInputView + { + CONST_VTBL struct ID3D11VideoProcessorInputViewVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11VideoProcessorInputView_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11VideoProcessorInputView_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11VideoProcessorInputView_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11VideoProcessorInputView_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11VideoProcessorInputView_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11VideoProcessorInputView_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11VideoProcessorInputView_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11VideoProcessorInputView_GetResource(This,ppResource) \ + ( (This)->lpVtbl -> GetResource(This,ppResource) ) + + +#define ID3D11VideoProcessorInputView_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11VideoProcessorInputView_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0037 */ +/* [local] */ + +typedef +enum D3D11_VPOV_DIMENSION + { + D3D11_VPOV_DIMENSION_UNKNOWN = 0, + D3D11_VPOV_DIMENSION_TEXTURE2D = 1, + D3D11_VPOV_DIMENSION_TEXTURE2DARRAY = 2 + } D3D11_VPOV_DIMENSION; + +typedef struct D3D11_TEX2D_VPOV + { + UINT MipSlice; + } D3D11_TEX2D_VPOV; + +typedef struct D3D11_TEX2D_ARRAY_VPOV + { + UINT MipSlice; + UINT FirstArraySlice; + UINT ArraySize; + } D3D11_TEX2D_ARRAY_VPOV; + +typedef struct D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC + { + D3D11_VPOV_DIMENSION ViewDimension; + union + { + D3D11_TEX2D_VPOV Texture2D; + D3D11_TEX2D_ARRAY_VPOV Texture2DArray; + } ; + } D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0037_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0037_v0_0_s_ifspec; + +#ifndef __ID3D11VideoProcessorOutputView_INTERFACE_DEFINED__ +#define __ID3D11VideoProcessorOutputView_INTERFACE_DEFINED__ + +/* interface ID3D11VideoProcessorOutputView */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11VideoProcessorOutputView; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("A048285E-25A9-4527-BD93-D68B68C44254") + ID3D11VideoProcessorOutputView : public ID3D11View + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11VideoProcessorOutputViewVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11VideoProcessorOutputView * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11VideoProcessorOutputView * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11VideoProcessorOutputView * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11VideoProcessorOutputView * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11VideoProcessorOutputView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11VideoProcessorOutputView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11VideoProcessorOutputView * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetResource )( + ID3D11VideoProcessorOutputView * This, + /* [annotation] */ + _Outptr_ ID3D11Resource **ppResource); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11VideoProcessorOutputView * This, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC *pDesc); + + END_INTERFACE + } ID3D11VideoProcessorOutputViewVtbl; + + interface ID3D11VideoProcessorOutputView + { + CONST_VTBL struct ID3D11VideoProcessorOutputViewVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11VideoProcessorOutputView_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11VideoProcessorOutputView_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11VideoProcessorOutputView_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11VideoProcessorOutputView_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11VideoProcessorOutputView_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11VideoProcessorOutputView_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11VideoProcessorOutputView_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11VideoProcessorOutputView_GetResource(This,ppResource) \ + ( (This)->lpVtbl -> GetResource(This,ppResource) ) + + +#define ID3D11VideoProcessorOutputView_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11VideoProcessorOutputView_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11VideoContext_INTERFACE_DEFINED__ +#define __ID3D11VideoContext_INTERFACE_DEFINED__ + +/* interface ID3D11VideoContext */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11VideoContext; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("61F21C45-3C0E-4a74-9CEA-67100D9AD5E4") + ID3D11VideoContext : public ID3D11DeviceChild + { + public: + virtual HRESULT STDMETHODCALLTYPE GetDecoderBuffer( + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type, + /* [annotation] */ + _Out_ UINT *pBufferSize, + /* [annotation] */ + _Outptr_result_bytebuffer_(*pBufferSize) void **ppBuffer) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReleaseDecoderBuffer( + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ D3D11_VIDEO_DECODER_BUFFER_TYPE Type) = 0; + + virtual HRESULT STDMETHODCALLTYPE DecoderBeginFrame( + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ ID3D11VideoDecoderOutputView *pView, + UINT ContentKeySize, + /* [annotation] */ + _In_reads_bytes_opt_(ContentKeySize) const void *pContentKey) = 0; + + virtual HRESULT STDMETHODCALLTYPE DecoderEndFrame( + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder) = 0; + + virtual HRESULT STDMETHODCALLTYPE SubmitDecoderBuffers( + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ UINT NumBuffers, + /* [annotation] */ + _In_reads_(NumBuffers) const D3D11_VIDEO_DECODER_BUFFER_DESC *pBufferDesc) = 0; + + virtual APP_DEPRECATED_HRESULT STDMETHODCALLTYPE DecoderExtension( + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_EXTENSION *pExtensionData) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetOutputTargetRect( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_opt_ const RECT *pRect) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetOutputBackgroundColor( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ BOOL YCbCr, + /* [annotation] */ + _In_ const D3D11_VIDEO_COLOR *pColor) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetOutputColorSpace( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *pColorSpace) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetOutputAlphaFillMode( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE AlphaFillMode, + /* [annotation] */ + _In_ UINT StreamIndex) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetOutputConstriction( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ SIZE Size) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetOutputStereoMode( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ BOOL Enable) = 0; + + virtual APP_DEPRECATED_HRESULT STDMETHODCALLTYPE VideoProcessorSetOutputExtension( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ const GUID *pExtensionGuid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_ void *pData) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetOutputTargetRect( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ BOOL *Enabled, + /* [annotation] */ + _Out_ RECT *pRect) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetOutputBackgroundColor( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ BOOL *pYCbCr, + /* [annotation] */ + _Out_ D3D11_VIDEO_COLOR *pColor) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetOutputColorSpace( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_COLOR_SPACE *pColorSpace) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetOutputAlphaFillMode( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE *pAlphaFillMode, + /* [annotation] */ + _Out_ UINT *pStreamIndex) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetOutputConstriction( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ SIZE *pSize) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetOutputStereoMode( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ BOOL *pEnabled) = 0; + + virtual APP_DEPRECATED_HRESULT STDMETHODCALLTYPE VideoProcessorGetOutputExtension( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ const GUID *pExtensionGuid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _Out_writes_bytes_(DataSize) void *pData) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamFrameFormat( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ D3D11_VIDEO_FRAME_FORMAT FrameFormat) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamColorSpace( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *pColorSpace) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamOutputRate( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_OUTPUT_RATE OutputRate, + /* [annotation] */ + _In_ BOOL RepeatFrame, + /* [annotation] */ + _In_opt_ const DXGI_RATIONAL *pCustomRate) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamSourceRect( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_opt_ const RECT *pRect) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamDestRect( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_opt_ const RECT *pRect) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamAlpha( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ FLOAT Alpha) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamPalette( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ UINT Count, + /* [annotation] */ + _In_reads_opt_(Count) const UINT *pEntries) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamPixelAspectRatio( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_opt_ const DXGI_RATIONAL *pSourceAspectRatio, + /* [annotation] */ + _In_opt_ const DXGI_RATIONAL *pDestinationAspectRatio) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamLumaKey( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ FLOAT Lower, + /* [annotation] */ + _In_ FLOAT Upper) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamStereoFormat( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_STEREO_FORMAT Format, + /* [annotation] */ + _In_ BOOL LeftViewFrame0, + /* [annotation] */ + _In_ BOOL BaseViewFrame0, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE FlipMode, + /* [annotation] */ + _In_ int MonoOffset) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamAutoProcessingMode( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamFilter( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_FILTER Filter, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ int Level) = 0; + + virtual APP_DEPRECATED_HRESULT STDMETHODCALLTYPE VideoProcessorSetStreamExtension( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ const GUID *pExtensionGuid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_ void *pData) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamFrameFormat( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ D3D11_VIDEO_FRAME_FORMAT *pFrameFormat) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamColorSpace( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_COLOR_SPACE *pColorSpace) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamOutputRate( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_OUTPUT_RATE *pOutputRate, + /* [annotation] */ + _Out_ BOOL *pRepeatFrame, + /* [annotation] */ + _Out_ DXGI_RATIONAL *pCustomRate) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamSourceRect( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ RECT *pRect) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamDestRect( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ RECT *pRect) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamAlpha( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ FLOAT *pAlpha) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamPalette( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ UINT Count, + /* [annotation] */ + _Out_writes_(Count) UINT *pEntries) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamPixelAspectRatio( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ DXGI_RATIONAL *pSourceAspectRatio, + /* [annotation] */ + _Out_ DXGI_RATIONAL *pDestinationAspectRatio) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamLumaKey( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ FLOAT *pLower, + /* [annotation] */ + _Out_ FLOAT *pUpper) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamStereoFormat( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnable, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_STEREO_FORMAT *pFormat, + /* [annotation] */ + _Out_ BOOL *pLeftViewFrame0, + /* [annotation] */ + _Out_ BOOL *pBaseViewFrame0, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE *pFlipMode, + /* [annotation] */ + _Out_ int *MonoOffset) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamAutoProcessingMode( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamFilter( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_FILTER Filter, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ int *pLevel) = 0; + + virtual APP_DEPRECATED_HRESULT STDMETHODCALLTYPE VideoProcessorGetStreamExtension( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ const GUID *pExtensionGuid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _Out_writes_bytes_(DataSize) void *pData) = 0; + + virtual HRESULT STDMETHODCALLTYPE VideoProcessorBlt( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ ID3D11VideoProcessorOutputView *pView, + /* [annotation] */ + _In_ UINT OutputFrame, + /* [annotation] */ + _In_ UINT StreamCount, + /* [annotation] */ + _In_reads_(StreamCount) const D3D11_VIDEO_PROCESSOR_STREAM *pStreams) = 0; + + virtual HRESULT STDMETHODCALLTYPE NegotiateCryptoSessionKeyExchange( + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _Inout_updates_bytes_(DataSize) void *pData) = 0; + + virtual void STDMETHODCALLTYPE EncryptionBlt( + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ ID3D11Texture2D *pSrcSurface, + /* [annotation] */ + _In_ ID3D11Texture2D *pDstSurface, + /* [annotation] */ + _In_ UINT IVSize, + /* [annotation] */ + _Inout_opt_bytecount_(IVSize) void *pIV) = 0; + + virtual void STDMETHODCALLTYPE DecryptionBlt( + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ ID3D11Texture2D *pSrcSurface, + /* [annotation] */ + _In_ ID3D11Texture2D *pDstSurface, + /* [annotation] */ + _In_opt_ D3D11_ENCRYPTED_BLOCK_INFO *pEncryptedBlockInfo, + /* [annotation] */ + _In_ UINT ContentKeySize, + /* [annotation] */ + _In_reads_bytes_opt_(ContentKeySize) const void *pContentKey, + /* [annotation] */ + _In_ UINT IVSize, + /* [annotation] */ + _Inout_opt_bytecount_(IVSize) void *pIV) = 0; + + virtual void STDMETHODCALLTYPE StartSessionKeyRefresh( + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ UINT RandomNumberSize, + /* [annotation] */ + _Out_writes_bytes_(RandomNumberSize) void *pRandomNumber) = 0; + + virtual void STDMETHODCALLTYPE FinishSessionKeyRefresh( + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetEncryptionBltKey( + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ UINT KeySize, + /* [annotation] */ + _Out_writes_bytes_(KeySize) void *pReadbackKey) = 0; + + virtual HRESULT STDMETHODCALLTYPE NegotiateAuthenticatedChannelKeyExchange( + /* [annotation] */ + _In_ ID3D11AuthenticatedChannel *pChannel, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _Inout_updates_bytes_(DataSize) void *pData) = 0; + + virtual HRESULT STDMETHODCALLTYPE QueryAuthenticatedChannel( + /* [annotation] */ + _In_ ID3D11AuthenticatedChannel *pChannel, + /* [annotation] */ + _In_ UINT InputSize, + /* [annotation] */ + _In_reads_bytes_(InputSize) const void *pInput, + /* [annotation] */ + _In_ UINT OutputSize, + /* [annotation] */ + _Out_writes_bytes_(OutputSize) void *pOutput) = 0; + + virtual HRESULT STDMETHODCALLTYPE ConfigureAuthenticatedChannel( + /* [annotation] */ + _In_ ID3D11AuthenticatedChannel *pChannel, + /* [annotation] */ + _In_ UINT InputSize, + /* [annotation] */ + _In_reads_bytes_(InputSize) const void *pInput, + /* [annotation] */ + _Out_ D3D11_AUTHENTICATED_CONFIGURE_OUTPUT *pOutput) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamRotation( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_ROTATION Rotation) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamRotation( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnable, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_ROTATION *pRotation) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11VideoContextVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11VideoContext * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11VideoContext * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11VideoContext * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11VideoContext * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *GetDecoderBuffer )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type, + /* [annotation] */ + _Out_ UINT *pBufferSize, + /* [annotation] */ + _Outptr_result_bytebuffer_(*pBufferSize) void **ppBuffer); + + HRESULT ( STDMETHODCALLTYPE *ReleaseDecoderBuffer )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ D3D11_VIDEO_DECODER_BUFFER_TYPE Type); + + HRESULT ( STDMETHODCALLTYPE *DecoderBeginFrame )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ ID3D11VideoDecoderOutputView *pView, + UINT ContentKeySize, + /* [annotation] */ + _In_reads_bytes_opt_(ContentKeySize) const void *pContentKey); + + HRESULT ( STDMETHODCALLTYPE *DecoderEndFrame )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder); + + HRESULT ( STDMETHODCALLTYPE *SubmitDecoderBuffers )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ UINT NumBuffers, + /* [annotation] */ + _In_reads_(NumBuffers) const D3D11_VIDEO_DECODER_BUFFER_DESC *pBufferDesc); + + APP_DEPRECATED_HRESULT ( STDMETHODCALLTYPE *DecoderExtension )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_EXTENSION *pExtensionData); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputTargetRect )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_opt_ const RECT *pRect); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputBackgroundColor )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ BOOL YCbCr, + /* [annotation] */ + _In_ const D3D11_VIDEO_COLOR *pColor); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputColorSpace )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *pColorSpace); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputAlphaFillMode )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE AlphaFillMode, + /* [annotation] */ + _In_ UINT StreamIndex); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputConstriction )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ SIZE Size); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputStereoMode )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ BOOL Enable); + + APP_DEPRECATED_HRESULT ( STDMETHODCALLTYPE *VideoProcessorSetOutputExtension )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ const GUID *pExtensionGuid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_ void *pData); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputTargetRect )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ BOOL *Enabled, + /* [annotation] */ + _Out_ RECT *pRect); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputBackgroundColor )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ BOOL *pYCbCr, + /* [annotation] */ + _Out_ D3D11_VIDEO_COLOR *pColor); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputColorSpace )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_COLOR_SPACE *pColorSpace); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputAlphaFillMode )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE *pAlphaFillMode, + /* [annotation] */ + _Out_ UINT *pStreamIndex); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputConstriction )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ SIZE *pSize); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputStereoMode )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ BOOL *pEnabled); + + APP_DEPRECATED_HRESULT ( STDMETHODCALLTYPE *VideoProcessorGetOutputExtension )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ const GUID *pExtensionGuid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _Out_writes_bytes_(DataSize) void *pData); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamFrameFormat )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ D3D11_VIDEO_FRAME_FORMAT FrameFormat); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamColorSpace )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *pColorSpace); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamOutputRate )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_OUTPUT_RATE OutputRate, + /* [annotation] */ + _In_ BOOL RepeatFrame, + /* [annotation] */ + _In_opt_ const DXGI_RATIONAL *pCustomRate); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamSourceRect )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_opt_ const RECT *pRect); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamDestRect )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_opt_ const RECT *pRect); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamAlpha )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ FLOAT Alpha); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamPalette )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ UINT Count, + /* [annotation] */ + _In_reads_opt_(Count) const UINT *pEntries); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamPixelAspectRatio )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_opt_ const DXGI_RATIONAL *pSourceAspectRatio, + /* [annotation] */ + _In_opt_ const DXGI_RATIONAL *pDestinationAspectRatio); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamLumaKey )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ FLOAT Lower, + /* [annotation] */ + _In_ FLOAT Upper); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamStereoFormat )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_STEREO_FORMAT Format, + /* [annotation] */ + _In_ BOOL LeftViewFrame0, + /* [annotation] */ + _In_ BOOL BaseViewFrame0, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE FlipMode, + /* [annotation] */ + _In_ int MonoOffset); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamAutoProcessingMode )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamFilter )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_FILTER Filter, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ int Level); + + APP_DEPRECATED_HRESULT ( STDMETHODCALLTYPE *VideoProcessorSetStreamExtension )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ const GUID *pExtensionGuid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_ void *pData); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamFrameFormat )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ D3D11_VIDEO_FRAME_FORMAT *pFrameFormat); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamColorSpace )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_COLOR_SPACE *pColorSpace); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamOutputRate )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_OUTPUT_RATE *pOutputRate, + /* [annotation] */ + _Out_ BOOL *pRepeatFrame, + /* [annotation] */ + _Out_ DXGI_RATIONAL *pCustomRate); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamSourceRect )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ RECT *pRect); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamDestRect )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ RECT *pRect); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamAlpha )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ FLOAT *pAlpha); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamPalette )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ UINT Count, + /* [annotation] */ + _Out_writes_(Count) UINT *pEntries); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamPixelAspectRatio )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ DXGI_RATIONAL *pSourceAspectRatio, + /* [annotation] */ + _Out_ DXGI_RATIONAL *pDestinationAspectRatio); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamLumaKey )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ FLOAT *pLower, + /* [annotation] */ + _Out_ FLOAT *pUpper); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamStereoFormat )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnable, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_STEREO_FORMAT *pFormat, + /* [annotation] */ + _Out_ BOOL *pLeftViewFrame0, + /* [annotation] */ + _Out_ BOOL *pBaseViewFrame0, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE *pFlipMode, + /* [annotation] */ + _Out_ int *MonoOffset); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamAutoProcessingMode )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamFilter )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_FILTER Filter, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ int *pLevel); + + APP_DEPRECATED_HRESULT ( STDMETHODCALLTYPE *VideoProcessorGetStreamExtension )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ const GUID *pExtensionGuid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _Out_writes_bytes_(DataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *VideoProcessorBlt )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ ID3D11VideoProcessorOutputView *pView, + /* [annotation] */ + _In_ UINT OutputFrame, + /* [annotation] */ + _In_ UINT StreamCount, + /* [annotation] */ + _In_reads_(StreamCount) const D3D11_VIDEO_PROCESSOR_STREAM *pStreams); + + HRESULT ( STDMETHODCALLTYPE *NegotiateCryptoSessionKeyExchange )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _Inout_updates_bytes_(DataSize) void *pData); + + void ( STDMETHODCALLTYPE *EncryptionBlt )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ ID3D11Texture2D *pSrcSurface, + /* [annotation] */ + _In_ ID3D11Texture2D *pDstSurface, + /* [annotation] */ + _In_ UINT IVSize, + /* [annotation] */ + _Inout_opt_bytecount_(IVSize) void *pIV); + + void ( STDMETHODCALLTYPE *DecryptionBlt )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ ID3D11Texture2D *pSrcSurface, + /* [annotation] */ + _In_ ID3D11Texture2D *pDstSurface, + /* [annotation] */ + _In_opt_ D3D11_ENCRYPTED_BLOCK_INFO *pEncryptedBlockInfo, + /* [annotation] */ + _In_ UINT ContentKeySize, + /* [annotation] */ + _In_reads_bytes_opt_(ContentKeySize) const void *pContentKey, + /* [annotation] */ + _In_ UINT IVSize, + /* [annotation] */ + _Inout_opt_bytecount_(IVSize) void *pIV); + + void ( STDMETHODCALLTYPE *StartSessionKeyRefresh )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ UINT RandomNumberSize, + /* [annotation] */ + _Out_writes_bytes_(RandomNumberSize) void *pRandomNumber); + + void ( STDMETHODCALLTYPE *FinishSessionKeyRefresh )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession); + + HRESULT ( STDMETHODCALLTYPE *GetEncryptionBltKey )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ UINT KeySize, + /* [annotation] */ + _Out_writes_bytes_(KeySize) void *pReadbackKey); + + HRESULT ( STDMETHODCALLTYPE *NegotiateAuthenticatedChannelKeyExchange )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11AuthenticatedChannel *pChannel, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _Inout_updates_bytes_(DataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *QueryAuthenticatedChannel )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11AuthenticatedChannel *pChannel, + /* [annotation] */ + _In_ UINT InputSize, + /* [annotation] */ + _In_reads_bytes_(InputSize) const void *pInput, + /* [annotation] */ + _In_ UINT OutputSize, + /* [annotation] */ + _Out_writes_bytes_(OutputSize) void *pOutput); + + HRESULT ( STDMETHODCALLTYPE *ConfigureAuthenticatedChannel )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11AuthenticatedChannel *pChannel, + /* [annotation] */ + _In_ UINT InputSize, + /* [annotation] */ + _In_reads_bytes_(InputSize) const void *pInput, + /* [annotation] */ + _Out_ D3D11_AUTHENTICATED_CONFIGURE_OUTPUT *pOutput); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamRotation )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_ROTATION Rotation); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamRotation )( + ID3D11VideoContext * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnable, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_ROTATION *pRotation); + + END_INTERFACE + } ID3D11VideoContextVtbl; + + interface ID3D11VideoContext + { + CONST_VTBL struct ID3D11VideoContextVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11VideoContext_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11VideoContext_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11VideoContext_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11VideoContext_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11VideoContext_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11VideoContext_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11VideoContext_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11VideoContext_GetDecoderBuffer(This,pDecoder,Type,pBufferSize,ppBuffer) \ + ( (This)->lpVtbl -> GetDecoderBuffer(This,pDecoder,Type,pBufferSize,ppBuffer) ) + +#define ID3D11VideoContext_ReleaseDecoderBuffer(This,pDecoder,Type) \ + ( (This)->lpVtbl -> ReleaseDecoderBuffer(This,pDecoder,Type) ) + +#define ID3D11VideoContext_DecoderBeginFrame(This,pDecoder,pView,ContentKeySize,pContentKey) \ + ( (This)->lpVtbl -> DecoderBeginFrame(This,pDecoder,pView,ContentKeySize,pContentKey) ) + +#define ID3D11VideoContext_DecoderEndFrame(This,pDecoder) \ + ( (This)->lpVtbl -> DecoderEndFrame(This,pDecoder) ) + +#define ID3D11VideoContext_SubmitDecoderBuffers(This,pDecoder,NumBuffers,pBufferDesc) \ + ( (This)->lpVtbl -> SubmitDecoderBuffers(This,pDecoder,NumBuffers,pBufferDesc) ) + +#define ID3D11VideoContext_DecoderExtension(This,pDecoder,pExtensionData) \ + ( (This)->lpVtbl -> DecoderExtension(This,pDecoder,pExtensionData) ) + +#define ID3D11VideoContext_VideoProcessorSetOutputTargetRect(This,pVideoProcessor,Enable,pRect) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputTargetRect(This,pVideoProcessor,Enable,pRect) ) + +#define ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor(This,pVideoProcessor,YCbCr,pColor) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputBackgroundColor(This,pVideoProcessor,YCbCr,pColor) ) + +#define ID3D11VideoContext_VideoProcessorSetOutputColorSpace(This,pVideoProcessor,pColorSpace) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputColorSpace(This,pVideoProcessor,pColorSpace) ) + +#define ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode(This,pVideoProcessor,AlphaFillMode,StreamIndex) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputAlphaFillMode(This,pVideoProcessor,AlphaFillMode,StreamIndex) ) + +#define ID3D11VideoContext_VideoProcessorSetOutputConstriction(This,pVideoProcessor,Enable,Size) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputConstriction(This,pVideoProcessor,Enable,Size) ) + +#define ID3D11VideoContext_VideoProcessorSetOutputStereoMode(This,pVideoProcessor,Enable) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputStereoMode(This,pVideoProcessor,Enable) ) + +#define ID3D11VideoContext_VideoProcessorSetOutputExtension(This,pVideoProcessor,pExtensionGuid,DataSize,pData) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputExtension(This,pVideoProcessor,pExtensionGuid,DataSize,pData) ) + +#define ID3D11VideoContext_VideoProcessorGetOutputTargetRect(This,pVideoProcessor,Enabled,pRect) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputTargetRect(This,pVideoProcessor,Enabled,pRect) ) + +#define ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor(This,pVideoProcessor,pYCbCr,pColor) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputBackgroundColor(This,pVideoProcessor,pYCbCr,pColor) ) + +#define ID3D11VideoContext_VideoProcessorGetOutputColorSpace(This,pVideoProcessor,pColorSpace) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputColorSpace(This,pVideoProcessor,pColorSpace) ) + +#define ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode(This,pVideoProcessor,pAlphaFillMode,pStreamIndex) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputAlphaFillMode(This,pVideoProcessor,pAlphaFillMode,pStreamIndex) ) + +#define ID3D11VideoContext_VideoProcessorGetOutputConstriction(This,pVideoProcessor,pEnabled,pSize) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputConstriction(This,pVideoProcessor,pEnabled,pSize) ) + +#define ID3D11VideoContext_VideoProcessorGetOutputStereoMode(This,pVideoProcessor,pEnabled) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputStereoMode(This,pVideoProcessor,pEnabled) ) + +#define ID3D11VideoContext_VideoProcessorGetOutputExtension(This,pVideoProcessor,pExtensionGuid,DataSize,pData) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputExtension(This,pVideoProcessor,pExtensionGuid,DataSize,pData) ) + +#define ID3D11VideoContext_VideoProcessorSetStreamFrameFormat(This,pVideoProcessor,StreamIndex,FrameFormat) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamFrameFormat(This,pVideoProcessor,StreamIndex,FrameFormat) ) + +#define ID3D11VideoContext_VideoProcessorSetStreamColorSpace(This,pVideoProcessor,StreamIndex,pColorSpace) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamColorSpace(This,pVideoProcessor,StreamIndex,pColorSpace) ) + +#define ID3D11VideoContext_VideoProcessorSetStreamOutputRate(This,pVideoProcessor,StreamIndex,OutputRate,RepeatFrame,pCustomRate) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamOutputRate(This,pVideoProcessor,StreamIndex,OutputRate,RepeatFrame,pCustomRate) ) + +#define ID3D11VideoContext_VideoProcessorSetStreamSourceRect(This,pVideoProcessor,StreamIndex,Enable,pRect) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamSourceRect(This,pVideoProcessor,StreamIndex,Enable,pRect) ) + +#define ID3D11VideoContext_VideoProcessorSetStreamDestRect(This,pVideoProcessor,StreamIndex,Enable,pRect) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamDestRect(This,pVideoProcessor,StreamIndex,Enable,pRect) ) + +#define ID3D11VideoContext_VideoProcessorSetStreamAlpha(This,pVideoProcessor,StreamIndex,Enable,Alpha) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamAlpha(This,pVideoProcessor,StreamIndex,Enable,Alpha) ) + +#define ID3D11VideoContext_VideoProcessorSetStreamPalette(This,pVideoProcessor,StreamIndex,Count,pEntries) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamPalette(This,pVideoProcessor,StreamIndex,Count,pEntries) ) + +#define ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio(This,pVideoProcessor,StreamIndex,Enable,pSourceAspectRatio,pDestinationAspectRatio) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamPixelAspectRatio(This,pVideoProcessor,StreamIndex,Enable,pSourceAspectRatio,pDestinationAspectRatio) ) + +#define ID3D11VideoContext_VideoProcessorSetStreamLumaKey(This,pVideoProcessor,StreamIndex,Enable,Lower,Upper) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamLumaKey(This,pVideoProcessor,StreamIndex,Enable,Lower,Upper) ) + +#define ID3D11VideoContext_VideoProcessorSetStreamStereoFormat(This,pVideoProcessor,StreamIndex,Enable,Format,LeftViewFrame0,BaseViewFrame0,FlipMode,MonoOffset) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamStereoFormat(This,pVideoProcessor,StreamIndex,Enable,Format,LeftViewFrame0,BaseViewFrame0,FlipMode,MonoOffset) ) + +#define ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode(This,pVideoProcessor,StreamIndex,Enable) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamAutoProcessingMode(This,pVideoProcessor,StreamIndex,Enable) ) + +#define ID3D11VideoContext_VideoProcessorSetStreamFilter(This,pVideoProcessor,StreamIndex,Filter,Enable,Level) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamFilter(This,pVideoProcessor,StreamIndex,Filter,Enable,Level) ) + +#define ID3D11VideoContext_VideoProcessorSetStreamExtension(This,pVideoProcessor,StreamIndex,pExtensionGuid,DataSize,pData) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamExtension(This,pVideoProcessor,StreamIndex,pExtensionGuid,DataSize,pData) ) + +#define ID3D11VideoContext_VideoProcessorGetStreamFrameFormat(This,pVideoProcessor,StreamIndex,pFrameFormat) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamFrameFormat(This,pVideoProcessor,StreamIndex,pFrameFormat) ) + +#define ID3D11VideoContext_VideoProcessorGetStreamColorSpace(This,pVideoProcessor,StreamIndex,pColorSpace) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamColorSpace(This,pVideoProcessor,StreamIndex,pColorSpace) ) + +#define ID3D11VideoContext_VideoProcessorGetStreamOutputRate(This,pVideoProcessor,StreamIndex,pOutputRate,pRepeatFrame,pCustomRate) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamOutputRate(This,pVideoProcessor,StreamIndex,pOutputRate,pRepeatFrame,pCustomRate) ) + +#define ID3D11VideoContext_VideoProcessorGetStreamSourceRect(This,pVideoProcessor,StreamIndex,pEnabled,pRect) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamSourceRect(This,pVideoProcessor,StreamIndex,pEnabled,pRect) ) + +#define ID3D11VideoContext_VideoProcessorGetStreamDestRect(This,pVideoProcessor,StreamIndex,pEnabled,pRect) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamDestRect(This,pVideoProcessor,StreamIndex,pEnabled,pRect) ) + +#define ID3D11VideoContext_VideoProcessorGetStreamAlpha(This,pVideoProcessor,StreamIndex,pEnabled,pAlpha) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamAlpha(This,pVideoProcessor,StreamIndex,pEnabled,pAlpha) ) + +#define ID3D11VideoContext_VideoProcessorGetStreamPalette(This,pVideoProcessor,StreamIndex,Count,pEntries) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamPalette(This,pVideoProcessor,StreamIndex,Count,pEntries) ) + +#define ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio(This,pVideoProcessor,StreamIndex,pEnabled,pSourceAspectRatio,pDestinationAspectRatio) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamPixelAspectRatio(This,pVideoProcessor,StreamIndex,pEnabled,pSourceAspectRatio,pDestinationAspectRatio) ) + +#define ID3D11VideoContext_VideoProcessorGetStreamLumaKey(This,pVideoProcessor,StreamIndex,pEnabled,pLower,pUpper) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamLumaKey(This,pVideoProcessor,StreamIndex,pEnabled,pLower,pUpper) ) + +#define ID3D11VideoContext_VideoProcessorGetStreamStereoFormat(This,pVideoProcessor,StreamIndex,pEnable,pFormat,pLeftViewFrame0,pBaseViewFrame0,pFlipMode,MonoOffset) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamStereoFormat(This,pVideoProcessor,StreamIndex,pEnable,pFormat,pLeftViewFrame0,pBaseViewFrame0,pFlipMode,MonoOffset) ) + +#define ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode(This,pVideoProcessor,StreamIndex,pEnabled) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamAutoProcessingMode(This,pVideoProcessor,StreamIndex,pEnabled) ) + +#define ID3D11VideoContext_VideoProcessorGetStreamFilter(This,pVideoProcessor,StreamIndex,Filter,pEnabled,pLevel) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamFilter(This,pVideoProcessor,StreamIndex,Filter,pEnabled,pLevel) ) + +#define ID3D11VideoContext_VideoProcessorGetStreamExtension(This,pVideoProcessor,StreamIndex,pExtensionGuid,DataSize,pData) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamExtension(This,pVideoProcessor,StreamIndex,pExtensionGuid,DataSize,pData) ) + +#define ID3D11VideoContext_VideoProcessorBlt(This,pVideoProcessor,pView,OutputFrame,StreamCount,pStreams) \ + ( (This)->lpVtbl -> VideoProcessorBlt(This,pVideoProcessor,pView,OutputFrame,StreamCount,pStreams) ) + +#define ID3D11VideoContext_NegotiateCryptoSessionKeyExchange(This,pCryptoSession,DataSize,pData) \ + ( (This)->lpVtbl -> NegotiateCryptoSessionKeyExchange(This,pCryptoSession,DataSize,pData) ) + +#define ID3D11VideoContext_EncryptionBlt(This,pCryptoSession,pSrcSurface,pDstSurface,IVSize,pIV) \ + ( (This)->lpVtbl -> EncryptionBlt(This,pCryptoSession,pSrcSurface,pDstSurface,IVSize,pIV) ) + +#define ID3D11VideoContext_DecryptionBlt(This,pCryptoSession,pSrcSurface,pDstSurface,pEncryptedBlockInfo,ContentKeySize,pContentKey,IVSize,pIV) \ + ( (This)->lpVtbl -> DecryptionBlt(This,pCryptoSession,pSrcSurface,pDstSurface,pEncryptedBlockInfo,ContentKeySize,pContentKey,IVSize,pIV) ) + +#define ID3D11VideoContext_StartSessionKeyRefresh(This,pCryptoSession,RandomNumberSize,pRandomNumber) \ + ( (This)->lpVtbl -> StartSessionKeyRefresh(This,pCryptoSession,RandomNumberSize,pRandomNumber) ) + +#define ID3D11VideoContext_FinishSessionKeyRefresh(This,pCryptoSession) \ + ( (This)->lpVtbl -> FinishSessionKeyRefresh(This,pCryptoSession) ) + +#define ID3D11VideoContext_GetEncryptionBltKey(This,pCryptoSession,KeySize,pReadbackKey) \ + ( (This)->lpVtbl -> GetEncryptionBltKey(This,pCryptoSession,KeySize,pReadbackKey) ) + +#define ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange(This,pChannel,DataSize,pData) \ + ( (This)->lpVtbl -> NegotiateAuthenticatedChannelKeyExchange(This,pChannel,DataSize,pData) ) + +#define ID3D11VideoContext_QueryAuthenticatedChannel(This,pChannel,InputSize,pInput,OutputSize,pOutput) \ + ( (This)->lpVtbl -> QueryAuthenticatedChannel(This,pChannel,InputSize,pInput,OutputSize,pOutput) ) + +#define ID3D11VideoContext_ConfigureAuthenticatedChannel(This,pChannel,InputSize,pInput,pOutput) \ + ( (This)->lpVtbl -> ConfigureAuthenticatedChannel(This,pChannel,InputSize,pInput,pOutput) ) + +#define ID3D11VideoContext_VideoProcessorSetStreamRotation(This,pVideoProcessor,StreamIndex,Enable,Rotation) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamRotation(This,pVideoProcessor,StreamIndex,Enable,Rotation) ) + +#define ID3D11VideoContext_VideoProcessorGetStreamRotation(This,pVideoProcessor,StreamIndex,pEnable,pRotation) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamRotation(This,pVideoProcessor,StreamIndex,pEnable,pRotation) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11VideoContext_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11VideoDevice_INTERFACE_DEFINED__ +#define __ID3D11VideoDevice_INTERFACE_DEFINED__ + +/* interface ID3D11VideoDevice */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11VideoDevice; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("10EC4D5B-975A-4689-B9E4-D0AAC30FE333") + ID3D11VideoDevice : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE CreateVideoDecoder( + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_DESC *pVideoDesc, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_CONFIG *pConfig, + /* [annotation] */ + _COM_Outptr_ ID3D11VideoDecoder **ppDecoder) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateVideoProcessor( + /* [annotation] */ + _In_ ID3D11VideoProcessorEnumerator *pEnum, + /* [annotation] */ + _In_ UINT RateConversionIndex, + /* [annotation] */ + _COM_Outptr_ ID3D11VideoProcessor **ppVideoProcessor) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateAuthenticatedChannel( + /* [annotation] */ + _In_ D3D11_AUTHENTICATED_CHANNEL_TYPE ChannelType, + /* [annotation] */ + _COM_Outptr_ ID3D11AuthenticatedChannel **ppAuthenticatedChannel) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateCryptoSession( + /* [annotation] */ + _In_ const GUID *pCryptoType, + /* [annotation] */ + _In_opt_ const GUID *pDecoderProfile, + /* [annotation] */ + _In_ const GUID *pKeyExchangeType, + /* [annotation] */ + _COM_Outptr_ ID3D11CryptoSession **ppCryptoSession) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateVideoDecoderOutputView( + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11VideoDecoderOutputView **ppVDOVView) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateVideoProcessorInputView( + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_ ID3D11VideoProcessorEnumerator *pEnum, + /* [annotation] */ + _In_ const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11VideoProcessorInputView **ppVPIView) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateVideoProcessorOutputView( + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_ ID3D11VideoProcessorEnumerator *pEnum, + /* [annotation] */ + _In_ const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11VideoProcessorOutputView **ppVPOView) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateVideoProcessorEnumerator( + /* [annotation] */ + _In_ const D3D11_VIDEO_PROCESSOR_CONTENT_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_ ID3D11VideoProcessorEnumerator **ppEnum) = 0; + + virtual UINT STDMETHODCALLTYPE GetVideoDecoderProfileCount( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVideoDecoderProfile( + /* [annotation] */ + _In_ UINT Index, + /* [annotation] */ + _Out_ GUID *pDecoderProfile) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckVideoDecoderFormat( + /* [annotation] */ + _In_ const GUID *pDecoderProfile, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _Out_ BOOL *pSupported) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVideoDecoderConfigCount( + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_DESC *pDesc, + /* [annotation] */ + _Out_ UINT *pCount) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVideoDecoderConfig( + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_DESC *pDesc, + /* [annotation] */ + _In_ UINT Index, + /* [annotation] */ + _Out_ D3D11_VIDEO_DECODER_CONFIG *pConfig) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetContentProtectionCaps( + /* [annotation] */ + _In_opt_ const GUID *pCryptoType, + /* [annotation] */ + _In_opt_ const GUID *pDecoderProfile, + /* [annotation] */ + _Out_ D3D11_VIDEO_CONTENT_PROTECTION_CAPS *pCaps) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckCryptoKeyExchange( + /* [annotation] */ + _In_ const GUID *pCryptoType, + /* [annotation] */ + _In_opt_ const GUID *pDecoderProfile, + /* [annotation] */ + _In_ UINT Index, + /* [annotation] */ + _Out_ GUID *pKeyExchangeType) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPrivateData( + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPrivateDataInterface( + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11VideoDeviceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11VideoDevice * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11VideoDevice * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11VideoDevice * This); + + HRESULT ( STDMETHODCALLTYPE *CreateVideoDecoder )( + ID3D11VideoDevice * This, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_DESC *pVideoDesc, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_CONFIG *pConfig, + /* [annotation] */ + _COM_Outptr_ ID3D11VideoDecoder **ppDecoder); + + HRESULT ( STDMETHODCALLTYPE *CreateVideoProcessor )( + ID3D11VideoDevice * This, + /* [annotation] */ + _In_ ID3D11VideoProcessorEnumerator *pEnum, + /* [annotation] */ + _In_ UINT RateConversionIndex, + /* [annotation] */ + _COM_Outptr_ ID3D11VideoProcessor **ppVideoProcessor); + + HRESULT ( STDMETHODCALLTYPE *CreateAuthenticatedChannel )( + ID3D11VideoDevice * This, + /* [annotation] */ + _In_ D3D11_AUTHENTICATED_CHANNEL_TYPE ChannelType, + /* [annotation] */ + _COM_Outptr_ ID3D11AuthenticatedChannel **ppAuthenticatedChannel); + + HRESULT ( STDMETHODCALLTYPE *CreateCryptoSession )( + ID3D11VideoDevice * This, + /* [annotation] */ + _In_ const GUID *pCryptoType, + /* [annotation] */ + _In_opt_ const GUID *pDecoderProfile, + /* [annotation] */ + _In_ const GUID *pKeyExchangeType, + /* [annotation] */ + _COM_Outptr_ ID3D11CryptoSession **ppCryptoSession); + + HRESULT ( STDMETHODCALLTYPE *CreateVideoDecoderOutputView )( + ID3D11VideoDevice * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11VideoDecoderOutputView **ppVDOVView); + + HRESULT ( STDMETHODCALLTYPE *CreateVideoProcessorInputView )( + ID3D11VideoDevice * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_ ID3D11VideoProcessorEnumerator *pEnum, + /* [annotation] */ + _In_ const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11VideoProcessorInputView **ppVPIView); + + HRESULT ( STDMETHODCALLTYPE *CreateVideoProcessorOutputView )( + ID3D11VideoDevice * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_ ID3D11VideoProcessorEnumerator *pEnum, + /* [annotation] */ + _In_ const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11VideoProcessorOutputView **ppVPOView); + + HRESULT ( STDMETHODCALLTYPE *CreateVideoProcessorEnumerator )( + ID3D11VideoDevice * This, + /* [annotation] */ + _In_ const D3D11_VIDEO_PROCESSOR_CONTENT_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_ ID3D11VideoProcessorEnumerator **ppEnum); + + UINT ( STDMETHODCALLTYPE *GetVideoDecoderProfileCount )( + ID3D11VideoDevice * This); + + HRESULT ( STDMETHODCALLTYPE *GetVideoDecoderProfile )( + ID3D11VideoDevice * This, + /* [annotation] */ + _In_ UINT Index, + /* [annotation] */ + _Out_ GUID *pDecoderProfile); + + HRESULT ( STDMETHODCALLTYPE *CheckVideoDecoderFormat )( + ID3D11VideoDevice * This, + /* [annotation] */ + _In_ const GUID *pDecoderProfile, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _Out_ BOOL *pSupported); + + HRESULT ( STDMETHODCALLTYPE *GetVideoDecoderConfigCount )( + ID3D11VideoDevice * This, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_DESC *pDesc, + /* [annotation] */ + _Out_ UINT *pCount); + + HRESULT ( STDMETHODCALLTYPE *GetVideoDecoderConfig )( + ID3D11VideoDevice * This, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_DESC *pDesc, + /* [annotation] */ + _In_ UINT Index, + /* [annotation] */ + _Out_ D3D11_VIDEO_DECODER_CONFIG *pConfig); + + HRESULT ( STDMETHODCALLTYPE *GetContentProtectionCaps )( + ID3D11VideoDevice * This, + /* [annotation] */ + _In_opt_ const GUID *pCryptoType, + /* [annotation] */ + _In_opt_ const GUID *pDecoderProfile, + /* [annotation] */ + _Out_ D3D11_VIDEO_CONTENT_PROTECTION_CAPS *pCaps); + + HRESULT ( STDMETHODCALLTYPE *CheckCryptoKeyExchange )( + ID3D11VideoDevice * This, + /* [annotation] */ + _In_ const GUID *pCryptoType, + /* [annotation] */ + _In_opt_ const GUID *pDecoderProfile, + /* [annotation] */ + _In_ UINT Index, + /* [annotation] */ + _Out_ GUID *pKeyExchangeType); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11VideoDevice * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11VideoDevice * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + END_INTERFACE + } ID3D11VideoDeviceVtbl; + + interface ID3D11VideoDevice + { + CONST_VTBL struct ID3D11VideoDeviceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11VideoDevice_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11VideoDevice_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11VideoDevice_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11VideoDevice_CreateVideoDecoder(This,pVideoDesc,pConfig,ppDecoder) \ + ( (This)->lpVtbl -> CreateVideoDecoder(This,pVideoDesc,pConfig,ppDecoder) ) + +#define ID3D11VideoDevice_CreateVideoProcessor(This,pEnum,RateConversionIndex,ppVideoProcessor) \ + ( (This)->lpVtbl -> CreateVideoProcessor(This,pEnum,RateConversionIndex,ppVideoProcessor) ) + +#define ID3D11VideoDevice_CreateAuthenticatedChannel(This,ChannelType,ppAuthenticatedChannel) \ + ( (This)->lpVtbl -> CreateAuthenticatedChannel(This,ChannelType,ppAuthenticatedChannel) ) + +#define ID3D11VideoDevice_CreateCryptoSession(This,pCryptoType,pDecoderProfile,pKeyExchangeType,ppCryptoSession) \ + ( (This)->lpVtbl -> CreateCryptoSession(This,pCryptoType,pDecoderProfile,pKeyExchangeType,ppCryptoSession) ) + +#define ID3D11VideoDevice_CreateVideoDecoderOutputView(This,pResource,pDesc,ppVDOVView) \ + ( (This)->lpVtbl -> CreateVideoDecoderOutputView(This,pResource,pDesc,ppVDOVView) ) + +#define ID3D11VideoDevice_CreateVideoProcessorInputView(This,pResource,pEnum,pDesc,ppVPIView) \ + ( (This)->lpVtbl -> CreateVideoProcessorInputView(This,pResource,pEnum,pDesc,ppVPIView) ) + +#define ID3D11VideoDevice_CreateVideoProcessorOutputView(This,pResource,pEnum,pDesc,ppVPOView) \ + ( (This)->lpVtbl -> CreateVideoProcessorOutputView(This,pResource,pEnum,pDesc,ppVPOView) ) + +#define ID3D11VideoDevice_CreateVideoProcessorEnumerator(This,pDesc,ppEnum) \ + ( (This)->lpVtbl -> CreateVideoProcessorEnumerator(This,pDesc,ppEnum) ) + +#define ID3D11VideoDevice_GetVideoDecoderProfileCount(This) \ + ( (This)->lpVtbl -> GetVideoDecoderProfileCount(This) ) + +#define ID3D11VideoDevice_GetVideoDecoderProfile(This,Index,pDecoderProfile) \ + ( (This)->lpVtbl -> GetVideoDecoderProfile(This,Index,pDecoderProfile) ) + +#define ID3D11VideoDevice_CheckVideoDecoderFormat(This,pDecoderProfile,Format,pSupported) \ + ( (This)->lpVtbl -> CheckVideoDecoderFormat(This,pDecoderProfile,Format,pSupported) ) + +#define ID3D11VideoDevice_GetVideoDecoderConfigCount(This,pDesc,pCount) \ + ( (This)->lpVtbl -> GetVideoDecoderConfigCount(This,pDesc,pCount) ) + +#define ID3D11VideoDevice_GetVideoDecoderConfig(This,pDesc,Index,pConfig) \ + ( (This)->lpVtbl -> GetVideoDecoderConfig(This,pDesc,Index,pConfig) ) + +#define ID3D11VideoDevice_GetContentProtectionCaps(This,pCryptoType,pDecoderProfile,pCaps) \ + ( (This)->lpVtbl -> GetContentProtectionCaps(This,pCryptoType,pDecoderProfile,pCaps) ) + +#define ID3D11VideoDevice_CheckCryptoKeyExchange(This,pCryptoType,pDecoderProfile,Index,pKeyExchangeType) \ + ( (This)->lpVtbl -> CheckCryptoKeyExchange(This,pCryptoType,pDecoderProfile,Index,pKeyExchangeType) ) + +#define ID3D11VideoDevice_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11VideoDevice_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11VideoDevice_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0040 */ +/* [local] */ + +/*#include */ + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0040_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0040_v0_0_s_ifspec; + +#ifndef __ID3D11Device_INTERFACE_DEFINED__ +#define __ID3D11Device_INTERFACE_DEFINED__ + +/* interface ID3D11Device */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11Device; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("db6f6ddb-ac77-4e88-8253-819df9bbf140") + ID3D11Device : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE CreateBuffer( + /* [annotation] */ + _In_ const D3D11_BUFFER_DESC *pDesc, + /* [annotation] */ + _In_opt_ const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Buffer **ppBuffer) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateTexture1D( + /* [annotation] */ + _In_ const D3D11_TEXTURE1D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels * pDesc->ArraySize)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture1D **ppTexture1D) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateTexture2D( + /* [annotation] */ + _In_ const D3D11_TEXTURE2D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels * pDesc->ArraySize)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture2D **ppTexture2D) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateTexture3D( + /* [annotation] */ + _In_ const D3D11_TEXTURE3D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture3D **ppTexture3D) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateShaderResourceView( + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11ShaderResourceView **ppSRView) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateUnorderedAccessView( + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11UnorderedAccessView **ppUAView) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateRenderTargetView( + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_RENDER_TARGET_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RenderTargetView **ppRTView) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateDepthStencilView( + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DepthStencilView **ppDepthStencilView) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateInputLayout( + /* [annotation] */ + _In_reads_(NumElements) const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT ) UINT NumElements, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecodeWithInputSignature, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11InputLayout **ppInputLayout) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateVertexShader( + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11VertexShader **ppVertexShader) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateGeometryShader( + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11GeometryShader **ppGeometryShader) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateGeometryShaderWithStreamOutput( + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_reads_opt_(NumEntries) const D3D11_SO_DECLARATION_ENTRY *pSODeclaration, + /* [annotation] */ + _In_range_( 0, D3D11_SO_STREAM_COUNT * D3D11_SO_OUTPUT_COMPONENT_COUNT ) UINT NumEntries, + /* [annotation] */ + _In_reads_opt_(NumStrides) const UINT *pBufferStrides, + /* [annotation] */ + _In_range_( 0, D3D11_SO_BUFFER_SLOT_COUNT ) UINT NumStrides, + /* [annotation] */ + _In_ UINT RasterizedStream, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11GeometryShader **ppGeometryShader) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreatePixelShader( + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11PixelShader **ppPixelShader) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateHullShader( + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11HullShader **ppHullShader) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateDomainShader( + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DomainShader **ppDomainShader) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateComputeShader( + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11ComputeShader **ppComputeShader) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateClassLinkage( + /* [annotation] */ + _COM_Outptr_ ID3D11ClassLinkage **ppLinkage) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateBlendState( + /* [annotation] */ + _In_ const D3D11_BLEND_DESC *pBlendStateDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11BlendState **ppBlendState) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateDepthStencilState( + /* [annotation] */ + _In_ const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DepthStencilState **ppDepthStencilState) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateRasterizerState( + /* [annotation] */ + _In_ const D3D11_RASTERIZER_DESC *pRasterizerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RasterizerState **ppRasterizerState) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSamplerState( + /* [annotation] */ + _In_ const D3D11_SAMPLER_DESC *pSamplerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11SamplerState **ppSamplerState) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateQuery( + /* [annotation] */ + _In_ const D3D11_QUERY_DESC *pQueryDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Query **ppQuery) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreatePredicate( + /* [annotation] */ + _In_ const D3D11_QUERY_DESC *pPredicateDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Predicate **ppPredicate) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateCounter( + /* [annotation] */ + _In_ const D3D11_COUNTER_DESC *pCounterDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Counter **ppCounter) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateDeferredContext( + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext **ppDeferredContext) = 0; + + virtual HRESULT STDMETHODCALLTYPE OpenSharedResource( + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _In_ REFIID ReturnedInterface, + /* [annotation] */ + _COM_Outptr_opt_ void **ppResource) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckFormatSupport( + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _Out_ UINT *pFormatSupport) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckMultisampleQualityLevels( + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT SampleCount, + /* [annotation] */ + _Out_ UINT *pNumQualityLevels) = 0; + + virtual void STDMETHODCALLTYPE CheckCounterInfo( + /* [annotation] */ + _Out_ D3D11_COUNTER_INFO *pCounterInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckCounter( + /* [annotation] */ + _In_ const D3D11_COUNTER_DESC *pDesc, + /* [annotation] */ + _Out_ D3D11_COUNTER_TYPE *pType, + /* [annotation] */ + _Out_ UINT *pActiveCounters, + /* [annotation] */ + _Out_writes_opt_(*pNameLength) LPSTR szName, + /* [annotation] */ + _Inout_opt_ UINT *pNameLength, + /* [annotation] */ + _Out_writes_opt_(*pUnitsLength) LPSTR szUnits, + /* [annotation] */ + _Inout_opt_ UINT *pUnitsLength, + /* [annotation] */ + _Out_writes_opt_(*pDescriptionLength) LPSTR szDescription, + /* [annotation] */ + _Inout_opt_ UINT *pDescriptionLength) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckFeatureSupport( + D3D11_FEATURE Feature, + /* [annotation] */ + _Out_writes_bytes_(FeatureSupportDataSize) void *pFeatureSupportData, + UINT FeatureSupportDataSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPrivateData( + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPrivateData( + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPrivateDataInterface( + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData) = 0; + + virtual D3D_FEATURE_LEVEL STDMETHODCALLTYPE GetFeatureLevel( void) = 0; + + virtual UINT STDMETHODCALLTYPE GetCreationFlags( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDeviceRemovedReason( void) = 0; + + virtual void STDMETHODCALLTYPE GetImmediateContext( + /* [annotation] */ + _Outptr_ ID3D11DeviceContext **ppImmediateContext) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetExceptionMode( + UINT RaiseFlags) = 0; + + virtual UINT STDMETHODCALLTYPE GetExceptionMode( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11DeviceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11Device * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11Device * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11Device * This); + + HRESULT ( STDMETHODCALLTYPE *CreateBuffer )( + ID3D11Device * This, + /* [annotation] */ + _In_ const D3D11_BUFFER_DESC *pDesc, + /* [annotation] */ + _In_opt_ const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Buffer **ppBuffer); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture1D )( + ID3D11Device * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE1D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels * pDesc->ArraySize)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture1D **ppTexture1D); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture2D )( + ID3D11Device * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE2D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels * pDesc->ArraySize)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture2D **ppTexture2D); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture3D )( + ID3D11Device * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE3D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture3D **ppTexture3D); + + HRESULT ( STDMETHODCALLTYPE *CreateShaderResourceView )( + ID3D11Device * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11ShaderResourceView **ppSRView); + + HRESULT ( STDMETHODCALLTYPE *CreateUnorderedAccessView )( + ID3D11Device * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11UnorderedAccessView **ppUAView); + + HRESULT ( STDMETHODCALLTYPE *CreateRenderTargetView )( + ID3D11Device * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_RENDER_TARGET_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RenderTargetView **ppRTView); + + HRESULT ( STDMETHODCALLTYPE *CreateDepthStencilView )( + ID3D11Device * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DepthStencilView **ppDepthStencilView); + + HRESULT ( STDMETHODCALLTYPE *CreateInputLayout )( + ID3D11Device * This, + /* [annotation] */ + _In_reads_(NumElements) const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT ) UINT NumElements, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecodeWithInputSignature, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11InputLayout **ppInputLayout); + + HRESULT ( STDMETHODCALLTYPE *CreateVertexShader )( + ID3D11Device * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11VertexShader **ppVertexShader); + + HRESULT ( STDMETHODCALLTYPE *CreateGeometryShader )( + ID3D11Device * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11GeometryShader **ppGeometryShader); + + HRESULT ( STDMETHODCALLTYPE *CreateGeometryShaderWithStreamOutput )( + ID3D11Device * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_reads_opt_(NumEntries) const D3D11_SO_DECLARATION_ENTRY *pSODeclaration, + /* [annotation] */ + _In_range_( 0, D3D11_SO_STREAM_COUNT * D3D11_SO_OUTPUT_COMPONENT_COUNT ) UINT NumEntries, + /* [annotation] */ + _In_reads_opt_(NumStrides) const UINT *pBufferStrides, + /* [annotation] */ + _In_range_( 0, D3D11_SO_BUFFER_SLOT_COUNT ) UINT NumStrides, + /* [annotation] */ + _In_ UINT RasterizedStream, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11GeometryShader **ppGeometryShader); + + HRESULT ( STDMETHODCALLTYPE *CreatePixelShader )( + ID3D11Device * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11PixelShader **ppPixelShader); + + HRESULT ( STDMETHODCALLTYPE *CreateHullShader )( + ID3D11Device * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11HullShader **ppHullShader); + + HRESULT ( STDMETHODCALLTYPE *CreateDomainShader )( + ID3D11Device * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DomainShader **ppDomainShader); + + HRESULT ( STDMETHODCALLTYPE *CreateComputeShader )( + ID3D11Device * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11ComputeShader **ppComputeShader); + + HRESULT ( STDMETHODCALLTYPE *CreateClassLinkage )( + ID3D11Device * This, + /* [annotation] */ + _COM_Outptr_ ID3D11ClassLinkage **ppLinkage); + + HRESULT ( STDMETHODCALLTYPE *CreateBlendState )( + ID3D11Device * This, + /* [annotation] */ + _In_ const D3D11_BLEND_DESC *pBlendStateDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11BlendState **ppBlendState); + + HRESULT ( STDMETHODCALLTYPE *CreateDepthStencilState )( + ID3D11Device * This, + /* [annotation] */ + _In_ const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DepthStencilState **ppDepthStencilState); + + HRESULT ( STDMETHODCALLTYPE *CreateRasterizerState )( + ID3D11Device * This, + /* [annotation] */ + _In_ const D3D11_RASTERIZER_DESC *pRasterizerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RasterizerState **ppRasterizerState); + + HRESULT ( STDMETHODCALLTYPE *CreateSamplerState )( + ID3D11Device * This, + /* [annotation] */ + _In_ const D3D11_SAMPLER_DESC *pSamplerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11SamplerState **ppSamplerState); + + HRESULT ( STDMETHODCALLTYPE *CreateQuery )( + ID3D11Device * This, + /* [annotation] */ + _In_ const D3D11_QUERY_DESC *pQueryDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Query **ppQuery); + + HRESULT ( STDMETHODCALLTYPE *CreatePredicate )( + ID3D11Device * This, + /* [annotation] */ + _In_ const D3D11_QUERY_DESC *pPredicateDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Predicate **ppPredicate); + + HRESULT ( STDMETHODCALLTYPE *CreateCounter )( + ID3D11Device * This, + /* [annotation] */ + _In_ const D3D11_COUNTER_DESC *pCounterDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Counter **ppCounter); + + HRESULT ( STDMETHODCALLTYPE *CreateDeferredContext )( + ID3D11Device * This, + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext **ppDeferredContext); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedResource )( + ID3D11Device * This, + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _In_ REFIID ReturnedInterface, + /* [annotation] */ + _COM_Outptr_opt_ void **ppResource); + + HRESULT ( STDMETHODCALLTYPE *CheckFormatSupport )( + ID3D11Device * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _Out_ UINT *pFormatSupport); + + HRESULT ( STDMETHODCALLTYPE *CheckMultisampleQualityLevels )( + ID3D11Device * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT SampleCount, + /* [annotation] */ + _Out_ UINT *pNumQualityLevels); + + void ( STDMETHODCALLTYPE *CheckCounterInfo )( + ID3D11Device * This, + /* [annotation] */ + _Out_ D3D11_COUNTER_INFO *pCounterInfo); + + HRESULT ( STDMETHODCALLTYPE *CheckCounter )( + ID3D11Device * This, + /* [annotation] */ + _In_ const D3D11_COUNTER_DESC *pDesc, + /* [annotation] */ + _Out_ D3D11_COUNTER_TYPE *pType, + /* [annotation] */ + _Out_ UINT *pActiveCounters, + /* [annotation] */ + _Out_writes_opt_(*pNameLength) LPSTR szName, + /* [annotation] */ + _Inout_opt_ UINT *pNameLength, + /* [annotation] */ + _Out_writes_opt_(*pUnitsLength) LPSTR szUnits, + /* [annotation] */ + _Inout_opt_ UINT *pUnitsLength, + /* [annotation] */ + _Out_writes_opt_(*pDescriptionLength) LPSTR szDescription, + /* [annotation] */ + _Inout_opt_ UINT *pDescriptionLength); + + HRESULT ( STDMETHODCALLTYPE *CheckFeatureSupport )( + ID3D11Device * This, + D3D11_FEATURE Feature, + /* [annotation] */ + _Out_writes_bytes_(FeatureSupportDataSize) void *pFeatureSupportData, + UINT FeatureSupportDataSize); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11Device * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11Device * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11Device * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + D3D_FEATURE_LEVEL ( STDMETHODCALLTYPE *GetFeatureLevel )( + ID3D11Device * This); + + UINT ( STDMETHODCALLTYPE *GetCreationFlags )( + ID3D11Device * This); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceRemovedReason )( + ID3D11Device * This); + + void ( STDMETHODCALLTYPE *GetImmediateContext )( + ID3D11Device * This, + /* [annotation] */ + _Outptr_ ID3D11DeviceContext **ppImmediateContext); + + HRESULT ( STDMETHODCALLTYPE *SetExceptionMode )( + ID3D11Device * This, + UINT RaiseFlags); + + UINT ( STDMETHODCALLTYPE *GetExceptionMode )( + ID3D11Device * This); + + END_INTERFACE + } ID3D11DeviceVtbl; + + interface ID3D11Device + { + CONST_VTBL struct ID3D11DeviceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11Device_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11Device_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11Device_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11Device_CreateBuffer(This,pDesc,pInitialData,ppBuffer) \ + ( (This)->lpVtbl -> CreateBuffer(This,pDesc,pInitialData,ppBuffer) ) + +#define ID3D11Device_CreateTexture1D(This,pDesc,pInitialData,ppTexture1D) \ + ( (This)->lpVtbl -> CreateTexture1D(This,pDesc,pInitialData,ppTexture1D) ) + +#define ID3D11Device_CreateTexture2D(This,pDesc,pInitialData,ppTexture2D) \ + ( (This)->lpVtbl -> CreateTexture2D(This,pDesc,pInitialData,ppTexture2D) ) + +#define ID3D11Device_CreateTexture3D(This,pDesc,pInitialData,ppTexture3D) \ + ( (This)->lpVtbl -> CreateTexture3D(This,pDesc,pInitialData,ppTexture3D) ) + +#define ID3D11Device_CreateShaderResourceView(This,pResource,pDesc,ppSRView) \ + ( (This)->lpVtbl -> CreateShaderResourceView(This,pResource,pDesc,ppSRView) ) + +#define ID3D11Device_CreateUnorderedAccessView(This,pResource,pDesc,ppUAView) \ + ( (This)->lpVtbl -> CreateUnorderedAccessView(This,pResource,pDesc,ppUAView) ) + +#define ID3D11Device_CreateRenderTargetView(This,pResource,pDesc,ppRTView) \ + ( (This)->lpVtbl -> CreateRenderTargetView(This,pResource,pDesc,ppRTView) ) + +#define ID3D11Device_CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView) \ + ( (This)->lpVtbl -> CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView) ) + +#define ID3D11Device_CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout) \ + ( (This)->lpVtbl -> CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout) ) + +#define ID3D11Device_CreateVertexShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppVertexShader) \ + ( (This)->lpVtbl -> CreateVertexShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppVertexShader) ) + +#define ID3D11Device_CreateGeometryShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppGeometryShader) \ + ( (This)->lpVtbl -> CreateGeometryShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppGeometryShader) ) + +#define ID3D11Device_CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,pBufferStrides,NumStrides,RasterizedStream,pClassLinkage,ppGeometryShader) \ + ( (This)->lpVtbl -> CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,pBufferStrides,NumStrides,RasterizedStream,pClassLinkage,ppGeometryShader) ) + +#define ID3D11Device_CreatePixelShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppPixelShader) \ + ( (This)->lpVtbl -> CreatePixelShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppPixelShader) ) + +#define ID3D11Device_CreateHullShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppHullShader) \ + ( (This)->lpVtbl -> CreateHullShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppHullShader) ) + +#define ID3D11Device_CreateDomainShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppDomainShader) \ + ( (This)->lpVtbl -> CreateDomainShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppDomainShader) ) + +#define ID3D11Device_CreateComputeShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppComputeShader) \ + ( (This)->lpVtbl -> CreateComputeShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppComputeShader) ) + +#define ID3D11Device_CreateClassLinkage(This,ppLinkage) \ + ( (This)->lpVtbl -> CreateClassLinkage(This,ppLinkage) ) + +#define ID3D11Device_CreateBlendState(This,pBlendStateDesc,ppBlendState) \ + ( (This)->lpVtbl -> CreateBlendState(This,pBlendStateDesc,ppBlendState) ) + +#define ID3D11Device_CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState) \ + ( (This)->lpVtbl -> CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState) ) + +#define ID3D11Device_CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState) \ + ( (This)->lpVtbl -> CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState) ) + +#define ID3D11Device_CreateSamplerState(This,pSamplerDesc,ppSamplerState) \ + ( (This)->lpVtbl -> CreateSamplerState(This,pSamplerDesc,ppSamplerState) ) + +#define ID3D11Device_CreateQuery(This,pQueryDesc,ppQuery) \ + ( (This)->lpVtbl -> CreateQuery(This,pQueryDesc,ppQuery) ) + +#define ID3D11Device_CreatePredicate(This,pPredicateDesc,ppPredicate) \ + ( (This)->lpVtbl -> CreatePredicate(This,pPredicateDesc,ppPredicate) ) + +#define ID3D11Device_CreateCounter(This,pCounterDesc,ppCounter) \ + ( (This)->lpVtbl -> CreateCounter(This,pCounterDesc,ppCounter) ) + +#define ID3D11Device_CreateDeferredContext(This,ContextFlags,ppDeferredContext) \ + ( (This)->lpVtbl -> CreateDeferredContext(This,ContextFlags,ppDeferredContext) ) + +#define ID3D11Device_OpenSharedResource(This,hResource,ReturnedInterface,ppResource) \ + ( (This)->lpVtbl -> OpenSharedResource(This,hResource,ReturnedInterface,ppResource) ) + +#define ID3D11Device_CheckFormatSupport(This,Format,pFormatSupport) \ + ( (This)->lpVtbl -> CheckFormatSupport(This,Format,pFormatSupport) ) + +#define ID3D11Device_CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels) \ + ( (This)->lpVtbl -> CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels) ) + +#define ID3D11Device_CheckCounterInfo(This,pCounterInfo) \ + ( (This)->lpVtbl -> CheckCounterInfo(This,pCounterInfo) ) + +#define ID3D11Device_CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength) \ + ( (This)->lpVtbl -> CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength) ) + +#define ID3D11Device_CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) \ + ( (This)->lpVtbl -> CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) ) + +#define ID3D11Device_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11Device_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11Device_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D11Device_GetFeatureLevel(This) \ + ( (This)->lpVtbl -> GetFeatureLevel(This) ) + +#define ID3D11Device_GetCreationFlags(This) \ + ( (This)->lpVtbl -> GetCreationFlags(This) ) + +#define ID3D11Device_GetDeviceRemovedReason(This) \ + ( (This)->lpVtbl -> GetDeviceRemovedReason(This) ) + +#define ID3D11Device_GetImmediateContext(This,ppImmediateContext) \ + ( (This)->lpVtbl -> GetImmediateContext(This,ppImmediateContext) ) + +#define ID3D11Device_SetExceptionMode(This,RaiseFlags) \ + ( (This)->lpVtbl -> SetExceptionMode(This,RaiseFlags) ) + +#define ID3D11Device_GetExceptionMode(This) \ + ( (This)->lpVtbl -> GetExceptionMode(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11Device_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_0000_0041 */ +/* [local] */ + +typedef +enum D3D11_CREATE_DEVICE_FLAG + { + D3D11_CREATE_DEVICE_SINGLETHREADED = 0x1, + D3D11_CREATE_DEVICE_DEBUG = 0x2, + D3D11_CREATE_DEVICE_SWITCH_TO_REF = 0x4, + D3D11_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS = 0x8, + D3D11_CREATE_DEVICE_BGRA_SUPPORT = 0x20, + D3D11_CREATE_DEVICE_DEBUGGABLE = 0x40, + D3D11_CREATE_DEVICE_PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRY = 0x80, + D3D11_CREATE_DEVICE_DISABLE_GPU_TIMEOUT = 0x100, + D3D11_CREATE_DEVICE_VIDEO_SUPPORT = 0x800 + } D3D11_CREATE_DEVICE_FLAG; + +#define D3D11_SDK_VERSION ( 7 ) + +#if !defined( D3D11_IGNORE_SDK_LAYERS ) +#include "d3d11sdklayers.h" +#endif +#include "d3d10_1.h" +/*#pragma region Desktop Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ +#include "d3d10shader.h" +#include "d3d10_1shader.h" +#include "d3d10misc.h" +#include "d3d10effect.h" +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ + +/////////////////////////////////////////////////////////////////////////// +// D3D11CreateDevice +// ------------------ +// +// pAdapter +// If NULL, D3D11CreateDevice will choose the primary adapter and +// create a new instance from a temporarily created IDXGIFactory. +// If non-NULL, D3D11CreateDevice will register the appropriate +// device, if necessary (via IDXGIAdapter::RegisterDrver), before +// creating the device. +// DriverType +// Specifies the driver type to be created: hardware, reference or +// null. +// Software +// HMODULE of a DLL implementing a software rasterizer. Must be NULL for +// non-Software driver types. +// Flags +// Any of those documented for D3D11CreateDeviceAndSwapChain. +// pFeatureLevels +// Any of those documented for D3D11CreateDeviceAndSwapChain. +// FeatureLevels +// Size of feature levels array. +// SDKVersion +// SDK version. Use the D3D11_SDK_VERSION macro. +// ppDevice +// Pointer to returned interface. May be NULL. +// pFeatureLevel +// Pointer to returned feature level. May be NULL. +// ppImmediateContext +// Pointer to returned interface. May be NULL. +// +// Return Values +// Any of those documented for +// CreateDXGIFactory1 +// IDXGIFactory::EnumAdapters +// IDXGIAdapter::RegisterDriver +// D3D11CreateDevice +// +/////////////////////////////////////////////////////////////////////////// +typedef HRESULT (WINAPI* PFN_D3D11_CREATE_DEVICE)( _In_opt_ IDXGIAdapter*, + D3D_DRIVER_TYPE, HMODULE, UINT, + _In_reads_opt_( FeatureLevels ) CONST D3D_FEATURE_LEVEL*, + UINT FeatureLevels, UINT, _COM_Outptr_opt_ ID3D11Device**, + _Out_opt_ D3D_FEATURE_LEVEL*, _COM_Outptr_opt_ ID3D11DeviceContext** ); + +HRESULT WINAPI D3D11CreateDevice( + _In_opt_ IDXGIAdapter* pAdapter, + D3D_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + _In_reads_opt_( FeatureLevels ) CONST D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + _COM_Outptr_opt_ ID3D11Device** ppDevice, + _Out_opt_ D3D_FEATURE_LEVEL* pFeatureLevel, + _COM_Outptr_opt_ ID3D11DeviceContext** ppImmediateContext ); + +/*#pragma region Desktop Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ +/////////////////////////////////////////////////////////////////////////// +// D3D11CreateDeviceAndSwapChain +// ------------------------------ +// +// ppAdapter +// If NULL, D3D11CreateDevice will choose the primary adapter and +// create a new instance from a temporarily created IDXGIFactory. +// If non-NULL, D3D11CreateDevice will register the appropriate +// device, if necessary (via IDXGIAdapter::RegisterDrver), before +// creating the device. +// DriverType +// Specifies the driver type to be created: hardware, reference or +// null. +// Software +// HMODULE of a DLL implementing a software rasterizer. Must be NULL for +// non-Software driver types. +// Flags +// Any of those documented for D3D11CreateDevice. +// pFeatureLevels +// Array of any of the following: +// D3D_FEATURE_LEVEL_11_0 +// D3D_FEATURE_LEVEL_10_1 +// D3D_FEATURE_LEVEL_10_0 +// D3D_FEATURE_LEVEL_9_3 +// D3D_FEATURE_LEVEL_9_2 +// D3D_FEATURE_LEVEL_9_1 +// Order indicates sequence in which instantiation will be attempted. If +// NULL, then the implied order is the same as previously listed (i.e. +// prefer most features available). +// FeatureLevels +// Size of feature levels array. +// SDKVersion +// SDK version. Use the D3D11_SDK_VERSION macro. +// pSwapChainDesc +// Swap chain description, may be NULL. +// ppSwapChain +// Pointer to returned interface. May be NULL. +// ppDevice +// Pointer to returned interface. May be NULL. +// pFeatureLevel +// Pointer to returned feature level. May be NULL. +// ppImmediateContext +// Pointer to returned interface. May be NULL. +// +// Return Values +// Any of those documented for +// CreateDXGIFactory1 +// IDXGIFactory::EnumAdapters +// IDXGIAdapter::RegisterDriver +// D3D11CreateDevice +// IDXGIFactory::CreateSwapChain +// +/////////////////////////////////////////////////////////////////////////// +typedef HRESULT (WINAPI* PFN_D3D11_CREATE_DEVICE_AND_SWAP_CHAIN)( _In_opt_ IDXGIAdapter*, + D3D_DRIVER_TYPE, HMODULE, UINT, + _In_reads_opt_( FeatureLevels ) CONST D3D_FEATURE_LEVEL*, + UINT FeatureLevels, UINT, _In_opt_ CONST DXGI_SWAP_CHAIN_DESC*, + _COM_Outptr_opt_ IDXGISwapChain**, _COM_Outptr_opt_ ID3D11Device**, + _Out_opt_ D3D_FEATURE_LEVEL*, _COM_Outptr_opt_ ID3D11DeviceContext** ); + +HRESULT WINAPI D3D11CreateDeviceAndSwapChain( + _In_opt_ IDXGIAdapter* pAdapter, + D3D_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + _In_reads_opt_( FeatureLevels ) CONST D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + _In_opt_ CONST DXGI_SWAP_CHAIN_DESC* pSwapChainDesc, + _COM_Outptr_opt_ IDXGISwapChain** ppSwapChain, + _COM_Outptr_opt_ ID3D11Device** ppDevice, + _Out_opt_ D3D_FEATURE_LEVEL* pFeatureLevel, + _COM_Outptr_opt_ ID3D11DeviceContext** ppImmediateContext ); + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ +DEFINE_GUID(IID_ID3D11DeviceChild,0x1841e5c8,0x16b0,0x489b,0xbc,0xc8,0x44,0xcf,0xb0,0xd5,0xde,0xae); +DEFINE_GUID(IID_ID3D11DepthStencilState,0x03823efb,0x8d8f,0x4e1c,0x9a,0xa2,0xf6,0x4b,0xb2,0xcb,0xfd,0xf1); +DEFINE_GUID(IID_ID3D11BlendState,0x75b68faa,0x347d,0x4159,0x8f,0x45,0xa0,0x64,0x0f,0x01,0xcd,0x9a); +DEFINE_GUID(IID_ID3D11RasterizerState,0x9bb4ab81,0xab1a,0x4d8f,0xb5,0x06,0xfc,0x04,0x20,0x0b,0x6e,0xe7); +DEFINE_GUID(IID_ID3D11Resource,0xdc8e63f3,0xd12b,0x4952,0xb4,0x7b,0x5e,0x45,0x02,0x6a,0x86,0x2d); +DEFINE_GUID(IID_ID3D11Buffer,0x48570b85,0xd1ee,0x4fcd,0xa2,0x50,0xeb,0x35,0x07,0x22,0xb0,0x37); +DEFINE_GUID(IID_ID3D11Texture1D,0xf8fb5c27,0xc6b3,0x4f75,0xa4,0xc8,0x43,0x9a,0xf2,0xef,0x56,0x4c); +DEFINE_GUID(IID_ID3D11Texture2D,0x6f15aaf2,0xd208,0x4e89,0x9a,0xb4,0x48,0x95,0x35,0xd3,0x4f,0x9c); +DEFINE_GUID(IID_ID3D11Texture3D,0x037e866e,0xf56d,0x4357,0xa8,0xaf,0x9d,0xab,0xbe,0x6e,0x25,0x0e); +DEFINE_GUID(IID_ID3D11View,0x839d1216,0xbb2e,0x412b,0xb7,0xf4,0xa9,0xdb,0xeb,0xe0,0x8e,0xd1); +DEFINE_GUID(IID_ID3D11ShaderResourceView,0xb0e06fe0,0x8192,0x4e1a,0xb1,0xca,0x36,0xd7,0x41,0x47,0x10,0xb2); +DEFINE_GUID(IID_ID3D11RenderTargetView,0xdfdba067,0x0b8d,0x4865,0x87,0x5b,0xd7,0xb4,0x51,0x6c,0xc1,0x64); +DEFINE_GUID(IID_ID3D11DepthStencilView,0x9fdac92a,0x1876,0x48c3,0xaf,0xad,0x25,0xb9,0x4f,0x84,0xa9,0xb6); +DEFINE_GUID(IID_ID3D11UnorderedAccessView,0x28acf509,0x7f5c,0x48f6,0x86,0x11,0xf3,0x16,0x01,0x0a,0x63,0x80); +DEFINE_GUID(IID_ID3D11VertexShader,0x3b301d64,0xd678,0x4289,0x88,0x97,0x22,0xf8,0x92,0x8b,0x72,0xf3); +DEFINE_GUID(IID_ID3D11HullShader,0x8e5c6061,0x628a,0x4c8e,0x82,0x64,0xbb,0xe4,0x5c,0xb3,0xd5,0xdd); +DEFINE_GUID(IID_ID3D11DomainShader,0xf582c508,0x0f36,0x490c,0x99,0x77,0x31,0xee,0xce,0x26,0x8c,0xfa); +DEFINE_GUID(IID_ID3D11GeometryShader,0x38325b96,0xeffb,0x4022,0xba,0x02,0x2e,0x79,0x5b,0x70,0x27,0x5c); +DEFINE_GUID(IID_ID3D11PixelShader,0xea82e40d,0x51dc,0x4f33,0x93,0xd4,0xdb,0x7c,0x91,0x25,0xae,0x8c); +DEFINE_GUID(IID_ID3D11ComputeShader,0x4f5b196e,0xc2bd,0x495e,0xbd,0x01,0x1f,0xde,0xd3,0x8e,0x49,0x69); +DEFINE_GUID(IID_ID3D11InputLayout,0xe4819ddc,0x4cf0,0x4025,0xbd,0x26,0x5d,0xe8,0x2a,0x3e,0x07,0xb7); +DEFINE_GUID(IID_ID3D11SamplerState,0xda6fea51,0x564c,0x4487,0x98,0x10,0xf0,0xd0,0xf9,0xb4,0xe3,0xa5); +DEFINE_GUID(IID_ID3D11Asynchronous,0x4b35d0cd,0x1e15,0x4258,0x9c,0x98,0x1b,0x13,0x33,0xf6,0xdd,0x3b); +DEFINE_GUID(IID_ID3D11Query,0xd6c00747,0x87b7,0x425e,0xb8,0x4d,0x44,0xd1,0x08,0x56,0x0a,0xfd); +DEFINE_GUID(IID_ID3D11Predicate,0x9eb576dd,0x9f77,0x4d86,0x81,0xaa,0x8b,0xab,0x5f,0xe4,0x90,0xe2); +DEFINE_GUID(IID_ID3D11Counter,0x6e8c49fb,0xa371,0x4770,0xb4,0x40,0x29,0x08,0x60,0x22,0xb7,0x41); +DEFINE_GUID(IID_ID3D11ClassInstance,0xa6cd7faa,0xb0b7,0x4a2f,0x94,0x36,0x86,0x62,0xa6,0x57,0x97,0xcb); +DEFINE_GUID(IID_ID3D11ClassLinkage,0xddf57cba,0x9543,0x46e4,0xa1,0x2b,0xf2,0x07,0xa0,0xfe,0x7f,0xed); +DEFINE_GUID(IID_ID3D11CommandList,0xa24bc4d1,0x769e,0x43f7,0x80,0x13,0x98,0xff,0x56,0x6c,0x18,0xe2); +DEFINE_GUID(IID_ID3D11DeviceContext,0xc0bfa96c,0xe089,0x44fb,0x8e,0xaf,0x26,0xf8,0x79,0x61,0x90,0xda); +DEFINE_GUID(IID_ID3D11VideoDecoder,0x3C9C5B51,0x995D,0x48d1,0x9B,0x8D,0xFA,0x5C,0xAE,0xDE,0xD6,0x5C); +DEFINE_GUID(IID_ID3D11VideoProcessorEnumerator,0x31627037,0x53AB,0x4200,0x90,0x61,0x05,0xFA,0xA9,0xAB,0x45,0xF9); +DEFINE_GUID(IID_ID3D11VideoProcessor,0x1D7B0652,0x185F,0x41c6,0x85,0xCE,0x0C,0x5B,0xE3,0xD4,0xAE,0x6C); +DEFINE_GUID(IID_ID3D11AuthenticatedChannel,0x3015A308,0xDCBD,0x47aa,0xA7,0x47,0x19,0x24,0x86,0xD1,0x4D,0x4A); +DEFINE_GUID(IID_ID3D11CryptoSession,0x9B32F9AD,0xBDCC,0x40a6,0xA3,0x9D,0xD5,0xC8,0x65,0x84,0x57,0x20); +DEFINE_GUID(IID_ID3D11VideoDecoderOutputView,0xC2931AEA,0x2A85,0x4f20,0x86,0x0F,0xFB,0xA1,0xFD,0x25,0x6E,0x18); +DEFINE_GUID(IID_ID3D11VideoProcessorInputView,0x11EC5A5F,0x51DC,0x4945,0xAB,0x34,0x6E,0x8C,0x21,0x30,0x0E,0xA5); +DEFINE_GUID(IID_ID3D11VideoProcessorOutputView,0xA048285E,0x25A9,0x4527,0xBD,0x93,0xD6,0x8B,0x68,0xC4,0x42,0x54); +DEFINE_GUID(IID_ID3D11VideoContext,0x61F21C45,0x3C0E,0x4a74,0x9C,0xEA,0x67,0x10,0x0D,0x9A,0xD5,0xE4); +DEFINE_GUID(IID_ID3D11VideoDevice,0x10EC4D5B,0x975A,0x4689,0xB9,0xE4,0xD0,0xAA,0xC3,0x0F,0xE3,0x33); +DEFINE_GUID(IID_ID3D11Device,0xdb6f6ddb,0xac77,0x4e88,0x82,0x53,0x81,0x9d,0xf9,0xbb,0xf1,0x40); + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0041_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0041_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/d3d11_1.h b/gfx/include/dxsdk/d3d11_1.h new file mode 100644 index 0000000000..3d3bf303f1 --- /dev/null +++ b/gfx/include/dxsdk/d3d11_1.h @@ -0,0 +1,5222 @@ +/*------------------------------------------------------------------------------------- + * + * Copyright (c) Microsoft Corporation + * + *-------------------------------------------------------------------------------------*/ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ +/* @@MIDL_FILE_HEADING( ) */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __d3d11_1_h__ +#define __d3d11_1_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __ID3D11BlendState1_FWD_DEFINED__ +#define __ID3D11BlendState1_FWD_DEFINED__ +typedef interface ID3D11BlendState1 ID3D11BlendState1; + +#endif /* __ID3D11BlendState1_FWD_DEFINED__ */ + + +#ifndef __ID3D11RasterizerState1_FWD_DEFINED__ +#define __ID3D11RasterizerState1_FWD_DEFINED__ +typedef interface ID3D11RasterizerState1 ID3D11RasterizerState1; + +#endif /* __ID3D11RasterizerState1_FWD_DEFINED__ */ + + +#ifndef __ID3DDeviceContextState_FWD_DEFINED__ +#define __ID3DDeviceContextState_FWD_DEFINED__ +typedef interface ID3DDeviceContextState ID3DDeviceContextState; + +#endif /* __ID3DDeviceContextState_FWD_DEFINED__ */ + + +#ifndef __ID3D11DeviceContext1_FWD_DEFINED__ +#define __ID3D11DeviceContext1_FWD_DEFINED__ +typedef interface ID3D11DeviceContext1 ID3D11DeviceContext1; + +#endif /* __ID3D11DeviceContext1_FWD_DEFINED__ */ + + +#ifndef __ID3D11VideoContext1_FWD_DEFINED__ +#define __ID3D11VideoContext1_FWD_DEFINED__ +typedef interface ID3D11VideoContext1 ID3D11VideoContext1; + +#endif /* __ID3D11VideoContext1_FWD_DEFINED__ */ + + +#ifndef __ID3D11VideoDevice1_FWD_DEFINED__ +#define __ID3D11VideoDevice1_FWD_DEFINED__ +typedef interface ID3D11VideoDevice1 ID3D11VideoDevice1; + +#endif /* __ID3D11VideoDevice1_FWD_DEFINED__ */ + + +#ifndef __ID3D11VideoProcessorEnumerator1_FWD_DEFINED__ +#define __ID3D11VideoProcessorEnumerator1_FWD_DEFINED__ +typedef interface ID3D11VideoProcessorEnumerator1 ID3D11VideoProcessorEnumerator1; + +#endif /* __ID3D11VideoProcessorEnumerator1_FWD_DEFINED__ */ + + +#ifndef __ID3D11Device1_FWD_DEFINED__ +#define __ID3D11Device1_FWD_DEFINED__ +typedef interface ID3D11Device1 ID3D11Device1; + +#endif /* __ID3D11Device1_FWD_DEFINED__ */ + + +#ifndef __ID3DUserDefinedAnnotation_FWD_DEFINED__ +#define __ID3DUserDefinedAnnotation_FWD_DEFINED__ +typedef interface ID3DUserDefinedAnnotation ID3DUserDefinedAnnotation; + +#endif /* __ID3DUserDefinedAnnotation_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "dxgi1_2.h" +#include "d3dcommon.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_d3d11_1_0000_0000 */ +/* [local] */ + +#ifdef __cplusplus +} +#endif +#include "d3d11.h" // +#ifdef __cplusplus +extern "C"{ +#endif +typedef +enum D3D11_COPY_FLAGS + { + D3D11_COPY_NO_OVERWRITE = 0x1, + D3D11_COPY_DISCARD = 0x2 + } D3D11_COPY_FLAGS; + +typedef +enum D3D11_LOGIC_OP + { + D3D11_LOGIC_OP_CLEAR = 0, + D3D11_LOGIC_OP_SET = ( D3D11_LOGIC_OP_CLEAR + 1 ) , + D3D11_LOGIC_OP_COPY = ( D3D11_LOGIC_OP_SET + 1 ) , + D3D11_LOGIC_OP_COPY_INVERTED = ( D3D11_LOGIC_OP_COPY + 1 ) , + D3D11_LOGIC_OP_NOOP = ( D3D11_LOGIC_OP_COPY_INVERTED + 1 ) , + D3D11_LOGIC_OP_INVERT = ( D3D11_LOGIC_OP_NOOP + 1 ) , + D3D11_LOGIC_OP_AND = ( D3D11_LOGIC_OP_INVERT + 1 ) , + D3D11_LOGIC_OP_NAND = ( D3D11_LOGIC_OP_AND + 1 ) , + D3D11_LOGIC_OP_OR = ( D3D11_LOGIC_OP_NAND + 1 ) , + D3D11_LOGIC_OP_NOR = ( D3D11_LOGIC_OP_OR + 1 ) , + D3D11_LOGIC_OP_XOR = ( D3D11_LOGIC_OP_NOR + 1 ) , + D3D11_LOGIC_OP_EQUIV = ( D3D11_LOGIC_OP_XOR + 1 ) , + D3D11_LOGIC_OP_AND_REVERSE = ( D3D11_LOGIC_OP_EQUIV + 1 ) , + D3D11_LOGIC_OP_AND_INVERTED = ( D3D11_LOGIC_OP_AND_REVERSE + 1 ) , + D3D11_LOGIC_OP_OR_REVERSE = ( D3D11_LOGIC_OP_AND_INVERTED + 1 ) , + D3D11_LOGIC_OP_OR_INVERTED = ( D3D11_LOGIC_OP_OR_REVERSE + 1 ) + } D3D11_LOGIC_OP; + +typedef struct D3D11_RENDER_TARGET_BLEND_DESC1 + { + BOOL BlendEnable; + BOOL LogicOpEnable; + D3D11_BLEND SrcBlend; + D3D11_BLEND DestBlend; + D3D11_BLEND_OP BlendOp; + D3D11_BLEND SrcBlendAlpha; + D3D11_BLEND DestBlendAlpha; + D3D11_BLEND_OP BlendOpAlpha; + D3D11_LOGIC_OP LogicOp; + UINT8 RenderTargetWriteMask; + } D3D11_RENDER_TARGET_BLEND_DESC1; + +typedef struct D3D11_BLEND_DESC1 + { + BOOL AlphaToCoverageEnable; + BOOL IndependentBlendEnable; + D3D11_RENDER_TARGET_BLEND_DESC1 RenderTarget[ 8 ]; + } D3D11_BLEND_DESC1; + +/* Note, the array size for RenderTarget[] above is D3D11_SIMULTANEOUS_RENDERTARGET_COUNT. + IDL processing/generation of this header replaces the define; this comment is merely explaining what happened. */ +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_BLEND_DESC1 : public D3D11_BLEND_DESC1 +{ + CD3D11_BLEND_DESC1() + {} + explicit CD3D11_BLEND_DESC1( const D3D11_BLEND_DESC1& o ) : + D3D11_BLEND_DESC1( o ) + {} + explicit CD3D11_BLEND_DESC1( CD3D11_DEFAULT ) + { + AlphaToCoverageEnable = FALSE; + IndependentBlendEnable = FALSE; + const D3D11_RENDER_TARGET_BLEND_DESC1 defaultRenderTargetBlendDesc = + { + FALSE,FALSE, + D3D11_BLEND_ONE, D3D11_BLEND_ZERO, D3D11_BLEND_OP_ADD, + D3D11_BLEND_ONE, D3D11_BLEND_ZERO, D3D11_BLEND_OP_ADD, + D3D11_LOGIC_OP_NOOP, + D3D11_COLOR_WRITE_ENABLE_ALL, + }; + for (UINT i = 0; i < D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT; ++i) + RenderTarget[ i ] = defaultRenderTargetBlendDesc; + } + ~CD3D11_BLEND_DESC1() {} + operator const D3D11_BLEND_DESC1&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0000_v0_0_s_ifspec; + +#ifndef __ID3D11BlendState1_INTERFACE_DEFINED__ +#define __ID3D11BlendState1_INTERFACE_DEFINED__ + +/* interface ID3D11BlendState1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11BlendState1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("cc86fabe-da55-401d-85e7-e3c9de2877e9") + ID3D11BlendState1 : public ID3D11BlendState + { + public: + virtual void STDMETHODCALLTYPE GetDesc1( + /* [annotation] */ + _Out_ D3D11_BLEND_DESC1 *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11BlendState1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11BlendState1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11BlendState1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11BlendState1 * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11BlendState1 * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11BlendState1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11BlendState1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11BlendState1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11BlendState1 * This, + /* [annotation] */ + _Out_ D3D11_BLEND_DESC *pDesc); + + void ( STDMETHODCALLTYPE *GetDesc1 )( + ID3D11BlendState1 * This, + /* [annotation] */ + _Out_ D3D11_BLEND_DESC1 *pDesc); + + END_INTERFACE + } ID3D11BlendState1Vtbl; + + interface ID3D11BlendState1 + { + CONST_VTBL struct ID3D11BlendState1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11BlendState1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11BlendState1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11BlendState1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11BlendState1_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11BlendState1_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11BlendState1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11BlendState1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11BlendState1_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + + +#define ID3D11BlendState1_GetDesc1(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11BlendState1_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_1_0000_0001 */ +/* [local] */ + +typedef struct D3D11_RASTERIZER_DESC1 + { + D3D11_FILL_MODE FillMode; + D3D11_CULL_MODE CullMode; + BOOL FrontCounterClockwise; + INT DepthBias; + FLOAT DepthBiasClamp; + FLOAT SlopeScaledDepthBias; + BOOL DepthClipEnable; + BOOL ScissorEnable; + BOOL MultisampleEnable; + BOOL AntialiasedLineEnable; + UINT ForcedSampleCount; + } D3D11_RASTERIZER_DESC1; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_RASTERIZER_DESC1 : public D3D11_RASTERIZER_DESC1 +{ + CD3D11_RASTERIZER_DESC1() + {} + explicit CD3D11_RASTERIZER_DESC1( const D3D11_RASTERIZER_DESC1& o ) : + D3D11_RASTERIZER_DESC1( o ) + {} + explicit CD3D11_RASTERIZER_DESC1( CD3D11_DEFAULT ) + { + FillMode = D3D11_FILL_SOLID; + CullMode = D3D11_CULL_BACK; + FrontCounterClockwise = FALSE; + DepthBias = D3D11_DEFAULT_DEPTH_BIAS; + DepthBiasClamp = D3D11_DEFAULT_DEPTH_BIAS_CLAMP; + SlopeScaledDepthBias = D3D11_DEFAULT_SLOPE_SCALED_DEPTH_BIAS; + DepthClipEnable = TRUE; + ScissorEnable = FALSE; + MultisampleEnable = FALSE; + AntialiasedLineEnable = FALSE; + ForcedSampleCount = 0; + } + explicit CD3D11_RASTERIZER_DESC1( + D3D11_FILL_MODE fillMode, + D3D11_CULL_MODE cullMode, + BOOL frontCounterClockwise, + INT depthBias, + FLOAT depthBiasClamp, + FLOAT slopeScaledDepthBias, + BOOL depthClipEnable, + BOOL scissorEnable, + BOOL multisampleEnable, + BOOL antialiasedLineEnable, + UINT forcedSampleCount ) + { + FillMode = fillMode; + CullMode = cullMode; + FrontCounterClockwise = frontCounterClockwise; + DepthBias = depthBias; + DepthBiasClamp = depthBiasClamp; + SlopeScaledDepthBias = slopeScaledDepthBias; + DepthClipEnable = depthClipEnable; + ScissorEnable = scissorEnable; + MultisampleEnable = multisampleEnable; + AntialiasedLineEnable = antialiasedLineEnable; + ForcedSampleCount = forcedSampleCount; + } + ~CD3D11_RASTERIZER_DESC1() {} + operator const D3D11_RASTERIZER_DESC1&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0001_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0001_v0_0_s_ifspec; + +#ifndef __ID3D11RasterizerState1_INTERFACE_DEFINED__ +#define __ID3D11RasterizerState1_INTERFACE_DEFINED__ + +/* interface ID3D11RasterizerState1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11RasterizerState1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1217d7a6-5039-418c-b042-9cbe256afd6e") + ID3D11RasterizerState1 : public ID3D11RasterizerState + { + public: + virtual void STDMETHODCALLTYPE GetDesc1( + /* [annotation] */ + _Out_ D3D11_RASTERIZER_DESC1 *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11RasterizerState1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11RasterizerState1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11RasterizerState1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11RasterizerState1 * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11RasterizerState1 * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11RasterizerState1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11RasterizerState1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11RasterizerState1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11RasterizerState1 * This, + /* [annotation] */ + _Out_ D3D11_RASTERIZER_DESC *pDesc); + + void ( STDMETHODCALLTYPE *GetDesc1 )( + ID3D11RasterizerState1 * This, + /* [annotation] */ + _Out_ D3D11_RASTERIZER_DESC1 *pDesc); + + END_INTERFACE + } ID3D11RasterizerState1Vtbl; + + interface ID3D11RasterizerState1 + { + CONST_VTBL struct ID3D11RasterizerState1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11RasterizerState1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11RasterizerState1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11RasterizerState1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11RasterizerState1_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11RasterizerState1_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11RasterizerState1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11RasterizerState1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11RasterizerState1_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + + +#define ID3D11RasterizerState1_GetDesc1(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11RasterizerState1_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_1_0000_0002 */ +/* [local] */ + +typedef +enum D3D11_1_CREATE_DEVICE_CONTEXT_STATE_FLAG + { + D3D11_1_CREATE_DEVICE_CONTEXT_STATE_SINGLETHREADED = 0x1 + } D3D11_1_CREATE_DEVICE_CONTEXT_STATE_FLAG; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0002_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0002_v0_0_s_ifspec; + +#ifndef __ID3DDeviceContextState_INTERFACE_DEFINED__ +#define __ID3DDeviceContextState_INTERFACE_DEFINED__ + +/* interface ID3DDeviceContextState */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3DDeviceContextState; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("5c1e0d8a-7c23-48f9-8c59-a92958ceff11") + ID3DDeviceContextState : public ID3D11DeviceChild + { + public: + }; + + +#else /* C style interface */ + + typedef struct ID3DDeviceContextStateVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3DDeviceContextState * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3DDeviceContextState * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3DDeviceContextState * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3DDeviceContextState * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3DDeviceContextState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3DDeviceContextState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3DDeviceContextState * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + END_INTERFACE + } ID3DDeviceContextStateVtbl; + + interface ID3DDeviceContextState + { + CONST_VTBL struct ID3DDeviceContextStateVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3DDeviceContextState_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3DDeviceContextState_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3DDeviceContextState_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3DDeviceContextState_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3DDeviceContextState_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3DDeviceContextState_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3DDeviceContextState_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3DDeviceContextState_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11DeviceContext1_INTERFACE_DEFINED__ +#define __ID3D11DeviceContext1_INTERFACE_DEFINED__ + +/* interface ID3D11DeviceContext1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11DeviceContext1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("bb2c6faa-b5fb-4082-8e6b-388b8cfa90e1") + ID3D11DeviceContext1 : public ID3D11DeviceContext + { + public: + virtual void STDMETHODCALLTYPE CopySubresourceRegion1( + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ UINT DstX, + /* [annotation] */ + _In_ UINT DstY, + /* [annotation] */ + _In_ UINT DstZ, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pSrcBox, + /* [annotation] */ + _In_ UINT CopyFlags) = 0; + + virtual void STDMETHODCALLTYPE UpdateSubresource1( + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pDstBox, + /* [annotation] */ + _In_ const void *pSrcData, + /* [annotation] */ + _In_ UINT SrcRowPitch, + /* [annotation] */ + _In_ UINT SrcDepthPitch, + /* [annotation] */ + _In_ UINT CopyFlags) = 0; + + virtual void STDMETHODCALLTYPE DiscardResource( + /* [annotation] */ + _In_ ID3D11Resource *pResource) = 0; + + virtual void STDMETHODCALLTYPE DiscardView( + /* [annotation] */ + _In_ ID3D11View *pResourceView) = 0; + + virtual void STDMETHODCALLTYPE VSSetConstantBuffers1( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants) = 0; + + virtual void STDMETHODCALLTYPE HSSetConstantBuffers1( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants) = 0; + + virtual void STDMETHODCALLTYPE DSSetConstantBuffers1( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants) = 0; + + virtual void STDMETHODCALLTYPE GSSetConstantBuffers1( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants) = 0; + + virtual void STDMETHODCALLTYPE PSSetConstantBuffers1( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants) = 0; + + virtual void STDMETHODCALLTYPE CSSetConstantBuffers1( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants) = 0; + + virtual void STDMETHODCALLTYPE VSGetConstantBuffers1( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants) = 0; + + virtual void STDMETHODCALLTYPE HSGetConstantBuffers1( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants) = 0; + + virtual void STDMETHODCALLTYPE DSGetConstantBuffers1( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants) = 0; + + virtual void STDMETHODCALLTYPE GSGetConstantBuffers1( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants) = 0; + + virtual void STDMETHODCALLTYPE PSGetConstantBuffers1( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants) = 0; + + virtual void STDMETHODCALLTYPE CSGetConstantBuffers1( + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants) = 0; + + virtual void STDMETHODCALLTYPE SwapDeviceContextState( + /* [annotation] */ + _In_ ID3DDeviceContextState *pState, + /* [annotation] */ + _Outptr_opt_ ID3DDeviceContextState **ppPreviousState) = 0; + + virtual void STDMETHODCALLTYPE ClearView( + /* [annotation] */ + _In_ ID3D11View *pView, + /* [annotation] */ + _In_ const FLOAT Color[ 4 ], + /* [annotation] */ + _In_reads_opt_(NumRects) const D3D11_RECT *pRect, + UINT NumRects) = 0; + + virtual void STDMETHODCALLTYPE DiscardView1( + /* [annotation] */ + _In_ ID3D11View *pResourceView, + /* [annotation] */ + _In_reads_opt_(NumRects) const D3D11_RECT *pRects, + UINT NumRects) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11DeviceContext1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11DeviceContext1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11DeviceContext1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11DeviceContext1 * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *VSSetConstantBuffers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *PSSetShaderResources )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *PSSetShader )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_opt_ ID3D11PixelShader *pPixelShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *PSSetSamplers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *VSSetShader )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_opt_ ID3D11VertexShader *pVertexShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *DrawIndexed )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ UINT IndexCount, + /* [annotation] */ + _In_ UINT StartIndexLocation, + /* [annotation] */ + _In_ INT BaseVertexLocation); + + void ( STDMETHODCALLTYPE *Draw )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ UINT VertexCount, + /* [annotation] */ + _In_ UINT StartVertexLocation); + + HRESULT ( STDMETHODCALLTYPE *Map )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_ UINT Subresource, + /* [annotation] */ + _In_ D3D11_MAP MapType, + /* [annotation] */ + _In_ UINT MapFlags, + /* [annotation] */ + _Out_opt_ D3D11_MAPPED_SUBRESOURCE *pMappedResource); + + void ( STDMETHODCALLTYPE *Unmap )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_ UINT Subresource); + + void ( STDMETHODCALLTYPE *PSSetConstantBuffers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *IASetInputLayout )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_opt_ ID3D11InputLayout *pInputLayout); + + void ( STDMETHODCALLTYPE *IASetVertexBuffers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppVertexBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pStrides, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pOffsets); + + void ( STDMETHODCALLTYPE *IASetIndexBuffer )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_opt_ ID3D11Buffer *pIndexBuffer, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT Offset); + + void ( STDMETHODCALLTYPE *DrawIndexedInstanced )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ UINT IndexCountPerInstance, + /* [annotation] */ + _In_ UINT InstanceCount, + /* [annotation] */ + _In_ UINT StartIndexLocation, + /* [annotation] */ + _In_ INT BaseVertexLocation, + /* [annotation] */ + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *DrawInstanced )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ UINT VertexCountPerInstance, + /* [annotation] */ + _In_ UINT InstanceCount, + /* [annotation] */ + _In_ UINT StartVertexLocation, + /* [annotation] */ + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *GSSetConstantBuffers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *GSSetShader )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_opt_ ID3D11GeometryShader *pShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *IASetPrimitiveTopology )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ D3D11_PRIMITIVE_TOPOLOGY Topology); + + void ( STDMETHODCALLTYPE *VSSetShaderResources )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *VSSetSamplers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *Begin )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11Asynchronous *pAsync); + + void ( STDMETHODCALLTYPE *End )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11Asynchronous *pAsync); + + HRESULT ( STDMETHODCALLTYPE *GetData )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11Asynchronous *pAsync, + /* [annotation] */ + _Out_writes_bytes_opt_( DataSize ) void *pData, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_ UINT GetDataFlags); + + void ( STDMETHODCALLTYPE *SetPredication )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_opt_ ID3D11Predicate *pPredicate, + /* [annotation] */ + _In_ BOOL PredicateValue); + + void ( STDMETHODCALLTYPE *GSSetShaderResources )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *GSSetSamplers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *OMSetRenderTargets )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11RenderTargetView *const *ppRenderTargetViews, + /* [annotation] */ + _In_opt_ ID3D11DepthStencilView *pDepthStencilView); + + void ( STDMETHODCALLTYPE *OMSetRenderTargetsAndUnorderedAccessViews )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ UINT NumRTVs, + /* [annotation] */ + _In_reads_opt_(NumRTVs) ID3D11RenderTargetView *const *ppRenderTargetViews, + /* [annotation] */ + _In_opt_ ID3D11DepthStencilView *pDepthStencilView, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - 1 ) UINT UAVStartSlot, + /* [annotation] */ + _In_ UINT NumUAVs, + /* [annotation] */ + _In_reads_opt_(NumUAVs) ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, + /* [annotation] */ + _In_reads_opt_(NumUAVs) const UINT *pUAVInitialCounts); + + void ( STDMETHODCALLTYPE *OMSetBlendState )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_opt_ ID3D11BlendState *pBlendState, + /* [annotation] */ + _In_opt_ const FLOAT BlendFactor[ 4 ], + /* [annotation] */ + _In_ UINT SampleMask); + + void ( STDMETHODCALLTYPE *OMSetDepthStencilState )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_opt_ ID3D11DepthStencilState *pDepthStencilState, + /* [annotation] */ + _In_ UINT StencilRef); + + void ( STDMETHODCALLTYPE *SOSetTargets )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_SO_BUFFER_SLOT_COUNT) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppSOTargets, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pOffsets); + + void ( STDMETHODCALLTYPE *DrawAuto )( + ID3D11DeviceContext1 * This); + + void ( STDMETHODCALLTYPE *DrawIndexedInstancedIndirect )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11Buffer *pBufferForArgs, + /* [annotation] */ + _In_ UINT AlignedByteOffsetForArgs); + + void ( STDMETHODCALLTYPE *DrawInstancedIndirect )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11Buffer *pBufferForArgs, + /* [annotation] */ + _In_ UINT AlignedByteOffsetForArgs); + + void ( STDMETHODCALLTYPE *Dispatch )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ UINT ThreadGroupCountX, + /* [annotation] */ + _In_ UINT ThreadGroupCountY, + /* [annotation] */ + _In_ UINT ThreadGroupCountZ); + + void ( STDMETHODCALLTYPE *DispatchIndirect )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11Buffer *pBufferForArgs, + /* [annotation] */ + _In_ UINT AlignedByteOffsetForArgs); + + void ( STDMETHODCALLTYPE *RSSetState )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_opt_ ID3D11RasterizerState *pRasterizerState); + + void ( STDMETHODCALLTYPE *RSSetViewports )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumViewports, + /* [annotation] */ + _In_reads_opt_(NumViewports) const D3D11_VIEWPORT *pViewports); + + void ( STDMETHODCALLTYPE *RSSetScissorRects )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumRects, + /* [annotation] */ + _In_reads_opt_(NumRects) const D3D11_RECT *pRects); + + void ( STDMETHODCALLTYPE *CopySubresourceRegion )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ UINT DstX, + /* [annotation] */ + _In_ UINT DstY, + /* [annotation] */ + _In_ UINT DstZ, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pSrcBox); + + void ( STDMETHODCALLTYPE *CopyResource )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource); + + void ( STDMETHODCALLTYPE *UpdateSubresource )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pDstBox, + /* [annotation] */ + _In_ const void *pSrcData, + /* [annotation] */ + _In_ UINT SrcRowPitch, + /* [annotation] */ + _In_ UINT SrcDepthPitch); + + void ( STDMETHODCALLTYPE *CopyStructureCount )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11Buffer *pDstBuffer, + /* [annotation] */ + _In_ UINT DstAlignedByteOffset, + /* [annotation] */ + _In_ ID3D11UnorderedAccessView *pSrcView); + + void ( STDMETHODCALLTYPE *ClearRenderTargetView )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11RenderTargetView *pRenderTargetView, + /* [annotation] */ + _In_ const FLOAT ColorRGBA[ 4 ]); + + void ( STDMETHODCALLTYPE *ClearUnorderedAccessViewUint )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11UnorderedAccessView *pUnorderedAccessView, + /* [annotation] */ + _In_ const UINT Values[ 4 ]); + + void ( STDMETHODCALLTYPE *ClearUnorderedAccessViewFloat )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11UnorderedAccessView *pUnorderedAccessView, + /* [annotation] */ + _In_ const FLOAT Values[ 4 ]); + + void ( STDMETHODCALLTYPE *ClearDepthStencilView )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11DepthStencilView *pDepthStencilView, + /* [annotation] */ + _In_ UINT ClearFlags, + /* [annotation] */ + _In_ FLOAT Depth, + /* [annotation] */ + _In_ UINT8 Stencil); + + void ( STDMETHODCALLTYPE *GenerateMips )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11ShaderResourceView *pShaderResourceView); + + void ( STDMETHODCALLTYPE *SetResourceMinLOD )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + FLOAT MinLOD); + + FLOAT ( STDMETHODCALLTYPE *GetResourceMinLOD )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource); + + void ( STDMETHODCALLTYPE *ResolveSubresource )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_ DXGI_FORMAT Format); + + void ( STDMETHODCALLTYPE *ExecuteCommandList )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11CommandList *pCommandList, + BOOL RestoreContextState); + + void ( STDMETHODCALLTYPE *HSSetShaderResources )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *HSSetShader )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_opt_ ID3D11HullShader *pHullShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *HSSetSamplers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *HSSetConstantBuffers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *DSSetShaderResources )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *DSSetShader )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_opt_ ID3D11DomainShader *pDomainShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *DSSetSamplers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *DSSetConstantBuffers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *CSSetShaderResources )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *CSSetUnorderedAccessViews )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - StartSlot ) UINT NumUAVs, + /* [annotation] */ + _In_reads_opt_(NumUAVs) ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, + /* [annotation] */ + _In_reads_opt_(NumUAVs) const UINT *pUAVInitialCounts); + + void ( STDMETHODCALLTYPE *CSSetShader )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_opt_ ID3D11ComputeShader *pComputeShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *CSSetSamplers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *CSSetConstantBuffers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *VSGetConstantBuffers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *PSGetShaderResources )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *PSGetShader )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11PixelShader **ppPixelShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *PSGetSamplers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *VSGetShader )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11VertexShader **ppVertexShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *PSGetConstantBuffers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *IAGetInputLayout )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11InputLayout **ppInputLayout); + + void ( STDMETHODCALLTYPE *IAGetVertexBuffers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppVertexBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pStrides, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pOffsets); + + void ( STDMETHODCALLTYPE *IAGetIndexBuffer )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11Buffer **pIndexBuffer, + /* [annotation] */ + _Out_opt_ DXGI_FORMAT *Format, + /* [annotation] */ + _Out_opt_ UINT *Offset); + + void ( STDMETHODCALLTYPE *GSGetConstantBuffers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *GSGetShader )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11GeometryShader **ppGeometryShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *IAGetPrimitiveTopology )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _Out_ D3D11_PRIMITIVE_TOPOLOGY *pTopology); + + void ( STDMETHODCALLTYPE *VSGetShaderResources )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *VSGetSamplers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *GetPredication )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11Predicate **ppPredicate, + /* [annotation] */ + _Out_opt_ BOOL *pPredicateValue); + + void ( STDMETHODCALLTYPE *GSGetShaderResources )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *GSGetSamplers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *OMGetRenderTargets )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11RenderTargetView **ppRenderTargetViews, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11DepthStencilView **ppDepthStencilView); + + void ( STDMETHODCALLTYPE *OMGetRenderTargetsAndUnorderedAccessViews )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumRTVs, + /* [annotation] */ + _Out_writes_opt_(NumRTVs) ID3D11RenderTargetView **ppRenderTargetViews, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11DepthStencilView **ppDepthStencilView, + /* [annotation] */ + _In_range_( 0, D3D11_PS_CS_UAV_REGISTER_COUNT - 1 ) UINT UAVStartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_PS_CS_UAV_REGISTER_COUNT - UAVStartSlot ) UINT NumUAVs, + /* [annotation] */ + _Out_writes_opt_(NumUAVs) ID3D11UnorderedAccessView **ppUnorderedAccessViews); + + void ( STDMETHODCALLTYPE *OMGetBlendState )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11BlendState **ppBlendState, + /* [annotation] */ + _Out_opt_ FLOAT BlendFactor[ 4 ], + /* [annotation] */ + _Out_opt_ UINT *pSampleMask); + + void ( STDMETHODCALLTYPE *OMGetDepthStencilState )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11DepthStencilState **ppDepthStencilState, + /* [annotation] */ + _Out_opt_ UINT *pStencilRef); + + void ( STDMETHODCALLTYPE *SOGetTargets )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_SO_BUFFER_SLOT_COUNT ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppSOTargets); + + void ( STDMETHODCALLTYPE *RSGetState )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11RasterizerState **ppRasterizerState); + + void ( STDMETHODCALLTYPE *RSGetViewports )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _Inout_ /*_range(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE )*/ UINT *pNumViewports, + /* [annotation] */ + _Out_writes_opt_(*pNumViewports) D3D11_VIEWPORT *pViewports); + + void ( STDMETHODCALLTYPE *RSGetScissorRects )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _Inout_ /*_range(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE )*/ UINT *pNumRects, + /* [annotation] */ + _Out_writes_opt_(*pNumRects) D3D11_RECT *pRects); + + void ( STDMETHODCALLTYPE *HSGetShaderResources )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *HSGetShader )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11HullShader **ppHullShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *HSGetSamplers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *HSGetConstantBuffers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *DSGetShaderResources )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *DSGetShader )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11DomainShader **ppDomainShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *DSGetSamplers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *DSGetConstantBuffers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *CSGetShaderResources )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *CSGetUnorderedAccessViews )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - StartSlot ) UINT NumUAVs, + /* [annotation] */ + _Out_writes_opt_(NumUAVs) ID3D11UnorderedAccessView **ppUnorderedAccessViews); + + void ( STDMETHODCALLTYPE *CSGetShader )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11ComputeShader **ppComputeShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *CSGetSamplers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *CSGetConstantBuffers )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *ClearState )( + ID3D11DeviceContext1 * This); + + void ( STDMETHODCALLTYPE *Flush )( + ID3D11DeviceContext1 * This); + + D3D11_DEVICE_CONTEXT_TYPE ( STDMETHODCALLTYPE *GetType )( + ID3D11DeviceContext1 * This); + + UINT ( STDMETHODCALLTYPE *GetContextFlags )( + ID3D11DeviceContext1 * This); + + HRESULT ( STDMETHODCALLTYPE *FinishCommandList )( + ID3D11DeviceContext1 * This, + BOOL RestoreDeferredContextState, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11CommandList **ppCommandList); + + void ( STDMETHODCALLTYPE *CopySubresourceRegion1 )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ UINT DstX, + /* [annotation] */ + _In_ UINT DstY, + /* [annotation] */ + _In_ UINT DstZ, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pSrcBox, + /* [annotation] */ + _In_ UINT CopyFlags); + + void ( STDMETHODCALLTYPE *UpdateSubresource1 )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pDstBox, + /* [annotation] */ + _In_ const void *pSrcData, + /* [annotation] */ + _In_ UINT SrcRowPitch, + /* [annotation] */ + _In_ UINT SrcDepthPitch, + /* [annotation] */ + _In_ UINT CopyFlags); + + void ( STDMETHODCALLTYPE *DiscardResource )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource); + + void ( STDMETHODCALLTYPE *DiscardView )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11View *pResourceView); + + void ( STDMETHODCALLTYPE *VSSetConstantBuffers1 )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *HSSetConstantBuffers1 )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *DSSetConstantBuffers1 )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *GSSetConstantBuffers1 )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *PSSetConstantBuffers1 )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *CSSetConstantBuffers1 )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *VSGetConstantBuffers1 )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *HSGetConstantBuffers1 )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *DSGetConstantBuffers1 )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *GSGetConstantBuffers1 )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *PSGetConstantBuffers1 )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *CSGetConstantBuffers1 )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *SwapDeviceContextState )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3DDeviceContextState *pState, + /* [annotation] */ + _Outptr_opt_ ID3DDeviceContextState **ppPreviousState); + + void ( STDMETHODCALLTYPE *ClearView )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11View *pView, + /* [annotation] */ + _In_ const FLOAT Color[ 4 ], + /* [annotation] */ + _In_reads_opt_(NumRects) const D3D11_RECT *pRect, + UINT NumRects); + + void ( STDMETHODCALLTYPE *DiscardView1 )( + ID3D11DeviceContext1 * This, + /* [annotation] */ + _In_ ID3D11View *pResourceView, + /* [annotation] */ + _In_reads_opt_(NumRects) const D3D11_RECT *pRects, + UINT NumRects); + + END_INTERFACE + } ID3D11DeviceContext1Vtbl; + + interface ID3D11DeviceContext1 + { + CONST_VTBL struct ID3D11DeviceContext1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11DeviceContext1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11DeviceContext1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11DeviceContext1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11DeviceContext1_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11DeviceContext1_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11DeviceContext1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11DeviceContext1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11DeviceContext1_VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext1_PSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> PSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext1_PSSetShader(This,pPixelShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> PSSetShader(This,pPixelShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext1_PSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> PSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext1_VSSetShader(This,pVertexShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> VSSetShader(This,pVertexShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext1_DrawIndexed(This,IndexCount,StartIndexLocation,BaseVertexLocation) \ + ( (This)->lpVtbl -> DrawIndexed(This,IndexCount,StartIndexLocation,BaseVertexLocation) ) + +#define ID3D11DeviceContext1_Draw(This,VertexCount,StartVertexLocation) \ + ( (This)->lpVtbl -> Draw(This,VertexCount,StartVertexLocation) ) + +#define ID3D11DeviceContext1_Map(This,pResource,Subresource,MapType,MapFlags,pMappedResource) \ + ( (This)->lpVtbl -> Map(This,pResource,Subresource,MapType,MapFlags,pMappedResource) ) + +#define ID3D11DeviceContext1_Unmap(This,pResource,Subresource) \ + ( (This)->lpVtbl -> Unmap(This,pResource,Subresource) ) + +#define ID3D11DeviceContext1_PSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> PSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext1_IASetInputLayout(This,pInputLayout) \ + ( (This)->lpVtbl -> IASetInputLayout(This,pInputLayout) ) + +#define ID3D11DeviceContext1_IASetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) \ + ( (This)->lpVtbl -> IASetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) ) + +#define ID3D11DeviceContext1_IASetIndexBuffer(This,pIndexBuffer,Format,Offset) \ + ( (This)->lpVtbl -> IASetIndexBuffer(This,pIndexBuffer,Format,Offset) ) + +#define ID3D11DeviceContext1_DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) ) + +#define ID3D11DeviceContext1_DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) ) + +#define ID3D11DeviceContext1_GSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> GSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext1_GSSetShader(This,pShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> GSSetShader(This,pShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext1_IASetPrimitiveTopology(This,Topology) \ + ( (This)->lpVtbl -> IASetPrimitiveTopology(This,Topology) ) + +#define ID3D11DeviceContext1_VSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> VSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext1_VSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> VSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext1_Begin(This,pAsync) \ + ( (This)->lpVtbl -> Begin(This,pAsync) ) + +#define ID3D11DeviceContext1_End(This,pAsync) \ + ( (This)->lpVtbl -> End(This,pAsync) ) + +#define ID3D11DeviceContext1_GetData(This,pAsync,pData,DataSize,GetDataFlags) \ + ( (This)->lpVtbl -> GetData(This,pAsync,pData,DataSize,GetDataFlags) ) + +#define ID3D11DeviceContext1_SetPredication(This,pPredicate,PredicateValue) \ + ( (This)->lpVtbl -> SetPredication(This,pPredicate,PredicateValue) ) + +#define ID3D11DeviceContext1_GSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> GSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext1_GSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> GSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext1_OMSetRenderTargets(This,NumViews,ppRenderTargetViews,pDepthStencilView) \ + ( (This)->lpVtbl -> OMSetRenderTargets(This,NumViews,ppRenderTargetViews,pDepthStencilView) ) + +#define ID3D11DeviceContext1_OMSetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,pDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) \ + ( (This)->lpVtbl -> OMSetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,pDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) ) + +#define ID3D11DeviceContext1_OMSetBlendState(This,pBlendState,BlendFactor,SampleMask) \ + ( (This)->lpVtbl -> OMSetBlendState(This,pBlendState,BlendFactor,SampleMask) ) + +#define ID3D11DeviceContext1_OMSetDepthStencilState(This,pDepthStencilState,StencilRef) \ + ( (This)->lpVtbl -> OMSetDepthStencilState(This,pDepthStencilState,StencilRef) ) + +#define ID3D11DeviceContext1_SOSetTargets(This,NumBuffers,ppSOTargets,pOffsets) \ + ( (This)->lpVtbl -> SOSetTargets(This,NumBuffers,ppSOTargets,pOffsets) ) + +#define ID3D11DeviceContext1_DrawAuto(This) \ + ( (This)->lpVtbl -> DrawAuto(This) ) + +#define ID3D11DeviceContext1_DrawIndexedInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) \ + ( (This)->lpVtbl -> DrawIndexedInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) ) + +#define ID3D11DeviceContext1_DrawInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) \ + ( (This)->lpVtbl -> DrawInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) ) + +#define ID3D11DeviceContext1_Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) \ + ( (This)->lpVtbl -> Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) ) + +#define ID3D11DeviceContext1_DispatchIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) \ + ( (This)->lpVtbl -> DispatchIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) ) + +#define ID3D11DeviceContext1_RSSetState(This,pRasterizerState) \ + ( (This)->lpVtbl -> RSSetState(This,pRasterizerState) ) + +#define ID3D11DeviceContext1_RSSetViewports(This,NumViewports,pViewports) \ + ( (This)->lpVtbl -> RSSetViewports(This,NumViewports,pViewports) ) + +#define ID3D11DeviceContext1_RSSetScissorRects(This,NumRects,pRects) \ + ( (This)->lpVtbl -> RSSetScissorRects(This,NumRects,pRects) ) + +#define ID3D11DeviceContext1_CopySubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox) \ + ( (This)->lpVtbl -> CopySubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox) ) + +#define ID3D11DeviceContext1_CopyResource(This,pDstResource,pSrcResource) \ + ( (This)->lpVtbl -> CopyResource(This,pDstResource,pSrcResource) ) + +#define ID3D11DeviceContext1_UpdateSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) \ + ( (This)->lpVtbl -> UpdateSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) ) + +#define ID3D11DeviceContext1_CopyStructureCount(This,pDstBuffer,DstAlignedByteOffset,pSrcView) \ + ( (This)->lpVtbl -> CopyStructureCount(This,pDstBuffer,DstAlignedByteOffset,pSrcView) ) + +#define ID3D11DeviceContext1_ClearRenderTargetView(This,pRenderTargetView,ColorRGBA) \ + ( (This)->lpVtbl -> ClearRenderTargetView(This,pRenderTargetView,ColorRGBA) ) + +#define ID3D11DeviceContext1_ClearUnorderedAccessViewUint(This,pUnorderedAccessView,Values) \ + ( (This)->lpVtbl -> ClearUnorderedAccessViewUint(This,pUnorderedAccessView,Values) ) + +#define ID3D11DeviceContext1_ClearUnorderedAccessViewFloat(This,pUnorderedAccessView,Values) \ + ( (This)->lpVtbl -> ClearUnorderedAccessViewFloat(This,pUnorderedAccessView,Values) ) + +#define ID3D11DeviceContext1_ClearDepthStencilView(This,pDepthStencilView,ClearFlags,Depth,Stencil) \ + ( (This)->lpVtbl -> ClearDepthStencilView(This,pDepthStencilView,ClearFlags,Depth,Stencil) ) + +#define ID3D11DeviceContext1_GenerateMips(This,pShaderResourceView) \ + ( (This)->lpVtbl -> GenerateMips(This,pShaderResourceView) ) + +#define ID3D11DeviceContext1_SetResourceMinLOD(This,pResource,MinLOD) \ + ( (This)->lpVtbl -> SetResourceMinLOD(This,pResource,MinLOD) ) + +#define ID3D11DeviceContext1_GetResourceMinLOD(This,pResource) \ + ( (This)->lpVtbl -> GetResourceMinLOD(This,pResource) ) + +#define ID3D11DeviceContext1_ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) \ + ( (This)->lpVtbl -> ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) ) + +#define ID3D11DeviceContext1_ExecuteCommandList(This,pCommandList,RestoreContextState) \ + ( (This)->lpVtbl -> ExecuteCommandList(This,pCommandList,RestoreContextState) ) + +#define ID3D11DeviceContext1_HSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> HSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext1_HSSetShader(This,pHullShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> HSSetShader(This,pHullShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext1_HSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> HSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext1_HSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> HSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext1_DSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> DSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext1_DSSetShader(This,pDomainShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> DSSetShader(This,pDomainShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext1_DSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> DSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext1_DSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> DSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext1_CSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> CSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext1_CSSetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) \ + ( (This)->lpVtbl -> CSSetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) ) + +#define ID3D11DeviceContext1_CSSetShader(This,pComputeShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> CSSetShader(This,pComputeShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext1_CSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> CSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext1_CSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> CSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext1_VSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> VSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext1_PSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> PSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext1_PSGetShader(This,ppPixelShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> PSGetShader(This,ppPixelShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext1_PSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> PSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext1_VSGetShader(This,ppVertexShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> VSGetShader(This,ppVertexShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext1_PSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> PSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext1_IAGetInputLayout(This,ppInputLayout) \ + ( (This)->lpVtbl -> IAGetInputLayout(This,ppInputLayout) ) + +#define ID3D11DeviceContext1_IAGetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) \ + ( (This)->lpVtbl -> IAGetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) ) + +#define ID3D11DeviceContext1_IAGetIndexBuffer(This,pIndexBuffer,Format,Offset) \ + ( (This)->lpVtbl -> IAGetIndexBuffer(This,pIndexBuffer,Format,Offset) ) + +#define ID3D11DeviceContext1_GSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> GSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext1_GSGetShader(This,ppGeometryShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> GSGetShader(This,ppGeometryShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext1_IAGetPrimitiveTopology(This,pTopology) \ + ( (This)->lpVtbl -> IAGetPrimitiveTopology(This,pTopology) ) + +#define ID3D11DeviceContext1_VSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> VSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext1_VSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> VSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext1_GetPredication(This,ppPredicate,pPredicateValue) \ + ( (This)->lpVtbl -> GetPredication(This,ppPredicate,pPredicateValue) ) + +#define ID3D11DeviceContext1_GSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> GSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext1_GSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> GSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext1_OMGetRenderTargets(This,NumViews,ppRenderTargetViews,ppDepthStencilView) \ + ( (This)->lpVtbl -> OMGetRenderTargets(This,NumViews,ppRenderTargetViews,ppDepthStencilView) ) + +#define ID3D11DeviceContext1_OMGetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,ppDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews) \ + ( (This)->lpVtbl -> OMGetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,ppDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews) ) + +#define ID3D11DeviceContext1_OMGetBlendState(This,ppBlendState,BlendFactor,pSampleMask) \ + ( (This)->lpVtbl -> OMGetBlendState(This,ppBlendState,BlendFactor,pSampleMask) ) + +#define ID3D11DeviceContext1_OMGetDepthStencilState(This,ppDepthStencilState,pStencilRef) \ + ( (This)->lpVtbl -> OMGetDepthStencilState(This,ppDepthStencilState,pStencilRef) ) + +#define ID3D11DeviceContext1_SOGetTargets(This,NumBuffers,ppSOTargets) \ + ( (This)->lpVtbl -> SOGetTargets(This,NumBuffers,ppSOTargets) ) + +#define ID3D11DeviceContext1_RSGetState(This,ppRasterizerState) \ + ( (This)->lpVtbl -> RSGetState(This,ppRasterizerState) ) + +#define ID3D11DeviceContext1_RSGetViewports(This,pNumViewports,pViewports) \ + ( (This)->lpVtbl -> RSGetViewports(This,pNumViewports,pViewports) ) + +#define ID3D11DeviceContext1_RSGetScissorRects(This,pNumRects,pRects) \ + ( (This)->lpVtbl -> RSGetScissorRects(This,pNumRects,pRects) ) + +#define ID3D11DeviceContext1_HSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> HSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext1_HSGetShader(This,ppHullShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> HSGetShader(This,ppHullShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext1_HSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> HSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext1_HSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> HSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext1_DSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> DSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext1_DSGetShader(This,ppDomainShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> DSGetShader(This,ppDomainShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext1_DSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> DSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext1_DSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> DSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext1_CSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> CSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext1_CSGetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews) \ + ( (This)->lpVtbl -> CSGetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews) ) + +#define ID3D11DeviceContext1_CSGetShader(This,ppComputeShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> CSGetShader(This,ppComputeShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext1_CSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> CSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext1_CSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> CSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext1_ClearState(This) \ + ( (This)->lpVtbl -> ClearState(This) ) + +#define ID3D11DeviceContext1_Flush(This) \ + ( (This)->lpVtbl -> Flush(This) ) + +#define ID3D11DeviceContext1_GetType(This) \ + ( (This)->lpVtbl -> GetType(This) ) + +#define ID3D11DeviceContext1_GetContextFlags(This) \ + ( (This)->lpVtbl -> GetContextFlags(This) ) + +#define ID3D11DeviceContext1_FinishCommandList(This,RestoreDeferredContextState,ppCommandList) \ + ( (This)->lpVtbl -> FinishCommandList(This,RestoreDeferredContextState,ppCommandList) ) + + +#define ID3D11DeviceContext1_CopySubresourceRegion1(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox,CopyFlags) \ + ( (This)->lpVtbl -> CopySubresourceRegion1(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox,CopyFlags) ) + +#define ID3D11DeviceContext1_UpdateSubresource1(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch,CopyFlags) \ + ( (This)->lpVtbl -> UpdateSubresource1(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch,CopyFlags) ) + +#define ID3D11DeviceContext1_DiscardResource(This,pResource) \ + ( (This)->lpVtbl -> DiscardResource(This,pResource) ) + +#define ID3D11DeviceContext1_DiscardView(This,pResourceView) \ + ( (This)->lpVtbl -> DiscardView(This,pResourceView) ) + +#define ID3D11DeviceContext1_VSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> VSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext1_HSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> HSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext1_DSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> DSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext1_GSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> GSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext1_PSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> PSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext1_CSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> CSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext1_VSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> VSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext1_HSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> HSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext1_DSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> DSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext1_GSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> GSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext1_PSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> PSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext1_CSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> CSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext1_SwapDeviceContextState(This,pState,ppPreviousState) \ + ( (This)->lpVtbl -> SwapDeviceContextState(This,pState,ppPreviousState) ) + +#define ID3D11DeviceContext1_ClearView(This,pView,Color,pRect,NumRects) \ + ( (This)->lpVtbl -> ClearView(This,pView,Color,pRect,NumRects) ) + +#define ID3D11DeviceContext1_DiscardView1(This,pResourceView,pRects,NumRects) \ + ( (This)->lpVtbl -> DiscardView1(This,pResourceView,pRects,NumRects) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11DeviceContext1_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_1_0000_0004 */ +/* [local] */ + +typedef struct D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK + { + UINT ClearSize; + UINT EncryptedSize; + } D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK; + +typedef struct D3D11_VIDEO_DECODER_BUFFER_DESC1 + { + D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType; + UINT DataOffset; + UINT DataSize; + /* [annotation] */ + _Field_size_opt_(IVSize) void *pIV; + UINT IVSize; + /* [annotation] */ + _Field_size_opt_(SubSampleMappingCount) D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK *pSubSampleMappingBlock; + UINT SubSampleMappingCount; + } D3D11_VIDEO_DECODER_BUFFER_DESC1; + +typedef struct D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION + { + ID3D11CryptoSession *pCryptoSession; + UINT BlobSize; + /* [annotation] */ + _Field_size_opt_(BlobSize) void *pBlob; + GUID *pKeyInfoId; + UINT PrivateDataSize; + /* [annotation] */ + _Field_size_opt_(PrivateDataSize) void *pPrivateData; + } D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION; + +typedef +enum D3D11_VIDEO_DECODER_CAPS + { + D3D11_VIDEO_DECODER_CAPS_DOWNSAMPLE = 0x1, + D3D11_VIDEO_DECODER_CAPS_NON_REAL_TIME = 0x2, + D3D11_VIDEO_DECODER_CAPS_DOWNSAMPLE_DYNAMIC = 0x4, + D3D11_VIDEO_DECODER_CAPS_DOWNSAMPLE_REQUIRED = 0x8, + D3D11_VIDEO_DECODER_CAPS_UNSUPPORTED = 0x10 + } D3D11_VIDEO_DECODER_CAPS; + +typedef +enum D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINTS + { + D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINT_MULTIPLANE_OVERLAY_ROTATION = 0x1, + D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINT_MULTIPLANE_OVERLAY_RESIZE = 0x2, + D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINT_MULTIPLANE_OVERLAY_COLOR_SPACE_CONVERSION = 0x4, + D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINT_TRIPLE_BUFFER_OUTPUT = 0x8 + } D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINTS; + +typedef struct D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT + { + BOOL Enable; + UINT Width; + UINT Height; + DXGI_FORMAT Format; + } D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT; + +typedef +enum D3D11_CRYPTO_SESSION_STATUS + { + D3D11_CRYPTO_SESSION_STATUS_OK = 0, + D3D11_CRYPTO_SESSION_STATUS_KEY_LOST = 1, + D3D11_CRYPTO_SESSION_STATUS_KEY_AND_CONTENT_LOST = 2 + } D3D11_CRYPTO_SESSION_STATUS; + +typedef struct D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA + { + UINT PrivateDataSize; + UINT HWProtectionDataSize; + BYTE pbInput[ 4 ]; + } D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA; + +typedef struct D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA + { + UINT PrivateDataSize; + UINT MaxHWProtectionDataSize; + UINT HWProtectionDataSize; + UINT64 TransportTime; + UINT64 ExecutionTime; + BYTE pbOutput[ 4 ]; + } D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA; + +typedef struct D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA + { + UINT HWProtectionFunctionID; + D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA *pInputData; + D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA *pOutputData; + HRESULT Status; + } D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA; + +typedef struct D3D11_VIDEO_SAMPLE_DESC + { + UINT Width; + UINT Height; + DXGI_FORMAT Format; + DXGI_COLOR_SPACE_TYPE ColorSpace; + } D3D11_VIDEO_SAMPLE_DESC; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0004_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0004_v0_0_s_ifspec; + +#ifndef __ID3D11VideoContext1_INTERFACE_DEFINED__ +#define __ID3D11VideoContext1_INTERFACE_DEFINED__ + +/* interface ID3D11VideoContext1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11VideoContext1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("A7F026DA-A5F8-4487-A564-15E34357651E") + ID3D11VideoContext1 : public ID3D11VideoContext + { + public: + virtual HRESULT STDMETHODCALLTYPE SubmitDecoderBuffers1( + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ UINT NumBuffers, + /* [annotation] */ + _In_reads_(NumBuffers) const D3D11_VIDEO_DECODER_BUFFER_DESC1 *pBufferDesc) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDataForNewHardwareKey( + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ UINT PrivateInputSize, + /* [annotation] */ + _In_reads_(PrivateInputSize) const void *pPrivatInputData, + /* [annotation] */ + _Out_ UINT64 *pPrivateOutputData) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckCryptoSessionStatus( + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _Out_ D3D11_CRYPTO_SESSION_STATUS *pStatus) = 0; + + virtual HRESULT STDMETHODCALLTYPE DecoderEnableDownsampling( + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ DXGI_COLOR_SPACE_TYPE InputColorSpace, + /* [annotation] */ + _In_ const D3D11_VIDEO_SAMPLE_DESC *pOutputDesc, + /* [annotation] */ + _In_ UINT ReferenceFrameCount) = 0; + + virtual HRESULT STDMETHODCALLTYPE DecoderUpdateDownsampling( + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ const D3D11_VIDEO_SAMPLE_DESC *pOutputDesc) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetOutputColorSpace1( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ DXGI_COLOR_SPACE_TYPE ColorSpace) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetOutputShaderUsage( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ BOOL ShaderUsage) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetOutputColorSpace1( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ DXGI_COLOR_SPACE_TYPE *pColorSpace) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetOutputShaderUsage( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ BOOL *pShaderUsage) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamColorSpace1( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ DXGI_COLOR_SPACE_TYPE ColorSpace) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamMirror( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ BOOL FlipHorizontal, + /* [annotation] */ + _In_ BOOL FlipVertical) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamColorSpace1( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ DXGI_COLOR_SPACE_TYPE *pColorSpace) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamMirror( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnable, + /* [annotation] */ + _Out_ BOOL *pFlipHorizontal, + /* [annotation] */ + _Out_ BOOL *pFlipVertical) = 0; + + virtual HRESULT STDMETHODCALLTYPE VideoProcessorGetBehaviorHints( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT OutputWidth, + /* [annotation] */ + _In_ UINT OutputHeight, + /* [annotation] */ + _In_ DXGI_FORMAT OutputFormat, + /* [annotation] */ + _In_ UINT StreamCount, + /* [annotation] */ + _In_reads_(StreamCount) const D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT *pStreams, + /* [annotation] */ + _Out_ UINT *pBehaviorHints) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11VideoContext1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11VideoContext1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11VideoContext1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11VideoContext1 * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *GetDecoderBuffer )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type, + /* [annotation] */ + _Out_ UINT *pBufferSize, + /* [annotation] */ + _Outptr_result_bytebuffer_(*pBufferSize) void **ppBuffer); + + HRESULT ( STDMETHODCALLTYPE *ReleaseDecoderBuffer )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ D3D11_VIDEO_DECODER_BUFFER_TYPE Type); + + HRESULT ( STDMETHODCALLTYPE *DecoderBeginFrame )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ ID3D11VideoDecoderOutputView *pView, + UINT ContentKeySize, + /* [annotation] */ + _In_reads_bytes_opt_(ContentKeySize) const void *pContentKey); + + HRESULT ( STDMETHODCALLTYPE *DecoderEndFrame )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder); + + HRESULT ( STDMETHODCALLTYPE *SubmitDecoderBuffers )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ UINT NumBuffers, + /* [annotation] */ + _In_reads_(NumBuffers) const D3D11_VIDEO_DECODER_BUFFER_DESC *pBufferDesc); + + APP_DEPRECATED_HRESULT ( STDMETHODCALLTYPE *DecoderExtension )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_EXTENSION *pExtensionData); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputTargetRect )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_opt_ const RECT *pRect); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputBackgroundColor )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ BOOL YCbCr, + /* [annotation] */ + _In_ const D3D11_VIDEO_COLOR *pColor); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputColorSpace )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *pColorSpace); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputAlphaFillMode )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE AlphaFillMode, + /* [annotation] */ + _In_ UINT StreamIndex); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputConstriction )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ SIZE Size); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputStereoMode )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ BOOL Enable); + + APP_DEPRECATED_HRESULT ( STDMETHODCALLTYPE *VideoProcessorSetOutputExtension )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ const GUID *pExtensionGuid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_ void *pData); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputTargetRect )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ BOOL *Enabled, + /* [annotation] */ + _Out_ RECT *pRect); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputBackgroundColor )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ BOOL *pYCbCr, + /* [annotation] */ + _Out_ D3D11_VIDEO_COLOR *pColor); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputColorSpace )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_COLOR_SPACE *pColorSpace); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputAlphaFillMode )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE *pAlphaFillMode, + /* [annotation] */ + _Out_ UINT *pStreamIndex); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputConstriction )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ SIZE *pSize); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputStereoMode )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ BOOL *pEnabled); + + APP_DEPRECATED_HRESULT ( STDMETHODCALLTYPE *VideoProcessorGetOutputExtension )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ const GUID *pExtensionGuid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _Out_writes_bytes_(DataSize) void *pData); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamFrameFormat )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ D3D11_VIDEO_FRAME_FORMAT FrameFormat); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamColorSpace )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *pColorSpace); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamOutputRate )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_OUTPUT_RATE OutputRate, + /* [annotation] */ + _In_ BOOL RepeatFrame, + /* [annotation] */ + _In_opt_ const DXGI_RATIONAL *pCustomRate); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamSourceRect )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_opt_ const RECT *pRect); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamDestRect )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_opt_ const RECT *pRect); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamAlpha )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ FLOAT Alpha); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamPalette )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ UINT Count, + /* [annotation] */ + _In_reads_opt_(Count) const UINT *pEntries); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamPixelAspectRatio )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_opt_ const DXGI_RATIONAL *pSourceAspectRatio, + /* [annotation] */ + _In_opt_ const DXGI_RATIONAL *pDestinationAspectRatio); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamLumaKey )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ FLOAT Lower, + /* [annotation] */ + _In_ FLOAT Upper); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamStereoFormat )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_STEREO_FORMAT Format, + /* [annotation] */ + _In_ BOOL LeftViewFrame0, + /* [annotation] */ + _In_ BOOL BaseViewFrame0, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE FlipMode, + /* [annotation] */ + _In_ int MonoOffset); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamAutoProcessingMode )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamFilter )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_FILTER Filter, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ int Level); + + APP_DEPRECATED_HRESULT ( STDMETHODCALLTYPE *VideoProcessorSetStreamExtension )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ const GUID *pExtensionGuid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_ void *pData); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamFrameFormat )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ D3D11_VIDEO_FRAME_FORMAT *pFrameFormat); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamColorSpace )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_COLOR_SPACE *pColorSpace); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamOutputRate )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_OUTPUT_RATE *pOutputRate, + /* [annotation] */ + _Out_ BOOL *pRepeatFrame, + /* [annotation] */ + _Out_ DXGI_RATIONAL *pCustomRate); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamSourceRect )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ RECT *pRect); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamDestRect )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ RECT *pRect); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamAlpha )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ FLOAT *pAlpha); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamPalette )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ UINT Count, + /* [annotation] */ + _Out_writes_(Count) UINT *pEntries); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamPixelAspectRatio )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ DXGI_RATIONAL *pSourceAspectRatio, + /* [annotation] */ + _Out_ DXGI_RATIONAL *pDestinationAspectRatio); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamLumaKey )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ FLOAT *pLower, + /* [annotation] */ + _Out_ FLOAT *pUpper); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamStereoFormat )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnable, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_STEREO_FORMAT *pFormat, + /* [annotation] */ + _Out_ BOOL *pLeftViewFrame0, + /* [annotation] */ + _Out_ BOOL *pBaseViewFrame0, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE *pFlipMode, + /* [annotation] */ + _Out_ int *MonoOffset); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamAutoProcessingMode )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamFilter )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_FILTER Filter, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ int *pLevel); + + APP_DEPRECATED_HRESULT ( STDMETHODCALLTYPE *VideoProcessorGetStreamExtension )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ const GUID *pExtensionGuid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _Out_writes_bytes_(DataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *VideoProcessorBlt )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ ID3D11VideoProcessorOutputView *pView, + /* [annotation] */ + _In_ UINT OutputFrame, + /* [annotation] */ + _In_ UINT StreamCount, + /* [annotation] */ + _In_reads_(StreamCount) const D3D11_VIDEO_PROCESSOR_STREAM *pStreams); + + HRESULT ( STDMETHODCALLTYPE *NegotiateCryptoSessionKeyExchange )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _Inout_updates_bytes_(DataSize) void *pData); + + void ( STDMETHODCALLTYPE *EncryptionBlt )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ ID3D11Texture2D *pSrcSurface, + /* [annotation] */ + _In_ ID3D11Texture2D *pDstSurface, + /* [annotation] */ + _In_ UINT IVSize, + /* [annotation] */ + _Inout_opt_bytecount_(IVSize) void *pIV); + + void ( STDMETHODCALLTYPE *DecryptionBlt )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ ID3D11Texture2D *pSrcSurface, + /* [annotation] */ + _In_ ID3D11Texture2D *pDstSurface, + /* [annotation] */ + _In_opt_ D3D11_ENCRYPTED_BLOCK_INFO *pEncryptedBlockInfo, + /* [annotation] */ + _In_ UINT ContentKeySize, + /* [annotation] */ + _In_reads_bytes_opt_(ContentKeySize) const void *pContentKey, + /* [annotation] */ + _In_ UINT IVSize, + /* [annotation] */ + _Inout_opt_bytecount_(IVSize) void *pIV); + + void ( STDMETHODCALLTYPE *StartSessionKeyRefresh )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ UINT RandomNumberSize, + /* [annotation] */ + _Out_writes_bytes_(RandomNumberSize) void *pRandomNumber); + + void ( STDMETHODCALLTYPE *FinishSessionKeyRefresh )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession); + + HRESULT ( STDMETHODCALLTYPE *GetEncryptionBltKey )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ UINT KeySize, + /* [annotation] */ + _Out_writes_bytes_(KeySize) void *pReadbackKey); + + HRESULT ( STDMETHODCALLTYPE *NegotiateAuthenticatedChannelKeyExchange )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11AuthenticatedChannel *pChannel, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _Inout_updates_bytes_(DataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *QueryAuthenticatedChannel )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11AuthenticatedChannel *pChannel, + /* [annotation] */ + _In_ UINT InputSize, + /* [annotation] */ + _In_reads_bytes_(InputSize) const void *pInput, + /* [annotation] */ + _In_ UINT OutputSize, + /* [annotation] */ + _Out_writes_bytes_(OutputSize) void *pOutput); + + HRESULT ( STDMETHODCALLTYPE *ConfigureAuthenticatedChannel )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11AuthenticatedChannel *pChannel, + /* [annotation] */ + _In_ UINT InputSize, + /* [annotation] */ + _In_reads_bytes_(InputSize) const void *pInput, + /* [annotation] */ + _Out_ D3D11_AUTHENTICATED_CONFIGURE_OUTPUT *pOutput); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamRotation )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_ROTATION Rotation); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamRotation )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnable, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_ROTATION *pRotation); + + HRESULT ( STDMETHODCALLTYPE *SubmitDecoderBuffers1 )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ UINT NumBuffers, + /* [annotation] */ + _In_reads_(NumBuffers) const D3D11_VIDEO_DECODER_BUFFER_DESC1 *pBufferDesc); + + HRESULT ( STDMETHODCALLTYPE *GetDataForNewHardwareKey )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ UINT PrivateInputSize, + /* [annotation] */ + _In_reads_(PrivateInputSize) const void *pPrivatInputData, + /* [annotation] */ + _Out_ UINT64 *pPrivateOutputData); + + HRESULT ( STDMETHODCALLTYPE *CheckCryptoSessionStatus )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _Out_ D3D11_CRYPTO_SESSION_STATUS *pStatus); + + HRESULT ( STDMETHODCALLTYPE *DecoderEnableDownsampling )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ DXGI_COLOR_SPACE_TYPE InputColorSpace, + /* [annotation] */ + _In_ const D3D11_VIDEO_SAMPLE_DESC *pOutputDesc, + /* [annotation] */ + _In_ UINT ReferenceFrameCount); + + HRESULT ( STDMETHODCALLTYPE *DecoderUpdateDownsampling )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ const D3D11_VIDEO_SAMPLE_DESC *pOutputDesc); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputColorSpace1 )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ DXGI_COLOR_SPACE_TYPE ColorSpace); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputShaderUsage )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ BOOL ShaderUsage); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputColorSpace1 )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ DXGI_COLOR_SPACE_TYPE *pColorSpace); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputShaderUsage )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ BOOL *pShaderUsage); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamColorSpace1 )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ DXGI_COLOR_SPACE_TYPE ColorSpace); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamMirror )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ BOOL FlipHorizontal, + /* [annotation] */ + _In_ BOOL FlipVertical); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamColorSpace1 )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ DXGI_COLOR_SPACE_TYPE *pColorSpace); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamMirror )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnable, + /* [annotation] */ + _Out_ BOOL *pFlipHorizontal, + /* [annotation] */ + _Out_ BOOL *pFlipVertical); + + HRESULT ( STDMETHODCALLTYPE *VideoProcessorGetBehaviorHints )( + ID3D11VideoContext1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT OutputWidth, + /* [annotation] */ + _In_ UINT OutputHeight, + /* [annotation] */ + _In_ DXGI_FORMAT OutputFormat, + /* [annotation] */ + _In_ UINT StreamCount, + /* [annotation] */ + _In_reads_(StreamCount) const D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT *pStreams, + /* [annotation] */ + _Out_ UINT *pBehaviorHints); + + END_INTERFACE + } ID3D11VideoContext1Vtbl; + + interface ID3D11VideoContext1 + { + CONST_VTBL struct ID3D11VideoContext1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11VideoContext1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11VideoContext1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11VideoContext1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11VideoContext1_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11VideoContext1_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11VideoContext1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11VideoContext1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11VideoContext1_GetDecoderBuffer(This,pDecoder,Type,pBufferSize,ppBuffer) \ + ( (This)->lpVtbl -> GetDecoderBuffer(This,pDecoder,Type,pBufferSize,ppBuffer) ) + +#define ID3D11VideoContext1_ReleaseDecoderBuffer(This,pDecoder,Type) \ + ( (This)->lpVtbl -> ReleaseDecoderBuffer(This,pDecoder,Type) ) + +#define ID3D11VideoContext1_DecoderBeginFrame(This,pDecoder,pView,ContentKeySize,pContentKey) \ + ( (This)->lpVtbl -> DecoderBeginFrame(This,pDecoder,pView,ContentKeySize,pContentKey) ) + +#define ID3D11VideoContext1_DecoderEndFrame(This,pDecoder) \ + ( (This)->lpVtbl -> DecoderEndFrame(This,pDecoder) ) + +#define ID3D11VideoContext1_SubmitDecoderBuffers(This,pDecoder,NumBuffers,pBufferDesc) \ + ( (This)->lpVtbl -> SubmitDecoderBuffers(This,pDecoder,NumBuffers,pBufferDesc) ) + +#define ID3D11VideoContext1_DecoderExtension(This,pDecoder,pExtensionData) \ + ( (This)->lpVtbl -> DecoderExtension(This,pDecoder,pExtensionData) ) + +#define ID3D11VideoContext1_VideoProcessorSetOutputTargetRect(This,pVideoProcessor,Enable,pRect) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputTargetRect(This,pVideoProcessor,Enable,pRect) ) + +#define ID3D11VideoContext1_VideoProcessorSetOutputBackgroundColor(This,pVideoProcessor,YCbCr,pColor) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputBackgroundColor(This,pVideoProcessor,YCbCr,pColor) ) + +#define ID3D11VideoContext1_VideoProcessorSetOutputColorSpace(This,pVideoProcessor,pColorSpace) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputColorSpace(This,pVideoProcessor,pColorSpace) ) + +#define ID3D11VideoContext1_VideoProcessorSetOutputAlphaFillMode(This,pVideoProcessor,AlphaFillMode,StreamIndex) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputAlphaFillMode(This,pVideoProcessor,AlphaFillMode,StreamIndex) ) + +#define ID3D11VideoContext1_VideoProcessorSetOutputConstriction(This,pVideoProcessor,Enable,Size) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputConstriction(This,pVideoProcessor,Enable,Size) ) + +#define ID3D11VideoContext1_VideoProcessorSetOutputStereoMode(This,pVideoProcessor,Enable) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputStereoMode(This,pVideoProcessor,Enable) ) + +#define ID3D11VideoContext1_VideoProcessorSetOutputExtension(This,pVideoProcessor,pExtensionGuid,DataSize,pData) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputExtension(This,pVideoProcessor,pExtensionGuid,DataSize,pData) ) + +#define ID3D11VideoContext1_VideoProcessorGetOutputTargetRect(This,pVideoProcessor,Enabled,pRect) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputTargetRect(This,pVideoProcessor,Enabled,pRect) ) + +#define ID3D11VideoContext1_VideoProcessorGetOutputBackgroundColor(This,pVideoProcessor,pYCbCr,pColor) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputBackgroundColor(This,pVideoProcessor,pYCbCr,pColor) ) + +#define ID3D11VideoContext1_VideoProcessorGetOutputColorSpace(This,pVideoProcessor,pColorSpace) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputColorSpace(This,pVideoProcessor,pColorSpace) ) + +#define ID3D11VideoContext1_VideoProcessorGetOutputAlphaFillMode(This,pVideoProcessor,pAlphaFillMode,pStreamIndex) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputAlphaFillMode(This,pVideoProcessor,pAlphaFillMode,pStreamIndex) ) + +#define ID3D11VideoContext1_VideoProcessorGetOutputConstriction(This,pVideoProcessor,pEnabled,pSize) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputConstriction(This,pVideoProcessor,pEnabled,pSize) ) + +#define ID3D11VideoContext1_VideoProcessorGetOutputStereoMode(This,pVideoProcessor,pEnabled) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputStereoMode(This,pVideoProcessor,pEnabled) ) + +#define ID3D11VideoContext1_VideoProcessorGetOutputExtension(This,pVideoProcessor,pExtensionGuid,DataSize,pData) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputExtension(This,pVideoProcessor,pExtensionGuid,DataSize,pData) ) + +#define ID3D11VideoContext1_VideoProcessorSetStreamFrameFormat(This,pVideoProcessor,StreamIndex,FrameFormat) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamFrameFormat(This,pVideoProcessor,StreamIndex,FrameFormat) ) + +#define ID3D11VideoContext1_VideoProcessorSetStreamColorSpace(This,pVideoProcessor,StreamIndex,pColorSpace) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamColorSpace(This,pVideoProcessor,StreamIndex,pColorSpace) ) + +#define ID3D11VideoContext1_VideoProcessorSetStreamOutputRate(This,pVideoProcessor,StreamIndex,OutputRate,RepeatFrame,pCustomRate) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamOutputRate(This,pVideoProcessor,StreamIndex,OutputRate,RepeatFrame,pCustomRate) ) + +#define ID3D11VideoContext1_VideoProcessorSetStreamSourceRect(This,pVideoProcessor,StreamIndex,Enable,pRect) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamSourceRect(This,pVideoProcessor,StreamIndex,Enable,pRect) ) + +#define ID3D11VideoContext1_VideoProcessorSetStreamDestRect(This,pVideoProcessor,StreamIndex,Enable,pRect) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamDestRect(This,pVideoProcessor,StreamIndex,Enable,pRect) ) + +#define ID3D11VideoContext1_VideoProcessorSetStreamAlpha(This,pVideoProcessor,StreamIndex,Enable,Alpha) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamAlpha(This,pVideoProcessor,StreamIndex,Enable,Alpha) ) + +#define ID3D11VideoContext1_VideoProcessorSetStreamPalette(This,pVideoProcessor,StreamIndex,Count,pEntries) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamPalette(This,pVideoProcessor,StreamIndex,Count,pEntries) ) + +#define ID3D11VideoContext1_VideoProcessorSetStreamPixelAspectRatio(This,pVideoProcessor,StreamIndex,Enable,pSourceAspectRatio,pDestinationAspectRatio) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamPixelAspectRatio(This,pVideoProcessor,StreamIndex,Enable,pSourceAspectRatio,pDestinationAspectRatio) ) + +#define ID3D11VideoContext1_VideoProcessorSetStreamLumaKey(This,pVideoProcessor,StreamIndex,Enable,Lower,Upper) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamLumaKey(This,pVideoProcessor,StreamIndex,Enable,Lower,Upper) ) + +#define ID3D11VideoContext1_VideoProcessorSetStreamStereoFormat(This,pVideoProcessor,StreamIndex,Enable,Format,LeftViewFrame0,BaseViewFrame0,FlipMode,MonoOffset) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamStereoFormat(This,pVideoProcessor,StreamIndex,Enable,Format,LeftViewFrame0,BaseViewFrame0,FlipMode,MonoOffset) ) + +#define ID3D11VideoContext1_VideoProcessorSetStreamAutoProcessingMode(This,pVideoProcessor,StreamIndex,Enable) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamAutoProcessingMode(This,pVideoProcessor,StreamIndex,Enable) ) + +#define ID3D11VideoContext1_VideoProcessorSetStreamFilter(This,pVideoProcessor,StreamIndex,Filter,Enable,Level) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamFilter(This,pVideoProcessor,StreamIndex,Filter,Enable,Level) ) + +#define ID3D11VideoContext1_VideoProcessorSetStreamExtension(This,pVideoProcessor,StreamIndex,pExtensionGuid,DataSize,pData) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamExtension(This,pVideoProcessor,StreamIndex,pExtensionGuid,DataSize,pData) ) + +#define ID3D11VideoContext1_VideoProcessorGetStreamFrameFormat(This,pVideoProcessor,StreamIndex,pFrameFormat) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamFrameFormat(This,pVideoProcessor,StreamIndex,pFrameFormat) ) + +#define ID3D11VideoContext1_VideoProcessorGetStreamColorSpace(This,pVideoProcessor,StreamIndex,pColorSpace) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamColorSpace(This,pVideoProcessor,StreamIndex,pColorSpace) ) + +#define ID3D11VideoContext1_VideoProcessorGetStreamOutputRate(This,pVideoProcessor,StreamIndex,pOutputRate,pRepeatFrame,pCustomRate) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamOutputRate(This,pVideoProcessor,StreamIndex,pOutputRate,pRepeatFrame,pCustomRate) ) + +#define ID3D11VideoContext1_VideoProcessorGetStreamSourceRect(This,pVideoProcessor,StreamIndex,pEnabled,pRect) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamSourceRect(This,pVideoProcessor,StreamIndex,pEnabled,pRect) ) + +#define ID3D11VideoContext1_VideoProcessorGetStreamDestRect(This,pVideoProcessor,StreamIndex,pEnabled,pRect) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamDestRect(This,pVideoProcessor,StreamIndex,pEnabled,pRect) ) + +#define ID3D11VideoContext1_VideoProcessorGetStreamAlpha(This,pVideoProcessor,StreamIndex,pEnabled,pAlpha) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamAlpha(This,pVideoProcessor,StreamIndex,pEnabled,pAlpha) ) + +#define ID3D11VideoContext1_VideoProcessorGetStreamPalette(This,pVideoProcessor,StreamIndex,Count,pEntries) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamPalette(This,pVideoProcessor,StreamIndex,Count,pEntries) ) + +#define ID3D11VideoContext1_VideoProcessorGetStreamPixelAspectRatio(This,pVideoProcessor,StreamIndex,pEnabled,pSourceAspectRatio,pDestinationAspectRatio) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamPixelAspectRatio(This,pVideoProcessor,StreamIndex,pEnabled,pSourceAspectRatio,pDestinationAspectRatio) ) + +#define ID3D11VideoContext1_VideoProcessorGetStreamLumaKey(This,pVideoProcessor,StreamIndex,pEnabled,pLower,pUpper) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamLumaKey(This,pVideoProcessor,StreamIndex,pEnabled,pLower,pUpper) ) + +#define ID3D11VideoContext1_VideoProcessorGetStreamStereoFormat(This,pVideoProcessor,StreamIndex,pEnable,pFormat,pLeftViewFrame0,pBaseViewFrame0,pFlipMode,MonoOffset) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamStereoFormat(This,pVideoProcessor,StreamIndex,pEnable,pFormat,pLeftViewFrame0,pBaseViewFrame0,pFlipMode,MonoOffset) ) + +#define ID3D11VideoContext1_VideoProcessorGetStreamAutoProcessingMode(This,pVideoProcessor,StreamIndex,pEnabled) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamAutoProcessingMode(This,pVideoProcessor,StreamIndex,pEnabled) ) + +#define ID3D11VideoContext1_VideoProcessorGetStreamFilter(This,pVideoProcessor,StreamIndex,Filter,pEnabled,pLevel) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamFilter(This,pVideoProcessor,StreamIndex,Filter,pEnabled,pLevel) ) + +#define ID3D11VideoContext1_VideoProcessorGetStreamExtension(This,pVideoProcessor,StreamIndex,pExtensionGuid,DataSize,pData) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamExtension(This,pVideoProcessor,StreamIndex,pExtensionGuid,DataSize,pData) ) + +#define ID3D11VideoContext1_VideoProcessorBlt(This,pVideoProcessor,pView,OutputFrame,StreamCount,pStreams) \ + ( (This)->lpVtbl -> VideoProcessorBlt(This,pVideoProcessor,pView,OutputFrame,StreamCount,pStreams) ) + +#define ID3D11VideoContext1_NegotiateCryptoSessionKeyExchange(This,pCryptoSession,DataSize,pData) \ + ( (This)->lpVtbl -> NegotiateCryptoSessionKeyExchange(This,pCryptoSession,DataSize,pData) ) + +#define ID3D11VideoContext1_EncryptionBlt(This,pCryptoSession,pSrcSurface,pDstSurface,IVSize,pIV) \ + ( (This)->lpVtbl -> EncryptionBlt(This,pCryptoSession,pSrcSurface,pDstSurface,IVSize,pIV) ) + +#define ID3D11VideoContext1_DecryptionBlt(This,pCryptoSession,pSrcSurface,pDstSurface,pEncryptedBlockInfo,ContentKeySize,pContentKey,IVSize,pIV) \ + ( (This)->lpVtbl -> DecryptionBlt(This,pCryptoSession,pSrcSurface,pDstSurface,pEncryptedBlockInfo,ContentKeySize,pContentKey,IVSize,pIV) ) + +#define ID3D11VideoContext1_StartSessionKeyRefresh(This,pCryptoSession,RandomNumberSize,pRandomNumber) \ + ( (This)->lpVtbl -> StartSessionKeyRefresh(This,pCryptoSession,RandomNumberSize,pRandomNumber) ) + +#define ID3D11VideoContext1_FinishSessionKeyRefresh(This,pCryptoSession) \ + ( (This)->lpVtbl -> FinishSessionKeyRefresh(This,pCryptoSession) ) + +#define ID3D11VideoContext1_GetEncryptionBltKey(This,pCryptoSession,KeySize,pReadbackKey) \ + ( (This)->lpVtbl -> GetEncryptionBltKey(This,pCryptoSession,KeySize,pReadbackKey) ) + +#define ID3D11VideoContext1_NegotiateAuthenticatedChannelKeyExchange(This,pChannel,DataSize,pData) \ + ( (This)->lpVtbl -> NegotiateAuthenticatedChannelKeyExchange(This,pChannel,DataSize,pData) ) + +#define ID3D11VideoContext1_QueryAuthenticatedChannel(This,pChannel,InputSize,pInput,OutputSize,pOutput) \ + ( (This)->lpVtbl -> QueryAuthenticatedChannel(This,pChannel,InputSize,pInput,OutputSize,pOutput) ) + +#define ID3D11VideoContext1_ConfigureAuthenticatedChannel(This,pChannel,InputSize,pInput,pOutput) \ + ( (This)->lpVtbl -> ConfigureAuthenticatedChannel(This,pChannel,InputSize,pInput,pOutput) ) + +#define ID3D11VideoContext1_VideoProcessorSetStreamRotation(This,pVideoProcessor,StreamIndex,Enable,Rotation) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamRotation(This,pVideoProcessor,StreamIndex,Enable,Rotation) ) + +#define ID3D11VideoContext1_VideoProcessorGetStreamRotation(This,pVideoProcessor,StreamIndex,pEnable,pRotation) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamRotation(This,pVideoProcessor,StreamIndex,pEnable,pRotation) ) + + +#define ID3D11VideoContext1_SubmitDecoderBuffers1(This,pDecoder,NumBuffers,pBufferDesc) \ + ( (This)->lpVtbl -> SubmitDecoderBuffers1(This,pDecoder,NumBuffers,pBufferDesc) ) + +#define ID3D11VideoContext1_GetDataForNewHardwareKey(This,pCryptoSession,PrivateInputSize,pPrivatInputData,pPrivateOutputData) \ + ( (This)->lpVtbl -> GetDataForNewHardwareKey(This,pCryptoSession,PrivateInputSize,pPrivatInputData,pPrivateOutputData) ) + +#define ID3D11VideoContext1_CheckCryptoSessionStatus(This,pCryptoSession,pStatus) \ + ( (This)->lpVtbl -> CheckCryptoSessionStatus(This,pCryptoSession,pStatus) ) + +#define ID3D11VideoContext1_DecoderEnableDownsampling(This,pDecoder,InputColorSpace,pOutputDesc,ReferenceFrameCount) \ + ( (This)->lpVtbl -> DecoderEnableDownsampling(This,pDecoder,InputColorSpace,pOutputDesc,ReferenceFrameCount) ) + +#define ID3D11VideoContext1_DecoderUpdateDownsampling(This,pDecoder,pOutputDesc) \ + ( (This)->lpVtbl -> DecoderUpdateDownsampling(This,pDecoder,pOutputDesc) ) + +#define ID3D11VideoContext1_VideoProcessorSetOutputColorSpace1(This,pVideoProcessor,ColorSpace) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputColorSpace1(This,pVideoProcessor,ColorSpace) ) + +#define ID3D11VideoContext1_VideoProcessorSetOutputShaderUsage(This,pVideoProcessor,ShaderUsage) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputShaderUsage(This,pVideoProcessor,ShaderUsage) ) + +#define ID3D11VideoContext1_VideoProcessorGetOutputColorSpace1(This,pVideoProcessor,pColorSpace) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputColorSpace1(This,pVideoProcessor,pColorSpace) ) + +#define ID3D11VideoContext1_VideoProcessorGetOutputShaderUsage(This,pVideoProcessor,pShaderUsage) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputShaderUsage(This,pVideoProcessor,pShaderUsage) ) + +#define ID3D11VideoContext1_VideoProcessorSetStreamColorSpace1(This,pVideoProcessor,StreamIndex,ColorSpace) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamColorSpace1(This,pVideoProcessor,StreamIndex,ColorSpace) ) + +#define ID3D11VideoContext1_VideoProcessorSetStreamMirror(This,pVideoProcessor,StreamIndex,Enable,FlipHorizontal,FlipVertical) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamMirror(This,pVideoProcessor,StreamIndex,Enable,FlipHorizontal,FlipVertical) ) + +#define ID3D11VideoContext1_VideoProcessorGetStreamColorSpace1(This,pVideoProcessor,StreamIndex,pColorSpace) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamColorSpace1(This,pVideoProcessor,StreamIndex,pColorSpace) ) + +#define ID3D11VideoContext1_VideoProcessorGetStreamMirror(This,pVideoProcessor,StreamIndex,pEnable,pFlipHorizontal,pFlipVertical) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamMirror(This,pVideoProcessor,StreamIndex,pEnable,pFlipHorizontal,pFlipVertical) ) + +#define ID3D11VideoContext1_VideoProcessorGetBehaviorHints(This,pVideoProcessor,OutputWidth,OutputHeight,OutputFormat,StreamCount,pStreams,pBehaviorHints) \ + ( (This)->lpVtbl -> VideoProcessorGetBehaviorHints(This,pVideoProcessor,OutputWidth,OutputHeight,OutputFormat,StreamCount,pStreams,pBehaviorHints) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11VideoContext1_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11VideoDevice1_INTERFACE_DEFINED__ +#define __ID3D11VideoDevice1_INTERFACE_DEFINED__ + +/* interface ID3D11VideoDevice1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11VideoDevice1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("29DA1D51-1321-4454-804B-F5FC9F861F0F") + ID3D11VideoDevice1 : public ID3D11VideoDevice + { + public: + virtual HRESULT STDMETHODCALLTYPE GetCryptoSessionPrivateDataSize( + /* [annotation] */ + _In_ const GUID *pCryptoType, + /* [annotation] */ + _In_opt_ const GUID *pDecoderProfile, + /* [annotation] */ + _In_ const GUID *pKeyExchangeType, + /* [annotation] */ + _Out_ UINT *pPrivateInputSize, + /* [annotation] */ + _Out_ UINT *pPrivateOutputSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVideoDecoderCaps( + /* [annotation] */ + _In_ const GUID *pDecoderProfile, + /* [annotation] */ + _In_ UINT SampleWidth, + /* [annotation] */ + _In_ UINT SampleHeight, + /* [annotation] */ + _In_ const DXGI_RATIONAL *pFrameRate, + /* [annotation] */ + _In_ UINT BitRate, + /* [annotation] */ + _In_opt_ const GUID *pCryptoType, + /* [annotation] */ + _Out_ UINT *pDecoderCaps) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckVideoDecoderDownsampling( + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_DESC *pInputDesc, + /* [annotation] */ + _In_ DXGI_COLOR_SPACE_TYPE InputColorSpace, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_CONFIG *pInputConfig, + /* [annotation] */ + _In_ const DXGI_RATIONAL *pFrameRate, + /* [annotation] */ + _In_ const D3D11_VIDEO_SAMPLE_DESC *pOutputDesc, + /* [annotation] */ + _Out_ BOOL *pSupported, + /* [annotation] */ + _Out_ BOOL *pRealTimeHint) = 0; + + virtual HRESULT STDMETHODCALLTYPE RecommendVideoDecoderDownsampleParameters( + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_DESC *pInputDesc, + /* [annotation] */ + _In_ DXGI_COLOR_SPACE_TYPE InputColorSpace, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_CONFIG *pInputConfig, + /* [annotation] */ + _In_ const DXGI_RATIONAL *pFrameRate, + /* [annotation] */ + _Out_ D3D11_VIDEO_SAMPLE_DESC *pRecommendedOutputDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11VideoDevice1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11VideoDevice1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11VideoDevice1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11VideoDevice1 * This); + + HRESULT ( STDMETHODCALLTYPE *CreateVideoDecoder )( + ID3D11VideoDevice1 * This, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_DESC *pVideoDesc, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_CONFIG *pConfig, + /* [annotation] */ + _COM_Outptr_ ID3D11VideoDecoder **ppDecoder); + + HRESULT ( STDMETHODCALLTYPE *CreateVideoProcessor )( + ID3D11VideoDevice1 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessorEnumerator *pEnum, + /* [annotation] */ + _In_ UINT RateConversionIndex, + /* [annotation] */ + _COM_Outptr_ ID3D11VideoProcessor **ppVideoProcessor); + + HRESULT ( STDMETHODCALLTYPE *CreateAuthenticatedChannel )( + ID3D11VideoDevice1 * This, + /* [annotation] */ + _In_ D3D11_AUTHENTICATED_CHANNEL_TYPE ChannelType, + /* [annotation] */ + _COM_Outptr_ ID3D11AuthenticatedChannel **ppAuthenticatedChannel); + + HRESULT ( STDMETHODCALLTYPE *CreateCryptoSession )( + ID3D11VideoDevice1 * This, + /* [annotation] */ + _In_ const GUID *pCryptoType, + /* [annotation] */ + _In_opt_ const GUID *pDecoderProfile, + /* [annotation] */ + _In_ const GUID *pKeyExchangeType, + /* [annotation] */ + _COM_Outptr_ ID3D11CryptoSession **ppCryptoSession); + + HRESULT ( STDMETHODCALLTYPE *CreateVideoDecoderOutputView )( + ID3D11VideoDevice1 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11VideoDecoderOutputView **ppVDOVView); + + HRESULT ( STDMETHODCALLTYPE *CreateVideoProcessorInputView )( + ID3D11VideoDevice1 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_ ID3D11VideoProcessorEnumerator *pEnum, + /* [annotation] */ + _In_ const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11VideoProcessorInputView **ppVPIView); + + HRESULT ( STDMETHODCALLTYPE *CreateVideoProcessorOutputView )( + ID3D11VideoDevice1 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_ ID3D11VideoProcessorEnumerator *pEnum, + /* [annotation] */ + _In_ const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11VideoProcessorOutputView **ppVPOView); + + HRESULT ( STDMETHODCALLTYPE *CreateVideoProcessorEnumerator )( + ID3D11VideoDevice1 * This, + /* [annotation] */ + _In_ const D3D11_VIDEO_PROCESSOR_CONTENT_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_ ID3D11VideoProcessorEnumerator **ppEnum); + + UINT ( STDMETHODCALLTYPE *GetVideoDecoderProfileCount )( + ID3D11VideoDevice1 * This); + + HRESULT ( STDMETHODCALLTYPE *GetVideoDecoderProfile )( + ID3D11VideoDevice1 * This, + /* [annotation] */ + _In_ UINT Index, + /* [annotation] */ + _Out_ GUID *pDecoderProfile); + + HRESULT ( STDMETHODCALLTYPE *CheckVideoDecoderFormat )( + ID3D11VideoDevice1 * This, + /* [annotation] */ + _In_ const GUID *pDecoderProfile, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _Out_ BOOL *pSupported); + + HRESULT ( STDMETHODCALLTYPE *GetVideoDecoderConfigCount )( + ID3D11VideoDevice1 * This, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_DESC *pDesc, + /* [annotation] */ + _Out_ UINT *pCount); + + HRESULT ( STDMETHODCALLTYPE *GetVideoDecoderConfig )( + ID3D11VideoDevice1 * This, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_DESC *pDesc, + /* [annotation] */ + _In_ UINT Index, + /* [annotation] */ + _Out_ D3D11_VIDEO_DECODER_CONFIG *pConfig); + + HRESULT ( STDMETHODCALLTYPE *GetContentProtectionCaps )( + ID3D11VideoDevice1 * This, + /* [annotation] */ + _In_opt_ const GUID *pCryptoType, + /* [annotation] */ + _In_opt_ const GUID *pDecoderProfile, + /* [annotation] */ + _Out_ D3D11_VIDEO_CONTENT_PROTECTION_CAPS *pCaps); + + HRESULT ( STDMETHODCALLTYPE *CheckCryptoKeyExchange )( + ID3D11VideoDevice1 * This, + /* [annotation] */ + _In_ const GUID *pCryptoType, + /* [annotation] */ + _In_opt_ const GUID *pDecoderProfile, + /* [annotation] */ + _In_ UINT Index, + /* [annotation] */ + _Out_ GUID *pKeyExchangeType); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11VideoDevice1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11VideoDevice1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *GetCryptoSessionPrivateDataSize )( + ID3D11VideoDevice1 * This, + /* [annotation] */ + _In_ const GUID *pCryptoType, + /* [annotation] */ + _In_opt_ const GUID *pDecoderProfile, + /* [annotation] */ + _In_ const GUID *pKeyExchangeType, + /* [annotation] */ + _Out_ UINT *pPrivateInputSize, + /* [annotation] */ + _Out_ UINT *pPrivateOutputSize); + + HRESULT ( STDMETHODCALLTYPE *GetVideoDecoderCaps )( + ID3D11VideoDevice1 * This, + /* [annotation] */ + _In_ const GUID *pDecoderProfile, + /* [annotation] */ + _In_ UINT SampleWidth, + /* [annotation] */ + _In_ UINT SampleHeight, + /* [annotation] */ + _In_ const DXGI_RATIONAL *pFrameRate, + /* [annotation] */ + _In_ UINT BitRate, + /* [annotation] */ + _In_opt_ const GUID *pCryptoType, + /* [annotation] */ + _Out_ UINT *pDecoderCaps); + + HRESULT ( STDMETHODCALLTYPE *CheckVideoDecoderDownsampling )( + ID3D11VideoDevice1 * This, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_DESC *pInputDesc, + /* [annotation] */ + _In_ DXGI_COLOR_SPACE_TYPE InputColorSpace, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_CONFIG *pInputConfig, + /* [annotation] */ + _In_ const DXGI_RATIONAL *pFrameRate, + /* [annotation] */ + _In_ const D3D11_VIDEO_SAMPLE_DESC *pOutputDesc, + /* [annotation] */ + _Out_ BOOL *pSupported, + /* [annotation] */ + _Out_ BOOL *pRealTimeHint); + + HRESULT ( STDMETHODCALLTYPE *RecommendVideoDecoderDownsampleParameters )( + ID3D11VideoDevice1 * This, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_DESC *pInputDesc, + /* [annotation] */ + _In_ DXGI_COLOR_SPACE_TYPE InputColorSpace, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_CONFIG *pInputConfig, + /* [annotation] */ + _In_ const DXGI_RATIONAL *pFrameRate, + /* [annotation] */ + _Out_ D3D11_VIDEO_SAMPLE_DESC *pRecommendedOutputDesc); + + END_INTERFACE + } ID3D11VideoDevice1Vtbl; + + interface ID3D11VideoDevice1 + { + CONST_VTBL struct ID3D11VideoDevice1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11VideoDevice1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11VideoDevice1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11VideoDevice1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11VideoDevice1_CreateVideoDecoder(This,pVideoDesc,pConfig,ppDecoder) \ + ( (This)->lpVtbl -> CreateVideoDecoder(This,pVideoDesc,pConfig,ppDecoder) ) + +#define ID3D11VideoDevice1_CreateVideoProcessor(This,pEnum,RateConversionIndex,ppVideoProcessor) \ + ( (This)->lpVtbl -> CreateVideoProcessor(This,pEnum,RateConversionIndex,ppVideoProcessor) ) + +#define ID3D11VideoDevice1_CreateAuthenticatedChannel(This,ChannelType,ppAuthenticatedChannel) \ + ( (This)->lpVtbl -> CreateAuthenticatedChannel(This,ChannelType,ppAuthenticatedChannel) ) + +#define ID3D11VideoDevice1_CreateCryptoSession(This,pCryptoType,pDecoderProfile,pKeyExchangeType,ppCryptoSession) \ + ( (This)->lpVtbl -> CreateCryptoSession(This,pCryptoType,pDecoderProfile,pKeyExchangeType,ppCryptoSession) ) + +#define ID3D11VideoDevice1_CreateVideoDecoderOutputView(This,pResource,pDesc,ppVDOVView) \ + ( (This)->lpVtbl -> CreateVideoDecoderOutputView(This,pResource,pDesc,ppVDOVView) ) + +#define ID3D11VideoDevice1_CreateVideoProcessorInputView(This,pResource,pEnum,pDesc,ppVPIView) \ + ( (This)->lpVtbl -> CreateVideoProcessorInputView(This,pResource,pEnum,pDesc,ppVPIView) ) + +#define ID3D11VideoDevice1_CreateVideoProcessorOutputView(This,pResource,pEnum,pDesc,ppVPOView) \ + ( (This)->lpVtbl -> CreateVideoProcessorOutputView(This,pResource,pEnum,pDesc,ppVPOView) ) + +#define ID3D11VideoDevice1_CreateVideoProcessorEnumerator(This,pDesc,ppEnum) \ + ( (This)->lpVtbl -> CreateVideoProcessorEnumerator(This,pDesc,ppEnum) ) + +#define ID3D11VideoDevice1_GetVideoDecoderProfileCount(This) \ + ( (This)->lpVtbl -> GetVideoDecoderProfileCount(This) ) + +#define ID3D11VideoDevice1_GetVideoDecoderProfile(This,Index,pDecoderProfile) \ + ( (This)->lpVtbl -> GetVideoDecoderProfile(This,Index,pDecoderProfile) ) + +#define ID3D11VideoDevice1_CheckVideoDecoderFormat(This,pDecoderProfile,Format,pSupported) \ + ( (This)->lpVtbl -> CheckVideoDecoderFormat(This,pDecoderProfile,Format,pSupported) ) + +#define ID3D11VideoDevice1_GetVideoDecoderConfigCount(This,pDesc,pCount) \ + ( (This)->lpVtbl -> GetVideoDecoderConfigCount(This,pDesc,pCount) ) + +#define ID3D11VideoDevice1_GetVideoDecoderConfig(This,pDesc,Index,pConfig) \ + ( (This)->lpVtbl -> GetVideoDecoderConfig(This,pDesc,Index,pConfig) ) + +#define ID3D11VideoDevice1_GetContentProtectionCaps(This,pCryptoType,pDecoderProfile,pCaps) \ + ( (This)->lpVtbl -> GetContentProtectionCaps(This,pCryptoType,pDecoderProfile,pCaps) ) + +#define ID3D11VideoDevice1_CheckCryptoKeyExchange(This,pCryptoType,pDecoderProfile,Index,pKeyExchangeType) \ + ( (This)->lpVtbl -> CheckCryptoKeyExchange(This,pCryptoType,pDecoderProfile,Index,pKeyExchangeType) ) + +#define ID3D11VideoDevice1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11VideoDevice1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11VideoDevice1_GetCryptoSessionPrivateDataSize(This,pCryptoType,pDecoderProfile,pKeyExchangeType,pPrivateInputSize,pPrivateOutputSize) \ + ( (This)->lpVtbl -> GetCryptoSessionPrivateDataSize(This,pCryptoType,pDecoderProfile,pKeyExchangeType,pPrivateInputSize,pPrivateOutputSize) ) + +#define ID3D11VideoDevice1_GetVideoDecoderCaps(This,pDecoderProfile,SampleWidth,SampleHeight,pFrameRate,BitRate,pCryptoType,pDecoderCaps) \ + ( (This)->lpVtbl -> GetVideoDecoderCaps(This,pDecoderProfile,SampleWidth,SampleHeight,pFrameRate,BitRate,pCryptoType,pDecoderCaps) ) + +#define ID3D11VideoDevice1_CheckVideoDecoderDownsampling(This,pInputDesc,InputColorSpace,pInputConfig,pFrameRate,pOutputDesc,pSupported,pRealTimeHint) \ + ( (This)->lpVtbl -> CheckVideoDecoderDownsampling(This,pInputDesc,InputColorSpace,pInputConfig,pFrameRate,pOutputDesc,pSupported,pRealTimeHint) ) + +#define ID3D11VideoDevice1_RecommendVideoDecoderDownsampleParameters(This,pInputDesc,InputColorSpace,pInputConfig,pFrameRate,pRecommendedOutputDesc) \ + ( (This)->lpVtbl -> RecommendVideoDecoderDownsampleParameters(This,pInputDesc,InputColorSpace,pInputConfig,pFrameRate,pRecommendedOutputDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11VideoDevice1_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11VideoProcessorEnumerator1_INTERFACE_DEFINED__ +#define __ID3D11VideoProcessorEnumerator1_INTERFACE_DEFINED__ + +/* interface ID3D11VideoProcessorEnumerator1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11VideoProcessorEnumerator1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("465217F2-5568-43CF-B5B9-F61D54531CA1") + ID3D11VideoProcessorEnumerator1 : public ID3D11VideoProcessorEnumerator + { + public: + virtual HRESULT STDMETHODCALLTYPE CheckVideoProcessorFormatConversion( + /* [annotation] */ + _In_ DXGI_FORMAT InputFormat, + /* [annotation] */ + _In_ DXGI_COLOR_SPACE_TYPE InputColorSpace, + /* [annotation] */ + _In_ DXGI_FORMAT OutputFormat, + /* [annotation] */ + _In_ DXGI_COLOR_SPACE_TYPE OutputColorSpace, + /* [annotation] */ + _Out_ BOOL *pSupported) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11VideoProcessorEnumerator1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11VideoProcessorEnumerator1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11VideoProcessorEnumerator1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11VideoProcessorEnumerator1 * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11VideoProcessorEnumerator1 * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11VideoProcessorEnumerator1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11VideoProcessorEnumerator1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11VideoProcessorEnumerator1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *GetVideoProcessorContentDesc )( + ID3D11VideoProcessorEnumerator1 * This, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_CONTENT_DESC *pContentDesc); + + HRESULT ( STDMETHODCALLTYPE *CheckVideoProcessorFormat )( + ID3D11VideoProcessorEnumerator1 * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _Out_ UINT *pFlags); + + HRESULT ( STDMETHODCALLTYPE *GetVideoProcessorCaps )( + ID3D11VideoProcessorEnumerator1 * This, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_CAPS *pCaps); + + HRESULT ( STDMETHODCALLTYPE *GetVideoProcessorRateConversionCaps )( + ID3D11VideoProcessorEnumerator1 * This, + /* [annotation] */ + _In_ UINT TypeIndex, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS *pCaps); + + HRESULT ( STDMETHODCALLTYPE *GetVideoProcessorCustomRate )( + ID3D11VideoProcessorEnumerator1 * This, + /* [annotation] */ + _In_ UINT TypeIndex, + /* [annotation] */ + _In_ UINT CustomRateIndex, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_CUSTOM_RATE *pRate); + + HRESULT ( STDMETHODCALLTYPE *GetVideoProcessorFilterRange )( + ID3D11VideoProcessorEnumerator1 * This, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_FILTER Filter, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_FILTER_RANGE *pRange); + + HRESULT ( STDMETHODCALLTYPE *CheckVideoProcessorFormatConversion )( + ID3D11VideoProcessorEnumerator1 * This, + /* [annotation] */ + _In_ DXGI_FORMAT InputFormat, + /* [annotation] */ + _In_ DXGI_COLOR_SPACE_TYPE InputColorSpace, + /* [annotation] */ + _In_ DXGI_FORMAT OutputFormat, + /* [annotation] */ + _In_ DXGI_COLOR_SPACE_TYPE OutputColorSpace, + /* [annotation] */ + _Out_ BOOL *pSupported); + + END_INTERFACE + } ID3D11VideoProcessorEnumerator1Vtbl; + + interface ID3D11VideoProcessorEnumerator1 + { + CONST_VTBL struct ID3D11VideoProcessorEnumerator1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11VideoProcessorEnumerator1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11VideoProcessorEnumerator1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11VideoProcessorEnumerator1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11VideoProcessorEnumerator1_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11VideoProcessorEnumerator1_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11VideoProcessorEnumerator1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11VideoProcessorEnumerator1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11VideoProcessorEnumerator1_GetVideoProcessorContentDesc(This,pContentDesc) \ + ( (This)->lpVtbl -> GetVideoProcessorContentDesc(This,pContentDesc) ) + +#define ID3D11VideoProcessorEnumerator1_CheckVideoProcessorFormat(This,Format,pFlags) \ + ( (This)->lpVtbl -> CheckVideoProcessorFormat(This,Format,pFlags) ) + +#define ID3D11VideoProcessorEnumerator1_GetVideoProcessorCaps(This,pCaps) \ + ( (This)->lpVtbl -> GetVideoProcessorCaps(This,pCaps) ) + +#define ID3D11VideoProcessorEnumerator1_GetVideoProcessorRateConversionCaps(This,TypeIndex,pCaps) \ + ( (This)->lpVtbl -> GetVideoProcessorRateConversionCaps(This,TypeIndex,pCaps) ) + +#define ID3D11VideoProcessorEnumerator1_GetVideoProcessorCustomRate(This,TypeIndex,CustomRateIndex,pRate) \ + ( (This)->lpVtbl -> GetVideoProcessorCustomRate(This,TypeIndex,CustomRateIndex,pRate) ) + +#define ID3D11VideoProcessorEnumerator1_GetVideoProcessorFilterRange(This,Filter,pRange) \ + ( (This)->lpVtbl -> GetVideoProcessorFilterRange(This,Filter,pRange) ) + + +#define ID3D11VideoProcessorEnumerator1_CheckVideoProcessorFormatConversion(This,InputFormat,InputColorSpace,OutputFormat,OutputColorSpace,pSupported) \ + ( (This)->lpVtbl -> CheckVideoProcessorFormatConversion(This,InputFormat,InputColorSpace,OutputFormat,OutputColorSpace,pSupported) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11VideoProcessorEnumerator1_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11Device1_INTERFACE_DEFINED__ +#define __ID3D11Device1_INTERFACE_DEFINED__ + +/* interface ID3D11Device1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11Device1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("a04bfb29-08ef-43d6-a49c-a9bdbdcbe686") + ID3D11Device1 : public ID3D11Device + { + public: + virtual void STDMETHODCALLTYPE GetImmediateContext1( + /* [annotation] */ + _Outptr_ ID3D11DeviceContext1 **ppImmediateContext) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateDeferredContext1( + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext1 **ppDeferredContext) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateBlendState1( + /* [annotation] */ + _In_ const D3D11_BLEND_DESC1 *pBlendStateDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11BlendState1 **ppBlendState) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateRasterizerState1( + /* [annotation] */ + _In_ const D3D11_RASTERIZER_DESC1 *pRasterizerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RasterizerState1 **ppRasterizerState) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateDeviceContextState( + UINT Flags, + /* [annotation] */ + _In_reads_( FeatureLevels ) const D3D_FEATURE_LEVEL *pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + REFIID EmulatedInterface, + /* [annotation] */ + _Out_opt_ D3D_FEATURE_LEVEL *pChosenFeatureLevel, + /* [annotation] */ + _Out_opt_ ID3DDeviceContextState **ppContextState) = 0; + + virtual HRESULT STDMETHODCALLTYPE OpenSharedResource1( + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _In_ REFIID returnedInterface, + /* [annotation] */ + _COM_Outptr_ void **ppResource) = 0; + + virtual HRESULT STDMETHODCALLTYPE OpenSharedResourceByName( + /* [annotation] */ + _In_ LPCWSTR lpName, + /* [annotation] */ + _In_ DWORD dwDesiredAccess, + /* [annotation] */ + _In_ REFIID returnedInterface, + /* [annotation] */ + _COM_Outptr_ void **ppResource) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11Device1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11Device1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11Device1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11Device1 * This); + + HRESULT ( STDMETHODCALLTYPE *CreateBuffer )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ const D3D11_BUFFER_DESC *pDesc, + /* [annotation] */ + _In_opt_ const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Buffer **ppBuffer); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture1D )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE1D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels * pDesc->ArraySize)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture1D **ppTexture1D); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture2D )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE2D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels * pDesc->ArraySize)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture2D **ppTexture2D); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture3D )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE3D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture3D **ppTexture3D); + + HRESULT ( STDMETHODCALLTYPE *CreateShaderResourceView )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11ShaderResourceView **ppSRView); + + HRESULT ( STDMETHODCALLTYPE *CreateUnorderedAccessView )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11UnorderedAccessView **ppUAView); + + HRESULT ( STDMETHODCALLTYPE *CreateRenderTargetView )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_RENDER_TARGET_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RenderTargetView **ppRTView); + + HRESULT ( STDMETHODCALLTYPE *CreateDepthStencilView )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DepthStencilView **ppDepthStencilView); + + HRESULT ( STDMETHODCALLTYPE *CreateInputLayout )( + ID3D11Device1 * This, + /* [annotation] */ + _In_reads_(NumElements) const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT ) UINT NumElements, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecodeWithInputSignature, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11InputLayout **ppInputLayout); + + HRESULT ( STDMETHODCALLTYPE *CreateVertexShader )( + ID3D11Device1 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11VertexShader **ppVertexShader); + + HRESULT ( STDMETHODCALLTYPE *CreateGeometryShader )( + ID3D11Device1 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11GeometryShader **ppGeometryShader); + + HRESULT ( STDMETHODCALLTYPE *CreateGeometryShaderWithStreamOutput )( + ID3D11Device1 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_reads_opt_(NumEntries) const D3D11_SO_DECLARATION_ENTRY *pSODeclaration, + /* [annotation] */ + _In_range_( 0, D3D11_SO_STREAM_COUNT * D3D11_SO_OUTPUT_COMPONENT_COUNT ) UINT NumEntries, + /* [annotation] */ + _In_reads_opt_(NumStrides) const UINT *pBufferStrides, + /* [annotation] */ + _In_range_( 0, D3D11_SO_BUFFER_SLOT_COUNT ) UINT NumStrides, + /* [annotation] */ + _In_ UINT RasterizedStream, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11GeometryShader **ppGeometryShader); + + HRESULT ( STDMETHODCALLTYPE *CreatePixelShader )( + ID3D11Device1 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11PixelShader **ppPixelShader); + + HRESULT ( STDMETHODCALLTYPE *CreateHullShader )( + ID3D11Device1 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11HullShader **ppHullShader); + + HRESULT ( STDMETHODCALLTYPE *CreateDomainShader )( + ID3D11Device1 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DomainShader **ppDomainShader); + + HRESULT ( STDMETHODCALLTYPE *CreateComputeShader )( + ID3D11Device1 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11ComputeShader **ppComputeShader); + + HRESULT ( STDMETHODCALLTYPE *CreateClassLinkage )( + ID3D11Device1 * This, + /* [annotation] */ + _COM_Outptr_ ID3D11ClassLinkage **ppLinkage); + + HRESULT ( STDMETHODCALLTYPE *CreateBlendState )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ const D3D11_BLEND_DESC *pBlendStateDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11BlendState **ppBlendState); + + HRESULT ( STDMETHODCALLTYPE *CreateDepthStencilState )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DepthStencilState **ppDepthStencilState); + + HRESULT ( STDMETHODCALLTYPE *CreateRasterizerState )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ const D3D11_RASTERIZER_DESC *pRasterizerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RasterizerState **ppRasterizerState); + + HRESULT ( STDMETHODCALLTYPE *CreateSamplerState )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ const D3D11_SAMPLER_DESC *pSamplerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11SamplerState **ppSamplerState); + + HRESULT ( STDMETHODCALLTYPE *CreateQuery )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ const D3D11_QUERY_DESC *pQueryDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Query **ppQuery); + + HRESULT ( STDMETHODCALLTYPE *CreatePredicate )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ const D3D11_QUERY_DESC *pPredicateDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Predicate **ppPredicate); + + HRESULT ( STDMETHODCALLTYPE *CreateCounter )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ const D3D11_COUNTER_DESC *pCounterDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Counter **ppCounter); + + HRESULT ( STDMETHODCALLTYPE *CreateDeferredContext )( + ID3D11Device1 * This, + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext **ppDeferredContext); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedResource )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _In_ REFIID ReturnedInterface, + /* [annotation] */ + _COM_Outptr_opt_ void **ppResource); + + HRESULT ( STDMETHODCALLTYPE *CheckFormatSupport )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _Out_ UINT *pFormatSupport); + + HRESULT ( STDMETHODCALLTYPE *CheckMultisampleQualityLevels )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT SampleCount, + /* [annotation] */ + _Out_ UINT *pNumQualityLevels); + + void ( STDMETHODCALLTYPE *CheckCounterInfo )( + ID3D11Device1 * This, + /* [annotation] */ + _Out_ D3D11_COUNTER_INFO *pCounterInfo); + + HRESULT ( STDMETHODCALLTYPE *CheckCounter )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ const D3D11_COUNTER_DESC *pDesc, + /* [annotation] */ + _Out_ D3D11_COUNTER_TYPE *pType, + /* [annotation] */ + _Out_ UINT *pActiveCounters, + /* [annotation] */ + _Out_writes_opt_(*pNameLength) LPSTR szName, + /* [annotation] */ + _Inout_opt_ UINT *pNameLength, + /* [annotation] */ + _Out_writes_opt_(*pUnitsLength) LPSTR szUnits, + /* [annotation] */ + _Inout_opt_ UINT *pUnitsLength, + /* [annotation] */ + _Out_writes_opt_(*pDescriptionLength) LPSTR szDescription, + /* [annotation] */ + _Inout_opt_ UINT *pDescriptionLength); + + HRESULT ( STDMETHODCALLTYPE *CheckFeatureSupport )( + ID3D11Device1 * This, + D3D11_FEATURE Feature, + /* [annotation] */ + _Out_writes_bytes_(FeatureSupportDataSize) void *pFeatureSupportData, + UINT FeatureSupportDataSize); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + D3D_FEATURE_LEVEL ( STDMETHODCALLTYPE *GetFeatureLevel )( + ID3D11Device1 * This); + + UINT ( STDMETHODCALLTYPE *GetCreationFlags )( + ID3D11Device1 * This); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceRemovedReason )( + ID3D11Device1 * This); + + void ( STDMETHODCALLTYPE *GetImmediateContext )( + ID3D11Device1 * This, + /* [annotation] */ + _Outptr_ ID3D11DeviceContext **ppImmediateContext); + + HRESULT ( STDMETHODCALLTYPE *SetExceptionMode )( + ID3D11Device1 * This, + UINT RaiseFlags); + + UINT ( STDMETHODCALLTYPE *GetExceptionMode )( + ID3D11Device1 * This); + + void ( STDMETHODCALLTYPE *GetImmediateContext1 )( + ID3D11Device1 * This, + /* [annotation] */ + _Outptr_ ID3D11DeviceContext1 **ppImmediateContext); + + HRESULT ( STDMETHODCALLTYPE *CreateDeferredContext1 )( + ID3D11Device1 * This, + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext1 **ppDeferredContext); + + HRESULT ( STDMETHODCALLTYPE *CreateBlendState1 )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ const D3D11_BLEND_DESC1 *pBlendStateDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11BlendState1 **ppBlendState); + + HRESULT ( STDMETHODCALLTYPE *CreateRasterizerState1 )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ const D3D11_RASTERIZER_DESC1 *pRasterizerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RasterizerState1 **ppRasterizerState); + + HRESULT ( STDMETHODCALLTYPE *CreateDeviceContextState )( + ID3D11Device1 * This, + UINT Flags, + /* [annotation] */ + _In_reads_( FeatureLevels ) const D3D_FEATURE_LEVEL *pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + REFIID EmulatedInterface, + /* [annotation] */ + _Out_opt_ D3D_FEATURE_LEVEL *pChosenFeatureLevel, + /* [annotation] */ + _Out_opt_ ID3DDeviceContextState **ppContextState); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedResource1 )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _In_ REFIID returnedInterface, + /* [annotation] */ + _COM_Outptr_ void **ppResource); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedResourceByName )( + ID3D11Device1 * This, + /* [annotation] */ + _In_ LPCWSTR lpName, + /* [annotation] */ + _In_ DWORD dwDesiredAccess, + /* [annotation] */ + _In_ REFIID returnedInterface, + /* [annotation] */ + _COM_Outptr_ void **ppResource); + + END_INTERFACE + } ID3D11Device1Vtbl; + + interface ID3D11Device1 + { + CONST_VTBL struct ID3D11Device1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11Device1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11Device1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11Device1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11Device1_CreateBuffer(This,pDesc,pInitialData,ppBuffer) \ + ( (This)->lpVtbl -> CreateBuffer(This,pDesc,pInitialData,ppBuffer) ) + +#define ID3D11Device1_CreateTexture1D(This,pDesc,pInitialData,ppTexture1D) \ + ( (This)->lpVtbl -> CreateTexture1D(This,pDesc,pInitialData,ppTexture1D) ) + +#define ID3D11Device1_CreateTexture2D(This,pDesc,pInitialData,ppTexture2D) \ + ( (This)->lpVtbl -> CreateTexture2D(This,pDesc,pInitialData,ppTexture2D) ) + +#define ID3D11Device1_CreateTexture3D(This,pDesc,pInitialData,ppTexture3D) \ + ( (This)->lpVtbl -> CreateTexture3D(This,pDesc,pInitialData,ppTexture3D) ) + +#define ID3D11Device1_CreateShaderResourceView(This,pResource,pDesc,ppSRView) \ + ( (This)->lpVtbl -> CreateShaderResourceView(This,pResource,pDesc,ppSRView) ) + +#define ID3D11Device1_CreateUnorderedAccessView(This,pResource,pDesc,ppUAView) \ + ( (This)->lpVtbl -> CreateUnorderedAccessView(This,pResource,pDesc,ppUAView) ) + +#define ID3D11Device1_CreateRenderTargetView(This,pResource,pDesc,ppRTView) \ + ( (This)->lpVtbl -> CreateRenderTargetView(This,pResource,pDesc,ppRTView) ) + +#define ID3D11Device1_CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView) \ + ( (This)->lpVtbl -> CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView) ) + +#define ID3D11Device1_CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout) \ + ( (This)->lpVtbl -> CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout) ) + +#define ID3D11Device1_CreateVertexShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppVertexShader) \ + ( (This)->lpVtbl -> CreateVertexShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppVertexShader) ) + +#define ID3D11Device1_CreateGeometryShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppGeometryShader) \ + ( (This)->lpVtbl -> CreateGeometryShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppGeometryShader) ) + +#define ID3D11Device1_CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,pBufferStrides,NumStrides,RasterizedStream,pClassLinkage,ppGeometryShader) \ + ( (This)->lpVtbl -> CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,pBufferStrides,NumStrides,RasterizedStream,pClassLinkage,ppGeometryShader) ) + +#define ID3D11Device1_CreatePixelShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppPixelShader) \ + ( (This)->lpVtbl -> CreatePixelShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppPixelShader) ) + +#define ID3D11Device1_CreateHullShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppHullShader) \ + ( (This)->lpVtbl -> CreateHullShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppHullShader) ) + +#define ID3D11Device1_CreateDomainShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppDomainShader) \ + ( (This)->lpVtbl -> CreateDomainShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppDomainShader) ) + +#define ID3D11Device1_CreateComputeShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppComputeShader) \ + ( (This)->lpVtbl -> CreateComputeShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppComputeShader) ) + +#define ID3D11Device1_CreateClassLinkage(This,ppLinkage) \ + ( (This)->lpVtbl -> CreateClassLinkage(This,ppLinkage) ) + +#define ID3D11Device1_CreateBlendState(This,pBlendStateDesc,ppBlendState) \ + ( (This)->lpVtbl -> CreateBlendState(This,pBlendStateDesc,ppBlendState) ) + +#define ID3D11Device1_CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState) \ + ( (This)->lpVtbl -> CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState) ) + +#define ID3D11Device1_CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState) \ + ( (This)->lpVtbl -> CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState) ) + +#define ID3D11Device1_CreateSamplerState(This,pSamplerDesc,ppSamplerState) \ + ( (This)->lpVtbl -> CreateSamplerState(This,pSamplerDesc,ppSamplerState) ) + +#define ID3D11Device1_CreateQuery(This,pQueryDesc,ppQuery) \ + ( (This)->lpVtbl -> CreateQuery(This,pQueryDesc,ppQuery) ) + +#define ID3D11Device1_CreatePredicate(This,pPredicateDesc,ppPredicate) \ + ( (This)->lpVtbl -> CreatePredicate(This,pPredicateDesc,ppPredicate) ) + +#define ID3D11Device1_CreateCounter(This,pCounterDesc,ppCounter) \ + ( (This)->lpVtbl -> CreateCounter(This,pCounterDesc,ppCounter) ) + +#define ID3D11Device1_CreateDeferredContext(This,ContextFlags,ppDeferredContext) \ + ( (This)->lpVtbl -> CreateDeferredContext(This,ContextFlags,ppDeferredContext) ) + +#define ID3D11Device1_OpenSharedResource(This,hResource,ReturnedInterface,ppResource) \ + ( (This)->lpVtbl -> OpenSharedResource(This,hResource,ReturnedInterface,ppResource) ) + +#define ID3D11Device1_CheckFormatSupport(This,Format,pFormatSupport) \ + ( (This)->lpVtbl -> CheckFormatSupport(This,Format,pFormatSupport) ) + +#define ID3D11Device1_CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels) \ + ( (This)->lpVtbl -> CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels) ) + +#define ID3D11Device1_CheckCounterInfo(This,pCounterInfo) \ + ( (This)->lpVtbl -> CheckCounterInfo(This,pCounterInfo) ) + +#define ID3D11Device1_CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength) \ + ( (This)->lpVtbl -> CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength) ) + +#define ID3D11Device1_CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) \ + ( (This)->lpVtbl -> CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) ) + +#define ID3D11Device1_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11Device1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11Device1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D11Device1_GetFeatureLevel(This) \ + ( (This)->lpVtbl -> GetFeatureLevel(This) ) + +#define ID3D11Device1_GetCreationFlags(This) \ + ( (This)->lpVtbl -> GetCreationFlags(This) ) + +#define ID3D11Device1_GetDeviceRemovedReason(This) \ + ( (This)->lpVtbl -> GetDeviceRemovedReason(This) ) + +#define ID3D11Device1_GetImmediateContext(This,ppImmediateContext) \ + ( (This)->lpVtbl -> GetImmediateContext(This,ppImmediateContext) ) + +#define ID3D11Device1_SetExceptionMode(This,RaiseFlags) \ + ( (This)->lpVtbl -> SetExceptionMode(This,RaiseFlags) ) + +#define ID3D11Device1_GetExceptionMode(This) \ + ( (This)->lpVtbl -> GetExceptionMode(This) ) + + +#define ID3D11Device1_GetImmediateContext1(This,ppImmediateContext) \ + ( (This)->lpVtbl -> GetImmediateContext1(This,ppImmediateContext) ) + +#define ID3D11Device1_CreateDeferredContext1(This,ContextFlags,ppDeferredContext) \ + ( (This)->lpVtbl -> CreateDeferredContext1(This,ContextFlags,ppDeferredContext) ) + +#define ID3D11Device1_CreateBlendState1(This,pBlendStateDesc,ppBlendState) \ + ( (This)->lpVtbl -> CreateBlendState1(This,pBlendStateDesc,ppBlendState) ) + +#define ID3D11Device1_CreateRasterizerState1(This,pRasterizerDesc,ppRasterizerState) \ + ( (This)->lpVtbl -> CreateRasterizerState1(This,pRasterizerDesc,ppRasterizerState) ) + +#define ID3D11Device1_CreateDeviceContextState(This,Flags,pFeatureLevels,FeatureLevels,SDKVersion,EmulatedInterface,pChosenFeatureLevel,ppContextState) \ + ( (This)->lpVtbl -> CreateDeviceContextState(This,Flags,pFeatureLevels,FeatureLevels,SDKVersion,EmulatedInterface,pChosenFeatureLevel,ppContextState) ) + +#define ID3D11Device1_OpenSharedResource1(This,hResource,returnedInterface,ppResource) \ + ( (This)->lpVtbl -> OpenSharedResource1(This,hResource,returnedInterface,ppResource) ) + +#define ID3D11Device1_OpenSharedResourceByName(This,lpName,dwDesiredAccess,returnedInterface,ppResource) \ + ( (This)->lpVtbl -> OpenSharedResourceByName(This,lpName,dwDesiredAccess,returnedInterface,ppResource) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11Device1_INTERFACE_DEFINED__ */ + + +#ifndef __ID3DUserDefinedAnnotation_INTERFACE_DEFINED__ +#define __ID3DUserDefinedAnnotation_INTERFACE_DEFINED__ + +/* interface ID3DUserDefinedAnnotation */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3DUserDefinedAnnotation; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("b2daad8b-03d4-4dbf-95eb-32ab4b63d0ab") + ID3DUserDefinedAnnotation : public IUnknown + { + public: + virtual INT STDMETHODCALLTYPE BeginEvent( + /* [annotation] */ + _In_ LPCWSTR Name) = 0; + + virtual INT STDMETHODCALLTYPE EndEvent( void) = 0; + + virtual void STDMETHODCALLTYPE SetMarker( + /* [annotation] */ + _In_ LPCWSTR Name) = 0; + + virtual BOOL STDMETHODCALLTYPE GetStatus( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3DUserDefinedAnnotationVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3DUserDefinedAnnotation * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3DUserDefinedAnnotation * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3DUserDefinedAnnotation * This); + + INT ( STDMETHODCALLTYPE *BeginEvent )( + ID3DUserDefinedAnnotation * This, + /* [annotation] */ + _In_ LPCWSTR Name); + + INT ( STDMETHODCALLTYPE *EndEvent )( + ID3DUserDefinedAnnotation * This); + + void ( STDMETHODCALLTYPE *SetMarker )( + ID3DUserDefinedAnnotation * This, + /* [annotation] */ + _In_ LPCWSTR Name); + + BOOL ( STDMETHODCALLTYPE *GetStatus )( + ID3DUserDefinedAnnotation * This); + + END_INTERFACE + } ID3DUserDefinedAnnotationVtbl; + + interface ID3DUserDefinedAnnotation + { + CONST_VTBL struct ID3DUserDefinedAnnotationVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3DUserDefinedAnnotation_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3DUserDefinedAnnotation_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3DUserDefinedAnnotation_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3DUserDefinedAnnotation_BeginEvent(This,Name) \ + ( (This)->lpVtbl -> BeginEvent(This,Name) ) + +#define ID3DUserDefinedAnnotation_EndEvent(This) \ + ( (This)->lpVtbl -> EndEvent(This) ) + +#define ID3DUserDefinedAnnotation_SetMarker(This,Name) \ + ( (This)->lpVtbl -> SetMarker(This,Name) ) + +#define ID3DUserDefinedAnnotation_GetStatus(This) \ + ( (This)->lpVtbl -> GetStatus(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3DUserDefinedAnnotation_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_1_0000_0009 */ +/* [local] */ + +DEFINE_GUID(IID_ID3D11BlendState1,0xcc86fabe,0xda55,0x401d,0x85,0xe7,0xe3,0xc9,0xde,0x28,0x77,0xe9); +DEFINE_GUID(IID_ID3D11RasterizerState1,0x1217d7a6,0x5039,0x418c,0xb0,0x42,0x9c,0xbe,0x25,0x6a,0xfd,0x6e); +DEFINE_GUID(IID_ID3DDeviceContextState,0x5c1e0d8a,0x7c23,0x48f9,0x8c,0x59,0xa9,0x29,0x58,0xce,0xff,0x11); +DEFINE_GUID(IID_ID3D11DeviceContext1,0xbb2c6faa,0xb5fb,0x4082,0x8e,0x6b,0x38,0x8b,0x8c,0xfa,0x90,0xe1); +DEFINE_GUID(IID_ID3D11VideoContext1,0xA7F026DA,0xA5F8,0x4487,0xA5,0x64,0x15,0xE3,0x43,0x57,0x65,0x1E); +DEFINE_GUID(IID_ID3D11VideoDevice1,0x29DA1D51,0x1321,0x4454,0x80,0x4B,0xF5,0xFC,0x9F,0x86,0x1F,0x0F); +DEFINE_GUID(IID_ID3D11VideoProcessorEnumerator1,0x465217F2,0x5568,0x43CF,0xB5,0xB9,0xF6,0x1D,0x54,0x53,0x1C,0xA1); +DEFINE_GUID(IID_ID3D11Device1,0xa04bfb29,0x08ef,0x43d6,0xa4,0x9c,0xa9,0xbd,0xbd,0xcb,0xe6,0x86); +DEFINE_GUID(IID_ID3DUserDefinedAnnotation,0xb2daad8b,0x03d4,0x4dbf,0x95,0xeb,0x32,0xab,0x4b,0x63,0xd0,0xab); + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0009_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0009_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/d3d11_2.h b/gfx/include/dxsdk/d3d11_2.h new file mode 100644 index 0000000000..e8a07a9af0 --- /dev/null +++ b/gfx/include/dxsdk/d3d11_2.h @@ -0,0 +1,2721 @@ +/*------------------------------------------------------------------------------------- + * + * Copyright (c) Microsoft Corporation + * + *-------------------------------------------------------------------------------------*/ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ +/* @@MIDL_FILE_HEADING( ) */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __d3d11_2_h__ +#define __d3d11_2_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __ID3D11DeviceContext2_FWD_DEFINED__ +#define __ID3D11DeviceContext2_FWD_DEFINED__ +typedef interface ID3D11DeviceContext2 ID3D11DeviceContext2; + +#endif /* __ID3D11DeviceContext2_FWD_DEFINED__ */ + + +#ifndef __ID3D11Device2_FWD_DEFINED__ +#define __ID3D11Device2_FWD_DEFINED__ +typedef interface ID3D11Device2 ID3D11Device2; + +#endif /* __ID3D11Device2_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "dxgi1_3.h" +#include "d3dcommon.h" +#include "d3d11_1.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_d3d11_2_0000_0000 */ +/* [local] */ + +#ifdef __cplusplus +} +#endif +#include "d3d11_1.h" // +#ifdef __cplusplus +extern "C"{ +#endif +typedef struct D3D11_TILED_RESOURCE_COORDINATE + { + UINT X; + UINT Y; + UINT Z; + UINT Subresource; + } D3D11_TILED_RESOURCE_COORDINATE; + +typedef struct D3D11_TILE_REGION_SIZE + { + UINT NumTiles; + BOOL bUseBox; + UINT Width; + UINT16 Height; + UINT16 Depth; + } D3D11_TILE_REGION_SIZE; + +typedef +enum D3D11_TILE_MAPPING_FLAG + { + D3D11_TILE_MAPPING_NO_OVERWRITE = 0x1 + } D3D11_TILE_MAPPING_FLAG; + +typedef +enum D3D11_TILE_RANGE_FLAG + { + D3D11_TILE_RANGE_NULL = 0x1, + D3D11_TILE_RANGE_SKIP = 0x2, + D3D11_TILE_RANGE_REUSE_SINGLE_TILE = 0x4 + } D3D11_TILE_RANGE_FLAG; + +typedef struct D3D11_SUBRESOURCE_TILING + { + UINT WidthInTiles; + UINT16 HeightInTiles; + UINT16 DepthInTiles; + UINT StartTileIndexInOverallResource; + } D3D11_SUBRESOURCE_TILING; + +#define D3D11_PACKED_TILE ( 0xffffffff ) + +typedef struct D3D11_TILE_SHAPE + { + UINT WidthInTexels; + UINT HeightInTexels; + UINT DepthInTexels; + } D3D11_TILE_SHAPE; + +typedef struct D3D11_PACKED_MIP_DESC + { + UINT8 NumStandardMips; + UINT8 NumPackedMips; + UINT NumTilesForPackedMips; + UINT StartTileIndexInOverallResource; + } D3D11_PACKED_MIP_DESC; + +typedef +enum D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_FLAG + { + D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_TILED_RESOURCE = 0x1 + } D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_FLAG; + +typedef +enum D3D11_TILE_COPY_FLAG + { + D3D11_TILE_COPY_NO_OVERWRITE = 0x1, + D3D11_TILE_COPY_LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE = 0x2, + D3D11_TILE_COPY_SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER = 0x4 + } D3D11_TILE_COPY_FLAG; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_2_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_2_0000_0000_v0_0_s_ifspec; + +#ifndef __ID3D11DeviceContext2_INTERFACE_DEFINED__ +#define __ID3D11DeviceContext2_INTERFACE_DEFINED__ + +/* interface ID3D11DeviceContext2 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11DeviceContext2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("420d5b32-b90c-4da4-bef0-359f6a24a83a") + ID3D11DeviceContext2 : public ID3D11DeviceContext1 + { + public: + virtual HRESULT STDMETHODCALLTYPE UpdateTileMappings( + /* [annotation] */ + _In_ ID3D11Resource *pTiledResource, + /* [annotation] */ + _In_ UINT NumTiledResourceRegions, + /* [annotation] */ + _In_reads_opt_(NumTiledResourceRegions) const D3D11_TILED_RESOURCE_COORDINATE *pTiledResourceRegionStartCoordinates, + /* [annotation] */ + _In_reads_opt_(NumTiledResourceRegions) const D3D11_TILE_REGION_SIZE *pTiledResourceRegionSizes, + /* [annotation] */ + _In_opt_ ID3D11Buffer *pTilePool, + /* [annotation] */ + _In_ UINT NumRanges, + /* [annotation] */ + _In_reads_opt_(NumRanges) const UINT *pRangeFlags, + /* [annotation] */ + _In_reads_opt_(NumRanges) const UINT *pTilePoolStartOffsets, + /* [annotation] */ + _In_reads_opt_(NumRanges) const UINT *pRangeTileCounts, + /* [annotation] */ + _In_ UINT Flags) = 0; + + virtual HRESULT STDMETHODCALLTYPE CopyTileMappings( + /* [annotation] */ + _In_ ID3D11Resource *pDestTiledResource, + /* [annotation] */ + _In_ const D3D11_TILED_RESOURCE_COORDINATE *pDestRegionStartCoordinate, + /* [annotation] */ + _In_ ID3D11Resource *pSourceTiledResource, + /* [annotation] */ + _In_ const D3D11_TILED_RESOURCE_COORDINATE *pSourceRegionStartCoordinate, + /* [annotation] */ + _In_ const D3D11_TILE_REGION_SIZE *pTileRegionSize, + /* [annotation] */ + _In_ UINT Flags) = 0; + + virtual void STDMETHODCALLTYPE CopyTiles( + /* [annotation] */ + _In_ ID3D11Resource *pTiledResource, + /* [annotation] */ + _In_ const D3D11_TILED_RESOURCE_COORDINATE *pTileRegionStartCoordinate, + /* [annotation] */ + _In_ const D3D11_TILE_REGION_SIZE *pTileRegionSize, + /* [annotation] */ + _In_ ID3D11Buffer *pBuffer, + /* [annotation] */ + _In_ UINT64 BufferStartOffsetInBytes, + /* [annotation] */ + _In_ UINT Flags) = 0; + + virtual void STDMETHODCALLTYPE UpdateTiles( + /* [annotation] */ + _In_ ID3D11Resource *pDestTiledResource, + /* [annotation] */ + _In_ const D3D11_TILED_RESOURCE_COORDINATE *pDestTileRegionStartCoordinate, + /* [annotation] */ + _In_ const D3D11_TILE_REGION_SIZE *pDestTileRegionSize, + /* [annotation] */ + _In_ const void *pSourceTileData, + /* [annotation] */ + _In_ UINT Flags) = 0; + + virtual HRESULT STDMETHODCALLTYPE ResizeTilePool( + /* [annotation] */ + _In_ ID3D11Buffer *pTilePool, + /* [annotation] */ + _In_ UINT64 NewSizeInBytes) = 0; + + virtual void STDMETHODCALLTYPE TiledResourceBarrier( + /* [annotation] */ + _In_opt_ ID3D11DeviceChild *pTiledResourceOrViewAccessBeforeBarrier, + /* [annotation] */ + _In_opt_ ID3D11DeviceChild *pTiledResourceOrViewAccessAfterBarrier) = 0; + + virtual BOOL STDMETHODCALLTYPE IsAnnotationEnabled( void) = 0; + + virtual void STDMETHODCALLTYPE SetMarkerInt( + /* [annotation] */ + _In_ LPCWSTR pLabel, + INT Data) = 0; + + virtual void STDMETHODCALLTYPE BeginEventInt( + /* [annotation] */ + _In_ LPCWSTR pLabel, + INT Data) = 0; + + virtual void STDMETHODCALLTYPE EndEvent( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11DeviceContext2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11DeviceContext2 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11DeviceContext2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11DeviceContext2 * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *VSSetConstantBuffers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *PSSetShaderResources )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *PSSetShader )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_opt_ ID3D11PixelShader *pPixelShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *PSSetSamplers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *VSSetShader )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_opt_ ID3D11VertexShader *pVertexShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *DrawIndexed )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ UINT IndexCount, + /* [annotation] */ + _In_ UINT StartIndexLocation, + /* [annotation] */ + _In_ INT BaseVertexLocation); + + void ( STDMETHODCALLTYPE *Draw )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ UINT VertexCount, + /* [annotation] */ + _In_ UINT StartVertexLocation); + + HRESULT ( STDMETHODCALLTYPE *Map )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_ UINT Subresource, + /* [annotation] */ + _In_ D3D11_MAP MapType, + /* [annotation] */ + _In_ UINT MapFlags, + /* [annotation] */ + _Out_opt_ D3D11_MAPPED_SUBRESOURCE *pMappedResource); + + void ( STDMETHODCALLTYPE *Unmap )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_ UINT Subresource); + + void ( STDMETHODCALLTYPE *PSSetConstantBuffers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *IASetInputLayout )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_opt_ ID3D11InputLayout *pInputLayout); + + void ( STDMETHODCALLTYPE *IASetVertexBuffers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppVertexBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pStrides, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pOffsets); + + void ( STDMETHODCALLTYPE *IASetIndexBuffer )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_opt_ ID3D11Buffer *pIndexBuffer, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT Offset); + + void ( STDMETHODCALLTYPE *DrawIndexedInstanced )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ UINT IndexCountPerInstance, + /* [annotation] */ + _In_ UINT InstanceCount, + /* [annotation] */ + _In_ UINT StartIndexLocation, + /* [annotation] */ + _In_ INT BaseVertexLocation, + /* [annotation] */ + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *DrawInstanced )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ UINT VertexCountPerInstance, + /* [annotation] */ + _In_ UINT InstanceCount, + /* [annotation] */ + _In_ UINT StartVertexLocation, + /* [annotation] */ + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *GSSetConstantBuffers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *GSSetShader )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_opt_ ID3D11GeometryShader *pShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *IASetPrimitiveTopology )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ D3D11_PRIMITIVE_TOPOLOGY Topology); + + void ( STDMETHODCALLTYPE *VSSetShaderResources )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *VSSetSamplers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *Begin )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Asynchronous *pAsync); + + void ( STDMETHODCALLTYPE *End )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Asynchronous *pAsync); + + HRESULT ( STDMETHODCALLTYPE *GetData )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Asynchronous *pAsync, + /* [annotation] */ + _Out_writes_bytes_opt_( DataSize ) void *pData, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_ UINT GetDataFlags); + + void ( STDMETHODCALLTYPE *SetPredication )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_opt_ ID3D11Predicate *pPredicate, + /* [annotation] */ + _In_ BOOL PredicateValue); + + void ( STDMETHODCALLTYPE *GSSetShaderResources )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *GSSetSamplers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *OMSetRenderTargets )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11RenderTargetView *const *ppRenderTargetViews, + /* [annotation] */ + _In_opt_ ID3D11DepthStencilView *pDepthStencilView); + + void ( STDMETHODCALLTYPE *OMSetRenderTargetsAndUnorderedAccessViews )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ UINT NumRTVs, + /* [annotation] */ + _In_reads_opt_(NumRTVs) ID3D11RenderTargetView *const *ppRenderTargetViews, + /* [annotation] */ + _In_opt_ ID3D11DepthStencilView *pDepthStencilView, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - 1 ) UINT UAVStartSlot, + /* [annotation] */ + _In_ UINT NumUAVs, + /* [annotation] */ + _In_reads_opt_(NumUAVs) ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, + /* [annotation] */ + _In_reads_opt_(NumUAVs) const UINT *pUAVInitialCounts); + + void ( STDMETHODCALLTYPE *OMSetBlendState )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_opt_ ID3D11BlendState *pBlendState, + /* [annotation] */ + _In_opt_ const FLOAT BlendFactor[ 4 ], + /* [annotation] */ + _In_ UINT SampleMask); + + void ( STDMETHODCALLTYPE *OMSetDepthStencilState )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_opt_ ID3D11DepthStencilState *pDepthStencilState, + /* [annotation] */ + _In_ UINT StencilRef); + + void ( STDMETHODCALLTYPE *SOSetTargets )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_SO_BUFFER_SLOT_COUNT) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppSOTargets, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pOffsets); + + void ( STDMETHODCALLTYPE *DrawAuto )( + ID3D11DeviceContext2 * This); + + void ( STDMETHODCALLTYPE *DrawIndexedInstancedIndirect )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Buffer *pBufferForArgs, + /* [annotation] */ + _In_ UINT AlignedByteOffsetForArgs); + + void ( STDMETHODCALLTYPE *DrawInstancedIndirect )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Buffer *pBufferForArgs, + /* [annotation] */ + _In_ UINT AlignedByteOffsetForArgs); + + void ( STDMETHODCALLTYPE *Dispatch )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ UINT ThreadGroupCountX, + /* [annotation] */ + _In_ UINT ThreadGroupCountY, + /* [annotation] */ + _In_ UINT ThreadGroupCountZ); + + void ( STDMETHODCALLTYPE *DispatchIndirect )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Buffer *pBufferForArgs, + /* [annotation] */ + _In_ UINT AlignedByteOffsetForArgs); + + void ( STDMETHODCALLTYPE *RSSetState )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_opt_ ID3D11RasterizerState *pRasterizerState); + + void ( STDMETHODCALLTYPE *RSSetViewports )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumViewports, + /* [annotation] */ + _In_reads_opt_(NumViewports) const D3D11_VIEWPORT *pViewports); + + void ( STDMETHODCALLTYPE *RSSetScissorRects )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumRects, + /* [annotation] */ + _In_reads_opt_(NumRects) const D3D11_RECT *pRects); + + void ( STDMETHODCALLTYPE *CopySubresourceRegion )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ UINT DstX, + /* [annotation] */ + _In_ UINT DstY, + /* [annotation] */ + _In_ UINT DstZ, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pSrcBox); + + void ( STDMETHODCALLTYPE *CopyResource )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource); + + void ( STDMETHODCALLTYPE *UpdateSubresource )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pDstBox, + /* [annotation] */ + _In_ const void *pSrcData, + /* [annotation] */ + _In_ UINT SrcRowPitch, + /* [annotation] */ + _In_ UINT SrcDepthPitch); + + void ( STDMETHODCALLTYPE *CopyStructureCount )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Buffer *pDstBuffer, + /* [annotation] */ + _In_ UINT DstAlignedByteOffset, + /* [annotation] */ + _In_ ID3D11UnorderedAccessView *pSrcView); + + void ( STDMETHODCALLTYPE *ClearRenderTargetView )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11RenderTargetView *pRenderTargetView, + /* [annotation] */ + _In_ const FLOAT ColorRGBA[ 4 ]); + + void ( STDMETHODCALLTYPE *ClearUnorderedAccessViewUint )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11UnorderedAccessView *pUnorderedAccessView, + /* [annotation] */ + _In_ const UINT Values[ 4 ]); + + void ( STDMETHODCALLTYPE *ClearUnorderedAccessViewFloat )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11UnorderedAccessView *pUnorderedAccessView, + /* [annotation] */ + _In_ const FLOAT Values[ 4 ]); + + void ( STDMETHODCALLTYPE *ClearDepthStencilView )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11DepthStencilView *pDepthStencilView, + /* [annotation] */ + _In_ UINT ClearFlags, + /* [annotation] */ + _In_ FLOAT Depth, + /* [annotation] */ + _In_ UINT8 Stencil); + + void ( STDMETHODCALLTYPE *GenerateMips )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11ShaderResourceView *pShaderResourceView); + + void ( STDMETHODCALLTYPE *SetResourceMinLOD )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + FLOAT MinLOD); + + FLOAT ( STDMETHODCALLTYPE *GetResourceMinLOD )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource); + + void ( STDMETHODCALLTYPE *ResolveSubresource )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_ DXGI_FORMAT Format); + + void ( STDMETHODCALLTYPE *ExecuteCommandList )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11CommandList *pCommandList, + BOOL RestoreContextState); + + void ( STDMETHODCALLTYPE *HSSetShaderResources )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *HSSetShader )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_opt_ ID3D11HullShader *pHullShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *HSSetSamplers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *HSSetConstantBuffers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *DSSetShaderResources )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *DSSetShader )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_opt_ ID3D11DomainShader *pDomainShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *DSSetSamplers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *DSSetConstantBuffers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *CSSetShaderResources )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *CSSetUnorderedAccessViews )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - StartSlot ) UINT NumUAVs, + /* [annotation] */ + _In_reads_opt_(NumUAVs) ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, + /* [annotation] */ + _In_reads_opt_(NumUAVs) const UINT *pUAVInitialCounts); + + void ( STDMETHODCALLTYPE *CSSetShader )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_opt_ ID3D11ComputeShader *pComputeShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *CSSetSamplers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *CSSetConstantBuffers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *VSGetConstantBuffers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *PSGetShaderResources )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *PSGetShader )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11PixelShader **ppPixelShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *PSGetSamplers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *VSGetShader )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11VertexShader **ppVertexShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *PSGetConstantBuffers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *IAGetInputLayout )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11InputLayout **ppInputLayout); + + void ( STDMETHODCALLTYPE *IAGetVertexBuffers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppVertexBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pStrides, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pOffsets); + + void ( STDMETHODCALLTYPE *IAGetIndexBuffer )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11Buffer **pIndexBuffer, + /* [annotation] */ + _Out_opt_ DXGI_FORMAT *Format, + /* [annotation] */ + _Out_opt_ UINT *Offset); + + void ( STDMETHODCALLTYPE *GSGetConstantBuffers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *GSGetShader )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11GeometryShader **ppGeometryShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *IAGetPrimitiveTopology )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _Out_ D3D11_PRIMITIVE_TOPOLOGY *pTopology); + + void ( STDMETHODCALLTYPE *VSGetShaderResources )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *VSGetSamplers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *GetPredication )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11Predicate **ppPredicate, + /* [annotation] */ + _Out_opt_ BOOL *pPredicateValue); + + void ( STDMETHODCALLTYPE *GSGetShaderResources )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *GSGetSamplers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *OMGetRenderTargets )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11RenderTargetView **ppRenderTargetViews, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11DepthStencilView **ppDepthStencilView); + + void ( STDMETHODCALLTYPE *OMGetRenderTargetsAndUnorderedAccessViews )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumRTVs, + /* [annotation] */ + _Out_writes_opt_(NumRTVs) ID3D11RenderTargetView **ppRenderTargetViews, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11DepthStencilView **ppDepthStencilView, + /* [annotation] */ + _In_range_( 0, D3D11_PS_CS_UAV_REGISTER_COUNT - 1 ) UINT UAVStartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_PS_CS_UAV_REGISTER_COUNT - UAVStartSlot ) UINT NumUAVs, + /* [annotation] */ + _Out_writes_opt_(NumUAVs) ID3D11UnorderedAccessView **ppUnorderedAccessViews); + + void ( STDMETHODCALLTYPE *OMGetBlendState )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11BlendState **ppBlendState, + /* [annotation] */ + _Out_opt_ FLOAT BlendFactor[ 4 ], + /* [annotation] */ + _Out_opt_ UINT *pSampleMask); + + void ( STDMETHODCALLTYPE *OMGetDepthStencilState )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11DepthStencilState **ppDepthStencilState, + /* [annotation] */ + _Out_opt_ UINT *pStencilRef); + + void ( STDMETHODCALLTYPE *SOGetTargets )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_SO_BUFFER_SLOT_COUNT ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppSOTargets); + + void ( STDMETHODCALLTYPE *RSGetState )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11RasterizerState **ppRasterizerState); + + void ( STDMETHODCALLTYPE *RSGetViewports )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _Inout_ /*_range(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE )*/ UINT *pNumViewports, + /* [annotation] */ + _Out_writes_opt_(*pNumViewports) D3D11_VIEWPORT *pViewports); + + void ( STDMETHODCALLTYPE *RSGetScissorRects )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _Inout_ /*_range(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE )*/ UINT *pNumRects, + /* [annotation] */ + _Out_writes_opt_(*pNumRects) D3D11_RECT *pRects); + + void ( STDMETHODCALLTYPE *HSGetShaderResources )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *HSGetShader )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11HullShader **ppHullShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *HSGetSamplers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *HSGetConstantBuffers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *DSGetShaderResources )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *DSGetShader )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11DomainShader **ppDomainShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *DSGetSamplers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *DSGetConstantBuffers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *CSGetShaderResources )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *CSGetUnorderedAccessViews )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - StartSlot ) UINT NumUAVs, + /* [annotation] */ + _Out_writes_opt_(NumUAVs) ID3D11UnorderedAccessView **ppUnorderedAccessViews); + + void ( STDMETHODCALLTYPE *CSGetShader )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11ComputeShader **ppComputeShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *CSGetSamplers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *CSGetConstantBuffers )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *ClearState )( + ID3D11DeviceContext2 * This); + + void ( STDMETHODCALLTYPE *Flush )( + ID3D11DeviceContext2 * This); + + D3D11_DEVICE_CONTEXT_TYPE ( STDMETHODCALLTYPE *GetType )( + ID3D11DeviceContext2 * This); + + UINT ( STDMETHODCALLTYPE *GetContextFlags )( + ID3D11DeviceContext2 * This); + + HRESULT ( STDMETHODCALLTYPE *FinishCommandList )( + ID3D11DeviceContext2 * This, + BOOL RestoreDeferredContextState, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11CommandList **ppCommandList); + + void ( STDMETHODCALLTYPE *CopySubresourceRegion1 )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ UINT DstX, + /* [annotation] */ + _In_ UINT DstY, + /* [annotation] */ + _In_ UINT DstZ, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pSrcBox, + /* [annotation] */ + _In_ UINT CopyFlags); + + void ( STDMETHODCALLTYPE *UpdateSubresource1 )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pDstBox, + /* [annotation] */ + _In_ const void *pSrcData, + /* [annotation] */ + _In_ UINT SrcRowPitch, + /* [annotation] */ + _In_ UINT SrcDepthPitch, + /* [annotation] */ + _In_ UINT CopyFlags); + + void ( STDMETHODCALLTYPE *DiscardResource )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource); + + void ( STDMETHODCALLTYPE *DiscardView )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11View *pResourceView); + + void ( STDMETHODCALLTYPE *VSSetConstantBuffers1 )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *HSSetConstantBuffers1 )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *DSSetConstantBuffers1 )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *GSSetConstantBuffers1 )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *PSSetConstantBuffers1 )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *CSSetConstantBuffers1 )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *VSGetConstantBuffers1 )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *HSGetConstantBuffers1 )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *DSGetConstantBuffers1 )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *GSGetConstantBuffers1 )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *PSGetConstantBuffers1 )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *CSGetConstantBuffers1 )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *SwapDeviceContextState )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3DDeviceContextState *pState, + /* [annotation] */ + _Outptr_opt_ ID3DDeviceContextState **ppPreviousState); + + void ( STDMETHODCALLTYPE *ClearView )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11View *pView, + /* [annotation] */ + _In_ const FLOAT Color[ 4 ], + /* [annotation] */ + _In_reads_opt_(NumRects) const D3D11_RECT *pRect, + UINT NumRects); + + void ( STDMETHODCALLTYPE *DiscardView1 )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11View *pResourceView, + /* [annotation] */ + _In_reads_opt_(NumRects) const D3D11_RECT *pRects, + UINT NumRects); + + HRESULT ( STDMETHODCALLTYPE *UpdateTileMappings )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Resource *pTiledResource, + /* [annotation] */ + _In_ UINT NumTiledResourceRegions, + /* [annotation] */ + _In_reads_opt_(NumTiledResourceRegions) const D3D11_TILED_RESOURCE_COORDINATE *pTiledResourceRegionStartCoordinates, + /* [annotation] */ + _In_reads_opt_(NumTiledResourceRegions) const D3D11_TILE_REGION_SIZE *pTiledResourceRegionSizes, + /* [annotation] */ + _In_opt_ ID3D11Buffer *pTilePool, + /* [annotation] */ + _In_ UINT NumRanges, + /* [annotation] */ + _In_reads_opt_(NumRanges) const UINT *pRangeFlags, + /* [annotation] */ + _In_reads_opt_(NumRanges) const UINT *pTilePoolStartOffsets, + /* [annotation] */ + _In_reads_opt_(NumRanges) const UINT *pRangeTileCounts, + /* [annotation] */ + _In_ UINT Flags); + + HRESULT ( STDMETHODCALLTYPE *CopyTileMappings )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDestTiledResource, + /* [annotation] */ + _In_ const D3D11_TILED_RESOURCE_COORDINATE *pDestRegionStartCoordinate, + /* [annotation] */ + _In_ ID3D11Resource *pSourceTiledResource, + /* [annotation] */ + _In_ const D3D11_TILED_RESOURCE_COORDINATE *pSourceRegionStartCoordinate, + /* [annotation] */ + _In_ const D3D11_TILE_REGION_SIZE *pTileRegionSize, + /* [annotation] */ + _In_ UINT Flags); + + void ( STDMETHODCALLTYPE *CopyTiles )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Resource *pTiledResource, + /* [annotation] */ + _In_ const D3D11_TILED_RESOURCE_COORDINATE *pTileRegionStartCoordinate, + /* [annotation] */ + _In_ const D3D11_TILE_REGION_SIZE *pTileRegionSize, + /* [annotation] */ + _In_ ID3D11Buffer *pBuffer, + /* [annotation] */ + _In_ UINT64 BufferStartOffsetInBytes, + /* [annotation] */ + _In_ UINT Flags); + + void ( STDMETHODCALLTYPE *UpdateTiles )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDestTiledResource, + /* [annotation] */ + _In_ const D3D11_TILED_RESOURCE_COORDINATE *pDestTileRegionStartCoordinate, + /* [annotation] */ + _In_ const D3D11_TILE_REGION_SIZE *pDestTileRegionSize, + /* [annotation] */ + _In_ const void *pSourceTileData, + /* [annotation] */ + _In_ UINT Flags); + + HRESULT ( STDMETHODCALLTYPE *ResizeTilePool )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ ID3D11Buffer *pTilePool, + /* [annotation] */ + _In_ UINT64 NewSizeInBytes); + + void ( STDMETHODCALLTYPE *TiledResourceBarrier )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_opt_ ID3D11DeviceChild *pTiledResourceOrViewAccessBeforeBarrier, + /* [annotation] */ + _In_opt_ ID3D11DeviceChild *pTiledResourceOrViewAccessAfterBarrier); + + BOOL ( STDMETHODCALLTYPE *IsAnnotationEnabled )( + ID3D11DeviceContext2 * This); + + void ( STDMETHODCALLTYPE *SetMarkerInt )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ LPCWSTR pLabel, + INT Data); + + void ( STDMETHODCALLTYPE *BeginEventInt )( + ID3D11DeviceContext2 * This, + /* [annotation] */ + _In_ LPCWSTR pLabel, + INT Data); + + void ( STDMETHODCALLTYPE *EndEvent )( + ID3D11DeviceContext2 * This); + + END_INTERFACE + } ID3D11DeviceContext2Vtbl; + + interface ID3D11DeviceContext2 + { + CONST_VTBL struct ID3D11DeviceContext2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11DeviceContext2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11DeviceContext2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11DeviceContext2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11DeviceContext2_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11DeviceContext2_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11DeviceContext2_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11DeviceContext2_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11DeviceContext2_VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext2_PSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> PSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext2_PSSetShader(This,pPixelShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> PSSetShader(This,pPixelShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext2_PSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> PSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext2_VSSetShader(This,pVertexShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> VSSetShader(This,pVertexShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext2_DrawIndexed(This,IndexCount,StartIndexLocation,BaseVertexLocation) \ + ( (This)->lpVtbl -> DrawIndexed(This,IndexCount,StartIndexLocation,BaseVertexLocation) ) + +#define ID3D11DeviceContext2_Draw(This,VertexCount,StartVertexLocation) \ + ( (This)->lpVtbl -> Draw(This,VertexCount,StartVertexLocation) ) + +#define ID3D11DeviceContext2_Map(This,pResource,Subresource,MapType,MapFlags,pMappedResource) \ + ( (This)->lpVtbl -> Map(This,pResource,Subresource,MapType,MapFlags,pMappedResource) ) + +#define ID3D11DeviceContext2_Unmap(This,pResource,Subresource) \ + ( (This)->lpVtbl -> Unmap(This,pResource,Subresource) ) + +#define ID3D11DeviceContext2_PSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> PSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext2_IASetInputLayout(This,pInputLayout) \ + ( (This)->lpVtbl -> IASetInputLayout(This,pInputLayout) ) + +#define ID3D11DeviceContext2_IASetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) \ + ( (This)->lpVtbl -> IASetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) ) + +#define ID3D11DeviceContext2_IASetIndexBuffer(This,pIndexBuffer,Format,Offset) \ + ( (This)->lpVtbl -> IASetIndexBuffer(This,pIndexBuffer,Format,Offset) ) + +#define ID3D11DeviceContext2_DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) ) + +#define ID3D11DeviceContext2_DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) ) + +#define ID3D11DeviceContext2_GSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> GSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext2_GSSetShader(This,pShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> GSSetShader(This,pShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext2_IASetPrimitiveTopology(This,Topology) \ + ( (This)->lpVtbl -> IASetPrimitiveTopology(This,Topology) ) + +#define ID3D11DeviceContext2_VSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> VSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext2_VSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> VSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext2_Begin(This,pAsync) \ + ( (This)->lpVtbl -> Begin(This,pAsync) ) + +#define ID3D11DeviceContext2_End(This,pAsync) \ + ( (This)->lpVtbl -> End(This,pAsync) ) + +#define ID3D11DeviceContext2_GetData(This,pAsync,pData,DataSize,GetDataFlags) \ + ( (This)->lpVtbl -> GetData(This,pAsync,pData,DataSize,GetDataFlags) ) + +#define ID3D11DeviceContext2_SetPredication(This,pPredicate,PredicateValue) \ + ( (This)->lpVtbl -> SetPredication(This,pPredicate,PredicateValue) ) + +#define ID3D11DeviceContext2_GSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> GSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext2_GSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> GSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext2_OMSetRenderTargets(This,NumViews,ppRenderTargetViews,pDepthStencilView) \ + ( (This)->lpVtbl -> OMSetRenderTargets(This,NumViews,ppRenderTargetViews,pDepthStencilView) ) + +#define ID3D11DeviceContext2_OMSetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,pDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) \ + ( (This)->lpVtbl -> OMSetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,pDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) ) + +#define ID3D11DeviceContext2_OMSetBlendState(This,pBlendState,BlendFactor,SampleMask) \ + ( (This)->lpVtbl -> OMSetBlendState(This,pBlendState,BlendFactor,SampleMask) ) + +#define ID3D11DeviceContext2_OMSetDepthStencilState(This,pDepthStencilState,StencilRef) \ + ( (This)->lpVtbl -> OMSetDepthStencilState(This,pDepthStencilState,StencilRef) ) + +#define ID3D11DeviceContext2_SOSetTargets(This,NumBuffers,ppSOTargets,pOffsets) \ + ( (This)->lpVtbl -> SOSetTargets(This,NumBuffers,ppSOTargets,pOffsets) ) + +#define ID3D11DeviceContext2_DrawAuto(This) \ + ( (This)->lpVtbl -> DrawAuto(This) ) + +#define ID3D11DeviceContext2_DrawIndexedInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) \ + ( (This)->lpVtbl -> DrawIndexedInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) ) + +#define ID3D11DeviceContext2_DrawInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) \ + ( (This)->lpVtbl -> DrawInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) ) + +#define ID3D11DeviceContext2_Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) \ + ( (This)->lpVtbl -> Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) ) + +#define ID3D11DeviceContext2_DispatchIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) \ + ( (This)->lpVtbl -> DispatchIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) ) + +#define ID3D11DeviceContext2_RSSetState(This,pRasterizerState) \ + ( (This)->lpVtbl -> RSSetState(This,pRasterizerState) ) + +#define ID3D11DeviceContext2_RSSetViewports(This,NumViewports,pViewports) \ + ( (This)->lpVtbl -> RSSetViewports(This,NumViewports,pViewports) ) + +#define ID3D11DeviceContext2_RSSetScissorRects(This,NumRects,pRects) \ + ( (This)->lpVtbl -> RSSetScissorRects(This,NumRects,pRects) ) + +#define ID3D11DeviceContext2_CopySubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox) \ + ( (This)->lpVtbl -> CopySubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox) ) + +#define ID3D11DeviceContext2_CopyResource(This,pDstResource,pSrcResource) \ + ( (This)->lpVtbl -> CopyResource(This,pDstResource,pSrcResource) ) + +#define ID3D11DeviceContext2_UpdateSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) \ + ( (This)->lpVtbl -> UpdateSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) ) + +#define ID3D11DeviceContext2_CopyStructureCount(This,pDstBuffer,DstAlignedByteOffset,pSrcView) \ + ( (This)->lpVtbl -> CopyStructureCount(This,pDstBuffer,DstAlignedByteOffset,pSrcView) ) + +#define ID3D11DeviceContext2_ClearRenderTargetView(This,pRenderTargetView,ColorRGBA) \ + ( (This)->lpVtbl -> ClearRenderTargetView(This,pRenderTargetView,ColorRGBA) ) + +#define ID3D11DeviceContext2_ClearUnorderedAccessViewUint(This,pUnorderedAccessView,Values) \ + ( (This)->lpVtbl -> ClearUnorderedAccessViewUint(This,pUnorderedAccessView,Values) ) + +#define ID3D11DeviceContext2_ClearUnorderedAccessViewFloat(This,pUnorderedAccessView,Values) \ + ( (This)->lpVtbl -> ClearUnorderedAccessViewFloat(This,pUnorderedAccessView,Values) ) + +#define ID3D11DeviceContext2_ClearDepthStencilView(This,pDepthStencilView,ClearFlags,Depth,Stencil) \ + ( (This)->lpVtbl -> ClearDepthStencilView(This,pDepthStencilView,ClearFlags,Depth,Stencil) ) + +#define ID3D11DeviceContext2_GenerateMips(This,pShaderResourceView) \ + ( (This)->lpVtbl -> GenerateMips(This,pShaderResourceView) ) + +#define ID3D11DeviceContext2_SetResourceMinLOD(This,pResource,MinLOD) \ + ( (This)->lpVtbl -> SetResourceMinLOD(This,pResource,MinLOD) ) + +#define ID3D11DeviceContext2_GetResourceMinLOD(This,pResource) \ + ( (This)->lpVtbl -> GetResourceMinLOD(This,pResource) ) + +#define ID3D11DeviceContext2_ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) \ + ( (This)->lpVtbl -> ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) ) + +#define ID3D11DeviceContext2_ExecuteCommandList(This,pCommandList,RestoreContextState) \ + ( (This)->lpVtbl -> ExecuteCommandList(This,pCommandList,RestoreContextState) ) + +#define ID3D11DeviceContext2_HSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> HSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext2_HSSetShader(This,pHullShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> HSSetShader(This,pHullShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext2_HSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> HSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext2_HSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> HSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext2_DSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> DSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext2_DSSetShader(This,pDomainShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> DSSetShader(This,pDomainShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext2_DSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> DSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext2_DSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> DSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext2_CSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> CSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext2_CSSetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) \ + ( (This)->lpVtbl -> CSSetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) ) + +#define ID3D11DeviceContext2_CSSetShader(This,pComputeShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> CSSetShader(This,pComputeShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext2_CSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> CSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext2_CSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> CSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext2_VSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> VSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext2_PSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> PSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext2_PSGetShader(This,ppPixelShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> PSGetShader(This,ppPixelShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext2_PSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> PSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext2_VSGetShader(This,ppVertexShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> VSGetShader(This,ppVertexShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext2_PSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> PSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext2_IAGetInputLayout(This,ppInputLayout) \ + ( (This)->lpVtbl -> IAGetInputLayout(This,ppInputLayout) ) + +#define ID3D11DeviceContext2_IAGetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) \ + ( (This)->lpVtbl -> IAGetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) ) + +#define ID3D11DeviceContext2_IAGetIndexBuffer(This,pIndexBuffer,Format,Offset) \ + ( (This)->lpVtbl -> IAGetIndexBuffer(This,pIndexBuffer,Format,Offset) ) + +#define ID3D11DeviceContext2_GSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> GSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext2_GSGetShader(This,ppGeometryShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> GSGetShader(This,ppGeometryShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext2_IAGetPrimitiveTopology(This,pTopology) \ + ( (This)->lpVtbl -> IAGetPrimitiveTopology(This,pTopology) ) + +#define ID3D11DeviceContext2_VSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> VSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext2_VSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> VSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext2_GetPredication(This,ppPredicate,pPredicateValue) \ + ( (This)->lpVtbl -> GetPredication(This,ppPredicate,pPredicateValue) ) + +#define ID3D11DeviceContext2_GSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> GSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext2_GSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> GSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext2_OMGetRenderTargets(This,NumViews,ppRenderTargetViews,ppDepthStencilView) \ + ( (This)->lpVtbl -> OMGetRenderTargets(This,NumViews,ppRenderTargetViews,ppDepthStencilView) ) + +#define ID3D11DeviceContext2_OMGetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,ppDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews) \ + ( (This)->lpVtbl -> OMGetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,ppDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews) ) + +#define ID3D11DeviceContext2_OMGetBlendState(This,ppBlendState,BlendFactor,pSampleMask) \ + ( (This)->lpVtbl -> OMGetBlendState(This,ppBlendState,BlendFactor,pSampleMask) ) + +#define ID3D11DeviceContext2_OMGetDepthStencilState(This,ppDepthStencilState,pStencilRef) \ + ( (This)->lpVtbl -> OMGetDepthStencilState(This,ppDepthStencilState,pStencilRef) ) + +#define ID3D11DeviceContext2_SOGetTargets(This,NumBuffers,ppSOTargets) \ + ( (This)->lpVtbl -> SOGetTargets(This,NumBuffers,ppSOTargets) ) + +#define ID3D11DeviceContext2_RSGetState(This,ppRasterizerState) \ + ( (This)->lpVtbl -> RSGetState(This,ppRasterizerState) ) + +#define ID3D11DeviceContext2_RSGetViewports(This,pNumViewports,pViewports) \ + ( (This)->lpVtbl -> RSGetViewports(This,pNumViewports,pViewports) ) + +#define ID3D11DeviceContext2_RSGetScissorRects(This,pNumRects,pRects) \ + ( (This)->lpVtbl -> RSGetScissorRects(This,pNumRects,pRects) ) + +#define ID3D11DeviceContext2_HSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> HSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext2_HSGetShader(This,ppHullShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> HSGetShader(This,ppHullShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext2_HSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> HSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext2_HSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> HSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext2_DSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> DSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext2_DSGetShader(This,ppDomainShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> DSGetShader(This,ppDomainShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext2_DSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> DSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext2_DSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> DSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext2_CSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> CSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext2_CSGetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews) \ + ( (This)->lpVtbl -> CSGetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews) ) + +#define ID3D11DeviceContext2_CSGetShader(This,ppComputeShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> CSGetShader(This,ppComputeShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext2_CSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> CSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext2_CSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> CSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext2_ClearState(This) \ + ( (This)->lpVtbl -> ClearState(This) ) + +#define ID3D11DeviceContext2_Flush(This) \ + ( (This)->lpVtbl -> Flush(This) ) + +#define ID3D11DeviceContext2_GetType(This) \ + ( (This)->lpVtbl -> GetType(This) ) + +#define ID3D11DeviceContext2_GetContextFlags(This) \ + ( (This)->lpVtbl -> GetContextFlags(This) ) + +#define ID3D11DeviceContext2_FinishCommandList(This,RestoreDeferredContextState,ppCommandList) \ + ( (This)->lpVtbl -> FinishCommandList(This,RestoreDeferredContextState,ppCommandList) ) + + +#define ID3D11DeviceContext2_CopySubresourceRegion1(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox,CopyFlags) \ + ( (This)->lpVtbl -> CopySubresourceRegion1(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox,CopyFlags) ) + +#define ID3D11DeviceContext2_UpdateSubresource1(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch,CopyFlags) \ + ( (This)->lpVtbl -> UpdateSubresource1(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch,CopyFlags) ) + +#define ID3D11DeviceContext2_DiscardResource(This,pResource) \ + ( (This)->lpVtbl -> DiscardResource(This,pResource) ) + +#define ID3D11DeviceContext2_DiscardView(This,pResourceView) \ + ( (This)->lpVtbl -> DiscardView(This,pResourceView) ) + +#define ID3D11DeviceContext2_VSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> VSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext2_HSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> HSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext2_DSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> DSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext2_GSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> GSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext2_PSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> PSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext2_CSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> CSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext2_VSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> VSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext2_HSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> HSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext2_DSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> DSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext2_GSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> GSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext2_PSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> PSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext2_CSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> CSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext2_SwapDeviceContextState(This,pState,ppPreviousState) \ + ( (This)->lpVtbl -> SwapDeviceContextState(This,pState,ppPreviousState) ) + +#define ID3D11DeviceContext2_ClearView(This,pView,Color,pRect,NumRects) \ + ( (This)->lpVtbl -> ClearView(This,pView,Color,pRect,NumRects) ) + +#define ID3D11DeviceContext2_DiscardView1(This,pResourceView,pRects,NumRects) \ + ( (This)->lpVtbl -> DiscardView1(This,pResourceView,pRects,NumRects) ) + + +#define ID3D11DeviceContext2_UpdateTileMappings(This,pTiledResource,NumTiledResourceRegions,pTiledResourceRegionStartCoordinates,pTiledResourceRegionSizes,pTilePool,NumRanges,pRangeFlags,pTilePoolStartOffsets,pRangeTileCounts,Flags) \ + ( (This)->lpVtbl -> UpdateTileMappings(This,pTiledResource,NumTiledResourceRegions,pTiledResourceRegionStartCoordinates,pTiledResourceRegionSizes,pTilePool,NumRanges,pRangeFlags,pTilePoolStartOffsets,pRangeTileCounts,Flags) ) + +#define ID3D11DeviceContext2_CopyTileMappings(This,pDestTiledResource,pDestRegionStartCoordinate,pSourceTiledResource,pSourceRegionStartCoordinate,pTileRegionSize,Flags) \ + ( (This)->lpVtbl -> CopyTileMappings(This,pDestTiledResource,pDestRegionStartCoordinate,pSourceTiledResource,pSourceRegionStartCoordinate,pTileRegionSize,Flags) ) + +#define ID3D11DeviceContext2_CopyTiles(This,pTiledResource,pTileRegionStartCoordinate,pTileRegionSize,pBuffer,BufferStartOffsetInBytes,Flags) \ + ( (This)->lpVtbl -> CopyTiles(This,pTiledResource,pTileRegionStartCoordinate,pTileRegionSize,pBuffer,BufferStartOffsetInBytes,Flags) ) + +#define ID3D11DeviceContext2_UpdateTiles(This,pDestTiledResource,pDestTileRegionStartCoordinate,pDestTileRegionSize,pSourceTileData,Flags) \ + ( (This)->lpVtbl -> UpdateTiles(This,pDestTiledResource,pDestTileRegionStartCoordinate,pDestTileRegionSize,pSourceTileData,Flags) ) + +#define ID3D11DeviceContext2_ResizeTilePool(This,pTilePool,NewSizeInBytes) \ + ( (This)->lpVtbl -> ResizeTilePool(This,pTilePool,NewSizeInBytes) ) + +#define ID3D11DeviceContext2_TiledResourceBarrier(This,pTiledResourceOrViewAccessBeforeBarrier,pTiledResourceOrViewAccessAfterBarrier) \ + ( (This)->lpVtbl -> TiledResourceBarrier(This,pTiledResourceOrViewAccessBeforeBarrier,pTiledResourceOrViewAccessAfterBarrier) ) + +#define ID3D11DeviceContext2_IsAnnotationEnabled(This) \ + ( (This)->lpVtbl -> IsAnnotationEnabled(This) ) + +#define ID3D11DeviceContext2_SetMarkerInt(This,pLabel,Data) \ + ( (This)->lpVtbl -> SetMarkerInt(This,pLabel,Data) ) + +#define ID3D11DeviceContext2_BeginEventInt(This,pLabel,Data) \ + ( (This)->lpVtbl -> BeginEventInt(This,pLabel,Data) ) + +#define ID3D11DeviceContext2_EndEvent(This) \ + ( (This)->lpVtbl -> EndEvent(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11DeviceContext2_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11Device2_INTERFACE_DEFINED__ +#define __ID3D11Device2_INTERFACE_DEFINED__ + +/* interface ID3D11Device2 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11Device2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9d06dffa-d1e5-4d07-83a8-1bb123f2f841") + ID3D11Device2 : public ID3D11Device1 + { + public: + virtual void STDMETHODCALLTYPE GetImmediateContext2( + /* [annotation] */ + _Outptr_ ID3D11DeviceContext2 **ppImmediateContext) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateDeferredContext2( + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext2 **ppDeferredContext) = 0; + + virtual void STDMETHODCALLTYPE GetResourceTiling( + /* [annotation] */ + _In_ ID3D11Resource *pTiledResource, + /* [annotation] */ + _Out_opt_ UINT *pNumTilesForEntireResource, + /* [annotation] */ + _Out_opt_ D3D11_PACKED_MIP_DESC *pPackedMipDesc, + /* [annotation] */ + _Out_opt_ D3D11_TILE_SHAPE *pStandardTileShapeForNonPackedMips, + /* [annotation] */ + _Inout_opt_ UINT *pNumSubresourceTilings, + /* [annotation] */ + _In_ UINT FirstSubresourceTilingToGet, + /* [annotation] */ + _Out_writes_(*pNumSubresourceTilings) D3D11_SUBRESOURCE_TILING *pSubresourceTilingsForNonPackedMips) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckMultisampleQualityLevels1( + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT SampleCount, + /* [annotation] */ + _In_ UINT Flags, + /* [annotation] */ + _Out_ UINT *pNumQualityLevels) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11Device2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11Device2 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11Device2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11Device2 * This); + + HRESULT ( STDMETHODCALLTYPE *CreateBuffer )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ const D3D11_BUFFER_DESC *pDesc, + /* [annotation] */ + _In_opt_ const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Buffer **ppBuffer); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture1D )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE1D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels * pDesc->ArraySize)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture1D **ppTexture1D); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture2D )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE2D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels * pDesc->ArraySize)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture2D **ppTexture2D); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture3D )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE3D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture3D **ppTexture3D); + + HRESULT ( STDMETHODCALLTYPE *CreateShaderResourceView )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11ShaderResourceView **ppSRView); + + HRESULT ( STDMETHODCALLTYPE *CreateUnorderedAccessView )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11UnorderedAccessView **ppUAView); + + HRESULT ( STDMETHODCALLTYPE *CreateRenderTargetView )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_RENDER_TARGET_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RenderTargetView **ppRTView); + + HRESULT ( STDMETHODCALLTYPE *CreateDepthStencilView )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DepthStencilView **ppDepthStencilView); + + HRESULT ( STDMETHODCALLTYPE *CreateInputLayout )( + ID3D11Device2 * This, + /* [annotation] */ + _In_reads_(NumElements) const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT ) UINT NumElements, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecodeWithInputSignature, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11InputLayout **ppInputLayout); + + HRESULT ( STDMETHODCALLTYPE *CreateVertexShader )( + ID3D11Device2 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11VertexShader **ppVertexShader); + + HRESULT ( STDMETHODCALLTYPE *CreateGeometryShader )( + ID3D11Device2 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11GeometryShader **ppGeometryShader); + + HRESULT ( STDMETHODCALLTYPE *CreateGeometryShaderWithStreamOutput )( + ID3D11Device2 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_reads_opt_(NumEntries) const D3D11_SO_DECLARATION_ENTRY *pSODeclaration, + /* [annotation] */ + _In_range_( 0, D3D11_SO_STREAM_COUNT * D3D11_SO_OUTPUT_COMPONENT_COUNT ) UINT NumEntries, + /* [annotation] */ + _In_reads_opt_(NumStrides) const UINT *pBufferStrides, + /* [annotation] */ + _In_range_( 0, D3D11_SO_BUFFER_SLOT_COUNT ) UINT NumStrides, + /* [annotation] */ + _In_ UINT RasterizedStream, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11GeometryShader **ppGeometryShader); + + HRESULT ( STDMETHODCALLTYPE *CreatePixelShader )( + ID3D11Device2 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11PixelShader **ppPixelShader); + + HRESULT ( STDMETHODCALLTYPE *CreateHullShader )( + ID3D11Device2 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11HullShader **ppHullShader); + + HRESULT ( STDMETHODCALLTYPE *CreateDomainShader )( + ID3D11Device2 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DomainShader **ppDomainShader); + + HRESULT ( STDMETHODCALLTYPE *CreateComputeShader )( + ID3D11Device2 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11ComputeShader **ppComputeShader); + + HRESULT ( STDMETHODCALLTYPE *CreateClassLinkage )( + ID3D11Device2 * This, + /* [annotation] */ + _COM_Outptr_ ID3D11ClassLinkage **ppLinkage); + + HRESULT ( STDMETHODCALLTYPE *CreateBlendState )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ const D3D11_BLEND_DESC *pBlendStateDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11BlendState **ppBlendState); + + HRESULT ( STDMETHODCALLTYPE *CreateDepthStencilState )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DepthStencilState **ppDepthStencilState); + + HRESULT ( STDMETHODCALLTYPE *CreateRasterizerState )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ const D3D11_RASTERIZER_DESC *pRasterizerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RasterizerState **ppRasterizerState); + + HRESULT ( STDMETHODCALLTYPE *CreateSamplerState )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ const D3D11_SAMPLER_DESC *pSamplerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11SamplerState **ppSamplerState); + + HRESULT ( STDMETHODCALLTYPE *CreateQuery )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ const D3D11_QUERY_DESC *pQueryDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Query **ppQuery); + + HRESULT ( STDMETHODCALLTYPE *CreatePredicate )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ const D3D11_QUERY_DESC *pPredicateDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Predicate **ppPredicate); + + HRESULT ( STDMETHODCALLTYPE *CreateCounter )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ const D3D11_COUNTER_DESC *pCounterDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Counter **ppCounter); + + HRESULT ( STDMETHODCALLTYPE *CreateDeferredContext )( + ID3D11Device2 * This, + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext **ppDeferredContext); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedResource )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _In_ REFIID ReturnedInterface, + /* [annotation] */ + _COM_Outptr_opt_ void **ppResource); + + HRESULT ( STDMETHODCALLTYPE *CheckFormatSupport )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _Out_ UINT *pFormatSupport); + + HRESULT ( STDMETHODCALLTYPE *CheckMultisampleQualityLevels )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT SampleCount, + /* [annotation] */ + _Out_ UINT *pNumQualityLevels); + + void ( STDMETHODCALLTYPE *CheckCounterInfo )( + ID3D11Device2 * This, + /* [annotation] */ + _Out_ D3D11_COUNTER_INFO *pCounterInfo); + + HRESULT ( STDMETHODCALLTYPE *CheckCounter )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ const D3D11_COUNTER_DESC *pDesc, + /* [annotation] */ + _Out_ D3D11_COUNTER_TYPE *pType, + /* [annotation] */ + _Out_ UINT *pActiveCounters, + /* [annotation] */ + _Out_writes_opt_(*pNameLength) LPSTR szName, + /* [annotation] */ + _Inout_opt_ UINT *pNameLength, + /* [annotation] */ + _Out_writes_opt_(*pUnitsLength) LPSTR szUnits, + /* [annotation] */ + _Inout_opt_ UINT *pUnitsLength, + /* [annotation] */ + _Out_writes_opt_(*pDescriptionLength) LPSTR szDescription, + /* [annotation] */ + _Inout_opt_ UINT *pDescriptionLength); + + HRESULT ( STDMETHODCALLTYPE *CheckFeatureSupport )( + ID3D11Device2 * This, + D3D11_FEATURE Feature, + /* [annotation] */ + _Out_writes_bytes_(FeatureSupportDataSize) void *pFeatureSupportData, + UINT FeatureSupportDataSize); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + D3D_FEATURE_LEVEL ( STDMETHODCALLTYPE *GetFeatureLevel )( + ID3D11Device2 * This); + + UINT ( STDMETHODCALLTYPE *GetCreationFlags )( + ID3D11Device2 * This); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceRemovedReason )( + ID3D11Device2 * This); + + void ( STDMETHODCALLTYPE *GetImmediateContext )( + ID3D11Device2 * This, + /* [annotation] */ + _Outptr_ ID3D11DeviceContext **ppImmediateContext); + + HRESULT ( STDMETHODCALLTYPE *SetExceptionMode )( + ID3D11Device2 * This, + UINT RaiseFlags); + + UINT ( STDMETHODCALLTYPE *GetExceptionMode )( + ID3D11Device2 * This); + + void ( STDMETHODCALLTYPE *GetImmediateContext1 )( + ID3D11Device2 * This, + /* [annotation] */ + _Outptr_ ID3D11DeviceContext1 **ppImmediateContext); + + HRESULT ( STDMETHODCALLTYPE *CreateDeferredContext1 )( + ID3D11Device2 * This, + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext1 **ppDeferredContext); + + HRESULT ( STDMETHODCALLTYPE *CreateBlendState1 )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ const D3D11_BLEND_DESC1 *pBlendStateDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11BlendState1 **ppBlendState); + + HRESULT ( STDMETHODCALLTYPE *CreateRasterizerState1 )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ const D3D11_RASTERIZER_DESC1 *pRasterizerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RasterizerState1 **ppRasterizerState); + + HRESULT ( STDMETHODCALLTYPE *CreateDeviceContextState )( + ID3D11Device2 * This, + UINT Flags, + /* [annotation] */ + _In_reads_( FeatureLevels ) const D3D_FEATURE_LEVEL *pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + REFIID EmulatedInterface, + /* [annotation] */ + _Out_opt_ D3D_FEATURE_LEVEL *pChosenFeatureLevel, + /* [annotation] */ + _Out_opt_ ID3DDeviceContextState **ppContextState); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedResource1 )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _In_ REFIID returnedInterface, + /* [annotation] */ + _COM_Outptr_ void **ppResource); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedResourceByName )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ LPCWSTR lpName, + /* [annotation] */ + _In_ DWORD dwDesiredAccess, + /* [annotation] */ + _In_ REFIID returnedInterface, + /* [annotation] */ + _COM_Outptr_ void **ppResource); + + void ( STDMETHODCALLTYPE *GetImmediateContext2 )( + ID3D11Device2 * This, + /* [annotation] */ + _Outptr_ ID3D11DeviceContext2 **ppImmediateContext); + + HRESULT ( STDMETHODCALLTYPE *CreateDeferredContext2 )( + ID3D11Device2 * This, + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext2 **ppDeferredContext); + + void ( STDMETHODCALLTYPE *GetResourceTiling )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ ID3D11Resource *pTiledResource, + /* [annotation] */ + _Out_opt_ UINT *pNumTilesForEntireResource, + /* [annotation] */ + _Out_opt_ D3D11_PACKED_MIP_DESC *pPackedMipDesc, + /* [annotation] */ + _Out_opt_ D3D11_TILE_SHAPE *pStandardTileShapeForNonPackedMips, + /* [annotation] */ + _Inout_opt_ UINT *pNumSubresourceTilings, + /* [annotation] */ + _In_ UINT FirstSubresourceTilingToGet, + /* [annotation] */ + _Out_writes_(*pNumSubresourceTilings) D3D11_SUBRESOURCE_TILING *pSubresourceTilingsForNonPackedMips); + + HRESULT ( STDMETHODCALLTYPE *CheckMultisampleQualityLevels1 )( + ID3D11Device2 * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT SampleCount, + /* [annotation] */ + _In_ UINT Flags, + /* [annotation] */ + _Out_ UINT *pNumQualityLevels); + + END_INTERFACE + } ID3D11Device2Vtbl; + + interface ID3D11Device2 + { + CONST_VTBL struct ID3D11Device2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11Device2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11Device2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11Device2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11Device2_CreateBuffer(This,pDesc,pInitialData,ppBuffer) \ + ( (This)->lpVtbl -> CreateBuffer(This,pDesc,pInitialData,ppBuffer) ) + +#define ID3D11Device2_CreateTexture1D(This,pDesc,pInitialData,ppTexture1D) \ + ( (This)->lpVtbl -> CreateTexture1D(This,pDesc,pInitialData,ppTexture1D) ) + +#define ID3D11Device2_CreateTexture2D(This,pDesc,pInitialData,ppTexture2D) \ + ( (This)->lpVtbl -> CreateTexture2D(This,pDesc,pInitialData,ppTexture2D) ) + +#define ID3D11Device2_CreateTexture3D(This,pDesc,pInitialData,ppTexture3D) \ + ( (This)->lpVtbl -> CreateTexture3D(This,pDesc,pInitialData,ppTexture3D) ) + +#define ID3D11Device2_CreateShaderResourceView(This,pResource,pDesc,ppSRView) \ + ( (This)->lpVtbl -> CreateShaderResourceView(This,pResource,pDesc,ppSRView) ) + +#define ID3D11Device2_CreateUnorderedAccessView(This,pResource,pDesc,ppUAView) \ + ( (This)->lpVtbl -> CreateUnorderedAccessView(This,pResource,pDesc,ppUAView) ) + +#define ID3D11Device2_CreateRenderTargetView(This,pResource,pDesc,ppRTView) \ + ( (This)->lpVtbl -> CreateRenderTargetView(This,pResource,pDesc,ppRTView) ) + +#define ID3D11Device2_CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView) \ + ( (This)->lpVtbl -> CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView) ) + +#define ID3D11Device2_CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout) \ + ( (This)->lpVtbl -> CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout) ) + +#define ID3D11Device2_CreateVertexShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppVertexShader) \ + ( (This)->lpVtbl -> CreateVertexShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppVertexShader) ) + +#define ID3D11Device2_CreateGeometryShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppGeometryShader) \ + ( (This)->lpVtbl -> CreateGeometryShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppGeometryShader) ) + +#define ID3D11Device2_CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,pBufferStrides,NumStrides,RasterizedStream,pClassLinkage,ppGeometryShader) \ + ( (This)->lpVtbl -> CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,pBufferStrides,NumStrides,RasterizedStream,pClassLinkage,ppGeometryShader) ) + +#define ID3D11Device2_CreatePixelShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppPixelShader) \ + ( (This)->lpVtbl -> CreatePixelShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppPixelShader) ) + +#define ID3D11Device2_CreateHullShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppHullShader) \ + ( (This)->lpVtbl -> CreateHullShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppHullShader) ) + +#define ID3D11Device2_CreateDomainShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppDomainShader) \ + ( (This)->lpVtbl -> CreateDomainShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppDomainShader) ) + +#define ID3D11Device2_CreateComputeShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppComputeShader) \ + ( (This)->lpVtbl -> CreateComputeShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppComputeShader) ) + +#define ID3D11Device2_CreateClassLinkage(This,ppLinkage) \ + ( (This)->lpVtbl -> CreateClassLinkage(This,ppLinkage) ) + +#define ID3D11Device2_CreateBlendState(This,pBlendStateDesc,ppBlendState) \ + ( (This)->lpVtbl -> CreateBlendState(This,pBlendStateDesc,ppBlendState) ) + +#define ID3D11Device2_CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState) \ + ( (This)->lpVtbl -> CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState) ) + +#define ID3D11Device2_CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState) \ + ( (This)->lpVtbl -> CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState) ) + +#define ID3D11Device2_CreateSamplerState(This,pSamplerDesc,ppSamplerState) \ + ( (This)->lpVtbl -> CreateSamplerState(This,pSamplerDesc,ppSamplerState) ) + +#define ID3D11Device2_CreateQuery(This,pQueryDesc,ppQuery) \ + ( (This)->lpVtbl -> CreateQuery(This,pQueryDesc,ppQuery) ) + +#define ID3D11Device2_CreatePredicate(This,pPredicateDesc,ppPredicate) \ + ( (This)->lpVtbl -> CreatePredicate(This,pPredicateDesc,ppPredicate) ) + +#define ID3D11Device2_CreateCounter(This,pCounterDesc,ppCounter) \ + ( (This)->lpVtbl -> CreateCounter(This,pCounterDesc,ppCounter) ) + +#define ID3D11Device2_CreateDeferredContext(This,ContextFlags,ppDeferredContext) \ + ( (This)->lpVtbl -> CreateDeferredContext(This,ContextFlags,ppDeferredContext) ) + +#define ID3D11Device2_OpenSharedResource(This,hResource,ReturnedInterface,ppResource) \ + ( (This)->lpVtbl -> OpenSharedResource(This,hResource,ReturnedInterface,ppResource) ) + +#define ID3D11Device2_CheckFormatSupport(This,Format,pFormatSupport) \ + ( (This)->lpVtbl -> CheckFormatSupport(This,Format,pFormatSupport) ) + +#define ID3D11Device2_CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels) \ + ( (This)->lpVtbl -> CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels) ) + +#define ID3D11Device2_CheckCounterInfo(This,pCounterInfo) \ + ( (This)->lpVtbl -> CheckCounterInfo(This,pCounterInfo) ) + +#define ID3D11Device2_CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength) \ + ( (This)->lpVtbl -> CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength) ) + +#define ID3D11Device2_CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) \ + ( (This)->lpVtbl -> CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) ) + +#define ID3D11Device2_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11Device2_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11Device2_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D11Device2_GetFeatureLevel(This) \ + ( (This)->lpVtbl -> GetFeatureLevel(This) ) + +#define ID3D11Device2_GetCreationFlags(This) \ + ( (This)->lpVtbl -> GetCreationFlags(This) ) + +#define ID3D11Device2_GetDeviceRemovedReason(This) \ + ( (This)->lpVtbl -> GetDeviceRemovedReason(This) ) + +#define ID3D11Device2_GetImmediateContext(This,ppImmediateContext) \ + ( (This)->lpVtbl -> GetImmediateContext(This,ppImmediateContext) ) + +#define ID3D11Device2_SetExceptionMode(This,RaiseFlags) \ + ( (This)->lpVtbl -> SetExceptionMode(This,RaiseFlags) ) + +#define ID3D11Device2_GetExceptionMode(This) \ + ( (This)->lpVtbl -> GetExceptionMode(This) ) + + +#define ID3D11Device2_GetImmediateContext1(This,ppImmediateContext) \ + ( (This)->lpVtbl -> GetImmediateContext1(This,ppImmediateContext) ) + +#define ID3D11Device2_CreateDeferredContext1(This,ContextFlags,ppDeferredContext) \ + ( (This)->lpVtbl -> CreateDeferredContext1(This,ContextFlags,ppDeferredContext) ) + +#define ID3D11Device2_CreateBlendState1(This,pBlendStateDesc,ppBlendState) \ + ( (This)->lpVtbl -> CreateBlendState1(This,pBlendStateDesc,ppBlendState) ) + +#define ID3D11Device2_CreateRasterizerState1(This,pRasterizerDesc,ppRasterizerState) \ + ( (This)->lpVtbl -> CreateRasterizerState1(This,pRasterizerDesc,ppRasterizerState) ) + +#define ID3D11Device2_CreateDeviceContextState(This,Flags,pFeatureLevels,FeatureLevels,SDKVersion,EmulatedInterface,pChosenFeatureLevel,ppContextState) \ + ( (This)->lpVtbl -> CreateDeviceContextState(This,Flags,pFeatureLevels,FeatureLevels,SDKVersion,EmulatedInterface,pChosenFeatureLevel,ppContextState) ) + +#define ID3D11Device2_OpenSharedResource1(This,hResource,returnedInterface,ppResource) \ + ( (This)->lpVtbl -> OpenSharedResource1(This,hResource,returnedInterface,ppResource) ) + +#define ID3D11Device2_OpenSharedResourceByName(This,lpName,dwDesiredAccess,returnedInterface,ppResource) \ + ( (This)->lpVtbl -> OpenSharedResourceByName(This,lpName,dwDesiredAccess,returnedInterface,ppResource) ) + + +#define ID3D11Device2_GetImmediateContext2(This,ppImmediateContext) \ + ( (This)->lpVtbl -> GetImmediateContext2(This,ppImmediateContext) ) + +#define ID3D11Device2_CreateDeferredContext2(This,ContextFlags,ppDeferredContext) \ + ( (This)->lpVtbl -> CreateDeferredContext2(This,ContextFlags,ppDeferredContext) ) + +#define ID3D11Device2_GetResourceTiling(This,pTiledResource,pNumTilesForEntireResource,pPackedMipDesc,pStandardTileShapeForNonPackedMips,pNumSubresourceTilings,FirstSubresourceTilingToGet,pSubresourceTilingsForNonPackedMips) \ + ( (This)->lpVtbl -> GetResourceTiling(This,pTiledResource,pNumTilesForEntireResource,pPackedMipDesc,pStandardTileShapeForNonPackedMips,pNumSubresourceTilings,FirstSubresourceTilingToGet,pSubresourceTilingsForNonPackedMips) ) + +#define ID3D11Device2_CheckMultisampleQualityLevels1(This,Format,SampleCount,Flags,pNumQualityLevels) \ + ( (This)->lpVtbl -> CheckMultisampleQualityLevels1(This,Format,SampleCount,Flags,pNumQualityLevels) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11Device2_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_2_0000_0002 */ +/* [local] */ + +DEFINE_GUID(IID_ID3D11DeviceContext2,0x420d5b32,0xb90c,0x4da4,0xbe,0xf0,0x35,0x9f,0x6a,0x24,0xa8,0x3a); +DEFINE_GUID(IID_ID3D11Device2,0x9d06dffa,0xd1e5,0x4d07,0x83,0xa8,0x1b,0xb1,0x23,0xf2,0xf8,0x41); + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_2_0000_0002_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_2_0000_0002_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/d3d11_3.h b/gfx/include/dxsdk/d3d11_3.h new file mode 100644 index 0000000000..402a0e58bd --- /dev/null +++ b/gfx/include/dxsdk/d3d11_3.h @@ -0,0 +1,6832 @@ +/*------------------------------------------------------------------------------------- + * + * Copyright (c) Microsoft Corporation + * + *-------------------------------------------------------------------------------------*/ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ +/* @@MIDL_FILE_HEADING( ) */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __d3d11_3_h__ +#define __d3d11_3_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __ID3D11Texture2D1_FWD_DEFINED__ +#define __ID3D11Texture2D1_FWD_DEFINED__ +typedef interface ID3D11Texture2D1 ID3D11Texture2D1; + +#endif /* __ID3D11Texture2D1_FWD_DEFINED__ */ + + +#ifndef __ID3D11Texture3D1_FWD_DEFINED__ +#define __ID3D11Texture3D1_FWD_DEFINED__ +typedef interface ID3D11Texture3D1 ID3D11Texture3D1; + +#endif /* __ID3D11Texture3D1_FWD_DEFINED__ */ + + +#ifndef __ID3D11RasterizerState2_FWD_DEFINED__ +#define __ID3D11RasterizerState2_FWD_DEFINED__ +typedef interface ID3D11RasterizerState2 ID3D11RasterizerState2; + +#endif /* __ID3D11RasterizerState2_FWD_DEFINED__ */ + + +#ifndef __ID3D11ShaderResourceView1_FWD_DEFINED__ +#define __ID3D11ShaderResourceView1_FWD_DEFINED__ +typedef interface ID3D11ShaderResourceView1 ID3D11ShaderResourceView1; + +#endif /* __ID3D11ShaderResourceView1_FWD_DEFINED__ */ + + +#ifndef __ID3D11RenderTargetView1_FWD_DEFINED__ +#define __ID3D11RenderTargetView1_FWD_DEFINED__ +typedef interface ID3D11RenderTargetView1 ID3D11RenderTargetView1; + +#endif /* __ID3D11RenderTargetView1_FWD_DEFINED__ */ + + +#ifndef __ID3D11UnorderedAccessView1_FWD_DEFINED__ +#define __ID3D11UnorderedAccessView1_FWD_DEFINED__ +typedef interface ID3D11UnorderedAccessView1 ID3D11UnorderedAccessView1; + +#endif /* __ID3D11UnorderedAccessView1_FWD_DEFINED__ */ + + +#ifndef __ID3D11Query1_FWD_DEFINED__ +#define __ID3D11Query1_FWD_DEFINED__ +typedef interface ID3D11Query1 ID3D11Query1; + +#endif /* __ID3D11Query1_FWD_DEFINED__ */ + + +#ifndef __ID3D11DeviceContext3_FWD_DEFINED__ +#define __ID3D11DeviceContext3_FWD_DEFINED__ +typedef interface ID3D11DeviceContext3 ID3D11DeviceContext3; + +#endif /* __ID3D11DeviceContext3_FWD_DEFINED__ */ + + +#ifndef __ID3D11Fence_FWD_DEFINED__ +#define __ID3D11Fence_FWD_DEFINED__ +typedef interface ID3D11Fence ID3D11Fence; + +#endif /* __ID3D11Fence_FWD_DEFINED__ */ + + +#ifndef __ID3D11DeviceContext4_FWD_DEFINED__ +#define __ID3D11DeviceContext4_FWD_DEFINED__ +typedef interface ID3D11DeviceContext4 ID3D11DeviceContext4; + +#endif /* __ID3D11DeviceContext4_FWD_DEFINED__ */ + + +#ifndef __ID3D11Device3_FWD_DEFINED__ +#define __ID3D11Device3_FWD_DEFINED__ +typedef interface ID3D11Device3 ID3D11Device3; + +#endif /* __ID3D11Device3_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "dxgi1_3.h" +#include "d3dcommon.h" +#include "d3d11_2.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_d3d11_3_0000_0000 */ +/* [local] */ + +#ifdef __cplusplus +} +#endif +#include "d3d11_2.h" // +#ifdef __cplusplus +extern "C"{ +#endif +typedef +enum D3D11_CONTEXT_TYPE + { + D3D11_CONTEXT_TYPE_ALL = 0, + D3D11_CONTEXT_TYPE_3D = 1, + D3D11_CONTEXT_TYPE_COMPUTE = 2, + D3D11_CONTEXT_TYPE_COPY = 3, + D3D11_CONTEXT_TYPE_VIDEO = 4 + } D3D11_CONTEXT_TYPE; + +typedef +enum D3D11_TEXTURE_LAYOUT + { + D3D11_TEXTURE_LAYOUT_UNDEFINED = 0, + D3D11_TEXTURE_LAYOUT_ROW_MAJOR = 1, + D3D11_TEXTURE_LAYOUT_64K_STANDARD_SWIZZLE = 2 + } D3D11_TEXTURE_LAYOUT; + +typedef struct D3D11_TEXTURE2D_DESC1 + { + UINT Width; + UINT Height; + UINT MipLevels; + UINT ArraySize; + DXGI_FORMAT Format; + DXGI_SAMPLE_DESC SampleDesc; + D3D11_USAGE Usage; + UINT BindFlags; + UINT CPUAccessFlags; + UINT MiscFlags; + D3D11_TEXTURE_LAYOUT TextureLayout; + } D3D11_TEXTURE2D_DESC1; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_TEXTURE2D_DESC1 : public D3D11_TEXTURE2D_DESC1 +{ + CD3D11_TEXTURE2D_DESC1() + {} + explicit CD3D11_TEXTURE2D_DESC1( const D3D11_TEXTURE2D_DESC1& o ) : + D3D11_TEXTURE2D_DESC1( o ) + {} + explicit CD3D11_TEXTURE2D_DESC1( + DXGI_FORMAT format, + UINT width, + UINT height, + UINT arraySize = 1, + UINT mipLevels = 0, + UINT bindFlags = D3D11_BIND_SHADER_RESOURCE, + D3D11_USAGE usage = D3D11_USAGE_DEFAULT, + UINT cpuaccessFlags = 0, + UINT sampleCount = 1, + UINT sampleQuality = 0, + UINT miscFlags = 0, + D3D11_TEXTURE_LAYOUT textureLayout = D3D11_TEXTURE_LAYOUT_UNDEFINED) + { + Width = width; + Height = height; + MipLevels = mipLevels; + ArraySize = arraySize; + Format = format; + SampleDesc.Count = sampleCount; + SampleDesc.Quality = sampleQuality; + Usage = usage; + BindFlags = bindFlags; + CPUAccessFlags = cpuaccessFlags; + MiscFlags = miscFlags; + TextureLayout = textureLayout; + } + explicit CD3D11_TEXTURE2D_DESC1( + const D3D11_TEXTURE2D_DESC &desc, + D3D11_TEXTURE_LAYOUT textureLayout = D3D11_TEXTURE_LAYOUT_UNDEFINED) + { + Width = desc.Width; + Height = desc.Height; + MipLevels = desc.MipLevels; + ArraySize = desc.ArraySize; + Format = desc.Format; + SampleDesc.Count = desc.SampleDesc.Count; + SampleDesc.Quality = desc. SampleDesc.Quality; + Usage = desc.Usage; + BindFlags = desc.BindFlags; + CPUAccessFlags = desc.CPUAccessFlags; + MiscFlags = desc.MiscFlags; + TextureLayout = textureLayout; + } + ~CD3D11_TEXTURE2D_DESC1() {} + operator const D3D11_TEXTURE2D_DESC1&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0000_v0_0_s_ifspec; + +#ifndef __ID3D11Texture2D1_INTERFACE_DEFINED__ +#define __ID3D11Texture2D1_INTERFACE_DEFINED__ + +/* interface ID3D11Texture2D1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11Texture2D1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("51218251-1E33-4617-9CCB-4D3A4367E7BB") + ID3D11Texture2D1 : public ID3D11Texture2D + { + public: + virtual void STDMETHODCALLTYPE GetDesc1( + /* [annotation] */ + _Out_ D3D11_TEXTURE2D_DESC1 *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11Texture2D1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11Texture2D1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11Texture2D1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11Texture2D1 * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11Texture2D1 * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11Texture2D1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11Texture2D1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11Texture2D1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetType )( + ID3D11Texture2D1 * This, + /* [annotation] */ + _Out_ D3D11_RESOURCE_DIMENSION *pResourceDimension); + + void ( STDMETHODCALLTYPE *SetEvictionPriority )( + ID3D11Texture2D1 * This, + /* [annotation] */ + _In_ UINT EvictionPriority); + + UINT ( STDMETHODCALLTYPE *GetEvictionPriority )( + ID3D11Texture2D1 * This); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11Texture2D1 * This, + /* [annotation] */ + _Out_ D3D11_TEXTURE2D_DESC *pDesc); + + void ( STDMETHODCALLTYPE *GetDesc1 )( + ID3D11Texture2D1 * This, + /* [annotation] */ + _Out_ D3D11_TEXTURE2D_DESC1 *pDesc); + + END_INTERFACE + } ID3D11Texture2D1Vtbl; + + interface ID3D11Texture2D1 + { + CONST_VTBL struct ID3D11Texture2D1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11Texture2D1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11Texture2D1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11Texture2D1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11Texture2D1_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11Texture2D1_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11Texture2D1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11Texture2D1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11Texture2D1_GetType(This,pResourceDimension) \ + ( (This)->lpVtbl -> GetType(This,pResourceDimension) ) + +#define ID3D11Texture2D1_SetEvictionPriority(This,EvictionPriority) \ + ( (This)->lpVtbl -> SetEvictionPriority(This,EvictionPriority) ) + +#define ID3D11Texture2D1_GetEvictionPriority(This) \ + ( (This)->lpVtbl -> GetEvictionPriority(This) ) + + +#define ID3D11Texture2D1_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + + +#define ID3D11Texture2D1_GetDesc1(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11Texture2D1_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_3_0000_0001 */ +/* [local] */ + +typedef struct D3D11_TEXTURE3D_DESC1 + { + UINT Width; + UINT Height; + UINT Depth; + UINT MipLevels; + DXGI_FORMAT Format; + D3D11_USAGE Usage; + UINT BindFlags; + UINT CPUAccessFlags; + UINT MiscFlags; + D3D11_TEXTURE_LAYOUT TextureLayout; + } D3D11_TEXTURE3D_DESC1; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_TEXTURE3D_DESC1 : public D3D11_TEXTURE3D_DESC1 +{ + CD3D11_TEXTURE3D_DESC1() + {} + explicit CD3D11_TEXTURE3D_DESC1( const D3D11_TEXTURE3D_DESC1& o ) : + D3D11_TEXTURE3D_DESC1( o ) + {} + explicit CD3D11_TEXTURE3D_DESC1( + DXGI_FORMAT format, + UINT width, + UINT height, + UINT depth, + UINT mipLevels = 0, + UINT bindFlags = D3D11_BIND_SHADER_RESOURCE, + D3D11_USAGE usage = D3D11_USAGE_DEFAULT, + UINT cpuaccessFlags = 0, + UINT miscFlags = 0, + D3D11_TEXTURE_LAYOUT textureLayout = D3D11_TEXTURE_LAYOUT_UNDEFINED) + { + Width = width; + Height = height; + Depth = depth; + MipLevels = mipLevels; + Format = format; + Usage = usage; + BindFlags = bindFlags; + CPUAccessFlags = cpuaccessFlags; + MiscFlags = miscFlags; + TextureLayout = textureLayout; + } + explicit CD3D11_TEXTURE3D_DESC1( + const D3D11_TEXTURE3D_DESC &desc, + D3D11_TEXTURE_LAYOUT textureLayout = D3D11_TEXTURE_LAYOUT_UNDEFINED) + { + Width = desc.Width; + Height = desc.Height; + Depth = desc.Depth; + MipLevels = desc.MipLevels; + Format = desc.Format; + Usage = desc.Usage; + BindFlags = desc.BindFlags; + CPUAccessFlags = desc.CPUAccessFlags; + MiscFlags = desc.MiscFlags; + TextureLayout = textureLayout; + } + ~CD3D11_TEXTURE3D_DESC1() {} + operator const D3D11_TEXTURE3D_DESC1&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0001_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0001_v0_0_s_ifspec; + +#ifndef __ID3D11Texture3D1_INTERFACE_DEFINED__ +#define __ID3D11Texture3D1_INTERFACE_DEFINED__ + +/* interface ID3D11Texture3D1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11Texture3D1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("0C711683-2853-4846-9BB0-F3E60639E46A") + ID3D11Texture3D1 : public ID3D11Texture3D + { + public: + virtual void STDMETHODCALLTYPE GetDesc1( + /* [annotation] */ + _Out_ D3D11_TEXTURE3D_DESC1 *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11Texture3D1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11Texture3D1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11Texture3D1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11Texture3D1 * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11Texture3D1 * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11Texture3D1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11Texture3D1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11Texture3D1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetType )( + ID3D11Texture3D1 * This, + /* [annotation] */ + _Out_ D3D11_RESOURCE_DIMENSION *pResourceDimension); + + void ( STDMETHODCALLTYPE *SetEvictionPriority )( + ID3D11Texture3D1 * This, + /* [annotation] */ + _In_ UINT EvictionPriority); + + UINT ( STDMETHODCALLTYPE *GetEvictionPriority )( + ID3D11Texture3D1 * This); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11Texture3D1 * This, + /* [annotation] */ + _Out_ D3D11_TEXTURE3D_DESC *pDesc); + + void ( STDMETHODCALLTYPE *GetDesc1 )( + ID3D11Texture3D1 * This, + /* [annotation] */ + _Out_ D3D11_TEXTURE3D_DESC1 *pDesc); + + END_INTERFACE + } ID3D11Texture3D1Vtbl; + + interface ID3D11Texture3D1 + { + CONST_VTBL struct ID3D11Texture3D1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11Texture3D1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11Texture3D1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11Texture3D1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11Texture3D1_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11Texture3D1_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11Texture3D1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11Texture3D1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11Texture3D1_GetType(This,pResourceDimension) \ + ( (This)->lpVtbl -> GetType(This,pResourceDimension) ) + +#define ID3D11Texture3D1_SetEvictionPriority(This,EvictionPriority) \ + ( (This)->lpVtbl -> SetEvictionPriority(This,EvictionPriority) ) + +#define ID3D11Texture3D1_GetEvictionPriority(This) \ + ( (This)->lpVtbl -> GetEvictionPriority(This) ) + + +#define ID3D11Texture3D1_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + + +#define ID3D11Texture3D1_GetDesc1(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11Texture3D1_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_3_0000_0002 */ +/* [local] */ + +typedef +enum D3D11_CONSERVATIVE_RASTERIZATION_MODE + { + D3D11_CONSERVATIVE_RASTERIZATION_MODE_OFF = 0, + D3D11_CONSERVATIVE_RASTERIZATION_MODE_ON = 1 + } D3D11_CONSERVATIVE_RASTERIZATION_MODE; + +typedef struct D3D11_RASTERIZER_DESC2 + { + D3D11_FILL_MODE FillMode; + D3D11_CULL_MODE CullMode; + BOOL FrontCounterClockwise; + INT DepthBias; + FLOAT DepthBiasClamp; + FLOAT SlopeScaledDepthBias; + BOOL DepthClipEnable; + BOOL ScissorEnable; + BOOL MultisampleEnable; + BOOL AntialiasedLineEnable; + UINT ForcedSampleCount; + D3D11_CONSERVATIVE_RASTERIZATION_MODE ConservativeRaster; + } D3D11_RASTERIZER_DESC2; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_RASTERIZER_DESC2 : public D3D11_RASTERIZER_DESC2 +{ + CD3D11_RASTERIZER_DESC2() + {} + explicit CD3D11_RASTERIZER_DESC2( const D3D11_RASTERIZER_DESC2& o ) : + D3D11_RASTERIZER_DESC2( o ) + {} + explicit CD3D11_RASTERIZER_DESC2( CD3D11_DEFAULT ) + { + FillMode = D3D11_FILL_SOLID; + CullMode = D3D11_CULL_BACK; + FrontCounterClockwise = FALSE; + DepthBias = D3D11_DEFAULT_DEPTH_BIAS; + DepthBiasClamp = D3D11_DEFAULT_DEPTH_BIAS_CLAMP; + SlopeScaledDepthBias = D3D11_DEFAULT_SLOPE_SCALED_DEPTH_BIAS; + DepthClipEnable = TRUE; + ScissorEnable = FALSE; + MultisampleEnable = FALSE; + AntialiasedLineEnable = FALSE; + ForcedSampleCount = 0; + ConservativeRaster = D3D11_CONSERVATIVE_RASTERIZATION_MODE_OFF; + } + explicit CD3D11_RASTERIZER_DESC2( + D3D11_FILL_MODE fillMode, + D3D11_CULL_MODE cullMode, + BOOL frontCounterClockwise, + INT depthBias, + FLOAT depthBiasClamp, + FLOAT slopeScaledDepthBias, + BOOL depthClipEnable, + BOOL scissorEnable, + BOOL multisampleEnable, + BOOL antialiasedLineEnable, + UINT forcedSampleCount, + D3D11_CONSERVATIVE_RASTERIZATION_MODE conservativeRaster ) + { + FillMode = fillMode; + CullMode = cullMode; + FrontCounterClockwise = frontCounterClockwise; + DepthBias = depthBias; + DepthBiasClamp = depthBiasClamp; + SlopeScaledDepthBias = slopeScaledDepthBias; + DepthClipEnable = depthClipEnable; + ScissorEnable = scissorEnable; + MultisampleEnable = multisampleEnable; + AntialiasedLineEnable = antialiasedLineEnable; + ForcedSampleCount = forcedSampleCount; + ConservativeRaster = conservativeRaster; + } + ~CD3D11_RASTERIZER_DESC2() {} + operator const D3D11_RASTERIZER_DESC2&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0002_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0002_v0_0_s_ifspec; + +#ifndef __ID3D11RasterizerState2_INTERFACE_DEFINED__ +#define __ID3D11RasterizerState2_INTERFACE_DEFINED__ + +/* interface ID3D11RasterizerState2 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11RasterizerState2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6fbd02fb-209f-46c4-b059-2ed15586a6ac") + ID3D11RasterizerState2 : public ID3D11RasterizerState1 + { + public: + virtual void STDMETHODCALLTYPE GetDesc2( + /* [annotation] */ + _Out_ D3D11_RASTERIZER_DESC2 *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11RasterizerState2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11RasterizerState2 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11RasterizerState2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11RasterizerState2 * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11RasterizerState2 * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11RasterizerState2 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11RasterizerState2 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11RasterizerState2 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11RasterizerState2 * This, + /* [annotation] */ + _Out_ D3D11_RASTERIZER_DESC *pDesc); + + void ( STDMETHODCALLTYPE *GetDesc1 )( + ID3D11RasterizerState2 * This, + /* [annotation] */ + _Out_ D3D11_RASTERIZER_DESC1 *pDesc); + + void ( STDMETHODCALLTYPE *GetDesc2 )( + ID3D11RasterizerState2 * This, + /* [annotation] */ + _Out_ D3D11_RASTERIZER_DESC2 *pDesc); + + END_INTERFACE + } ID3D11RasterizerState2Vtbl; + + interface ID3D11RasterizerState2 + { + CONST_VTBL struct ID3D11RasterizerState2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11RasterizerState2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11RasterizerState2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11RasterizerState2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11RasterizerState2_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11RasterizerState2_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11RasterizerState2_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11RasterizerState2_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11RasterizerState2_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + + +#define ID3D11RasterizerState2_GetDesc1(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) + + +#define ID3D11RasterizerState2_GetDesc2(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc2(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11RasterizerState2_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_3_0000_0003 */ +/* [local] */ + +typedef struct D3D11_TEX2D_SRV1 + { + UINT MostDetailedMip; + UINT MipLevels; + UINT PlaneSlice; + } D3D11_TEX2D_SRV1; + +typedef struct D3D11_TEX2D_ARRAY_SRV1 + { + UINT MostDetailedMip; + UINT MipLevels; + UINT FirstArraySlice; + UINT ArraySize; + UINT PlaneSlice; + } D3D11_TEX2D_ARRAY_SRV1; + +typedef struct D3D11_SHADER_RESOURCE_VIEW_DESC1 + { + DXGI_FORMAT Format; + D3D11_SRV_DIMENSION ViewDimension; + union + { + D3D11_BUFFER_SRV Buffer; + D3D11_TEX1D_SRV Texture1D; + D3D11_TEX1D_ARRAY_SRV Texture1DArray; + D3D11_TEX2D_SRV1 Texture2D; + D3D11_TEX2D_ARRAY_SRV1 Texture2DArray; + D3D11_TEX2DMS_SRV Texture2DMS; + D3D11_TEX2DMS_ARRAY_SRV Texture2DMSArray; + D3D11_TEX3D_SRV Texture3D; + D3D11_TEXCUBE_SRV TextureCube; + D3D11_TEXCUBE_ARRAY_SRV TextureCubeArray; + D3D11_BUFFEREX_SRV BufferEx; + } ; + } D3D11_SHADER_RESOURCE_VIEW_DESC1; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_SHADER_RESOURCE_VIEW_DESC1 : public D3D11_SHADER_RESOURCE_VIEW_DESC1 +{ + CD3D11_SHADER_RESOURCE_VIEW_DESC1() + {} + explicit CD3D11_SHADER_RESOURCE_VIEW_DESC1( const D3D11_SHADER_RESOURCE_VIEW_DESC1& o ) : + D3D11_SHADER_RESOURCE_VIEW_DESC1( o ) + {} + explicit CD3D11_SHADER_RESOURCE_VIEW_DESC1( + D3D11_SRV_DIMENSION viewDimension, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mostDetailedMip = 0, // FirstElement for BUFFER + UINT mipLevels = -1, // NumElements for BUFFER + UINT firstArraySlice = 0, // First2DArrayFace for TEXTURECUBEARRAY + UINT arraySize = -1, // NumCubes for TEXTURECUBEARRAY + UINT flags = 0, // BUFFEREX only + UINT planeSlice = 0 ) // Texture2D and Texture2DArray only + { + Format = format; + ViewDimension = viewDimension; + switch (viewDimension) + { + case D3D11_SRV_DIMENSION_BUFFER: + Buffer.FirstElement = mostDetailedMip; + Buffer.NumElements = mipLevels; + break; + case D3D11_SRV_DIMENSION_TEXTURE1D: + Texture1D.MostDetailedMip = mostDetailedMip; + Texture1D.MipLevels = mipLevels; + break; + case D3D11_SRV_DIMENSION_TEXTURE1DARRAY: + Texture1DArray.MostDetailedMip = mostDetailedMip; + Texture1DArray.MipLevels = mipLevels; + Texture1DArray.FirstArraySlice = firstArraySlice; + Texture1DArray.ArraySize = arraySize; + break; + case D3D11_SRV_DIMENSION_TEXTURE2D: + Texture2D.MostDetailedMip = mostDetailedMip; + Texture2D.MipLevels = mipLevels; + Texture2D.PlaneSlice = planeSlice; + break; + case D3D11_SRV_DIMENSION_TEXTURE2DARRAY: + Texture2DArray.MostDetailedMip = mostDetailedMip; + Texture2DArray.MipLevels = mipLevels; + Texture2DArray.FirstArraySlice = firstArraySlice; + Texture2DArray.ArraySize = arraySize; + Texture2DArray.PlaneSlice = planeSlice; + break; + case D3D11_SRV_DIMENSION_TEXTURE2DMS: + break; + case D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY: + Texture2DMSArray.FirstArraySlice = firstArraySlice; + Texture2DMSArray.ArraySize = arraySize; + break; + case D3D11_SRV_DIMENSION_TEXTURE3D: + Texture3D.MostDetailedMip = mostDetailedMip; + Texture3D.MipLevels = mipLevels; + break; + case D3D11_SRV_DIMENSION_TEXTURECUBE: + TextureCube.MostDetailedMip = mostDetailedMip; + TextureCube.MipLevels = mipLevels; + break; + case D3D11_SRV_DIMENSION_TEXTURECUBEARRAY: + TextureCubeArray.MostDetailedMip = mostDetailedMip; + TextureCubeArray.MipLevels = mipLevels; + TextureCubeArray.First2DArrayFace = firstArraySlice; + TextureCubeArray.NumCubes = arraySize; + break; + case D3D11_SRV_DIMENSION_BUFFEREX: + BufferEx.FirstElement = mostDetailedMip; + BufferEx.NumElements = mipLevels; + BufferEx.Flags = flags; + break; + default: break; + } + } + explicit CD3D11_SHADER_RESOURCE_VIEW_DESC1( + _In_ ID3D11Buffer*, + DXGI_FORMAT format, + UINT firstElement, + UINT numElements, + UINT flags = 0 ) + { + Format = format; + ViewDimension = D3D11_SRV_DIMENSION_BUFFEREX; + BufferEx.FirstElement = firstElement; + BufferEx.NumElements = numElements; + BufferEx.Flags = flags; + } + explicit CD3D11_SHADER_RESOURCE_VIEW_DESC1( + _In_ ID3D11Texture1D* pTex1D, + D3D11_SRV_DIMENSION viewDimension, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mostDetailedMip = 0, + UINT mipLevels = -1, + UINT firstArraySlice = 0, + UINT arraySize = -1 ) + { + ViewDimension = viewDimension; + if (DXGI_FORMAT_UNKNOWN == format || -1 == mipLevels || + (-1 == arraySize && D3D11_SRV_DIMENSION_TEXTURE1DARRAY == viewDimension)) + { + D3D11_TEXTURE1D_DESC TexDesc; + pTex1D->GetDesc( &TexDesc ); + if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format; + if (-1 == mipLevels) mipLevels = TexDesc.MipLevels - mostDetailedMip; + if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlice; + } + Format = format; + switch (viewDimension) + { + case D3D11_SRV_DIMENSION_TEXTURE1D: + Texture1D.MostDetailedMip = mostDetailedMip; + Texture1D.MipLevels = mipLevels; + break; + case D3D11_SRV_DIMENSION_TEXTURE1DARRAY: + Texture1DArray.MostDetailedMip = mostDetailedMip; + Texture1DArray.MipLevels = mipLevels; + Texture1DArray.FirstArraySlice = firstArraySlice; + Texture1DArray.ArraySize = arraySize; + break; + default: break; + } + } + explicit CD3D11_SHADER_RESOURCE_VIEW_DESC1( + _In_ ID3D11Texture2D* pTex2D, + D3D11_SRV_DIMENSION viewDimension, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mostDetailedMip = 0, + UINT mipLevels = -1, + UINT firstArraySlice = 0, // First2DArrayFace for TEXTURECUBEARRAY + UINT arraySize = -1, // NumCubes for TEXTURECUBEARRAY + UINT planeSlice = 0 ) // PlaneSlice for TEXTURE2D or TEXTURE2DARRAY + { + ViewDimension = viewDimension; + if (DXGI_FORMAT_UNKNOWN == format || + (-1 == mipLevels && + D3D11_SRV_DIMENSION_TEXTURE2DMS != viewDimension && + D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY != viewDimension) || + (-1 == arraySize && + (D3D11_SRV_DIMENSION_TEXTURE2DARRAY == viewDimension || + D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY == viewDimension || + D3D11_SRV_DIMENSION_TEXTURECUBEARRAY == viewDimension))) + { + D3D11_TEXTURE2D_DESC TexDesc; + pTex2D->GetDesc( &TexDesc ); + if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format; + if (-1 == mipLevels) mipLevels = TexDesc.MipLevels - mostDetailedMip; + if (-1 == arraySize) + { + arraySize = TexDesc.ArraySize - firstArraySlice; + if (D3D11_SRV_DIMENSION_TEXTURECUBEARRAY == viewDimension) arraySize /= 6; + } + } + Format = format; + switch (viewDimension) + { + case D3D11_SRV_DIMENSION_TEXTURE2D: + Texture2D.MostDetailedMip = mostDetailedMip; + Texture2D.MipLevels = mipLevels; + Texture2D.PlaneSlice = planeSlice; + break; + case D3D11_SRV_DIMENSION_TEXTURE2DARRAY: + Texture2DArray.MostDetailedMip = mostDetailedMip; + Texture2DArray.MipLevels = mipLevels; + Texture2DArray.FirstArraySlice = firstArraySlice; + Texture2DArray.ArraySize = arraySize; + Texture2DArray.PlaneSlice = planeSlice; + break; + case D3D11_SRV_DIMENSION_TEXTURE2DMS: + break; + case D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY: + Texture2DMSArray.FirstArraySlice = firstArraySlice; + Texture2DMSArray.ArraySize = arraySize; + break; + case D3D11_SRV_DIMENSION_TEXTURECUBE: + TextureCube.MostDetailedMip = mostDetailedMip; + TextureCube.MipLevels = mipLevels; + break; + case D3D11_SRV_DIMENSION_TEXTURECUBEARRAY: + TextureCubeArray.MostDetailedMip = mostDetailedMip; + TextureCubeArray.MipLevels = mipLevels; + TextureCubeArray.First2DArrayFace = firstArraySlice; + TextureCubeArray.NumCubes = arraySize; + break; + default: break; + } + } + explicit CD3D11_SHADER_RESOURCE_VIEW_DESC1( + _In_ ID3D11Texture3D* pTex3D, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mostDetailedMip = 0, + UINT mipLevels = -1 ) + { + ViewDimension = D3D11_SRV_DIMENSION_TEXTURE3D; + if (DXGI_FORMAT_UNKNOWN == format || -1 == mipLevels) + { + D3D11_TEXTURE3D_DESC TexDesc; + pTex3D->GetDesc( &TexDesc ); + if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format; + if (-1 == mipLevels) mipLevels = TexDesc.MipLevels - mostDetailedMip; + } + Format = format; + Texture3D.MostDetailedMip = mostDetailedMip; + Texture3D.MipLevels = mipLevels; + } + ~CD3D11_SHADER_RESOURCE_VIEW_DESC1() {} + operator const D3D11_SHADER_RESOURCE_VIEW_DESC1&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0003_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0003_v0_0_s_ifspec; + +#ifndef __ID3D11ShaderResourceView1_INTERFACE_DEFINED__ +#define __ID3D11ShaderResourceView1_INTERFACE_DEFINED__ + +/* interface ID3D11ShaderResourceView1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11ShaderResourceView1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("91308b87-9040-411d-8c67-c39253ce3802") + ID3D11ShaderResourceView1 : public ID3D11ShaderResourceView + { + public: + virtual void STDMETHODCALLTYPE GetDesc1( + /* [annotation] */ + _Out_ D3D11_SHADER_RESOURCE_VIEW_DESC1 *pDesc1) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11ShaderResourceView1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11ShaderResourceView1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11ShaderResourceView1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11ShaderResourceView1 * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11ShaderResourceView1 * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11ShaderResourceView1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11ShaderResourceView1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11ShaderResourceView1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetResource )( + ID3D11ShaderResourceView1 * This, + /* [annotation] */ + _Outptr_ ID3D11Resource **ppResource); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11ShaderResourceView1 * This, + /* [annotation] */ + _Out_ D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc); + + void ( STDMETHODCALLTYPE *GetDesc1 )( + ID3D11ShaderResourceView1 * This, + /* [annotation] */ + _Out_ D3D11_SHADER_RESOURCE_VIEW_DESC1 *pDesc1); + + END_INTERFACE + } ID3D11ShaderResourceView1Vtbl; + + interface ID3D11ShaderResourceView1 + { + CONST_VTBL struct ID3D11ShaderResourceView1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11ShaderResourceView1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11ShaderResourceView1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11ShaderResourceView1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11ShaderResourceView1_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11ShaderResourceView1_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11ShaderResourceView1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11ShaderResourceView1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11ShaderResourceView1_GetResource(This,ppResource) \ + ( (This)->lpVtbl -> GetResource(This,ppResource) ) + + +#define ID3D11ShaderResourceView1_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + + +#define ID3D11ShaderResourceView1_GetDesc1(This,pDesc1) \ + ( (This)->lpVtbl -> GetDesc1(This,pDesc1) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11ShaderResourceView1_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_3_0000_0004 */ +/* [local] */ + +typedef struct D3D11_TEX2D_RTV1 + { + UINT MipSlice; + UINT PlaneSlice; + } D3D11_TEX2D_RTV1; + +typedef struct D3D11_TEX2D_ARRAY_RTV1 + { + UINT MipSlice; + UINT FirstArraySlice; + UINT ArraySize; + UINT PlaneSlice; + } D3D11_TEX2D_ARRAY_RTV1; + +typedef struct D3D11_RENDER_TARGET_VIEW_DESC1 + { + DXGI_FORMAT Format; + D3D11_RTV_DIMENSION ViewDimension; + union + { + D3D11_BUFFER_RTV Buffer; + D3D11_TEX1D_RTV Texture1D; + D3D11_TEX1D_ARRAY_RTV Texture1DArray; + D3D11_TEX2D_RTV1 Texture2D; + D3D11_TEX2D_ARRAY_RTV1 Texture2DArray; + D3D11_TEX2DMS_RTV Texture2DMS; + D3D11_TEX2DMS_ARRAY_RTV Texture2DMSArray; + D3D11_TEX3D_RTV Texture3D; + } ; + } D3D11_RENDER_TARGET_VIEW_DESC1; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_RENDER_TARGET_VIEW_DESC1 : public D3D11_RENDER_TARGET_VIEW_DESC1 +{ + CD3D11_RENDER_TARGET_VIEW_DESC1() + {} + explicit CD3D11_RENDER_TARGET_VIEW_DESC1( const D3D11_RENDER_TARGET_VIEW_DESC1& o ) : + D3D11_RENDER_TARGET_VIEW_DESC1( o ) + {} + explicit CD3D11_RENDER_TARGET_VIEW_DESC1( + D3D11_RTV_DIMENSION viewDimension, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mipSlice = 0, // FirstElement for BUFFER + UINT firstArraySlice = 0, // NumElements for BUFFER, FirstWSlice for TEXTURE3D + UINT arraySize = -1, // WSize for TEXTURE3D + UINT planeSlice = 0 ) // PlaneSlice for TEXTURE2D and TEXTURE2DARRAY + { + Format = format; + ViewDimension = viewDimension; + switch (viewDimension) + { + case D3D11_RTV_DIMENSION_BUFFER: + Buffer.FirstElement = mipSlice; + Buffer.NumElements = firstArraySlice; + break; + case D3D11_RTV_DIMENSION_TEXTURE1D: + Texture1D.MipSlice = mipSlice; + break; + case D3D11_RTV_DIMENSION_TEXTURE1DARRAY: + Texture1DArray.MipSlice = mipSlice; + Texture1DArray.FirstArraySlice = firstArraySlice; + Texture1DArray.ArraySize = arraySize; + break; + case D3D11_RTV_DIMENSION_TEXTURE2D: + Texture2D.MipSlice = mipSlice; + Texture2D.PlaneSlice = planeSlice; + break; + case D3D11_RTV_DIMENSION_TEXTURE2DARRAY: + Texture2DArray.MipSlice = mipSlice; + Texture2DArray.FirstArraySlice = firstArraySlice; + Texture2DArray.ArraySize = arraySize; + Texture2DArray.PlaneSlice = planeSlice; + break; + case D3D11_RTV_DIMENSION_TEXTURE2DMS: + break; + case D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY: + Texture2DMSArray.FirstArraySlice = firstArraySlice; + Texture2DMSArray.ArraySize = arraySize; + break; + case D3D11_RTV_DIMENSION_TEXTURE3D: + Texture3D.MipSlice = mipSlice; + Texture3D.FirstWSlice = firstArraySlice; + Texture3D.WSize = arraySize; + break; + default: break; + } + } + explicit CD3D11_RENDER_TARGET_VIEW_DESC1( + _In_ ID3D11Buffer*, + DXGI_FORMAT format, + UINT firstElement, + UINT numElements ) + { + Format = format; + ViewDimension = D3D11_RTV_DIMENSION_BUFFER; + Buffer.FirstElement = firstElement; + Buffer.NumElements = numElements; + } + explicit CD3D11_RENDER_TARGET_VIEW_DESC1( + _In_ ID3D11Texture1D* pTex1D, + D3D11_RTV_DIMENSION viewDimension, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mipSlice = 0, + UINT firstArraySlice = 0, + UINT arraySize = -1 ) + { + ViewDimension = viewDimension; + if (DXGI_FORMAT_UNKNOWN == format || + (-1 == arraySize && D3D11_RTV_DIMENSION_TEXTURE1DARRAY == viewDimension)) + { + D3D11_TEXTURE1D_DESC TexDesc; + pTex1D->GetDesc( &TexDesc ); + if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format; + if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlice; + } + Format = format; + switch (viewDimension) + { + case D3D11_RTV_DIMENSION_TEXTURE1D: + Texture1D.MipSlice = mipSlice; + break; + case D3D11_RTV_DIMENSION_TEXTURE1DARRAY: + Texture1DArray.MipSlice = mipSlice; + Texture1DArray.FirstArraySlice = firstArraySlice; + Texture1DArray.ArraySize = arraySize; + break; + default: break; + } + } + explicit CD3D11_RENDER_TARGET_VIEW_DESC1( + _In_ ID3D11Texture2D* pTex2D, + D3D11_RTV_DIMENSION viewDimension, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mipSlice = 0, + UINT firstArraySlice = 0, + UINT arraySize = -1, + UINT planeSlice = 0 ) + { + ViewDimension = viewDimension; + if (DXGI_FORMAT_UNKNOWN == format || + (-1 == arraySize && + (D3D11_RTV_DIMENSION_TEXTURE2DARRAY == viewDimension || + D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY == viewDimension))) + { + D3D11_TEXTURE2D_DESC TexDesc; + pTex2D->GetDesc( &TexDesc ); + if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format; + if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlice; + } + Format = format; + switch (viewDimension) + { + case D3D11_RTV_DIMENSION_TEXTURE2D: + Texture2D.MipSlice = mipSlice; + Texture2D.PlaneSlice = planeSlice; + break; + case D3D11_RTV_DIMENSION_TEXTURE2DARRAY: + Texture2DArray.MipSlice = mipSlice; + Texture2DArray.FirstArraySlice = firstArraySlice; + Texture2DArray.ArraySize = arraySize; + Texture2DArray.PlaneSlice = planeSlice; + break; + case D3D11_RTV_DIMENSION_TEXTURE2DMS: + break; + case D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY: + Texture2DMSArray.FirstArraySlice = firstArraySlice; + Texture2DMSArray.ArraySize = arraySize; + break; + default: break; + } + } + explicit CD3D11_RENDER_TARGET_VIEW_DESC1( + _In_ ID3D11Texture3D* pTex3D, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mipSlice = 0, + UINT firstWSlice = 0, + UINT wSize = -1 ) + { + ViewDimension = D3D11_RTV_DIMENSION_TEXTURE3D; + if (DXGI_FORMAT_UNKNOWN == format || -1 == wSize) + { + D3D11_TEXTURE3D_DESC TexDesc; + pTex3D->GetDesc( &TexDesc ); + if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format; + if (-1 == wSize) wSize = TexDesc.Depth - firstWSlice; + } + Format = format; + Texture3D.MipSlice = mipSlice; + Texture3D.FirstWSlice = firstWSlice; + Texture3D.WSize = wSize; + } + ~CD3D11_RENDER_TARGET_VIEW_DESC1() {} + operator const D3D11_RENDER_TARGET_VIEW_DESC1&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0004_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0004_v0_0_s_ifspec; + +#ifndef __ID3D11RenderTargetView1_INTERFACE_DEFINED__ +#define __ID3D11RenderTargetView1_INTERFACE_DEFINED__ + +/* interface ID3D11RenderTargetView1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11RenderTargetView1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("ffbe2e23-f011-418a-ac56-5ceed7c5b94b") + ID3D11RenderTargetView1 : public ID3D11RenderTargetView + { + public: + virtual void STDMETHODCALLTYPE GetDesc1( + /* [annotation] */ + _Out_ D3D11_RENDER_TARGET_VIEW_DESC1 *pDesc1) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11RenderTargetView1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11RenderTargetView1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11RenderTargetView1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11RenderTargetView1 * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11RenderTargetView1 * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11RenderTargetView1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11RenderTargetView1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11RenderTargetView1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetResource )( + ID3D11RenderTargetView1 * This, + /* [annotation] */ + _Outptr_ ID3D11Resource **ppResource); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11RenderTargetView1 * This, + /* [annotation] */ + _Out_ D3D11_RENDER_TARGET_VIEW_DESC *pDesc); + + void ( STDMETHODCALLTYPE *GetDesc1 )( + ID3D11RenderTargetView1 * This, + /* [annotation] */ + _Out_ D3D11_RENDER_TARGET_VIEW_DESC1 *pDesc1); + + END_INTERFACE + } ID3D11RenderTargetView1Vtbl; + + interface ID3D11RenderTargetView1 + { + CONST_VTBL struct ID3D11RenderTargetView1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11RenderTargetView1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11RenderTargetView1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11RenderTargetView1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11RenderTargetView1_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11RenderTargetView1_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11RenderTargetView1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11RenderTargetView1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11RenderTargetView1_GetResource(This,ppResource) \ + ( (This)->lpVtbl -> GetResource(This,ppResource) ) + + +#define ID3D11RenderTargetView1_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + + +#define ID3D11RenderTargetView1_GetDesc1(This,pDesc1) \ + ( (This)->lpVtbl -> GetDesc1(This,pDesc1) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11RenderTargetView1_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_3_0000_0005 */ +/* [local] */ + +typedef struct D3D11_TEX2D_UAV1 + { + UINT MipSlice; + UINT PlaneSlice; + } D3D11_TEX2D_UAV1; + +typedef struct D3D11_TEX2D_ARRAY_UAV1 + { + UINT MipSlice; + UINT FirstArraySlice; + UINT ArraySize; + UINT PlaneSlice; + } D3D11_TEX2D_ARRAY_UAV1; + +typedef struct D3D11_UNORDERED_ACCESS_VIEW_DESC1 + { + DXGI_FORMAT Format; + D3D11_UAV_DIMENSION ViewDimension; + union + { + D3D11_BUFFER_UAV Buffer; + D3D11_TEX1D_UAV Texture1D; + D3D11_TEX1D_ARRAY_UAV Texture1DArray; + D3D11_TEX2D_UAV1 Texture2D; + D3D11_TEX2D_ARRAY_UAV1 Texture2DArray; + D3D11_TEX3D_UAV Texture3D; + } ; + } D3D11_UNORDERED_ACCESS_VIEW_DESC1; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_UNORDERED_ACCESS_VIEW_DESC1 : public D3D11_UNORDERED_ACCESS_VIEW_DESC1 +{ + CD3D11_UNORDERED_ACCESS_VIEW_DESC1() + {} + explicit CD3D11_UNORDERED_ACCESS_VIEW_DESC1( const D3D11_UNORDERED_ACCESS_VIEW_DESC1& o ) : + D3D11_UNORDERED_ACCESS_VIEW_DESC1( o ) + {} + explicit CD3D11_UNORDERED_ACCESS_VIEW_DESC1( + D3D11_UAV_DIMENSION viewDimension, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mipSlice = 0, // FirstElement for BUFFER + UINT firstArraySlice = 0, // NumElements for BUFFER, FirstWSlice for TEXTURE3D + UINT arraySize = -1, // WSize for TEXTURE3D + UINT flags = 0, // BUFFER only + UINT planeSlice = 0 ) // PlaneSlice for TEXTURE2D and TEXTURE2DARRAY + { + Format = format; + ViewDimension = viewDimension; + switch (viewDimension) + { + case D3D11_UAV_DIMENSION_BUFFER: + Buffer.FirstElement = mipSlice; + Buffer.NumElements = firstArraySlice; + Buffer.Flags = flags; + break; + case D3D11_UAV_DIMENSION_TEXTURE1D: + Texture1D.MipSlice = mipSlice; + break; + case D3D11_UAV_DIMENSION_TEXTURE1DARRAY: + Texture1DArray.MipSlice = mipSlice; + Texture1DArray.FirstArraySlice = firstArraySlice; + Texture1DArray.ArraySize = arraySize; + break; + case D3D11_UAV_DIMENSION_TEXTURE2D: + Texture2D.MipSlice = mipSlice; + Texture2D.PlaneSlice = planeSlice; + break; + case D3D11_UAV_DIMENSION_TEXTURE2DARRAY: + Texture2DArray.MipSlice = mipSlice; + Texture2DArray.FirstArraySlice = firstArraySlice; + Texture2DArray.ArraySize = arraySize; + Texture2DArray.PlaneSlice = planeSlice; + break; + case D3D11_UAV_DIMENSION_TEXTURE3D: + Texture3D.MipSlice = mipSlice; + Texture3D.FirstWSlice = firstArraySlice; + Texture3D.WSize = arraySize; + break; + default: break; + } + } + explicit CD3D11_UNORDERED_ACCESS_VIEW_DESC1( + _In_ ID3D11Buffer*, + DXGI_FORMAT format, + UINT firstElement, + UINT numElements, + UINT flags = 0 ) + { + Format = format; + ViewDimension = D3D11_UAV_DIMENSION_BUFFER; + Buffer.FirstElement = firstElement; + Buffer.NumElements = numElements; + Buffer.Flags = flags; + } + explicit CD3D11_UNORDERED_ACCESS_VIEW_DESC1( + _In_ ID3D11Texture1D* pTex1D, + D3D11_UAV_DIMENSION viewDimension, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mipSlice = 0, + UINT firstArraySlice = 0, + UINT arraySize = -1 ) + { + ViewDimension = viewDimension; + if (DXGI_FORMAT_UNKNOWN == format || + (-1 == arraySize && D3D11_UAV_DIMENSION_TEXTURE1DARRAY == viewDimension)) + { + D3D11_TEXTURE1D_DESC TexDesc; + pTex1D->GetDesc( &TexDesc ); + if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format; + if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlice; + } + Format = format; + switch (viewDimension) + { + case D3D11_UAV_DIMENSION_TEXTURE1D: + Texture1D.MipSlice = mipSlice; + break; + case D3D11_UAV_DIMENSION_TEXTURE1DARRAY: + Texture1DArray.MipSlice = mipSlice; + Texture1DArray.FirstArraySlice = firstArraySlice; + Texture1DArray.ArraySize = arraySize; + break; + default: break; + } + } + explicit CD3D11_UNORDERED_ACCESS_VIEW_DESC1( + _In_ ID3D11Texture2D* pTex2D, + D3D11_UAV_DIMENSION viewDimension, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mipSlice = 0, + UINT firstArraySlice = 0, + UINT arraySize = -1, + UINT planeSlice = 0 ) + { + ViewDimension = viewDimension; + if (DXGI_FORMAT_UNKNOWN == format || + (-1 == arraySize && D3D11_UAV_DIMENSION_TEXTURE2DARRAY == viewDimension)) + { + D3D11_TEXTURE2D_DESC TexDesc; + pTex2D->GetDesc( &TexDesc ); + if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format; + if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlice; + } + Format = format; + switch (viewDimension) + { + case D3D11_UAV_DIMENSION_TEXTURE2D: + Texture2D.MipSlice = mipSlice; + Texture2D.PlaneSlice = planeSlice; + break; + case D3D11_UAV_DIMENSION_TEXTURE2DARRAY: + Texture2DArray.MipSlice = mipSlice; + Texture2DArray.FirstArraySlice = firstArraySlice; + Texture2DArray.ArraySize = arraySize; + Texture2DArray.PlaneSlice = planeSlice; + break; + default: break; + } + } + explicit CD3D11_UNORDERED_ACCESS_VIEW_DESC1( + _In_ ID3D11Texture3D* pTex3D, + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, + UINT mipSlice = 0, + UINT firstWSlice = 0, + UINT wSize = -1 ) + { + ViewDimension = D3D11_UAV_DIMENSION_TEXTURE3D; + if (DXGI_FORMAT_UNKNOWN == format || -1 == wSize) + { + D3D11_TEXTURE3D_DESC TexDesc; + pTex3D->GetDesc( &TexDesc ); + if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format; + if (-1 == wSize) wSize = TexDesc.Depth - firstWSlice; + } + Format = format; + Texture3D.MipSlice = mipSlice; + Texture3D.FirstWSlice = firstWSlice; + Texture3D.WSize = wSize; + } + ~CD3D11_UNORDERED_ACCESS_VIEW_DESC1() {} + operator const D3D11_UNORDERED_ACCESS_VIEW_DESC1&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0005_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0005_v0_0_s_ifspec; + +#ifndef __ID3D11UnorderedAccessView1_INTERFACE_DEFINED__ +#define __ID3D11UnorderedAccessView1_INTERFACE_DEFINED__ + +/* interface ID3D11UnorderedAccessView1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11UnorderedAccessView1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("7b3b6153-a886-4544-ab37-6537c8500403") + ID3D11UnorderedAccessView1 : public ID3D11UnorderedAccessView + { + public: + virtual void STDMETHODCALLTYPE GetDesc1( + /* [annotation] */ + _Out_ D3D11_UNORDERED_ACCESS_VIEW_DESC1 *pDesc1) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11UnorderedAccessView1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11UnorderedAccessView1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11UnorderedAccessView1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11UnorderedAccessView1 * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11UnorderedAccessView1 * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11UnorderedAccessView1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11UnorderedAccessView1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11UnorderedAccessView1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *GetResource )( + ID3D11UnorderedAccessView1 * This, + /* [annotation] */ + _Outptr_ ID3D11Resource **ppResource); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11UnorderedAccessView1 * This, + /* [annotation] */ + _Out_ D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc); + + void ( STDMETHODCALLTYPE *GetDesc1 )( + ID3D11UnorderedAccessView1 * This, + /* [annotation] */ + _Out_ D3D11_UNORDERED_ACCESS_VIEW_DESC1 *pDesc1); + + END_INTERFACE + } ID3D11UnorderedAccessView1Vtbl; + + interface ID3D11UnorderedAccessView1 + { + CONST_VTBL struct ID3D11UnorderedAccessView1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11UnorderedAccessView1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11UnorderedAccessView1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11UnorderedAccessView1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11UnorderedAccessView1_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11UnorderedAccessView1_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11UnorderedAccessView1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11UnorderedAccessView1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11UnorderedAccessView1_GetResource(This,ppResource) \ + ( (This)->lpVtbl -> GetResource(This,ppResource) ) + + +#define ID3D11UnorderedAccessView1_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + + +#define ID3D11UnorderedAccessView1_GetDesc1(This,pDesc1) \ + ( (This)->lpVtbl -> GetDesc1(This,pDesc1) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11UnorderedAccessView1_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_3_0000_0006 */ +/* [local] */ + +typedef struct D3D11_QUERY_DESC1 + { + D3D11_QUERY Query; + UINT MiscFlags; + D3D11_CONTEXT_TYPE ContextType; + } D3D11_QUERY_DESC1; + +#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus ) +} +struct CD3D11_QUERY_DESC1 : public D3D11_QUERY_DESC1 +{ + CD3D11_QUERY_DESC1() + {} + explicit CD3D11_QUERY_DESC1( const D3D11_QUERY_DESC1& o ) : + D3D11_QUERY_DESC1( o ) + {} + explicit CD3D11_QUERY_DESC1( + D3D11_QUERY query, + UINT miscFlags = 0, + D3D11_CONTEXT_TYPE contextType = D3D11_CONTEXT_TYPE_ALL ) + { + Query = query; + MiscFlags = miscFlags; + ContextType = contextType; + } + ~CD3D11_QUERY_DESC1() {} + operator const D3D11_QUERY_DESC1&() const { return *this; } +}; +extern "C"{ +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0006_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0006_v0_0_s_ifspec; + +#ifndef __ID3D11Query1_INTERFACE_DEFINED__ +#define __ID3D11Query1_INTERFACE_DEFINED__ + +/* interface ID3D11Query1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11Query1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("631b4766-36dc-461d-8db6-c47e13e60916") + ID3D11Query1 : public ID3D11Query + { + public: + virtual void STDMETHODCALLTYPE GetDesc1( + /* [annotation] */ + _Out_ D3D11_QUERY_DESC1 *pDesc1) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11Query1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11Query1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11Query1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11Query1 * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11Query1 * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11Query1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11Query1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11Query1 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + UINT ( STDMETHODCALLTYPE *GetDataSize )( + ID3D11Query1 * This); + + void ( STDMETHODCALLTYPE *GetDesc )( + ID3D11Query1 * This, + /* [annotation] */ + _Out_ D3D11_QUERY_DESC *pDesc); + + void ( STDMETHODCALLTYPE *GetDesc1 )( + ID3D11Query1 * This, + /* [annotation] */ + _Out_ D3D11_QUERY_DESC1 *pDesc1); + + END_INTERFACE + } ID3D11Query1Vtbl; + + interface ID3D11Query1 + { + CONST_VTBL struct ID3D11Query1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11Query1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11Query1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11Query1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11Query1_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11Query1_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11Query1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11Query1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11Query1_GetDataSize(This) \ + ( (This)->lpVtbl -> GetDataSize(This) ) + + +#define ID3D11Query1_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + + +#define ID3D11Query1_GetDesc1(This,pDesc1) \ + ( (This)->lpVtbl -> GetDesc1(This,pDesc1) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11Query1_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_3_0000_0007 */ +/* [local] */ + +typedef +enum D3D11_FENCE_FLAG + { + D3D11_FENCE_FLAG_NONE = 0x1, + D3D11_FENCE_FLAG_SHARED = 0x2, + D3D11_FENCE_FLAG_SHARED_CROSS_ADAPTER = 0x4 + } D3D11_FENCE_FLAG; + +DEFINE_ENUM_FLAG_OPERATORS(D3D11_FENCE_FLAG); + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0007_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0007_v0_0_s_ifspec; + +#ifndef __ID3D11DeviceContext3_INTERFACE_DEFINED__ +#define __ID3D11DeviceContext3_INTERFACE_DEFINED__ + +/* interface ID3D11DeviceContext3 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11DeviceContext3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("b4e3c01d-e79e-4637-91b2-510e9f4c9b8f") + ID3D11DeviceContext3 : public ID3D11DeviceContext2 + { + public: + virtual void STDMETHODCALLTYPE Flush1( + D3D11_CONTEXT_TYPE ContextType, + /* [annotation] */ + _In_opt_ HANDLE hEvent) = 0; + + virtual void STDMETHODCALLTYPE SetHardwareProtectionState( + /* [annotation] */ + _In_ BOOL HwProtectionEnable) = 0; + + virtual void STDMETHODCALLTYPE GetHardwareProtectionState( + /* [annotation] */ + _Out_ BOOL *pHwProtectionEnable) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11DeviceContext3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11DeviceContext3 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11DeviceContext3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11DeviceContext3 * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *VSSetConstantBuffers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *PSSetShaderResources )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *PSSetShader )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_opt_ ID3D11PixelShader *pPixelShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *PSSetSamplers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *VSSetShader )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_opt_ ID3D11VertexShader *pVertexShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *DrawIndexed )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ UINT IndexCount, + /* [annotation] */ + _In_ UINT StartIndexLocation, + /* [annotation] */ + _In_ INT BaseVertexLocation); + + void ( STDMETHODCALLTYPE *Draw )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ UINT VertexCount, + /* [annotation] */ + _In_ UINT StartVertexLocation); + + HRESULT ( STDMETHODCALLTYPE *Map )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_ UINT Subresource, + /* [annotation] */ + _In_ D3D11_MAP MapType, + /* [annotation] */ + _In_ UINT MapFlags, + /* [annotation] */ + _Out_opt_ D3D11_MAPPED_SUBRESOURCE *pMappedResource); + + void ( STDMETHODCALLTYPE *Unmap )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_ UINT Subresource); + + void ( STDMETHODCALLTYPE *PSSetConstantBuffers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *IASetInputLayout )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_opt_ ID3D11InputLayout *pInputLayout); + + void ( STDMETHODCALLTYPE *IASetVertexBuffers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppVertexBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pStrides, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pOffsets); + + void ( STDMETHODCALLTYPE *IASetIndexBuffer )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_opt_ ID3D11Buffer *pIndexBuffer, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT Offset); + + void ( STDMETHODCALLTYPE *DrawIndexedInstanced )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ UINT IndexCountPerInstance, + /* [annotation] */ + _In_ UINT InstanceCount, + /* [annotation] */ + _In_ UINT StartIndexLocation, + /* [annotation] */ + _In_ INT BaseVertexLocation, + /* [annotation] */ + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *DrawInstanced )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ UINT VertexCountPerInstance, + /* [annotation] */ + _In_ UINT InstanceCount, + /* [annotation] */ + _In_ UINT StartVertexLocation, + /* [annotation] */ + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *GSSetConstantBuffers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *GSSetShader )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_opt_ ID3D11GeometryShader *pShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *IASetPrimitiveTopology )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ D3D11_PRIMITIVE_TOPOLOGY Topology); + + void ( STDMETHODCALLTYPE *VSSetShaderResources )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *VSSetSamplers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *Begin )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Asynchronous *pAsync); + + void ( STDMETHODCALLTYPE *End )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Asynchronous *pAsync); + + HRESULT ( STDMETHODCALLTYPE *GetData )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Asynchronous *pAsync, + /* [annotation] */ + _Out_writes_bytes_opt_( DataSize ) void *pData, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_ UINT GetDataFlags); + + void ( STDMETHODCALLTYPE *SetPredication )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_opt_ ID3D11Predicate *pPredicate, + /* [annotation] */ + _In_ BOOL PredicateValue); + + void ( STDMETHODCALLTYPE *GSSetShaderResources )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *GSSetSamplers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *OMSetRenderTargets )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11RenderTargetView *const *ppRenderTargetViews, + /* [annotation] */ + _In_opt_ ID3D11DepthStencilView *pDepthStencilView); + + void ( STDMETHODCALLTYPE *OMSetRenderTargetsAndUnorderedAccessViews )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ UINT NumRTVs, + /* [annotation] */ + _In_reads_opt_(NumRTVs) ID3D11RenderTargetView *const *ppRenderTargetViews, + /* [annotation] */ + _In_opt_ ID3D11DepthStencilView *pDepthStencilView, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - 1 ) UINT UAVStartSlot, + /* [annotation] */ + _In_ UINT NumUAVs, + /* [annotation] */ + _In_reads_opt_(NumUAVs) ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, + /* [annotation] */ + _In_reads_opt_(NumUAVs) const UINT *pUAVInitialCounts); + + void ( STDMETHODCALLTYPE *OMSetBlendState )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_opt_ ID3D11BlendState *pBlendState, + /* [annotation] */ + _In_opt_ const FLOAT BlendFactor[ 4 ], + /* [annotation] */ + _In_ UINT SampleMask); + + void ( STDMETHODCALLTYPE *OMSetDepthStencilState )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_opt_ ID3D11DepthStencilState *pDepthStencilState, + /* [annotation] */ + _In_ UINT StencilRef); + + void ( STDMETHODCALLTYPE *SOSetTargets )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_SO_BUFFER_SLOT_COUNT) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppSOTargets, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pOffsets); + + void ( STDMETHODCALLTYPE *DrawAuto )( + ID3D11DeviceContext3 * This); + + void ( STDMETHODCALLTYPE *DrawIndexedInstancedIndirect )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Buffer *pBufferForArgs, + /* [annotation] */ + _In_ UINT AlignedByteOffsetForArgs); + + void ( STDMETHODCALLTYPE *DrawInstancedIndirect )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Buffer *pBufferForArgs, + /* [annotation] */ + _In_ UINT AlignedByteOffsetForArgs); + + void ( STDMETHODCALLTYPE *Dispatch )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ UINT ThreadGroupCountX, + /* [annotation] */ + _In_ UINT ThreadGroupCountY, + /* [annotation] */ + _In_ UINT ThreadGroupCountZ); + + void ( STDMETHODCALLTYPE *DispatchIndirect )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Buffer *pBufferForArgs, + /* [annotation] */ + _In_ UINT AlignedByteOffsetForArgs); + + void ( STDMETHODCALLTYPE *RSSetState )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_opt_ ID3D11RasterizerState *pRasterizerState); + + void ( STDMETHODCALLTYPE *RSSetViewports )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumViewports, + /* [annotation] */ + _In_reads_opt_(NumViewports) const D3D11_VIEWPORT *pViewports); + + void ( STDMETHODCALLTYPE *RSSetScissorRects )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumRects, + /* [annotation] */ + _In_reads_opt_(NumRects) const D3D11_RECT *pRects); + + void ( STDMETHODCALLTYPE *CopySubresourceRegion )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ UINT DstX, + /* [annotation] */ + _In_ UINT DstY, + /* [annotation] */ + _In_ UINT DstZ, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pSrcBox); + + void ( STDMETHODCALLTYPE *CopyResource )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource); + + void ( STDMETHODCALLTYPE *UpdateSubresource )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pDstBox, + /* [annotation] */ + _In_ const void *pSrcData, + /* [annotation] */ + _In_ UINT SrcRowPitch, + /* [annotation] */ + _In_ UINT SrcDepthPitch); + + void ( STDMETHODCALLTYPE *CopyStructureCount )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Buffer *pDstBuffer, + /* [annotation] */ + _In_ UINT DstAlignedByteOffset, + /* [annotation] */ + _In_ ID3D11UnorderedAccessView *pSrcView); + + void ( STDMETHODCALLTYPE *ClearRenderTargetView )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11RenderTargetView *pRenderTargetView, + /* [annotation] */ + _In_ const FLOAT ColorRGBA[ 4 ]); + + void ( STDMETHODCALLTYPE *ClearUnorderedAccessViewUint )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11UnorderedAccessView *pUnorderedAccessView, + /* [annotation] */ + _In_ const UINT Values[ 4 ]); + + void ( STDMETHODCALLTYPE *ClearUnorderedAccessViewFloat )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11UnorderedAccessView *pUnorderedAccessView, + /* [annotation] */ + _In_ const FLOAT Values[ 4 ]); + + void ( STDMETHODCALLTYPE *ClearDepthStencilView )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11DepthStencilView *pDepthStencilView, + /* [annotation] */ + _In_ UINT ClearFlags, + /* [annotation] */ + _In_ FLOAT Depth, + /* [annotation] */ + _In_ UINT8 Stencil); + + void ( STDMETHODCALLTYPE *GenerateMips )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11ShaderResourceView *pShaderResourceView); + + void ( STDMETHODCALLTYPE *SetResourceMinLOD )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + FLOAT MinLOD); + + FLOAT ( STDMETHODCALLTYPE *GetResourceMinLOD )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource); + + void ( STDMETHODCALLTYPE *ResolveSubresource )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_ DXGI_FORMAT Format); + + void ( STDMETHODCALLTYPE *ExecuteCommandList )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11CommandList *pCommandList, + BOOL RestoreContextState); + + void ( STDMETHODCALLTYPE *HSSetShaderResources )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *HSSetShader )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_opt_ ID3D11HullShader *pHullShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *HSSetSamplers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *HSSetConstantBuffers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *DSSetShaderResources )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *DSSetShader )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_opt_ ID3D11DomainShader *pDomainShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *DSSetSamplers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *DSSetConstantBuffers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *CSSetShaderResources )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *CSSetUnorderedAccessViews )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - StartSlot ) UINT NumUAVs, + /* [annotation] */ + _In_reads_opt_(NumUAVs) ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, + /* [annotation] */ + _In_reads_opt_(NumUAVs) const UINT *pUAVInitialCounts); + + void ( STDMETHODCALLTYPE *CSSetShader )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_opt_ ID3D11ComputeShader *pComputeShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *CSSetSamplers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *CSSetConstantBuffers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *VSGetConstantBuffers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *PSGetShaderResources )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *PSGetShader )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11PixelShader **ppPixelShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *PSGetSamplers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *VSGetShader )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11VertexShader **ppVertexShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *PSGetConstantBuffers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *IAGetInputLayout )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11InputLayout **ppInputLayout); + + void ( STDMETHODCALLTYPE *IAGetVertexBuffers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppVertexBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pStrides, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pOffsets); + + void ( STDMETHODCALLTYPE *IAGetIndexBuffer )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11Buffer **pIndexBuffer, + /* [annotation] */ + _Out_opt_ DXGI_FORMAT *Format, + /* [annotation] */ + _Out_opt_ UINT *Offset); + + void ( STDMETHODCALLTYPE *GSGetConstantBuffers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *GSGetShader )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11GeometryShader **ppGeometryShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *IAGetPrimitiveTopology )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _Out_ D3D11_PRIMITIVE_TOPOLOGY *pTopology); + + void ( STDMETHODCALLTYPE *VSGetShaderResources )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *VSGetSamplers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *GetPredication )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11Predicate **ppPredicate, + /* [annotation] */ + _Out_opt_ BOOL *pPredicateValue); + + void ( STDMETHODCALLTYPE *GSGetShaderResources )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *GSGetSamplers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *OMGetRenderTargets )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11RenderTargetView **ppRenderTargetViews, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11DepthStencilView **ppDepthStencilView); + + void ( STDMETHODCALLTYPE *OMGetRenderTargetsAndUnorderedAccessViews )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumRTVs, + /* [annotation] */ + _Out_writes_opt_(NumRTVs) ID3D11RenderTargetView **ppRenderTargetViews, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11DepthStencilView **ppDepthStencilView, + /* [annotation] */ + _In_range_( 0, D3D11_PS_CS_UAV_REGISTER_COUNT - 1 ) UINT UAVStartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_PS_CS_UAV_REGISTER_COUNT - UAVStartSlot ) UINT NumUAVs, + /* [annotation] */ + _Out_writes_opt_(NumUAVs) ID3D11UnorderedAccessView **ppUnorderedAccessViews); + + void ( STDMETHODCALLTYPE *OMGetBlendState )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11BlendState **ppBlendState, + /* [annotation] */ + _Out_opt_ FLOAT BlendFactor[ 4 ], + /* [annotation] */ + _Out_opt_ UINT *pSampleMask); + + void ( STDMETHODCALLTYPE *OMGetDepthStencilState )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11DepthStencilState **ppDepthStencilState, + /* [annotation] */ + _Out_opt_ UINT *pStencilRef); + + void ( STDMETHODCALLTYPE *SOGetTargets )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_SO_BUFFER_SLOT_COUNT ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppSOTargets); + + void ( STDMETHODCALLTYPE *RSGetState )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11RasterizerState **ppRasterizerState); + + void ( STDMETHODCALLTYPE *RSGetViewports )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _Inout_ /*_range(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE )*/ UINT *pNumViewports, + /* [annotation] */ + _Out_writes_opt_(*pNumViewports) D3D11_VIEWPORT *pViewports); + + void ( STDMETHODCALLTYPE *RSGetScissorRects )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _Inout_ /*_range(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE )*/ UINT *pNumRects, + /* [annotation] */ + _Out_writes_opt_(*pNumRects) D3D11_RECT *pRects); + + void ( STDMETHODCALLTYPE *HSGetShaderResources )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *HSGetShader )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11HullShader **ppHullShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *HSGetSamplers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *HSGetConstantBuffers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *DSGetShaderResources )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *DSGetShader )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11DomainShader **ppDomainShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *DSGetSamplers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *DSGetConstantBuffers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *CSGetShaderResources )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *CSGetUnorderedAccessViews )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - StartSlot ) UINT NumUAVs, + /* [annotation] */ + _Out_writes_opt_(NumUAVs) ID3D11UnorderedAccessView **ppUnorderedAccessViews); + + void ( STDMETHODCALLTYPE *CSGetShader )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11ComputeShader **ppComputeShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *CSGetSamplers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *CSGetConstantBuffers )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *ClearState )( + ID3D11DeviceContext3 * This); + + void ( STDMETHODCALLTYPE *Flush )( + ID3D11DeviceContext3 * This); + + D3D11_DEVICE_CONTEXT_TYPE ( STDMETHODCALLTYPE *GetType )( + ID3D11DeviceContext3 * This); + + UINT ( STDMETHODCALLTYPE *GetContextFlags )( + ID3D11DeviceContext3 * This); + + HRESULT ( STDMETHODCALLTYPE *FinishCommandList )( + ID3D11DeviceContext3 * This, + BOOL RestoreDeferredContextState, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11CommandList **ppCommandList); + + void ( STDMETHODCALLTYPE *CopySubresourceRegion1 )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ UINT DstX, + /* [annotation] */ + _In_ UINT DstY, + /* [annotation] */ + _In_ UINT DstZ, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pSrcBox, + /* [annotation] */ + _In_ UINT CopyFlags); + + void ( STDMETHODCALLTYPE *UpdateSubresource1 )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pDstBox, + /* [annotation] */ + _In_ const void *pSrcData, + /* [annotation] */ + _In_ UINT SrcRowPitch, + /* [annotation] */ + _In_ UINT SrcDepthPitch, + /* [annotation] */ + _In_ UINT CopyFlags); + + void ( STDMETHODCALLTYPE *DiscardResource )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource); + + void ( STDMETHODCALLTYPE *DiscardView )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11View *pResourceView); + + void ( STDMETHODCALLTYPE *VSSetConstantBuffers1 )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *HSSetConstantBuffers1 )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *DSSetConstantBuffers1 )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *GSSetConstantBuffers1 )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *PSSetConstantBuffers1 )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *CSSetConstantBuffers1 )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *VSGetConstantBuffers1 )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *HSGetConstantBuffers1 )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *DSGetConstantBuffers1 )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *GSGetConstantBuffers1 )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *PSGetConstantBuffers1 )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *CSGetConstantBuffers1 )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *SwapDeviceContextState )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3DDeviceContextState *pState, + /* [annotation] */ + _Outptr_opt_ ID3DDeviceContextState **ppPreviousState); + + void ( STDMETHODCALLTYPE *ClearView )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11View *pView, + /* [annotation] */ + _In_ const FLOAT Color[ 4 ], + /* [annotation] */ + _In_reads_opt_(NumRects) const D3D11_RECT *pRect, + UINT NumRects); + + void ( STDMETHODCALLTYPE *DiscardView1 )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11View *pResourceView, + /* [annotation] */ + _In_reads_opt_(NumRects) const D3D11_RECT *pRects, + UINT NumRects); + + HRESULT ( STDMETHODCALLTYPE *UpdateTileMappings )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pTiledResource, + /* [annotation] */ + _In_ UINT NumTiledResourceRegions, + /* [annotation] */ + _In_reads_opt_(NumTiledResourceRegions) const D3D11_TILED_RESOURCE_COORDINATE *pTiledResourceRegionStartCoordinates, + /* [annotation] */ + _In_reads_opt_(NumTiledResourceRegions) const D3D11_TILE_REGION_SIZE *pTiledResourceRegionSizes, + /* [annotation] */ + _In_opt_ ID3D11Buffer *pTilePool, + /* [annotation] */ + _In_ UINT NumRanges, + /* [annotation] */ + _In_reads_opt_(NumRanges) const UINT *pRangeFlags, + /* [annotation] */ + _In_reads_opt_(NumRanges) const UINT *pTilePoolStartOffsets, + /* [annotation] */ + _In_reads_opt_(NumRanges) const UINT *pRangeTileCounts, + /* [annotation] */ + _In_ UINT Flags); + + HRESULT ( STDMETHODCALLTYPE *CopyTileMappings )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDestTiledResource, + /* [annotation] */ + _In_ const D3D11_TILED_RESOURCE_COORDINATE *pDestRegionStartCoordinate, + /* [annotation] */ + _In_ ID3D11Resource *pSourceTiledResource, + /* [annotation] */ + _In_ const D3D11_TILED_RESOURCE_COORDINATE *pSourceRegionStartCoordinate, + /* [annotation] */ + _In_ const D3D11_TILE_REGION_SIZE *pTileRegionSize, + /* [annotation] */ + _In_ UINT Flags); + + void ( STDMETHODCALLTYPE *CopyTiles )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pTiledResource, + /* [annotation] */ + _In_ const D3D11_TILED_RESOURCE_COORDINATE *pTileRegionStartCoordinate, + /* [annotation] */ + _In_ const D3D11_TILE_REGION_SIZE *pTileRegionSize, + /* [annotation] */ + _In_ ID3D11Buffer *pBuffer, + /* [annotation] */ + _In_ UINT64 BufferStartOffsetInBytes, + /* [annotation] */ + _In_ UINT Flags); + + void ( STDMETHODCALLTYPE *UpdateTiles )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDestTiledResource, + /* [annotation] */ + _In_ const D3D11_TILED_RESOURCE_COORDINATE *pDestTileRegionStartCoordinate, + /* [annotation] */ + _In_ const D3D11_TILE_REGION_SIZE *pDestTileRegionSize, + /* [annotation] */ + _In_ const void *pSourceTileData, + /* [annotation] */ + _In_ UINT Flags); + + HRESULT ( STDMETHODCALLTYPE *ResizeTilePool )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ ID3D11Buffer *pTilePool, + /* [annotation] */ + _In_ UINT64 NewSizeInBytes); + + void ( STDMETHODCALLTYPE *TiledResourceBarrier )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_opt_ ID3D11DeviceChild *pTiledResourceOrViewAccessBeforeBarrier, + /* [annotation] */ + _In_opt_ ID3D11DeviceChild *pTiledResourceOrViewAccessAfterBarrier); + + BOOL ( STDMETHODCALLTYPE *IsAnnotationEnabled )( + ID3D11DeviceContext3 * This); + + void ( STDMETHODCALLTYPE *SetMarkerInt )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ LPCWSTR pLabel, + INT Data); + + void ( STDMETHODCALLTYPE *BeginEventInt )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ LPCWSTR pLabel, + INT Data); + + void ( STDMETHODCALLTYPE *EndEvent )( + ID3D11DeviceContext3 * This); + + void ( STDMETHODCALLTYPE *Flush1 )( + ID3D11DeviceContext3 * This, + D3D11_CONTEXT_TYPE ContextType, + /* [annotation] */ + _In_opt_ HANDLE hEvent); + + void ( STDMETHODCALLTYPE *SetHardwareProtectionState )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _In_ BOOL HwProtectionEnable); + + void ( STDMETHODCALLTYPE *GetHardwareProtectionState )( + ID3D11DeviceContext3 * This, + /* [annotation] */ + _Out_ BOOL *pHwProtectionEnable); + + END_INTERFACE + } ID3D11DeviceContext3Vtbl; + + interface ID3D11DeviceContext3 + { + CONST_VTBL struct ID3D11DeviceContext3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11DeviceContext3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11DeviceContext3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11DeviceContext3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11DeviceContext3_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11DeviceContext3_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11DeviceContext3_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11DeviceContext3_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11DeviceContext3_VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext3_PSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> PSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext3_PSSetShader(This,pPixelShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> PSSetShader(This,pPixelShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext3_PSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> PSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext3_VSSetShader(This,pVertexShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> VSSetShader(This,pVertexShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext3_DrawIndexed(This,IndexCount,StartIndexLocation,BaseVertexLocation) \ + ( (This)->lpVtbl -> DrawIndexed(This,IndexCount,StartIndexLocation,BaseVertexLocation) ) + +#define ID3D11DeviceContext3_Draw(This,VertexCount,StartVertexLocation) \ + ( (This)->lpVtbl -> Draw(This,VertexCount,StartVertexLocation) ) + +#define ID3D11DeviceContext3_Map(This,pResource,Subresource,MapType,MapFlags,pMappedResource) \ + ( (This)->lpVtbl -> Map(This,pResource,Subresource,MapType,MapFlags,pMappedResource) ) + +#define ID3D11DeviceContext3_Unmap(This,pResource,Subresource) \ + ( (This)->lpVtbl -> Unmap(This,pResource,Subresource) ) + +#define ID3D11DeviceContext3_PSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> PSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext3_IASetInputLayout(This,pInputLayout) \ + ( (This)->lpVtbl -> IASetInputLayout(This,pInputLayout) ) + +#define ID3D11DeviceContext3_IASetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) \ + ( (This)->lpVtbl -> IASetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) ) + +#define ID3D11DeviceContext3_IASetIndexBuffer(This,pIndexBuffer,Format,Offset) \ + ( (This)->lpVtbl -> IASetIndexBuffer(This,pIndexBuffer,Format,Offset) ) + +#define ID3D11DeviceContext3_DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) ) + +#define ID3D11DeviceContext3_DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) ) + +#define ID3D11DeviceContext3_GSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> GSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext3_GSSetShader(This,pShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> GSSetShader(This,pShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext3_IASetPrimitiveTopology(This,Topology) \ + ( (This)->lpVtbl -> IASetPrimitiveTopology(This,Topology) ) + +#define ID3D11DeviceContext3_VSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> VSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext3_VSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> VSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext3_Begin(This,pAsync) \ + ( (This)->lpVtbl -> Begin(This,pAsync) ) + +#define ID3D11DeviceContext3_End(This,pAsync) \ + ( (This)->lpVtbl -> End(This,pAsync) ) + +#define ID3D11DeviceContext3_GetData(This,pAsync,pData,DataSize,GetDataFlags) \ + ( (This)->lpVtbl -> GetData(This,pAsync,pData,DataSize,GetDataFlags) ) + +#define ID3D11DeviceContext3_SetPredication(This,pPredicate,PredicateValue) \ + ( (This)->lpVtbl -> SetPredication(This,pPredicate,PredicateValue) ) + +#define ID3D11DeviceContext3_GSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> GSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext3_GSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> GSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext3_OMSetRenderTargets(This,NumViews,ppRenderTargetViews,pDepthStencilView) \ + ( (This)->lpVtbl -> OMSetRenderTargets(This,NumViews,ppRenderTargetViews,pDepthStencilView) ) + +#define ID3D11DeviceContext3_OMSetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,pDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) \ + ( (This)->lpVtbl -> OMSetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,pDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) ) + +#define ID3D11DeviceContext3_OMSetBlendState(This,pBlendState,BlendFactor,SampleMask) \ + ( (This)->lpVtbl -> OMSetBlendState(This,pBlendState,BlendFactor,SampleMask) ) + +#define ID3D11DeviceContext3_OMSetDepthStencilState(This,pDepthStencilState,StencilRef) \ + ( (This)->lpVtbl -> OMSetDepthStencilState(This,pDepthStencilState,StencilRef) ) + +#define ID3D11DeviceContext3_SOSetTargets(This,NumBuffers,ppSOTargets,pOffsets) \ + ( (This)->lpVtbl -> SOSetTargets(This,NumBuffers,ppSOTargets,pOffsets) ) + +#define ID3D11DeviceContext3_DrawAuto(This) \ + ( (This)->lpVtbl -> DrawAuto(This) ) + +#define ID3D11DeviceContext3_DrawIndexedInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) \ + ( (This)->lpVtbl -> DrawIndexedInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) ) + +#define ID3D11DeviceContext3_DrawInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) \ + ( (This)->lpVtbl -> DrawInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) ) + +#define ID3D11DeviceContext3_Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) \ + ( (This)->lpVtbl -> Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) ) + +#define ID3D11DeviceContext3_DispatchIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) \ + ( (This)->lpVtbl -> DispatchIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) ) + +#define ID3D11DeviceContext3_RSSetState(This,pRasterizerState) \ + ( (This)->lpVtbl -> RSSetState(This,pRasterizerState) ) + +#define ID3D11DeviceContext3_RSSetViewports(This,NumViewports,pViewports) \ + ( (This)->lpVtbl -> RSSetViewports(This,NumViewports,pViewports) ) + +#define ID3D11DeviceContext3_RSSetScissorRects(This,NumRects,pRects) \ + ( (This)->lpVtbl -> RSSetScissorRects(This,NumRects,pRects) ) + +#define ID3D11DeviceContext3_CopySubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox) \ + ( (This)->lpVtbl -> CopySubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox) ) + +#define ID3D11DeviceContext3_CopyResource(This,pDstResource,pSrcResource) \ + ( (This)->lpVtbl -> CopyResource(This,pDstResource,pSrcResource) ) + +#define ID3D11DeviceContext3_UpdateSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) \ + ( (This)->lpVtbl -> UpdateSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) ) + +#define ID3D11DeviceContext3_CopyStructureCount(This,pDstBuffer,DstAlignedByteOffset,pSrcView) \ + ( (This)->lpVtbl -> CopyStructureCount(This,pDstBuffer,DstAlignedByteOffset,pSrcView) ) + +#define ID3D11DeviceContext3_ClearRenderTargetView(This,pRenderTargetView,ColorRGBA) \ + ( (This)->lpVtbl -> ClearRenderTargetView(This,pRenderTargetView,ColorRGBA) ) + +#define ID3D11DeviceContext3_ClearUnorderedAccessViewUint(This,pUnorderedAccessView,Values) \ + ( (This)->lpVtbl -> ClearUnorderedAccessViewUint(This,pUnorderedAccessView,Values) ) + +#define ID3D11DeviceContext3_ClearUnorderedAccessViewFloat(This,pUnorderedAccessView,Values) \ + ( (This)->lpVtbl -> ClearUnorderedAccessViewFloat(This,pUnorderedAccessView,Values) ) + +#define ID3D11DeviceContext3_ClearDepthStencilView(This,pDepthStencilView,ClearFlags,Depth,Stencil) \ + ( (This)->lpVtbl -> ClearDepthStencilView(This,pDepthStencilView,ClearFlags,Depth,Stencil) ) + +#define ID3D11DeviceContext3_GenerateMips(This,pShaderResourceView) \ + ( (This)->lpVtbl -> GenerateMips(This,pShaderResourceView) ) + +#define ID3D11DeviceContext3_SetResourceMinLOD(This,pResource,MinLOD) \ + ( (This)->lpVtbl -> SetResourceMinLOD(This,pResource,MinLOD) ) + +#define ID3D11DeviceContext3_GetResourceMinLOD(This,pResource) \ + ( (This)->lpVtbl -> GetResourceMinLOD(This,pResource) ) + +#define ID3D11DeviceContext3_ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) \ + ( (This)->lpVtbl -> ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) ) + +#define ID3D11DeviceContext3_ExecuteCommandList(This,pCommandList,RestoreContextState) \ + ( (This)->lpVtbl -> ExecuteCommandList(This,pCommandList,RestoreContextState) ) + +#define ID3D11DeviceContext3_HSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> HSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext3_HSSetShader(This,pHullShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> HSSetShader(This,pHullShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext3_HSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> HSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext3_HSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> HSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext3_DSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> DSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext3_DSSetShader(This,pDomainShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> DSSetShader(This,pDomainShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext3_DSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> DSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext3_DSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> DSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext3_CSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> CSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext3_CSSetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) \ + ( (This)->lpVtbl -> CSSetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) ) + +#define ID3D11DeviceContext3_CSSetShader(This,pComputeShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> CSSetShader(This,pComputeShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext3_CSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> CSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext3_CSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> CSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext3_VSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> VSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext3_PSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> PSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext3_PSGetShader(This,ppPixelShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> PSGetShader(This,ppPixelShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext3_PSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> PSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext3_VSGetShader(This,ppVertexShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> VSGetShader(This,ppVertexShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext3_PSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> PSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext3_IAGetInputLayout(This,ppInputLayout) \ + ( (This)->lpVtbl -> IAGetInputLayout(This,ppInputLayout) ) + +#define ID3D11DeviceContext3_IAGetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) \ + ( (This)->lpVtbl -> IAGetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) ) + +#define ID3D11DeviceContext3_IAGetIndexBuffer(This,pIndexBuffer,Format,Offset) \ + ( (This)->lpVtbl -> IAGetIndexBuffer(This,pIndexBuffer,Format,Offset) ) + +#define ID3D11DeviceContext3_GSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> GSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext3_GSGetShader(This,ppGeometryShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> GSGetShader(This,ppGeometryShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext3_IAGetPrimitiveTopology(This,pTopology) \ + ( (This)->lpVtbl -> IAGetPrimitiveTopology(This,pTopology) ) + +#define ID3D11DeviceContext3_VSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> VSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext3_VSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> VSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext3_GetPredication(This,ppPredicate,pPredicateValue) \ + ( (This)->lpVtbl -> GetPredication(This,ppPredicate,pPredicateValue) ) + +#define ID3D11DeviceContext3_GSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> GSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext3_GSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> GSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext3_OMGetRenderTargets(This,NumViews,ppRenderTargetViews,ppDepthStencilView) \ + ( (This)->lpVtbl -> OMGetRenderTargets(This,NumViews,ppRenderTargetViews,ppDepthStencilView) ) + +#define ID3D11DeviceContext3_OMGetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,ppDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews) \ + ( (This)->lpVtbl -> OMGetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,ppDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews) ) + +#define ID3D11DeviceContext3_OMGetBlendState(This,ppBlendState,BlendFactor,pSampleMask) \ + ( (This)->lpVtbl -> OMGetBlendState(This,ppBlendState,BlendFactor,pSampleMask) ) + +#define ID3D11DeviceContext3_OMGetDepthStencilState(This,ppDepthStencilState,pStencilRef) \ + ( (This)->lpVtbl -> OMGetDepthStencilState(This,ppDepthStencilState,pStencilRef) ) + +#define ID3D11DeviceContext3_SOGetTargets(This,NumBuffers,ppSOTargets) \ + ( (This)->lpVtbl -> SOGetTargets(This,NumBuffers,ppSOTargets) ) + +#define ID3D11DeviceContext3_RSGetState(This,ppRasterizerState) \ + ( (This)->lpVtbl -> RSGetState(This,ppRasterizerState) ) + +#define ID3D11DeviceContext3_RSGetViewports(This,pNumViewports,pViewports) \ + ( (This)->lpVtbl -> RSGetViewports(This,pNumViewports,pViewports) ) + +#define ID3D11DeviceContext3_RSGetScissorRects(This,pNumRects,pRects) \ + ( (This)->lpVtbl -> RSGetScissorRects(This,pNumRects,pRects) ) + +#define ID3D11DeviceContext3_HSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> HSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext3_HSGetShader(This,ppHullShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> HSGetShader(This,ppHullShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext3_HSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> HSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext3_HSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> HSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext3_DSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> DSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext3_DSGetShader(This,ppDomainShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> DSGetShader(This,ppDomainShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext3_DSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> DSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext3_DSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> DSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext3_CSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> CSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext3_CSGetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews) \ + ( (This)->lpVtbl -> CSGetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews) ) + +#define ID3D11DeviceContext3_CSGetShader(This,ppComputeShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> CSGetShader(This,ppComputeShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext3_CSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> CSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext3_CSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> CSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext3_ClearState(This) \ + ( (This)->lpVtbl -> ClearState(This) ) + +#define ID3D11DeviceContext3_Flush(This) \ + ( (This)->lpVtbl -> Flush(This) ) + +#define ID3D11DeviceContext3_GetType(This) \ + ( (This)->lpVtbl -> GetType(This) ) + +#define ID3D11DeviceContext3_GetContextFlags(This) \ + ( (This)->lpVtbl -> GetContextFlags(This) ) + +#define ID3D11DeviceContext3_FinishCommandList(This,RestoreDeferredContextState,ppCommandList) \ + ( (This)->lpVtbl -> FinishCommandList(This,RestoreDeferredContextState,ppCommandList) ) + + +#define ID3D11DeviceContext3_CopySubresourceRegion1(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox,CopyFlags) \ + ( (This)->lpVtbl -> CopySubresourceRegion1(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox,CopyFlags) ) + +#define ID3D11DeviceContext3_UpdateSubresource1(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch,CopyFlags) \ + ( (This)->lpVtbl -> UpdateSubresource1(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch,CopyFlags) ) + +#define ID3D11DeviceContext3_DiscardResource(This,pResource) \ + ( (This)->lpVtbl -> DiscardResource(This,pResource) ) + +#define ID3D11DeviceContext3_DiscardView(This,pResourceView) \ + ( (This)->lpVtbl -> DiscardView(This,pResourceView) ) + +#define ID3D11DeviceContext3_VSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> VSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext3_HSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> HSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext3_DSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> DSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext3_GSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> GSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext3_PSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> PSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext3_CSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> CSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext3_VSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> VSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext3_HSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> HSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext3_DSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> DSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext3_GSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> GSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext3_PSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> PSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext3_CSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> CSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext3_SwapDeviceContextState(This,pState,ppPreviousState) \ + ( (This)->lpVtbl -> SwapDeviceContextState(This,pState,ppPreviousState) ) + +#define ID3D11DeviceContext3_ClearView(This,pView,Color,pRect,NumRects) \ + ( (This)->lpVtbl -> ClearView(This,pView,Color,pRect,NumRects) ) + +#define ID3D11DeviceContext3_DiscardView1(This,pResourceView,pRects,NumRects) \ + ( (This)->lpVtbl -> DiscardView1(This,pResourceView,pRects,NumRects) ) + + +#define ID3D11DeviceContext3_UpdateTileMappings(This,pTiledResource,NumTiledResourceRegions,pTiledResourceRegionStartCoordinates,pTiledResourceRegionSizes,pTilePool,NumRanges,pRangeFlags,pTilePoolStartOffsets,pRangeTileCounts,Flags) \ + ( (This)->lpVtbl -> UpdateTileMappings(This,pTiledResource,NumTiledResourceRegions,pTiledResourceRegionStartCoordinates,pTiledResourceRegionSizes,pTilePool,NumRanges,pRangeFlags,pTilePoolStartOffsets,pRangeTileCounts,Flags) ) + +#define ID3D11DeviceContext3_CopyTileMappings(This,pDestTiledResource,pDestRegionStartCoordinate,pSourceTiledResource,pSourceRegionStartCoordinate,pTileRegionSize,Flags) \ + ( (This)->lpVtbl -> CopyTileMappings(This,pDestTiledResource,pDestRegionStartCoordinate,pSourceTiledResource,pSourceRegionStartCoordinate,pTileRegionSize,Flags) ) + +#define ID3D11DeviceContext3_CopyTiles(This,pTiledResource,pTileRegionStartCoordinate,pTileRegionSize,pBuffer,BufferStartOffsetInBytes,Flags) \ + ( (This)->lpVtbl -> CopyTiles(This,pTiledResource,pTileRegionStartCoordinate,pTileRegionSize,pBuffer,BufferStartOffsetInBytes,Flags) ) + +#define ID3D11DeviceContext3_UpdateTiles(This,pDestTiledResource,pDestTileRegionStartCoordinate,pDestTileRegionSize,pSourceTileData,Flags) \ + ( (This)->lpVtbl -> UpdateTiles(This,pDestTiledResource,pDestTileRegionStartCoordinate,pDestTileRegionSize,pSourceTileData,Flags) ) + +#define ID3D11DeviceContext3_ResizeTilePool(This,pTilePool,NewSizeInBytes) \ + ( (This)->lpVtbl -> ResizeTilePool(This,pTilePool,NewSizeInBytes) ) + +#define ID3D11DeviceContext3_TiledResourceBarrier(This,pTiledResourceOrViewAccessBeforeBarrier,pTiledResourceOrViewAccessAfterBarrier) \ + ( (This)->lpVtbl -> TiledResourceBarrier(This,pTiledResourceOrViewAccessBeforeBarrier,pTiledResourceOrViewAccessAfterBarrier) ) + +#define ID3D11DeviceContext3_IsAnnotationEnabled(This) \ + ( (This)->lpVtbl -> IsAnnotationEnabled(This) ) + +#define ID3D11DeviceContext3_SetMarkerInt(This,pLabel,Data) \ + ( (This)->lpVtbl -> SetMarkerInt(This,pLabel,Data) ) + +#define ID3D11DeviceContext3_BeginEventInt(This,pLabel,Data) \ + ( (This)->lpVtbl -> BeginEventInt(This,pLabel,Data) ) + +#define ID3D11DeviceContext3_EndEvent(This) \ + ( (This)->lpVtbl -> EndEvent(This) ) + + +#define ID3D11DeviceContext3_Flush1(This,ContextType,hEvent) \ + ( (This)->lpVtbl -> Flush1(This,ContextType,hEvent) ) + +#define ID3D11DeviceContext3_SetHardwareProtectionState(This,HwProtectionEnable) \ + ( (This)->lpVtbl -> SetHardwareProtectionState(This,HwProtectionEnable) ) + +#define ID3D11DeviceContext3_GetHardwareProtectionState(This,pHwProtectionEnable) \ + ( (This)->lpVtbl -> GetHardwareProtectionState(This,pHwProtectionEnable) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11DeviceContext3_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11Fence_INTERFACE_DEFINED__ +#define __ID3D11Fence_INTERFACE_DEFINED__ + +/* interface ID3D11Fence */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11Fence; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("affde9d1-1df7-4bb7-8a34-0f46251dab80") + ID3D11Fence : public ID3D11DeviceChild + { + public: + virtual HRESULT STDMETHODCALLTYPE CreateSharedHandle( + /* [annotation] */ + _In_opt_ const SECURITY_ATTRIBUTES *pAttributes, + /* [annotation] */ + _In_ DWORD dwAccess, + /* [annotation] */ + _In_opt_ LPCWSTR lpName, + /* [annotation] */ + _Out_ HANDLE *pHandle) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetCompletedValue( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetEventOnCompletion( + /* [annotation] */ + _In_ UINT64 Value, + /* [annotation] */ + _In_ HANDLE hEvent) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11FenceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11Fence * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11Fence * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11Fence * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11Fence * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11Fence * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11Fence * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11Fence * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *CreateSharedHandle )( + ID3D11Fence * This, + /* [annotation] */ + _In_opt_ const SECURITY_ATTRIBUTES *pAttributes, + /* [annotation] */ + _In_ DWORD dwAccess, + /* [annotation] */ + _In_opt_ LPCWSTR lpName, + /* [annotation] */ + _Out_ HANDLE *pHandle); + + UINT64 ( STDMETHODCALLTYPE *GetCompletedValue )( + ID3D11Fence * This); + + HRESULT ( STDMETHODCALLTYPE *SetEventOnCompletion )( + ID3D11Fence * This, + /* [annotation] */ + _In_ UINT64 Value, + /* [annotation] */ + _In_ HANDLE hEvent); + + END_INTERFACE + } ID3D11FenceVtbl; + + interface ID3D11Fence + { + CONST_VTBL struct ID3D11FenceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11Fence_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11Fence_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11Fence_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11Fence_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11Fence_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11Fence_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11Fence_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11Fence_CreateSharedHandle(This,pAttributes,dwAccess,lpName,pHandle) \ + ( (This)->lpVtbl -> CreateSharedHandle(This,pAttributes,dwAccess,lpName,pHandle) ) + +#define ID3D11Fence_GetCompletedValue(This) \ + ( (This)->lpVtbl -> GetCompletedValue(This) ) + +#define ID3D11Fence_SetEventOnCompletion(This,Value,hEvent) \ + ( (This)->lpVtbl -> SetEventOnCompletion(This,Value,hEvent) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11Fence_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11DeviceContext4_INTERFACE_DEFINED__ +#define __ID3D11DeviceContext4_INTERFACE_DEFINED__ + +/* interface ID3D11DeviceContext4 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11DeviceContext4; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("917600da-f58c-4c33-98d8-3e15b390fa24") + ID3D11DeviceContext4 : public ID3D11DeviceContext3 + { + public: + virtual HRESULT STDMETHODCALLTYPE Signal( + /* [annotation] */ + _In_ ID3D11Fence *pFence, + /* [annotation] */ + _In_ UINT64 Value) = 0; + + virtual HRESULT STDMETHODCALLTYPE Wait( + /* [annotation] */ + _In_ ID3D11Fence *pFence, + /* [annotation] */ + _In_ UINT64 Value) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11DeviceContext4Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11DeviceContext4 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11DeviceContext4 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11DeviceContext4 * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + void ( STDMETHODCALLTYPE *VSSetConstantBuffers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *PSSetShaderResources )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *PSSetShader )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_opt_ ID3D11PixelShader *pPixelShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *PSSetSamplers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *VSSetShader )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_opt_ ID3D11VertexShader *pVertexShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *DrawIndexed )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ UINT IndexCount, + /* [annotation] */ + _In_ UINT StartIndexLocation, + /* [annotation] */ + _In_ INT BaseVertexLocation); + + void ( STDMETHODCALLTYPE *Draw )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ UINT VertexCount, + /* [annotation] */ + _In_ UINT StartVertexLocation); + + HRESULT ( STDMETHODCALLTYPE *Map )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_ UINT Subresource, + /* [annotation] */ + _In_ D3D11_MAP MapType, + /* [annotation] */ + _In_ UINT MapFlags, + /* [annotation] */ + _Out_opt_ D3D11_MAPPED_SUBRESOURCE *pMappedResource); + + void ( STDMETHODCALLTYPE *Unmap )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_ UINT Subresource); + + void ( STDMETHODCALLTYPE *PSSetConstantBuffers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *IASetInputLayout )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_opt_ ID3D11InputLayout *pInputLayout); + + void ( STDMETHODCALLTYPE *IASetVertexBuffers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppVertexBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pStrides, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pOffsets); + + void ( STDMETHODCALLTYPE *IASetIndexBuffer )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_opt_ ID3D11Buffer *pIndexBuffer, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT Offset); + + void ( STDMETHODCALLTYPE *DrawIndexedInstanced )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ UINT IndexCountPerInstance, + /* [annotation] */ + _In_ UINT InstanceCount, + /* [annotation] */ + _In_ UINT StartIndexLocation, + /* [annotation] */ + _In_ INT BaseVertexLocation, + /* [annotation] */ + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *DrawInstanced )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ UINT VertexCountPerInstance, + /* [annotation] */ + _In_ UINT InstanceCount, + /* [annotation] */ + _In_ UINT StartVertexLocation, + /* [annotation] */ + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *GSSetConstantBuffers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *GSSetShader )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_opt_ ID3D11GeometryShader *pShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *IASetPrimitiveTopology )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ D3D11_PRIMITIVE_TOPOLOGY Topology); + + void ( STDMETHODCALLTYPE *VSSetShaderResources )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *VSSetSamplers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *Begin )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Asynchronous *pAsync); + + void ( STDMETHODCALLTYPE *End )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Asynchronous *pAsync); + + HRESULT ( STDMETHODCALLTYPE *GetData )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Asynchronous *pAsync, + /* [annotation] */ + _Out_writes_bytes_opt_( DataSize ) void *pData, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_ UINT GetDataFlags); + + void ( STDMETHODCALLTYPE *SetPredication )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_opt_ ID3D11Predicate *pPredicate, + /* [annotation] */ + _In_ BOOL PredicateValue); + + void ( STDMETHODCALLTYPE *GSSetShaderResources )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *GSSetSamplers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *OMSetRenderTargets )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11RenderTargetView *const *ppRenderTargetViews, + /* [annotation] */ + _In_opt_ ID3D11DepthStencilView *pDepthStencilView); + + void ( STDMETHODCALLTYPE *OMSetRenderTargetsAndUnorderedAccessViews )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ UINT NumRTVs, + /* [annotation] */ + _In_reads_opt_(NumRTVs) ID3D11RenderTargetView *const *ppRenderTargetViews, + /* [annotation] */ + _In_opt_ ID3D11DepthStencilView *pDepthStencilView, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - 1 ) UINT UAVStartSlot, + /* [annotation] */ + _In_ UINT NumUAVs, + /* [annotation] */ + _In_reads_opt_(NumUAVs) ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, + /* [annotation] */ + _In_reads_opt_(NumUAVs) const UINT *pUAVInitialCounts); + + void ( STDMETHODCALLTYPE *OMSetBlendState )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_opt_ ID3D11BlendState *pBlendState, + /* [annotation] */ + _In_opt_ const FLOAT BlendFactor[ 4 ], + /* [annotation] */ + _In_ UINT SampleMask); + + void ( STDMETHODCALLTYPE *OMSetDepthStencilState )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_opt_ ID3D11DepthStencilState *pDepthStencilState, + /* [annotation] */ + _In_ UINT StencilRef); + + void ( STDMETHODCALLTYPE *SOSetTargets )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_SO_BUFFER_SLOT_COUNT) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppSOTargets, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pOffsets); + + void ( STDMETHODCALLTYPE *DrawAuto )( + ID3D11DeviceContext4 * This); + + void ( STDMETHODCALLTYPE *DrawIndexedInstancedIndirect )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Buffer *pBufferForArgs, + /* [annotation] */ + _In_ UINT AlignedByteOffsetForArgs); + + void ( STDMETHODCALLTYPE *DrawInstancedIndirect )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Buffer *pBufferForArgs, + /* [annotation] */ + _In_ UINT AlignedByteOffsetForArgs); + + void ( STDMETHODCALLTYPE *Dispatch )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ UINT ThreadGroupCountX, + /* [annotation] */ + _In_ UINT ThreadGroupCountY, + /* [annotation] */ + _In_ UINT ThreadGroupCountZ); + + void ( STDMETHODCALLTYPE *DispatchIndirect )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Buffer *pBufferForArgs, + /* [annotation] */ + _In_ UINT AlignedByteOffsetForArgs); + + void ( STDMETHODCALLTYPE *RSSetState )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_opt_ ID3D11RasterizerState *pRasterizerState); + + void ( STDMETHODCALLTYPE *RSSetViewports )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumViewports, + /* [annotation] */ + _In_reads_opt_(NumViewports) const D3D11_VIEWPORT *pViewports); + + void ( STDMETHODCALLTYPE *RSSetScissorRects )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumRects, + /* [annotation] */ + _In_reads_opt_(NumRects) const D3D11_RECT *pRects); + + void ( STDMETHODCALLTYPE *CopySubresourceRegion )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ UINT DstX, + /* [annotation] */ + _In_ UINT DstY, + /* [annotation] */ + _In_ UINT DstZ, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pSrcBox); + + void ( STDMETHODCALLTYPE *CopyResource )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource); + + void ( STDMETHODCALLTYPE *UpdateSubresource )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pDstBox, + /* [annotation] */ + _In_ const void *pSrcData, + /* [annotation] */ + _In_ UINT SrcRowPitch, + /* [annotation] */ + _In_ UINT SrcDepthPitch); + + void ( STDMETHODCALLTYPE *CopyStructureCount )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Buffer *pDstBuffer, + /* [annotation] */ + _In_ UINT DstAlignedByteOffset, + /* [annotation] */ + _In_ ID3D11UnorderedAccessView *pSrcView); + + void ( STDMETHODCALLTYPE *ClearRenderTargetView )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11RenderTargetView *pRenderTargetView, + /* [annotation] */ + _In_ const FLOAT ColorRGBA[ 4 ]); + + void ( STDMETHODCALLTYPE *ClearUnorderedAccessViewUint )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11UnorderedAccessView *pUnorderedAccessView, + /* [annotation] */ + _In_ const UINT Values[ 4 ]); + + void ( STDMETHODCALLTYPE *ClearUnorderedAccessViewFloat )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11UnorderedAccessView *pUnorderedAccessView, + /* [annotation] */ + _In_ const FLOAT Values[ 4 ]); + + void ( STDMETHODCALLTYPE *ClearDepthStencilView )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11DepthStencilView *pDepthStencilView, + /* [annotation] */ + _In_ UINT ClearFlags, + /* [annotation] */ + _In_ FLOAT Depth, + /* [annotation] */ + _In_ UINT8 Stencil); + + void ( STDMETHODCALLTYPE *GenerateMips )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11ShaderResourceView *pShaderResourceView); + + void ( STDMETHODCALLTYPE *SetResourceMinLOD )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + FLOAT MinLOD); + + FLOAT ( STDMETHODCALLTYPE *GetResourceMinLOD )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource); + + void ( STDMETHODCALLTYPE *ResolveSubresource )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_ DXGI_FORMAT Format); + + void ( STDMETHODCALLTYPE *ExecuteCommandList )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11CommandList *pCommandList, + BOOL RestoreContextState); + + void ( STDMETHODCALLTYPE *HSSetShaderResources )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *HSSetShader )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_opt_ ID3D11HullShader *pHullShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *HSSetSamplers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *HSSetConstantBuffers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *DSSetShaderResources )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *DSSetShader )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_opt_ ID3D11DomainShader *pDomainShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *DSSetSamplers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *DSSetConstantBuffers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *CSSetShaderResources )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _In_reads_opt_(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *CSSetUnorderedAccessViews )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - StartSlot ) UINT NumUAVs, + /* [annotation] */ + _In_reads_opt_(NumUAVs) ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, + /* [annotation] */ + _In_reads_opt_(NumUAVs) const UINT *pUAVInitialCounts); + + void ( STDMETHODCALLTYPE *CSSetShader )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_opt_ ID3D11ComputeShader *pComputeShader, + /* [annotation] */ + _In_reads_opt_(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, + UINT NumClassInstances); + + void ( STDMETHODCALLTYPE *CSSetSamplers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _In_reads_opt_(NumSamplers) ID3D11SamplerState *const *ppSamplers); + + void ( STDMETHODCALLTYPE *CSSetConstantBuffers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers); + + void ( STDMETHODCALLTYPE *VSGetConstantBuffers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *PSGetShaderResources )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *PSGetShader )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11PixelShader **ppPixelShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *PSGetSamplers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *VSGetShader )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11VertexShader **ppVertexShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *PSGetConstantBuffers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *IAGetInputLayout )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11InputLayout **ppInputLayout); + + void ( STDMETHODCALLTYPE *IAGetVertexBuffers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppVertexBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pStrides, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pOffsets); + + void ( STDMETHODCALLTYPE *IAGetIndexBuffer )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11Buffer **pIndexBuffer, + /* [annotation] */ + _Out_opt_ DXGI_FORMAT *Format, + /* [annotation] */ + _Out_opt_ UINT *Offset); + + void ( STDMETHODCALLTYPE *GSGetConstantBuffers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *GSGetShader )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11GeometryShader **ppGeometryShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *IAGetPrimitiveTopology )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _Out_ D3D11_PRIMITIVE_TOPOLOGY *pTopology); + + void ( STDMETHODCALLTYPE *VSGetShaderResources )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *VSGetSamplers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *GetPredication )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11Predicate **ppPredicate, + /* [annotation] */ + _Out_opt_ BOOL *pPredicateValue); + + void ( STDMETHODCALLTYPE *GSGetShaderResources )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *GSGetSamplers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *OMGetRenderTargets )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11RenderTargetView **ppRenderTargetViews, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11DepthStencilView **ppDepthStencilView); + + void ( STDMETHODCALLTYPE *OMGetRenderTargetsAndUnorderedAccessViews )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT ) UINT NumRTVs, + /* [annotation] */ + _Out_writes_opt_(NumRTVs) ID3D11RenderTargetView **ppRenderTargetViews, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11DepthStencilView **ppDepthStencilView, + /* [annotation] */ + _In_range_( 0, D3D11_PS_CS_UAV_REGISTER_COUNT - 1 ) UINT UAVStartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_PS_CS_UAV_REGISTER_COUNT - UAVStartSlot ) UINT NumUAVs, + /* [annotation] */ + _Out_writes_opt_(NumUAVs) ID3D11UnorderedAccessView **ppUnorderedAccessViews); + + void ( STDMETHODCALLTYPE *OMGetBlendState )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11BlendState **ppBlendState, + /* [annotation] */ + _Out_opt_ FLOAT BlendFactor[ 4 ], + /* [annotation] */ + _Out_opt_ UINT *pSampleMask); + + void ( STDMETHODCALLTYPE *OMGetDepthStencilState )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _Outptr_opt_result_maybenull_ ID3D11DepthStencilState **ppDepthStencilState, + /* [annotation] */ + _Out_opt_ UINT *pStencilRef); + + void ( STDMETHODCALLTYPE *SOGetTargets )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_SO_BUFFER_SLOT_COUNT ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppSOTargets); + + void ( STDMETHODCALLTYPE *RSGetState )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11RasterizerState **ppRasterizerState); + + void ( STDMETHODCALLTYPE *RSGetViewports )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _Inout_ /*_range(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE )*/ UINT *pNumViewports, + /* [annotation] */ + _Out_writes_opt_(*pNumViewports) D3D11_VIEWPORT *pViewports); + + void ( STDMETHODCALLTYPE *RSGetScissorRects )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _Inout_ /*_range(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE )*/ UINT *pNumRects, + /* [annotation] */ + _Out_writes_opt_(*pNumRects) D3D11_RECT *pRects); + + void ( STDMETHODCALLTYPE *HSGetShaderResources )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *HSGetShader )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11HullShader **ppHullShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *HSGetSamplers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *HSGetConstantBuffers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *DSGetShaderResources )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *DSGetShader )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11DomainShader **ppDomainShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *DSGetSamplers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *DSGetConstantBuffers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *CSGetShaderResources )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot ) UINT NumViews, + /* [annotation] */ + _Out_writes_opt_(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews); + + void ( STDMETHODCALLTYPE *CSGetUnorderedAccessViews )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_1_UAV_SLOT_COUNT - StartSlot ) UINT NumUAVs, + /* [annotation] */ + _Out_writes_opt_(NumUAVs) ID3D11UnorderedAccessView **ppUnorderedAccessViews); + + void ( STDMETHODCALLTYPE *CSGetShader )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _Outptr_result_maybenull_ ID3D11ComputeShader **ppComputeShader, + /* [annotation] */ + _Out_writes_opt_(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, + /* [annotation] */ + _Inout_opt_ UINT *pNumClassInstances); + + void ( STDMETHODCALLTYPE *CSGetSamplers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot ) UINT NumSamplers, + /* [annotation] */ + _Out_writes_opt_(NumSamplers) ID3D11SamplerState **ppSamplers); + + void ( STDMETHODCALLTYPE *CSGetConstantBuffers )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers); + + void ( STDMETHODCALLTYPE *ClearState )( + ID3D11DeviceContext4 * This); + + void ( STDMETHODCALLTYPE *Flush )( + ID3D11DeviceContext4 * This); + + D3D11_DEVICE_CONTEXT_TYPE ( STDMETHODCALLTYPE *GetType )( + ID3D11DeviceContext4 * This); + + UINT ( STDMETHODCALLTYPE *GetContextFlags )( + ID3D11DeviceContext4 * This); + + HRESULT ( STDMETHODCALLTYPE *FinishCommandList )( + ID3D11DeviceContext4 * This, + BOOL RestoreDeferredContextState, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11CommandList **ppCommandList); + + void ( STDMETHODCALLTYPE *CopySubresourceRegion1 )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_ UINT DstX, + /* [annotation] */ + _In_ UINT DstY, + /* [annotation] */ + _In_ UINT DstZ, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pSrcBox, + /* [annotation] */ + _In_ UINT CopyFlags); + + void ( STDMETHODCALLTYPE *UpdateSubresource1 )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pDstBox, + /* [annotation] */ + _In_ const void *pSrcData, + /* [annotation] */ + _In_ UINT SrcRowPitch, + /* [annotation] */ + _In_ UINT SrcDepthPitch, + /* [annotation] */ + _In_ UINT CopyFlags); + + void ( STDMETHODCALLTYPE *DiscardResource )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource); + + void ( STDMETHODCALLTYPE *DiscardView )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11View *pResourceView); + + void ( STDMETHODCALLTYPE *VSSetConstantBuffers1 )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *HSSetConstantBuffers1 )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *DSSetConstantBuffers1 )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *GSSetConstantBuffers1 )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *PSSetConstantBuffers1 )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *CSSetConstantBuffers1 )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) ID3D11Buffer *const *ppConstantBuffers, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pFirstConstant, + /* [annotation] */ + _In_reads_opt_(NumBuffers) const UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *VSGetConstantBuffers1 )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *HSGetConstantBuffers1 )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *DSGetConstantBuffers1 )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *GSGetConstantBuffers1 )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *PSGetConstantBuffers1 )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *CSGetConstantBuffers1 )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1 ) UINT StartSlot, + /* [annotation] */ + _In_range_( 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot ) UINT NumBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) ID3D11Buffer **ppConstantBuffers, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pFirstConstant, + /* [annotation] */ + _Out_writes_opt_(NumBuffers) UINT *pNumConstants); + + void ( STDMETHODCALLTYPE *SwapDeviceContextState )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3DDeviceContextState *pState, + /* [annotation] */ + _Outptr_opt_ ID3DDeviceContextState **ppPreviousState); + + void ( STDMETHODCALLTYPE *ClearView )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11View *pView, + /* [annotation] */ + _In_ const FLOAT Color[ 4 ], + /* [annotation] */ + _In_reads_opt_(NumRects) const D3D11_RECT *pRect, + UINT NumRects); + + void ( STDMETHODCALLTYPE *DiscardView1 )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11View *pResourceView, + /* [annotation] */ + _In_reads_opt_(NumRects) const D3D11_RECT *pRects, + UINT NumRects); + + HRESULT ( STDMETHODCALLTYPE *UpdateTileMappings )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pTiledResource, + /* [annotation] */ + _In_ UINT NumTiledResourceRegions, + /* [annotation] */ + _In_reads_opt_(NumTiledResourceRegions) const D3D11_TILED_RESOURCE_COORDINATE *pTiledResourceRegionStartCoordinates, + /* [annotation] */ + _In_reads_opt_(NumTiledResourceRegions) const D3D11_TILE_REGION_SIZE *pTiledResourceRegionSizes, + /* [annotation] */ + _In_opt_ ID3D11Buffer *pTilePool, + /* [annotation] */ + _In_ UINT NumRanges, + /* [annotation] */ + _In_reads_opt_(NumRanges) const UINT *pRangeFlags, + /* [annotation] */ + _In_reads_opt_(NumRanges) const UINT *pTilePoolStartOffsets, + /* [annotation] */ + _In_reads_opt_(NumRanges) const UINT *pRangeTileCounts, + /* [annotation] */ + _In_ UINT Flags); + + HRESULT ( STDMETHODCALLTYPE *CopyTileMappings )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDestTiledResource, + /* [annotation] */ + _In_ const D3D11_TILED_RESOURCE_COORDINATE *pDestRegionStartCoordinate, + /* [annotation] */ + _In_ ID3D11Resource *pSourceTiledResource, + /* [annotation] */ + _In_ const D3D11_TILED_RESOURCE_COORDINATE *pSourceRegionStartCoordinate, + /* [annotation] */ + _In_ const D3D11_TILE_REGION_SIZE *pTileRegionSize, + /* [annotation] */ + _In_ UINT Flags); + + void ( STDMETHODCALLTYPE *CopyTiles )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pTiledResource, + /* [annotation] */ + _In_ const D3D11_TILED_RESOURCE_COORDINATE *pTileRegionStartCoordinate, + /* [annotation] */ + _In_ const D3D11_TILE_REGION_SIZE *pTileRegionSize, + /* [annotation] */ + _In_ ID3D11Buffer *pBuffer, + /* [annotation] */ + _In_ UINT64 BufferStartOffsetInBytes, + /* [annotation] */ + _In_ UINT Flags); + + void ( STDMETHODCALLTYPE *UpdateTiles )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDestTiledResource, + /* [annotation] */ + _In_ const D3D11_TILED_RESOURCE_COORDINATE *pDestTileRegionStartCoordinate, + /* [annotation] */ + _In_ const D3D11_TILE_REGION_SIZE *pDestTileRegionSize, + /* [annotation] */ + _In_ const void *pSourceTileData, + /* [annotation] */ + _In_ UINT Flags); + + HRESULT ( STDMETHODCALLTYPE *ResizeTilePool )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Buffer *pTilePool, + /* [annotation] */ + _In_ UINT64 NewSizeInBytes); + + void ( STDMETHODCALLTYPE *TiledResourceBarrier )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_opt_ ID3D11DeviceChild *pTiledResourceOrViewAccessBeforeBarrier, + /* [annotation] */ + _In_opt_ ID3D11DeviceChild *pTiledResourceOrViewAccessAfterBarrier); + + BOOL ( STDMETHODCALLTYPE *IsAnnotationEnabled )( + ID3D11DeviceContext4 * This); + + void ( STDMETHODCALLTYPE *SetMarkerInt )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ LPCWSTR pLabel, + INT Data); + + void ( STDMETHODCALLTYPE *BeginEventInt )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ LPCWSTR pLabel, + INT Data); + + void ( STDMETHODCALLTYPE *EndEvent )( + ID3D11DeviceContext4 * This); + + void ( STDMETHODCALLTYPE *Flush1 )( + ID3D11DeviceContext4 * This, + D3D11_CONTEXT_TYPE ContextType, + /* [annotation] */ + _In_opt_ HANDLE hEvent); + + void ( STDMETHODCALLTYPE *SetHardwareProtectionState )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ BOOL HwProtectionEnable); + + void ( STDMETHODCALLTYPE *GetHardwareProtectionState )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _Out_ BOOL *pHwProtectionEnable); + + HRESULT ( STDMETHODCALLTYPE *Signal )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Fence *pFence, + /* [annotation] */ + _In_ UINT64 Value); + + HRESULT ( STDMETHODCALLTYPE *Wait )( + ID3D11DeviceContext4 * This, + /* [annotation] */ + _In_ ID3D11Fence *pFence, + /* [annotation] */ + _In_ UINT64 Value); + + END_INTERFACE + } ID3D11DeviceContext4Vtbl; + + interface ID3D11DeviceContext4 + { + CONST_VTBL struct ID3D11DeviceContext4Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11DeviceContext4_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11DeviceContext4_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11DeviceContext4_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11DeviceContext4_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11DeviceContext4_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11DeviceContext4_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11DeviceContext4_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11DeviceContext4_VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext4_PSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> PSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext4_PSSetShader(This,pPixelShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> PSSetShader(This,pPixelShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext4_PSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> PSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext4_VSSetShader(This,pVertexShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> VSSetShader(This,pVertexShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext4_DrawIndexed(This,IndexCount,StartIndexLocation,BaseVertexLocation) \ + ( (This)->lpVtbl -> DrawIndexed(This,IndexCount,StartIndexLocation,BaseVertexLocation) ) + +#define ID3D11DeviceContext4_Draw(This,VertexCount,StartVertexLocation) \ + ( (This)->lpVtbl -> Draw(This,VertexCount,StartVertexLocation) ) + +#define ID3D11DeviceContext4_Map(This,pResource,Subresource,MapType,MapFlags,pMappedResource) \ + ( (This)->lpVtbl -> Map(This,pResource,Subresource,MapType,MapFlags,pMappedResource) ) + +#define ID3D11DeviceContext4_Unmap(This,pResource,Subresource) \ + ( (This)->lpVtbl -> Unmap(This,pResource,Subresource) ) + +#define ID3D11DeviceContext4_PSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> PSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext4_IASetInputLayout(This,pInputLayout) \ + ( (This)->lpVtbl -> IASetInputLayout(This,pInputLayout) ) + +#define ID3D11DeviceContext4_IASetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) \ + ( (This)->lpVtbl -> IASetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) ) + +#define ID3D11DeviceContext4_IASetIndexBuffer(This,pIndexBuffer,Format,Offset) \ + ( (This)->lpVtbl -> IASetIndexBuffer(This,pIndexBuffer,Format,Offset) ) + +#define ID3D11DeviceContext4_DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) ) + +#define ID3D11DeviceContext4_DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) ) + +#define ID3D11DeviceContext4_GSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> GSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext4_GSSetShader(This,pShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> GSSetShader(This,pShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext4_IASetPrimitiveTopology(This,Topology) \ + ( (This)->lpVtbl -> IASetPrimitiveTopology(This,Topology) ) + +#define ID3D11DeviceContext4_VSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> VSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext4_VSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> VSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext4_Begin(This,pAsync) \ + ( (This)->lpVtbl -> Begin(This,pAsync) ) + +#define ID3D11DeviceContext4_End(This,pAsync) \ + ( (This)->lpVtbl -> End(This,pAsync) ) + +#define ID3D11DeviceContext4_GetData(This,pAsync,pData,DataSize,GetDataFlags) \ + ( (This)->lpVtbl -> GetData(This,pAsync,pData,DataSize,GetDataFlags) ) + +#define ID3D11DeviceContext4_SetPredication(This,pPredicate,PredicateValue) \ + ( (This)->lpVtbl -> SetPredication(This,pPredicate,PredicateValue) ) + +#define ID3D11DeviceContext4_GSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> GSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext4_GSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> GSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext4_OMSetRenderTargets(This,NumViews,ppRenderTargetViews,pDepthStencilView) \ + ( (This)->lpVtbl -> OMSetRenderTargets(This,NumViews,ppRenderTargetViews,pDepthStencilView) ) + +#define ID3D11DeviceContext4_OMSetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,pDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) \ + ( (This)->lpVtbl -> OMSetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,pDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) ) + +#define ID3D11DeviceContext4_OMSetBlendState(This,pBlendState,BlendFactor,SampleMask) \ + ( (This)->lpVtbl -> OMSetBlendState(This,pBlendState,BlendFactor,SampleMask) ) + +#define ID3D11DeviceContext4_OMSetDepthStencilState(This,pDepthStencilState,StencilRef) \ + ( (This)->lpVtbl -> OMSetDepthStencilState(This,pDepthStencilState,StencilRef) ) + +#define ID3D11DeviceContext4_SOSetTargets(This,NumBuffers,ppSOTargets,pOffsets) \ + ( (This)->lpVtbl -> SOSetTargets(This,NumBuffers,ppSOTargets,pOffsets) ) + +#define ID3D11DeviceContext4_DrawAuto(This) \ + ( (This)->lpVtbl -> DrawAuto(This) ) + +#define ID3D11DeviceContext4_DrawIndexedInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) \ + ( (This)->lpVtbl -> DrawIndexedInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) ) + +#define ID3D11DeviceContext4_DrawInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) \ + ( (This)->lpVtbl -> DrawInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) ) + +#define ID3D11DeviceContext4_Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) \ + ( (This)->lpVtbl -> Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) ) + +#define ID3D11DeviceContext4_DispatchIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) \ + ( (This)->lpVtbl -> DispatchIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) ) + +#define ID3D11DeviceContext4_RSSetState(This,pRasterizerState) \ + ( (This)->lpVtbl -> RSSetState(This,pRasterizerState) ) + +#define ID3D11DeviceContext4_RSSetViewports(This,NumViewports,pViewports) \ + ( (This)->lpVtbl -> RSSetViewports(This,NumViewports,pViewports) ) + +#define ID3D11DeviceContext4_RSSetScissorRects(This,NumRects,pRects) \ + ( (This)->lpVtbl -> RSSetScissorRects(This,NumRects,pRects) ) + +#define ID3D11DeviceContext4_CopySubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox) \ + ( (This)->lpVtbl -> CopySubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox) ) + +#define ID3D11DeviceContext4_CopyResource(This,pDstResource,pSrcResource) \ + ( (This)->lpVtbl -> CopyResource(This,pDstResource,pSrcResource) ) + +#define ID3D11DeviceContext4_UpdateSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) \ + ( (This)->lpVtbl -> UpdateSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) ) + +#define ID3D11DeviceContext4_CopyStructureCount(This,pDstBuffer,DstAlignedByteOffset,pSrcView) \ + ( (This)->lpVtbl -> CopyStructureCount(This,pDstBuffer,DstAlignedByteOffset,pSrcView) ) + +#define ID3D11DeviceContext4_ClearRenderTargetView(This,pRenderTargetView,ColorRGBA) \ + ( (This)->lpVtbl -> ClearRenderTargetView(This,pRenderTargetView,ColorRGBA) ) + +#define ID3D11DeviceContext4_ClearUnorderedAccessViewUint(This,pUnorderedAccessView,Values) \ + ( (This)->lpVtbl -> ClearUnorderedAccessViewUint(This,pUnorderedAccessView,Values) ) + +#define ID3D11DeviceContext4_ClearUnorderedAccessViewFloat(This,pUnorderedAccessView,Values) \ + ( (This)->lpVtbl -> ClearUnorderedAccessViewFloat(This,pUnorderedAccessView,Values) ) + +#define ID3D11DeviceContext4_ClearDepthStencilView(This,pDepthStencilView,ClearFlags,Depth,Stencil) \ + ( (This)->lpVtbl -> ClearDepthStencilView(This,pDepthStencilView,ClearFlags,Depth,Stencil) ) + +#define ID3D11DeviceContext4_GenerateMips(This,pShaderResourceView) \ + ( (This)->lpVtbl -> GenerateMips(This,pShaderResourceView) ) + +#define ID3D11DeviceContext4_SetResourceMinLOD(This,pResource,MinLOD) \ + ( (This)->lpVtbl -> SetResourceMinLOD(This,pResource,MinLOD) ) + +#define ID3D11DeviceContext4_GetResourceMinLOD(This,pResource) \ + ( (This)->lpVtbl -> GetResourceMinLOD(This,pResource) ) + +#define ID3D11DeviceContext4_ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) \ + ( (This)->lpVtbl -> ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) ) + +#define ID3D11DeviceContext4_ExecuteCommandList(This,pCommandList,RestoreContextState) \ + ( (This)->lpVtbl -> ExecuteCommandList(This,pCommandList,RestoreContextState) ) + +#define ID3D11DeviceContext4_HSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> HSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext4_HSSetShader(This,pHullShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> HSSetShader(This,pHullShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext4_HSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> HSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext4_HSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> HSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext4_DSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> DSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext4_DSSetShader(This,pDomainShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> DSSetShader(This,pDomainShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext4_DSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> DSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext4_DSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> DSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext4_CSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> CSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext4_CSSetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) \ + ( (This)->lpVtbl -> CSSetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) ) + +#define ID3D11DeviceContext4_CSSetShader(This,pComputeShader,ppClassInstances,NumClassInstances) \ + ( (This)->lpVtbl -> CSSetShader(This,pComputeShader,ppClassInstances,NumClassInstances) ) + +#define ID3D11DeviceContext4_CSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> CSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext4_CSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> CSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext4_VSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> VSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext4_PSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> PSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext4_PSGetShader(This,ppPixelShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> PSGetShader(This,ppPixelShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext4_PSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> PSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext4_VSGetShader(This,ppVertexShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> VSGetShader(This,ppVertexShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext4_PSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> PSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext4_IAGetInputLayout(This,ppInputLayout) \ + ( (This)->lpVtbl -> IAGetInputLayout(This,ppInputLayout) ) + +#define ID3D11DeviceContext4_IAGetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) \ + ( (This)->lpVtbl -> IAGetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) ) + +#define ID3D11DeviceContext4_IAGetIndexBuffer(This,pIndexBuffer,Format,Offset) \ + ( (This)->lpVtbl -> IAGetIndexBuffer(This,pIndexBuffer,Format,Offset) ) + +#define ID3D11DeviceContext4_GSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> GSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext4_GSGetShader(This,ppGeometryShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> GSGetShader(This,ppGeometryShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext4_IAGetPrimitiveTopology(This,pTopology) \ + ( (This)->lpVtbl -> IAGetPrimitiveTopology(This,pTopology) ) + +#define ID3D11DeviceContext4_VSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> VSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext4_VSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> VSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext4_GetPredication(This,ppPredicate,pPredicateValue) \ + ( (This)->lpVtbl -> GetPredication(This,ppPredicate,pPredicateValue) ) + +#define ID3D11DeviceContext4_GSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> GSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext4_GSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> GSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext4_OMGetRenderTargets(This,NumViews,ppRenderTargetViews,ppDepthStencilView) \ + ( (This)->lpVtbl -> OMGetRenderTargets(This,NumViews,ppRenderTargetViews,ppDepthStencilView) ) + +#define ID3D11DeviceContext4_OMGetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,ppDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews) \ + ( (This)->lpVtbl -> OMGetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,ppDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews) ) + +#define ID3D11DeviceContext4_OMGetBlendState(This,ppBlendState,BlendFactor,pSampleMask) \ + ( (This)->lpVtbl -> OMGetBlendState(This,ppBlendState,BlendFactor,pSampleMask) ) + +#define ID3D11DeviceContext4_OMGetDepthStencilState(This,ppDepthStencilState,pStencilRef) \ + ( (This)->lpVtbl -> OMGetDepthStencilState(This,ppDepthStencilState,pStencilRef) ) + +#define ID3D11DeviceContext4_SOGetTargets(This,NumBuffers,ppSOTargets) \ + ( (This)->lpVtbl -> SOGetTargets(This,NumBuffers,ppSOTargets) ) + +#define ID3D11DeviceContext4_RSGetState(This,ppRasterizerState) \ + ( (This)->lpVtbl -> RSGetState(This,ppRasterizerState) ) + +#define ID3D11DeviceContext4_RSGetViewports(This,pNumViewports,pViewports) \ + ( (This)->lpVtbl -> RSGetViewports(This,pNumViewports,pViewports) ) + +#define ID3D11DeviceContext4_RSGetScissorRects(This,pNumRects,pRects) \ + ( (This)->lpVtbl -> RSGetScissorRects(This,pNumRects,pRects) ) + +#define ID3D11DeviceContext4_HSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> HSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext4_HSGetShader(This,ppHullShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> HSGetShader(This,ppHullShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext4_HSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> HSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext4_HSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> HSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext4_DSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> DSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext4_DSGetShader(This,ppDomainShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> DSGetShader(This,ppDomainShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext4_DSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> DSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext4_DSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> DSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext4_CSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) \ + ( (This)->lpVtbl -> CSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) ) + +#define ID3D11DeviceContext4_CSGetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews) \ + ( (This)->lpVtbl -> CSGetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews) ) + +#define ID3D11DeviceContext4_CSGetShader(This,ppComputeShader,ppClassInstances,pNumClassInstances) \ + ( (This)->lpVtbl -> CSGetShader(This,ppComputeShader,ppClassInstances,pNumClassInstances) ) + +#define ID3D11DeviceContext4_CSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) \ + ( (This)->lpVtbl -> CSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) ) + +#define ID3D11DeviceContext4_CSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ + ( (This)->lpVtbl -> CSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) + +#define ID3D11DeviceContext4_ClearState(This) \ + ( (This)->lpVtbl -> ClearState(This) ) + +#define ID3D11DeviceContext4_Flush(This) \ + ( (This)->lpVtbl -> Flush(This) ) + +#define ID3D11DeviceContext4_GetType(This) \ + ( (This)->lpVtbl -> GetType(This) ) + +#define ID3D11DeviceContext4_GetContextFlags(This) \ + ( (This)->lpVtbl -> GetContextFlags(This) ) + +#define ID3D11DeviceContext4_FinishCommandList(This,RestoreDeferredContextState,ppCommandList) \ + ( (This)->lpVtbl -> FinishCommandList(This,RestoreDeferredContextState,ppCommandList) ) + + +#define ID3D11DeviceContext4_CopySubresourceRegion1(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox,CopyFlags) \ + ( (This)->lpVtbl -> CopySubresourceRegion1(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox,CopyFlags) ) + +#define ID3D11DeviceContext4_UpdateSubresource1(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch,CopyFlags) \ + ( (This)->lpVtbl -> UpdateSubresource1(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch,CopyFlags) ) + +#define ID3D11DeviceContext4_DiscardResource(This,pResource) \ + ( (This)->lpVtbl -> DiscardResource(This,pResource) ) + +#define ID3D11DeviceContext4_DiscardView(This,pResourceView) \ + ( (This)->lpVtbl -> DiscardView(This,pResourceView) ) + +#define ID3D11DeviceContext4_VSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> VSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext4_HSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> HSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext4_DSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> DSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext4_GSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> GSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext4_PSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> PSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext4_CSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> CSSetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext4_VSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> VSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext4_HSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> HSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext4_DSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> DSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext4_GSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> GSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext4_PSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> PSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext4_CSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) \ + ( (This)->lpVtbl -> CSGetConstantBuffers1(This,StartSlot,NumBuffers,ppConstantBuffers,pFirstConstant,pNumConstants) ) + +#define ID3D11DeviceContext4_SwapDeviceContextState(This,pState,ppPreviousState) \ + ( (This)->lpVtbl -> SwapDeviceContextState(This,pState,ppPreviousState) ) + +#define ID3D11DeviceContext4_ClearView(This,pView,Color,pRect,NumRects) \ + ( (This)->lpVtbl -> ClearView(This,pView,Color,pRect,NumRects) ) + +#define ID3D11DeviceContext4_DiscardView1(This,pResourceView,pRects,NumRects) \ + ( (This)->lpVtbl -> DiscardView1(This,pResourceView,pRects,NumRects) ) + + +#define ID3D11DeviceContext4_UpdateTileMappings(This,pTiledResource,NumTiledResourceRegions,pTiledResourceRegionStartCoordinates,pTiledResourceRegionSizes,pTilePool,NumRanges,pRangeFlags,pTilePoolStartOffsets,pRangeTileCounts,Flags) \ + ( (This)->lpVtbl -> UpdateTileMappings(This,pTiledResource,NumTiledResourceRegions,pTiledResourceRegionStartCoordinates,pTiledResourceRegionSizes,pTilePool,NumRanges,pRangeFlags,pTilePoolStartOffsets,pRangeTileCounts,Flags) ) + +#define ID3D11DeviceContext4_CopyTileMappings(This,pDestTiledResource,pDestRegionStartCoordinate,pSourceTiledResource,pSourceRegionStartCoordinate,pTileRegionSize,Flags) \ + ( (This)->lpVtbl -> CopyTileMappings(This,pDestTiledResource,pDestRegionStartCoordinate,pSourceTiledResource,pSourceRegionStartCoordinate,pTileRegionSize,Flags) ) + +#define ID3D11DeviceContext4_CopyTiles(This,pTiledResource,pTileRegionStartCoordinate,pTileRegionSize,pBuffer,BufferStartOffsetInBytes,Flags) \ + ( (This)->lpVtbl -> CopyTiles(This,pTiledResource,pTileRegionStartCoordinate,pTileRegionSize,pBuffer,BufferStartOffsetInBytes,Flags) ) + +#define ID3D11DeviceContext4_UpdateTiles(This,pDestTiledResource,pDestTileRegionStartCoordinate,pDestTileRegionSize,pSourceTileData,Flags) \ + ( (This)->lpVtbl -> UpdateTiles(This,pDestTiledResource,pDestTileRegionStartCoordinate,pDestTileRegionSize,pSourceTileData,Flags) ) + +#define ID3D11DeviceContext4_ResizeTilePool(This,pTilePool,NewSizeInBytes) \ + ( (This)->lpVtbl -> ResizeTilePool(This,pTilePool,NewSizeInBytes) ) + +#define ID3D11DeviceContext4_TiledResourceBarrier(This,pTiledResourceOrViewAccessBeforeBarrier,pTiledResourceOrViewAccessAfterBarrier) \ + ( (This)->lpVtbl -> TiledResourceBarrier(This,pTiledResourceOrViewAccessBeforeBarrier,pTiledResourceOrViewAccessAfterBarrier) ) + +#define ID3D11DeviceContext4_IsAnnotationEnabled(This) \ + ( (This)->lpVtbl -> IsAnnotationEnabled(This) ) + +#define ID3D11DeviceContext4_SetMarkerInt(This,pLabel,Data) \ + ( (This)->lpVtbl -> SetMarkerInt(This,pLabel,Data) ) + +#define ID3D11DeviceContext4_BeginEventInt(This,pLabel,Data) \ + ( (This)->lpVtbl -> BeginEventInt(This,pLabel,Data) ) + +#define ID3D11DeviceContext4_EndEvent(This) \ + ( (This)->lpVtbl -> EndEvent(This) ) + + +#define ID3D11DeviceContext4_Flush1(This,ContextType,hEvent) \ + ( (This)->lpVtbl -> Flush1(This,ContextType,hEvent) ) + +#define ID3D11DeviceContext4_SetHardwareProtectionState(This,HwProtectionEnable) \ + ( (This)->lpVtbl -> SetHardwareProtectionState(This,HwProtectionEnable) ) + +#define ID3D11DeviceContext4_GetHardwareProtectionState(This,pHwProtectionEnable) \ + ( (This)->lpVtbl -> GetHardwareProtectionState(This,pHwProtectionEnable) ) + + +#define ID3D11DeviceContext4_Signal(This,pFence,Value) \ + ( (This)->lpVtbl -> Signal(This,pFence,Value) ) + +#define ID3D11DeviceContext4_Wait(This,pFence,Value) \ + ( (This)->lpVtbl -> Wait(This,pFence,Value) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11DeviceContext4_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11Device3_INTERFACE_DEFINED__ +#define __ID3D11Device3_INTERFACE_DEFINED__ + +/* interface ID3D11Device3 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11Device3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("A05C8C37-D2C6-4732-B3A0-9CE0B0DC9AE6") + ID3D11Device3 : public ID3D11Device2 + { + public: + virtual HRESULT STDMETHODCALLTYPE CreateTexture2D1( + /* [annotation] */ + _In_ const D3D11_TEXTURE2D_DESC1 *pDesc1, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc1->MipLevels * pDesc1->ArraySize)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture2D1 **ppTexture2D) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateTexture3D1( + /* [annotation] */ + _In_ const D3D11_TEXTURE3D_DESC1 *pDesc1, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc1->MipLevels)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture3D1 **ppTexture3D) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateRasterizerState2( + /* [annotation] */ + _In_ const D3D11_RASTERIZER_DESC2 *pRasterizerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RasterizerState2 **ppRasterizerState) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateShaderResourceView1( + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_SHADER_RESOURCE_VIEW_DESC1 *pDesc1, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11ShaderResourceView1 **ppSRView1) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateUnorderedAccessView1( + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_UNORDERED_ACCESS_VIEW_DESC1 *pDesc1, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11UnorderedAccessView1 **ppUAView1) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateRenderTargetView1( + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_RENDER_TARGET_VIEW_DESC1 *pDesc1, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RenderTargetView1 **ppRTView1) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateQuery1( + /* [annotation] */ + _In_ const D3D11_QUERY_DESC1 *pQueryDesc1, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Query1 **ppQuery1) = 0; + + virtual void STDMETHODCALLTYPE GetImmediateContext3( + /* [annotation] */ + _Outptr_ ID3D11DeviceContext3 **ppImmediateContext) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateDeferredContext3( + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext3 **ppDeferredContext) = 0; + + virtual void STDMETHODCALLTYPE WriteToSubresource( + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pDstBox, + /* [annotation] */ + _In_ const void *pSrcData, + /* [annotation] */ + _In_ UINT SrcRowPitch, + /* [annotation] */ + _In_ UINT SrcDepthPitch) = 0; + + virtual void STDMETHODCALLTYPE ReadFromSubresource( + /* [annotation] */ + _Out_ void *pDstData, + /* [annotation] */ + _In_ UINT DstRowPitch, + /* [annotation] */ + _In_ UINT DstDepthPitch, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pSrcBox) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11Device3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11Device3 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11Device3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11Device3 * This); + + HRESULT ( STDMETHODCALLTYPE *CreateBuffer )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ const D3D11_BUFFER_DESC *pDesc, + /* [annotation] */ + _In_opt_ const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Buffer **ppBuffer); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture1D )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE1D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels * pDesc->ArraySize)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture1D **ppTexture1D); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture2D )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE2D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels * pDesc->ArraySize)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture2D **ppTexture2D); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture3D )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE3D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture3D **ppTexture3D); + + HRESULT ( STDMETHODCALLTYPE *CreateShaderResourceView )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11ShaderResourceView **ppSRView); + + HRESULT ( STDMETHODCALLTYPE *CreateUnorderedAccessView )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11UnorderedAccessView **ppUAView); + + HRESULT ( STDMETHODCALLTYPE *CreateRenderTargetView )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_RENDER_TARGET_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RenderTargetView **ppRTView); + + HRESULT ( STDMETHODCALLTYPE *CreateDepthStencilView )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DepthStencilView **ppDepthStencilView); + + HRESULT ( STDMETHODCALLTYPE *CreateInputLayout )( + ID3D11Device3 * This, + /* [annotation] */ + _In_reads_(NumElements) const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT ) UINT NumElements, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecodeWithInputSignature, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11InputLayout **ppInputLayout); + + HRESULT ( STDMETHODCALLTYPE *CreateVertexShader )( + ID3D11Device3 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11VertexShader **ppVertexShader); + + HRESULT ( STDMETHODCALLTYPE *CreateGeometryShader )( + ID3D11Device3 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11GeometryShader **ppGeometryShader); + + HRESULT ( STDMETHODCALLTYPE *CreateGeometryShaderWithStreamOutput )( + ID3D11Device3 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_reads_opt_(NumEntries) const D3D11_SO_DECLARATION_ENTRY *pSODeclaration, + /* [annotation] */ + _In_range_( 0, D3D11_SO_STREAM_COUNT * D3D11_SO_OUTPUT_COMPONENT_COUNT ) UINT NumEntries, + /* [annotation] */ + _In_reads_opt_(NumStrides) const UINT *pBufferStrides, + /* [annotation] */ + _In_range_( 0, D3D11_SO_BUFFER_SLOT_COUNT ) UINT NumStrides, + /* [annotation] */ + _In_ UINT RasterizedStream, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11GeometryShader **ppGeometryShader); + + HRESULT ( STDMETHODCALLTYPE *CreatePixelShader )( + ID3D11Device3 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11PixelShader **ppPixelShader); + + HRESULT ( STDMETHODCALLTYPE *CreateHullShader )( + ID3D11Device3 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11HullShader **ppHullShader); + + HRESULT ( STDMETHODCALLTYPE *CreateDomainShader )( + ID3D11Device3 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DomainShader **ppDomainShader); + + HRESULT ( STDMETHODCALLTYPE *CreateComputeShader )( + ID3D11Device3 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11ComputeShader **ppComputeShader); + + HRESULT ( STDMETHODCALLTYPE *CreateClassLinkage )( + ID3D11Device3 * This, + /* [annotation] */ + _COM_Outptr_ ID3D11ClassLinkage **ppLinkage); + + HRESULT ( STDMETHODCALLTYPE *CreateBlendState )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ const D3D11_BLEND_DESC *pBlendStateDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11BlendState **ppBlendState); + + HRESULT ( STDMETHODCALLTYPE *CreateDepthStencilState )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DepthStencilState **ppDepthStencilState); + + HRESULT ( STDMETHODCALLTYPE *CreateRasterizerState )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ const D3D11_RASTERIZER_DESC *pRasterizerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RasterizerState **ppRasterizerState); + + HRESULT ( STDMETHODCALLTYPE *CreateSamplerState )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ const D3D11_SAMPLER_DESC *pSamplerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11SamplerState **ppSamplerState); + + HRESULT ( STDMETHODCALLTYPE *CreateQuery )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ const D3D11_QUERY_DESC *pQueryDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Query **ppQuery); + + HRESULT ( STDMETHODCALLTYPE *CreatePredicate )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ const D3D11_QUERY_DESC *pPredicateDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Predicate **ppPredicate); + + HRESULT ( STDMETHODCALLTYPE *CreateCounter )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ const D3D11_COUNTER_DESC *pCounterDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Counter **ppCounter); + + HRESULT ( STDMETHODCALLTYPE *CreateDeferredContext )( + ID3D11Device3 * This, + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext **ppDeferredContext); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedResource )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _In_ REFIID ReturnedInterface, + /* [annotation] */ + _COM_Outptr_opt_ void **ppResource); + + HRESULT ( STDMETHODCALLTYPE *CheckFormatSupport )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _Out_ UINT *pFormatSupport); + + HRESULT ( STDMETHODCALLTYPE *CheckMultisampleQualityLevels )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT SampleCount, + /* [annotation] */ + _Out_ UINT *pNumQualityLevels); + + void ( STDMETHODCALLTYPE *CheckCounterInfo )( + ID3D11Device3 * This, + /* [annotation] */ + _Out_ D3D11_COUNTER_INFO *pCounterInfo); + + HRESULT ( STDMETHODCALLTYPE *CheckCounter )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ const D3D11_COUNTER_DESC *pDesc, + /* [annotation] */ + _Out_ D3D11_COUNTER_TYPE *pType, + /* [annotation] */ + _Out_ UINT *pActiveCounters, + /* [annotation] */ + _Out_writes_opt_(*pNameLength) LPSTR szName, + /* [annotation] */ + _Inout_opt_ UINT *pNameLength, + /* [annotation] */ + _Out_writes_opt_(*pUnitsLength) LPSTR szUnits, + /* [annotation] */ + _Inout_opt_ UINT *pUnitsLength, + /* [annotation] */ + _Out_writes_opt_(*pDescriptionLength) LPSTR szDescription, + /* [annotation] */ + _Inout_opt_ UINT *pDescriptionLength); + + HRESULT ( STDMETHODCALLTYPE *CheckFeatureSupport )( + ID3D11Device3 * This, + D3D11_FEATURE Feature, + /* [annotation] */ + _Out_writes_bytes_(FeatureSupportDataSize) void *pFeatureSupportData, + UINT FeatureSupportDataSize); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + D3D_FEATURE_LEVEL ( STDMETHODCALLTYPE *GetFeatureLevel )( + ID3D11Device3 * This); + + UINT ( STDMETHODCALLTYPE *GetCreationFlags )( + ID3D11Device3 * This); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceRemovedReason )( + ID3D11Device3 * This); + + void ( STDMETHODCALLTYPE *GetImmediateContext )( + ID3D11Device3 * This, + /* [annotation] */ + _Outptr_ ID3D11DeviceContext **ppImmediateContext); + + HRESULT ( STDMETHODCALLTYPE *SetExceptionMode )( + ID3D11Device3 * This, + UINT RaiseFlags); + + UINT ( STDMETHODCALLTYPE *GetExceptionMode )( + ID3D11Device3 * This); + + void ( STDMETHODCALLTYPE *GetImmediateContext1 )( + ID3D11Device3 * This, + /* [annotation] */ + _Outptr_ ID3D11DeviceContext1 **ppImmediateContext); + + HRESULT ( STDMETHODCALLTYPE *CreateDeferredContext1 )( + ID3D11Device3 * This, + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext1 **ppDeferredContext); + + HRESULT ( STDMETHODCALLTYPE *CreateBlendState1 )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ const D3D11_BLEND_DESC1 *pBlendStateDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11BlendState1 **ppBlendState); + + HRESULT ( STDMETHODCALLTYPE *CreateRasterizerState1 )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ const D3D11_RASTERIZER_DESC1 *pRasterizerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RasterizerState1 **ppRasterizerState); + + HRESULT ( STDMETHODCALLTYPE *CreateDeviceContextState )( + ID3D11Device3 * This, + UINT Flags, + /* [annotation] */ + _In_reads_( FeatureLevels ) const D3D_FEATURE_LEVEL *pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + REFIID EmulatedInterface, + /* [annotation] */ + _Out_opt_ D3D_FEATURE_LEVEL *pChosenFeatureLevel, + /* [annotation] */ + _Out_opt_ ID3DDeviceContextState **ppContextState); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedResource1 )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _In_ REFIID returnedInterface, + /* [annotation] */ + _COM_Outptr_ void **ppResource); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedResourceByName )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ LPCWSTR lpName, + /* [annotation] */ + _In_ DWORD dwDesiredAccess, + /* [annotation] */ + _In_ REFIID returnedInterface, + /* [annotation] */ + _COM_Outptr_ void **ppResource); + + void ( STDMETHODCALLTYPE *GetImmediateContext2 )( + ID3D11Device3 * This, + /* [annotation] */ + _Outptr_ ID3D11DeviceContext2 **ppImmediateContext); + + HRESULT ( STDMETHODCALLTYPE *CreateDeferredContext2 )( + ID3D11Device3 * This, + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext2 **ppDeferredContext); + + void ( STDMETHODCALLTYPE *GetResourceTiling )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pTiledResource, + /* [annotation] */ + _Out_opt_ UINT *pNumTilesForEntireResource, + /* [annotation] */ + _Out_opt_ D3D11_PACKED_MIP_DESC *pPackedMipDesc, + /* [annotation] */ + _Out_opt_ D3D11_TILE_SHAPE *pStandardTileShapeForNonPackedMips, + /* [annotation] */ + _Inout_opt_ UINT *pNumSubresourceTilings, + /* [annotation] */ + _In_ UINT FirstSubresourceTilingToGet, + /* [annotation] */ + _Out_writes_(*pNumSubresourceTilings) D3D11_SUBRESOURCE_TILING *pSubresourceTilingsForNonPackedMips); + + HRESULT ( STDMETHODCALLTYPE *CheckMultisampleQualityLevels1 )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT SampleCount, + /* [annotation] */ + _In_ UINT Flags, + /* [annotation] */ + _Out_ UINT *pNumQualityLevels); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture2D1 )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE2D_DESC1 *pDesc1, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc1->MipLevels * pDesc1->ArraySize)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture2D1 **ppTexture2D); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture3D1 )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE3D_DESC1 *pDesc1, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc1->MipLevels)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture3D1 **ppTexture3D); + + HRESULT ( STDMETHODCALLTYPE *CreateRasterizerState2 )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ const D3D11_RASTERIZER_DESC2 *pRasterizerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RasterizerState2 **ppRasterizerState); + + HRESULT ( STDMETHODCALLTYPE *CreateShaderResourceView1 )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_SHADER_RESOURCE_VIEW_DESC1 *pDesc1, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11ShaderResourceView1 **ppSRView1); + + HRESULT ( STDMETHODCALLTYPE *CreateUnorderedAccessView1 )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_UNORDERED_ACCESS_VIEW_DESC1 *pDesc1, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11UnorderedAccessView1 **ppUAView1); + + HRESULT ( STDMETHODCALLTYPE *CreateRenderTargetView1 )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_RENDER_TARGET_VIEW_DESC1 *pDesc1, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RenderTargetView1 **ppRTView1); + + HRESULT ( STDMETHODCALLTYPE *CreateQuery1 )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ const D3D11_QUERY_DESC1 *pQueryDesc1, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Query1 **ppQuery1); + + void ( STDMETHODCALLTYPE *GetImmediateContext3 )( + ID3D11Device3 * This, + /* [annotation] */ + _Outptr_ ID3D11DeviceContext3 **ppImmediateContext); + + HRESULT ( STDMETHODCALLTYPE *CreateDeferredContext3 )( + ID3D11Device3 * This, + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext3 **ppDeferredContext); + + void ( STDMETHODCALLTYPE *WriteToSubresource )( + ID3D11Device3 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pDstBox, + /* [annotation] */ + _In_ const void *pSrcData, + /* [annotation] */ + _In_ UINT SrcRowPitch, + /* [annotation] */ + _In_ UINT SrcDepthPitch); + + void ( STDMETHODCALLTYPE *ReadFromSubresource )( + ID3D11Device3 * This, + /* [annotation] */ + _Out_ void *pDstData, + /* [annotation] */ + _In_ UINT DstRowPitch, + /* [annotation] */ + _In_ UINT DstDepthPitch, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pSrcBox); + + END_INTERFACE + } ID3D11Device3Vtbl; + + interface ID3D11Device3 + { + CONST_VTBL struct ID3D11Device3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11Device3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11Device3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11Device3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11Device3_CreateBuffer(This,pDesc,pInitialData,ppBuffer) \ + ( (This)->lpVtbl -> CreateBuffer(This,pDesc,pInitialData,ppBuffer) ) + +#define ID3D11Device3_CreateTexture1D(This,pDesc,pInitialData,ppTexture1D) \ + ( (This)->lpVtbl -> CreateTexture1D(This,pDesc,pInitialData,ppTexture1D) ) + +#define ID3D11Device3_CreateTexture2D(This,pDesc,pInitialData,ppTexture2D) \ + ( (This)->lpVtbl -> CreateTexture2D(This,pDesc,pInitialData,ppTexture2D) ) + +#define ID3D11Device3_CreateTexture3D(This,pDesc,pInitialData,ppTexture3D) \ + ( (This)->lpVtbl -> CreateTexture3D(This,pDesc,pInitialData,ppTexture3D) ) + +#define ID3D11Device3_CreateShaderResourceView(This,pResource,pDesc,ppSRView) \ + ( (This)->lpVtbl -> CreateShaderResourceView(This,pResource,pDesc,ppSRView) ) + +#define ID3D11Device3_CreateUnorderedAccessView(This,pResource,pDesc,ppUAView) \ + ( (This)->lpVtbl -> CreateUnorderedAccessView(This,pResource,pDesc,ppUAView) ) + +#define ID3D11Device3_CreateRenderTargetView(This,pResource,pDesc,ppRTView) \ + ( (This)->lpVtbl -> CreateRenderTargetView(This,pResource,pDesc,ppRTView) ) + +#define ID3D11Device3_CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView) \ + ( (This)->lpVtbl -> CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView) ) + +#define ID3D11Device3_CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout) \ + ( (This)->lpVtbl -> CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout) ) + +#define ID3D11Device3_CreateVertexShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppVertexShader) \ + ( (This)->lpVtbl -> CreateVertexShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppVertexShader) ) + +#define ID3D11Device3_CreateGeometryShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppGeometryShader) \ + ( (This)->lpVtbl -> CreateGeometryShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppGeometryShader) ) + +#define ID3D11Device3_CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,pBufferStrides,NumStrides,RasterizedStream,pClassLinkage,ppGeometryShader) \ + ( (This)->lpVtbl -> CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,pBufferStrides,NumStrides,RasterizedStream,pClassLinkage,ppGeometryShader) ) + +#define ID3D11Device3_CreatePixelShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppPixelShader) \ + ( (This)->lpVtbl -> CreatePixelShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppPixelShader) ) + +#define ID3D11Device3_CreateHullShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppHullShader) \ + ( (This)->lpVtbl -> CreateHullShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppHullShader) ) + +#define ID3D11Device3_CreateDomainShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppDomainShader) \ + ( (This)->lpVtbl -> CreateDomainShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppDomainShader) ) + +#define ID3D11Device3_CreateComputeShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppComputeShader) \ + ( (This)->lpVtbl -> CreateComputeShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppComputeShader) ) + +#define ID3D11Device3_CreateClassLinkage(This,ppLinkage) \ + ( (This)->lpVtbl -> CreateClassLinkage(This,ppLinkage) ) + +#define ID3D11Device3_CreateBlendState(This,pBlendStateDesc,ppBlendState) \ + ( (This)->lpVtbl -> CreateBlendState(This,pBlendStateDesc,ppBlendState) ) + +#define ID3D11Device3_CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState) \ + ( (This)->lpVtbl -> CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState) ) + +#define ID3D11Device3_CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState) \ + ( (This)->lpVtbl -> CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState) ) + +#define ID3D11Device3_CreateSamplerState(This,pSamplerDesc,ppSamplerState) \ + ( (This)->lpVtbl -> CreateSamplerState(This,pSamplerDesc,ppSamplerState) ) + +#define ID3D11Device3_CreateQuery(This,pQueryDesc,ppQuery) \ + ( (This)->lpVtbl -> CreateQuery(This,pQueryDesc,ppQuery) ) + +#define ID3D11Device3_CreatePredicate(This,pPredicateDesc,ppPredicate) \ + ( (This)->lpVtbl -> CreatePredicate(This,pPredicateDesc,ppPredicate) ) + +#define ID3D11Device3_CreateCounter(This,pCounterDesc,ppCounter) \ + ( (This)->lpVtbl -> CreateCounter(This,pCounterDesc,ppCounter) ) + +#define ID3D11Device3_CreateDeferredContext(This,ContextFlags,ppDeferredContext) \ + ( (This)->lpVtbl -> CreateDeferredContext(This,ContextFlags,ppDeferredContext) ) + +#define ID3D11Device3_OpenSharedResource(This,hResource,ReturnedInterface,ppResource) \ + ( (This)->lpVtbl -> OpenSharedResource(This,hResource,ReturnedInterface,ppResource) ) + +#define ID3D11Device3_CheckFormatSupport(This,Format,pFormatSupport) \ + ( (This)->lpVtbl -> CheckFormatSupport(This,Format,pFormatSupport) ) + +#define ID3D11Device3_CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels) \ + ( (This)->lpVtbl -> CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels) ) + +#define ID3D11Device3_CheckCounterInfo(This,pCounterInfo) \ + ( (This)->lpVtbl -> CheckCounterInfo(This,pCounterInfo) ) + +#define ID3D11Device3_CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength) \ + ( (This)->lpVtbl -> CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength) ) + +#define ID3D11Device3_CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) \ + ( (This)->lpVtbl -> CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) ) + +#define ID3D11Device3_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11Device3_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11Device3_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D11Device3_GetFeatureLevel(This) \ + ( (This)->lpVtbl -> GetFeatureLevel(This) ) + +#define ID3D11Device3_GetCreationFlags(This) \ + ( (This)->lpVtbl -> GetCreationFlags(This) ) + +#define ID3D11Device3_GetDeviceRemovedReason(This) \ + ( (This)->lpVtbl -> GetDeviceRemovedReason(This) ) + +#define ID3D11Device3_GetImmediateContext(This,ppImmediateContext) \ + ( (This)->lpVtbl -> GetImmediateContext(This,ppImmediateContext) ) + +#define ID3D11Device3_SetExceptionMode(This,RaiseFlags) \ + ( (This)->lpVtbl -> SetExceptionMode(This,RaiseFlags) ) + +#define ID3D11Device3_GetExceptionMode(This) \ + ( (This)->lpVtbl -> GetExceptionMode(This) ) + + +#define ID3D11Device3_GetImmediateContext1(This,ppImmediateContext) \ + ( (This)->lpVtbl -> GetImmediateContext1(This,ppImmediateContext) ) + +#define ID3D11Device3_CreateDeferredContext1(This,ContextFlags,ppDeferredContext) \ + ( (This)->lpVtbl -> CreateDeferredContext1(This,ContextFlags,ppDeferredContext) ) + +#define ID3D11Device3_CreateBlendState1(This,pBlendStateDesc,ppBlendState) \ + ( (This)->lpVtbl -> CreateBlendState1(This,pBlendStateDesc,ppBlendState) ) + +#define ID3D11Device3_CreateRasterizerState1(This,pRasterizerDesc,ppRasterizerState) \ + ( (This)->lpVtbl -> CreateRasterizerState1(This,pRasterizerDesc,ppRasterizerState) ) + +#define ID3D11Device3_CreateDeviceContextState(This,Flags,pFeatureLevels,FeatureLevels,SDKVersion,EmulatedInterface,pChosenFeatureLevel,ppContextState) \ + ( (This)->lpVtbl -> CreateDeviceContextState(This,Flags,pFeatureLevels,FeatureLevels,SDKVersion,EmulatedInterface,pChosenFeatureLevel,ppContextState) ) + +#define ID3D11Device3_OpenSharedResource1(This,hResource,returnedInterface,ppResource) \ + ( (This)->lpVtbl -> OpenSharedResource1(This,hResource,returnedInterface,ppResource) ) + +#define ID3D11Device3_OpenSharedResourceByName(This,lpName,dwDesiredAccess,returnedInterface,ppResource) \ + ( (This)->lpVtbl -> OpenSharedResourceByName(This,lpName,dwDesiredAccess,returnedInterface,ppResource) ) + + +#define ID3D11Device3_GetImmediateContext2(This,ppImmediateContext) \ + ( (This)->lpVtbl -> GetImmediateContext2(This,ppImmediateContext) ) + +#define ID3D11Device3_CreateDeferredContext2(This,ContextFlags,ppDeferredContext) \ + ( (This)->lpVtbl -> CreateDeferredContext2(This,ContextFlags,ppDeferredContext) ) + +#define ID3D11Device3_GetResourceTiling(This,pTiledResource,pNumTilesForEntireResource,pPackedMipDesc,pStandardTileShapeForNonPackedMips,pNumSubresourceTilings,FirstSubresourceTilingToGet,pSubresourceTilingsForNonPackedMips) \ + ( (This)->lpVtbl -> GetResourceTiling(This,pTiledResource,pNumTilesForEntireResource,pPackedMipDesc,pStandardTileShapeForNonPackedMips,pNumSubresourceTilings,FirstSubresourceTilingToGet,pSubresourceTilingsForNonPackedMips) ) + +#define ID3D11Device3_CheckMultisampleQualityLevels1(This,Format,SampleCount,Flags,pNumQualityLevels) \ + ( (This)->lpVtbl -> CheckMultisampleQualityLevels1(This,Format,SampleCount,Flags,pNumQualityLevels) ) + + +#define ID3D11Device3_CreateTexture2D1(This,pDesc1,pInitialData,ppTexture2D) \ + ( (This)->lpVtbl -> CreateTexture2D1(This,pDesc1,pInitialData,ppTexture2D) ) + +#define ID3D11Device3_CreateTexture3D1(This,pDesc1,pInitialData,ppTexture3D) \ + ( (This)->lpVtbl -> CreateTexture3D1(This,pDesc1,pInitialData,ppTexture3D) ) + +#define ID3D11Device3_CreateRasterizerState2(This,pRasterizerDesc,ppRasterizerState) \ + ( (This)->lpVtbl -> CreateRasterizerState2(This,pRasterizerDesc,ppRasterizerState) ) + +#define ID3D11Device3_CreateShaderResourceView1(This,pResource,pDesc1,ppSRView1) \ + ( (This)->lpVtbl -> CreateShaderResourceView1(This,pResource,pDesc1,ppSRView1) ) + +#define ID3D11Device3_CreateUnorderedAccessView1(This,pResource,pDesc1,ppUAView1) \ + ( (This)->lpVtbl -> CreateUnorderedAccessView1(This,pResource,pDesc1,ppUAView1) ) + +#define ID3D11Device3_CreateRenderTargetView1(This,pResource,pDesc1,ppRTView1) \ + ( (This)->lpVtbl -> CreateRenderTargetView1(This,pResource,pDesc1,ppRTView1) ) + +#define ID3D11Device3_CreateQuery1(This,pQueryDesc1,ppQuery1) \ + ( (This)->lpVtbl -> CreateQuery1(This,pQueryDesc1,ppQuery1) ) + +#define ID3D11Device3_GetImmediateContext3(This,ppImmediateContext) \ + ( (This)->lpVtbl -> GetImmediateContext3(This,ppImmediateContext) ) + +#define ID3D11Device3_CreateDeferredContext3(This,ContextFlags,ppDeferredContext) \ + ( (This)->lpVtbl -> CreateDeferredContext3(This,ContextFlags,ppDeferredContext) ) + +#define ID3D11Device3_WriteToSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) \ + ( (This)->lpVtbl -> WriteToSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) ) + +#define ID3D11Device3_ReadFromSubresource(This,pDstData,DstRowPitch,DstDepthPitch,pSrcResource,SrcSubresource,pSrcBox) \ + ( (This)->lpVtbl -> ReadFromSubresource(This,pDstData,DstRowPitch,DstDepthPitch,pSrcResource,SrcSubresource,pSrcBox) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11Device3_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_3_0000_0011 */ +/* [local] */ + +DEFINE_GUID(IID_ID3D11Texture2D1,0x51218251,0x1E33,0x4617,0x9C,0xCB,0x4D,0x3A,0x43,0x67,0xE7,0xBB); +DEFINE_GUID(IID_ID3D11Texture3D1,0x0C711683,0x2853,0x4846,0x9B,0xB0,0xF3,0xE6,0x06,0x39,0xE4,0x6A); +DEFINE_GUID(IID_ID3D11RasterizerState2,0x6fbd02fb,0x209f,0x46c4,0xb0,0x59,0x2e,0xd1,0x55,0x86,0xa6,0xac); +DEFINE_GUID(IID_ID3D11ShaderResourceView1,0x91308b87,0x9040,0x411d,0x8c,0x67,0xc3,0x92,0x53,0xce,0x38,0x02); +DEFINE_GUID(IID_ID3D11RenderTargetView1,0xffbe2e23,0xf011,0x418a,0xac,0x56,0x5c,0xee,0xd7,0xc5,0xb9,0x4b); +DEFINE_GUID(IID_ID3D11UnorderedAccessView1,0x7b3b6153,0xa886,0x4544,0xab,0x37,0x65,0x37,0xc8,0x50,0x04,0x03); +DEFINE_GUID(IID_ID3D11Query1,0x631b4766,0x36dc,0x461d,0x8d,0xb6,0xc4,0x7e,0x13,0xe6,0x09,0x16); +DEFINE_GUID(IID_ID3D11DeviceContext3,0xb4e3c01d,0xe79e,0x4637,0x91,0xb2,0x51,0x0e,0x9f,0x4c,0x9b,0x8f); +DEFINE_GUID(IID_ID3D11Fence,0xaffde9d1,0x1df7,0x4bb7,0x8a,0x34,0x0f,0x46,0x25,0x1d,0xab,0x80); +DEFINE_GUID(IID_ID3D11DeviceContext4,0x917600da,0xf58c,0x4c33,0x98,0xd8,0x3e,0x15,0xb3,0x90,0xfa,0x24); +DEFINE_GUID(IID_ID3D11Device3,0xA05C8C37,0xD2C6,0x4732,0xB3,0xA0,0x9C,0xE0,0xB0,0xDC,0x9A,0xE6); + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0011_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0011_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/d3d11_4.h b/gfx/include/dxsdk/d3d11_4.h new file mode 100644 index 0000000000..97592638d4 --- /dev/null +++ b/gfx/include/dxsdk/d3d11_4.h @@ -0,0 +1,3097 @@ +/*------------------------------------------------------------------------------------- + * + * Copyright (c) Microsoft Corporation + * + *-------------------------------------------------------------------------------------*/ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ +/* @@MIDL_FILE_HEADING( ) */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __d3d11_4_h__ +#define __d3d11_4_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __ID3D11Device4_FWD_DEFINED__ +#define __ID3D11Device4_FWD_DEFINED__ +typedef interface ID3D11Device4 ID3D11Device4; + +#endif /* __ID3D11Device4_FWD_DEFINED__ */ + + +#ifndef __ID3D11Device5_FWD_DEFINED__ +#define __ID3D11Device5_FWD_DEFINED__ +typedef interface ID3D11Device5 ID3D11Device5; + +#endif /* __ID3D11Device5_FWD_DEFINED__ */ + + +#ifndef __ID3D11Multithread_FWD_DEFINED__ +#define __ID3D11Multithread_FWD_DEFINED__ +typedef interface ID3D11Multithread ID3D11Multithread; + +#endif /* __ID3D11Multithread_FWD_DEFINED__ */ + + +#ifndef __ID3D11VideoContext2_FWD_DEFINED__ +#define __ID3D11VideoContext2_FWD_DEFINED__ +typedef interface ID3D11VideoContext2 ID3D11VideoContext2; + +#endif /* __ID3D11VideoContext2_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "dxgi1_5.h" +#include "d3dcommon.h" +#include "d3d11_3.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_d3d11_4_0000_0000 */ +/* [local] */ + +#ifdef __cplusplus +} +#endif +#include "d3d11_3.h" // +#ifdef __cplusplus +extern "C"{ +#endif +/*#pragma region App Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_4_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_4_0000_0000_v0_0_s_ifspec; + +#ifndef __ID3D11Device4_INTERFACE_DEFINED__ +#define __ID3D11Device4_INTERFACE_DEFINED__ + +/* interface ID3D11Device4 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11Device4; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("8992ab71-02e6-4b8d-ba48-b056dcda42c4") + ID3D11Device4 : public ID3D11Device3 + { + public: + virtual HRESULT STDMETHODCALLTYPE RegisterDeviceRemovedEvent( + /* [annotation] */ + _In_ HANDLE hEvent, + /* [annotation] */ + _Out_ DWORD *pdwCookie) = 0; + + virtual void STDMETHODCALLTYPE UnregisterDeviceRemoved( + /* [annotation] */ + _In_ DWORD dwCookie) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11Device4Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11Device4 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11Device4 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11Device4 * This); + + HRESULT ( STDMETHODCALLTYPE *CreateBuffer )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ const D3D11_BUFFER_DESC *pDesc, + /* [annotation] */ + _In_opt_ const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Buffer **ppBuffer); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture1D )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE1D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels * pDesc->ArraySize)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture1D **ppTexture1D); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture2D )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE2D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels * pDesc->ArraySize)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture2D **ppTexture2D); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture3D )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE3D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture3D **ppTexture3D); + + HRESULT ( STDMETHODCALLTYPE *CreateShaderResourceView )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11ShaderResourceView **ppSRView); + + HRESULT ( STDMETHODCALLTYPE *CreateUnorderedAccessView )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11UnorderedAccessView **ppUAView); + + HRESULT ( STDMETHODCALLTYPE *CreateRenderTargetView )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_RENDER_TARGET_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RenderTargetView **ppRTView); + + HRESULT ( STDMETHODCALLTYPE *CreateDepthStencilView )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DepthStencilView **ppDepthStencilView); + + HRESULT ( STDMETHODCALLTYPE *CreateInputLayout )( + ID3D11Device4 * This, + /* [annotation] */ + _In_reads_(NumElements) const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT ) UINT NumElements, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecodeWithInputSignature, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11InputLayout **ppInputLayout); + + HRESULT ( STDMETHODCALLTYPE *CreateVertexShader )( + ID3D11Device4 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11VertexShader **ppVertexShader); + + HRESULT ( STDMETHODCALLTYPE *CreateGeometryShader )( + ID3D11Device4 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11GeometryShader **ppGeometryShader); + + HRESULT ( STDMETHODCALLTYPE *CreateGeometryShaderWithStreamOutput )( + ID3D11Device4 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_reads_opt_(NumEntries) const D3D11_SO_DECLARATION_ENTRY *pSODeclaration, + /* [annotation] */ + _In_range_( 0, D3D11_SO_STREAM_COUNT * D3D11_SO_OUTPUT_COMPONENT_COUNT ) UINT NumEntries, + /* [annotation] */ + _In_reads_opt_(NumStrides) const UINT *pBufferStrides, + /* [annotation] */ + _In_range_( 0, D3D11_SO_BUFFER_SLOT_COUNT ) UINT NumStrides, + /* [annotation] */ + _In_ UINT RasterizedStream, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11GeometryShader **ppGeometryShader); + + HRESULT ( STDMETHODCALLTYPE *CreatePixelShader )( + ID3D11Device4 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11PixelShader **ppPixelShader); + + HRESULT ( STDMETHODCALLTYPE *CreateHullShader )( + ID3D11Device4 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11HullShader **ppHullShader); + + HRESULT ( STDMETHODCALLTYPE *CreateDomainShader )( + ID3D11Device4 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DomainShader **ppDomainShader); + + HRESULT ( STDMETHODCALLTYPE *CreateComputeShader )( + ID3D11Device4 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11ComputeShader **ppComputeShader); + + HRESULT ( STDMETHODCALLTYPE *CreateClassLinkage )( + ID3D11Device4 * This, + /* [annotation] */ + _COM_Outptr_ ID3D11ClassLinkage **ppLinkage); + + HRESULT ( STDMETHODCALLTYPE *CreateBlendState )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ const D3D11_BLEND_DESC *pBlendStateDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11BlendState **ppBlendState); + + HRESULT ( STDMETHODCALLTYPE *CreateDepthStencilState )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DepthStencilState **ppDepthStencilState); + + HRESULT ( STDMETHODCALLTYPE *CreateRasterizerState )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ const D3D11_RASTERIZER_DESC *pRasterizerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RasterizerState **ppRasterizerState); + + HRESULT ( STDMETHODCALLTYPE *CreateSamplerState )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ const D3D11_SAMPLER_DESC *pSamplerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11SamplerState **ppSamplerState); + + HRESULT ( STDMETHODCALLTYPE *CreateQuery )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ const D3D11_QUERY_DESC *pQueryDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Query **ppQuery); + + HRESULT ( STDMETHODCALLTYPE *CreatePredicate )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ const D3D11_QUERY_DESC *pPredicateDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Predicate **ppPredicate); + + HRESULT ( STDMETHODCALLTYPE *CreateCounter )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ const D3D11_COUNTER_DESC *pCounterDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Counter **ppCounter); + + HRESULT ( STDMETHODCALLTYPE *CreateDeferredContext )( + ID3D11Device4 * This, + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext **ppDeferredContext); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedResource )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _In_ REFIID ReturnedInterface, + /* [annotation] */ + _COM_Outptr_opt_ void **ppResource); + + HRESULT ( STDMETHODCALLTYPE *CheckFormatSupport )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _Out_ UINT *pFormatSupport); + + HRESULT ( STDMETHODCALLTYPE *CheckMultisampleQualityLevels )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT SampleCount, + /* [annotation] */ + _Out_ UINT *pNumQualityLevels); + + void ( STDMETHODCALLTYPE *CheckCounterInfo )( + ID3D11Device4 * This, + /* [annotation] */ + _Out_ D3D11_COUNTER_INFO *pCounterInfo); + + HRESULT ( STDMETHODCALLTYPE *CheckCounter )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ const D3D11_COUNTER_DESC *pDesc, + /* [annotation] */ + _Out_ D3D11_COUNTER_TYPE *pType, + /* [annotation] */ + _Out_ UINT *pActiveCounters, + /* [annotation] */ + _Out_writes_opt_(*pNameLength) LPSTR szName, + /* [annotation] */ + _Inout_opt_ UINT *pNameLength, + /* [annotation] */ + _Out_writes_opt_(*pUnitsLength) LPSTR szUnits, + /* [annotation] */ + _Inout_opt_ UINT *pUnitsLength, + /* [annotation] */ + _Out_writes_opt_(*pDescriptionLength) LPSTR szDescription, + /* [annotation] */ + _Inout_opt_ UINT *pDescriptionLength); + + HRESULT ( STDMETHODCALLTYPE *CheckFeatureSupport )( + ID3D11Device4 * This, + D3D11_FEATURE Feature, + /* [annotation] */ + _Out_writes_bytes_(FeatureSupportDataSize) void *pFeatureSupportData, + UINT FeatureSupportDataSize); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + D3D_FEATURE_LEVEL ( STDMETHODCALLTYPE *GetFeatureLevel )( + ID3D11Device4 * This); + + UINT ( STDMETHODCALLTYPE *GetCreationFlags )( + ID3D11Device4 * This); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceRemovedReason )( + ID3D11Device4 * This); + + void ( STDMETHODCALLTYPE *GetImmediateContext )( + ID3D11Device4 * This, + /* [annotation] */ + _Outptr_ ID3D11DeviceContext **ppImmediateContext); + + HRESULT ( STDMETHODCALLTYPE *SetExceptionMode )( + ID3D11Device4 * This, + UINT RaiseFlags); + + UINT ( STDMETHODCALLTYPE *GetExceptionMode )( + ID3D11Device4 * This); + + void ( STDMETHODCALLTYPE *GetImmediateContext1 )( + ID3D11Device4 * This, + /* [annotation] */ + _Outptr_ ID3D11DeviceContext1 **ppImmediateContext); + + HRESULT ( STDMETHODCALLTYPE *CreateDeferredContext1 )( + ID3D11Device4 * This, + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext1 **ppDeferredContext); + + HRESULT ( STDMETHODCALLTYPE *CreateBlendState1 )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ const D3D11_BLEND_DESC1 *pBlendStateDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11BlendState1 **ppBlendState); + + HRESULT ( STDMETHODCALLTYPE *CreateRasterizerState1 )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ const D3D11_RASTERIZER_DESC1 *pRasterizerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RasterizerState1 **ppRasterizerState); + + HRESULT ( STDMETHODCALLTYPE *CreateDeviceContextState )( + ID3D11Device4 * This, + UINT Flags, + /* [annotation] */ + _In_reads_( FeatureLevels ) const D3D_FEATURE_LEVEL *pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + REFIID EmulatedInterface, + /* [annotation] */ + _Out_opt_ D3D_FEATURE_LEVEL *pChosenFeatureLevel, + /* [annotation] */ + _Out_opt_ ID3DDeviceContextState **ppContextState); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedResource1 )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _In_ REFIID returnedInterface, + /* [annotation] */ + _COM_Outptr_ void **ppResource); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedResourceByName )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ LPCWSTR lpName, + /* [annotation] */ + _In_ DWORD dwDesiredAccess, + /* [annotation] */ + _In_ REFIID returnedInterface, + /* [annotation] */ + _COM_Outptr_ void **ppResource); + + void ( STDMETHODCALLTYPE *GetImmediateContext2 )( + ID3D11Device4 * This, + /* [annotation] */ + _Outptr_ ID3D11DeviceContext2 **ppImmediateContext); + + HRESULT ( STDMETHODCALLTYPE *CreateDeferredContext2 )( + ID3D11Device4 * This, + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext2 **ppDeferredContext); + + void ( STDMETHODCALLTYPE *GetResourceTiling )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pTiledResource, + /* [annotation] */ + _Out_opt_ UINT *pNumTilesForEntireResource, + /* [annotation] */ + _Out_opt_ D3D11_PACKED_MIP_DESC *pPackedMipDesc, + /* [annotation] */ + _Out_opt_ D3D11_TILE_SHAPE *pStandardTileShapeForNonPackedMips, + /* [annotation] */ + _Inout_opt_ UINT *pNumSubresourceTilings, + /* [annotation] */ + _In_ UINT FirstSubresourceTilingToGet, + /* [annotation] */ + _Out_writes_(*pNumSubresourceTilings) D3D11_SUBRESOURCE_TILING *pSubresourceTilingsForNonPackedMips); + + HRESULT ( STDMETHODCALLTYPE *CheckMultisampleQualityLevels1 )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT SampleCount, + /* [annotation] */ + _In_ UINT Flags, + /* [annotation] */ + _Out_ UINT *pNumQualityLevels); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture2D1 )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE2D_DESC1 *pDesc1, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc1->MipLevels * pDesc1->ArraySize)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture2D1 **ppTexture2D); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture3D1 )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE3D_DESC1 *pDesc1, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc1->MipLevels)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture3D1 **ppTexture3D); + + HRESULT ( STDMETHODCALLTYPE *CreateRasterizerState2 )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ const D3D11_RASTERIZER_DESC2 *pRasterizerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RasterizerState2 **ppRasterizerState); + + HRESULT ( STDMETHODCALLTYPE *CreateShaderResourceView1 )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_SHADER_RESOURCE_VIEW_DESC1 *pDesc1, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11ShaderResourceView1 **ppSRView1); + + HRESULT ( STDMETHODCALLTYPE *CreateUnorderedAccessView1 )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_UNORDERED_ACCESS_VIEW_DESC1 *pDesc1, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11UnorderedAccessView1 **ppUAView1); + + HRESULT ( STDMETHODCALLTYPE *CreateRenderTargetView1 )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_RENDER_TARGET_VIEW_DESC1 *pDesc1, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RenderTargetView1 **ppRTView1); + + HRESULT ( STDMETHODCALLTYPE *CreateQuery1 )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ const D3D11_QUERY_DESC1 *pQueryDesc1, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Query1 **ppQuery1); + + void ( STDMETHODCALLTYPE *GetImmediateContext3 )( + ID3D11Device4 * This, + /* [annotation] */ + _Outptr_ ID3D11DeviceContext3 **ppImmediateContext); + + HRESULT ( STDMETHODCALLTYPE *CreateDeferredContext3 )( + ID3D11Device4 * This, + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext3 **ppDeferredContext); + + void ( STDMETHODCALLTYPE *WriteToSubresource )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pDstBox, + /* [annotation] */ + _In_ const void *pSrcData, + /* [annotation] */ + _In_ UINT SrcRowPitch, + /* [annotation] */ + _In_ UINT SrcDepthPitch); + + void ( STDMETHODCALLTYPE *ReadFromSubresource )( + ID3D11Device4 * This, + /* [annotation] */ + _Out_ void *pDstData, + /* [annotation] */ + _In_ UINT DstRowPitch, + /* [annotation] */ + _In_ UINT DstDepthPitch, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pSrcBox); + + HRESULT ( STDMETHODCALLTYPE *RegisterDeviceRemovedEvent )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ HANDLE hEvent, + /* [annotation] */ + _Out_ DWORD *pdwCookie); + + void ( STDMETHODCALLTYPE *UnregisterDeviceRemoved )( + ID3D11Device4 * This, + /* [annotation] */ + _In_ DWORD dwCookie); + + END_INTERFACE + } ID3D11Device4Vtbl; + + interface ID3D11Device4 + { + CONST_VTBL struct ID3D11Device4Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11Device4_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11Device4_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11Device4_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11Device4_CreateBuffer(This,pDesc,pInitialData,ppBuffer) \ + ( (This)->lpVtbl -> CreateBuffer(This,pDesc,pInitialData,ppBuffer) ) + +#define ID3D11Device4_CreateTexture1D(This,pDesc,pInitialData,ppTexture1D) \ + ( (This)->lpVtbl -> CreateTexture1D(This,pDesc,pInitialData,ppTexture1D) ) + +#define ID3D11Device4_CreateTexture2D(This,pDesc,pInitialData,ppTexture2D) \ + ( (This)->lpVtbl -> CreateTexture2D(This,pDesc,pInitialData,ppTexture2D) ) + +#define ID3D11Device4_CreateTexture3D(This,pDesc,pInitialData,ppTexture3D) \ + ( (This)->lpVtbl -> CreateTexture3D(This,pDesc,pInitialData,ppTexture3D) ) + +#define ID3D11Device4_CreateShaderResourceView(This,pResource,pDesc,ppSRView) \ + ( (This)->lpVtbl -> CreateShaderResourceView(This,pResource,pDesc,ppSRView) ) + +#define ID3D11Device4_CreateUnorderedAccessView(This,pResource,pDesc,ppUAView) \ + ( (This)->lpVtbl -> CreateUnorderedAccessView(This,pResource,pDesc,ppUAView) ) + +#define ID3D11Device4_CreateRenderTargetView(This,pResource,pDesc,ppRTView) \ + ( (This)->lpVtbl -> CreateRenderTargetView(This,pResource,pDesc,ppRTView) ) + +#define ID3D11Device4_CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView) \ + ( (This)->lpVtbl -> CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView) ) + +#define ID3D11Device4_CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout) \ + ( (This)->lpVtbl -> CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout) ) + +#define ID3D11Device4_CreateVertexShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppVertexShader) \ + ( (This)->lpVtbl -> CreateVertexShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppVertexShader) ) + +#define ID3D11Device4_CreateGeometryShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppGeometryShader) \ + ( (This)->lpVtbl -> CreateGeometryShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppGeometryShader) ) + +#define ID3D11Device4_CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,pBufferStrides,NumStrides,RasterizedStream,pClassLinkage,ppGeometryShader) \ + ( (This)->lpVtbl -> CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,pBufferStrides,NumStrides,RasterizedStream,pClassLinkage,ppGeometryShader) ) + +#define ID3D11Device4_CreatePixelShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppPixelShader) \ + ( (This)->lpVtbl -> CreatePixelShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppPixelShader) ) + +#define ID3D11Device4_CreateHullShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppHullShader) \ + ( (This)->lpVtbl -> CreateHullShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppHullShader) ) + +#define ID3D11Device4_CreateDomainShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppDomainShader) \ + ( (This)->lpVtbl -> CreateDomainShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppDomainShader) ) + +#define ID3D11Device4_CreateComputeShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppComputeShader) \ + ( (This)->lpVtbl -> CreateComputeShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppComputeShader) ) + +#define ID3D11Device4_CreateClassLinkage(This,ppLinkage) \ + ( (This)->lpVtbl -> CreateClassLinkage(This,ppLinkage) ) + +#define ID3D11Device4_CreateBlendState(This,pBlendStateDesc,ppBlendState) \ + ( (This)->lpVtbl -> CreateBlendState(This,pBlendStateDesc,ppBlendState) ) + +#define ID3D11Device4_CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState) \ + ( (This)->lpVtbl -> CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState) ) + +#define ID3D11Device4_CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState) \ + ( (This)->lpVtbl -> CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState) ) + +#define ID3D11Device4_CreateSamplerState(This,pSamplerDesc,ppSamplerState) \ + ( (This)->lpVtbl -> CreateSamplerState(This,pSamplerDesc,ppSamplerState) ) + +#define ID3D11Device4_CreateQuery(This,pQueryDesc,ppQuery) \ + ( (This)->lpVtbl -> CreateQuery(This,pQueryDesc,ppQuery) ) + +#define ID3D11Device4_CreatePredicate(This,pPredicateDesc,ppPredicate) \ + ( (This)->lpVtbl -> CreatePredicate(This,pPredicateDesc,ppPredicate) ) + +#define ID3D11Device4_CreateCounter(This,pCounterDesc,ppCounter) \ + ( (This)->lpVtbl -> CreateCounter(This,pCounterDesc,ppCounter) ) + +#define ID3D11Device4_CreateDeferredContext(This,ContextFlags,ppDeferredContext) \ + ( (This)->lpVtbl -> CreateDeferredContext(This,ContextFlags,ppDeferredContext) ) + +#define ID3D11Device4_OpenSharedResource(This,hResource,ReturnedInterface,ppResource) \ + ( (This)->lpVtbl -> OpenSharedResource(This,hResource,ReturnedInterface,ppResource) ) + +#define ID3D11Device4_CheckFormatSupport(This,Format,pFormatSupport) \ + ( (This)->lpVtbl -> CheckFormatSupport(This,Format,pFormatSupport) ) + +#define ID3D11Device4_CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels) \ + ( (This)->lpVtbl -> CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels) ) + +#define ID3D11Device4_CheckCounterInfo(This,pCounterInfo) \ + ( (This)->lpVtbl -> CheckCounterInfo(This,pCounterInfo) ) + +#define ID3D11Device4_CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength) \ + ( (This)->lpVtbl -> CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength) ) + +#define ID3D11Device4_CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) \ + ( (This)->lpVtbl -> CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) ) + +#define ID3D11Device4_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11Device4_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11Device4_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D11Device4_GetFeatureLevel(This) \ + ( (This)->lpVtbl -> GetFeatureLevel(This) ) + +#define ID3D11Device4_GetCreationFlags(This) \ + ( (This)->lpVtbl -> GetCreationFlags(This) ) + +#define ID3D11Device4_GetDeviceRemovedReason(This) \ + ( (This)->lpVtbl -> GetDeviceRemovedReason(This) ) + +#define ID3D11Device4_GetImmediateContext(This,ppImmediateContext) \ + ( (This)->lpVtbl -> GetImmediateContext(This,ppImmediateContext) ) + +#define ID3D11Device4_SetExceptionMode(This,RaiseFlags) \ + ( (This)->lpVtbl -> SetExceptionMode(This,RaiseFlags) ) + +#define ID3D11Device4_GetExceptionMode(This) \ + ( (This)->lpVtbl -> GetExceptionMode(This) ) + + +#define ID3D11Device4_GetImmediateContext1(This,ppImmediateContext) \ + ( (This)->lpVtbl -> GetImmediateContext1(This,ppImmediateContext) ) + +#define ID3D11Device4_CreateDeferredContext1(This,ContextFlags,ppDeferredContext) \ + ( (This)->lpVtbl -> CreateDeferredContext1(This,ContextFlags,ppDeferredContext) ) + +#define ID3D11Device4_CreateBlendState1(This,pBlendStateDesc,ppBlendState) \ + ( (This)->lpVtbl -> CreateBlendState1(This,pBlendStateDesc,ppBlendState) ) + +#define ID3D11Device4_CreateRasterizerState1(This,pRasterizerDesc,ppRasterizerState) \ + ( (This)->lpVtbl -> CreateRasterizerState1(This,pRasterizerDesc,ppRasterizerState) ) + +#define ID3D11Device4_CreateDeviceContextState(This,Flags,pFeatureLevels,FeatureLevels,SDKVersion,EmulatedInterface,pChosenFeatureLevel,ppContextState) \ + ( (This)->lpVtbl -> CreateDeviceContextState(This,Flags,pFeatureLevels,FeatureLevels,SDKVersion,EmulatedInterface,pChosenFeatureLevel,ppContextState) ) + +#define ID3D11Device4_OpenSharedResource1(This,hResource,returnedInterface,ppResource) \ + ( (This)->lpVtbl -> OpenSharedResource1(This,hResource,returnedInterface,ppResource) ) + +#define ID3D11Device4_OpenSharedResourceByName(This,lpName,dwDesiredAccess,returnedInterface,ppResource) \ + ( (This)->lpVtbl -> OpenSharedResourceByName(This,lpName,dwDesiredAccess,returnedInterface,ppResource) ) + + +#define ID3D11Device4_GetImmediateContext2(This,ppImmediateContext) \ + ( (This)->lpVtbl -> GetImmediateContext2(This,ppImmediateContext) ) + +#define ID3D11Device4_CreateDeferredContext2(This,ContextFlags,ppDeferredContext) \ + ( (This)->lpVtbl -> CreateDeferredContext2(This,ContextFlags,ppDeferredContext) ) + +#define ID3D11Device4_GetResourceTiling(This,pTiledResource,pNumTilesForEntireResource,pPackedMipDesc,pStandardTileShapeForNonPackedMips,pNumSubresourceTilings,FirstSubresourceTilingToGet,pSubresourceTilingsForNonPackedMips) \ + ( (This)->lpVtbl -> GetResourceTiling(This,pTiledResource,pNumTilesForEntireResource,pPackedMipDesc,pStandardTileShapeForNonPackedMips,pNumSubresourceTilings,FirstSubresourceTilingToGet,pSubresourceTilingsForNonPackedMips) ) + +#define ID3D11Device4_CheckMultisampleQualityLevels1(This,Format,SampleCount,Flags,pNumQualityLevels) \ + ( (This)->lpVtbl -> CheckMultisampleQualityLevels1(This,Format,SampleCount,Flags,pNumQualityLevels) ) + + +#define ID3D11Device4_CreateTexture2D1(This,pDesc1,pInitialData,ppTexture2D) \ + ( (This)->lpVtbl -> CreateTexture2D1(This,pDesc1,pInitialData,ppTexture2D) ) + +#define ID3D11Device4_CreateTexture3D1(This,pDesc1,pInitialData,ppTexture3D) \ + ( (This)->lpVtbl -> CreateTexture3D1(This,pDesc1,pInitialData,ppTexture3D) ) + +#define ID3D11Device4_CreateRasterizerState2(This,pRasterizerDesc,ppRasterizerState) \ + ( (This)->lpVtbl -> CreateRasterizerState2(This,pRasterizerDesc,ppRasterizerState) ) + +#define ID3D11Device4_CreateShaderResourceView1(This,pResource,pDesc1,ppSRView1) \ + ( (This)->lpVtbl -> CreateShaderResourceView1(This,pResource,pDesc1,ppSRView1) ) + +#define ID3D11Device4_CreateUnorderedAccessView1(This,pResource,pDesc1,ppUAView1) \ + ( (This)->lpVtbl -> CreateUnorderedAccessView1(This,pResource,pDesc1,ppUAView1) ) + +#define ID3D11Device4_CreateRenderTargetView1(This,pResource,pDesc1,ppRTView1) \ + ( (This)->lpVtbl -> CreateRenderTargetView1(This,pResource,pDesc1,ppRTView1) ) + +#define ID3D11Device4_CreateQuery1(This,pQueryDesc1,ppQuery1) \ + ( (This)->lpVtbl -> CreateQuery1(This,pQueryDesc1,ppQuery1) ) + +#define ID3D11Device4_GetImmediateContext3(This,ppImmediateContext) \ + ( (This)->lpVtbl -> GetImmediateContext3(This,ppImmediateContext) ) + +#define ID3D11Device4_CreateDeferredContext3(This,ContextFlags,ppDeferredContext) \ + ( (This)->lpVtbl -> CreateDeferredContext3(This,ContextFlags,ppDeferredContext) ) + +#define ID3D11Device4_WriteToSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) \ + ( (This)->lpVtbl -> WriteToSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) ) + +#define ID3D11Device4_ReadFromSubresource(This,pDstData,DstRowPitch,DstDepthPitch,pSrcResource,SrcSubresource,pSrcBox) \ + ( (This)->lpVtbl -> ReadFromSubresource(This,pDstData,DstRowPitch,DstDepthPitch,pSrcResource,SrcSubresource,pSrcBox) ) + + +#define ID3D11Device4_RegisterDeviceRemovedEvent(This,hEvent,pdwCookie) \ + ( (This)->lpVtbl -> RegisterDeviceRemovedEvent(This,hEvent,pdwCookie) ) + +#define ID3D11Device4_UnregisterDeviceRemoved(This,dwCookie) \ + ( (This)->lpVtbl -> UnregisterDeviceRemoved(This,dwCookie) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11Device4_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11Device5_INTERFACE_DEFINED__ +#define __ID3D11Device5_INTERFACE_DEFINED__ + +/* interface ID3D11Device5 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11Device5; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("8ffde202-a0e7-45df-9e01-e837801b5ea0") + ID3D11Device5 : public ID3D11Device4 + { + public: + virtual HRESULT STDMETHODCALLTYPE OpenSharedFence( + /* [annotation] */ + _In_ HANDLE hFence, + /* [annotation] */ + _In_ REFIID ReturnedInterface, + /* [annotation] */ + _COM_Outptr_opt_ void **ppFence) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateFence( + /* [annotation] */ + _In_ UINT64 InitialValue, + /* [annotation] */ + _In_ D3D11_FENCE_FLAG Flags, + /* [annotation] */ + _In_ REFIID ReturnedInterface, + /* [annotation] */ + _COM_Outptr_opt_ void **ppFence) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11Device5Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11Device5 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11Device5 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11Device5 * This); + + HRESULT ( STDMETHODCALLTYPE *CreateBuffer )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ const D3D11_BUFFER_DESC *pDesc, + /* [annotation] */ + _In_opt_ const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Buffer **ppBuffer); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture1D )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE1D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels * pDesc->ArraySize)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture1D **ppTexture1D); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture2D )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE2D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels * pDesc->ArraySize)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture2D **ppTexture2D); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture3D )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE3D_DESC *pDesc, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc->MipLevels)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture3D **ppTexture3D); + + HRESULT ( STDMETHODCALLTYPE *CreateShaderResourceView )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11ShaderResourceView **ppSRView); + + HRESULT ( STDMETHODCALLTYPE *CreateUnorderedAccessView )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11UnorderedAccessView **ppUAView); + + HRESULT ( STDMETHODCALLTYPE *CreateRenderTargetView )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_RENDER_TARGET_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RenderTargetView **ppRTView); + + HRESULT ( STDMETHODCALLTYPE *CreateDepthStencilView )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DepthStencilView **ppDepthStencilView); + + HRESULT ( STDMETHODCALLTYPE *CreateInputLayout )( + ID3D11Device5 * This, + /* [annotation] */ + _In_reads_(NumElements) const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs, + /* [annotation] */ + _In_range_( 0, D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT ) UINT NumElements, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecodeWithInputSignature, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11InputLayout **ppInputLayout); + + HRESULT ( STDMETHODCALLTYPE *CreateVertexShader )( + ID3D11Device5 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11VertexShader **ppVertexShader); + + HRESULT ( STDMETHODCALLTYPE *CreateGeometryShader )( + ID3D11Device5 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11GeometryShader **ppGeometryShader); + + HRESULT ( STDMETHODCALLTYPE *CreateGeometryShaderWithStreamOutput )( + ID3D11Device5 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_reads_opt_(NumEntries) const D3D11_SO_DECLARATION_ENTRY *pSODeclaration, + /* [annotation] */ + _In_range_( 0, D3D11_SO_STREAM_COUNT * D3D11_SO_OUTPUT_COMPONENT_COUNT ) UINT NumEntries, + /* [annotation] */ + _In_reads_opt_(NumStrides) const UINT *pBufferStrides, + /* [annotation] */ + _In_range_( 0, D3D11_SO_BUFFER_SLOT_COUNT ) UINT NumStrides, + /* [annotation] */ + _In_ UINT RasterizedStream, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11GeometryShader **ppGeometryShader); + + HRESULT ( STDMETHODCALLTYPE *CreatePixelShader )( + ID3D11Device5 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11PixelShader **ppPixelShader); + + HRESULT ( STDMETHODCALLTYPE *CreateHullShader )( + ID3D11Device5 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11HullShader **ppHullShader); + + HRESULT ( STDMETHODCALLTYPE *CreateDomainShader )( + ID3D11Device5 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DomainShader **ppDomainShader); + + HRESULT ( STDMETHODCALLTYPE *CreateComputeShader )( + ID3D11Device5 * This, + /* [annotation] */ + _In_reads_(BytecodeLength) const void *pShaderBytecode, + /* [annotation] */ + _In_ SIZE_T BytecodeLength, + /* [annotation] */ + _In_opt_ ID3D11ClassLinkage *pClassLinkage, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11ComputeShader **ppComputeShader); + + HRESULT ( STDMETHODCALLTYPE *CreateClassLinkage )( + ID3D11Device5 * This, + /* [annotation] */ + _COM_Outptr_ ID3D11ClassLinkage **ppLinkage); + + HRESULT ( STDMETHODCALLTYPE *CreateBlendState )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ const D3D11_BLEND_DESC *pBlendStateDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11BlendState **ppBlendState); + + HRESULT ( STDMETHODCALLTYPE *CreateDepthStencilState )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DepthStencilState **ppDepthStencilState); + + HRESULT ( STDMETHODCALLTYPE *CreateRasterizerState )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ const D3D11_RASTERIZER_DESC *pRasterizerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RasterizerState **ppRasterizerState); + + HRESULT ( STDMETHODCALLTYPE *CreateSamplerState )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ const D3D11_SAMPLER_DESC *pSamplerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11SamplerState **ppSamplerState); + + HRESULT ( STDMETHODCALLTYPE *CreateQuery )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ const D3D11_QUERY_DESC *pQueryDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Query **ppQuery); + + HRESULT ( STDMETHODCALLTYPE *CreatePredicate )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ const D3D11_QUERY_DESC *pPredicateDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Predicate **ppPredicate); + + HRESULT ( STDMETHODCALLTYPE *CreateCounter )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ const D3D11_COUNTER_DESC *pCounterDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Counter **ppCounter); + + HRESULT ( STDMETHODCALLTYPE *CreateDeferredContext )( + ID3D11Device5 * This, + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext **ppDeferredContext); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedResource )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _In_ REFIID ReturnedInterface, + /* [annotation] */ + _COM_Outptr_opt_ void **ppResource); + + HRESULT ( STDMETHODCALLTYPE *CheckFormatSupport )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _Out_ UINT *pFormatSupport); + + HRESULT ( STDMETHODCALLTYPE *CheckMultisampleQualityLevels )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT SampleCount, + /* [annotation] */ + _Out_ UINT *pNumQualityLevels); + + void ( STDMETHODCALLTYPE *CheckCounterInfo )( + ID3D11Device5 * This, + /* [annotation] */ + _Out_ D3D11_COUNTER_INFO *pCounterInfo); + + HRESULT ( STDMETHODCALLTYPE *CheckCounter )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ const D3D11_COUNTER_DESC *pDesc, + /* [annotation] */ + _Out_ D3D11_COUNTER_TYPE *pType, + /* [annotation] */ + _Out_ UINT *pActiveCounters, + /* [annotation] */ + _Out_writes_opt_(*pNameLength) LPSTR szName, + /* [annotation] */ + _Inout_opt_ UINT *pNameLength, + /* [annotation] */ + _Out_writes_opt_(*pUnitsLength) LPSTR szUnits, + /* [annotation] */ + _Inout_opt_ UINT *pUnitsLength, + /* [annotation] */ + _Out_writes_opt_(*pDescriptionLength) LPSTR szDescription, + /* [annotation] */ + _Inout_opt_ UINT *pDescriptionLength); + + HRESULT ( STDMETHODCALLTYPE *CheckFeatureSupport )( + ID3D11Device5 * This, + D3D11_FEATURE Feature, + /* [annotation] */ + _Out_writes_bytes_(FeatureSupportDataSize) void *pFeatureSupportData, + UINT FeatureSupportDataSize); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + D3D_FEATURE_LEVEL ( STDMETHODCALLTYPE *GetFeatureLevel )( + ID3D11Device5 * This); + + UINT ( STDMETHODCALLTYPE *GetCreationFlags )( + ID3D11Device5 * This); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceRemovedReason )( + ID3D11Device5 * This); + + void ( STDMETHODCALLTYPE *GetImmediateContext )( + ID3D11Device5 * This, + /* [annotation] */ + _Outptr_ ID3D11DeviceContext **ppImmediateContext); + + HRESULT ( STDMETHODCALLTYPE *SetExceptionMode )( + ID3D11Device5 * This, + UINT RaiseFlags); + + UINT ( STDMETHODCALLTYPE *GetExceptionMode )( + ID3D11Device5 * This); + + void ( STDMETHODCALLTYPE *GetImmediateContext1 )( + ID3D11Device5 * This, + /* [annotation] */ + _Outptr_ ID3D11DeviceContext1 **ppImmediateContext); + + HRESULT ( STDMETHODCALLTYPE *CreateDeferredContext1 )( + ID3D11Device5 * This, + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext1 **ppDeferredContext); + + HRESULT ( STDMETHODCALLTYPE *CreateBlendState1 )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ const D3D11_BLEND_DESC1 *pBlendStateDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11BlendState1 **ppBlendState); + + HRESULT ( STDMETHODCALLTYPE *CreateRasterizerState1 )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ const D3D11_RASTERIZER_DESC1 *pRasterizerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RasterizerState1 **ppRasterizerState); + + HRESULT ( STDMETHODCALLTYPE *CreateDeviceContextState )( + ID3D11Device5 * This, + UINT Flags, + /* [annotation] */ + _In_reads_( FeatureLevels ) const D3D_FEATURE_LEVEL *pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + REFIID EmulatedInterface, + /* [annotation] */ + _Out_opt_ D3D_FEATURE_LEVEL *pChosenFeatureLevel, + /* [annotation] */ + _Out_opt_ ID3DDeviceContextState **ppContextState); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedResource1 )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _In_ REFIID returnedInterface, + /* [annotation] */ + _COM_Outptr_ void **ppResource); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedResourceByName )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ LPCWSTR lpName, + /* [annotation] */ + _In_ DWORD dwDesiredAccess, + /* [annotation] */ + _In_ REFIID returnedInterface, + /* [annotation] */ + _COM_Outptr_ void **ppResource); + + void ( STDMETHODCALLTYPE *GetImmediateContext2 )( + ID3D11Device5 * This, + /* [annotation] */ + _Outptr_ ID3D11DeviceContext2 **ppImmediateContext); + + HRESULT ( STDMETHODCALLTYPE *CreateDeferredContext2 )( + ID3D11Device5 * This, + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext2 **ppDeferredContext); + + void ( STDMETHODCALLTYPE *GetResourceTiling )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ ID3D11Resource *pTiledResource, + /* [annotation] */ + _Out_opt_ UINT *pNumTilesForEntireResource, + /* [annotation] */ + _Out_opt_ D3D11_PACKED_MIP_DESC *pPackedMipDesc, + /* [annotation] */ + _Out_opt_ D3D11_TILE_SHAPE *pStandardTileShapeForNonPackedMips, + /* [annotation] */ + _Inout_opt_ UINT *pNumSubresourceTilings, + /* [annotation] */ + _In_ UINT FirstSubresourceTilingToGet, + /* [annotation] */ + _Out_writes_(*pNumSubresourceTilings) D3D11_SUBRESOURCE_TILING *pSubresourceTilingsForNonPackedMips); + + HRESULT ( STDMETHODCALLTYPE *CheckMultisampleQualityLevels1 )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ DXGI_FORMAT Format, + /* [annotation] */ + _In_ UINT SampleCount, + /* [annotation] */ + _In_ UINT Flags, + /* [annotation] */ + _Out_ UINT *pNumQualityLevels); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture2D1 )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE2D_DESC1 *pDesc1, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc1->MipLevels * pDesc1->ArraySize)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture2D1 **ppTexture2D); + + HRESULT ( STDMETHODCALLTYPE *CreateTexture3D1 )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ const D3D11_TEXTURE3D_DESC1 *pDesc1, + /* [annotation] */ + _In_reads_opt_(_Inexpressible_(pDesc1->MipLevels)) const D3D11_SUBRESOURCE_DATA *pInitialData, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Texture3D1 **ppTexture3D); + + HRESULT ( STDMETHODCALLTYPE *CreateRasterizerState2 )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ const D3D11_RASTERIZER_DESC2 *pRasterizerDesc, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RasterizerState2 **ppRasterizerState); + + HRESULT ( STDMETHODCALLTYPE *CreateShaderResourceView1 )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_SHADER_RESOURCE_VIEW_DESC1 *pDesc1, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11ShaderResourceView1 **ppSRView1); + + HRESULT ( STDMETHODCALLTYPE *CreateUnorderedAccessView1 )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_UNORDERED_ACCESS_VIEW_DESC1 *pDesc1, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11UnorderedAccessView1 **ppUAView1); + + HRESULT ( STDMETHODCALLTYPE *CreateRenderTargetView1 )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ ID3D11Resource *pResource, + /* [annotation] */ + _In_opt_ const D3D11_RENDER_TARGET_VIEW_DESC1 *pDesc1, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11RenderTargetView1 **ppRTView1); + + HRESULT ( STDMETHODCALLTYPE *CreateQuery1 )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ const D3D11_QUERY_DESC1 *pQueryDesc1, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11Query1 **ppQuery1); + + void ( STDMETHODCALLTYPE *GetImmediateContext3 )( + ID3D11Device5 * This, + /* [annotation] */ + _Outptr_ ID3D11DeviceContext3 **ppImmediateContext); + + HRESULT ( STDMETHODCALLTYPE *CreateDeferredContext3 )( + ID3D11Device5 * This, + UINT ContextFlags, + /* [annotation] */ + _COM_Outptr_opt_ ID3D11DeviceContext3 **ppDeferredContext); + + void ( STDMETHODCALLTYPE *WriteToSubresource )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ ID3D11Resource *pDstResource, + /* [annotation] */ + _In_ UINT DstSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pDstBox, + /* [annotation] */ + _In_ const void *pSrcData, + /* [annotation] */ + _In_ UINT SrcRowPitch, + /* [annotation] */ + _In_ UINT SrcDepthPitch); + + void ( STDMETHODCALLTYPE *ReadFromSubresource )( + ID3D11Device5 * This, + /* [annotation] */ + _Out_ void *pDstData, + /* [annotation] */ + _In_ UINT DstRowPitch, + /* [annotation] */ + _In_ UINT DstDepthPitch, + /* [annotation] */ + _In_ ID3D11Resource *pSrcResource, + /* [annotation] */ + _In_ UINT SrcSubresource, + /* [annotation] */ + _In_opt_ const D3D11_BOX *pSrcBox); + + HRESULT ( STDMETHODCALLTYPE *RegisterDeviceRemovedEvent )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ HANDLE hEvent, + /* [annotation] */ + _Out_ DWORD *pdwCookie); + + void ( STDMETHODCALLTYPE *UnregisterDeviceRemoved )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ DWORD dwCookie); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedFence )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ HANDLE hFence, + /* [annotation] */ + _In_ REFIID ReturnedInterface, + /* [annotation] */ + _COM_Outptr_opt_ void **ppFence); + + HRESULT ( STDMETHODCALLTYPE *CreateFence )( + ID3D11Device5 * This, + /* [annotation] */ + _In_ UINT64 InitialValue, + /* [annotation] */ + _In_ D3D11_FENCE_FLAG Flags, + /* [annotation] */ + _In_ REFIID ReturnedInterface, + /* [annotation] */ + _COM_Outptr_opt_ void **ppFence); + + END_INTERFACE + } ID3D11Device5Vtbl; + + interface ID3D11Device5 + { + CONST_VTBL struct ID3D11Device5Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11Device5_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11Device5_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11Device5_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11Device5_CreateBuffer(This,pDesc,pInitialData,ppBuffer) \ + ( (This)->lpVtbl -> CreateBuffer(This,pDesc,pInitialData,ppBuffer) ) + +#define ID3D11Device5_CreateTexture1D(This,pDesc,pInitialData,ppTexture1D) \ + ( (This)->lpVtbl -> CreateTexture1D(This,pDesc,pInitialData,ppTexture1D) ) + +#define ID3D11Device5_CreateTexture2D(This,pDesc,pInitialData,ppTexture2D) \ + ( (This)->lpVtbl -> CreateTexture2D(This,pDesc,pInitialData,ppTexture2D) ) + +#define ID3D11Device5_CreateTexture3D(This,pDesc,pInitialData,ppTexture3D) \ + ( (This)->lpVtbl -> CreateTexture3D(This,pDesc,pInitialData,ppTexture3D) ) + +#define ID3D11Device5_CreateShaderResourceView(This,pResource,pDesc,ppSRView) \ + ( (This)->lpVtbl -> CreateShaderResourceView(This,pResource,pDesc,ppSRView) ) + +#define ID3D11Device5_CreateUnorderedAccessView(This,pResource,pDesc,ppUAView) \ + ( (This)->lpVtbl -> CreateUnorderedAccessView(This,pResource,pDesc,ppUAView) ) + +#define ID3D11Device5_CreateRenderTargetView(This,pResource,pDesc,ppRTView) \ + ( (This)->lpVtbl -> CreateRenderTargetView(This,pResource,pDesc,ppRTView) ) + +#define ID3D11Device5_CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView) \ + ( (This)->lpVtbl -> CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView) ) + +#define ID3D11Device5_CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout) \ + ( (This)->lpVtbl -> CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout) ) + +#define ID3D11Device5_CreateVertexShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppVertexShader) \ + ( (This)->lpVtbl -> CreateVertexShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppVertexShader) ) + +#define ID3D11Device5_CreateGeometryShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppGeometryShader) \ + ( (This)->lpVtbl -> CreateGeometryShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppGeometryShader) ) + +#define ID3D11Device5_CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,pBufferStrides,NumStrides,RasterizedStream,pClassLinkage,ppGeometryShader) \ + ( (This)->lpVtbl -> CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,pBufferStrides,NumStrides,RasterizedStream,pClassLinkage,ppGeometryShader) ) + +#define ID3D11Device5_CreatePixelShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppPixelShader) \ + ( (This)->lpVtbl -> CreatePixelShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppPixelShader) ) + +#define ID3D11Device5_CreateHullShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppHullShader) \ + ( (This)->lpVtbl -> CreateHullShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppHullShader) ) + +#define ID3D11Device5_CreateDomainShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppDomainShader) \ + ( (This)->lpVtbl -> CreateDomainShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppDomainShader) ) + +#define ID3D11Device5_CreateComputeShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppComputeShader) \ + ( (This)->lpVtbl -> CreateComputeShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppComputeShader) ) + +#define ID3D11Device5_CreateClassLinkage(This,ppLinkage) \ + ( (This)->lpVtbl -> CreateClassLinkage(This,ppLinkage) ) + +#define ID3D11Device5_CreateBlendState(This,pBlendStateDesc,ppBlendState) \ + ( (This)->lpVtbl -> CreateBlendState(This,pBlendStateDesc,ppBlendState) ) + +#define ID3D11Device5_CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState) \ + ( (This)->lpVtbl -> CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState) ) + +#define ID3D11Device5_CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState) \ + ( (This)->lpVtbl -> CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState) ) + +#define ID3D11Device5_CreateSamplerState(This,pSamplerDesc,ppSamplerState) \ + ( (This)->lpVtbl -> CreateSamplerState(This,pSamplerDesc,ppSamplerState) ) + +#define ID3D11Device5_CreateQuery(This,pQueryDesc,ppQuery) \ + ( (This)->lpVtbl -> CreateQuery(This,pQueryDesc,ppQuery) ) + +#define ID3D11Device5_CreatePredicate(This,pPredicateDesc,ppPredicate) \ + ( (This)->lpVtbl -> CreatePredicate(This,pPredicateDesc,ppPredicate) ) + +#define ID3D11Device5_CreateCounter(This,pCounterDesc,ppCounter) \ + ( (This)->lpVtbl -> CreateCounter(This,pCounterDesc,ppCounter) ) + +#define ID3D11Device5_CreateDeferredContext(This,ContextFlags,ppDeferredContext) \ + ( (This)->lpVtbl -> CreateDeferredContext(This,ContextFlags,ppDeferredContext) ) + +#define ID3D11Device5_OpenSharedResource(This,hResource,ReturnedInterface,ppResource) \ + ( (This)->lpVtbl -> OpenSharedResource(This,hResource,ReturnedInterface,ppResource) ) + +#define ID3D11Device5_CheckFormatSupport(This,Format,pFormatSupport) \ + ( (This)->lpVtbl -> CheckFormatSupport(This,Format,pFormatSupport) ) + +#define ID3D11Device5_CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels) \ + ( (This)->lpVtbl -> CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels) ) + +#define ID3D11Device5_CheckCounterInfo(This,pCounterInfo) \ + ( (This)->lpVtbl -> CheckCounterInfo(This,pCounterInfo) ) + +#define ID3D11Device5_CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength) \ + ( (This)->lpVtbl -> CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength) ) + +#define ID3D11Device5_CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) \ + ( (This)->lpVtbl -> CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) ) + +#define ID3D11Device5_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11Device5_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11Device5_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D11Device5_GetFeatureLevel(This) \ + ( (This)->lpVtbl -> GetFeatureLevel(This) ) + +#define ID3D11Device5_GetCreationFlags(This) \ + ( (This)->lpVtbl -> GetCreationFlags(This) ) + +#define ID3D11Device5_GetDeviceRemovedReason(This) \ + ( (This)->lpVtbl -> GetDeviceRemovedReason(This) ) + +#define ID3D11Device5_GetImmediateContext(This,ppImmediateContext) \ + ( (This)->lpVtbl -> GetImmediateContext(This,ppImmediateContext) ) + +#define ID3D11Device5_SetExceptionMode(This,RaiseFlags) \ + ( (This)->lpVtbl -> SetExceptionMode(This,RaiseFlags) ) + +#define ID3D11Device5_GetExceptionMode(This) \ + ( (This)->lpVtbl -> GetExceptionMode(This) ) + + +#define ID3D11Device5_GetImmediateContext1(This,ppImmediateContext) \ + ( (This)->lpVtbl -> GetImmediateContext1(This,ppImmediateContext) ) + +#define ID3D11Device5_CreateDeferredContext1(This,ContextFlags,ppDeferredContext) \ + ( (This)->lpVtbl -> CreateDeferredContext1(This,ContextFlags,ppDeferredContext) ) + +#define ID3D11Device5_CreateBlendState1(This,pBlendStateDesc,ppBlendState) \ + ( (This)->lpVtbl -> CreateBlendState1(This,pBlendStateDesc,ppBlendState) ) + +#define ID3D11Device5_CreateRasterizerState1(This,pRasterizerDesc,ppRasterizerState) \ + ( (This)->lpVtbl -> CreateRasterizerState1(This,pRasterizerDesc,ppRasterizerState) ) + +#define ID3D11Device5_CreateDeviceContextState(This,Flags,pFeatureLevels,FeatureLevels,SDKVersion,EmulatedInterface,pChosenFeatureLevel,ppContextState) \ + ( (This)->lpVtbl -> CreateDeviceContextState(This,Flags,pFeatureLevels,FeatureLevels,SDKVersion,EmulatedInterface,pChosenFeatureLevel,ppContextState) ) + +#define ID3D11Device5_OpenSharedResource1(This,hResource,returnedInterface,ppResource) \ + ( (This)->lpVtbl -> OpenSharedResource1(This,hResource,returnedInterface,ppResource) ) + +#define ID3D11Device5_OpenSharedResourceByName(This,lpName,dwDesiredAccess,returnedInterface,ppResource) \ + ( (This)->lpVtbl -> OpenSharedResourceByName(This,lpName,dwDesiredAccess,returnedInterface,ppResource) ) + + +#define ID3D11Device5_GetImmediateContext2(This,ppImmediateContext) \ + ( (This)->lpVtbl -> GetImmediateContext2(This,ppImmediateContext) ) + +#define ID3D11Device5_CreateDeferredContext2(This,ContextFlags,ppDeferredContext) \ + ( (This)->lpVtbl -> CreateDeferredContext2(This,ContextFlags,ppDeferredContext) ) + +#define ID3D11Device5_GetResourceTiling(This,pTiledResource,pNumTilesForEntireResource,pPackedMipDesc,pStandardTileShapeForNonPackedMips,pNumSubresourceTilings,FirstSubresourceTilingToGet,pSubresourceTilingsForNonPackedMips) \ + ( (This)->lpVtbl -> GetResourceTiling(This,pTiledResource,pNumTilesForEntireResource,pPackedMipDesc,pStandardTileShapeForNonPackedMips,pNumSubresourceTilings,FirstSubresourceTilingToGet,pSubresourceTilingsForNonPackedMips) ) + +#define ID3D11Device5_CheckMultisampleQualityLevels1(This,Format,SampleCount,Flags,pNumQualityLevels) \ + ( (This)->lpVtbl -> CheckMultisampleQualityLevels1(This,Format,SampleCount,Flags,pNumQualityLevels) ) + + +#define ID3D11Device5_CreateTexture2D1(This,pDesc1,pInitialData,ppTexture2D) \ + ( (This)->lpVtbl -> CreateTexture2D1(This,pDesc1,pInitialData,ppTexture2D) ) + +#define ID3D11Device5_CreateTexture3D1(This,pDesc1,pInitialData,ppTexture3D) \ + ( (This)->lpVtbl -> CreateTexture3D1(This,pDesc1,pInitialData,ppTexture3D) ) + +#define ID3D11Device5_CreateRasterizerState2(This,pRasterizerDesc,ppRasterizerState) \ + ( (This)->lpVtbl -> CreateRasterizerState2(This,pRasterizerDesc,ppRasterizerState) ) + +#define ID3D11Device5_CreateShaderResourceView1(This,pResource,pDesc1,ppSRView1) \ + ( (This)->lpVtbl -> CreateShaderResourceView1(This,pResource,pDesc1,ppSRView1) ) + +#define ID3D11Device5_CreateUnorderedAccessView1(This,pResource,pDesc1,ppUAView1) \ + ( (This)->lpVtbl -> CreateUnorderedAccessView1(This,pResource,pDesc1,ppUAView1) ) + +#define ID3D11Device5_CreateRenderTargetView1(This,pResource,pDesc1,ppRTView1) \ + ( (This)->lpVtbl -> CreateRenderTargetView1(This,pResource,pDesc1,ppRTView1) ) + +#define ID3D11Device5_CreateQuery1(This,pQueryDesc1,ppQuery1) \ + ( (This)->lpVtbl -> CreateQuery1(This,pQueryDesc1,ppQuery1) ) + +#define ID3D11Device5_GetImmediateContext3(This,ppImmediateContext) \ + ( (This)->lpVtbl -> GetImmediateContext3(This,ppImmediateContext) ) + +#define ID3D11Device5_CreateDeferredContext3(This,ContextFlags,ppDeferredContext) \ + ( (This)->lpVtbl -> CreateDeferredContext3(This,ContextFlags,ppDeferredContext) ) + +#define ID3D11Device5_WriteToSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) \ + ( (This)->lpVtbl -> WriteToSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) ) + +#define ID3D11Device5_ReadFromSubresource(This,pDstData,DstRowPitch,DstDepthPitch,pSrcResource,SrcSubresource,pSrcBox) \ + ( (This)->lpVtbl -> ReadFromSubresource(This,pDstData,DstRowPitch,DstDepthPitch,pSrcResource,SrcSubresource,pSrcBox) ) + + +#define ID3D11Device5_RegisterDeviceRemovedEvent(This,hEvent,pdwCookie) \ + ( (This)->lpVtbl -> RegisterDeviceRemovedEvent(This,hEvent,pdwCookie) ) + +#define ID3D11Device5_UnregisterDeviceRemoved(This,dwCookie) \ + ( (This)->lpVtbl -> UnregisterDeviceRemoved(This,dwCookie) ) + + +#define ID3D11Device5_OpenSharedFence(This,hFence,ReturnedInterface,ppFence) \ + ( (This)->lpVtbl -> OpenSharedFence(This,hFence,ReturnedInterface,ppFence) ) + +#define ID3D11Device5_CreateFence(This,InitialValue,Flags,ReturnedInterface,ppFence) \ + ( (This)->lpVtbl -> CreateFence(This,InitialValue,Flags,ReturnedInterface,ppFence) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11Device5_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11Multithread_INTERFACE_DEFINED__ +#define __ID3D11Multithread_INTERFACE_DEFINED__ + +/* interface ID3D11Multithread */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11Multithread; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B7E4E00-342C-4106-A19F-4F2704F689F0") + ID3D11Multithread : public IUnknown + { + public: + virtual void STDMETHODCALLTYPE Enter( void) = 0; + + virtual void STDMETHODCALLTYPE Leave( void) = 0; + + virtual BOOL STDMETHODCALLTYPE SetMultithreadProtected( + /* [annotation] */ + _In_ BOOL bMTProtect) = 0; + + virtual BOOL STDMETHODCALLTYPE GetMultithreadProtected( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11MultithreadVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11Multithread * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11Multithread * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11Multithread * This); + + void ( STDMETHODCALLTYPE *Enter )( + ID3D11Multithread * This); + + void ( STDMETHODCALLTYPE *Leave )( + ID3D11Multithread * This); + + BOOL ( STDMETHODCALLTYPE *SetMultithreadProtected )( + ID3D11Multithread * This, + /* [annotation] */ + _In_ BOOL bMTProtect); + + BOOL ( STDMETHODCALLTYPE *GetMultithreadProtected )( + ID3D11Multithread * This); + + END_INTERFACE + } ID3D11MultithreadVtbl; + + interface ID3D11Multithread + { + CONST_VTBL struct ID3D11MultithreadVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11Multithread_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11Multithread_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11Multithread_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11Multithread_Enter(This) \ + ( (This)->lpVtbl -> Enter(This) ) + +#define ID3D11Multithread_Leave(This) \ + ( (This)->lpVtbl -> Leave(This) ) + +#define ID3D11Multithread_SetMultithreadProtected(This,bMTProtect) \ + ( (This)->lpVtbl -> SetMultithreadProtected(This,bMTProtect) ) + +#define ID3D11Multithread_GetMultithreadProtected(This) \ + ( (This)->lpVtbl -> GetMultithreadProtected(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11Multithread_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11VideoContext2_INTERFACE_DEFINED__ +#define __ID3D11VideoContext2_INTERFACE_DEFINED__ + +/* interface ID3D11VideoContext2 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11VideoContext2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C4E7374C-6243-4D1B-AE87-52B4F740E261") + ID3D11VideoContext2 : public ID3D11VideoContext1 + { + public: + virtual void STDMETHODCALLTYPE VideoProcessorSetOutputHDRMetaData( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ DXGI_HDR_METADATA_TYPE Type, + /* [annotation] */ + _In_ UINT Size, + /* [annotation] */ + _In_reads_bytes_opt_(Size) const void *pHDRMetaData) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetOutputHDRMetaData( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ DXGI_HDR_METADATA_TYPE *pType, + /* [annotation] */ + _In_ UINT Size, + /* [annotation] */ + _Out_writes_bytes_opt_(Size) void *pMetaData) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamHDRMetaData( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ DXGI_HDR_METADATA_TYPE Type, + /* [annotation] */ + _In_ UINT Size, + /* [annotation] */ + _In_reads_bytes_opt_(Size) const void *pHDRMetaData) = 0; + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamHDRMetaData( + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ DXGI_HDR_METADATA_TYPE *pType, + /* [annotation] */ + _In_ UINT Size, + /* [annotation] */ + _Out_writes_bytes_opt_(Size) void *pMetaData) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11VideoContext2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11VideoContext2 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11VideoContext2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11VideoContext2 * This); + + void ( STDMETHODCALLTYPE *GetDevice )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _Outptr_ ID3D11Device **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _Inout_ UINT *pDataSize, + /* [annotation] */ + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ REFGUID guid, + /* [annotation] */ + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *GetDecoderBuffer )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type, + /* [annotation] */ + _Out_ UINT *pBufferSize, + /* [annotation] */ + _Outptr_result_bytebuffer_(*pBufferSize) void **ppBuffer); + + HRESULT ( STDMETHODCALLTYPE *ReleaseDecoderBuffer )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ D3D11_VIDEO_DECODER_BUFFER_TYPE Type); + + HRESULT ( STDMETHODCALLTYPE *DecoderBeginFrame )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ ID3D11VideoDecoderOutputView *pView, + UINT ContentKeySize, + /* [annotation] */ + _In_reads_bytes_opt_(ContentKeySize) const void *pContentKey); + + HRESULT ( STDMETHODCALLTYPE *DecoderEndFrame )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder); + + HRESULT ( STDMETHODCALLTYPE *SubmitDecoderBuffers )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ UINT NumBuffers, + /* [annotation] */ + _In_reads_(NumBuffers) const D3D11_VIDEO_DECODER_BUFFER_DESC *pBufferDesc); + + APP_DEPRECATED_HRESULT ( STDMETHODCALLTYPE *DecoderExtension )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ const D3D11_VIDEO_DECODER_EXTENSION *pExtensionData); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputTargetRect )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_opt_ const RECT *pRect); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputBackgroundColor )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ BOOL YCbCr, + /* [annotation] */ + _In_ const D3D11_VIDEO_COLOR *pColor); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputColorSpace )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *pColorSpace); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputAlphaFillMode )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE AlphaFillMode, + /* [annotation] */ + _In_ UINT StreamIndex); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputConstriction )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ SIZE Size); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputStereoMode )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ BOOL Enable); + + APP_DEPRECATED_HRESULT ( STDMETHODCALLTYPE *VideoProcessorSetOutputExtension )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ const GUID *pExtensionGuid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_ void *pData); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputTargetRect )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ BOOL *Enabled, + /* [annotation] */ + _Out_ RECT *pRect); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputBackgroundColor )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ BOOL *pYCbCr, + /* [annotation] */ + _Out_ D3D11_VIDEO_COLOR *pColor); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputColorSpace )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_COLOR_SPACE *pColorSpace); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputAlphaFillMode )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE *pAlphaFillMode, + /* [annotation] */ + _Out_ UINT *pStreamIndex); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputConstriction )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ SIZE *pSize); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputStereoMode )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ BOOL *pEnabled); + + APP_DEPRECATED_HRESULT ( STDMETHODCALLTYPE *VideoProcessorGetOutputExtension )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ const GUID *pExtensionGuid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _Out_writes_bytes_(DataSize) void *pData); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamFrameFormat )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ D3D11_VIDEO_FRAME_FORMAT FrameFormat); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamColorSpace )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *pColorSpace); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamOutputRate )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_OUTPUT_RATE OutputRate, + /* [annotation] */ + _In_ BOOL RepeatFrame, + /* [annotation] */ + _In_opt_ const DXGI_RATIONAL *pCustomRate); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamSourceRect )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_opt_ const RECT *pRect); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamDestRect )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_opt_ const RECT *pRect); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamAlpha )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ FLOAT Alpha); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamPalette )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ UINT Count, + /* [annotation] */ + _In_reads_opt_(Count) const UINT *pEntries); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamPixelAspectRatio )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_opt_ const DXGI_RATIONAL *pSourceAspectRatio, + /* [annotation] */ + _In_opt_ const DXGI_RATIONAL *pDestinationAspectRatio); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamLumaKey )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ FLOAT Lower, + /* [annotation] */ + _In_ FLOAT Upper); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamStereoFormat )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_STEREO_FORMAT Format, + /* [annotation] */ + _In_ BOOL LeftViewFrame0, + /* [annotation] */ + _In_ BOOL BaseViewFrame0, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE FlipMode, + /* [annotation] */ + _In_ int MonoOffset); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamAutoProcessingMode )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamFilter )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_FILTER Filter, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ int Level); + + APP_DEPRECATED_HRESULT ( STDMETHODCALLTYPE *VideoProcessorSetStreamExtension )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ const GUID *pExtensionGuid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _In_ void *pData); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamFrameFormat )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ D3D11_VIDEO_FRAME_FORMAT *pFrameFormat); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamColorSpace )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_COLOR_SPACE *pColorSpace); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamOutputRate )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_OUTPUT_RATE *pOutputRate, + /* [annotation] */ + _Out_ BOOL *pRepeatFrame, + /* [annotation] */ + _Out_ DXGI_RATIONAL *pCustomRate); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamSourceRect )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ RECT *pRect); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamDestRect )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ RECT *pRect); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamAlpha )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ FLOAT *pAlpha); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamPalette )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ UINT Count, + /* [annotation] */ + _Out_writes_(Count) UINT *pEntries); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamPixelAspectRatio )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ DXGI_RATIONAL *pSourceAspectRatio, + /* [annotation] */ + _Out_ DXGI_RATIONAL *pDestinationAspectRatio); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamLumaKey )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ FLOAT *pLower, + /* [annotation] */ + _Out_ FLOAT *pUpper); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamStereoFormat )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnable, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_STEREO_FORMAT *pFormat, + /* [annotation] */ + _Out_ BOOL *pLeftViewFrame0, + /* [annotation] */ + _Out_ BOOL *pBaseViewFrame0, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE *pFlipMode, + /* [annotation] */ + _Out_ int *MonoOffset); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamAutoProcessingMode )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnabled); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamFilter )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_FILTER Filter, + /* [annotation] */ + _Out_ BOOL *pEnabled, + /* [annotation] */ + _Out_ int *pLevel); + + APP_DEPRECATED_HRESULT ( STDMETHODCALLTYPE *VideoProcessorGetStreamExtension )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ const GUID *pExtensionGuid, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _Out_writes_bytes_(DataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *VideoProcessorBlt )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ ID3D11VideoProcessorOutputView *pView, + /* [annotation] */ + _In_ UINT OutputFrame, + /* [annotation] */ + _In_ UINT StreamCount, + /* [annotation] */ + _In_reads_(StreamCount) const D3D11_VIDEO_PROCESSOR_STREAM *pStreams); + + HRESULT ( STDMETHODCALLTYPE *NegotiateCryptoSessionKeyExchange )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _Inout_updates_bytes_(DataSize) void *pData); + + void ( STDMETHODCALLTYPE *EncryptionBlt )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ ID3D11Texture2D *pSrcSurface, + /* [annotation] */ + _In_ ID3D11Texture2D *pDstSurface, + /* [annotation] */ + _In_ UINT IVSize, + /* [annotation] */ + _Inout_opt_bytecount_(IVSize) void *pIV); + + void ( STDMETHODCALLTYPE *DecryptionBlt )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ ID3D11Texture2D *pSrcSurface, + /* [annotation] */ + _In_ ID3D11Texture2D *pDstSurface, + /* [annotation] */ + _In_opt_ D3D11_ENCRYPTED_BLOCK_INFO *pEncryptedBlockInfo, + /* [annotation] */ + _In_ UINT ContentKeySize, + /* [annotation] */ + _In_reads_bytes_opt_(ContentKeySize) const void *pContentKey, + /* [annotation] */ + _In_ UINT IVSize, + /* [annotation] */ + _Inout_opt_bytecount_(IVSize) void *pIV); + + void ( STDMETHODCALLTYPE *StartSessionKeyRefresh )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ UINT RandomNumberSize, + /* [annotation] */ + _Out_writes_bytes_(RandomNumberSize) void *pRandomNumber); + + void ( STDMETHODCALLTYPE *FinishSessionKeyRefresh )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession); + + HRESULT ( STDMETHODCALLTYPE *GetEncryptionBltKey )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ UINT KeySize, + /* [annotation] */ + _Out_writes_bytes_(KeySize) void *pReadbackKey); + + HRESULT ( STDMETHODCALLTYPE *NegotiateAuthenticatedChannelKeyExchange )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11AuthenticatedChannel *pChannel, + /* [annotation] */ + _In_ UINT DataSize, + /* [annotation] */ + _Inout_updates_bytes_(DataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *QueryAuthenticatedChannel )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11AuthenticatedChannel *pChannel, + /* [annotation] */ + _In_ UINT InputSize, + /* [annotation] */ + _In_reads_bytes_(InputSize) const void *pInput, + /* [annotation] */ + _In_ UINT OutputSize, + /* [annotation] */ + _Out_writes_bytes_(OutputSize) void *pOutput); + + HRESULT ( STDMETHODCALLTYPE *ConfigureAuthenticatedChannel )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11AuthenticatedChannel *pChannel, + /* [annotation] */ + _In_ UINT InputSize, + /* [annotation] */ + _In_reads_bytes_(InputSize) const void *pInput, + /* [annotation] */ + _Out_ D3D11_AUTHENTICATED_CONFIGURE_OUTPUT *pOutput); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamRotation )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ D3D11_VIDEO_PROCESSOR_ROTATION Rotation); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamRotation )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnable, + /* [annotation] */ + _Out_ D3D11_VIDEO_PROCESSOR_ROTATION *pRotation); + + HRESULT ( STDMETHODCALLTYPE *SubmitDecoderBuffers1 )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ UINT NumBuffers, + /* [annotation] */ + _In_reads_(NumBuffers) const D3D11_VIDEO_DECODER_BUFFER_DESC1 *pBufferDesc); + + HRESULT ( STDMETHODCALLTYPE *GetDataForNewHardwareKey )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _In_ UINT PrivateInputSize, + /* [annotation] */ + _In_reads_(PrivateInputSize) const void *pPrivatInputData, + /* [annotation] */ + _Out_ UINT64 *pPrivateOutputData); + + HRESULT ( STDMETHODCALLTYPE *CheckCryptoSessionStatus )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11CryptoSession *pCryptoSession, + /* [annotation] */ + _Out_ D3D11_CRYPTO_SESSION_STATUS *pStatus); + + HRESULT ( STDMETHODCALLTYPE *DecoderEnableDownsampling )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ DXGI_COLOR_SPACE_TYPE InputColorSpace, + /* [annotation] */ + _In_ const D3D11_VIDEO_SAMPLE_DESC *pOutputDesc, + /* [annotation] */ + _In_ UINT ReferenceFrameCount); + + HRESULT ( STDMETHODCALLTYPE *DecoderUpdateDownsampling )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoDecoder *pDecoder, + /* [annotation] */ + _In_ const D3D11_VIDEO_SAMPLE_DESC *pOutputDesc); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputColorSpace1 )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ DXGI_COLOR_SPACE_TYPE ColorSpace); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputShaderUsage )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ BOOL ShaderUsage); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputColorSpace1 )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ DXGI_COLOR_SPACE_TYPE *pColorSpace); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputShaderUsage )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ BOOL *pShaderUsage); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamColorSpace1 )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ DXGI_COLOR_SPACE_TYPE ColorSpace); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamMirror )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ BOOL Enable, + /* [annotation] */ + _In_ BOOL FlipHorizontal, + /* [annotation] */ + _In_ BOOL FlipVertical); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamColorSpace1 )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ DXGI_COLOR_SPACE_TYPE *pColorSpace); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamMirror )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ BOOL *pEnable, + /* [annotation] */ + _Out_ BOOL *pFlipHorizontal, + /* [annotation] */ + _Out_ BOOL *pFlipVertical); + + HRESULT ( STDMETHODCALLTYPE *VideoProcessorGetBehaviorHints )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT OutputWidth, + /* [annotation] */ + _In_ UINT OutputHeight, + /* [annotation] */ + _In_ DXGI_FORMAT OutputFormat, + /* [annotation] */ + _In_ UINT StreamCount, + /* [annotation] */ + _In_reads_(StreamCount) const D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT *pStreams, + /* [annotation] */ + _Out_ UINT *pBehaviorHints); + + void ( STDMETHODCALLTYPE *VideoProcessorSetOutputHDRMetaData )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ DXGI_HDR_METADATA_TYPE Type, + /* [annotation] */ + _In_ UINT Size, + /* [annotation] */ + _In_reads_bytes_opt_(Size) const void *pHDRMetaData); + + void ( STDMETHODCALLTYPE *VideoProcessorGetOutputHDRMetaData )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _Out_ DXGI_HDR_METADATA_TYPE *pType, + /* [annotation] */ + _In_ UINT Size, + /* [annotation] */ + _Out_writes_bytes_opt_(Size) void *pMetaData); + + void ( STDMETHODCALLTYPE *VideoProcessorSetStreamHDRMetaData )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _In_ DXGI_HDR_METADATA_TYPE Type, + /* [annotation] */ + _In_ UINT Size, + /* [annotation] */ + _In_reads_bytes_opt_(Size) const void *pHDRMetaData); + + void ( STDMETHODCALLTYPE *VideoProcessorGetStreamHDRMetaData )( + ID3D11VideoContext2 * This, + /* [annotation] */ + _In_ ID3D11VideoProcessor *pVideoProcessor, + /* [annotation] */ + _In_ UINT StreamIndex, + /* [annotation] */ + _Out_ DXGI_HDR_METADATA_TYPE *pType, + /* [annotation] */ + _In_ UINT Size, + /* [annotation] */ + _Out_writes_bytes_opt_(Size) void *pMetaData); + + END_INTERFACE + } ID3D11VideoContext2Vtbl; + + interface ID3D11VideoContext2 + { + CONST_VTBL struct ID3D11VideoContext2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11VideoContext2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11VideoContext2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11VideoContext2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11VideoContext2_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define ID3D11VideoContext2_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D11VideoContext2_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D11VideoContext2_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + + +#define ID3D11VideoContext2_GetDecoderBuffer(This,pDecoder,Type,pBufferSize,ppBuffer) \ + ( (This)->lpVtbl -> GetDecoderBuffer(This,pDecoder,Type,pBufferSize,ppBuffer) ) + +#define ID3D11VideoContext2_ReleaseDecoderBuffer(This,pDecoder,Type) \ + ( (This)->lpVtbl -> ReleaseDecoderBuffer(This,pDecoder,Type) ) + +#define ID3D11VideoContext2_DecoderBeginFrame(This,pDecoder,pView,ContentKeySize,pContentKey) \ + ( (This)->lpVtbl -> DecoderBeginFrame(This,pDecoder,pView,ContentKeySize,pContentKey) ) + +#define ID3D11VideoContext2_DecoderEndFrame(This,pDecoder) \ + ( (This)->lpVtbl -> DecoderEndFrame(This,pDecoder) ) + +#define ID3D11VideoContext2_SubmitDecoderBuffers(This,pDecoder,NumBuffers,pBufferDesc) \ + ( (This)->lpVtbl -> SubmitDecoderBuffers(This,pDecoder,NumBuffers,pBufferDesc) ) + +#define ID3D11VideoContext2_DecoderExtension(This,pDecoder,pExtensionData) \ + ( (This)->lpVtbl -> DecoderExtension(This,pDecoder,pExtensionData) ) + +#define ID3D11VideoContext2_VideoProcessorSetOutputTargetRect(This,pVideoProcessor,Enable,pRect) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputTargetRect(This,pVideoProcessor,Enable,pRect) ) + +#define ID3D11VideoContext2_VideoProcessorSetOutputBackgroundColor(This,pVideoProcessor,YCbCr,pColor) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputBackgroundColor(This,pVideoProcessor,YCbCr,pColor) ) + +#define ID3D11VideoContext2_VideoProcessorSetOutputColorSpace(This,pVideoProcessor,pColorSpace) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputColorSpace(This,pVideoProcessor,pColorSpace) ) + +#define ID3D11VideoContext2_VideoProcessorSetOutputAlphaFillMode(This,pVideoProcessor,AlphaFillMode,StreamIndex) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputAlphaFillMode(This,pVideoProcessor,AlphaFillMode,StreamIndex) ) + +#define ID3D11VideoContext2_VideoProcessorSetOutputConstriction(This,pVideoProcessor,Enable,Size) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputConstriction(This,pVideoProcessor,Enable,Size) ) + +#define ID3D11VideoContext2_VideoProcessorSetOutputStereoMode(This,pVideoProcessor,Enable) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputStereoMode(This,pVideoProcessor,Enable) ) + +#define ID3D11VideoContext2_VideoProcessorSetOutputExtension(This,pVideoProcessor,pExtensionGuid,DataSize,pData) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputExtension(This,pVideoProcessor,pExtensionGuid,DataSize,pData) ) + +#define ID3D11VideoContext2_VideoProcessorGetOutputTargetRect(This,pVideoProcessor,Enabled,pRect) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputTargetRect(This,pVideoProcessor,Enabled,pRect) ) + +#define ID3D11VideoContext2_VideoProcessorGetOutputBackgroundColor(This,pVideoProcessor,pYCbCr,pColor) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputBackgroundColor(This,pVideoProcessor,pYCbCr,pColor) ) + +#define ID3D11VideoContext2_VideoProcessorGetOutputColorSpace(This,pVideoProcessor,pColorSpace) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputColorSpace(This,pVideoProcessor,pColorSpace) ) + +#define ID3D11VideoContext2_VideoProcessorGetOutputAlphaFillMode(This,pVideoProcessor,pAlphaFillMode,pStreamIndex) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputAlphaFillMode(This,pVideoProcessor,pAlphaFillMode,pStreamIndex) ) + +#define ID3D11VideoContext2_VideoProcessorGetOutputConstriction(This,pVideoProcessor,pEnabled,pSize) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputConstriction(This,pVideoProcessor,pEnabled,pSize) ) + +#define ID3D11VideoContext2_VideoProcessorGetOutputStereoMode(This,pVideoProcessor,pEnabled) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputStereoMode(This,pVideoProcessor,pEnabled) ) + +#define ID3D11VideoContext2_VideoProcessorGetOutputExtension(This,pVideoProcessor,pExtensionGuid,DataSize,pData) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputExtension(This,pVideoProcessor,pExtensionGuid,DataSize,pData) ) + +#define ID3D11VideoContext2_VideoProcessorSetStreamFrameFormat(This,pVideoProcessor,StreamIndex,FrameFormat) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamFrameFormat(This,pVideoProcessor,StreamIndex,FrameFormat) ) + +#define ID3D11VideoContext2_VideoProcessorSetStreamColorSpace(This,pVideoProcessor,StreamIndex,pColorSpace) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamColorSpace(This,pVideoProcessor,StreamIndex,pColorSpace) ) + +#define ID3D11VideoContext2_VideoProcessorSetStreamOutputRate(This,pVideoProcessor,StreamIndex,OutputRate,RepeatFrame,pCustomRate) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamOutputRate(This,pVideoProcessor,StreamIndex,OutputRate,RepeatFrame,pCustomRate) ) + +#define ID3D11VideoContext2_VideoProcessorSetStreamSourceRect(This,pVideoProcessor,StreamIndex,Enable,pRect) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamSourceRect(This,pVideoProcessor,StreamIndex,Enable,pRect) ) + +#define ID3D11VideoContext2_VideoProcessorSetStreamDestRect(This,pVideoProcessor,StreamIndex,Enable,pRect) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamDestRect(This,pVideoProcessor,StreamIndex,Enable,pRect) ) + +#define ID3D11VideoContext2_VideoProcessorSetStreamAlpha(This,pVideoProcessor,StreamIndex,Enable,Alpha) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamAlpha(This,pVideoProcessor,StreamIndex,Enable,Alpha) ) + +#define ID3D11VideoContext2_VideoProcessorSetStreamPalette(This,pVideoProcessor,StreamIndex,Count,pEntries) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamPalette(This,pVideoProcessor,StreamIndex,Count,pEntries) ) + +#define ID3D11VideoContext2_VideoProcessorSetStreamPixelAspectRatio(This,pVideoProcessor,StreamIndex,Enable,pSourceAspectRatio,pDestinationAspectRatio) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamPixelAspectRatio(This,pVideoProcessor,StreamIndex,Enable,pSourceAspectRatio,pDestinationAspectRatio) ) + +#define ID3D11VideoContext2_VideoProcessorSetStreamLumaKey(This,pVideoProcessor,StreamIndex,Enable,Lower,Upper) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamLumaKey(This,pVideoProcessor,StreamIndex,Enable,Lower,Upper) ) + +#define ID3D11VideoContext2_VideoProcessorSetStreamStereoFormat(This,pVideoProcessor,StreamIndex,Enable,Format,LeftViewFrame0,BaseViewFrame0,FlipMode,MonoOffset) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamStereoFormat(This,pVideoProcessor,StreamIndex,Enable,Format,LeftViewFrame0,BaseViewFrame0,FlipMode,MonoOffset) ) + +#define ID3D11VideoContext2_VideoProcessorSetStreamAutoProcessingMode(This,pVideoProcessor,StreamIndex,Enable) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamAutoProcessingMode(This,pVideoProcessor,StreamIndex,Enable) ) + +#define ID3D11VideoContext2_VideoProcessorSetStreamFilter(This,pVideoProcessor,StreamIndex,Filter,Enable,Level) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamFilter(This,pVideoProcessor,StreamIndex,Filter,Enable,Level) ) + +#define ID3D11VideoContext2_VideoProcessorSetStreamExtension(This,pVideoProcessor,StreamIndex,pExtensionGuid,DataSize,pData) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamExtension(This,pVideoProcessor,StreamIndex,pExtensionGuid,DataSize,pData) ) + +#define ID3D11VideoContext2_VideoProcessorGetStreamFrameFormat(This,pVideoProcessor,StreamIndex,pFrameFormat) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamFrameFormat(This,pVideoProcessor,StreamIndex,pFrameFormat) ) + +#define ID3D11VideoContext2_VideoProcessorGetStreamColorSpace(This,pVideoProcessor,StreamIndex,pColorSpace) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamColorSpace(This,pVideoProcessor,StreamIndex,pColorSpace) ) + +#define ID3D11VideoContext2_VideoProcessorGetStreamOutputRate(This,pVideoProcessor,StreamIndex,pOutputRate,pRepeatFrame,pCustomRate) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamOutputRate(This,pVideoProcessor,StreamIndex,pOutputRate,pRepeatFrame,pCustomRate) ) + +#define ID3D11VideoContext2_VideoProcessorGetStreamSourceRect(This,pVideoProcessor,StreamIndex,pEnabled,pRect) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamSourceRect(This,pVideoProcessor,StreamIndex,pEnabled,pRect) ) + +#define ID3D11VideoContext2_VideoProcessorGetStreamDestRect(This,pVideoProcessor,StreamIndex,pEnabled,pRect) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamDestRect(This,pVideoProcessor,StreamIndex,pEnabled,pRect) ) + +#define ID3D11VideoContext2_VideoProcessorGetStreamAlpha(This,pVideoProcessor,StreamIndex,pEnabled,pAlpha) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamAlpha(This,pVideoProcessor,StreamIndex,pEnabled,pAlpha) ) + +#define ID3D11VideoContext2_VideoProcessorGetStreamPalette(This,pVideoProcessor,StreamIndex,Count,pEntries) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamPalette(This,pVideoProcessor,StreamIndex,Count,pEntries) ) + +#define ID3D11VideoContext2_VideoProcessorGetStreamPixelAspectRatio(This,pVideoProcessor,StreamIndex,pEnabled,pSourceAspectRatio,pDestinationAspectRatio) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamPixelAspectRatio(This,pVideoProcessor,StreamIndex,pEnabled,pSourceAspectRatio,pDestinationAspectRatio) ) + +#define ID3D11VideoContext2_VideoProcessorGetStreamLumaKey(This,pVideoProcessor,StreamIndex,pEnabled,pLower,pUpper) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamLumaKey(This,pVideoProcessor,StreamIndex,pEnabled,pLower,pUpper) ) + +#define ID3D11VideoContext2_VideoProcessorGetStreamStereoFormat(This,pVideoProcessor,StreamIndex,pEnable,pFormat,pLeftViewFrame0,pBaseViewFrame0,pFlipMode,MonoOffset) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamStereoFormat(This,pVideoProcessor,StreamIndex,pEnable,pFormat,pLeftViewFrame0,pBaseViewFrame0,pFlipMode,MonoOffset) ) + +#define ID3D11VideoContext2_VideoProcessorGetStreamAutoProcessingMode(This,pVideoProcessor,StreamIndex,pEnabled) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamAutoProcessingMode(This,pVideoProcessor,StreamIndex,pEnabled) ) + +#define ID3D11VideoContext2_VideoProcessorGetStreamFilter(This,pVideoProcessor,StreamIndex,Filter,pEnabled,pLevel) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamFilter(This,pVideoProcessor,StreamIndex,Filter,pEnabled,pLevel) ) + +#define ID3D11VideoContext2_VideoProcessorGetStreamExtension(This,pVideoProcessor,StreamIndex,pExtensionGuid,DataSize,pData) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamExtension(This,pVideoProcessor,StreamIndex,pExtensionGuid,DataSize,pData) ) + +#define ID3D11VideoContext2_VideoProcessorBlt(This,pVideoProcessor,pView,OutputFrame,StreamCount,pStreams) \ + ( (This)->lpVtbl -> VideoProcessorBlt(This,pVideoProcessor,pView,OutputFrame,StreamCount,pStreams) ) + +#define ID3D11VideoContext2_NegotiateCryptoSessionKeyExchange(This,pCryptoSession,DataSize,pData) \ + ( (This)->lpVtbl -> NegotiateCryptoSessionKeyExchange(This,pCryptoSession,DataSize,pData) ) + +#define ID3D11VideoContext2_EncryptionBlt(This,pCryptoSession,pSrcSurface,pDstSurface,IVSize,pIV) \ + ( (This)->lpVtbl -> EncryptionBlt(This,pCryptoSession,pSrcSurface,pDstSurface,IVSize,pIV) ) + +#define ID3D11VideoContext2_DecryptionBlt(This,pCryptoSession,pSrcSurface,pDstSurface,pEncryptedBlockInfo,ContentKeySize,pContentKey,IVSize,pIV) \ + ( (This)->lpVtbl -> DecryptionBlt(This,pCryptoSession,pSrcSurface,pDstSurface,pEncryptedBlockInfo,ContentKeySize,pContentKey,IVSize,pIV) ) + +#define ID3D11VideoContext2_StartSessionKeyRefresh(This,pCryptoSession,RandomNumberSize,pRandomNumber) \ + ( (This)->lpVtbl -> StartSessionKeyRefresh(This,pCryptoSession,RandomNumberSize,pRandomNumber) ) + +#define ID3D11VideoContext2_FinishSessionKeyRefresh(This,pCryptoSession) \ + ( (This)->lpVtbl -> FinishSessionKeyRefresh(This,pCryptoSession) ) + +#define ID3D11VideoContext2_GetEncryptionBltKey(This,pCryptoSession,KeySize,pReadbackKey) \ + ( (This)->lpVtbl -> GetEncryptionBltKey(This,pCryptoSession,KeySize,pReadbackKey) ) + +#define ID3D11VideoContext2_NegotiateAuthenticatedChannelKeyExchange(This,pChannel,DataSize,pData) \ + ( (This)->lpVtbl -> NegotiateAuthenticatedChannelKeyExchange(This,pChannel,DataSize,pData) ) + +#define ID3D11VideoContext2_QueryAuthenticatedChannel(This,pChannel,InputSize,pInput,OutputSize,pOutput) \ + ( (This)->lpVtbl -> QueryAuthenticatedChannel(This,pChannel,InputSize,pInput,OutputSize,pOutput) ) + +#define ID3D11VideoContext2_ConfigureAuthenticatedChannel(This,pChannel,InputSize,pInput,pOutput) \ + ( (This)->lpVtbl -> ConfigureAuthenticatedChannel(This,pChannel,InputSize,pInput,pOutput) ) + +#define ID3D11VideoContext2_VideoProcessorSetStreamRotation(This,pVideoProcessor,StreamIndex,Enable,Rotation) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamRotation(This,pVideoProcessor,StreamIndex,Enable,Rotation) ) + +#define ID3D11VideoContext2_VideoProcessorGetStreamRotation(This,pVideoProcessor,StreamIndex,pEnable,pRotation) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamRotation(This,pVideoProcessor,StreamIndex,pEnable,pRotation) ) + + +#define ID3D11VideoContext2_SubmitDecoderBuffers1(This,pDecoder,NumBuffers,pBufferDesc) \ + ( (This)->lpVtbl -> SubmitDecoderBuffers1(This,pDecoder,NumBuffers,pBufferDesc) ) + +#define ID3D11VideoContext2_GetDataForNewHardwareKey(This,pCryptoSession,PrivateInputSize,pPrivatInputData,pPrivateOutputData) \ + ( (This)->lpVtbl -> GetDataForNewHardwareKey(This,pCryptoSession,PrivateInputSize,pPrivatInputData,pPrivateOutputData) ) + +#define ID3D11VideoContext2_CheckCryptoSessionStatus(This,pCryptoSession,pStatus) \ + ( (This)->lpVtbl -> CheckCryptoSessionStatus(This,pCryptoSession,pStatus) ) + +#define ID3D11VideoContext2_DecoderEnableDownsampling(This,pDecoder,InputColorSpace,pOutputDesc,ReferenceFrameCount) \ + ( (This)->lpVtbl -> DecoderEnableDownsampling(This,pDecoder,InputColorSpace,pOutputDesc,ReferenceFrameCount) ) + +#define ID3D11VideoContext2_DecoderUpdateDownsampling(This,pDecoder,pOutputDesc) \ + ( (This)->lpVtbl -> DecoderUpdateDownsampling(This,pDecoder,pOutputDesc) ) + +#define ID3D11VideoContext2_VideoProcessorSetOutputColorSpace1(This,pVideoProcessor,ColorSpace) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputColorSpace1(This,pVideoProcessor,ColorSpace) ) + +#define ID3D11VideoContext2_VideoProcessorSetOutputShaderUsage(This,pVideoProcessor,ShaderUsage) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputShaderUsage(This,pVideoProcessor,ShaderUsage) ) + +#define ID3D11VideoContext2_VideoProcessorGetOutputColorSpace1(This,pVideoProcessor,pColorSpace) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputColorSpace1(This,pVideoProcessor,pColorSpace) ) + +#define ID3D11VideoContext2_VideoProcessorGetOutputShaderUsage(This,pVideoProcessor,pShaderUsage) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputShaderUsage(This,pVideoProcessor,pShaderUsage) ) + +#define ID3D11VideoContext2_VideoProcessorSetStreamColorSpace1(This,pVideoProcessor,StreamIndex,ColorSpace) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamColorSpace1(This,pVideoProcessor,StreamIndex,ColorSpace) ) + +#define ID3D11VideoContext2_VideoProcessorSetStreamMirror(This,pVideoProcessor,StreamIndex,Enable,FlipHorizontal,FlipVertical) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamMirror(This,pVideoProcessor,StreamIndex,Enable,FlipHorizontal,FlipVertical) ) + +#define ID3D11VideoContext2_VideoProcessorGetStreamColorSpace1(This,pVideoProcessor,StreamIndex,pColorSpace) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamColorSpace1(This,pVideoProcessor,StreamIndex,pColorSpace) ) + +#define ID3D11VideoContext2_VideoProcessorGetStreamMirror(This,pVideoProcessor,StreamIndex,pEnable,pFlipHorizontal,pFlipVertical) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamMirror(This,pVideoProcessor,StreamIndex,pEnable,pFlipHorizontal,pFlipVertical) ) + +#define ID3D11VideoContext2_VideoProcessorGetBehaviorHints(This,pVideoProcessor,OutputWidth,OutputHeight,OutputFormat,StreamCount,pStreams,pBehaviorHints) \ + ( (This)->lpVtbl -> VideoProcessorGetBehaviorHints(This,pVideoProcessor,OutputWidth,OutputHeight,OutputFormat,StreamCount,pStreams,pBehaviorHints) ) + + +#define ID3D11VideoContext2_VideoProcessorSetOutputHDRMetaData(This,pVideoProcessor,Type,Size,pHDRMetaData) \ + ( (This)->lpVtbl -> VideoProcessorSetOutputHDRMetaData(This,pVideoProcessor,Type,Size,pHDRMetaData) ) + +#define ID3D11VideoContext2_VideoProcessorGetOutputHDRMetaData(This,pVideoProcessor,pType,Size,pMetaData) \ + ( (This)->lpVtbl -> VideoProcessorGetOutputHDRMetaData(This,pVideoProcessor,pType,Size,pMetaData) ) + +#define ID3D11VideoContext2_VideoProcessorSetStreamHDRMetaData(This,pVideoProcessor,StreamIndex,Type,Size,pHDRMetaData) \ + ( (This)->lpVtbl -> VideoProcessorSetStreamHDRMetaData(This,pVideoProcessor,StreamIndex,Type,Size,pHDRMetaData) ) + +#define ID3D11VideoContext2_VideoProcessorGetStreamHDRMetaData(This,pVideoProcessor,StreamIndex,pType,Size,pMetaData) \ + ( (This)->lpVtbl -> VideoProcessorGetStreamHDRMetaData(This,pVideoProcessor,StreamIndex,pType,Size,pMetaData) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11VideoContext2_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11_4_0000_0004 */ +/* [local] */ + +typedef struct D3D11_FEATURE_DATA_D3D11_OPTIONS4 + { + BOOL ExtendedNV12SharedTextureSupported; + } D3D11_FEATURE_DATA_D3D11_OPTIONS4; + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ +DEFINE_GUID(IID_ID3D11Device4,0x8992ab71,0x02e6,0x4b8d,0xba,0x48,0xb0,0x56,0xdc,0xda,0x42,0xc4); +DEFINE_GUID(IID_ID3D11Device5,0x8ffde202,0xa0e7,0x45df,0x9e,0x01,0xe8,0x37,0x80,0x1b,0x5e,0xa0); +DEFINE_GUID(IID_ID3D11Multithread,0x9B7E4E00,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); +DEFINE_GUID(IID_ID3D11VideoContext2,0xC4E7374C,0x6243,0x4D1B,0xAE,0x87,0x52,0xB4,0xF7,0x40,0xE2,0x61); + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11_4_0000_0004_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11_4_0000_0004_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/d3d11on12.h b/gfx/include/dxsdk/d3d11on12.h new file mode 100644 index 0000000000..d0046e0d55 --- /dev/null +++ b/gfx/include/dxsdk/d3d11on12.h @@ -0,0 +1,283 @@ +/*------------------------------------------------------------------------------------- + * + * Copyright (c) Microsoft Corporation + * + *-------------------------------------------------------------------------------------*/ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __d3d11on12_h__ +#define __d3d11on12_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __ID3D11On12Device_FWD_DEFINED__ +#define __ID3D11On12Device_FWD_DEFINED__ +typedef interface ID3D11On12Device ID3D11On12Device; + +#endif /* __ID3D11On12Device_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "d3d11.h" +#include "d3d12.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_d3d11on12_0000_0000 */ +/* [local] */ + +/*#include */ +/*#pragma region App Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + +/////////////////////////////////////////////////////////////////////////// +// D3D11On12CreateDevice +// ------------------ +// +// pDevice +// Specifies a pre-existing D3D12 device to use for D3D11 interop. +// May not be NULL. +// Flags +// Any of those documented for D3D11CreateDeviceAndSwapChain. +// pFeatureLevels +// Array of any of the following: +// D3D_FEATURE_LEVEL_12_1 +// D3D_FEATURE_LEVEL_12_0 +// D3D_FEATURE_LEVEL_11_1 +// D3D_FEATURE_LEVEL_11_0 +// D3D_FEATURE_LEVEL_10_1 +// D3D_FEATURE_LEVEL_10_0 +// D3D_FEATURE_LEVEL_9_3 +// D3D_FEATURE_LEVEL_9_2 +// D3D_FEATURE_LEVEL_9_1 +// The first feature level which is less than or equal to the +// D3D12 device's feature level will be used to perform D3D11 validation. +// Creation will fail if no acceptable feature levels are provided. +// Providing NULL will default to the D3D12 device's feature level. +// FeatureLevels +// Size of feature levels array. +// ppCommandQueues +// Array of unique queues for D3D11On12 to use. Valid queue types: +// 3D command queue. +// Flags must be compatible with device flags, and its NodeMask must +// be a subset of the NodeMask provided to this API. +// NumQueues +// Size of command queue array. +// NodeMask +// Which node of the D3D12 device to use. Only 1 bit may be set. +// ppDevice +// Pointer to returned interface. May be NULL. +// ppImmediateContext +// Pointer to returned interface. May be NULL. +// pChosenFeatureLevel +// Pointer to returned feature level. May be NULL. +// +// Return Values +// Any of those documented for +// D3D11CreateDevice +// +/////////////////////////////////////////////////////////////////////////// +typedef HRESULT (WINAPI* PFN_D3D11ON12_CREATE_DEVICE)( _In_ IUnknown*, UINT, + _In_reads_opt_( FeatureLevels ) CONST D3D_FEATURE_LEVEL*, UINT FeatureLevels, + _In_reads_opt_( NumQueues ) IUnknown* CONST*, UINT NumQueues, + UINT, _COM_Outptr_opt_ ID3D11Device**, _COM_Outptr_opt_ ID3D11DeviceContext**, + _Out_opt_ D3D_FEATURE_LEVEL* ); + +HRESULT WINAPI D3D11On12CreateDevice( + _In_ IUnknown* pDevice, + UINT Flags, + _In_reads_opt_( FeatureLevels ) CONST D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + _In_reads_opt_( NumQueues ) IUnknown* CONST* ppCommandQueues, + UINT NumQueues, + UINT NodeMask, + _COM_Outptr_opt_ ID3D11Device** ppDevice, + _COM_Outptr_opt_ ID3D11DeviceContext** ppImmediateContext, + _Out_opt_ D3D_FEATURE_LEVEL* pChosenFeatureLevel ); + +typedef struct D3D11_RESOURCE_FLAGS + { + UINT BindFlags; + UINT MiscFlags; + UINT CPUAccessFlags; + UINT StructureByteStride; + } D3D11_RESOURCE_FLAGS; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11on12_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11on12_0000_0000_v0_0_s_ifspec; + +#ifndef __ID3D11On12Device_INTERFACE_DEFINED__ +#define __ID3D11On12Device_INTERFACE_DEFINED__ + +/* interface ID3D11On12Device */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11On12Device; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("85611e73-70a9-490e-9614-a9e302777904") + ID3D11On12Device : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE CreateWrappedResource( + _In_ IUnknown *pResource12, + _In_ const D3D11_RESOURCE_FLAGS *pFlags11, + D3D12_RESOURCE_STATES InState, + D3D12_RESOURCE_STATES OutState, + REFIID riid, + _COM_Outptr_opt_ void **ppResource11) = 0; + + virtual void STDMETHODCALLTYPE ReleaseWrappedResources( + _In_reads_( NumResources ) ID3D11Resource *const *ppResources, + UINT NumResources) = 0; + + virtual void STDMETHODCALLTYPE AcquireWrappedResources( + _In_reads_( NumResources ) ID3D11Resource *const *ppResources, + UINT NumResources) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11On12DeviceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11On12Device * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11On12Device * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11On12Device * This); + + HRESULT ( STDMETHODCALLTYPE *CreateWrappedResource )( + ID3D11On12Device * This, + _In_ IUnknown *pResource12, + _In_ const D3D11_RESOURCE_FLAGS *pFlags11, + D3D12_RESOURCE_STATES InState, + D3D12_RESOURCE_STATES OutState, + REFIID riid, + _COM_Outptr_opt_ void **ppResource11); + + void ( STDMETHODCALLTYPE *ReleaseWrappedResources )( + ID3D11On12Device * This, + _In_reads_( NumResources ) ID3D11Resource *const *ppResources, + UINT NumResources); + + void ( STDMETHODCALLTYPE *AcquireWrappedResources )( + ID3D11On12Device * This, + _In_reads_( NumResources ) ID3D11Resource *const *ppResources, + UINT NumResources); + + END_INTERFACE + } ID3D11On12DeviceVtbl; + + interface ID3D11On12Device + { + CONST_VTBL struct ID3D11On12DeviceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11On12Device_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11On12Device_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11On12Device_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11On12Device_CreateWrappedResource(This,pResource12,pFlags11,InState,OutState,riid,ppResource11) \ + ( (This)->lpVtbl -> CreateWrappedResource(This,pResource12,pFlags11,InState,OutState,riid,ppResource11) ) + +#define ID3D11On12Device_ReleaseWrappedResources(This,ppResources,NumResources) \ + ( (This)->lpVtbl -> ReleaseWrappedResources(This,ppResources,NumResources) ) + +#define ID3D11On12Device_AcquireWrappedResources(This,ppResources,NumResources) \ + ( (This)->lpVtbl -> AcquireWrappedResources(This,ppResources,NumResources) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11On12Device_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11on12_0000_0001 */ +/* [local] */ + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ +DEFINE_GUID(IID_ID3D11On12Device,0x85611e73,0x70a9,0x490e,0x96,0x14,0xa9,0xe3,0x02,0x77,0x79,0x04); + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11on12_0000_0001_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11on12_0000_0001_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/d3d11sdklayers.h b/gfx/include/dxsdk/d3d11sdklayers.h new file mode 100644 index 0000000000..8e0ef78e53 --- /dev/null +++ b/gfx/include/dxsdk/d3d11sdklayers.h @@ -0,0 +1,2598 @@ +/*------------------------------------------------------------------------------------- + * + * Copyright (c) Microsoft Corporation + * + *-------------------------------------------------------------------------------------*/ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ +/* @@MIDL_FILE_HEADING( ) */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __d3d11sdklayers_h__ +#define __d3d11sdklayers_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __ID3D11Debug_FWD_DEFINED__ +#define __ID3D11Debug_FWD_DEFINED__ +typedef interface ID3D11Debug ID3D11Debug; + +#endif /* __ID3D11Debug_FWD_DEFINED__ */ + + +#ifndef __ID3D11SwitchToRef_FWD_DEFINED__ +#define __ID3D11SwitchToRef_FWD_DEFINED__ +typedef interface ID3D11SwitchToRef ID3D11SwitchToRef; + +#endif /* __ID3D11SwitchToRef_FWD_DEFINED__ */ + + +#ifndef __ID3D11TracingDevice_FWD_DEFINED__ +#define __ID3D11TracingDevice_FWD_DEFINED__ +typedef interface ID3D11TracingDevice ID3D11TracingDevice; + +#endif /* __ID3D11TracingDevice_FWD_DEFINED__ */ + + +#ifndef __ID3D11RefTrackingOptions_FWD_DEFINED__ +#define __ID3D11RefTrackingOptions_FWD_DEFINED__ +typedef interface ID3D11RefTrackingOptions ID3D11RefTrackingOptions; + +#endif /* __ID3D11RefTrackingOptions_FWD_DEFINED__ */ + + +#ifndef __ID3D11RefDefaultTrackingOptions_FWD_DEFINED__ +#define __ID3D11RefDefaultTrackingOptions_FWD_DEFINED__ +typedef interface ID3D11RefDefaultTrackingOptions ID3D11RefDefaultTrackingOptions; + +#endif /* __ID3D11RefDefaultTrackingOptions_FWD_DEFINED__ */ + + +#ifndef __ID3D11InfoQueue_FWD_DEFINED__ +#define __ID3D11InfoQueue_FWD_DEFINED__ +typedef interface ID3D11InfoQueue ID3D11InfoQueue; + +#endif /* __ID3D11InfoQueue_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "d3d11.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_d3d11sdklayers_0000_0000 */ +/* [local] */ + +/*#include */ +/*#pragma region Application Family*/ +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ +#define D3D11_SDK_LAYERS_VERSION ( 1 ) + +#define D3D11_DEBUG_FEATURE_FLUSH_PER_RENDER_OP ( 0x1 ) + +#define D3D11_DEBUG_FEATURE_FINISH_PER_RENDER_OP ( 0x2 ) + +#define D3D11_DEBUG_FEATURE_PRESENT_PER_RENDER_OP ( 0x4 ) + +#define D3D11_DEBUG_FEATURE_ALWAYS_DISCARD_OFFERED_RESOURCE ( 0x8 ) + +#define D3D11_DEBUG_FEATURE_NEVER_DISCARD_OFFERED_RESOURCE ( 0x10 ) + +#define D3D11_DEBUG_FEATURE_AVOID_BEHAVIOR_CHANGING_DEBUG_AIDS ( 0x40 ) + +#define D3D11_DEBUG_FEATURE_DISABLE_TILED_RESOURCE_MAPPING_TRACKING_AND_VALIDATION ( 0x80 ) + +typedef +enum D3D11_RLDO_FLAGS + { + D3D11_RLDO_SUMMARY = 0x1, + D3D11_RLDO_DETAIL = 0x2, + D3D11_RLDO_IGNORE_INTERNAL = 0x4 + } D3D11_RLDO_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS(D3D11_RLDO_FLAGS) + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0000_v0_0_s_ifspec; + +#ifndef __ID3D11Debug_INTERFACE_DEFINED__ +#define __ID3D11Debug_INTERFACE_DEFINED__ + +/* interface ID3D11Debug */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11Debug; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("79cf2233-7536-4948-9d36-1e4692dc5760") + ID3D11Debug : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetFeatureMask( + UINT Mask) = 0; + + virtual UINT STDMETHODCALLTYPE GetFeatureMask( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPresentPerRenderOpDelay( + UINT Milliseconds) = 0; + + virtual UINT STDMETHODCALLTYPE GetPresentPerRenderOpDelay( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetSwapChain( + /* [annotation] */ + _In_opt_ IDXGISwapChain *pSwapChain) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSwapChain( + /* [annotation] */ + _Out_ IDXGISwapChain **ppSwapChain) = 0; + + virtual HRESULT STDMETHODCALLTYPE ValidateContext( + /* [annotation] */ + _In_ ID3D11DeviceContext *pContext) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReportLiveDeviceObjects( + D3D11_RLDO_FLAGS Flags) = 0; + + virtual HRESULT STDMETHODCALLTYPE ValidateContextForDispatch( + /* [annotation] */ + _In_ ID3D11DeviceContext *pContext) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11DebugVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11Debug * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11Debug * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11Debug * This); + + HRESULT ( STDMETHODCALLTYPE *SetFeatureMask )( + ID3D11Debug * This, + UINT Mask); + + UINT ( STDMETHODCALLTYPE *GetFeatureMask )( + ID3D11Debug * This); + + HRESULT ( STDMETHODCALLTYPE *SetPresentPerRenderOpDelay )( + ID3D11Debug * This, + UINT Milliseconds); + + UINT ( STDMETHODCALLTYPE *GetPresentPerRenderOpDelay )( + ID3D11Debug * This); + + HRESULT ( STDMETHODCALLTYPE *SetSwapChain )( + ID3D11Debug * This, + /* [annotation] */ + _In_opt_ IDXGISwapChain *pSwapChain); + + HRESULT ( STDMETHODCALLTYPE *GetSwapChain )( + ID3D11Debug * This, + /* [annotation] */ + _Out_ IDXGISwapChain **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *ValidateContext )( + ID3D11Debug * This, + /* [annotation] */ + _In_ ID3D11DeviceContext *pContext); + + HRESULT ( STDMETHODCALLTYPE *ReportLiveDeviceObjects )( + ID3D11Debug * This, + D3D11_RLDO_FLAGS Flags); + + HRESULT ( STDMETHODCALLTYPE *ValidateContextForDispatch )( + ID3D11Debug * This, + /* [annotation] */ + _In_ ID3D11DeviceContext *pContext); + + END_INTERFACE + } ID3D11DebugVtbl; + + interface ID3D11Debug + { + CONST_VTBL struct ID3D11DebugVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11Debug_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11Debug_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11Debug_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11Debug_SetFeatureMask(This,Mask) \ + ( (This)->lpVtbl -> SetFeatureMask(This,Mask) ) + +#define ID3D11Debug_GetFeatureMask(This) \ + ( (This)->lpVtbl -> GetFeatureMask(This) ) + +#define ID3D11Debug_SetPresentPerRenderOpDelay(This,Milliseconds) \ + ( (This)->lpVtbl -> SetPresentPerRenderOpDelay(This,Milliseconds) ) + +#define ID3D11Debug_GetPresentPerRenderOpDelay(This) \ + ( (This)->lpVtbl -> GetPresentPerRenderOpDelay(This) ) + +#define ID3D11Debug_SetSwapChain(This,pSwapChain) \ + ( (This)->lpVtbl -> SetSwapChain(This,pSwapChain) ) + +#define ID3D11Debug_GetSwapChain(This,ppSwapChain) \ + ( (This)->lpVtbl -> GetSwapChain(This,ppSwapChain) ) + +#define ID3D11Debug_ValidateContext(This,pContext) \ + ( (This)->lpVtbl -> ValidateContext(This,pContext) ) + +#define ID3D11Debug_ReportLiveDeviceObjects(This,Flags) \ + ( (This)->lpVtbl -> ReportLiveDeviceObjects(This,Flags) ) + +#define ID3D11Debug_ValidateContextForDispatch(This,pContext) \ + ( (This)->lpVtbl -> ValidateContextForDispatch(This,pContext) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11Debug_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11sdklayers_0000_0001 */ +/* [local] */ + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ +/*#pragma endregion*/ +/*#pragma region Desktop Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0001_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0001_v0_0_s_ifspec; + +#ifndef __ID3D11SwitchToRef_INTERFACE_DEFINED__ +#define __ID3D11SwitchToRef_INTERFACE_DEFINED__ + +/* interface ID3D11SwitchToRef */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11SwitchToRef; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1ef337e3-58e7-4f83-a692-db221f5ed47e") + ID3D11SwitchToRef : public IUnknown + { + public: + virtual BOOL STDMETHODCALLTYPE SetUseRef( + BOOL UseRef) = 0; + + virtual BOOL STDMETHODCALLTYPE GetUseRef( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11SwitchToRefVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11SwitchToRef * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11SwitchToRef * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11SwitchToRef * This); + + BOOL ( STDMETHODCALLTYPE *SetUseRef )( + ID3D11SwitchToRef * This, + BOOL UseRef); + + BOOL ( STDMETHODCALLTYPE *GetUseRef )( + ID3D11SwitchToRef * This); + + END_INTERFACE + } ID3D11SwitchToRefVtbl; + + interface ID3D11SwitchToRef + { + CONST_VTBL struct ID3D11SwitchToRefVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11SwitchToRef_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11SwitchToRef_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11SwitchToRef_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11SwitchToRef_SetUseRef(This,UseRef) \ + ( (This)->lpVtbl -> SetUseRef(This,UseRef) ) + +#define ID3D11SwitchToRef_GetUseRef(This) \ + ( (This)->lpVtbl -> GetUseRef(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11SwitchToRef_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11sdklayers_0000_0002 */ +/* [local] */ + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ +/*#pragma region PC Application Family*/ +/*#pragma region PC Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PC_APP)*/ +typedef +enum D3D11_SHADER_TRACKING_RESOURCE_TYPE + { + D3D11_SHADER_TRACKING_RESOURCE_TYPE_NONE = 0, + D3D11_SHADER_TRACKING_RESOURCE_TYPE_UAV_DEVICEMEMORY = 1, + D3D11_SHADER_TRACKING_RESOURCE_TYPE_NON_UAV_DEVICEMEMORY = 2, + D3D11_SHADER_TRACKING_RESOURCE_TYPE_ALL_DEVICEMEMORY = 3, + D3D11_SHADER_TRACKING_RESOURCE_TYPE_GROUPSHARED_MEMORY = 4, + D3D11_SHADER_TRACKING_RESOURCE_TYPE_ALL_SHARED_MEMORY = 5, + D3D11_SHADER_TRACKING_RESOURCE_TYPE_GROUPSHARED_NON_UAV = 6, + D3D11_SHADER_TRACKING_RESOURCE_TYPE_ALL = 7 + } D3D11_SHADER_TRACKING_RESOURCE_TYPE; + +typedef +enum D3D11_SHADER_TRACKING_OPTION + { + D3D11_SHADER_TRACKING_OPTION_IGNORE = 0, + D3D11_SHADER_TRACKING_OPTION_TRACK_UNINITIALIZED = 0x1, + D3D11_SHADER_TRACKING_OPTION_TRACK_RAW = 0x2, + D3D11_SHADER_TRACKING_OPTION_TRACK_WAR = 0x4, + D3D11_SHADER_TRACKING_OPTION_TRACK_WAW = 0x8, + D3D11_SHADER_TRACKING_OPTION_ALLOW_SAME = 0x10, + D3D11_SHADER_TRACKING_OPTION_TRACK_ATOMIC_CONSISTENCY = 0x20, + D3D11_SHADER_TRACKING_OPTION_TRACK_RAW_ACROSS_THREADGROUPS = 0x40, + D3D11_SHADER_TRACKING_OPTION_TRACK_WAR_ACROSS_THREADGROUPS = 0x80, + D3D11_SHADER_TRACKING_OPTION_TRACK_WAW_ACROSS_THREADGROUPS = 0x100, + D3D11_SHADER_TRACKING_OPTION_TRACK_ATOMIC_CONSISTENCY_ACROSS_THREADGROUPS = 0x200, + D3D11_SHADER_TRACKING_OPTION_UAV_SPECIFIC_FLAGS = ( ( ( D3D11_SHADER_TRACKING_OPTION_TRACK_RAW_ACROSS_THREADGROUPS | D3D11_SHADER_TRACKING_OPTION_TRACK_WAR_ACROSS_THREADGROUPS ) | D3D11_SHADER_TRACKING_OPTION_TRACK_WAW_ACROSS_THREADGROUPS ) | D3D11_SHADER_TRACKING_OPTION_TRACK_ATOMIC_CONSISTENCY_ACROSS_THREADGROUPS ) , + D3D11_SHADER_TRACKING_OPTION_ALL_HAZARDS = ( ( ( ( ( ( ( D3D11_SHADER_TRACKING_OPTION_TRACK_RAW | D3D11_SHADER_TRACKING_OPTION_TRACK_WAR ) | D3D11_SHADER_TRACKING_OPTION_TRACK_WAW ) | D3D11_SHADER_TRACKING_OPTION_TRACK_ATOMIC_CONSISTENCY ) | D3D11_SHADER_TRACKING_OPTION_TRACK_RAW_ACROSS_THREADGROUPS ) | D3D11_SHADER_TRACKING_OPTION_TRACK_WAR_ACROSS_THREADGROUPS ) | D3D11_SHADER_TRACKING_OPTION_TRACK_WAW_ACROSS_THREADGROUPS ) | D3D11_SHADER_TRACKING_OPTION_TRACK_ATOMIC_CONSISTENCY_ACROSS_THREADGROUPS ) , + D3D11_SHADER_TRACKING_OPTION_ALL_HAZARDS_ALLOWING_SAME = ( D3D11_SHADER_TRACKING_OPTION_ALL_HAZARDS | D3D11_SHADER_TRACKING_OPTION_ALLOW_SAME ) , + D3D11_SHADER_TRACKING_OPTION_ALL_OPTIONS = ( D3D11_SHADER_TRACKING_OPTION_ALL_HAZARDS_ALLOWING_SAME | D3D11_SHADER_TRACKING_OPTION_TRACK_UNINITIALIZED ) + } D3D11_SHADER_TRACKING_OPTIONS; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0002_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0002_v0_0_s_ifspec; + +#ifndef __ID3D11TracingDevice_INTERFACE_DEFINED__ +#define __ID3D11TracingDevice_INTERFACE_DEFINED__ + +/* interface ID3D11TracingDevice */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11TracingDevice; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1911c771-1587-413e-a7e0-fb26c3de0268") + ID3D11TracingDevice : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetShaderTrackingOptionsByType( + /* [annotation] */ + _In_ UINT ResourceTypeFlags, + /* [annotation] */ + _In_ UINT Options) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetShaderTrackingOptions( + /* [annotation] */ + _In_ IUnknown *pShader, + /* [annotation] */ + _In_ UINT Options) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11TracingDeviceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11TracingDevice * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11TracingDevice * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11TracingDevice * This); + + HRESULT ( STDMETHODCALLTYPE *SetShaderTrackingOptionsByType )( + ID3D11TracingDevice * This, + /* [annotation] */ + _In_ UINT ResourceTypeFlags, + /* [annotation] */ + _In_ UINT Options); + + HRESULT ( STDMETHODCALLTYPE *SetShaderTrackingOptions )( + ID3D11TracingDevice * This, + /* [annotation] */ + _In_ IUnknown *pShader, + /* [annotation] */ + _In_ UINT Options); + + END_INTERFACE + } ID3D11TracingDeviceVtbl; + + interface ID3D11TracingDevice + { + CONST_VTBL struct ID3D11TracingDeviceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11TracingDevice_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11TracingDevice_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11TracingDevice_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11TracingDevice_SetShaderTrackingOptionsByType(This,ResourceTypeFlags,Options) \ + ( (This)->lpVtbl -> SetShaderTrackingOptionsByType(This,ResourceTypeFlags,Options) ) + +#define ID3D11TracingDevice_SetShaderTrackingOptions(This,pShader,Options) \ + ( (This)->lpVtbl -> SetShaderTrackingOptions(This,pShader,Options) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11TracingDevice_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11RefTrackingOptions_INTERFACE_DEFINED__ +#define __ID3D11RefTrackingOptions_INTERFACE_DEFINED__ + +/* interface ID3D11RefTrackingOptions */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11RefTrackingOptions; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("193dacdf-0db2-4c05-a55c-ef06cac56fd9") + ID3D11RefTrackingOptions : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetTrackingOptions( + UINT uOptions) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11RefTrackingOptionsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11RefTrackingOptions * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11RefTrackingOptions * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11RefTrackingOptions * This); + + HRESULT ( STDMETHODCALLTYPE *SetTrackingOptions )( + ID3D11RefTrackingOptions * This, + UINT uOptions); + + END_INTERFACE + } ID3D11RefTrackingOptionsVtbl; + + interface ID3D11RefTrackingOptions + { + CONST_VTBL struct ID3D11RefTrackingOptionsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11RefTrackingOptions_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11RefTrackingOptions_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11RefTrackingOptions_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11RefTrackingOptions_SetTrackingOptions(This,uOptions) \ + ( (This)->lpVtbl -> SetTrackingOptions(This,uOptions) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11RefTrackingOptions_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11RefDefaultTrackingOptions_INTERFACE_DEFINED__ +#define __ID3D11RefDefaultTrackingOptions_INTERFACE_DEFINED__ + +/* interface ID3D11RefDefaultTrackingOptions */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11RefDefaultTrackingOptions; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("03916615-c644-418c-9bf4-75db5be63ca0") + ID3D11RefDefaultTrackingOptions : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetTrackingOptions( + UINT ResourceTypeFlags, + UINT Options) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11RefDefaultTrackingOptionsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11RefDefaultTrackingOptions * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11RefDefaultTrackingOptions * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11RefDefaultTrackingOptions * This); + + HRESULT ( STDMETHODCALLTYPE *SetTrackingOptions )( + ID3D11RefDefaultTrackingOptions * This, + UINT ResourceTypeFlags, + UINT Options); + + END_INTERFACE + } ID3D11RefDefaultTrackingOptionsVtbl; + + interface ID3D11RefDefaultTrackingOptions + { + CONST_VTBL struct ID3D11RefDefaultTrackingOptionsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11RefDefaultTrackingOptions_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11RefDefaultTrackingOptions_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11RefDefaultTrackingOptions_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11RefDefaultTrackingOptions_SetTrackingOptions(This,ResourceTypeFlags,Options) \ + ( (This)->lpVtbl -> SetTrackingOptions(This,ResourceTypeFlags,Options) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11RefDefaultTrackingOptions_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11sdklayers_0000_0005 */ +/* [local] */ + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PC_APP) */ +/*#pragma endregion*/ +/*#pragma endregion*/ +/*#pragma region Application Family*/ +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ +DEFINE_GUID(DXGI_DEBUG_D3D11, 0x4b99317b, 0xac39, 0x4aa6, 0xbb, 0xb, 0xba, 0xa0, 0x47, 0x84, 0x79, 0x8f); +#define D3D11_REGKEY_PATH __TEXT("Software\\Microsoft\\Direct3D") +#define D3D11_MUTE_DEBUG_OUTPUT __TEXT("MuteDebugOutput") +#define D3D11_ENABLE_BREAK_ON_MESSAGE __TEXT("EnableBreakOnMessage") +#define D3D11_INFOQUEUE_STORAGE_FILTER_OVERRIDE __TEXT("InfoQueueStorageFilterOverride") +#define D3D11_MUTE_CATEGORY __TEXT("Mute_CATEGORY_%s") +#define D3D11_MUTE_SEVERITY __TEXT("Mute_SEVERITY_%s") +#define D3D11_MUTE_ID_STRING __TEXT("Mute_ID_%s") +#define D3D11_MUTE_ID_DECIMAL __TEXT("Mute_ID_%d") +#define D3D11_UNMUTE_SEVERITY_INFO __TEXT("Unmute_SEVERITY_INFO") +#define D3D11_BREAKON_CATEGORY __TEXT("BreakOn_CATEGORY_%s") +#define D3D11_BREAKON_SEVERITY __TEXT("BreakOn_SEVERITY_%s") +#define D3D11_BREAKON_ID_STRING __TEXT("BreakOn_ID_%s") +#define D3D11_BREAKON_ID_DECIMAL __TEXT("BreakOn_ID_%d") +#define D3D11_APPSIZE_STRING __TEXT("Size") +#define D3D11_APPNAME_STRING __TEXT("Name") +#define D3D11_FORCE_DEBUGGABLE __TEXT("ForceDebuggable") +#define D3D11_FORCE_SHADER_SKIP_OPTIMIZATION __TEXT("ForceShaderSkipOptimization") +typedef +enum D3D11_MESSAGE_CATEGORY + { + D3D11_MESSAGE_CATEGORY_APPLICATION_DEFINED = 0, + D3D11_MESSAGE_CATEGORY_MISCELLANEOUS = ( D3D11_MESSAGE_CATEGORY_APPLICATION_DEFINED + 1 ) , + D3D11_MESSAGE_CATEGORY_INITIALIZATION = ( D3D11_MESSAGE_CATEGORY_MISCELLANEOUS + 1 ) , + D3D11_MESSAGE_CATEGORY_CLEANUP = ( D3D11_MESSAGE_CATEGORY_INITIALIZATION + 1 ) , + D3D11_MESSAGE_CATEGORY_COMPILATION = ( D3D11_MESSAGE_CATEGORY_CLEANUP + 1 ) , + D3D11_MESSAGE_CATEGORY_STATE_CREATION = ( D3D11_MESSAGE_CATEGORY_COMPILATION + 1 ) , + D3D11_MESSAGE_CATEGORY_STATE_SETTING = ( D3D11_MESSAGE_CATEGORY_STATE_CREATION + 1 ) , + D3D11_MESSAGE_CATEGORY_STATE_GETTING = ( D3D11_MESSAGE_CATEGORY_STATE_SETTING + 1 ) , + D3D11_MESSAGE_CATEGORY_RESOURCE_MANIPULATION = ( D3D11_MESSAGE_CATEGORY_STATE_GETTING + 1 ) , + D3D11_MESSAGE_CATEGORY_EXECUTION = ( D3D11_MESSAGE_CATEGORY_RESOURCE_MANIPULATION + 1 ) , + D3D11_MESSAGE_CATEGORY_SHADER = ( D3D11_MESSAGE_CATEGORY_EXECUTION + 1 ) + } D3D11_MESSAGE_CATEGORY; + +typedef +enum D3D11_MESSAGE_SEVERITY + { + D3D11_MESSAGE_SEVERITY_CORRUPTION = 0, + D3D11_MESSAGE_SEVERITY_ERROR = ( D3D11_MESSAGE_SEVERITY_CORRUPTION + 1 ) , + D3D11_MESSAGE_SEVERITY_WARNING = ( D3D11_MESSAGE_SEVERITY_ERROR + 1 ) , + D3D11_MESSAGE_SEVERITY_INFO = ( D3D11_MESSAGE_SEVERITY_WARNING + 1 ) , + D3D11_MESSAGE_SEVERITY_MESSAGE = ( D3D11_MESSAGE_SEVERITY_INFO + 1 ) + } D3D11_MESSAGE_SEVERITY; + +typedef +enum D3D11_MESSAGE_ID + { + D3D11_MESSAGE_ID_UNKNOWN = 0, + D3D11_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_HAZARD = ( D3D11_MESSAGE_ID_UNKNOWN + 1 ) , + D3D11_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_HAZARD = ( D3D11_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_HAZARD + 1 ) , + D3D11_MESSAGE_ID_DEVICE_VSSETSHADERRESOURCES_HAZARD = ( D3D11_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_HAZARD + 1 ) , + D3D11_MESSAGE_ID_DEVICE_VSSETCONSTANTBUFFERS_HAZARD = ( D3D11_MESSAGE_ID_DEVICE_VSSETSHADERRESOURCES_HAZARD + 1 ) , + D3D11_MESSAGE_ID_DEVICE_GSSETSHADERRESOURCES_HAZARD = ( D3D11_MESSAGE_ID_DEVICE_VSSETCONSTANTBUFFERS_HAZARD + 1 ) , + D3D11_MESSAGE_ID_DEVICE_GSSETCONSTANTBUFFERS_HAZARD = ( D3D11_MESSAGE_ID_DEVICE_GSSETSHADERRESOURCES_HAZARD + 1 ) , + D3D11_MESSAGE_ID_DEVICE_PSSETSHADERRESOURCES_HAZARD = ( D3D11_MESSAGE_ID_DEVICE_GSSETCONSTANTBUFFERS_HAZARD + 1 ) , + D3D11_MESSAGE_ID_DEVICE_PSSETCONSTANTBUFFERS_HAZARD = ( D3D11_MESSAGE_ID_DEVICE_PSSETSHADERRESOURCES_HAZARD + 1 ) , + D3D11_MESSAGE_ID_DEVICE_OMSETRENDERTARGETS_HAZARD = ( D3D11_MESSAGE_ID_DEVICE_PSSETCONSTANTBUFFERS_HAZARD + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SOSETTARGETS_HAZARD = ( D3D11_MESSAGE_ID_DEVICE_OMSETRENDERTARGETS_HAZARD + 1 ) , + D3D11_MESSAGE_ID_STRING_FROM_APPLICATION = ( D3D11_MESSAGE_ID_DEVICE_SOSETTARGETS_HAZARD + 1 ) , + D3D11_MESSAGE_ID_CORRUPTED_THIS = ( D3D11_MESSAGE_ID_STRING_FROM_APPLICATION + 1 ) , + D3D11_MESSAGE_ID_CORRUPTED_PARAMETER1 = ( D3D11_MESSAGE_ID_CORRUPTED_THIS + 1 ) , + D3D11_MESSAGE_ID_CORRUPTED_PARAMETER2 = ( D3D11_MESSAGE_ID_CORRUPTED_PARAMETER1 + 1 ) , + D3D11_MESSAGE_ID_CORRUPTED_PARAMETER3 = ( D3D11_MESSAGE_ID_CORRUPTED_PARAMETER2 + 1 ) , + D3D11_MESSAGE_ID_CORRUPTED_PARAMETER4 = ( D3D11_MESSAGE_ID_CORRUPTED_PARAMETER3 + 1 ) , + D3D11_MESSAGE_ID_CORRUPTED_PARAMETER5 = ( D3D11_MESSAGE_ID_CORRUPTED_PARAMETER4 + 1 ) , + D3D11_MESSAGE_ID_CORRUPTED_PARAMETER6 = ( D3D11_MESSAGE_ID_CORRUPTED_PARAMETER5 + 1 ) , + D3D11_MESSAGE_ID_CORRUPTED_PARAMETER7 = ( D3D11_MESSAGE_ID_CORRUPTED_PARAMETER6 + 1 ) , + D3D11_MESSAGE_ID_CORRUPTED_PARAMETER8 = ( D3D11_MESSAGE_ID_CORRUPTED_PARAMETER7 + 1 ) , + D3D11_MESSAGE_ID_CORRUPTED_PARAMETER9 = ( D3D11_MESSAGE_ID_CORRUPTED_PARAMETER8 + 1 ) , + D3D11_MESSAGE_ID_CORRUPTED_PARAMETER10 = ( D3D11_MESSAGE_ID_CORRUPTED_PARAMETER9 + 1 ) , + D3D11_MESSAGE_ID_CORRUPTED_PARAMETER11 = ( D3D11_MESSAGE_ID_CORRUPTED_PARAMETER10 + 1 ) , + D3D11_MESSAGE_ID_CORRUPTED_PARAMETER12 = ( D3D11_MESSAGE_ID_CORRUPTED_PARAMETER11 + 1 ) , + D3D11_MESSAGE_ID_CORRUPTED_PARAMETER13 = ( D3D11_MESSAGE_ID_CORRUPTED_PARAMETER12 + 1 ) , + D3D11_MESSAGE_ID_CORRUPTED_PARAMETER14 = ( D3D11_MESSAGE_ID_CORRUPTED_PARAMETER13 + 1 ) , + D3D11_MESSAGE_ID_CORRUPTED_PARAMETER15 = ( D3D11_MESSAGE_ID_CORRUPTED_PARAMETER14 + 1 ) , + D3D11_MESSAGE_ID_CORRUPTED_MULTITHREADING = ( D3D11_MESSAGE_ID_CORRUPTED_PARAMETER15 + 1 ) , + D3D11_MESSAGE_ID_MESSAGE_REPORTING_OUTOFMEMORY = ( D3D11_MESSAGE_ID_CORRUPTED_MULTITHREADING + 1 ) , + D3D11_MESSAGE_ID_IASETINPUTLAYOUT_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_MESSAGE_REPORTING_OUTOFMEMORY + 1 ) , + D3D11_MESSAGE_ID_IASETVERTEXBUFFERS_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_IASETINPUTLAYOUT_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_IASETINDEXBUFFER_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_IASETVERTEXBUFFERS_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_VSSETSHADER_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_IASETINDEXBUFFER_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_VSSETSHADERRESOURCES_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_VSSETSHADER_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_VSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_VSSETSHADERRESOURCES_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_VSSETSAMPLERS_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_VSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_GSSETSHADER_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_VSSETSAMPLERS_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_GSSETSHADERRESOURCES_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_GSSETSHADER_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_GSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_GSSETSHADERRESOURCES_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_GSSETSAMPLERS_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_GSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_SOSETTARGETS_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_GSSETSAMPLERS_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_PSSETSHADER_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_SOSETTARGETS_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_PSSETSHADERRESOURCES_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_PSSETSHADER_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_PSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_PSSETSHADERRESOURCES_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_PSSETSAMPLERS_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_PSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_RSSETSTATE_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_PSSETSAMPLERS_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_OMSETBLENDSTATE_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_RSSETSTATE_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_OMSETDEPTHSTENCILSTATE_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_OMSETBLENDSTATE_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_OMSETRENDERTARGETS_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_OMSETDEPTHSTENCILSTATE_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_SETPREDICATION_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_OMSETRENDERTARGETS_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_GETPRIVATEDATA_MOREDATA = ( D3D11_MESSAGE_ID_SETPREDICATION_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_SETPRIVATEDATA_INVALIDFREEDATA = ( D3D11_MESSAGE_ID_GETPRIVATEDATA_MOREDATA + 1 ) , + D3D11_MESSAGE_ID_SETPRIVATEDATA_INVALIDIUNKNOWN = ( D3D11_MESSAGE_ID_SETPRIVATEDATA_INVALIDFREEDATA + 1 ) , + D3D11_MESSAGE_ID_SETPRIVATEDATA_INVALIDFLAGS = ( D3D11_MESSAGE_ID_SETPRIVATEDATA_INVALIDIUNKNOWN + 1 ) , + D3D11_MESSAGE_ID_SETPRIVATEDATA_CHANGINGPARAMS = ( D3D11_MESSAGE_ID_SETPRIVATEDATA_INVALIDFLAGS + 1 ) , + D3D11_MESSAGE_ID_SETPRIVATEDATA_OUTOFMEMORY = ( D3D11_MESSAGE_ID_SETPRIVATEDATA_CHANGINGPARAMS + 1 ) , + D3D11_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDFORMAT = ( D3D11_MESSAGE_ID_SETPRIVATEDATA_OUTOFMEMORY + 1 ) , + D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDSAMPLES = ( D3D11_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDUSAGE = ( D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDSAMPLES + 1 ) , + D3D11_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDBINDFLAGS = ( D3D11_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDUSAGE + 1 ) , + D3D11_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDCPUACCESSFLAGS = ( D3D11_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDBINDFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDMISCFLAGS = ( D3D11_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDCPUACCESSFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDCPUACCESSFLAGS = ( D3D11_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDMISCFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDBINDFLAGS = ( D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDCPUACCESSFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDINITIALDATA = ( D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDBINDFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDDIMENSIONS = ( D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDINITIALDATA + 1 ) , + D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDMIPLEVELS = ( D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDDIMENSIONS + 1 ) , + D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDMISCFLAGS = ( D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDMIPLEVELS + 1 ) , + D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDARG_RETURN = ( D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDMISCFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATEBUFFER_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDARG_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATEBUFFER_NULLDESC = ( D3D11_MESSAGE_ID_CREATEBUFFER_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDCONSTANTBUFFERBINDINGS = ( D3D11_MESSAGE_ID_CREATEBUFFER_NULLDESC + 1 ) , + D3D11_MESSAGE_ID_CREATEBUFFER_LARGEALLOCATION = ( D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDCONSTANTBUFFERBINDINGS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDFORMAT = ( D3D11_MESSAGE_ID_CREATEBUFFER_LARGEALLOCATION + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE1D_UNSUPPORTEDFORMAT = ( D3D11_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE1D_INVALIDSAMPLES = ( D3D11_MESSAGE_ID_CREATETEXTURE1D_UNSUPPORTEDFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDUSAGE = ( D3D11_MESSAGE_ID_CREATETEXTURE1D_INVALIDSAMPLES + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDBINDFLAGS = ( D3D11_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDUSAGE + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDCPUACCESSFLAGS = ( D3D11_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDBINDFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDMISCFLAGS = ( D3D11_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDCPUACCESSFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE1D_INVALIDCPUACCESSFLAGS = ( D3D11_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDMISCFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE1D_INVALIDBINDFLAGS = ( D3D11_MESSAGE_ID_CREATETEXTURE1D_INVALIDCPUACCESSFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE1D_INVALIDINITIALDATA = ( D3D11_MESSAGE_ID_CREATETEXTURE1D_INVALIDBINDFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE1D_INVALIDDIMENSIONS = ( D3D11_MESSAGE_ID_CREATETEXTURE1D_INVALIDINITIALDATA + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE1D_INVALIDMIPLEVELS = ( D3D11_MESSAGE_ID_CREATETEXTURE1D_INVALIDDIMENSIONS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE1D_INVALIDMISCFLAGS = ( D3D11_MESSAGE_ID_CREATETEXTURE1D_INVALIDMIPLEVELS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE1D_INVALIDARG_RETURN = ( D3D11_MESSAGE_ID_CREATETEXTURE1D_INVALIDMISCFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE1D_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_CREATETEXTURE1D_INVALIDARG_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE1D_NULLDESC = ( D3D11_MESSAGE_ID_CREATETEXTURE1D_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE1D_LARGEALLOCATION = ( D3D11_MESSAGE_ID_CREATETEXTURE1D_NULLDESC + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDFORMAT = ( D3D11_MESSAGE_ID_CREATETEXTURE1D_LARGEALLOCATION + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE2D_UNSUPPORTEDFORMAT = ( D3D11_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE2D_INVALIDSAMPLES = ( D3D11_MESSAGE_ID_CREATETEXTURE2D_UNSUPPORTEDFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDUSAGE = ( D3D11_MESSAGE_ID_CREATETEXTURE2D_INVALIDSAMPLES + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDBINDFLAGS = ( D3D11_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDUSAGE + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDCPUACCESSFLAGS = ( D3D11_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDBINDFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDMISCFLAGS = ( D3D11_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDCPUACCESSFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE2D_INVALIDCPUACCESSFLAGS = ( D3D11_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDMISCFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE2D_INVALIDBINDFLAGS = ( D3D11_MESSAGE_ID_CREATETEXTURE2D_INVALIDCPUACCESSFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE2D_INVALIDINITIALDATA = ( D3D11_MESSAGE_ID_CREATETEXTURE2D_INVALIDBINDFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE2D_INVALIDDIMENSIONS = ( D3D11_MESSAGE_ID_CREATETEXTURE2D_INVALIDINITIALDATA + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE2D_INVALIDMIPLEVELS = ( D3D11_MESSAGE_ID_CREATETEXTURE2D_INVALIDDIMENSIONS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE2D_INVALIDMISCFLAGS = ( D3D11_MESSAGE_ID_CREATETEXTURE2D_INVALIDMIPLEVELS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE2D_INVALIDARG_RETURN = ( D3D11_MESSAGE_ID_CREATETEXTURE2D_INVALIDMISCFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE2D_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_CREATETEXTURE2D_INVALIDARG_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE2D_NULLDESC = ( D3D11_MESSAGE_ID_CREATETEXTURE2D_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE2D_LARGEALLOCATION = ( D3D11_MESSAGE_ID_CREATETEXTURE2D_NULLDESC + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDFORMAT = ( D3D11_MESSAGE_ID_CREATETEXTURE2D_LARGEALLOCATION + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE3D_UNSUPPORTEDFORMAT = ( D3D11_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE3D_INVALIDSAMPLES = ( D3D11_MESSAGE_ID_CREATETEXTURE3D_UNSUPPORTEDFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDUSAGE = ( D3D11_MESSAGE_ID_CREATETEXTURE3D_INVALIDSAMPLES + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDBINDFLAGS = ( D3D11_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDUSAGE + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDCPUACCESSFLAGS = ( D3D11_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDBINDFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDMISCFLAGS = ( D3D11_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDCPUACCESSFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE3D_INVALIDCPUACCESSFLAGS = ( D3D11_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDMISCFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE3D_INVALIDBINDFLAGS = ( D3D11_MESSAGE_ID_CREATETEXTURE3D_INVALIDCPUACCESSFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE3D_INVALIDINITIALDATA = ( D3D11_MESSAGE_ID_CREATETEXTURE3D_INVALIDBINDFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE3D_INVALIDDIMENSIONS = ( D3D11_MESSAGE_ID_CREATETEXTURE3D_INVALIDINITIALDATA + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE3D_INVALIDMIPLEVELS = ( D3D11_MESSAGE_ID_CREATETEXTURE3D_INVALIDDIMENSIONS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE3D_INVALIDMISCFLAGS = ( D3D11_MESSAGE_ID_CREATETEXTURE3D_INVALIDMIPLEVELS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE3D_INVALIDARG_RETURN = ( D3D11_MESSAGE_ID_CREATETEXTURE3D_INVALIDMISCFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE3D_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_CREATETEXTURE3D_INVALIDARG_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE3D_NULLDESC = ( D3D11_MESSAGE_ID_CREATETEXTURE3D_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE3D_LARGEALLOCATION = ( D3D11_MESSAGE_ID_CREATETEXTURE3D_NULLDESC + 1 ) , + D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_UNRECOGNIZEDFORMAT = ( D3D11_MESSAGE_ID_CREATETEXTURE3D_LARGEALLOCATION + 1 ) , + D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDESC = ( D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_UNRECOGNIZEDFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDFORMAT = ( D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDESC + 1 ) , + D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDIMENSIONS = ( D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDRESOURCE = ( D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDIMENSIONS + 1 ) , + D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_TOOMANYOBJECTS = ( D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDRESOURCE + 1 ) , + D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDARG_RETURN = ( D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_TOOMANYOBJECTS + 1 ) , + D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDARG_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_UNRECOGNIZEDFORMAT = ( D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_UNSUPPORTEDFORMAT = ( D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_UNRECOGNIZEDFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDESC = ( D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_UNSUPPORTEDFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDFORMAT = ( D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDESC + 1 ) , + D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDIMENSIONS = ( D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDRESOURCE = ( D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDIMENSIONS + 1 ) , + D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_TOOMANYOBJECTS = ( D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDRESOURCE + 1 ) , + D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDARG_RETURN = ( D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_TOOMANYOBJECTS + 1 ) , + D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDARG_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_UNRECOGNIZEDFORMAT = ( D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDESC = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_UNRECOGNIZEDFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDFORMAT = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDESC + 1 ) , + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDIMENSIONS = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDRESOURCE = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDIMENSIONS + 1 ) , + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_TOOMANYOBJECTS = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDRESOURCE + 1 ) , + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDARG_RETURN = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_TOOMANYOBJECTS + 1 ) , + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDARG_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_OUTOFMEMORY = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_TOOMANYELEMENTS = ( D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_OUTOFMEMORY + 1 ) , + D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDFORMAT = ( D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_TOOMANYELEMENTS + 1 ) , + D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_INCOMPATIBLEFORMAT = ( D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOT = ( D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_INCOMPATIBLEFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDINPUTSLOTCLASS = ( D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOT + 1 ) , + D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_STEPRATESLOTCLASSMISMATCH = ( D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDINPUTSLOTCLASS + 1 ) , + D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOTCLASSCHANGE = ( D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_STEPRATESLOTCLASSMISMATCH + 1 ) , + D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSTEPRATECHANGE = ( D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOTCLASSCHANGE + 1 ) , + D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDALIGNMENT = ( D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSTEPRATECHANGE + 1 ) , + D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_DUPLICATESEMANTIC = ( D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDALIGNMENT + 1 ) , + D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_UNPARSEABLEINPUTSIGNATURE = ( D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_DUPLICATESEMANTIC + 1 ) , + D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_NULLSEMANTIC = ( D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_UNPARSEABLEINPUTSIGNATURE + 1 ) , + D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_MISSINGELEMENT = ( D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_NULLSEMANTIC + 1 ) , + D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_NULLDESC = ( D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_MISSINGELEMENT + 1 ) , + D3D11_MESSAGE_ID_CREATEVERTEXSHADER_OUTOFMEMORY = ( D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_NULLDESC + 1 ) , + D3D11_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERBYTECODE = ( D3D11_MESSAGE_ID_CREATEVERTEXSHADER_OUTOFMEMORY + 1 ) , + D3D11_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERTYPE = ( D3D11_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERBYTECODE + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADER_OUTOFMEMORY = ( D3D11_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERTYPE + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERBYTECODE = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADER_OUTOFMEMORY + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERTYPE = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERBYTECODE + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTOFMEMORY = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERTYPE + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERBYTECODE = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTOFMEMORY + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERTYPE = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERBYTECODE + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMENTRIES = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERTYPE + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSTREAMSTRIDEUNUSED = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMENTRIES + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDDECL = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSTREAMSTRIDEUNUSED + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_EXPECTEDDECL = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDDECL + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSLOT0EXPECTED = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_EXPECTEDDECL + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSLOT = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSLOT0EXPECTED + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_ONLYONEELEMENTPERSLOT = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSLOT + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDCOMPONENTCOUNT = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_ONLYONEELEMENTPERSLOT + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTARTCOMPONENTANDCOMPONENTCOUNT = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDCOMPONENTCOUNT + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDGAPDEFINITION = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTARTCOMPONENTANDCOMPONENTCOUNT + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_REPEATEDOUTPUT = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDGAPDEFINITION + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSTREAMSTRIDE = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_REPEATEDOUTPUT + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGSEMANTIC = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSTREAMSTRIDE + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MASKMISMATCH = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGSEMANTIC + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_CANTHAVEONLYGAPS = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MASKMISMATCH + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DECLTOOCOMPLEX = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_CANTHAVEONLYGAPS + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGOUTPUTSIGNATURE = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DECLTOOCOMPLEX + 1 ) , + D3D11_MESSAGE_ID_CREATEPIXELSHADER_OUTOFMEMORY = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGOUTPUTSIGNATURE + 1 ) , + D3D11_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERBYTECODE = ( D3D11_MESSAGE_ID_CREATEPIXELSHADER_OUTOFMEMORY + 1 ) , + D3D11_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERTYPE = ( D3D11_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERBYTECODE + 1 ) , + D3D11_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDFILLMODE = ( D3D11_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERTYPE + 1 ) , + D3D11_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDCULLMODE = ( D3D11_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDFILLMODE + 1 ) , + D3D11_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDDEPTHBIASCLAMP = ( D3D11_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDCULLMODE + 1 ) , + D3D11_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDSLOPESCALEDDEPTHBIAS = ( D3D11_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDDEPTHBIASCLAMP + 1 ) , + D3D11_MESSAGE_ID_CREATERASTERIZERSTATE_TOOMANYOBJECTS = ( D3D11_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDSLOPESCALEDDEPTHBIAS + 1 ) , + D3D11_MESSAGE_ID_CREATERASTERIZERSTATE_NULLDESC = ( D3D11_MESSAGE_ID_CREATERASTERIZERSTATE_TOOMANYOBJECTS + 1 ) , + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHWRITEMASK = ( D3D11_MESSAGE_ID_CREATERASTERIZERSTATE_NULLDESC + 1 ) , + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHFUNC = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHWRITEMASK + 1 ) , + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFAILOP = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHFUNC + 1 ) , + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILZFAILOP = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFAILOP + 1 ) , + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILPASSOP = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILZFAILOP + 1 ) , + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFUNC = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILPASSOP + 1 ) , + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFAILOP = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFUNC + 1 ) , + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILZFAILOP = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFAILOP + 1 ) , + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILPASSOP = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILZFAILOP + 1 ) , + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFUNC = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILPASSOP + 1 ) , + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_TOOMANYOBJECTS = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFUNC + 1 ) , + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_NULLDESC = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_TOOMANYOBJECTS + 1 ) , + D3D11_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLEND = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_NULLDESC + 1 ) , + D3D11_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLEND = ( D3D11_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLEND + 1 ) , + D3D11_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOP = ( D3D11_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLEND + 1 ) , + D3D11_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLENDALPHA = ( D3D11_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOP + 1 ) , + D3D11_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLENDALPHA = ( D3D11_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLENDALPHA + 1 ) , + D3D11_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOPALPHA = ( D3D11_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLENDALPHA + 1 ) , + D3D11_MESSAGE_ID_CREATEBLENDSTATE_INVALIDRENDERTARGETWRITEMASK = ( D3D11_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOPALPHA + 1 ) , + D3D11_MESSAGE_ID_CREATEBLENDSTATE_TOOMANYOBJECTS = ( D3D11_MESSAGE_ID_CREATEBLENDSTATE_INVALIDRENDERTARGETWRITEMASK + 1 ) , + D3D11_MESSAGE_ID_CREATEBLENDSTATE_NULLDESC = ( D3D11_MESSAGE_ID_CREATEBLENDSTATE_TOOMANYOBJECTS + 1 ) , + D3D11_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDFILTER = ( D3D11_MESSAGE_ID_CREATEBLENDSTATE_NULLDESC + 1 ) , + D3D11_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSU = ( D3D11_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDFILTER + 1 ) , + D3D11_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSV = ( D3D11_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSU + 1 ) , + D3D11_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSW = ( D3D11_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSV + 1 ) , + D3D11_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMIPLODBIAS = ( D3D11_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSW + 1 ) , + D3D11_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXANISOTROPY = ( D3D11_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMIPLODBIAS + 1 ) , + D3D11_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDCOMPARISONFUNC = ( D3D11_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXANISOTROPY + 1 ) , + D3D11_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMINLOD = ( D3D11_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDCOMPARISONFUNC + 1 ) , + D3D11_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXLOD = ( D3D11_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMINLOD + 1 ) , + D3D11_MESSAGE_ID_CREATESAMPLERSTATE_TOOMANYOBJECTS = ( D3D11_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXLOD + 1 ) , + D3D11_MESSAGE_ID_CREATESAMPLERSTATE_NULLDESC = ( D3D11_MESSAGE_ID_CREATESAMPLERSTATE_TOOMANYOBJECTS + 1 ) , + D3D11_MESSAGE_ID_CREATEQUERYORPREDICATE_INVALIDQUERY = ( D3D11_MESSAGE_ID_CREATESAMPLERSTATE_NULLDESC + 1 ) , + D3D11_MESSAGE_ID_CREATEQUERYORPREDICATE_INVALIDMISCFLAGS = ( D3D11_MESSAGE_ID_CREATEQUERYORPREDICATE_INVALIDQUERY + 1 ) , + D3D11_MESSAGE_ID_CREATEQUERYORPREDICATE_UNEXPECTEDMISCFLAG = ( D3D11_MESSAGE_ID_CREATEQUERYORPREDICATE_INVALIDMISCFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATEQUERYORPREDICATE_NULLDESC = ( D3D11_MESSAGE_ID_CREATEQUERYORPREDICATE_UNEXPECTEDMISCFLAG + 1 ) , + D3D11_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNRECOGNIZED = ( D3D11_MESSAGE_ID_CREATEQUERYORPREDICATE_NULLDESC + 1 ) , + D3D11_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNDEFINED = ( D3D11_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNRECOGNIZED + 1 ) , + D3D11_MESSAGE_ID_IASETVERTEXBUFFERS_INVALIDBUFFER = ( D3D11_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNDEFINED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_OFFSET_TOO_LARGE = ( D3D11_MESSAGE_ID_IASETVERTEXBUFFERS_INVALIDBUFFER + 1 ) , + D3D11_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_BUFFERS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_OFFSET_TOO_LARGE + 1 ) , + D3D11_MESSAGE_ID_IASETINDEXBUFFER_INVALIDBUFFER = ( D3D11_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_FORMAT_INVALID = ( D3D11_MESSAGE_ID_IASETINDEXBUFFER_INVALIDBUFFER + 1 ) , + D3D11_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_OFFSET_TOO_LARGE = ( D3D11_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_FORMAT_INVALID + 1 ) , + D3D11_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_OFFSET_UNALIGNED = ( D3D11_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_OFFSET_TOO_LARGE + 1 ) , + D3D11_MESSAGE_ID_DEVICE_VSSETSHADERRESOURCES_VIEWS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_OFFSET_UNALIGNED + 1 ) , + D3D11_MESSAGE_ID_VSSETCONSTANTBUFFERS_INVALIDBUFFER = ( D3D11_MESSAGE_ID_DEVICE_VSSETSHADERRESOURCES_VIEWS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_VSSETCONSTANTBUFFERS_BUFFERS_EMPTY = ( D3D11_MESSAGE_ID_VSSETCONSTANTBUFFERS_INVALIDBUFFER + 1 ) , + D3D11_MESSAGE_ID_DEVICE_VSSETSAMPLERS_SAMPLERS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_VSSETCONSTANTBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_GSSETSHADERRESOURCES_VIEWS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_VSSETSAMPLERS_SAMPLERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_GSSETCONSTANTBUFFERS_INVALIDBUFFER = ( D3D11_MESSAGE_ID_DEVICE_GSSETSHADERRESOURCES_VIEWS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_GSSETCONSTANTBUFFERS_BUFFERS_EMPTY = ( D3D11_MESSAGE_ID_GSSETCONSTANTBUFFERS_INVALIDBUFFER + 1 ) , + D3D11_MESSAGE_ID_DEVICE_GSSETSAMPLERS_SAMPLERS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_GSSETCONSTANTBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_SOSETTARGETS_INVALIDBUFFER = ( D3D11_MESSAGE_ID_DEVICE_GSSETSAMPLERS_SAMPLERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SOSETTARGETS_OFFSET_UNALIGNED = ( D3D11_MESSAGE_ID_SOSETTARGETS_INVALIDBUFFER + 1 ) , + D3D11_MESSAGE_ID_DEVICE_PSSETSHADERRESOURCES_VIEWS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_SOSETTARGETS_OFFSET_UNALIGNED + 1 ) , + D3D11_MESSAGE_ID_PSSETCONSTANTBUFFERS_INVALIDBUFFER = ( D3D11_MESSAGE_ID_DEVICE_PSSETSHADERRESOURCES_VIEWS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_PSSETCONSTANTBUFFERS_BUFFERS_EMPTY = ( D3D11_MESSAGE_ID_PSSETCONSTANTBUFFERS_INVALIDBUFFER + 1 ) , + D3D11_MESSAGE_ID_DEVICE_PSSETSAMPLERS_SAMPLERS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_PSSETCONSTANTBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_INVALIDVIEWPORT = ( D3D11_MESSAGE_ID_DEVICE_PSSETSAMPLERS_SAMPLERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_INVALIDSCISSOR = ( D3D11_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_INVALIDVIEWPORT + 1 ) , + D3D11_MESSAGE_ID_CLEARRENDERTARGETVIEW_DENORMFLUSH = ( D3D11_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_INVALIDSCISSOR + 1 ) , + D3D11_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_DENORMFLUSH = ( D3D11_MESSAGE_ID_CLEARRENDERTARGETVIEW_DENORMFLUSH + 1 ) , + D3D11_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_INVALID = ( D3D11_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_DENORMFLUSH + 1 ) , + D3D11_MESSAGE_ID_DEVICE_IAGETVERTEXBUFFERS_BUFFERS_EMPTY = ( D3D11_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_INVALID + 1 ) , + D3D11_MESSAGE_ID_DEVICE_VSGETSHADERRESOURCES_VIEWS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_IAGETVERTEXBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_VSGETCONSTANTBUFFERS_BUFFERS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_VSGETSHADERRESOURCES_VIEWS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_VSGETSAMPLERS_SAMPLERS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_VSGETCONSTANTBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_GSGETSHADERRESOURCES_VIEWS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_VSGETSAMPLERS_SAMPLERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_GSGETCONSTANTBUFFERS_BUFFERS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_GSGETSHADERRESOURCES_VIEWS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_GSGETSAMPLERS_SAMPLERS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_GSGETCONSTANTBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SOGETTARGETS_BUFFERS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_GSGETSAMPLERS_SAMPLERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_PSGETSHADERRESOURCES_VIEWS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_SOGETTARGETS_BUFFERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_PSGETCONSTANTBUFFERS_BUFFERS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_PSGETSHADERRESOURCES_VIEWS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_PSGETSAMPLERS_SAMPLERS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_PSGETCONSTANTBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_RSGETVIEWPORTS_VIEWPORTS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_PSGETSAMPLERS_SAMPLERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_RSGETSCISSORRECTS_RECTS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_RSGETVIEWPORTS_VIEWPORTS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_GENERATEMIPS_RESOURCE_INVALID = ( D3D11_MESSAGE_ID_DEVICE_RSGETSCISSORRECTS_RECTS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDDESTINATIONSUBRESOURCE = ( D3D11_MESSAGE_ID_DEVICE_GENERATEMIPS_RESOURCE_INVALID + 1 ) , + D3D11_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCESUBRESOURCE = ( D3D11_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDDESTINATIONSUBRESOURCE + 1 ) , + D3D11_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCEBOX = ( D3D11_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCESUBRESOURCE + 1 ) , + D3D11_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCE = ( D3D11_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCEBOX + 1 ) , + D3D11_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDDESTINATIONSTATE = ( D3D11_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCE + 1 ) , + D3D11_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCESTATE = ( D3D11_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDDESTINATIONSTATE + 1 ) , + D3D11_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCE = ( D3D11_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCESTATE + 1 ) , + D3D11_MESSAGE_ID_COPYRESOURCE_INVALIDDESTINATIONSTATE = ( D3D11_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCE + 1 ) , + D3D11_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCESTATE = ( D3D11_MESSAGE_ID_COPYRESOURCE_INVALIDDESTINATIONSTATE + 1 ) , + D3D11_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSUBRESOURCE = ( D3D11_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCESTATE + 1 ) , + D3D11_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONBOX = ( D3D11_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSUBRESOURCE + 1 ) , + D3D11_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSTATE = ( D3D11_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONBOX + 1 ) , + D3D11_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_INVALID = ( D3D11_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSTATE + 1 ) , + D3D11_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_SUBRESOURCE_INVALID = ( D3D11_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_INVALID + 1 ) , + D3D11_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_INVALID = ( D3D11_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_SUBRESOURCE_INVALID + 1 ) , + D3D11_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_SUBRESOURCE_INVALID = ( D3D11_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_INVALID + 1 ) , + D3D11_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_FORMAT_INVALID = ( D3D11_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_SUBRESOURCE_INVALID + 1 ) , + D3D11_MESSAGE_ID_BUFFER_MAP_INVALIDMAPTYPE = ( D3D11_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_FORMAT_INVALID + 1 ) , + D3D11_MESSAGE_ID_BUFFER_MAP_INVALIDFLAGS = ( D3D11_MESSAGE_ID_BUFFER_MAP_INVALIDMAPTYPE + 1 ) , + D3D11_MESSAGE_ID_BUFFER_MAP_ALREADYMAPPED = ( D3D11_MESSAGE_ID_BUFFER_MAP_INVALIDFLAGS + 1 ) , + D3D11_MESSAGE_ID_BUFFER_MAP_DEVICEREMOVED_RETURN = ( D3D11_MESSAGE_ID_BUFFER_MAP_ALREADYMAPPED + 1 ) , + D3D11_MESSAGE_ID_BUFFER_UNMAP_NOTMAPPED = ( D3D11_MESSAGE_ID_BUFFER_MAP_DEVICEREMOVED_RETURN + 1 ) , + D3D11_MESSAGE_ID_TEXTURE1D_MAP_INVALIDMAPTYPE = ( D3D11_MESSAGE_ID_BUFFER_UNMAP_NOTMAPPED + 1 ) , + D3D11_MESSAGE_ID_TEXTURE1D_MAP_INVALIDSUBRESOURCE = ( D3D11_MESSAGE_ID_TEXTURE1D_MAP_INVALIDMAPTYPE + 1 ) , + D3D11_MESSAGE_ID_TEXTURE1D_MAP_INVALIDFLAGS = ( D3D11_MESSAGE_ID_TEXTURE1D_MAP_INVALIDSUBRESOURCE + 1 ) , + D3D11_MESSAGE_ID_TEXTURE1D_MAP_ALREADYMAPPED = ( D3D11_MESSAGE_ID_TEXTURE1D_MAP_INVALIDFLAGS + 1 ) , + D3D11_MESSAGE_ID_TEXTURE1D_MAP_DEVICEREMOVED_RETURN = ( D3D11_MESSAGE_ID_TEXTURE1D_MAP_ALREADYMAPPED + 1 ) , + D3D11_MESSAGE_ID_TEXTURE1D_UNMAP_INVALIDSUBRESOURCE = ( D3D11_MESSAGE_ID_TEXTURE1D_MAP_DEVICEREMOVED_RETURN + 1 ) , + D3D11_MESSAGE_ID_TEXTURE1D_UNMAP_NOTMAPPED = ( D3D11_MESSAGE_ID_TEXTURE1D_UNMAP_INVALIDSUBRESOURCE + 1 ) , + D3D11_MESSAGE_ID_TEXTURE2D_MAP_INVALIDMAPTYPE = ( D3D11_MESSAGE_ID_TEXTURE1D_UNMAP_NOTMAPPED + 1 ) , + D3D11_MESSAGE_ID_TEXTURE2D_MAP_INVALIDSUBRESOURCE = ( D3D11_MESSAGE_ID_TEXTURE2D_MAP_INVALIDMAPTYPE + 1 ) , + D3D11_MESSAGE_ID_TEXTURE2D_MAP_INVALIDFLAGS = ( D3D11_MESSAGE_ID_TEXTURE2D_MAP_INVALIDSUBRESOURCE + 1 ) , + D3D11_MESSAGE_ID_TEXTURE2D_MAP_ALREADYMAPPED = ( D3D11_MESSAGE_ID_TEXTURE2D_MAP_INVALIDFLAGS + 1 ) , + D3D11_MESSAGE_ID_TEXTURE2D_MAP_DEVICEREMOVED_RETURN = ( D3D11_MESSAGE_ID_TEXTURE2D_MAP_ALREADYMAPPED + 1 ) , + D3D11_MESSAGE_ID_TEXTURE2D_UNMAP_INVALIDSUBRESOURCE = ( D3D11_MESSAGE_ID_TEXTURE2D_MAP_DEVICEREMOVED_RETURN + 1 ) , + D3D11_MESSAGE_ID_TEXTURE2D_UNMAP_NOTMAPPED = ( D3D11_MESSAGE_ID_TEXTURE2D_UNMAP_INVALIDSUBRESOURCE + 1 ) , + D3D11_MESSAGE_ID_TEXTURE3D_MAP_INVALIDMAPTYPE = ( D3D11_MESSAGE_ID_TEXTURE2D_UNMAP_NOTMAPPED + 1 ) , + D3D11_MESSAGE_ID_TEXTURE3D_MAP_INVALIDSUBRESOURCE = ( D3D11_MESSAGE_ID_TEXTURE3D_MAP_INVALIDMAPTYPE + 1 ) , + D3D11_MESSAGE_ID_TEXTURE3D_MAP_INVALIDFLAGS = ( D3D11_MESSAGE_ID_TEXTURE3D_MAP_INVALIDSUBRESOURCE + 1 ) , + D3D11_MESSAGE_ID_TEXTURE3D_MAP_ALREADYMAPPED = ( D3D11_MESSAGE_ID_TEXTURE3D_MAP_INVALIDFLAGS + 1 ) , + D3D11_MESSAGE_ID_TEXTURE3D_MAP_DEVICEREMOVED_RETURN = ( D3D11_MESSAGE_ID_TEXTURE3D_MAP_ALREADYMAPPED + 1 ) , + D3D11_MESSAGE_ID_TEXTURE3D_UNMAP_INVALIDSUBRESOURCE = ( D3D11_MESSAGE_ID_TEXTURE3D_MAP_DEVICEREMOVED_RETURN + 1 ) , + D3D11_MESSAGE_ID_TEXTURE3D_UNMAP_NOTMAPPED = ( D3D11_MESSAGE_ID_TEXTURE3D_UNMAP_INVALIDSUBRESOURCE + 1 ) , + D3D11_MESSAGE_ID_CHECKFORMATSUPPORT_FORMAT_DEPRECATED = ( D3D11_MESSAGE_ID_TEXTURE3D_UNMAP_NOTMAPPED + 1 ) , + D3D11_MESSAGE_ID_CHECKMULTISAMPLEQUALITYLEVELS_FORMAT_DEPRECATED = ( D3D11_MESSAGE_ID_CHECKFORMATSUPPORT_FORMAT_DEPRECATED + 1 ) , + D3D11_MESSAGE_ID_SETEXCEPTIONMODE_UNRECOGNIZEDFLAGS = ( D3D11_MESSAGE_ID_CHECKMULTISAMPLEQUALITYLEVELS_FORMAT_DEPRECATED + 1 ) , + D3D11_MESSAGE_ID_SETEXCEPTIONMODE_INVALIDARG_RETURN = ( D3D11_MESSAGE_ID_SETEXCEPTIONMODE_UNRECOGNIZEDFLAGS + 1 ) , + D3D11_MESSAGE_ID_SETEXCEPTIONMODE_DEVICEREMOVED_RETURN = ( D3D11_MESSAGE_ID_SETEXCEPTIONMODE_INVALIDARG_RETURN + 1 ) , + D3D11_MESSAGE_ID_REF_SIMULATING_INFINITELY_FAST_HARDWARE = ( D3D11_MESSAGE_ID_SETEXCEPTIONMODE_DEVICEREMOVED_RETURN + 1 ) , + D3D11_MESSAGE_ID_REF_THREADING_MODE = ( D3D11_MESSAGE_ID_REF_SIMULATING_INFINITELY_FAST_HARDWARE + 1 ) , + D3D11_MESSAGE_ID_REF_UMDRIVER_EXCEPTION = ( D3D11_MESSAGE_ID_REF_THREADING_MODE + 1 ) , + D3D11_MESSAGE_ID_REF_KMDRIVER_EXCEPTION = ( D3D11_MESSAGE_ID_REF_UMDRIVER_EXCEPTION + 1 ) , + D3D11_MESSAGE_ID_REF_HARDWARE_EXCEPTION = ( D3D11_MESSAGE_ID_REF_KMDRIVER_EXCEPTION + 1 ) , + D3D11_MESSAGE_ID_REF_ACCESSING_INDEXABLE_TEMP_OUT_OF_RANGE = ( D3D11_MESSAGE_ID_REF_HARDWARE_EXCEPTION + 1 ) , + D3D11_MESSAGE_ID_REF_PROBLEM_PARSING_SHADER = ( D3D11_MESSAGE_ID_REF_ACCESSING_INDEXABLE_TEMP_OUT_OF_RANGE + 1 ) , + D3D11_MESSAGE_ID_REF_OUT_OF_MEMORY = ( D3D11_MESSAGE_ID_REF_PROBLEM_PARSING_SHADER + 1 ) , + D3D11_MESSAGE_ID_REF_INFO = ( D3D11_MESSAGE_ID_REF_OUT_OF_MEMORY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_VERTEXPOS_OVERFLOW = ( D3D11_MESSAGE_ID_REF_INFO + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAWINDEXED_INDEXPOS_OVERFLOW = ( D3D11_MESSAGE_ID_DEVICE_DRAW_VERTEXPOS_OVERFLOW + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAWINSTANCED_VERTEXPOS_OVERFLOW = ( D3D11_MESSAGE_ID_DEVICE_DRAWINDEXED_INDEXPOS_OVERFLOW + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAWINSTANCED_INSTANCEPOS_OVERFLOW = ( D3D11_MESSAGE_ID_DEVICE_DRAWINSTANCED_VERTEXPOS_OVERFLOW + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INSTANCEPOS_OVERFLOW = ( D3D11_MESSAGE_ID_DEVICE_DRAWINSTANCED_INSTANCEPOS_OVERFLOW + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INDEXPOS_OVERFLOW = ( D3D11_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INSTANCEPOS_OVERFLOW + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_VERTEX_SHADER_NOT_SET = ( D3D11_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INDEXPOS_OVERFLOW + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND = ( D3D11_MESSAGE_ID_DEVICE_DRAW_VERTEX_SHADER_NOT_SET + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERINDEX = ( D3D11_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SHADER_LINKAGE_COMPONENTTYPE = ( D3D11_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERINDEX + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERMASK = ( D3D11_MESSAGE_ID_DEVICE_SHADER_LINKAGE_COMPONENTTYPE + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SYSTEMVALUE = ( D3D11_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERMASK + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SHADER_LINKAGE_NEVERWRITTEN_ALWAYSREADS = ( D3D11_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SYSTEMVALUE + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_VERTEX_BUFFER_NOT_SET = ( D3D11_MESSAGE_ID_DEVICE_SHADER_LINKAGE_NEVERWRITTEN_ALWAYSREADS + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_INPUTLAYOUT_NOT_SET = ( D3D11_MESSAGE_ID_DEVICE_DRAW_VERTEX_BUFFER_NOT_SET + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_CONSTANT_BUFFER_NOT_SET = ( D3D11_MESSAGE_ID_DEVICE_DRAW_INPUTLAYOUT_NOT_SET + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_CONSTANT_BUFFER_TOO_SMALL = ( D3D11_MESSAGE_ID_DEVICE_DRAW_CONSTANT_BUFFER_NOT_SET + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_SAMPLER_NOT_SET = ( D3D11_MESSAGE_ID_DEVICE_DRAW_CONSTANT_BUFFER_TOO_SMALL + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET = ( D3D11_MESSAGE_ID_DEVICE_DRAW_SAMPLER_NOT_SET + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_VIEW_DIMENSION_MISMATCH = ( D3D11_MESSAGE_ID_DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_VERTEX_BUFFER_STRIDE_TOO_SMALL = ( D3D11_MESSAGE_ID_DEVICE_DRAW_VIEW_DIMENSION_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_VERTEX_BUFFER_TOO_SMALL = ( D3D11_MESSAGE_ID_DEVICE_DRAW_VERTEX_BUFFER_STRIDE_TOO_SMALL + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_INDEX_BUFFER_NOT_SET = ( D3D11_MESSAGE_ID_DEVICE_DRAW_VERTEX_BUFFER_TOO_SMALL + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_INDEX_BUFFER_FORMAT_INVALID = ( D3D11_MESSAGE_ID_DEVICE_DRAW_INDEX_BUFFER_NOT_SET + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_INDEX_BUFFER_TOO_SMALL = ( D3D11_MESSAGE_ID_DEVICE_DRAW_INDEX_BUFFER_FORMAT_INVALID + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_GS_INPUT_PRIMITIVE_MISMATCH = ( D3D11_MESSAGE_ID_DEVICE_DRAW_INDEX_BUFFER_TOO_SMALL + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_RESOURCE_RETURN_TYPE_MISMATCH = ( D3D11_MESSAGE_ID_DEVICE_DRAW_GS_INPUT_PRIMITIVE_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_POSITION_NOT_PRESENT = ( D3D11_MESSAGE_ID_DEVICE_DRAW_RESOURCE_RETURN_TYPE_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_OUTPUT_STREAM_NOT_SET = ( D3D11_MESSAGE_ID_DEVICE_DRAW_POSITION_NOT_PRESENT + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_BOUND_RESOURCE_MAPPED = ( D3D11_MESSAGE_ID_DEVICE_DRAW_OUTPUT_STREAM_NOT_SET + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_INVALID_PRIMITIVETOPOLOGY = ( D3D11_MESSAGE_ID_DEVICE_DRAW_BOUND_RESOURCE_MAPPED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_VERTEX_OFFSET_UNALIGNED = ( D3D11_MESSAGE_ID_DEVICE_DRAW_INVALID_PRIMITIVETOPOLOGY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_VERTEX_STRIDE_UNALIGNED = ( D3D11_MESSAGE_ID_DEVICE_DRAW_VERTEX_OFFSET_UNALIGNED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_INDEX_OFFSET_UNALIGNED = ( D3D11_MESSAGE_ID_DEVICE_DRAW_VERTEX_STRIDE_UNALIGNED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_OUTPUT_STREAM_OFFSET_UNALIGNED = ( D3D11_MESSAGE_ID_DEVICE_DRAW_INDEX_OFFSET_UNALIGNED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_LD_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_DRAW_OUTPUT_STREAM_OFFSET_UNALIGNED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_SAMPLE_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_LD_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_SAMPLE_C_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_SAMPLE_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_RESOURCE_MULTISAMPLE_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_SAMPLE_C_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_SO_TARGETS_BOUND_WITHOUT_SOURCE = ( D3D11_MESSAGE_ID_DEVICE_DRAW_RESOURCE_MULTISAMPLE_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_SO_STRIDE_LARGER_THAN_BUFFER = ( D3D11_MESSAGE_ID_DEVICE_DRAW_SO_TARGETS_BOUND_WITHOUT_SOURCE + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_OM_RENDER_TARGET_DOES_NOT_SUPPORT_BLENDING = ( D3D11_MESSAGE_ID_DEVICE_DRAW_SO_STRIDE_LARGER_THAN_BUFFER + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_OM_DUAL_SOURCE_BLENDING_CAN_ONLY_HAVE_RENDER_TARGET_0 = ( D3D11_MESSAGE_ID_DEVICE_DRAW_OM_RENDER_TARGET_DOES_NOT_SUPPORT_BLENDING + 1 ) , + D3D11_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_AT_FAULT = ( D3D11_MESSAGE_ID_DEVICE_DRAW_OM_DUAL_SOURCE_BLENDING_CAN_ONLY_HAVE_RENDER_TARGET_0 + 1 ) , + D3D11_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_POSSIBLY_AT_FAULT = ( D3D11_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_AT_FAULT + 1 ) , + D3D11_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_NOT_AT_FAULT = ( D3D11_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_POSSIBLY_AT_FAULT + 1 ) , + D3D11_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_INVALIDARG_RETURN = ( D3D11_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_NOT_AT_FAULT + 1 ) , + D3D11_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_INVALIDARG_RETURN + 1 ) , + D3D11_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_BADINTERFACE_RETURN = ( D3D11_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_VIEWPORT_NOT_SET = ( D3D11_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_BADINTERFACE_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_TRAILING_DIGIT_IN_SEMANTIC = ( D3D11_MESSAGE_ID_DEVICE_DRAW_VIEWPORT_NOT_SET + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_TRAILING_DIGIT_IN_SEMANTIC = ( D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_TRAILING_DIGIT_IN_SEMANTIC + 1 ) , + D3D11_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_DENORMFLUSH = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_TRAILING_DIGIT_IN_SEMANTIC + 1 ) , + D3D11_MESSAGE_ID_OMSETRENDERTARGETS_INVALIDVIEW = ( D3D11_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_DENORMFLUSH + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SETTEXTFILTERSIZE_INVALIDDIMENSIONS = ( D3D11_MESSAGE_ID_OMSETRENDERTARGETS_INVALIDVIEW + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_SAMPLER_MISMATCH = ( D3D11_MESSAGE_ID_DEVICE_SETTEXTFILTERSIZE_INVALIDDIMENSIONS + 1 ) , + D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_TYPE_MISMATCH = ( D3D11_MESSAGE_ID_DEVICE_DRAW_SAMPLER_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_BLENDSTATE_GETDESC_LEGACY = ( D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_TYPE_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_SHADERRESOURCEVIEW_GETDESC_LEGACY = ( D3D11_MESSAGE_ID_BLENDSTATE_GETDESC_LEGACY + 1 ) , + D3D11_MESSAGE_ID_CREATEQUERY_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_SHADERRESOURCEVIEW_GETDESC_LEGACY + 1 ) , + D3D11_MESSAGE_ID_CREATEPREDICATE_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_CREATEQUERY_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATECOUNTER_OUTOFRANGE_COUNTER = ( D3D11_MESSAGE_ID_CREATEPREDICATE_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATECOUNTER_SIMULTANEOUS_ACTIVE_COUNTERS_EXHAUSTED = ( D3D11_MESSAGE_ID_CREATECOUNTER_OUTOFRANGE_COUNTER + 1 ) , + D3D11_MESSAGE_ID_CREATECOUNTER_UNSUPPORTED_WELLKNOWN_COUNTER = ( D3D11_MESSAGE_ID_CREATECOUNTER_SIMULTANEOUS_ACTIVE_COUNTERS_EXHAUSTED + 1 ) , + D3D11_MESSAGE_ID_CREATECOUNTER_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_CREATECOUNTER_UNSUPPORTED_WELLKNOWN_COUNTER + 1 ) , + D3D11_MESSAGE_ID_CREATECOUNTER_NONEXCLUSIVE_RETURN = ( D3D11_MESSAGE_ID_CREATECOUNTER_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATECOUNTER_NULLDESC = ( D3D11_MESSAGE_ID_CREATECOUNTER_NONEXCLUSIVE_RETURN + 1 ) , + D3D11_MESSAGE_ID_CHECKCOUNTER_OUTOFRANGE_COUNTER = ( D3D11_MESSAGE_ID_CREATECOUNTER_NULLDESC + 1 ) , + D3D11_MESSAGE_ID_CHECKCOUNTER_UNSUPPORTED_WELLKNOWN_COUNTER = ( D3D11_MESSAGE_ID_CHECKCOUNTER_OUTOFRANGE_COUNTER + 1 ) , + D3D11_MESSAGE_ID_SETPREDICATION_INVALID_PREDICATE_STATE = ( D3D11_MESSAGE_ID_CHECKCOUNTER_UNSUPPORTED_WELLKNOWN_COUNTER + 1 ) , + D3D11_MESSAGE_ID_QUERY_BEGIN_UNSUPPORTED = ( D3D11_MESSAGE_ID_SETPREDICATION_INVALID_PREDICATE_STATE + 1 ) , + D3D11_MESSAGE_ID_PREDICATE_BEGIN_DURING_PREDICATION = ( D3D11_MESSAGE_ID_QUERY_BEGIN_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_QUERY_BEGIN_DUPLICATE = ( D3D11_MESSAGE_ID_PREDICATE_BEGIN_DURING_PREDICATION + 1 ) , + D3D11_MESSAGE_ID_QUERY_BEGIN_ABANDONING_PREVIOUS_RESULTS = ( D3D11_MESSAGE_ID_QUERY_BEGIN_DUPLICATE + 1 ) , + D3D11_MESSAGE_ID_PREDICATE_END_DURING_PREDICATION = ( D3D11_MESSAGE_ID_QUERY_BEGIN_ABANDONING_PREVIOUS_RESULTS + 1 ) , + D3D11_MESSAGE_ID_QUERY_END_ABANDONING_PREVIOUS_RESULTS = ( D3D11_MESSAGE_ID_PREDICATE_END_DURING_PREDICATION + 1 ) , + D3D11_MESSAGE_ID_QUERY_END_WITHOUT_BEGIN = ( D3D11_MESSAGE_ID_QUERY_END_ABANDONING_PREVIOUS_RESULTS + 1 ) , + D3D11_MESSAGE_ID_QUERY_GETDATA_INVALID_DATASIZE = ( D3D11_MESSAGE_ID_QUERY_END_WITHOUT_BEGIN + 1 ) , + D3D11_MESSAGE_ID_QUERY_GETDATA_INVALID_FLAGS = ( D3D11_MESSAGE_ID_QUERY_GETDATA_INVALID_DATASIZE + 1 ) , + D3D11_MESSAGE_ID_QUERY_GETDATA_INVALID_CALL = ( D3D11_MESSAGE_ID_QUERY_GETDATA_INVALID_FLAGS + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_PS_OUTPUT_TYPE_MISMATCH = ( D3D11_MESSAGE_ID_QUERY_GETDATA_INVALID_CALL + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_GATHER_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_DRAW_PS_OUTPUT_TYPE_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_INVALID_USE_OF_CENTER_MULTISAMPLE_PATTERN = ( D3D11_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_GATHER_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_STRIDE_TOO_LARGE = ( D3D11_MESSAGE_ID_DEVICE_DRAW_INVALID_USE_OF_CENTER_MULTISAMPLE_PATTERN + 1 ) , + D3D11_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_INVALIDRANGE = ( D3D11_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_STRIDE_TOO_LARGE + 1 ) , + D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_EMPTY_LAYOUT = ( D3D11_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_INVALIDRANGE + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_RESOURCE_SAMPLE_COUNT_MISMATCH = ( D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_EMPTY_LAYOUT + 1 ) , + D3D11_MESSAGE_ID_LIVE_OBJECT_SUMMARY = ( D3D11_MESSAGE_ID_DEVICE_DRAW_RESOURCE_SAMPLE_COUNT_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_LIVE_BUFFER = ( D3D11_MESSAGE_ID_LIVE_OBJECT_SUMMARY + 1 ) , + D3D11_MESSAGE_ID_LIVE_TEXTURE1D = ( D3D11_MESSAGE_ID_LIVE_BUFFER + 1 ) , + D3D11_MESSAGE_ID_LIVE_TEXTURE2D = ( D3D11_MESSAGE_ID_LIVE_TEXTURE1D + 1 ) , + D3D11_MESSAGE_ID_LIVE_TEXTURE3D = ( D3D11_MESSAGE_ID_LIVE_TEXTURE2D + 1 ) , + D3D11_MESSAGE_ID_LIVE_SHADERRESOURCEVIEW = ( D3D11_MESSAGE_ID_LIVE_TEXTURE3D + 1 ) , + D3D11_MESSAGE_ID_LIVE_RENDERTARGETVIEW = ( D3D11_MESSAGE_ID_LIVE_SHADERRESOURCEVIEW + 1 ) , + D3D11_MESSAGE_ID_LIVE_DEPTHSTENCILVIEW = ( D3D11_MESSAGE_ID_LIVE_RENDERTARGETVIEW + 1 ) , + D3D11_MESSAGE_ID_LIVE_VERTEXSHADER = ( D3D11_MESSAGE_ID_LIVE_DEPTHSTENCILVIEW + 1 ) , + D3D11_MESSAGE_ID_LIVE_GEOMETRYSHADER = ( D3D11_MESSAGE_ID_LIVE_VERTEXSHADER + 1 ) , + D3D11_MESSAGE_ID_LIVE_PIXELSHADER = ( D3D11_MESSAGE_ID_LIVE_GEOMETRYSHADER + 1 ) , + D3D11_MESSAGE_ID_LIVE_INPUTLAYOUT = ( D3D11_MESSAGE_ID_LIVE_PIXELSHADER + 1 ) , + D3D11_MESSAGE_ID_LIVE_SAMPLER = ( D3D11_MESSAGE_ID_LIVE_INPUTLAYOUT + 1 ) , + D3D11_MESSAGE_ID_LIVE_BLENDSTATE = ( D3D11_MESSAGE_ID_LIVE_SAMPLER + 1 ) , + D3D11_MESSAGE_ID_LIVE_DEPTHSTENCILSTATE = ( D3D11_MESSAGE_ID_LIVE_BLENDSTATE + 1 ) , + D3D11_MESSAGE_ID_LIVE_RASTERIZERSTATE = ( D3D11_MESSAGE_ID_LIVE_DEPTHSTENCILSTATE + 1 ) , + D3D11_MESSAGE_ID_LIVE_QUERY = ( D3D11_MESSAGE_ID_LIVE_RASTERIZERSTATE + 1 ) , + D3D11_MESSAGE_ID_LIVE_PREDICATE = ( D3D11_MESSAGE_ID_LIVE_QUERY + 1 ) , + D3D11_MESSAGE_ID_LIVE_COUNTER = ( D3D11_MESSAGE_ID_LIVE_PREDICATE + 1 ) , + D3D11_MESSAGE_ID_LIVE_DEVICE = ( D3D11_MESSAGE_ID_LIVE_COUNTER + 1 ) , + D3D11_MESSAGE_ID_LIVE_SWAPCHAIN = ( D3D11_MESSAGE_ID_LIVE_DEVICE + 1 ) , + D3D11_MESSAGE_ID_D3D10_MESSAGES_END = ( D3D11_MESSAGE_ID_LIVE_SWAPCHAIN + 1 ) , + D3D11_MESSAGE_ID_D3D10L9_MESSAGES_START = 0x100000, + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_STENCIL_NO_TWO_SIDED = ( D3D11_MESSAGE_ID_D3D10L9_MESSAGES_START + 1 ) , + D3D11_MESSAGE_ID_CREATERASTERIZERSTATE_DepthBiasClamp_NOT_SUPPORTED = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_STENCIL_NO_TWO_SIDED + 1 ) , + D3D11_MESSAGE_ID_CREATESAMPLERSTATE_NO_COMPARISON_SUPPORT = ( D3D11_MESSAGE_ID_CREATERASTERIZERSTATE_DepthBiasClamp_NOT_SUPPORTED + 1 ) , + D3D11_MESSAGE_ID_CREATESAMPLERSTATE_EXCESSIVE_ANISOTROPY = ( D3D11_MESSAGE_ID_CREATESAMPLERSTATE_NO_COMPARISON_SUPPORT + 1 ) , + D3D11_MESSAGE_ID_CREATESAMPLERSTATE_BORDER_OUT_OF_RANGE = ( D3D11_MESSAGE_ID_CREATESAMPLERSTATE_EXCESSIVE_ANISOTROPY + 1 ) , + D3D11_MESSAGE_ID_VSSETSAMPLERS_NOT_SUPPORTED = ( D3D11_MESSAGE_ID_CREATESAMPLERSTATE_BORDER_OUT_OF_RANGE + 1 ) , + D3D11_MESSAGE_ID_VSSETSAMPLERS_TOO_MANY_SAMPLERS = ( D3D11_MESSAGE_ID_VSSETSAMPLERS_NOT_SUPPORTED + 1 ) , + D3D11_MESSAGE_ID_PSSETSAMPLERS_TOO_MANY_SAMPLERS = ( D3D11_MESSAGE_ID_VSSETSAMPLERS_TOO_MANY_SAMPLERS + 1 ) , + D3D11_MESSAGE_ID_CREATERESOURCE_NO_ARRAYS = ( D3D11_MESSAGE_ID_PSSETSAMPLERS_TOO_MANY_SAMPLERS + 1 ) , + D3D11_MESSAGE_ID_CREATERESOURCE_NO_VB_AND_IB_BIND = ( D3D11_MESSAGE_ID_CREATERESOURCE_NO_ARRAYS + 1 ) , + D3D11_MESSAGE_ID_CREATERESOURCE_NO_TEXTURE_1D = ( D3D11_MESSAGE_ID_CREATERESOURCE_NO_VB_AND_IB_BIND + 1 ) , + D3D11_MESSAGE_ID_CREATERESOURCE_DIMENSION_OUT_OF_RANGE = ( D3D11_MESSAGE_ID_CREATERESOURCE_NO_TEXTURE_1D + 1 ) , + D3D11_MESSAGE_ID_CREATERESOURCE_NOT_BINDABLE_AS_SHADER_RESOURCE = ( D3D11_MESSAGE_ID_CREATERESOURCE_DIMENSION_OUT_OF_RANGE + 1 ) , + D3D11_MESSAGE_ID_OMSETRENDERTARGETS_TOO_MANY_RENDER_TARGETS = ( D3D11_MESSAGE_ID_CREATERESOURCE_NOT_BINDABLE_AS_SHADER_RESOURCE + 1 ) , + D3D11_MESSAGE_ID_OMSETRENDERTARGETS_NO_DIFFERING_BIT_DEPTHS = ( D3D11_MESSAGE_ID_OMSETRENDERTARGETS_TOO_MANY_RENDER_TARGETS + 1 ) , + D3D11_MESSAGE_ID_IASETVERTEXBUFFERS_BAD_BUFFER_INDEX = ( D3D11_MESSAGE_ID_OMSETRENDERTARGETS_NO_DIFFERING_BIT_DEPTHS + 1 ) , + D3D11_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_TOO_MANY_VIEWPORTS = ( D3D11_MESSAGE_ID_IASETVERTEXBUFFERS_BAD_BUFFER_INDEX + 1 ) , + D3D11_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_ADJACENCY_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_TOO_MANY_VIEWPORTS + 1 ) , + D3D11_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_TOO_MANY_SCISSORS = ( D3D11_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_ADJACENCY_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_COPYRESOURCE_ONLY_TEXTURE_2D_WITHIN_GPU_MEMORY = ( D3D11_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_TOO_MANY_SCISSORS + 1 ) , + D3D11_MESSAGE_ID_COPYRESOURCE_NO_TEXTURE_3D_READBACK = ( D3D11_MESSAGE_ID_COPYRESOURCE_ONLY_TEXTURE_2D_WITHIN_GPU_MEMORY + 1 ) , + D3D11_MESSAGE_ID_COPYRESOURCE_NO_TEXTURE_ONLY_READBACK = ( D3D11_MESSAGE_ID_COPYRESOURCE_NO_TEXTURE_3D_READBACK + 1 ) , + D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_UNSUPPORTED_FORMAT = ( D3D11_MESSAGE_ID_COPYRESOURCE_NO_TEXTURE_ONLY_READBACK + 1 ) , + D3D11_MESSAGE_ID_CREATEBLENDSTATE_NO_ALPHA_TO_COVERAGE = ( D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_UNSUPPORTED_FORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATERASTERIZERSTATE_DepthClipEnable_MUST_BE_TRUE = ( D3D11_MESSAGE_ID_CREATEBLENDSTATE_NO_ALPHA_TO_COVERAGE + 1 ) , + D3D11_MESSAGE_ID_DRAWINDEXED_STARTINDEXLOCATION_MUST_BE_POSITIVE = ( D3D11_MESSAGE_ID_CREATERASTERIZERSTATE_DepthClipEnable_MUST_BE_TRUE + 1 ) , + D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_MUST_USE_LOWEST_LOD = ( D3D11_MESSAGE_ID_DRAWINDEXED_STARTINDEXLOCATION_MUST_BE_POSITIVE + 1 ) , + D3D11_MESSAGE_ID_CREATESAMPLERSTATE_MINLOD_MUST_NOT_BE_FRACTIONAL = ( D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_MUST_USE_LOWEST_LOD + 1 ) , + D3D11_MESSAGE_ID_CREATESAMPLERSTATE_MAXLOD_MUST_BE_FLT_MAX = ( D3D11_MESSAGE_ID_CREATESAMPLERSTATE_MINLOD_MUST_NOT_BE_FRACTIONAL + 1 ) , + D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_FIRSTARRAYSLICE_MUST_BE_ZERO = ( D3D11_MESSAGE_ID_CREATESAMPLERSTATE_MAXLOD_MUST_BE_FLT_MAX + 1 ) , + D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_CUBES_MUST_HAVE_6_SIDES = ( D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_FIRSTARRAYSLICE_MUST_BE_ZERO + 1 ) , + D3D11_MESSAGE_ID_CREATERESOURCE_NOT_BINDABLE_AS_RENDER_TARGET = ( D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_CUBES_MUST_HAVE_6_SIDES + 1 ) , + D3D11_MESSAGE_ID_CREATERESOURCE_NO_DWORD_INDEX_BUFFER = ( D3D11_MESSAGE_ID_CREATERESOURCE_NOT_BINDABLE_AS_RENDER_TARGET + 1 ) , + D3D11_MESSAGE_ID_CREATERESOURCE_MSAA_PRECLUDES_SHADER_RESOURCE = ( D3D11_MESSAGE_ID_CREATERESOURCE_NO_DWORD_INDEX_BUFFER + 1 ) , + D3D11_MESSAGE_ID_CREATERESOURCE_PRESENTATION_PRECLUDES_SHADER_RESOURCE = ( D3D11_MESSAGE_ID_CREATERESOURCE_MSAA_PRECLUDES_SHADER_RESOURCE + 1 ) , + D3D11_MESSAGE_ID_CREATEBLENDSTATE_NO_INDEPENDENT_BLEND_ENABLE = ( D3D11_MESSAGE_ID_CREATERESOURCE_PRESENTATION_PRECLUDES_SHADER_RESOURCE + 1 ) , + D3D11_MESSAGE_ID_CREATEBLENDSTATE_NO_INDEPENDENT_WRITE_MASKS = ( D3D11_MESSAGE_ID_CREATEBLENDSTATE_NO_INDEPENDENT_BLEND_ENABLE + 1 ) , + D3D11_MESSAGE_ID_CREATERESOURCE_NO_STREAM_OUT = ( D3D11_MESSAGE_ID_CREATEBLENDSTATE_NO_INDEPENDENT_WRITE_MASKS + 1 ) , + D3D11_MESSAGE_ID_CREATERESOURCE_ONLY_VB_IB_FOR_BUFFERS = ( D3D11_MESSAGE_ID_CREATERESOURCE_NO_STREAM_OUT + 1 ) , + D3D11_MESSAGE_ID_CREATERESOURCE_NO_AUTOGEN_FOR_VOLUMES = ( D3D11_MESSAGE_ID_CREATERESOURCE_ONLY_VB_IB_FOR_BUFFERS + 1 ) , + D3D11_MESSAGE_ID_CREATERESOURCE_DXGI_FORMAT_R8G8B8A8_CANNOT_BE_SHARED = ( D3D11_MESSAGE_ID_CREATERESOURCE_NO_AUTOGEN_FOR_VOLUMES + 1 ) , + D3D11_MESSAGE_ID_VSSHADERRESOURCES_NOT_SUPPORTED = ( D3D11_MESSAGE_ID_CREATERESOURCE_DXGI_FORMAT_R8G8B8A8_CANNOT_BE_SHARED + 1 ) , + D3D11_MESSAGE_ID_GEOMETRY_SHADER_NOT_SUPPORTED = ( D3D11_MESSAGE_ID_VSSHADERRESOURCES_NOT_SUPPORTED + 1 ) , + D3D11_MESSAGE_ID_STREAM_OUT_NOT_SUPPORTED = ( D3D11_MESSAGE_ID_GEOMETRY_SHADER_NOT_SUPPORTED + 1 ) , + D3D11_MESSAGE_ID_TEXT_FILTER_NOT_SUPPORTED = ( D3D11_MESSAGE_ID_STREAM_OUT_NOT_SUPPORTED + 1 ) , + D3D11_MESSAGE_ID_CREATEBLENDSTATE_NO_SEPARATE_ALPHA_BLEND = ( D3D11_MESSAGE_ID_TEXT_FILTER_NOT_SUPPORTED + 1 ) , + D3D11_MESSAGE_ID_CREATEBLENDSTATE_NO_MRT_BLEND = ( D3D11_MESSAGE_ID_CREATEBLENDSTATE_NO_SEPARATE_ALPHA_BLEND + 1 ) , + D3D11_MESSAGE_ID_CREATEBLENDSTATE_OPERATION_NOT_SUPPORTED = ( D3D11_MESSAGE_ID_CREATEBLENDSTATE_NO_MRT_BLEND + 1 ) , + D3D11_MESSAGE_ID_CREATESAMPLERSTATE_NO_MIRRORONCE = ( D3D11_MESSAGE_ID_CREATEBLENDSTATE_OPERATION_NOT_SUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DRAWINSTANCED_NOT_SUPPORTED = ( D3D11_MESSAGE_ID_CREATESAMPLERSTATE_NO_MIRRORONCE + 1 ) , + D3D11_MESSAGE_ID_DRAWINDEXEDINSTANCED_NOT_SUPPORTED_BELOW_9_3 = ( D3D11_MESSAGE_ID_DRAWINSTANCED_NOT_SUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DRAWINDEXED_POINTLIST_UNSUPPORTED = ( D3D11_MESSAGE_ID_DRAWINDEXEDINSTANCED_NOT_SUPPORTED_BELOW_9_3 + 1 ) , + D3D11_MESSAGE_ID_SETBLENDSTATE_SAMPLE_MASK_CANNOT_BE_ZERO = ( D3D11_MESSAGE_ID_DRAWINDEXED_POINTLIST_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_CREATERESOURCE_DIMENSION_EXCEEDS_FEATURE_LEVEL_DEFINITION = ( D3D11_MESSAGE_ID_SETBLENDSTATE_SAMPLE_MASK_CANNOT_BE_ZERO + 1 ) , + D3D11_MESSAGE_ID_CREATERESOURCE_ONLY_SINGLE_MIP_LEVEL_DEPTH_STENCIL_SUPPORTED = ( D3D11_MESSAGE_ID_CREATERESOURCE_DIMENSION_EXCEEDS_FEATURE_LEVEL_DEFINITION + 1 ) , + D3D11_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_NEGATIVESCISSOR = ( D3D11_MESSAGE_ID_CREATERESOURCE_ONLY_SINGLE_MIP_LEVEL_DEPTH_STENCIL_SUPPORTED + 1 ) , + D3D11_MESSAGE_ID_SLOT_ZERO_MUST_BE_D3D10_INPUT_PER_VERTEX_DATA = ( D3D11_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_NEGATIVESCISSOR + 1 ) , + D3D11_MESSAGE_ID_CREATERESOURCE_NON_POW_2_MIPMAP = ( D3D11_MESSAGE_ID_SLOT_ZERO_MUST_BE_D3D10_INPUT_PER_VERTEX_DATA + 1 ) , + D3D11_MESSAGE_ID_CREATESAMPLERSTATE_BORDER_NOT_SUPPORTED = ( D3D11_MESSAGE_ID_CREATERESOURCE_NON_POW_2_MIPMAP + 1 ) , + D3D11_MESSAGE_ID_OMSETRENDERTARGETS_NO_SRGB_MRT = ( D3D11_MESSAGE_ID_CREATESAMPLERSTATE_BORDER_NOT_SUPPORTED + 1 ) , + D3D11_MESSAGE_ID_COPYRESOURCE_NO_3D_MISMATCHED_UPDATES = ( D3D11_MESSAGE_ID_OMSETRENDERTARGETS_NO_SRGB_MRT + 1 ) , + D3D11_MESSAGE_ID_D3D10L9_MESSAGES_END = ( D3D11_MESSAGE_ID_COPYRESOURCE_NO_3D_MISMATCHED_UPDATES + 1 ) , + D3D11_MESSAGE_ID_D3D11_MESSAGES_START = 0x200000, + D3D11_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDFLAGS = ( D3D11_MESSAGE_ID_D3D11_MESSAGES_START + 1 ) , + D3D11_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDCLASSLINKAGE = ( D3D11_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDCLASSLINKAGE = ( D3D11_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDCLASSLINKAGE + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMSTREAMS = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDCLASSLINKAGE + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTREAMTORASTERIZER = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMSTREAMS + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDSTREAMS = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTREAMTORASTERIZER + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDCLASSLINKAGE = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDSTREAMS + 1 ) , + D3D11_MESSAGE_ID_CREATEPIXELSHADER_INVALIDCLASSLINKAGE = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDCLASSLINKAGE + 1 ) , + D3D11_MESSAGE_ID_CREATEDEFERREDCONTEXT_INVALID_COMMANDLISTFLAGS = ( D3D11_MESSAGE_ID_CREATEPIXELSHADER_INVALIDCLASSLINKAGE + 1 ) , + D3D11_MESSAGE_ID_CREATEDEFERREDCONTEXT_SINGLETHREADED = ( D3D11_MESSAGE_ID_CREATEDEFERREDCONTEXT_INVALID_COMMANDLISTFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATEDEFERREDCONTEXT_INVALIDARG_RETURN = ( D3D11_MESSAGE_ID_CREATEDEFERREDCONTEXT_SINGLETHREADED + 1 ) , + D3D11_MESSAGE_ID_CREATEDEFERREDCONTEXT_INVALID_CALL_RETURN = ( D3D11_MESSAGE_ID_CREATEDEFERREDCONTEXT_INVALIDARG_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATEDEFERREDCONTEXT_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_CREATEDEFERREDCONTEXT_INVALID_CALL_RETURN + 1 ) , + D3D11_MESSAGE_ID_FINISHDISPLAYLIST_ONIMMEDIATECONTEXT = ( D3D11_MESSAGE_ID_CREATEDEFERREDCONTEXT_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_FINISHDISPLAYLIST_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_FINISHDISPLAYLIST_ONIMMEDIATECONTEXT + 1 ) , + D3D11_MESSAGE_ID_FINISHDISPLAYLIST_INVALID_CALL_RETURN = ( D3D11_MESSAGE_ID_FINISHDISPLAYLIST_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTREAM = ( D3D11_MESSAGE_ID_FINISHDISPLAYLIST_INVALID_CALL_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDENTRIES = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDSTRIDES = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDENTRIES + 1 ) , + D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMSTRIDES = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDSTRIDES + 1 ) , + D3D11_MESSAGE_ID_DEVICE_HSSETSHADERRESOURCES_HAZARD = ( D3D11_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMSTRIDES + 1 ) , + D3D11_MESSAGE_ID_DEVICE_HSSETCONSTANTBUFFERS_HAZARD = ( D3D11_MESSAGE_ID_DEVICE_HSSETSHADERRESOURCES_HAZARD + 1 ) , + D3D11_MESSAGE_ID_HSSETSHADERRESOURCES_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_DEVICE_HSSETCONSTANTBUFFERS_HAZARD + 1 ) , + D3D11_MESSAGE_ID_HSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_HSSETSHADERRESOURCES_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_CREATEHULLSHADER_INVALIDCALL = ( D3D11_MESSAGE_ID_HSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_CREATEHULLSHADER_OUTOFMEMORY = ( D3D11_MESSAGE_ID_CREATEHULLSHADER_INVALIDCALL + 1 ) , + D3D11_MESSAGE_ID_CREATEHULLSHADER_INVALIDSHADERBYTECODE = ( D3D11_MESSAGE_ID_CREATEHULLSHADER_OUTOFMEMORY + 1 ) , + D3D11_MESSAGE_ID_CREATEHULLSHADER_INVALIDSHADERTYPE = ( D3D11_MESSAGE_ID_CREATEHULLSHADER_INVALIDSHADERBYTECODE + 1 ) , + D3D11_MESSAGE_ID_CREATEHULLSHADER_INVALIDCLASSLINKAGE = ( D3D11_MESSAGE_ID_CREATEHULLSHADER_INVALIDSHADERTYPE + 1 ) , + D3D11_MESSAGE_ID_DEVICE_HSSETSHADERRESOURCES_VIEWS_EMPTY = ( D3D11_MESSAGE_ID_CREATEHULLSHADER_INVALIDCLASSLINKAGE + 1 ) , + D3D11_MESSAGE_ID_HSSETCONSTANTBUFFERS_INVALIDBUFFER = ( D3D11_MESSAGE_ID_DEVICE_HSSETSHADERRESOURCES_VIEWS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_HSSETCONSTANTBUFFERS_BUFFERS_EMPTY = ( D3D11_MESSAGE_ID_HSSETCONSTANTBUFFERS_INVALIDBUFFER + 1 ) , + D3D11_MESSAGE_ID_DEVICE_HSSETSAMPLERS_SAMPLERS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_HSSETCONSTANTBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_HSGETSHADERRESOURCES_VIEWS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_HSSETSAMPLERS_SAMPLERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_HSGETCONSTANTBUFFERS_BUFFERS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_HSGETSHADERRESOURCES_VIEWS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_HSGETSAMPLERS_SAMPLERS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_HSGETCONSTANTBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DSSETSHADERRESOURCES_HAZARD = ( D3D11_MESSAGE_ID_DEVICE_HSGETSAMPLERS_SAMPLERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DSSETCONSTANTBUFFERS_HAZARD = ( D3D11_MESSAGE_ID_DEVICE_DSSETSHADERRESOURCES_HAZARD + 1 ) , + D3D11_MESSAGE_ID_DSSETSHADERRESOURCES_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_DEVICE_DSSETCONSTANTBUFFERS_HAZARD + 1 ) , + D3D11_MESSAGE_ID_DSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_DSSETSHADERRESOURCES_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDCALL = ( D3D11_MESSAGE_ID_DSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_CREATEDOMAINSHADER_OUTOFMEMORY = ( D3D11_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDCALL + 1 ) , + D3D11_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDSHADERBYTECODE = ( D3D11_MESSAGE_ID_CREATEDOMAINSHADER_OUTOFMEMORY + 1 ) , + D3D11_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDSHADERTYPE = ( D3D11_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDSHADERBYTECODE + 1 ) , + D3D11_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDCLASSLINKAGE = ( D3D11_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDSHADERTYPE + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DSSETSHADERRESOURCES_VIEWS_EMPTY = ( D3D11_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDCLASSLINKAGE + 1 ) , + D3D11_MESSAGE_ID_DSSETCONSTANTBUFFERS_INVALIDBUFFER = ( D3D11_MESSAGE_ID_DEVICE_DSSETSHADERRESOURCES_VIEWS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DSSETCONSTANTBUFFERS_BUFFERS_EMPTY = ( D3D11_MESSAGE_ID_DSSETCONSTANTBUFFERS_INVALIDBUFFER + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DSSETSAMPLERS_SAMPLERS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_DSSETCONSTANTBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DSGETSHADERRESOURCES_VIEWS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_DSSETSAMPLERS_SAMPLERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DSGETCONSTANTBUFFERS_BUFFERS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_DSGETSHADERRESOURCES_VIEWS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DSGETSAMPLERS_SAMPLERS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_DSGETCONSTANTBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_HS_XOR_DS_MISMATCH = ( D3D11_MESSAGE_ID_DEVICE_DSGETSAMPLERS_SAMPLERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEFERRED_CONTEXT_REMOVAL_PROCESS_AT_FAULT = ( D3D11_MESSAGE_ID_DEVICE_DRAW_HS_XOR_DS_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAWINDIRECT_INVALID_ARG_BUFFER = ( D3D11_MESSAGE_ID_DEFERRED_CONTEXT_REMOVAL_PROCESS_AT_FAULT + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAWINDIRECT_OFFSET_UNALIGNED = ( D3D11_MESSAGE_ID_DEVICE_DRAWINDIRECT_INVALID_ARG_BUFFER + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAWINDIRECT_OFFSET_OVERFLOW = ( D3D11_MESSAGE_ID_DEVICE_DRAWINDIRECT_OFFSET_UNALIGNED + 1 ) , + D3D11_MESSAGE_ID_RESOURCE_MAP_INVALIDMAPTYPE = ( D3D11_MESSAGE_ID_DEVICE_DRAWINDIRECT_OFFSET_OVERFLOW + 1 ) , + D3D11_MESSAGE_ID_RESOURCE_MAP_INVALIDSUBRESOURCE = ( D3D11_MESSAGE_ID_RESOURCE_MAP_INVALIDMAPTYPE + 1 ) , + D3D11_MESSAGE_ID_RESOURCE_MAP_INVALIDFLAGS = ( D3D11_MESSAGE_ID_RESOURCE_MAP_INVALIDSUBRESOURCE + 1 ) , + D3D11_MESSAGE_ID_RESOURCE_MAP_ALREADYMAPPED = ( D3D11_MESSAGE_ID_RESOURCE_MAP_INVALIDFLAGS + 1 ) , + D3D11_MESSAGE_ID_RESOURCE_MAP_DEVICEREMOVED_RETURN = ( D3D11_MESSAGE_ID_RESOURCE_MAP_ALREADYMAPPED + 1 ) , + D3D11_MESSAGE_ID_RESOURCE_MAP_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_RESOURCE_MAP_DEVICEREMOVED_RETURN + 1 ) , + D3D11_MESSAGE_ID_RESOURCE_MAP_WITHOUT_INITIAL_DISCARD = ( D3D11_MESSAGE_ID_RESOURCE_MAP_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_RESOURCE_UNMAP_INVALIDSUBRESOURCE = ( D3D11_MESSAGE_ID_RESOURCE_MAP_WITHOUT_INITIAL_DISCARD + 1 ) , + D3D11_MESSAGE_ID_RESOURCE_UNMAP_NOTMAPPED = ( D3D11_MESSAGE_ID_RESOURCE_UNMAP_INVALIDSUBRESOURCE + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_RASTERIZING_CONTROL_POINTS = ( D3D11_MESSAGE_ID_RESOURCE_UNMAP_NOTMAPPED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_DRAW_RASTERIZING_CONTROL_POINTS + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_HS_DS_SIGNATURE_MISMATCH = ( D3D11_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_HULL_SHADER_INPUT_TOPOLOGY_MISMATCH = ( D3D11_MESSAGE_ID_DEVICE_DRAW_HS_DS_SIGNATURE_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_HS_DS_CONTROL_POINT_COUNT_MISMATCH = ( D3D11_MESSAGE_ID_DEVICE_DRAW_HULL_SHADER_INPUT_TOPOLOGY_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_HS_DS_TESSELLATOR_DOMAIN_MISMATCH = ( D3D11_MESSAGE_ID_DEVICE_DRAW_HS_DS_CONTROL_POINT_COUNT_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_CREATE_CONTEXT = ( D3D11_MESSAGE_ID_DEVICE_DRAW_HS_DS_TESSELLATOR_DOMAIN_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_LIVE_CONTEXT = ( D3D11_MESSAGE_ID_CREATE_CONTEXT + 1 ) , + D3D11_MESSAGE_ID_DESTROY_CONTEXT = ( D3D11_MESSAGE_ID_LIVE_CONTEXT + 1 ) , + D3D11_MESSAGE_ID_CREATE_BUFFER = ( D3D11_MESSAGE_ID_DESTROY_CONTEXT + 1 ) , + D3D11_MESSAGE_ID_LIVE_BUFFER_WIN7 = ( D3D11_MESSAGE_ID_CREATE_BUFFER + 1 ) , + D3D11_MESSAGE_ID_DESTROY_BUFFER = ( D3D11_MESSAGE_ID_LIVE_BUFFER_WIN7 + 1 ) , + D3D11_MESSAGE_ID_CREATE_TEXTURE1D = ( D3D11_MESSAGE_ID_DESTROY_BUFFER + 1 ) , + D3D11_MESSAGE_ID_LIVE_TEXTURE1D_WIN7 = ( D3D11_MESSAGE_ID_CREATE_TEXTURE1D + 1 ) , + D3D11_MESSAGE_ID_DESTROY_TEXTURE1D = ( D3D11_MESSAGE_ID_LIVE_TEXTURE1D_WIN7 + 1 ) , + D3D11_MESSAGE_ID_CREATE_TEXTURE2D = ( D3D11_MESSAGE_ID_DESTROY_TEXTURE1D + 1 ) , + D3D11_MESSAGE_ID_LIVE_TEXTURE2D_WIN7 = ( D3D11_MESSAGE_ID_CREATE_TEXTURE2D + 1 ) , + D3D11_MESSAGE_ID_DESTROY_TEXTURE2D = ( D3D11_MESSAGE_ID_LIVE_TEXTURE2D_WIN7 + 1 ) , + D3D11_MESSAGE_ID_CREATE_TEXTURE3D = ( D3D11_MESSAGE_ID_DESTROY_TEXTURE2D + 1 ) , + D3D11_MESSAGE_ID_LIVE_TEXTURE3D_WIN7 = ( D3D11_MESSAGE_ID_CREATE_TEXTURE3D + 1 ) , + D3D11_MESSAGE_ID_DESTROY_TEXTURE3D = ( D3D11_MESSAGE_ID_LIVE_TEXTURE3D_WIN7 + 1 ) , + D3D11_MESSAGE_ID_CREATE_SHADERRESOURCEVIEW = ( D3D11_MESSAGE_ID_DESTROY_TEXTURE3D + 1 ) , + D3D11_MESSAGE_ID_LIVE_SHADERRESOURCEVIEW_WIN7 = ( D3D11_MESSAGE_ID_CREATE_SHADERRESOURCEVIEW + 1 ) , + D3D11_MESSAGE_ID_DESTROY_SHADERRESOURCEVIEW = ( D3D11_MESSAGE_ID_LIVE_SHADERRESOURCEVIEW_WIN7 + 1 ) , + D3D11_MESSAGE_ID_CREATE_RENDERTARGETVIEW = ( D3D11_MESSAGE_ID_DESTROY_SHADERRESOURCEVIEW + 1 ) , + D3D11_MESSAGE_ID_LIVE_RENDERTARGETVIEW_WIN7 = ( D3D11_MESSAGE_ID_CREATE_RENDERTARGETVIEW + 1 ) , + D3D11_MESSAGE_ID_DESTROY_RENDERTARGETVIEW = ( D3D11_MESSAGE_ID_LIVE_RENDERTARGETVIEW_WIN7 + 1 ) , + D3D11_MESSAGE_ID_CREATE_DEPTHSTENCILVIEW = ( D3D11_MESSAGE_ID_DESTROY_RENDERTARGETVIEW + 1 ) , + D3D11_MESSAGE_ID_LIVE_DEPTHSTENCILVIEW_WIN7 = ( D3D11_MESSAGE_ID_CREATE_DEPTHSTENCILVIEW + 1 ) , + D3D11_MESSAGE_ID_DESTROY_DEPTHSTENCILVIEW = ( D3D11_MESSAGE_ID_LIVE_DEPTHSTENCILVIEW_WIN7 + 1 ) , + D3D11_MESSAGE_ID_CREATE_VERTEXSHADER = ( D3D11_MESSAGE_ID_DESTROY_DEPTHSTENCILVIEW + 1 ) , + D3D11_MESSAGE_ID_LIVE_VERTEXSHADER_WIN7 = ( D3D11_MESSAGE_ID_CREATE_VERTEXSHADER + 1 ) , + D3D11_MESSAGE_ID_DESTROY_VERTEXSHADER = ( D3D11_MESSAGE_ID_LIVE_VERTEXSHADER_WIN7 + 1 ) , + D3D11_MESSAGE_ID_CREATE_HULLSHADER = ( D3D11_MESSAGE_ID_DESTROY_VERTEXSHADER + 1 ) , + D3D11_MESSAGE_ID_LIVE_HULLSHADER = ( D3D11_MESSAGE_ID_CREATE_HULLSHADER + 1 ) , + D3D11_MESSAGE_ID_DESTROY_HULLSHADER = ( D3D11_MESSAGE_ID_LIVE_HULLSHADER + 1 ) , + D3D11_MESSAGE_ID_CREATE_DOMAINSHADER = ( D3D11_MESSAGE_ID_DESTROY_HULLSHADER + 1 ) , + D3D11_MESSAGE_ID_LIVE_DOMAINSHADER = ( D3D11_MESSAGE_ID_CREATE_DOMAINSHADER + 1 ) , + D3D11_MESSAGE_ID_DESTROY_DOMAINSHADER = ( D3D11_MESSAGE_ID_LIVE_DOMAINSHADER + 1 ) , + D3D11_MESSAGE_ID_CREATE_GEOMETRYSHADER = ( D3D11_MESSAGE_ID_DESTROY_DOMAINSHADER + 1 ) , + D3D11_MESSAGE_ID_LIVE_GEOMETRYSHADER_WIN7 = ( D3D11_MESSAGE_ID_CREATE_GEOMETRYSHADER + 1 ) , + D3D11_MESSAGE_ID_DESTROY_GEOMETRYSHADER = ( D3D11_MESSAGE_ID_LIVE_GEOMETRYSHADER_WIN7 + 1 ) , + D3D11_MESSAGE_ID_CREATE_PIXELSHADER = ( D3D11_MESSAGE_ID_DESTROY_GEOMETRYSHADER + 1 ) , + D3D11_MESSAGE_ID_LIVE_PIXELSHADER_WIN7 = ( D3D11_MESSAGE_ID_CREATE_PIXELSHADER + 1 ) , + D3D11_MESSAGE_ID_DESTROY_PIXELSHADER = ( D3D11_MESSAGE_ID_LIVE_PIXELSHADER_WIN7 + 1 ) , + D3D11_MESSAGE_ID_CREATE_INPUTLAYOUT = ( D3D11_MESSAGE_ID_DESTROY_PIXELSHADER + 1 ) , + D3D11_MESSAGE_ID_LIVE_INPUTLAYOUT_WIN7 = ( D3D11_MESSAGE_ID_CREATE_INPUTLAYOUT + 1 ) , + D3D11_MESSAGE_ID_DESTROY_INPUTLAYOUT = ( D3D11_MESSAGE_ID_LIVE_INPUTLAYOUT_WIN7 + 1 ) , + D3D11_MESSAGE_ID_CREATE_SAMPLER = ( D3D11_MESSAGE_ID_DESTROY_INPUTLAYOUT + 1 ) , + D3D11_MESSAGE_ID_LIVE_SAMPLER_WIN7 = ( D3D11_MESSAGE_ID_CREATE_SAMPLER + 1 ) , + D3D11_MESSAGE_ID_DESTROY_SAMPLER = ( D3D11_MESSAGE_ID_LIVE_SAMPLER_WIN7 + 1 ) , + D3D11_MESSAGE_ID_CREATE_BLENDSTATE = ( D3D11_MESSAGE_ID_DESTROY_SAMPLER + 1 ) , + D3D11_MESSAGE_ID_LIVE_BLENDSTATE_WIN7 = ( D3D11_MESSAGE_ID_CREATE_BLENDSTATE + 1 ) , + D3D11_MESSAGE_ID_DESTROY_BLENDSTATE = ( D3D11_MESSAGE_ID_LIVE_BLENDSTATE_WIN7 + 1 ) , + D3D11_MESSAGE_ID_CREATE_DEPTHSTENCILSTATE = ( D3D11_MESSAGE_ID_DESTROY_BLENDSTATE + 1 ) , + D3D11_MESSAGE_ID_LIVE_DEPTHSTENCILSTATE_WIN7 = ( D3D11_MESSAGE_ID_CREATE_DEPTHSTENCILSTATE + 1 ) , + D3D11_MESSAGE_ID_DESTROY_DEPTHSTENCILSTATE = ( D3D11_MESSAGE_ID_LIVE_DEPTHSTENCILSTATE_WIN7 + 1 ) , + D3D11_MESSAGE_ID_CREATE_RASTERIZERSTATE = ( D3D11_MESSAGE_ID_DESTROY_DEPTHSTENCILSTATE + 1 ) , + D3D11_MESSAGE_ID_LIVE_RASTERIZERSTATE_WIN7 = ( D3D11_MESSAGE_ID_CREATE_RASTERIZERSTATE + 1 ) , + D3D11_MESSAGE_ID_DESTROY_RASTERIZERSTATE = ( D3D11_MESSAGE_ID_LIVE_RASTERIZERSTATE_WIN7 + 1 ) , + D3D11_MESSAGE_ID_CREATE_QUERY = ( D3D11_MESSAGE_ID_DESTROY_RASTERIZERSTATE + 1 ) , + D3D11_MESSAGE_ID_LIVE_QUERY_WIN7 = ( D3D11_MESSAGE_ID_CREATE_QUERY + 1 ) , + D3D11_MESSAGE_ID_DESTROY_QUERY = ( D3D11_MESSAGE_ID_LIVE_QUERY_WIN7 + 1 ) , + D3D11_MESSAGE_ID_CREATE_PREDICATE = ( D3D11_MESSAGE_ID_DESTROY_QUERY + 1 ) , + D3D11_MESSAGE_ID_LIVE_PREDICATE_WIN7 = ( D3D11_MESSAGE_ID_CREATE_PREDICATE + 1 ) , + D3D11_MESSAGE_ID_DESTROY_PREDICATE = ( D3D11_MESSAGE_ID_LIVE_PREDICATE_WIN7 + 1 ) , + D3D11_MESSAGE_ID_CREATE_COUNTER = ( D3D11_MESSAGE_ID_DESTROY_PREDICATE + 1 ) , + D3D11_MESSAGE_ID_DESTROY_COUNTER = ( D3D11_MESSAGE_ID_CREATE_COUNTER + 1 ) , + D3D11_MESSAGE_ID_CREATE_COMMANDLIST = ( D3D11_MESSAGE_ID_DESTROY_COUNTER + 1 ) , + D3D11_MESSAGE_ID_LIVE_COMMANDLIST = ( D3D11_MESSAGE_ID_CREATE_COMMANDLIST + 1 ) , + D3D11_MESSAGE_ID_DESTROY_COMMANDLIST = ( D3D11_MESSAGE_ID_LIVE_COMMANDLIST + 1 ) , + D3D11_MESSAGE_ID_CREATE_CLASSINSTANCE = ( D3D11_MESSAGE_ID_DESTROY_COMMANDLIST + 1 ) , + D3D11_MESSAGE_ID_LIVE_CLASSINSTANCE = ( D3D11_MESSAGE_ID_CREATE_CLASSINSTANCE + 1 ) , + D3D11_MESSAGE_ID_DESTROY_CLASSINSTANCE = ( D3D11_MESSAGE_ID_LIVE_CLASSINSTANCE + 1 ) , + D3D11_MESSAGE_ID_CREATE_CLASSLINKAGE = ( D3D11_MESSAGE_ID_DESTROY_CLASSINSTANCE + 1 ) , + D3D11_MESSAGE_ID_LIVE_CLASSLINKAGE = ( D3D11_MESSAGE_ID_CREATE_CLASSLINKAGE + 1 ) , + D3D11_MESSAGE_ID_DESTROY_CLASSLINKAGE = ( D3D11_MESSAGE_ID_LIVE_CLASSLINKAGE + 1 ) , + D3D11_MESSAGE_ID_LIVE_DEVICE_WIN7 = ( D3D11_MESSAGE_ID_DESTROY_CLASSLINKAGE + 1 ) , + D3D11_MESSAGE_ID_LIVE_OBJECT_SUMMARY_WIN7 = ( D3D11_MESSAGE_ID_LIVE_DEVICE_WIN7 + 1 ) , + D3D11_MESSAGE_ID_CREATE_COMPUTESHADER = ( D3D11_MESSAGE_ID_LIVE_OBJECT_SUMMARY_WIN7 + 1 ) , + D3D11_MESSAGE_ID_LIVE_COMPUTESHADER = ( D3D11_MESSAGE_ID_CREATE_COMPUTESHADER + 1 ) , + D3D11_MESSAGE_ID_DESTROY_COMPUTESHADER = ( D3D11_MESSAGE_ID_LIVE_COMPUTESHADER + 1 ) , + D3D11_MESSAGE_ID_CREATE_UNORDEREDACCESSVIEW = ( D3D11_MESSAGE_ID_DESTROY_COMPUTESHADER + 1 ) , + D3D11_MESSAGE_ID_LIVE_UNORDEREDACCESSVIEW = ( D3D11_MESSAGE_ID_CREATE_UNORDEREDACCESSVIEW + 1 ) , + D3D11_MESSAGE_ID_DESTROY_UNORDEREDACCESSVIEW = ( D3D11_MESSAGE_ID_LIVE_UNORDEREDACCESSVIEW + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SETSHADER_INTERFACES_FEATURELEVEL = ( D3D11_MESSAGE_ID_DESTROY_UNORDEREDACCESSVIEW + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SETSHADER_INTERFACE_COUNT_MISMATCH = ( D3D11_MESSAGE_ID_DEVICE_SETSHADER_INTERFACES_FEATURELEVEL + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SETSHADER_INVALID_INSTANCE = ( D3D11_MESSAGE_ID_DEVICE_SETSHADER_INTERFACE_COUNT_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SETSHADER_INVALID_INSTANCE_INDEX = ( D3D11_MESSAGE_ID_DEVICE_SETSHADER_INVALID_INSTANCE + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SETSHADER_INVALID_INSTANCE_TYPE = ( D3D11_MESSAGE_ID_DEVICE_SETSHADER_INVALID_INSTANCE_INDEX + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SETSHADER_INVALID_INSTANCE_DATA = ( D3D11_MESSAGE_ID_DEVICE_SETSHADER_INVALID_INSTANCE_TYPE + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SETSHADER_UNBOUND_INSTANCE_DATA = ( D3D11_MESSAGE_ID_DEVICE_SETSHADER_INVALID_INSTANCE_DATA + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SETSHADER_INSTANCE_DATA_BINDINGS = ( D3D11_MESSAGE_ID_DEVICE_SETSHADER_UNBOUND_INSTANCE_DATA + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATESHADER_CLASSLINKAGE_FULL = ( D3D11_MESSAGE_ID_DEVICE_SETSHADER_INSTANCE_DATA_BINDINGS + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CHECKFEATURESUPPORT_UNRECOGNIZED_FEATURE = ( D3D11_MESSAGE_ID_DEVICE_CREATESHADER_CLASSLINKAGE_FULL + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CHECKFEATURESUPPORT_MISMATCHED_DATA_SIZE = ( D3D11_MESSAGE_ID_DEVICE_CHECKFEATURESUPPORT_UNRECOGNIZED_FEATURE + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CHECKFEATURESUPPORT_INVALIDARG_RETURN = ( D3D11_MESSAGE_ID_DEVICE_CHECKFEATURESUPPORT_MISMATCHED_DATA_SIZE + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CSSETSHADERRESOURCES_HAZARD = ( D3D11_MESSAGE_ID_DEVICE_CHECKFEATURESUPPORT_INVALIDARG_RETURN + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CSSETCONSTANTBUFFERS_HAZARD = ( D3D11_MESSAGE_ID_DEVICE_CSSETSHADERRESOURCES_HAZARD + 1 ) , + D3D11_MESSAGE_ID_CSSETSHADERRESOURCES_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_DEVICE_CSSETCONSTANTBUFFERS_HAZARD + 1 ) , + D3D11_MESSAGE_ID_CSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_CSSETSHADERRESOURCES_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_CREATECOMPUTESHADER_INVALIDCALL = ( D3D11_MESSAGE_ID_CSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_CREATECOMPUTESHADER_OUTOFMEMORY = ( D3D11_MESSAGE_ID_CREATECOMPUTESHADER_INVALIDCALL + 1 ) , + D3D11_MESSAGE_ID_CREATECOMPUTESHADER_INVALIDSHADERBYTECODE = ( D3D11_MESSAGE_ID_CREATECOMPUTESHADER_OUTOFMEMORY + 1 ) , + D3D11_MESSAGE_ID_CREATECOMPUTESHADER_INVALIDSHADERTYPE = ( D3D11_MESSAGE_ID_CREATECOMPUTESHADER_INVALIDSHADERBYTECODE + 1 ) , + D3D11_MESSAGE_ID_CREATECOMPUTESHADER_INVALIDCLASSLINKAGE = ( D3D11_MESSAGE_ID_CREATECOMPUTESHADER_INVALIDSHADERTYPE + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CSSETSHADERRESOURCES_VIEWS_EMPTY = ( D3D11_MESSAGE_ID_CREATECOMPUTESHADER_INVALIDCLASSLINKAGE + 1 ) , + D3D11_MESSAGE_ID_CSSETCONSTANTBUFFERS_INVALIDBUFFER = ( D3D11_MESSAGE_ID_DEVICE_CSSETSHADERRESOURCES_VIEWS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CSSETCONSTANTBUFFERS_BUFFERS_EMPTY = ( D3D11_MESSAGE_ID_CSSETCONSTANTBUFFERS_INVALIDBUFFER + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CSSETSAMPLERS_SAMPLERS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_CSSETCONSTANTBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CSGETSHADERRESOURCES_VIEWS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_CSSETSAMPLERS_SAMPLERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CSGETCONSTANTBUFFERS_BUFFERS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_CSGETSHADERRESOURCES_VIEWS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CSGETSAMPLERS_SAMPLERS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_CSGETCONSTANTBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_DOUBLEFLOATOPSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CSGETSAMPLERS_SAMPLERS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEHULLSHADER_DOUBLEFLOATOPSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_DOUBLEFLOATOPSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_DOUBLEFLOATOPSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEHULLSHADER_DOUBLEFLOATOPSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_DOUBLEFLOATOPSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_DOUBLEFLOATOPSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DOUBLEFLOATOPSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_DOUBLEFLOATOPSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_DOUBLEFLOATOPSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DOUBLEFLOATOPSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_DOUBLEFLOATOPSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_DOUBLEFLOATOPSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDSTRUCTURESTRIDE = ( D3D11_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_DOUBLEFLOATOPSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDFLAGS = ( D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDSTRUCTURESTRIDE + 1 ) , + D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDRESOURCE = ( D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDDESC = ( D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDRESOURCE + 1 ) , + D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDFORMAT = ( D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDDESC + 1 ) , + D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDDIMENSIONS = ( D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_UNRECOGNIZEDFORMAT = ( D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDDIMENSIONS + 1 ) , + D3D11_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_HAZARD = ( D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_UNRECOGNIZEDFORMAT + 1 ) , + D3D11_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_OVERLAPPING_OLD_SLOTS = ( D3D11_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_HAZARD + 1 ) , + D3D11_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_NO_OP = ( D3D11_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_OVERLAPPING_OLD_SLOTS + 1 ) , + D3D11_MESSAGE_ID_CSSETUNORDEREDACCESSVIEWS_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_NO_OP + 1 ) , + D3D11_MESSAGE_ID_PSSETUNORDEREDACCESSVIEWS_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_CSSETUNORDEREDACCESSVIEWS_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDARG_RETURN = ( D3D11_MESSAGE_ID_PSSETUNORDEREDACCESSVIEWS_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDARG_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_TOOMANYOBJECTS = ( D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CSSETUNORDEREDACCESSVIEWS_HAZARD = ( D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_TOOMANYOBJECTS + 1 ) , + D3D11_MESSAGE_ID_CLEARUNORDEREDACCESSVIEW_DENORMFLUSH = ( D3D11_MESSAGE_ID_DEVICE_CSSETUNORDEREDACCESSVIEWS_HAZARD + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CSSETUNORDEREDACCESSS_VIEWS_EMPTY = ( D3D11_MESSAGE_ID_CLEARUNORDEREDACCESSVIEW_DENORMFLUSH + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CSGETUNORDEREDACCESSS_VIEWS_EMPTY = ( D3D11_MESSAGE_ID_DEVICE_CSSETUNORDEREDACCESSS_VIEWS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDFLAGS = ( D3D11_MESSAGE_ID_DEVICE_CSGETUNORDEREDACCESSS_VIEWS_EMPTY + 1 ) , + D3D11_MESSAGE_ID_CREATESHADERRESESOURCEVIEW_TOOMANYOBJECTS = ( D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDFLAGS + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_INVALID_ARG_BUFFER = ( D3D11_MESSAGE_ID_CREATESHADERRESESOURCEVIEW_TOOMANYOBJECTS + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_OFFSET_UNALIGNED = ( D3D11_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_INVALID_ARG_BUFFER + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_OFFSET_OVERFLOW = ( D3D11_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_OFFSET_UNALIGNED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SETRESOURCEMINLOD_INVALIDCONTEXT = ( D3D11_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_OFFSET_OVERFLOW + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SETRESOURCEMINLOD_INVALIDRESOURCE = ( D3D11_MESSAGE_ID_DEVICE_SETRESOURCEMINLOD_INVALIDCONTEXT + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SETRESOURCEMINLOD_INVALIDMINLOD = ( D3D11_MESSAGE_ID_DEVICE_SETRESOURCEMINLOD_INVALIDRESOURCE + 1 ) , + D3D11_MESSAGE_ID_DEVICE_GETRESOURCEMINLOD_INVALIDCONTEXT = ( D3D11_MESSAGE_ID_DEVICE_SETRESOURCEMINLOD_INVALIDMINLOD + 1 ) , + D3D11_MESSAGE_ID_DEVICE_GETRESOURCEMINLOD_INVALIDRESOURCE = ( D3D11_MESSAGE_ID_DEVICE_GETRESOURCEMINLOD_INVALIDCONTEXT + 1 ) , + D3D11_MESSAGE_ID_OMSETDEPTHSTENCIL_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_DEVICE_GETRESOURCEMINLOD_INVALIDRESOURCE + 1 ) , + D3D11_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_DEPTH_READONLY = ( D3D11_MESSAGE_ID_OMSETDEPTHSTENCIL_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_STENCIL_READONLY = ( D3D11_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_DEPTH_READONLY + 1 ) , + D3D11_MESSAGE_ID_CHECKFEATURESUPPORT_FORMAT_DEPRECATED = ( D3D11_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_STENCIL_READONLY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_RETURN_TYPE_MISMATCH = ( D3D11_MESSAGE_ID_CHECKFEATURESUPPORT_FORMAT_DEPRECATED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_NOT_SET = ( D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_RETURN_TYPE_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_UNORDEREDACCESSVIEW_RENDERTARGETVIEW_OVERLAP = ( D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_NOT_SET + 1 ) , + D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_DIMENSION_MISMATCH = ( D3D11_MESSAGE_ID_DEVICE_DRAW_UNORDEREDACCESSVIEW_RENDERTARGETVIEW_OVERLAP + 1 ) , + D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_APPEND_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_DIMENSION_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMICS_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_APPEND_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_STRUCTURE_STRIDE_MISMATCH = ( D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMICS_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_BUFFER_TYPE_MISMATCH = ( D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_STRUCTURE_STRIDE_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_RAW_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_BUFFER_TYPE_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_FORMAT_LD_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_RAW_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_FORMAT_STORE_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_FORMAT_LD_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_ADD_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_FORMAT_STORE_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_BITWISE_OPS_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_ADD_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_CMPSTORE_CMPEXCHANGE_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_BITWISE_OPS_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_EXCHANGE_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_CMPSTORE_CMPEXCHANGE_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_SIGNED_MINMAX_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_EXCHANGE_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_UNSIGNED_MINMAX_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_SIGNED_MINMAX_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DISPATCH_BOUND_RESOURCE_MAPPED = ( D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_UNSIGNED_MINMAX_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DISPATCH_THREADGROUPCOUNT_OVERFLOW = ( D3D11_MESSAGE_ID_DEVICE_DISPATCH_BOUND_RESOURCE_MAPPED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DISPATCH_THREADGROUPCOUNT_ZERO = ( D3D11_MESSAGE_ID_DEVICE_DISPATCH_THREADGROUPCOUNT_OVERFLOW + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SHADERRESOURCEVIEW_STRUCTURE_STRIDE_MISMATCH = ( D3D11_MESSAGE_ID_DEVICE_DISPATCH_THREADGROUPCOUNT_ZERO + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SHADERRESOURCEVIEW_BUFFER_TYPE_MISMATCH = ( D3D11_MESSAGE_ID_DEVICE_SHADERRESOURCEVIEW_STRUCTURE_STRIDE_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SHADERRESOURCEVIEW_RAW_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_SHADERRESOURCEVIEW_BUFFER_TYPE_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DISPATCH_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_SHADERRESOURCEVIEW_RAW_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_DISPATCH_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_COPYSTRUCTURECOUNT_INVALIDOFFSET = ( D3D11_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_COPYSTRUCTURECOUNT_LARGEOFFSET = ( D3D11_MESSAGE_ID_COPYSTRUCTURECOUNT_INVALIDOFFSET + 1 ) , + D3D11_MESSAGE_ID_COPYSTRUCTURECOUNT_INVALIDDESTINATIONSTATE = ( D3D11_MESSAGE_ID_COPYSTRUCTURECOUNT_LARGEOFFSET + 1 ) , + D3D11_MESSAGE_ID_COPYSTRUCTURECOUNT_INVALIDSOURCESTATE = ( D3D11_MESSAGE_ID_COPYSTRUCTURECOUNT_INVALIDDESTINATIONSTATE + 1 ) , + D3D11_MESSAGE_ID_CHECKFORMATSUPPORT_FORMAT_NOT_SUPPORTED = ( D3D11_MESSAGE_ID_COPYSTRUCTURECOUNT_INVALIDSOURCESTATE + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CSSETUNORDEREDACCESSVIEWS_INVALIDVIEW = ( D3D11_MESSAGE_ID_CHECKFORMATSUPPORT_FORMAT_NOT_SUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CSSETUNORDEREDACCESSVIEWS_INVALIDOFFSET = ( D3D11_MESSAGE_ID_DEVICE_CSSETUNORDEREDACCESSVIEWS_INVALIDVIEW + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CSSETUNORDEREDACCESSVIEWS_TOOMANYVIEWS = ( D3D11_MESSAGE_ID_DEVICE_CSSETUNORDEREDACCESSVIEWS_INVALIDOFFSET + 1 ) , + D3D11_MESSAGE_ID_CLEARUNORDEREDACCESSVIEWFLOAT_INVALIDFORMAT = ( D3D11_MESSAGE_ID_DEVICE_CSSETUNORDEREDACCESSVIEWS_TOOMANYVIEWS + 1 ) , + D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_COUNTER_UNSUPPORTED = ( D3D11_MESSAGE_ID_CLEARUNORDEREDACCESSVIEWFLOAT_INVALIDFORMAT + 1 ) , + D3D11_MESSAGE_ID_REF_WARNING = ( D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_COUNTER_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_PIXEL_SHADER_WITHOUT_RTV_OR_DSV = ( D3D11_MESSAGE_ID_REF_WARNING + 1 ) , + D3D11_MESSAGE_ID_SHADER_ABORT = ( D3D11_MESSAGE_ID_DEVICE_DRAW_PIXEL_SHADER_WITHOUT_RTV_OR_DSV + 1 ) , + D3D11_MESSAGE_ID_SHADER_MESSAGE = ( D3D11_MESSAGE_ID_SHADER_ABORT + 1 ) , + D3D11_MESSAGE_ID_SHADER_ERROR = ( D3D11_MESSAGE_ID_SHADER_MESSAGE + 1 ) , + D3D11_MESSAGE_ID_OFFERRESOURCES_INVALIDRESOURCE = ( D3D11_MESSAGE_ID_SHADER_ERROR + 1 ) , + D3D11_MESSAGE_ID_HSSETSAMPLERS_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_OFFERRESOURCES_INVALIDRESOURCE + 1 ) , + D3D11_MESSAGE_ID_DSSETSAMPLERS_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_HSSETSAMPLERS_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_CSSETSAMPLERS_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_DSSETSAMPLERS_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_HSSETSHADER_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_CSSETSAMPLERS_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_DSSETSHADER_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_HSSETSHADER_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_CSSETSHADER_UNBINDDELETINGOBJECT = ( D3D11_MESSAGE_ID_DSSETSHADER_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_ENQUEUESETEVENT_INVALIDARG_RETURN = ( D3D11_MESSAGE_ID_CSSETSHADER_UNBINDDELETINGOBJECT + 1 ) , + D3D11_MESSAGE_ID_ENQUEUESETEVENT_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_ENQUEUESETEVENT_INVALIDARG_RETURN + 1 ) , + D3D11_MESSAGE_ID_ENQUEUESETEVENT_ACCESSDENIED_RETURN = ( D3D11_MESSAGE_ID_ENQUEUESETEVENT_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_NUMUAVS_INVALIDRANGE = ( D3D11_MESSAGE_ID_ENQUEUESETEVENT_ACCESSDENIED_RETURN + 1 ) , + D3D11_MESSAGE_ID_USE_OF_ZERO_REFCOUNT_OBJECT = ( D3D11_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_NUMUAVS_INVALIDRANGE + 1 ) , + D3D11_MESSAGE_ID_D3D11_MESSAGES_END = ( D3D11_MESSAGE_ID_USE_OF_ZERO_REFCOUNT_OBJECT + 1 ) , + D3D11_MESSAGE_ID_D3D11_1_MESSAGES_START = 0x300000, + D3D11_MESSAGE_ID_CREATE_VIDEODECODER = ( D3D11_MESSAGE_ID_D3D11_1_MESSAGES_START + 1 ) , + D3D11_MESSAGE_ID_CREATE_VIDEOPROCESSORENUM = ( D3D11_MESSAGE_ID_CREATE_VIDEODECODER + 1 ) , + D3D11_MESSAGE_ID_CREATE_VIDEOPROCESSOR = ( D3D11_MESSAGE_ID_CREATE_VIDEOPROCESSORENUM + 1 ) , + D3D11_MESSAGE_ID_CREATE_DECODEROUTPUTVIEW = ( D3D11_MESSAGE_ID_CREATE_VIDEOPROCESSOR + 1 ) , + D3D11_MESSAGE_ID_CREATE_PROCESSORINPUTVIEW = ( D3D11_MESSAGE_ID_CREATE_DECODEROUTPUTVIEW + 1 ) , + D3D11_MESSAGE_ID_CREATE_PROCESSOROUTPUTVIEW = ( D3D11_MESSAGE_ID_CREATE_PROCESSORINPUTVIEW + 1 ) , + D3D11_MESSAGE_ID_CREATE_DEVICECONTEXTSTATE = ( D3D11_MESSAGE_ID_CREATE_PROCESSOROUTPUTVIEW + 1 ) , + D3D11_MESSAGE_ID_LIVE_VIDEODECODER = ( D3D11_MESSAGE_ID_CREATE_DEVICECONTEXTSTATE + 1 ) , + D3D11_MESSAGE_ID_LIVE_VIDEOPROCESSORENUM = ( D3D11_MESSAGE_ID_LIVE_VIDEODECODER + 1 ) , + D3D11_MESSAGE_ID_LIVE_VIDEOPROCESSOR = ( D3D11_MESSAGE_ID_LIVE_VIDEOPROCESSORENUM + 1 ) , + D3D11_MESSAGE_ID_LIVE_DECODEROUTPUTVIEW = ( D3D11_MESSAGE_ID_LIVE_VIDEOPROCESSOR + 1 ) , + D3D11_MESSAGE_ID_LIVE_PROCESSORINPUTVIEW = ( D3D11_MESSAGE_ID_LIVE_DECODEROUTPUTVIEW + 1 ) , + D3D11_MESSAGE_ID_LIVE_PROCESSOROUTPUTVIEW = ( D3D11_MESSAGE_ID_LIVE_PROCESSORINPUTVIEW + 1 ) , + D3D11_MESSAGE_ID_LIVE_DEVICECONTEXTSTATE = ( D3D11_MESSAGE_ID_LIVE_PROCESSOROUTPUTVIEW + 1 ) , + D3D11_MESSAGE_ID_DESTROY_VIDEODECODER = ( D3D11_MESSAGE_ID_LIVE_DEVICECONTEXTSTATE + 1 ) , + D3D11_MESSAGE_ID_DESTROY_VIDEOPROCESSORENUM = ( D3D11_MESSAGE_ID_DESTROY_VIDEODECODER + 1 ) , + D3D11_MESSAGE_ID_DESTROY_VIDEOPROCESSOR = ( D3D11_MESSAGE_ID_DESTROY_VIDEOPROCESSORENUM + 1 ) , + D3D11_MESSAGE_ID_DESTROY_DECODEROUTPUTVIEW = ( D3D11_MESSAGE_ID_DESTROY_VIDEOPROCESSOR + 1 ) , + D3D11_MESSAGE_ID_DESTROY_PROCESSORINPUTVIEW = ( D3D11_MESSAGE_ID_DESTROY_DECODEROUTPUTVIEW + 1 ) , + D3D11_MESSAGE_ID_DESTROY_PROCESSOROUTPUTVIEW = ( D3D11_MESSAGE_ID_DESTROY_PROCESSORINPUTVIEW + 1 ) , + D3D11_MESSAGE_ID_DESTROY_DEVICECONTEXTSTATE = ( D3D11_MESSAGE_ID_DESTROY_PROCESSOROUTPUTVIEW + 1 ) , + D3D11_MESSAGE_ID_CREATEDEVICECONTEXTSTATE_INVALIDFLAGS = ( D3D11_MESSAGE_ID_DESTROY_DEVICECONTEXTSTATE + 1 ) , + D3D11_MESSAGE_ID_CREATEDEVICECONTEXTSTATE_INVALIDFEATURELEVEL = ( D3D11_MESSAGE_ID_CREATEDEVICECONTEXTSTATE_INVALIDFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATEDEVICECONTEXTSTATE_FEATURELEVELS_NOT_SUPPORTED = ( D3D11_MESSAGE_ID_CREATEDEVICECONTEXTSTATE_INVALIDFEATURELEVEL + 1 ) , + D3D11_MESSAGE_ID_CREATEDEVICECONTEXTSTATE_INVALIDREFIID = ( D3D11_MESSAGE_ID_CREATEDEVICECONTEXTSTATE_FEATURELEVELS_NOT_SUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DISCARDVIEW_INVALIDVIEW = ( D3D11_MESSAGE_ID_CREATEDEVICECONTEXTSTATE_INVALIDREFIID + 1 ) , + D3D11_MESSAGE_ID_COPYSUBRESOURCEREGION1_INVALIDCOPYFLAGS = ( D3D11_MESSAGE_ID_DEVICE_DISCARDVIEW_INVALIDVIEW + 1 ) , + D3D11_MESSAGE_ID_UPDATESUBRESOURCE1_INVALIDCOPYFLAGS = ( D3D11_MESSAGE_ID_COPYSUBRESOURCEREGION1_INVALIDCOPYFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDFORCEDSAMPLECOUNT = ( D3D11_MESSAGE_ID_UPDATESUBRESOURCE1_INVALIDCOPYFLAGS + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEODECODER_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDFORCEDSAMPLECOUNT + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEODECODER_NULLPARAM = ( D3D11_MESSAGE_ID_CREATEVIDEODECODER_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEODECODER_INVALIDFORMAT = ( D3D11_MESSAGE_ID_CREATEVIDEODECODER_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEODECODER_ZEROWIDTHHEIGHT = ( D3D11_MESSAGE_ID_CREATEVIDEODECODER_INVALIDFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEODECODER_DRIVER_INVALIDBUFFERSIZE = ( D3D11_MESSAGE_ID_CREATEVIDEODECODER_ZEROWIDTHHEIGHT + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEODECODER_DRIVER_INVALIDBUFFERUSAGE = ( D3D11_MESSAGE_ID_CREATEVIDEODECODER_DRIVER_INVALIDBUFFERSIZE + 1 ) , + D3D11_MESSAGE_ID_GETVIDEODECODERPROFILECOUNT_OUTOFMEMORY = ( D3D11_MESSAGE_ID_CREATEVIDEODECODER_DRIVER_INVALIDBUFFERUSAGE + 1 ) , + D3D11_MESSAGE_ID_GETVIDEODECODERPROFILE_NULLPARAM = ( D3D11_MESSAGE_ID_GETVIDEODECODERPROFILECOUNT_OUTOFMEMORY + 1 ) , + D3D11_MESSAGE_ID_GETVIDEODECODERPROFILE_INVALIDINDEX = ( D3D11_MESSAGE_ID_GETVIDEODECODERPROFILE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETVIDEODECODERPROFILE_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_GETVIDEODECODERPROFILE_INVALIDINDEX + 1 ) , + D3D11_MESSAGE_ID_CHECKVIDEODECODERFORMAT_NULLPARAM = ( D3D11_MESSAGE_ID_GETVIDEODECODERPROFILE_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_CHECKVIDEODECODERFORMAT_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_CHECKVIDEODECODERFORMAT_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETVIDEODECODERCONFIGCOUNT_NULLPARAM = ( D3D11_MESSAGE_ID_CHECKVIDEODECODERFORMAT_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_GETVIDEODECODERCONFIGCOUNT_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_GETVIDEODECODERCONFIGCOUNT_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETVIDEODECODERCONFIG_NULLPARAM = ( D3D11_MESSAGE_ID_GETVIDEODECODERCONFIGCOUNT_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_GETVIDEODECODERCONFIG_INVALIDINDEX = ( D3D11_MESSAGE_ID_GETVIDEODECODERCONFIG_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETVIDEODECODERCONFIG_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_GETVIDEODECODERCONFIG_INVALIDINDEX + 1 ) , + D3D11_MESSAGE_ID_GETDECODERCREATIONPARAMS_NULLPARAM = ( D3D11_MESSAGE_ID_GETVIDEODECODERCONFIG_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_GETDECODERDRIVERHANDLE_NULLPARAM = ( D3D11_MESSAGE_ID_GETDECODERCREATIONPARAMS_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETDECODERBUFFER_NULLPARAM = ( D3D11_MESSAGE_ID_GETDECODERDRIVERHANDLE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETDECODERBUFFER_INVALIDBUFFER = ( D3D11_MESSAGE_ID_GETDECODERBUFFER_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETDECODERBUFFER_INVALIDTYPE = ( D3D11_MESSAGE_ID_GETDECODERBUFFER_INVALIDBUFFER + 1 ) , + D3D11_MESSAGE_ID_GETDECODERBUFFER_LOCKED = ( D3D11_MESSAGE_ID_GETDECODERBUFFER_INVALIDTYPE + 1 ) , + D3D11_MESSAGE_ID_RELEASEDECODERBUFFER_NULLPARAM = ( D3D11_MESSAGE_ID_GETDECODERBUFFER_LOCKED + 1 ) , + D3D11_MESSAGE_ID_RELEASEDECODERBUFFER_INVALIDTYPE = ( D3D11_MESSAGE_ID_RELEASEDECODERBUFFER_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_RELEASEDECODERBUFFER_NOTLOCKED = ( D3D11_MESSAGE_ID_RELEASEDECODERBUFFER_INVALIDTYPE + 1 ) , + D3D11_MESSAGE_ID_DECODERBEGINFRAME_NULLPARAM = ( D3D11_MESSAGE_ID_RELEASEDECODERBUFFER_NOTLOCKED + 1 ) , + D3D11_MESSAGE_ID_DECODERBEGINFRAME_HAZARD = ( D3D11_MESSAGE_ID_DECODERBEGINFRAME_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_DECODERENDFRAME_NULLPARAM = ( D3D11_MESSAGE_ID_DECODERBEGINFRAME_HAZARD + 1 ) , + D3D11_MESSAGE_ID_SUBMITDECODERBUFFERS_NULLPARAM = ( D3D11_MESSAGE_ID_DECODERENDFRAME_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_SUBMITDECODERBUFFERS_INVALIDTYPE = ( D3D11_MESSAGE_ID_SUBMITDECODERBUFFERS_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_DECODEREXTENSION_NULLPARAM = ( D3D11_MESSAGE_ID_SUBMITDECODERBUFFERS_INVALIDTYPE + 1 ) , + D3D11_MESSAGE_ID_DECODEREXTENSION_INVALIDRESOURCE = ( D3D11_MESSAGE_ID_DECODEREXTENSION_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORENUMERATOR_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_DECODEREXTENSION_INVALIDRESOURCE + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORENUMERATOR_NULLPARAM = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORENUMERATOR_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORENUMERATOR_INVALIDFRAMEFORMAT = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORENUMERATOR_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORENUMERATOR_INVALIDUSAGE = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORENUMERATOR_INVALIDFRAMEFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORENUMERATOR_INVALIDINPUTFRAMERATE = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORENUMERATOR_INVALIDUSAGE + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORENUMERATOR_INVALIDOUTPUTFRAMERATE = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORENUMERATOR_INVALIDINPUTFRAMERATE + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORENUMERATOR_INVALIDWIDTHHEIGHT = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORENUMERATOR_INVALIDOUTPUTFRAMERATE + 1 ) , + D3D11_MESSAGE_ID_GETVIDEOPROCESSORCONTENTDESC_NULLPARAM = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORENUMERATOR_INVALIDWIDTHHEIGHT + 1 ) , + D3D11_MESSAGE_ID_CHECKVIDEOPROCESSORFORMAT_NULLPARAM = ( D3D11_MESSAGE_ID_GETVIDEOPROCESSORCONTENTDESC_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETVIDEOPROCESSORCAPS_NULLPARAM = ( D3D11_MESSAGE_ID_CHECKVIDEOPROCESSORFORMAT_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETVIDEOPROCESSORRATECONVERSIONCAPS_NULLPARAM = ( D3D11_MESSAGE_ID_GETVIDEOPROCESSORCAPS_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETVIDEOPROCESSORRATECONVERSIONCAPS_INVALIDINDEX = ( D3D11_MESSAGE_ID_GETVIDEOPROCESSORRATECONVERSIONCAPS_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETVIDEOPROCESSORCUSTOMRATE_NULLPARAM = ( D3D11_MESSAGE_ID_GETVIDEOPROCESSORRATECONVERSIONCAPS_INVALIDINDEX + 1 ) , + D3D11_MESSAGE_ID_GETVIDEOPROCESSORCUSTOMRATE_INVALIDINDEX = ( D3D11_MESSAGE_ID_GETVIDEOPROCESSORCUSTOMRATE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETVIDEOPROCESSORFILTERRANGE_NULLPARAM = ( D3D11_MESSAGE_ID_GETVIDEOPROCESSORCUSTOMRATE_INVALIDINDEX + 1 ) , + D3D11_MESSAGE_ID_GETVIDEOPROCESSORFILTERRANGE_UNSUPPORTED = ( D3D11_MESSAGE_ID_GETVIDEOPROCESSORFILTERRANGE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOR_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_GETVIDEOPROCESSORFILTERRANGE_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOR_NULLPARAM = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOR_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTTARGETRECT_NULLPARAM = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOR_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTBACKGROUNDCOLOR_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTTARGETRECT_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTBACKGROUNDCOLOR_INVALIDALPHA = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTBACKGROUNDCOLOR_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTCOLORSPACE_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTBACKGROUNDCOLOR_INVALIDALPHA + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTALPHAFILLMODE_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTCOLORSPACE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTALPHAFILLMODE_UNSUPPORTED = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTALPHAFILLMODE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTALPHAFILLMODE_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTALPHAFILLMODE_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTALPHAFILLMODE_INVALIDFILLMODE = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTALPHAFILLMODE_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTCONSTRICTION_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTALPHAFILLMODE_INVALIDFILLMODE + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTSTEREOMODE_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTCONSTRICTION_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTSTEREOMODE_UNSUPPORTED = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTSTEREOMODE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTEXTENSION_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTSTEREOMODE_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTTARGETRECT_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTEXTENSION_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTBACKGROUNDCOLOR_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTTARGETRECT_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTCOLORSPACE_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTBACKGROUNDCOLOR_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTALPHAFILLMODE_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTCOLORSPACE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTCONSTRICTION_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTALPHAFILLMODE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTCONSTRICTION_UNSUPPORTED = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTCONSTRICTION_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTCONSTRICTION_INVALIDSIZE = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTCONSTRICTION_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTSTEREOMODE_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTCONSTRICTION_INVALIDSIZE + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTEXTENSION_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTSTEREOMODE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMFRAMEFORMAT_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTEXTENSION_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMFRAMEFORMAT_INVALIDFORMAT = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMFRAMEFORMAT_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMFRAMEFORMAT_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMFRAMEFORMAT_INVALIDFORMAT + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMCOLORSPACE_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMFRAMEFORMAT_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMCOLORSPACE_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMCOLORSPACE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMOUTPUTRATE_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMCOLORSPACE_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMOUTPUTRATE_INVALIDRATE = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMOUTPUTRATE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMOUTPUTRATE_INVALIDFLAG = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMOUTPUTRATE_INVALIDRATE + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMOUTPUTRATE_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMOUTPUTRATE_INVALIDFLAG + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMSOURCERECT_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMOUTPUTRATE_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMSOURCERECT_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMSOURCERECT_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMSOURCERECT_INVALIDRECT = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMSOURCERECT_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMDESTRECT_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMSOURCERECT_INVALIDRECT + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMDESTRECT_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMDESTRECT_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMDESTRECT_INVALIDRECT = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMDESTRECT_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMALPHA_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMDESTRECT_INVALIDRECT + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMALPHA_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMALPHA_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMALPHA_INVALIDALPHA = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMALPHA_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMPALETTE_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMALPHA_INVALIDALPHA + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMPALETTE_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMPALETTE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMPALETTE_INVALIDCOUNT = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMPALETTE_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMPALETTE_INVALIDALPHA = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMPALETTE_INVALIDCOUNT + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMPIXELASPECTRATIO_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMPALETTE_INVALIDALPHA + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMPIXELASPECTRATIO_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMPIXELASPECTRATIO_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMPIXELASPECTRATIO_INVALIDRATIO = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMPIXELASPECTRATIO_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMLUMAKEY_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMPIXELASPECTRATIO_INVALIDRATIO + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMLUMAKEY_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMLUMAKEY_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMLUMAKEY_INVALIDRANGE = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMLUMAKEY_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMLUMAKEY_UNSUPPORTED = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMLUMAKEY_INVALIDRANGE + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMSTEREOFORMAT_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMLUMAKEY_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMSTEREOFORMAT_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMSTEREOFORMAT_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMSTEREOFORMAT_UNSUPPORTED = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMSTEREOFORMAT_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMSTEREOFORMAT_FLIPUNSUPPORTED = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMSTEREOFORMAT_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMSTEREOFORMAT_MONOOFFSETUNSUPPORTED = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMSTEREOFORMAT_FLIPUNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMSTEREOFORMAT_FORMATUNSUPPORTED = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMSTEREOFORMAT_MONOOFFSETUNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMSTEREOFORMAT_INVALIDFORMAT = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMSTEREOFORMAT_FORMATUNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMAUTOPROCESSINGMODE_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMSTEREOFORMAT_INVALIDFORMAT + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMAUTOPROCESSINGMODE_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMAUTOPROCESSINGMODE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMFILTER_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMAUTOPROCESSINGMODE_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMFILTER_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMFILTER_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMFILTER_INVALIDFILTER = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMFILTER_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMFILTER_UNSUPPORTED = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMFILTER_INVALIDFILTER + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMFILTER_INVALIDLEVEL = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMFILTER_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMEXTENSION_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMFILTER_INVALIDLEVEL + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMEXTENSION_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMEXTENSION_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMFRAMEFORMAT_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMEXTENSION_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMCOLORSPACE_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMFRAMEFORMAT_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMOUTPUTRATE_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMCOLORSPACE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMSOURCERECT_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMOUTPUTRATE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMDESTRECT_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMSOURCERECT_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMALPHA_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMDESTRECT_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMPALETTE_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMALPHA_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMPIXELASPECTRATIO_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMPALETTE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMLUMAKEY_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMPIXELASPECTRATIO_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMSTEREOFORMAT_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMLUMAKEY_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMAUTOPROCESSINGMODE_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMSTEREOFORMAT_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMFILTER_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMAUTOPROCESSINGMODE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMEXTENSION_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMFILTER_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMEXTENSION_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMEXTENSION_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMEXTENSION_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INVALIDSTREAMCOUNT = ( D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_TARGETRECT = ( D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INVALIDSTREAMCOUNT + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INVALIDOUTPUT = ( D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_TARGETRECT + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INVALIDPASTFRAMES = ( D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INVALIDOUTPUT + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INVALIDFUTUREFRAMES = ( D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INVALIDPASTFRAMES + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INVALIDSOURCERECT = ( D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INVALIDFUTUREFRAMES + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INVALIDDESTRECT = ( D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INVALIDSOURCERECT + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INVALIDINPUTRESOURCE = ( D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INVALIDDESTRECT + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INVALIDARRAYSIZE = ( D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INVALIDINPUTRESOURCE + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INVALIDARRAY = ( D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INVALIDARRAYSIZE + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_RIGHTEXPECTED = ( D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INVALIDARRAY + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_RIGHTNOTEXPECTED = ( D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_RIGHTEXPECTED + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_STEREONOTENABLED = ( D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_RIGHTNOTEXPECTED + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INVALIDRIGHTRESOURCE = ( D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_STEREONOTENABLED + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_NOSTEREOSTREAMS = ( D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INVALIDRIGHTRESOURCE + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INPUTHAZARD = ( D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_NOSTEREOSTREAMS + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_OUTPUTHAZARD = ( D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_INPUTHAZARD + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_VIDEOPROCESSORBLT_OUTPUTHAZARD + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_NULLPARAM = ( D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_INVALIDTYPE = ( D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_INVALIDBIND = ( D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_INVALIDTYPE + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_UNSUPPORTEDFORMAT = ( D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_INVALIDBIND + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_INVALIDMIP = ( D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_UNSUPPORTEDFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_UNSUPPORTEMIP = ( D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_INVALIDMIP + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_INVALIDARRAYSIZE = ( D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_UNSUPPORTEMIP + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_INVALIDARRAY = ( D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_INVALIDARRAYSIZE + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_INVALIDDIMENSION = ( D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_INVALIDARRAY + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_INVALIDDIMENSION + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_NULLPARAM = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDTYPE = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDBIND = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDTYPE + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDMISC = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDBIND + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDUSAGE = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDMISC + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDFORMAT = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDUSAGE + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDFOURCC = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDMIP = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDFOURCC + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_UNSUPPORTEDMIP = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDMIP + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDARRAYSIZE = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_UNSUPPORTEDMIP + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDARRAY = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDARRAYSIZE + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDDIMENSION = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDARRAY + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDDIMENSION + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_NULLPARAM = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_INVALIDTYPE = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_INVALIDBIND = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_INVALIDTYPE + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_INVALIDFORMAT = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_INVALIDBIND + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_INVALIDMIP = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_INVALIDFORMAT + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_UNSUPPORTEDMIP = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_INVALIDMIP + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_UNSUPPORTEDARRAY = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_UNSUPPORTEDMIP + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_INVALIDARRAY = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_UNSUPPORTEDARRAY + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_INVALIDDIMENSION = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_INVALIDARRAY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_INVALID_USE_OF_FORCED_SAMPLE_COUNT = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_INVALIDDIMENSION + 1 ) , + D3D11_MESSAGE_ID_CREATEBLENDSTATE_INVALIDLOGICOPS = ( D3D11_MESSAGE_ID_DEVICE_DRAW_INVALID_USE_OF_FORCED_SAMPLE_COUNT + 1 ) , + D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDARRAYWITHDECODER = ( D3D11_MESSAGE_ID_CREATEBLENDSTATE_INVALIDLOGICOPS + 1 ) , + D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDDARRAYWITHDECODER = ( D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDARRAYWITHDECODER + 1 ) , + D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDARRAYWITHDECODER = ( D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDDARRAYWITHDECODER + 1 ) , + D3D11_MESSAGE_ID_DEVICE_LOCKEDOUT_INTERFACE = ( D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDARRAYWITHDECODER + 1 ) , + D3D11_MESSAGE_ID_REF_WARNING_ATOMIC_INCONSISTENT = ( D3D11_MESSAGE_ID_DEVICE_LOCKEDOUT_INTERFACE + 1 ) , + D3D11_MESSAGE_ID_REF_WARNING_READING_UNINITIALIZED_RESOURCE = ( D3D11_MESSAGE_ID_REF_WARNING_ATOMIC_INCONSISTENT + 1 ) , + D3D11_MESSAGE_ID_REF_WARNING_RAW_HAZARD = ( D3D11_MESSAGE_ID_REF_WARNING_READING_UNINITIALIZED_RESOURCE + 1 ) , + D3D11_MESSAGE_ID_REF_WARNING_WAR_HAZARD = ( D3D11_MESSAGE_ID_REF_WARNING_RAW_HAZARD + 1 ) , + D3D11_MESSAGE_ID_REF_WARNING_WAW_HAZARD = ( D3D11_MESSAGE_ID_REF_WARNING_WAR_HAZARD + 1 ) , + D3D11_MESSAGE_ID_CREATECRYPTOSESSION_NULLPARAM = ( D3D11_MESSAGE_ID_REF_WARNING_WAW_HAZARD + 1 ) , + D3D11_MESSAGE_ID_CREATECRYPTOSESSION_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_CREATECRYPTOSESSION_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETCRYPTOTYPE_NULLPARAM = ( D3D11_MESSAGE_ID_CREATECRYPTOSESSION_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_GETDECODERPROFILE_NULLPARAM = ( D3D11_MESSAGE_ID_GETCRYPTOTYPE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETCRYPTOSESSIONCERTIFICATESIZE_NULLPARAM = ( D3D11_MESSAGE_ID_GETDECODERPROFILE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETCRYPTOSESSIONCERTIFICATE_NULLPARAM = ( D3D11_MESSAGE_ID_GETCRYPTOSESSIONCERTIFICATESIZE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETCRYPTOSESSIONCERTIFICATE_WRONGSIZE = ( D3D11_MESSAGE_ID_GETCRYPTOSESSIONCERTIFICATE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETCRYPTOSESSIONHANDLE_WRONGSIZE = ( D3D11_MESSAGE_ID_GETCRYPTOSESSIONCERTIFICATE_WRONGSIZE + 1 ) , + D3D11_MESSAGE_ID_NEGOTIATECRPYTOSESSIONKEYEXCHANGE_NULLPARAM = ( D3D11_MESSAGE_ID_GETCRYPTOSESSIONHANDLE_WRONGSIZE + 1 ) , + D3D11_MESSAGE_ID_ENCRYPTIONBLT_UNSUPPORTED = ( D3D11_MESSAGE_ID_NEGOTIATECRPYTOSESSIONKEYEXCHANGE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_ENCRYPTIONBLT_NULLPARAM = ( D3D11_MESSAGE_ID_ENCRYPTIONBLT_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_ENCRYPTIONBLT_SRC_WRONGDEVICE = ( D3D11_MESSAGE_ID_ENCRYPTIONBLT_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_ENCRYPTIONBLT_DST_WRONGDEVICE = ( D3D11_MESSAGE_ID_ENCRYPTIONBLT_SRC_WRONGDEVICE + 1 ) , + D3D11_MESSAGE_ID_ENCRYPTIONBLT_FORMAT_MISMATCH = ( D3D11_MESSAGE_ID_ENCRYPTIONBLT_DST_WRONGDEVICE + 1 ) , + D3D11_MESSAGE_ID_ENCRYPTIONBLT_SIZE_MISMATCH = ( D3D11_MESSAGE_ID_ENCRYPTIONBLT_FORMAT_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_ENCRYPTIONBLT_SRC_MULTISAMPLED = ( D3D11_MESSAGE_ID_ENCRYPTIONBLT_SIZE_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_ENCRYPTIONBLT_DST_NOT_STAGING = ( D3D11_MESSAGE_ID_ENCRYPTIONBLT_SRC_MULTISAMPLED + 1 ) , + D3D11_MESSAGE_ID_ENCRYPTIONBLT_SRC_MAPPED = ( D3D11_MESSAGE_ID_ENCRYPTIONBLT_DST_NOT_STAGING + 1 ) , + D3D11_MESSAGE_ID_ENCRYPTIONBLT_DST_MAPPED = ( D3D11_MESSAGE_ID_ENCRYPTIONBLT_SRC_MAPPED + 1 ) , + D3D11_MESSAGE_ID_ENCRYPTIONBLT_SRC_OFFERED = ( D3D11_MESSAGE_ID_ENCRYPTIONBLT_DST_MAPPED + 1 ) , + D3D11_MESSAGE_ID_ENCRYPTIONBLT_DST_OFFERED = ( D3D11_MESSAGE_ID_ENCRYPTIONBLT_SRC_OFFERED + 1 ) , + D3D11_MESSAGE_ID_ENCRYPTIONBLT_SRC_CONTENT_UNDEFINED = ( D3D11_MESSAGE_ID_ENCRYPTIONBLT_DST_OFFERED + 1 ) , + D3D11_MESSAGE_ID_DECRYPTIONBLT_UNSUPPORTED = ( D3D11_MESSAGE_ID_ENCRYPTIONBLT_SRC_CONTENT_UNDEFINED + 1 ) , + D3D11_MESSAGE_ID_DECRYPTIONBLT_NULLPARAM = ( D3D11_MESSAGE_ID_DECRYPTIONBLT_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DECRYPTIONBLT_SRC_WRONGDEVICE = ( D3D11_MESSAGE_ID_DECRYPTIONBLT_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_DECRYPTIONBLT_DST_WRONGDEVICE = ( D3D11_MESSAGE_ID_DECRYPTIONBLT_SRC_WRONGDEVICE + 1 ) , + D3D11_MESSAGE_ID_DECRYPTIONBLT_FORMAT_MISMATCH = ( D3D11_MESSAGE_ID_DECRYPTIONBLT_DST_WRONGDEVICE + 1 ) , + D3D11_MESSAGE_ID_DECRYPTIONBLT_SIZE_MISMATCH = ( D3D11_MESSAGE_ID_DECRYPTIONBLT_FORMAT_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_DECRYPTIONBLT_DST_MULTISAMPLED = ( D3D11_MESSAGE_ID_DECRYPTIONBLT_SIZE_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_DECRYPTIONBLT_SRC_NOT_STAGING = ( D3D11_MESSAGE_ID_DECRYPTIONBLT_DST_MULTISAMPLED + 1 ) , + D3D11_MESSAGE_ID_DECRYPTIONBLT_DST_NOT_RENDER_TARGET = ( D3D11_MESSAGE_ID_DECRYPTIONBLT_SRC_NOT_STAGING + 1 ) , + D3D11_MESSAGE_ID_DECRYPTIONBLT_SRC_MAPPED = ( D3D11_MESSAGE_ID_DECRYPTIONBLT_DST_NOT_RENDER_TARGET + 1 ) , + D3D11_MESSAGE_ID_DECRYPTIONBLT_DST_MAPPED = ( D3D11_MESSAGE_ID_DECRYPTIONBLT_SRC_MAPPED + 1 ) , + D3D11_MESSAGE_ID_DECRYPTIONBLT_SRC_OFFERED = ( D3D11_MESSAGE_ID_DECRYPTIONBLT_DST_MAPPED + 1 ) , + D3D11_MESSAGE_ID_DECRYPTIONBLT_DST_OFFERED = ( D3D11_MESSAGE_ID_DECRYPTIONBLT_SRC_OFFERED + 1 ) , + D3D11_MESSAGE_ID_DECRYPTIONBLT_SRC_CONTENT_UNDEFINED = ( D3D11_MESSAGE_ID_DECRYPTIONBLT_DST_OFFERED + 1 ) , + D3D11_MESSAGE_ID_STARTSESSIONKEYREFRESH_NULLPARAM = ( D3D11_MESSAGE_ID_DECRYPTIONBLT_SRC_CONTENT_UNDEFINED + 1 ) , + D3D11_MESSAGE_ID_STARTSESSIONKEYREFRESH_INVALIDSIZE = ( D3D11_MESSAGE_ID_STARTSESSIONKEYREFRESH_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_FINISHSESSIONKEYREFRESH_NULLPARAM = ( D3D11_MESSAGE_ID_STARTSESSIONKEYREFRESH_INVALIDSIZE + 1 ) , + D3D11_MESSAGE_ID_GETENCRYPTIONBLTKEY_NULLPARAM = ( D3D11_MESSAGE_ID_FINISHSESSIONKEYREFRESH_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETENCRYPTIONBLTKEY_INVALIDSIZE = ( D3D11_MESSAGE_ID_GETENCRYPTIONBLTKEY_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETCONTENTPROTECTIONCAPS_NULLPARAM = ( D3D11_MESSAGE_ID_GETENCRYPTIONBLTKEY_INVALIDSIZE + 1 ) , + D3D11_MESSAGE_ID_CHECKCRYPTOKEYEXCHANGE_NULLPARAM = ( D3D11_MESSAGE_ID_GETCONTENTPROTECTIONCAPS_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_CHECKCRYPTOKEYEXCHANGE_INVALIDINDEX = ( D3D11_MESSAGE_ID_CHECKCRYPTOKEYEXCHANGE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_CREATEAUTHENTICATEDCHANNEL_NULLPARAM = ( D3D11_MESSAGE_ID_CHECKCRYPTOKEYEXCHANGE_INVALIDINDEX + 1 ) , + D3D11_MESSAGE_ID_CREATEAUTHENTICATEDCHANNEL_UNSUPPORTED = ( D3D11_MESSAGE_ID_CREATEAUTHENTICATEDCHANNEL_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_CREATEAUTHENTICATEDCHANNEL_INVALIDTYPE = ( D3D11_MESSAGE_ID_CREATEAUTHENTICATEDCHANNEL_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_CREATEAUTHENTICATEDCHANNEL_OUTOFMEMORY_RETURN = ( D3D11_MESSAGE_ID_CREATEAUTHENTICATEDCHANNEL_INVALIDTYPE + 1 ) , + D3D11_MESSAGE_ID_GETAUTHENTICATEDCHANNELCERTIFICATESIZE_INVALIDCHANNEL = ( D3D11_MESSAGE_ID_CREATEAUTHENTICATEDCHANNEL_OUTOFMEMORY_RETURN + 1 ) , + D3D11_MESSAGE_ID_GETAUTHENTICATEDCHANNELCERTIFICATESIZE_NULLPARAM = ( D3D11_MESSAGE_ID_GETAUTHENTICATEDCHANNELCERTIFICATESIZE_INVALIDCHANNEL + 1 ) , + D3D11_MESSAGE_ID_GETAUTHENTICATEDCHANNELCERTIFICATE_INVALIDCHANNEL = ( D3D11_MESSAGE_ID_GETAUTHENTICATEDCHANNELCERTIFICATESIZE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETAUTHENTICATEDCHANNELCERTIFICATE_NULLPARAM = ( D3D11_MESSAGE_ID_GETAUTHENTICATEDCHANNELCERTIFICATE_INVALIDCHANNEL + 1 ) , + D3D11_MESSAGE_ID_GETAUTHENTICATEDCHANNELCERTIFICATE_WRONGSIZE = ( D3D11_MESSAGE_ID_GETAUTHENTICATEDCHANNELCERTIFICATE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_NEGOTIATEAUTHENTICATEDCHANNELKEYEXCHANGE_INVALIDCHANNEL = ( D3D11_MESSAGE_ID_GETAUTHENTICATEDCHANNELCERTIFICATE_WRONGSIZE + 1 ) , + D3D11_MESSAGE_ID_NEGOTIATEAUTHENTICATEDCHANNELKEYEXCHANGE_NULLPARAM = ( D3D11_MESSAGE_ID_NEGOTIATEAUTHENTICATEDCHANNELKEYEXCHANGE_INVALIDCHANNEL + 1 ) , + D3D11_MESSAGE_ID_QUERYAUTHENTICATEDCHANNEL_NULLPARAM = ( D3D11_MESSAGE_ID_NEGOTIATEAUTHENTICATEDCHANNELKEYEXCHANGE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_QUERYAUTHENTICATEDCHANNEL_WRONGCHANNEL = ( D3D11_MESSAGE_ID_QUERYAUTHENTICATEDCHANNEL_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_QUERYAUTHENTICATEDCHANNEL_UNSUPPORTEDQUERY = ( D3D11_MESSAGE_ID_QUERYAUTHENTICATEDCHANNEL_WRONGCHANNEL + 1 ) , + D3D11_MESSAGE_ID_QUERYAUTHENTICATEDCHANNEL_WRONGSIZE = ( D3D11_MESSAGE_ID_QUERYAUTHENTICATEDCHANNEL_UNSUPPORTEDQUERY + 1 ) , + D3D11_MESSAGE_ID_QUERYAUTHENTICATEDCHANNEL_INVALIDPROCESSINDEX = ( D3D11_MESSAGE_ID_QUERYAUTHENTICATEDCHANNEL_WRONGSIZE + 1 ) , + D3D11_MESSAGE_ID_CONFIGUREAUTHENTICATEDCHANNEL_NULLPARAM = ( D3D11_MESSAGE_ID_QUERYAUTHENTICATEDCHANNEL_INVALIDPROCESSINDEX + 1 ) , + D3D11_MESSAGE_ID_CONFIGUREAUTHENTICATEDCHANNEL_WRONGCHANNEL = ( D3D11_MESSAGE_ID_CONFIGUREAUTHENTICATEDCHANNEL_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_CONFIGUREAUTHENTICATEDCHANNEL_UNSUPPORTEDCONFIGURE = ( D3D11_MESSAGE_ID_CONFIGUREAUTHENTICATEDCHANNEL_WRONGCHANNEL + 1 ) , + D3D11_MESSAGE_ID_CONFIGUREAUTHENTICATEDCHANNEL_WRONGSIZE = ( D3D11_MESSAGE_ID_CONFIGUREAUTHENTICATEDCHANNEL_UNSUPPORTEDCONFIGURE + 1 ) , + D3D11_MESSAGE_ID_CONFIGUREAUTHENTICATEDCHANNEL_INVALIDPROCESSIDTYPE = ( D3D11_MESSAGE_ID_CONFIGUREAUTHENTICATEDCHANNEL_WRONGSIZE + 1 ) , + D3D11_MESSAGE_ID_VSSETCONSTANTBUFFERS_INVALIDBUFFEROFFSETORCOUNT = ( D3D11_MESSAGE_ID_CONFIGUREAUTHENTICATEDCHANNEL_INVALIDPROCESSIDTYPE + 1 ) , + D3D11_MESSAGE_ID_DSSETCONSTANTBUFFERS_INVALIDBUFFEROFFSETORCOUNT = ( D3D11_MESSAGE_ID_VSSETCONSTANTBUFFERS_INVALIDBUFFEROFFSETORCOUNT + 1 ) , + D3D11_MESSAGE_ID_HSSETCONSTANTBUFFERS_INVALIDBUFFEROFFSETORCOUNT = ( D3D11_MESSAGE_ID_DSSETCONSTANTBUFFERS_INVALIDBUFFEROFFSETORCOUNT + 1 ) , + D3D11_MESSAGE_ID_GSSETCONSTANTBUFFERS_INVALIDBUFFEROFFSETORCOUNT = ( D3D11_MESSAGE_ID_HSSETCONSTANTBUFFERS_INVALIDBUFFEROFFSETORCOUNT + 1 ) , + D3D11_MESSAGE_ID_PSSETCONSTANTBUFFERS_INVALIDBUFFEROFFSETORCOUNT = ( D3D11_MESSAGE_ID_GSSETCONSTANTBUFFERS_INVALIDBUFFEROFFSETORCOUNT + 1 ) , + D3D11_MESSAGE_ID_CSSETCONSTANTBUFFERS_INVALIDBUFFEROFFSETORCOUNT = ( D3D11_MESSAGE_ID_PSSETCONSTANTBUFFERS_INVALIDBUFFEROFFSETORCOUNT + 1 ) , + D3D11_MESSAGE_ID_NEGOTIATECRPYTOSESSIONKEYEXCHANGE_INVALIDSIZE = ( D3D11_MESSAGE_ID_CSSETCONSTANTBUFFERS_INVALIDBUFFEROFFSETORCOUNT + 1 ) , + D3D11_MESSAGE_ID_NEGOTIATEAUTHENTICATEDCHANNELKEYEXCHANGE_INVALIDSIZE = ( D3D11_MESSAGE_ID_NEGOTIATECRPYTOSESSIONKEYEXCHANGE_INVALIDSIZE + 1 ) , + D3D11_MESSAGE_ID_OFFERRESOURCES_INVALIDPRIORITY = ( D3D11_MESSAGE_ID_NEGOTIATEAUTHENTICATEDCHANNELKEYEXCHANGE_INVALIDSIZE + 1 ) , + D3D11_MESSAGE_ID_GETCRYPTOSESSIONHANDLE_OUTOFMEMORY = ( D3D11_MESSAGE_ID_OFFERRESOURCES_INVALIDPRIORITY + 1 ) , + D3D11_MESSAGE_ID_ACQUIREHANDLEFORCAPTURE_NULLPARAM = ( D3D11_MESSAGE_ID_GETCRYPTOSESSIONHANDLE_OUTOFMEMORY + 1 ) , + D3D11_MESSAGE_ID_ACQUIREHANDLEFORCAPTURE_INVALIDTYPE = ( D3D11_MESSAGE_ID_ACQUIREHANDLEFORCAPTURE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_ACQUIREHANDLEFORCAPTURE_INVALIDBIND = ( D3D11_MESSAGE_ID_ACQUIREHANDLEFORCAPTURE_INVALIDTYPE + 1 ) , + D3D11_MESSAGE_ID_ACQUIREHANDLEFORCAPTURE_INVALIDARRAY = ( D3D11_MESSAGE_ID_ACQUIREHANDLEFORCAPTURE_INVALIDBIND + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMROTATION_NULLPARAM = ( D3D11_MESSAGE_ID_ACQUIREHANDLEFORCAPTURE_INVALIDARRAY + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMROTATION_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMROTATION_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMROTATION_INVALID = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMROTATION_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMROTATION_UNSUPPORTED = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMROTATION_INVALID + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMROTATION_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMROTATION_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CLEARVIEW_INVALIDVIEW = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMROTATION_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CLEARVIEW_INVALIDVIEW + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_SHADEREXTENSIONSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_DOUBLEEXTENSIONSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEHULLSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_SHADEREXTENSIONSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEHULLSHADER_SHADEREXTENSIONSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEHULLSHADER_DOUBLEEXTENSIONSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEHULLSHADER_SHADEREXTENSIONSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_SHADEREXTENSIONSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_DOUBLEEXTENSIONSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_SHADEREXTENSIONSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_SHADEREXTENSIONSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_DOUBLEEXTENSIONSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DOUBLEEXTENSIONSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_SHADEREXTENSIONSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_SHADEREXTENSIONSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DOUBLEEXTENSIONSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_SHADEREXTENSIONSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_SHADEREXTENSIONSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_DOUBLEEXTENSIONSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_DOUBLEEXTENSIONSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_SHADEREXTENSIONSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_SHADEREXTENSIONSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_DOUBLEEXTENSIONSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SHADER_LINKAGE_MINPRECISION = ( D3D11_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_SHADEREXTENSIONSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMALPHA_UNSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_SHADER_LINKAGE_MINPRECISION + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMPIXELASPECTRATIO_UNSUPPORTED = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMALPHA_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_UAVSNOTSUPPORTED = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMPIXELASPECTRATIO_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEHULLSHADER_UAVSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_UAVSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_UAVSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEHULLSHADER_UAVSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_UAVSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_UAVSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UAVSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_UAVSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_UAVSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UAVSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_UAVSNOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_UAVSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_INVALIDOFFSET = ( D3D11_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_UAVSNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_TOOMANYVIEWS = ( D3D11_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_INVALIDOFFSET + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CLEARVIEW_NOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_TOOMANYVIEWS + 1 ) , + D3D11_MESSAGE_ID_SWAPDEVICECONTEXTSTATE_NOTSUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_CLEARVIEW_NOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_UPDATESUBRESOURCE_PREFERUPDATESUBRESOURCE1 = ( D3D11_MESSAGE_ID_SWAPDEVICECONTEXTSTATE_NOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_GETDC_INACCESSIBLE = ( D3D11_MESSAGE_ID_UPDATESUBRESOURCE_PREFERUPDATESUBRESOURCE1 + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CLEARVIEW_INVALIDRECT = ( D3D11_MESSAGE_ID_GETDC_INACCESSIBLE + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_SAMPLE_MASK_IGNORED_ON_FL9 = ( D3D11_MESSAGE_ID_DEVICE_CLEARVIEW_INVALIDRECT + 1 ) , + D3D11_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE1_NOT_SUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_DRAW_SAMPLE_MASK_IGNORED_ON_FL9 + 1 ) , + D3D11_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_BY_NAME_NOT_SUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE1_NOT_SUPPORTED + 1 ) , + D3D11_MESSAGE_ID_ENQUEUESETEVENT_NOT_SUPPORTED = ( D3D11_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_BY_NAME_NOT_SUPPORTED + 1 ) , + D3D11_MESSAGE_ID_OFFERRELEASE_NOT_SUPPORTED = ( D3D11_MESSAGE_ID_ENQUEUESETEVENT_NOT_SUPPORTED + 1 ) , + D3D11_MESSAGE_ID_OFFERRESOURCES_INACCESSIBLE = ( D3D11_MESSAGE_ID_OFFERRELEASE_NOT_SUPPORTED + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDMSAA = ( D3D11_MESSAGE_ID_OFFERRESOURCES_INACCESSIBLE + 1 ) , + D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_INVALIDMSAA = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDMSAA + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CLEARVIEW_INVALIDSOURCERECT = ( D3D11_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_INVALIDMSAA + 1 ) , + D3D11_MESSAGE_ID_DEVICE_CLEARVIEW_EMPTYRECT = ( D3D11_MESSAGE_ID_DEVICE_CLEARVIEW_INVALIDSOURCERECT + 1 ) , + D3D11_MESSAGE_ID_UPDATESUBRESOURCE_EMPTYDESTBOX = ( D3D11_MESSAGE_ID_DEVICE_CLEARVIEW_EMPTYRECT + 1 ) , + D3D11_MESSAGE_ID_COPYSUBRESOURCEREGION_EMPTYSOURCEBOX = ( D3D11_MESSAGE_ID_UPDATESUBRESOURCE_EMPTYDESTBOX + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_OM_RENDER_TARGET_DOES_NOT_SUPPORT_LOGIC_OPS = ( D3D11_MESSAGE_ID_COPYSUBRESOURCEREGION_EMPTYSOURCEBOX + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_DEPTHSTENCILVIEW_NOT_SET = ( D3D11_MESSAGE_ID_DEVICE_DRAW_OM_RENDER_TARGET_DOES_NOT_SUPPORT_LOGIC_OPS + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_RENDERTARGETVIEW_NOT_SET = ( D3D11_MESSAGE_ID_DEVICE_DRAW_DEPTHSTENCILVIEW_NOT_SET + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_RENDERTARGETVIEW_NOT_SET_DUE_TO_FLIP_PRESENT = ( D3D11_MESSAGE_ID_DEVICE_DRAW_RENDERTARGETVIEW_NOT_SET + 1 ) , + D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_NOT_SET_DUE_TO_FLIP_PRESENT = ( D3D11_MESSAGE_ID_DEVICE_DRAW_RENDERTARGETVIEW_NOT_SET_DUE_TO_FLIP_PRESENT + 1 ) , + D3D11_MESSAGE_ID_GETDATAFORNEWHARDWAREKEY_NULLPARAM = ( D3D11_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_NOT_SET_DUE_TO_FLIP_PRESENT + 1 ) , + D3D11_MESSAGE_ID_CHECKCRYPTOSESSIONSTATUS_NULLPARAM = ( D3D11_MESSAGE_ID_GETDATAFORNEWHARDWAREKEY_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETCRYPTOSESSIONPRIVATEDATASIZE_NULLPARAM = ( D3D11_MESSAGE_ID_CHECKCRYPTOSESSIONSTATUS_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETVIDEODECODERCAPS_NULLPARAM = ( D3D11_MESSAGE_ID_GETCRYPTOSESSIONPRIVATEDATASIZE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_GETVIDEODECODERCAPS_ZEROWIDTHHEIGHT = ( D3D11_MESSAGE_ID_GETVIDEODECODERCAPS_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_CHECKVIDEODECODERDOWNSAMPLING_NULLPARAM = ( D3D11_MESSAGE_ID_GETVIDEODECODERCAPS_ZEROWIDTHHEIGHT + 1 ) , + D3D11_MESSAGE_ID_CHECKVIDEODECODERDOWNSAMPLING_INVALIDCOLORSPACE = ( D3D11_MESSAGE_ID_CHECKVIDEODECODERDOWNSAMPLING_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_CHECKVIDEODECODERDOWNSAMPLING_ZEROWIDTHHEIGHT = ( D3D11_MESSAGE_ID_CHECKVIDEODECODERDOWNSAMPLING_INVALIDCOLORSPACE + 1 ) , + D3D11_MESSAGE_ID_VIDEODECODERENABLEDOWNSAMPLING_NULLPARAM = ( D3D11_MESSAGE_ID_CHECKVIDEODECODERDOWNSAMPLING_ZEROWIDTHHEIGHT + 1 ) , + D3D11_MESSAGE_ID_VIDEODECODERENABLEDOWNSAMPLING_UNSUPPORTED = ( D3D11_MESSAGE_ID_VIDEODECODERENABLEDOWNSAMPLING_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEODECODERUPDATEDOWNSAMPLING_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEODECODERENABLEDOWNSAMPLING_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_VIDEODECODERUPDATEDOWNSAMPLING_UNSUPPORTED = ( D3D11_MESSAGE_ID_VIDEODECODERUPDATEDOWNSAMPLING_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_CHECKVIDEOPROCESSORFORMATCONVERSION_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEODECODERUPDATEDOWNSAMPLING_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTCOLORSPACE1_NULLPARAM = ( D3D11_MESSAGE_ID_CHECKVIDEOPROCESSORFORMATCONVERSION_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTCOLORSPACE1_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTCOLORSPACE1_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMCOLORSPACE1_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTCOLORSPACE1_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMCOLORSPACE1_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMCOLORSPACE1_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMMIRROR_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMCOLORSPACE1_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMMIRROR_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMMIRROR_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMMIRROR_UNSUPPORTED = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMMIRROR_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMCOLORSPACE1_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMMIRROR_UNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMMIRROR_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMCOLORSPACE1_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_RECOMMENDVIDEODECODERDOWNSAMPLING_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMMIRROR_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_RECOMMENDVIDEODECODERDOWNSAMPLING_INVALIDCOLORSPACE = ( D3D11_MESSAGE_ID_RECOMMENDVIDEODECODERDOWNSAMPLING_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_RECOMMENDVIDEODECODERDOWNSAMPLING_ZEROWIDTHHEIGHT = ( D3D11_MESSAGE_ID_RECOMMENDVIDEODECODERDOWNSAMPLING_INVALIDCOLORSPACE + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTSHADERUSAGE_NULLPARAM = ( D3D11_MESSAGE_ID_RECOMMENDVIDEODECODERDOWNSAMPLING_ZEROWIDTHHEIGHT + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTSHADERUSAGE_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTSHADERUSAGE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTSHADERUSAGE_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_INVALIDSTREAMCOUNT = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_TARGETRECT = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_INVALIDSTREAMCOUNT + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_INVALIDSOURCERECT = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_TARGETRECT + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_INVALIDDESTRECT = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_INVALIDSOURCERECT + 1 ) , + D3D11_MESSAGE_ID_GETCRYPTOSESSIONPRIVATEDATASIZE_INVALID_KEY_EXCHANGE_TYPE = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_INVALIDDESTRECT + 1 ) , + D3D11_MESSAGE_ID_D3D11_1_MESSAGES_END = ( D3D11_MESSAGE_ID_GETCRYPTOSESSIONPRIVATEDATASIZE_INVALID_KEY_EXCHANGE_TYPE + 1 ) , + D3D11_MESSAGE_ID_D3D11_2_MESSAGES_START = ( D3D11_MESSAGE_ID_D3D11_1_MESSAGES_END + 1 ) , + D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDUSAGE = ( D3D11_MESSAGE_ID_D3D11_2_MESSAGES_START + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE1D_INVALIDUSAGE = ( D3D11_MESSAGE_ID_CREATEBUFFER_INVALIDUSAGE + 1 ) , + D3D11_MESSAGE_ID_CREATETEXTURE2D_INVALIDUSAGE = ( D3D11_MESSAGE_ID_CREATETEXTURE1D_INVALIDUSAGE + 1 ) , + D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_LEVEL9_STEPRATE_NOT_1 = ( D3D11_MESSAGE_ID_CREATETEXTURE2D_INVALIDUSAGE + 1 ) , + D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_LEVEL9_INSTANCING_NOT_SUPPORTED = ( D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_LEVEL9_STEPRATE_NOT_1 + 1 ) , + D3D11_MESSAGE_ID_UPDATETILEMAPPINGS_INVALID_PARAMETER = ( D3D11_MESSAGE_ID_CREATEINPUTLAYOUT_LEVEL9_INSTANCING_NOT_SUPPORTED + 1 ) , + D3D11_MESSAGE_ID_COPYTILEMAPPINGS_INVALID_PARAMETER = ( D3D11_MESSAGE_ID_UPDATETILEMAPPINGS_INVALID_PARAMETER + 1 ) , + D3D11_MESSAGE_ID_COPYTILES_INVALID_PARAMETER = ( D3D11_MESSAGE_ID_COPYTILEMAPPINGS_INVALID_PARAMETER + 1 ) , + D3D11_MESSAGE_ID_UPDATETILES_INVALID_PARAMETER = ( D3D11_MESSAGE_ID_COPYTILES_INVALID_PARAMETER + 1 ) , + D3D11_MESSAGE_ID_RESIZETILEPOOL_INVALID_PARAMETER = ( D3D11_MESSAGE_ID_UPDATETILES_INVALID_PARAMETER + 1 ) , + D3D11_MESSAGE_ID_TILEDRESOURCEBARRIER_INVALID_PARAMETER = ( D3D11_MESSAGE_ID_RESIZETILEPOOL_INVALID_PARAMETER + 1 ) , + D3D11_MESSAGE_ID_NULL_TILE_MAPPING_ACCESS_WARNING = ( D3D11_MESSAGE_ID_TILEDRESOURCEBARRIER_INVALID_PARAMETER + 1 ) , + D3D11_MESSAGE_ID_NULL_TILE_MAPPING_ACCESS_ERROR = ( D3D11_MESSAGE_ID_NULL_TILE_MAPPING_ACCESS_WARNING + 1 ) , + D3D11_MESSAGE_ID_DIRTY_TILE_MAPPING_ACCESS = ( D3D11_MESSAGE_ID_NULL_TILE_MAPPING_ACCESS_ERROR + 1 ) , + D3D11_MESSAGE_ID_DUPLICATE_TILE_MAPPINGS_IN_COVERED_AREA = ( D3D11_MESSAGE_ID_DIRTY_TILE_MAPPING_ACCESS + 1 ) , + D3D11_MESSAGE_ID_TILE_MAPPINGS_IN_COVERED_AREA_DUPLICATED_OUTSIDE = ( D3D11_MESSAGE_ID_DUPLICATE_TILE_MAPPINGS_IN_COVERED_AREA + 1 ) , + D3D11_MESSAGE_ID_TILE_MAPPINGS_SHARED_BETWEEN_INCOMPATIBLE_RESOURCES = ( D3D11_MESSAGE_ID_TILE_MAPPINGS_IN_COVERED_AREA_DUPLICATED_OUTSIDE + 1 ) , + D3D11_MESSAGE_ID_TILE_MAPPINGS_SHARED_BETWEEN_INPUT_AND_OUTPUT = ( D3D11_MESSAGE_ID_TILE_MAPPINGS_SHARED_BETWEEN_INCOMPATIBLE_RESOURCES + 1 ) , + D3D11_MESSAGE_ID_CHECKMULTISAMPLEQUALITYLEVELS_INVALIDFLAGS = ( D3D11_MESSAGE_ID_TILE_MAPPINGS_SHARED_BETWEEN_INPUT_AND_OUTPUT + 1 ) , + D3D11_MESSAGE_ID_GETRESOURCETILING_NONTILED_RESOURCE = ( D3D11_MESSAGE_ID_CHECKMULTISAMPLEQUALITYLEVELS_INVALIDFLAGS + 1 ) , + D3D11_MESSAGE_ID_RESIZETILEPOOL_SHRINK_WITH_MAPPINGS_STILL_DEFINED_PAST_END = ( D3D11_MESSAGE_ID_GETRESOURCETILING_NONTILED_RESOURCE + 1 ) , + D3D11_MESSAGE_ID_NEED_TO_CALL_TILEDRESOURCEBARRIER = ( D3D11_MESSAGE_ID_RESIZETILEPOOL_SHRINK_WITH_MAPPINGS_STILL_DEFINED_PAST_END + 1 ) , + D3D11_MESSAGE_ID_CREATEDEVICE_INVALIDARGS = ( D3D11_MESSAGE_ID_NEED_TO_CALL_TILEDRESOURCEBARRIER + 1 ) , + D3D11_MESSAGE_ID_CREATEDEVICE_WARNING = ( D3D11_MESSAGE_ID_CREATEDEVICE_INVALIDARGS + 1 ) , + D3D11_MESSAGE_ID_CLEARUNORDEREDACCESSVIEWUINT_HAZARD = ( D3D11_MESSAGE_ID_CREATEDEVICE_WARNING + 1 ) , + D3D11_MESSAGE_ID_CLEARUNORDEREDACCESSVIEWFLOAT_HAZARD = ( D3D11_MESSAGE_ID_CLEARUNORDEREDACCESSVIEWUINT_HAZARD + 1 ) , + D3D11_MESSAGE_ID_TILED_RESOURCE_TIER_1_BUFFER_TEXTURE_MISMATCH = ( D3D11_MESSAGE_ID_CLEARUNORDEREDACCESSVIEWFLOAT_HAZARD + 1 ) , + D3D11_MESSAGE_ID_CREATE_CRYPTOSESSION = ( D3D11_MESSAGE_ID_TILED_RESOURCE_TIER_1_BUFFER_TEXTURE_MISMATCH + 1 ) , + D3D11_MESSAGE_ID_CREATE_AUTHENTICATEDCHANNEL = ( D3D11_MESSAGE_ID_CREATE_CRYPTOSESSION + 1 ) , + D3D11_MESSAGE_ID_LIVE_CRYPTOSESSION = ( D3D11_MESSAGE_ID_CREATE_AUTHENTICATEDCHANNEL + 1 ) , + D3D11_MESSAGE_ID_LIVE_AUTHENTICATEDCHANNEL = ( D3D11_MESSAGE_ID_LIVE_CRYPTOSESSION + 1 ) , + D3D11_MESSAGE_ID_DESTROY_CRYPTOSESSION = ( D3D11_MESSAGE_ID_LIVE_AUTHENTICATEDCHANNEL + 1 ) , + D3D11_MESSAGE_ID_DESTROY_AUTHENTICATEDCHANNEL = ( D3D11_MESSAGE_ID_DESTROY_CRYPTOSESSION + 1 ) , + D3D11_MESSAGE_ID_D3D11_2_MESSAGES_END = ( D3D11_MESSAGE_ID_DESTROY_AUTHENTICATEDCHANNEL + 1 ) , + D3D11_MESSAGE_ID_D3D11_3_MESSAGES_START = ( D3D11_MESSAGE_ID_D3D11_2_MESSAGES_END + 1 ) , + D3D11_MESSAGE_ID_CREATERASTERIZERSTATE_INVALID_CONSERVATIVERASTERMODE = ( D3D11_MESSAGE_ID_D3D11_3_MESSAGES_START + 1 ) , + D3D11_MESSAGE_ID_DEVICE_DRAW_INVALID_SYSTEMVALUE = ( D3D11_MESSAGE_ID_CREATERASTERIZERSTATE_INVALID_CONSERVATIVERASTERMODE + 1 ) , + D3D11_MESSAGE_ID_CREATEQUERYORPREDICATE_INVALIDCONTEXTTYPE = ( D3D11_MESSAGE_ID_DEVICE_DRAW_INVALID_SYSTEMVALUE + 1 ) , + D3D11_MESSAGE_ID_CREATEQUERYORPREDICATE_DECODENOTSUPPORTED = ( D3D11_MESSAGE_ID_CREATEQUERYORPREDICATE_INVALIDCONTEXTTYPE + 1 ) , + D3D11_MESSAGE_ID_CREATEQUERYORPREDICATE_ENCODENOTSUPPORTED = ( D3D11_MESSAGE_ID_CREATEQUERYORPREDICATE_DECODENOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDPLANEINDEX = ( D3D11_MESSAGE_ID_CREATEQUERYORPREDICATE_ENCODENOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDVIDEOPLANEINDEX = ( D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDPLANEINDEX + 1 ) , + D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_AMBIGUOUSVIDEOPLANEINDEX = ( D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDVIDEOPLANEINDEX + 1 ) , + D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDPLANEINDEX = ( D3D11_MESSAGE_ID_CREATESHADERRESOURCEVIEW_AMBIGUOUSVIDEOPLANEINDEX + 1 ) , + D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDVIDEOPLANEINDEX = ( D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDPLANEINDEX + 1 ) , + D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_AMBIGUOUSVIDEOPLANEINDEX = ( D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDVIDEOPLANEINDEX + 1 ) , + D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDPLANEINDEX = ( D3D11_MESSAGE_ID_CREATERENDERTARGETVIEW_AMBIGUOUSVIDEOPLANEINDEX + 1 ) , + D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDVIDEOPLANEINDEX = ( D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDPLANEINDEX + 1 ) , + D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_AMBIGUOUSVIDEOPLANEINDEX = ( D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDVIDEOPLANEINDEX + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_INVALIDSCANDATAOFFSET = ( D3D11_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_AMBIGUOUSVIDEOPLANEINDEX + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_NOTSUPPORTED = ( D3D11_MESSAGE_ID_JPEGDECODE_INVALIDSCANDATAOFFSET + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_DIMENSIONSTOOLARGE = ( D3D11_MESSAGE_ID_JPEGDECODE_NOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_INVALIDCOMPONENTS = ( D3D11_MESSAGE_ID_JPEGDECODE_DIMENSIONSTOOLARGE + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_DESTINATIONNOT2D = ( D3D11_MESSAGE_ID_JPEGDECODE_INVALIDCOMPONENTS + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_TILEDRESOURCESUNSUPPORTED = ( D3D11_MESSAGE_ID_JPEGDECODE_DESTINATIONNOT2D + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_GUARDRECTSUNSUPPORTED = ( D3D11_MESSAGE_ID_JPEGDECODE_TILEDRESOURCESUNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_FORMATUNSUPPORTED = ( D3D11_MESSAGE_ID_JPEGDECODE_GUARDRECTSUNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_INVALIDSUBRESOURCE = ( D3D11_MESSAGE_ID_JPEGDECODE_FORMATUNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_INVALIDMIPLEVEL = ( D3D11_MESSAGE_ID_JPEGDECODE_INVALIDSUBRESOURCE + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_EMPTYDESTBOX = ( D3D11_MESSAGE_ID_JPEGDECODE_INVALIDMIPLEVEL + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_DESTBOXNOT2D = ( D3D11_MESSAGE_ID_JPEGDECODE_EMPTYDESTBOX + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_DESTBOXNOTSUB = ( D3D11_MESSAGE_ID_JPEGDECODE_DESTBOXNOT2D + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_DESTBOXESINTERSECT = ( D3D11_MESSAGE_ID_JPEGDECODE_DESTBOXNOTSUB + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_XSUBSAMPLEMISMATCH = ( D3D11_MESSAGE_ID_JPEGDECODE_DESTBOXESINTERSECT + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_YSUBSAMPLEMISMATCH = ( D3D11_MESSAGE_ID_JPEGDECODE_XSUBSAMPLEMISMATCH + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_XSUBSAMPLEODD = ( D3D11_MESSAGE_ID_JPEGDECODE_YSUBSAMPLEMISMATCH + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_YSUBSAMPLEODD = ( D3D11_MESSAGE_ID_JPEGDECODE_XSUBSAMPLEODD + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_OUTPUTDIMENSIONSTOOLARGE = ( D3D11_MESSAGE_ID_JPEGDECODE_YSUBSAMPLEODD + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_NONPOW2SCALEUNSUPPORTED = ( D3D11_MESSAGE_ID_JPEGDECODE_OUTPUTDIMENSIONSTOOLARGE + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_FRACTIONALDOWNSCALETOLARGE = ( D3D11_MESSAGE_ID_JPEGDECODE_NONPOW2SCALEUNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_CHROMASIZEMISMATCH = ( D3D11_MESSAGE_ID_JPEGDECODE_FRACTIONALDOWNSCALETOLARGE + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_LUMACHROMASIZEMISMATCH = ( D3D11_MESSAGE_ID_JPEGDECODE_CHROMASIZEMISMATCH + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_INVALIDNUMDESTINATIONS = ( D3D11_MESSAGE_ID_JPEGDECODE_LUMACHROMASIZEMISMATCH + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_SUBBOXUNSUPPORTED = ( D3D11_MESSAGE_ID_JPEGDECODE_INVALIDNUMDESTINATIONS + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_1DESTUNSUPPORTEDFORMAT = ( D3D11_MESSAGE_ID_JPEGDECODE_SUBBOXUNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_3DESTUNSUPPORTEDFORMAT = ( D3D11_MESSAGE_ID_JPEGDECODE_1DESTUNSUPPORTEDFORMAT + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_SCALEUNSUPPORTED = ( D3D11_MESSAGE_ID_JPEGDECODE_3DESTUNSUPPORTEDFORMAT + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_INVALIDSOURCESIZE = ( D3D11_MESSAGE_ID_JPEGDECODE_SCALEUNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_INVALIDCOPYFLAGS = ( D3D11_MESSAGE_ID_JPEGDECODE_INVALIDSOURCESIZE + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_HAZARD = ( D3D11_MESSAGE_ID_JPEGDECODE_INVALIDCOPYFLAGS + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDSRCBUFFERUSAGE = ( D3D11_MESSAGE_ID_JPEGDECODE_HAZARD + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDSRCBUFFERMISCFLAGS = ( D3D11_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDSRCBUFFERUSAGE + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDDSTTEXTUREUSAGE = ( D3D11_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDSRCBUFFERMISCFLAGS + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_BACKBUFFERNOTSUPPORTED = ( D3D11_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDDSTTEXTUREUSAGE + 1 ) , + D3D11_MESSAGE_ID_JPEGDECODE_UNSUPPRTEDCOPYFLAGS = ( D3D11_MESSAGE_ID_JPEGDECODE_BACKBUFFERNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_JPEGENCODE_NOTSUPPORTED = ( D3D11_MESSAGE_ID_JPEGDECODE_UNSUPPRTEDCOPYFLAGS + 1 ) , + D3D11_MESSAGE_ID_JPEGENCODE_INVALIDSCANDATAOFFSET = ( D3D11_MESSAGE_ID_JPEGENCODE_NOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_JPEGENCODE_INVALIDCOMPONENTS = ( D3D11_MESSAGE_ID_JPEGENCODE_INVALIDSCANDATAOFFSET + 1 ) , + D3D11_MESSAGE_ID_JPEGENCODE_SOURCENOT2D = ( D3D11_MESSAGE_ID_JPEGENCODE_INVALIDCOMPONENTS + 1 ) , + D3D11_MESSAGE_ID_JPEGENCODE_TILEDRESOURCESUNSUPPORTED = ( D3D11_MESSAGE_ID_JPEGENCODE_SOURCENOT2D + 1 ) , + D3D11_MESSAGE_ID_JPEGENCODE_GUARDRECTSUNSUPPORTED = ( D3D11_MESSAGE_ID_JPEGENCODE_TILEDRESOURCESUNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_JPEGENCODE_XSUBSAMPLEMISMATCH = ( D3D11_MESSAGE_ID_JPEGENCODE_GUARDRECTSUNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_JPEGENCODE_YSUBSAMPLEMISMATCH = ( D3D11_MESSAGE_ID_JPEGENCODE_XSUBSAMPLEMISMATCH + 1 ) , + D3D11_MESSAGE_ID_JPEGENCODE_FORMATUNSUPPORTED = ( D3D11_MESSAGE_ID_JPEGENCODE_YSUBSAMPLEMISMATCH + 1 ) , + D3D11_MESSAGE_ID_JPEGENCODE_INVALIDSUBRESOURCE = ( D3D11_MESSAGE_ID_JPEGENCODE_FORMATUNSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_JPEGENCODE_INVALIDMIPLEVEL = ( D3D11_MESSAGE_ID_JPEGENCODE_INVALIDSUBRESOURCE + 1 ) , + D3D11_MESSAGE_ID_JPEGENCODE_DIMENSIONSTOOLARGE = ( D3D11_MESSAGE_ID_JPEGENCODE_INVALIDMIPLEVEL + 1 ) , + D3D11_MESSAGE_ID_JPEGENCODE_HAZARD = ( D3D11_MESSAGE_ID_JPEGENCODE_DIMENSIONSTOOLARGE + 1 ) , + D3D11_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDDSTBUFFERUSAGE = ( D3D11_MESSAGE_ID_JPEGENCODE_HAZARD + 1 ) , + D3D11_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDDSTBUFFERMISCFLAGS = ( D3D11_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDDSTBUFFERUSAGE + 1 ) , + D3D11_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDSRCTEXTUREUSAGE = ( D3D11_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDDSTBUFFERMISCFLAGS + 1 ) , + D3D11_MESSAGE_ID_JPEGENCODE_BACKBUFFERNOTSUPPORTED = ( D3D11_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDSRCTEXTUREUSAGE + 1 ) , + D3D11_MESSAGE_ID_CREATEQUERYORPREDICATE_UNSUPPORTEDCONTEXTTTYPEFORQUERY = ( D3D11_MESSAGE_ID_JPEGENCODE_BACKBUFFERNOTSUPPORTED + 1 ) , + D3D11_MESSAGE_ID_FLUSH1_INVALIDCONTEXTTYPE = ( D3D11_MESSAGE_ID_CREATEQUERYORPREDICATE_UNSUPPORTEDCONTEXTTTYPEFORQUERY + 1 ) , + D3D11_MESSAGE_ID_DEVICE_SETHARDWAREPROTECTION_INVALIDCONTEXT = ( D3D11_MESSAGE_ID_FLUSH1_INVALIDCONTEXTTYPE + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTHDRMETADATA_NULLPARAM = ( D3D11_MESSAGE_ID_DEVICE_SETHARDWAREPROTECTION_INVALIDCONTEXT + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTHDRMETADATA_INVALIDSIZE = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTHDRMETADATA_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTHDRMETADATA_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTHDRMETADATA_INVALIDSIZE + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTHDRMETADATA_INVALIDSIZE = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTHDRMETADATA_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMHDRMETADATA_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTHDRMETADATA_INVALIDSIZE + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMHDRMETADATA_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMHDRMETADATA_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMHDRMETADATA_INVALIDSIZE = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMHDRMETADATA_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMHDRMETADATA_NULLPARAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORSETSTREAMHDRMETADATA_INVALIDSIZE + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMHDRMETADATA_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMHDRMETADATA_NULLPARAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMHDRMETADATA_INVALIDSIZE = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMHDRMETADATA_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMFRAMEFORMAT_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMHDRMETADATA_INVALIDSIZE + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMCOLORSPACE_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMFRAMEFORMAT_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMOUTPUTRATE_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMCOLORSPACE_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMSOURCERECT_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMOUTPUTRATE_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMDESTRECT_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMSOURCERECT_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMALPHA_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMDESTRECT_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMPALETTE_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMALPHA_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMPIXELASPECTRATIO_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMPALETTE_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMLUMAKEY_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMPIXELASPECTRATIO_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMSTEREOFORMAT_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMLUMAKEY_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMAUTOPROCESSINGMODE_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMSTEREOFORMAT_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMFILTER_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMAUTOPROCESSINGMODE_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMROTATION_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMFILTER_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMCOLORSPACE1_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMROTATION_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMMIRROR_INVALIDSTREAM = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMCOLORSPACE1_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_CREATE_FENCE = ( D3D11_MESSAGE_ID_VIDEOPROCESSORGETSTREAMMIRROR_INVALIDSTREAM + 1 ) , + D3D11_MESSAGE_ID_LIVE_FENCE = ( D3D11_MESSAGE_ID_CREATE_FENCE + 1 ) , + D3D11_MESSAGE_ID_DESTROY_FENCE = ( D3D11_MESSAGE_ID_LIVE_FENCE + 1 ) , + D3D11_MESSAGE_ID_D3D11_3_MESSAGES_END = ( D3D11_MESSAGE_ID_DESTROY_FENCE + 1 ) + } D3D11_MESSAGE_ID; + +typedef struct D3D11_MESSAGE + { + D3D11_MESSAGE_CATEGORY Category; + D3D11_MESSAGE_SEVERITY Severity; + D3D11_MESSAGE_ID ID; + /* [annotation] */ + _Field_size_(DescriptionByteLength) const char *pDescription; + SIZE_T DescriptionByteLength; + } D3D11_MESSAGE; + +typedef struct D3D11_INFO_QUEUE_FILTER_DESC + { + UINT NumCategories; + /* [annotation] */ + _Field_size_(NumCategories) D3D11_MESSAGE_CATEGORY *pCategoryList; + UINT NumSeverities; + /* [annotation] */ + _Field_size_(NumSeverities) D3D11_MESSAGE_SEVERITY *pSeverityList; + UINT NumIDs; + /* [annotation] */ + _Field_size_(NumIDs) D3D11_MESSAGE_ID *pIDList; + } D3D11_INFO_QUEUE_FILTER_DESC; + +typedef struct D3D11_INFO_QUEUE_FILTER + { + D3D11_INFO_QUEUE_FILTER_DESC AllowList; + D3D11_INFO_QUEUE_FILTER_DESC DenyList; + } D3D11_INFO_QUEUE_FILTER; + +#define D3D11_INFO_QUEUE_DEFAULT_MESSAGE_COUNT_LIMIT 1024 + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0005_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0005_v0_0_s_ifspec; + +#ifndef __ID3D11InfoQueue_INTERFACE_DEFINED__ +#define __ID3D11InfoQueue_INTERFACE_DEFINED__ + +/* interface ID3D11InfoQueue */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11InfoQueue; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6543dbb6-1b48-42f5-ab82-e97ec74326f6") + ID3D11InfoQueue : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetMessageCountLimit( + /* [annotation] */ + _In_ UINT64 MessageCountLimit) = 0; + + virtual void STDMETHODCALLTYPE ClearStoredMessages( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMessage( + /* [annotation] */ + _In_ UINT64 MessageIndex, + /* [annotation] */ + _Out_writes_bytes_opt_(*pMessageByteLength) D3D11_MESSAGE *pMessage, + /* [annotation] */ + _Inout_ SIZE_T *pMessageByteLength) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetNumMessagesAllowedByStorageFilter( void) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetNumMessagesDeniedByStorageFilter( void) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetNumStoredMessages( void) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetNumStoredMessagesAllowedByRetrievalFilter( void) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetNumMessagesDiscardedByMessageCountLimit( void) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetMessageCountLimit( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddStorageFilterEntries( + /* [annotation] */ + _In_ D3D11_INFO_QUEUE_FILTER *pFilter) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStorageFilter( + /* [annotation] */ + _Out_writes_bytes_opt_(*pFilterByteLength) D3D11_INFO_QUEUE_FILTER *pFilter, + /* [annotation] */ + _Inout_ SIZE_T *pFilterByteLength) = 0; + + virtual void STDMETHODCALLTYPE ClearStorageFilter( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushEmptyStorageFilter( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushCopyOfStorageFilter( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushStorageFilter( + /* [annotation] */ + _In_ D3D11_INFO_QUEUE_FILTER *pFilter) = 0; + + virtual void STDMETHODCALLTYPE PopStorageFilter( void) = 0; + + virtual UINT STDMETHODCALLTYPE GetStorageFilterStackSize( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddRetrievalFilterEntries( + /* [annotation] */ + _In_ D3D11_INFO_QUEUE_FILTER *pFilter) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRetrievalFilter( + /* [annotation] */ + _Out_writes_bytes_opt_(*pFilterByteLength) D3D11_INFO_QUEUE_FILTER *pFilter, + /* [annotation] */ + _Inout_ SIZE_T *pFilterByteLength) = 0; + + virtual void STDMETHODCALLTYPE ClearRetrievalFilter( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushEmptyRetrievalFilter( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushCopyOfRetrievalFilter( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushRetrievalFilter( + /* [annotation] */ + _In_ D3D11_INFO_QUEUE_FILTER *pFilter) = 0; + + virtual void STDMETHODCALLTYPE PopRetrievalFilter( void) = 0; + + virtual UINT STDMETHODCALLTYPE GetRetrievalFilterStackSize( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddMessage( + /* [annotation] */ + _In_ D3D11_MESSAGE_CATEGORY Category, + /* [annotation] */ + _In_ D3D11_MESSAGE_SEVERITY Severity, + /* [annotation] */ + _In_ D3D11_MESSAGE_ID ID, + /* [annotation] */ + _In_ LPCSTR pDescription) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddApplicationMessage( + /* [annotation] */ + _In_ D3D11_MESSAGE_SEVERITY Severity, + /* [annotation] */ + _In_ LPCSTR pDescription) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetBreakOnCategory( + /* [annotation] */ + _In_ D3D11_MESSAGE_CATEGORY Category, + /* [annotation] */ + _In_ BOOL bEnable) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetBreakOnSeverity( + /* [annotation] */ + _In_ D3D11_MESSAGE_SEVERITY Severity, + /* [annotation] */ + _In_ BOOL bEnable) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetBreakOnID( + /* [annotation] */ + _In_ D3D11_MESSAGE_ID ID, + /* [annotation] */ + _In_ BOOL bEnable) = 0; + + virtual BOOL STDMETHODCALLTYPE GetBreakOnCategory( + /* [annotation] */ + _In_ D3D11_MESSAGE_CATEGORY Category) = 0; + + virtual BOOL STDMETHODCALLTYPE GetBreakOnSeverity( + /* [annotation] */ + _In_ D3D11_MESSAGE_SEVERITY Severity) = 0; + + virtual BOOL STDMETHODCALLTYPE GetBreakOnID( + /* [annotation] */ + _In_ D3D11_MESSAGE_ID ID) = 0; + + virtual void STDMETHODCALLTYPE SetMuteDebugOutput( + /* [annotation] */ + _In_ BOOL bMute) = 0; + + virtual BOOL STDMETHODCALLTYPE GetMuteDebugOutput( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11InfoQueueVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11InfoQueue * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11InfoQueue * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *SetMessageCountLimit )( + ID3D11InfoQueue * This, + /* [annotation] */ + _In_ UINT64 MessageCountLimit); + + void ( STDMETHODCALLTYPE *ClearStoredMessages )( + ID3D11InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *GetMessage )( + ID3D11InfoQueue * This, + /* [annotation] */ + _In_ UINT64 MessageIndex, + /* [annotation] */ + _Out_writes_bytes_opt_(*pMessageByteLength) D3D11_MESSAGE *pMessage, + /* [annotation] */ + _Inout_ SIZE_T *pMessageByteLength); + + UINT64 ( STDMETHODCALLTYPE *GetNumMessagesAllowedByStorageFilter )( + ID3D11InfoQueue * This); + + UINT64 ( STDMETHODCALLTYPE *GetNumMessagesDeniedByStorageFilter )( + ID3D11InfoQueue * This); + + UINT64 ( STDMETHODCALLTYPE *GetNumStoredMessages )( + ID3D11InfoQueue * This); + + UINT64 ( STDMETHODCALLTYPE *GetNumStoredMessagesAllowedByRetrievalFilter )( + ID3D11InfoQueue * This); + + UINT64 ( STDMETHODCALLTYPE *GetNumMessagesDiscardedByMessageCountLimit )( + ID3D11InfoQueue * This); + + UINT64 ( STDMETHODCALLTYPE *GetMessageCountLimit )( + ID3D11InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *AddStorageFilterEntries )( + ID3D11InfoQueue * This, + /* [annotation] */ + _In_ D3D11_INFO_QUEUE_FILTER *pFilter); + + HRESULT ( STDMETHODCALLTYPE *GetStorageFilter )( + ID3D11InfoQueue * This, + /* [annotation] */ + _Out_writes_bytes_opt_(*pFilterByteLength) D3D11_INFO_QUEUE_FILTER *pFilter, + /* [annotation] */ + _Inout_ SIZE_T *pFilterByteLength); + + void ( STDMETHODCALLTYPE *ClearStorageFilter )( + ID3D11InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *PushEmptyStorageFilter )( + ID3D11InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *PushCopyOfStorageFilter )( + ID3D11InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *PushStorageFilter )( + ID3D11InfoQueue * This, + /* [annotation] */ + _In_ D3D11_INFO_QUEUE_FILTER *pFilter); + + void ( STDMETHODCALLTYPE *PopStorageFilter )( + ID3D11InfoQueue * This); + + UINT ( STDMETHODCALLTYPE *GetStorageFilterStackSize )( + ID3D11InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *AddRetrievalFilterEntries )( + ID3D11InfoQueue * This, + /* [annotation] */ + _In_ D3D11_INFO_QUEUE_FILTER *pFilter); + + HRESULT ( STDMETHODCALLTYPE *GetRetrievalFilter )( + ID3D11InfoQueue * This, + /* [annotation] */ + _Out_writes_bytes_opt_(*pFilterByteLength) D3D11_INFO_QUEUE_FILTER *pFilter, + /* [annotation] */ + _Inout_ SIZE_T *pFilterByteLength); + + void ( STDMETHODCALLTYPE *ClearRetrievalFilter )( + ID3D11InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *PushEmptyRetrievalFilter )( + ID3D11InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *PushCopyOfRetrievalFilter )( + ID3D11InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *PushRetrievalFilter )( + ID3D11InfoQueue * This, + /* [annotation] */ + _In_ D3D11_INFO_QUEUE_FILTER *pFilter); + + void ( STDMETHODCALLTYPE *PopRetrievalFilter )( + ID3D11InfoQueue * This); + + UINT ( STDMETHODCALLTYPE *GetRetrievalFilterStackSize )( + ID3D11InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *AddMessage )( + ID3D11InfoQueue * This, + /* [annotation] */ + _In_ D3D11_MESSAGE_CATEGORY Category, + /* [annotation] */ + _In_ D3D11_MESSAGE_SEVERITY Severity, + /* [annotation] */ + _In_ D3D11_MESSAGE_ID ID, + /* [annotation] */ + _In_ LPCSTR pDescription); + + HRESULT ( STDMETHODCALLTYPE *AddApplicationMessage )( + ID3D11InfoQueue * This, + /* [annotation] */ + _In_ D3D11_MESSAGE_SEVERITY Severity, + /* [annotation] */ + _In_ LPCSTR pDescription); + + HRESULT ( STDMETHODCALLTYPE *SetBreakOnCategory )( + ID3D11InfoQueue * This, + /* [annotation] */ + _In_ D3D11_MESSAGE_CATEGORY Category, + /* [annotation] */ + _In_ BOOL bEnable); + + HRESULT ( STDMETHODCALLTYPE *SetBreakOnSeverity )( + ID3D11InfoQueue * This, + /* [annotation] */ + _In_ D3D11_MESSAGE_SEVERITY Severity, + /* [annotation] */ + _In_ BOOL bEnable); + + HRESULT ( STDMETHODCALLTYPE *SetBreakOnID )( + ID3D11InfoQueue * This, + /* [annotation] */ + _In_ D3D11_MESSAGE_ID ID, + /* [annotation] */ + _In_ BOOL bEnable); + + BOOL ( STDMETHODCALLTYPE *GetBreakOnCategory )( + ID3D11InfoQueue * This, + /* [annotation] */ + _In_ D3D11_MESSAGE_CATEGORY Category); + + BOOL ( STDMETHODCALLTYPE *GetBreakOnSeverity )( + ID3D11InfoQueue * This, + /* [annotation] */ + _In_ D3D11_MESSAGE_SEVERITY Severity); + + BOOL ( STDMETHODCALLTYPE *GetBreakOnID )( + ID3D11InfoQueue * This, + /* [annotation] */ + _In_ D3D11_MESSAGE_ID ID); + + void ( STDMETHODCALLTYPE *SetMuteDebugOutput )( + ID3D11InfoQueue * This, + /* [annotation] */ + _In_ BOOL bMute); + + BOOL ( STDMETHODCALLTYPE *GetMuteDebugOutput )( + ID3D11InfoQueue * This); + + END_INTERFACE + } ID3D11InfoQueueVtbl; + + interface ID3D11InfoQueue + { + CONST_VTBL struct ID3D11InfoQueueVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11InfoQueue_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11InfoQueue_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11InfoQueue_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11InfoQueue_SetMessageCountLimit(This,MessageCountLimit) \ + ( (This)->lpVtbl -> SetMessageCountLimit(This,MessageCountLimit) ) + +#define ID3D11InfoQueue_ClearStoredMessages(This) \ + ( (This)->lpVtbl -> ClearStoredMessages(This) ) + +#define ID3D11InfoQueue_GetMessage(This,MessageIndex,pMessage,pMessageByteLength) \ + ( (This)->lpVtbl -> GetMessage(This,MessageIndex,pMessage,pMessageByteLength) ) + +#define ID3D11InfoQueue_GetNumMessagesAllowedByStorageFilter(This) \ + ( (This)->lpVtbl -> GetNumMessagesAllowedByStorageFilter(This) ) + +#define ID3D11InfoQueue_GetNumMessagesDeniedByStorageFilter(This) \ + ( (This)->lpVtbl -> GetNumMessagesDeniedByStorageFilter(This) ) + +#define ID3D11InfoQueue_GetNumStoredMessages(This) \ + ( (This)->lpVtbl -> GetNumStoredMessages(This) ) + +#define ID3D11InfoQueue_GetNumStoredMessagesAllowedByRetrievalFilter(This) \ + ( (This)->lpVtbl -> GetNumStoredMessagesAllowedByRetrievalFilter(This) ) + +#define ID3D11InfoQueue_GetNumMessagesDiscardedByMessageCountLimit(This) \ + ( (This)->lpVtbl -> GetNumMessagesDiscardedByMessageCountLimit(This) ) + +#define ID3D11InfoQueue_GetMessageCountLimit(This) \ + ( (This)->lpVtbl -> GetMessageCountLimit(This) ) + +#define ID3D11InfoQueue_AddStorageFilterEntries(This,pFilter) \ + ( (This)->lpVtbl -> AddStorageFilterEntries(This,pFilter) ) + +#define ID3D11InfoQueue_GetStorageFilter(This,pFilter,pFilterByteLength) \ + ( (This)->lpVtbl -> GetStorageFilter(This,pFilter,pFilterByteLength) ) + +#define ID3D11InfoQueue_ClearStorageFilter(This) \ + ( (This)->lpVtbl -> ClearStorageFilter(This) ) + +#define ID3D11InfoQueue_PushEmptyStorageFilter(This) \ + ( (This)->lpVtbl -> PushEmptyStorageFilter(This) ) + +#define ID3D11InfoQueue_PushCopyOfStorageFilter(This) \ + ( (This)->lpVtbl -> PushCopyOfStorageFilter(This) ) + +#define ID3D11InfoQueue_PushStorageFilter(This,pFilter) \ + ( (This)->lpVtbl -> PushStorageFilter(This,pFilter) ) + +#define ID3D11InfoQueue_PopStorageFilter(This) \ + ( (This)->lpVtbl -> PopStorageFilter(This) ) + +#define ID3D11InfoQueue_GetStorageFilterStackSize(This) \ + ( (This)->lpVtbl -> GetStorageFilterStackSize(This) ) + +#define ID3D11InfoQueue_AddRetrievalFilterEntries(This,pFilter) \ + ( (This)->lpVtbl -> AddRetrievalFilterEntries(This,pFilter) ) + +#define ID3D11InfoQueue_GetRetrievalFilter(This,pFilter,pFilterByteLength) \ + ( (This)->lpVtbl -> GetRetrievalFilter(This,pFilter,pFilterByteLength) ) + +#define ID3D11InfoQueue_ClearRetrievalFilter(This) \ + ( (This)->lpVtbl -> ClearRetrievalFilter(This) ) + +#define ID3D11InfoQueue_PushEmptyRetrievalFilter(This) \ + ( (This)->lpVtbl -> PushEmptyRetrievalFilter(This) ) + +#define ID3D11InfoQueue_PushCopyOfRetrievalFilter(This) \ + ( (This)->lpVtbl -> PushCopyOfRetrievalFilter(This) ) + +#define ID3D11InfoQueue_PushRetrievalFilter(This,pFilter) \ + ( (This)->lpVtbl -> PushRetrievalFilter(This,pFilter) ) + +#define ID3D11InfoQueue_PopRetrievalFilter(This) \ + ( (This)->lpVtbl -> PopRetrievalFilter(This) ) + +#define ID3D11InfoQueue_GetRetrievalFilterStackSize(This) \ + ( (This)->lpVtbl -> GetRetrievalFilterStackSize(This) ) + +#define ID3D11InfoQueue_AddMessage(This,Category,Severity,ID,pDescription) \ + ( (This)->lpVtbl -> AddMessage(This,Category,Severity,ID,pDescription) ) + +#define ID3D11InfoQueue_AddApplicationMessage(This,Severity,pDescription) \ + ( (This)->lpVtbl -> AddApplicationMessage(This,Severity,pDescription) ) + +#define ID3D11InfoQueue_SetBreakOnCategory(This,Category,bEnable) \ + ( (This)->lpVtbl -> SetBreakOnCategory(This,Category,bEnable) ) + +#define ID3D11InfoQueue_SetBreakOnSeverity(This,Severity,bEnable) \ + ( (This)->lpVtbl -> SetBreakOnSeverity(This,Severity,bEnable) ) + +#define ID3D11InfoQueue_SetBreakOnID(This,ID,bEnable) \ + ( (This)->lpVtbl -> SetBreakOnID(This,ID,bEnable) ) + +#define ID3D11InfoQueue_GetBreakOnCategory(This,Category) \ + ( (This)->lpVtbl -> GetBreakOnCategory(This,Category) ) + +#define ID3D11InfoQueue_GetBreakOnSeverity(This,Severity) \ + ( (This)->lpVtbl -> GetBreakOnSeverity(This,Severity) ) + +#define ID3D11InfoQueue_GetBreakOnID(This,ID) \ + ( (This)->lpVtbl -> GetBreakOnID(This,ID) ) + +#define ID3D11InfoQueue_SetMuteDebugOutput(This,bMute) \ + ( (This)->lpVtbl -> SetMuteDebugOutput(This,bMute) ) + +#define ID3D11InfoQueue_GetMuteDebugOutput(This) \ + ( (This)->lpVtbl -> GetMuteDebugOutput(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11InfoQueue_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11sdklayers_0000_0006 */ +/* [local] */ + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ +/*#pragma endregion*/ +DEFINE_GUID(IID_ID3D11Debug,0x79cf2233,0x7536,0x4948,0x9d,0x36,0x1e,0x46,0x92,0xdc,0x57,0x60); +DEFINE_GUID(IID_ID3D11SwitchToRef,0x1ef337e3,0x58e7,0x4f83,0xa6,0x92,0xdb,0x22,0x1f,0x5e,0xd4,0x7e); +DEFINE_GUID(IID_ID3D11TracingDevice,0x1911c771,0x1587,0x413e,0xa7,0xe0,0xfb,0x26,0xc3,0xde,0x02,0x68); +DEFINE_GUID(IID_ID3D11RefTrackingOptions,0x193dacdf,0x0db2,0x4c05,0xa5,0x5c,0xef,0x06,0xca,0xc5,0x6f,0xd9); +DEFINE_GUID(IID_ID3D11RefDefaultTrackingOptions,0x03916615,0xc644,0x418c,0x9b,0xf4,0x75,0xdb,0x5b,0xe6,0x3c,0xa0); +DEFINE_GUID(IID_ID3D11InfoQueue,0x6543dbb6,0x1b48,0x42f5,0xab,0x82,0xe9,0x7e,0xc7,0x43,0x26,0xf6); + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0006_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0006_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/d3d11shader.h b/gfx/include/dxsdk/d3d11shader.h new file mode 100644 index 0000000000..84c36cf64c --- /dev/null +++ b/gfx/include/dxsdk/d3d11shader.h @@ -0,0 +1,601 @@ +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// File: D3D11Shader.h +// Content: D3D11 Shader Types and APIs +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef __D3D11SHADER_H__ +#define __D3D11SHADER_H__ + +#include "d3dcommon.h" + + +typedef enum D3D11_SHADER_VERSION_TYPE +{ + D3D11_SHVER_PIXEL_SHADER = 0, + D3D11_SHVER_VERTEX_SHADER = 1, + D3D11_SHVER_GEOMETRY_SHADER = 2, + + // D3D11 Shaders + D3D11_SHVER_HULL_SHADER = 3, + D3D11_SHVER_DOMAIN_SHADER = 4, + D3D11_SHVER_COMPUTE_SHADER = 5, + + D3D11_SHVER_RESERVED0 = 0xFFF0, +} D3D11_SHADER_VERSION_TYPE; + +#define D3D11_SHVER_GET_TYPE(_Version) \ + (((_Version) >> 16) & 0xffff) +#define D3D11_SHVER_GET_MAJOR(_Version) \ + (((_Version) >> 4) & 0xf) +#define D3D11_SHVER_GET_MINOR(_Version) \ + (((_Version) >> 0) & 0xf) + +// Slot ID for library function return +#define D3D_RETURN_PARAMETER_INDEX (-1) + +typedef D3D_RESOURCE_RETURN_TYPE D3D11_RESOURCE_RETURN_TYPE; + +typedef D3D_CBUFFER_TYPE D3D11_CBUFFER_TYPE; + + +typedef struct _D3D11_SIGNATURE_PARAMETER_DESC +{ + LPCSTR SemanticName; // Name of the semantic + UINT SemanticIndex; // Index of the semantic + UINT Register; // Number of member variables + D3D_NAME SystemValueType;// A predefined system value, or D3D_NAME_UNDEFINED if not applicable + D3D_REGISTER_COMPONENT_TYPE ComponentType; // Scalar type (e.g. uint, float, etc.) + BYTE Mask; // Mask to indicate which components of the register + // are used (combination of D3D10_COMPONENT_MASK values) + BYTE ReadWriteMask; // Mask to indicate whether a given component is + // never written (if this is an output signature) or + // always read (if this is an input signature). + // (combination of D3D_MASK_* values) + UINT Stream; // Stream index + D3D_MIN_PRECISION MinPrecision; // Minimum desired interpolation precision +} D3D11_SIGNATURE_PARAMETER_DESC; + +typedef struct _D3D11_SHADER_BUFFER_DESC +{ + LPCSTR Name; // Name of the constant buffer + D3D_CBUFFER_TYPE Type; // Indicates type of buffer content + UINT Variables; // Number of member variables + UINT Size; // Size of CB (in bytes) + UINT uFlags; // Buffer description flags +} D3D11_SHADER_BUFFER_DESC; + +typedef struct _D3D11_SHADER_VARIABLE_DESC +{ + LPCSTR Name; // Name of the variable + UINT StartOffset; // Offset in constant buffer's backing store + UINT Size; // Size of variable (in bytes) + UINT uFlags; // Variable flags + LPVOID DefaultValue; // Raw pointer to default value + UINT StartTexture; // First texture index (or -1 if no textures used) + UINT TextureSize; // Number of texture slots possibly used. + UINT StartSampler; // First sampler index (or -1 if no textures used) + UINT SamplerSize; // Number of sampler slots possibly used. +} D3D11_SHADER_VARIABLE_DESC; + +typedef struct _D3D11_SHADER_TYPE_DESC +{ + D3D_SHADER_VARIABLE_CLASS Class; // Variable class (e.g. object, matrix, etc.) + D3D_SHADER_VARIABLE_TYPE Type; // Variable type (e.g. float, sampler, etc.) + UINT Rows; // Number of rows (for matrices, 1 for other numeric, 0 if not applicable) + UINT Columns; // Number of columns (for vectors & matrices, 1 for other numeric, 0 if not applicable) + UINT Elements; // Number of elements (0 if not an array) + UINT Members; // Number of members (0 if not a structure) + UINT Offset; // Offset from the start of structure (0 if not a structure member) + LPCSTR Name; // Name of type, can be NULL +} D3D11_SHADER_TYPE_DESC; + +typedef D3D_TESSELLATOR_DOMAIN D3D11_TESSELLATOR_DOMAIN; + +typedef D3D_TESSELLATOR_PARTITIONING D3D11_TESSELLATOR_PARTITIONING; + +typedef D3D_TESSELLATOR_OUTPUT_PRIMITIVE D3D11_TESSELLATOR_OUTPUT_PRIMITIVE; + +typedef struct _D3D11_SHADER_DESC +{ + UINT Version; // Shader version + LPCSTR Creator; // Creator string + UINT Flags; // Shader compilation/parse flags + + UINT ConstantBuffers; // Number of constant buffers + UINT BoundResources; // Number of bound resources + UINT InputParameters; // Number of parameters in the input signature + UINT OutputParameters; // Number of parameters in the output signature + + UINT InstructionCount; // Number of emitted instructions + UINT TempRegisterCount; // Number of temporary registers used + UINT TempArrayCount; // Number of temporary arrays used + UINT DefCount; // Number of constant defines + UINT DclCount; // Number of declarations (input + output) + UINT TextureNormalInstructions; // Number of non-categorized texture instructions + UINT TextureLoadInstructions; // Number of texture load instructions + UINT TextureCompInstructions; // Number of texture comparison instructions + UINT TextureBiasInstructions; // Number of texture bias instructions + UINT TextureGradientInstructions; // Number of texture gradient instructions + UINT FloatInstructionCount; // Number of floating point arithmetic instructions used + UINT IntInstructionCount; // Number of signed integer arithmetic instructions used + UINT UintInstructionCount; // Number of unsigned integer arithmetic instructions used + UINT StaticFlowControlCount; // Number of static flow control instructions used + UINT DynamicFlowControlCount; // Number of dynamic flow control instructions used + UINT MacroInstructionCount; // Number of macro instructions used + UINT ArrayInstructionCount; // Number of array instructions used + UINT CutInstructionCount; // Number of cut instructions used + UINT EmitInstructionCount; // Number of emit instructions used + D3D_PRIMITIVE_TOPOLOGY GSOutputTopology; // Geometry shader output topology + UINT GSMaxOutputVertexCount; // Geometry shader maximum output vertex count + D3D_PRIMITIVE InputPrimitive; // GS/HS input primitive + UINT PatchConstantParameters; // Number of parameters in the patch constant signature + UINT cGSInstanceCount; // Number of Geometry shader instances + UINT cControlPoints; // Number of control points in the HS->DS stage + D3D_TESSELLATOR_OUTPUT_PRIMITIVE HSOutputPrimitive; // Primitive output by the tessellator + D3D_TESSELLATOR_PARTITIONING HSPartitioning; // Partitioning mode of the tessellator + D3D_TESSELLATOR_DOMAIN TessellatorDomain; // Domain of the tessellator (quad, tri, isoline) + // instruction counts + UINT cBarrierInstructions; // Number of barrier instructions in a compute shader + UINT cInterlockedInstructions; // Number of interlocked instructions + UINT cTextureStoreInstructions; // Number of texture writes +} D3D11_SHADER_DESC; + +typedef struct _D3D11_SHADER_INPUT_BIND_DESC +{ + LPCSTR Name; // Name of the resource + D3D_SHADER_INPUT_TYPE Type; // Type of resource (e.g. texture, cbuffer, etc.) + UINT BindPoint; // Starting bind point + UINT BindCount; // Number of contiguous bind points (for arrays) + + UINT uFlags; // Input binding flags + D3D_RESOURCE_RETURN_TYPE ReturnType; // Return type (if texture) + D3D_SRV_DIMENSION Dimension; // Dimension (if texture) + UINT NumSamples; // Number of samples (0 if not MS texture) +} D3D11_SHADER_INPUT_BIND_DESC; + +#define D3D_SHADER_REQUIRES_DOUBLES 0x00000001 +#define D3D_SHADER_REQUIRES_EARLY_DEPTH_STENCIL 0x00000002 +#define D3D_SHADER_REQUIRES_UAVS_AT_EVERY_STAGE 0x00000004 +#define D3D_SHADER_REQUIRES_64_UAVS 0x00000008 +#define D3D_SHADER_REQUIRES_MINIMUM_PRECISION 0x00000010 +#define D3D_SHADER_REQUIRES_11_1_DOUBLE_EXTENSIONS 0x00000020 +#define D3D_SHADER_REQUIRES_11_1_SHADER_EXTENSIONS 0x00000040 +#define D3D_SHADER_REQUIRES_LEVEL_9_COMPARISON_FILTERING 0x00000080 +#define D3D_SHADER_REQUIRES_TILED_RESOURCES 0x00000100 + + +typedef struct _D3D11_LIBRARY_DESC +{ + LPCSTR Creator; // The name of the originator of the library. + UINT Flags; // Compilation flags. + UINT FunctionCount; // Number of functions exported from the library. +} D3D11_LIBRARY_DESC; + +typedef struct _D3D11_FUNCTION_DESC +{ + UINT Version; // Shader version + LPCSTR Creator; // Creator string + UINT Flags; // Shader compilation/parse flags + + UINT ConstantBuffers; // Number of constant buffers + UINT BoundResources; // Number of bound resources + + UINT InstructionCount; // Number of emitted instructions + UINT TempRegisterCount; // Number of temporary registers used + UINT TempArrayCount; // Number of temporary arrays used + UINT DefCount; // Number of constant defines + UINT DclCount; // Number of declarations (input + output) + UINT TextureNormalInstructions; // Number of non-categorized texture instructions + UINT TextureLoadInstructions; // Number of texture load instructions + UINT TextureCompInstructions; // Number of texture comparison instructions + UINT TextureBiasInstructions; // Number of texture bias instructions + UINT TextureGradientInstructions; // Number of texture gradient instructions + UINT FloatInstructionCount; // Number of floating point arithmetic instructions used + UINT IntInstructionCount; // Number of signed integer arithmetic instructions used + UINT UintInstructionCount; // Number of unsigned integer arithmetic instructions used + UINT StaticFlowControlCount; // Number of static flow control instructions used + UINT DynamicFlowControlCount; // Number of dynamic flow control instructions used + UINT MacroInstructionCount; // Number of macro instructions used + UINT ArrayInstructionCount; // Number of array instructions used + UINT MovInstructionCount; // Number of mov instructions used + UINT MovcInstructionCount; // Number of movc instructions used + UINT ConversionInstructionCount; // Number of type conversion instructions used + UINT BitwiseInstructionCount; // Number of bitwise arithmetic instructions used + D3D_FEATURE_LEVEL MinFeatureLevel; // Min target of the function byte code + UINT64 RequiredFeatureFlags; // Required feature flags + + LPCSTR Name; // Function name + INT FunctionParameterCount; // Number of logical parameters in the function signature (not including return) + BOOL HasReturn; // TRUE, if function returns a value, false - it is a subroutine + BOOL Has10Level9VertexShader; // TRUE, if there is a 10L9 VS blob + BOOL Has10Level9PixelShader; // TRUE, if there is a 10L9 PS blob +} D3D11_FUNCTION_DESC; + +typedef struct _D3D11_PARAMETER_DESC +{ + LPCSTR Name; // Parameter name. + LPCSTR SemanticName; // Parameter semantic name (+index). + D3D_SHADER_VARIABLE_TYPE Type; // Element type. + D3D_SHADER_VARIABLE_CLASS Class; // Scalar/Vector/Matrix. + UINT Rows; // Rows are for matrix parameters. + UINT Columns; // Components or Columns in matrix. + D3D_INTERPOLATION_MODE InterpolationMode; // Interpolation mode. + D3D_PARAMETER_FLAGS Flags; // Parameter modifiers. + + UINT FirstInRegister; // The first input register for this parameter. + UINT FirstInComponent; // The first input register component for this parameter. + UINT FirstOutRegister; // The first output register for this parameter. + UINT FirstOutComponent; // The first output register component for this parameter. +} D3D11_PARAMETER_DESC; + + +////////////////////////////////////////////////////////////////////////////// +// Interfaces //////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +typedef interface ID3D11ShaderReflectionType ID3D11ShaderReflectionType; +typedef interface ID3D11ShaderReflectionType *LPD3D11SHADERREFLECTIONTYPE; + +typedef interface ID3D11ShaderReflectionVariable ID3D11ShaderReflectionVariable; +typedef interface ID3D11ShaderReflectionVariable *LPD3D11SHADERREFLECTIONVARIABLE; + +typedef interface ID3D11ShaderReflectionConstantBuffer ID3D11ShaderReflectionConstantBuffer; +typedef interface ID3D11ShaderReflectionConstantBuffer *LPD3D11SHADERREFLECTIONCONSTANTBUFFER; + +typedef interface ID3D11ShaderReflection ID3D11ShaderReflection; +typedef interface ID3D11ShaderReflection *LPD3D11SHADERREFLECTION; + +typedef interface ID3D11LibraryReflection ID3D11LibraryReflection; +typedef interface ID3D11LibraryReflection *LPD3D11LIBRARYREFLECTION; + +typedef interface ID3D11FunctionReflection ID3D11FunctionReflection; +typedef interface ID3D11FunctionReflection *LPD3D11FUNCTIONREFLECTION; + +typedef interface ID3D11FunctionParameterReflection ID3D11FunctionParameterReflection; +typedef interface ID3D11FunctionParameterReflection *LPD3D11FUNCTIONPARAMETERREFLECTION; + +// {6E6FFA6A-9BAE-4613-A51E-91652D508C21} +interface DECLSPEC_UUID("6E6FFA6A-9BAE-4613-A51E-91652D508C21") ID3D11ShaderReflectionType; +DEFINE_GUID(IID_ID3D11ShaderReflectionType, +0x6e6ffa6a, 0x9bae, 0x4613, 0xa5, 0x1e, 0x91, 0x65, 0x2d, 0x50, 0x8c, 0x21); + +#undef INTERFACE +#define INTERFACE ID3D11ShaderReflectionType + +DECLARE_INTERFACE(ID3D11ShaderReflectionType) +{ + STDMETHOD(GetDesc)(THIS_ _Out_ D3D11_SHADER_TYPE_DESC *pDesc) PURE; + + STDMETHOD_(ID3D11ShaderReflectionType*, GetMemberTypeByIndex)(THIS_ _In_ UINT Index) PURE; + STDMETHOD_(ID3D11ShaderReflectionType*, GetMemberTypeByName)(THIS_ _In_ LPCSTR Name) PURE; + STDMETHOD_(LPCSTR, GetMemberTypeName)(THIS_ _In_ UINT Index) PURE; + + STDMETHOD(IsEqual)(THIS_ _In_ ID3D11ShaderReflectionType* pType) PURE; + STDMETHOD_(ID3D11ShaderReflectionType*, GetSubType)(THIS) PURE; + STDMETHOD_(ID3D11ShaderReflectionType*, GetBaseClass)(THIS) PURE; + STDMETHOD_(UINT, GetNumInterfaces)(THIS) PURE; + STDMETHOD_(ID3D11ShaderReflectionType*, GetInterfaceByIndex)(THIS_ _In_ UINT uIndex) PURE; + STDMETHOD(IsOfType)(THIS_ _In_ ID3D11ShaderReflectionType* pType) PURE; + STDMETHOD(ImplementsInterface)(THIS_ _In_ ID3D11ShaderReflectionType* pBase) PURE; +}; + +// {51F23923-F3E5-4BD1-91CB-606177D8DB4C} +interface DECLSPEC_UUID("51F23923-F3E5-4BD1-91CB-606177D8DB4C") ID3D11ShaderReflectionVariable; +DEFINE_GUID(IID_ID3D11ShaderReflectionVariable, +0x51f23923, 0xf3e5, 0x4bd1, 0x91, 0xcb, 0x60, 0x61, 0x77, 0xd8, 0xdb, 0x4c); + +#undef INTERFACE +#define INTERFACE ID3D11ShaderReflectionVariable + +DECLARE_INTERFACE(ID3D11ShaderReflectionVariable) +{ + STDMETHOD(GetDesc)(THIS_ _Out_ D3D11_SHADER_VARIABLE_DESC *pDesc) PURE; + + STDMETHOD_(ID3D11ShaderReflectionType*, GetType)(THIS) PURE; + STDMETHOD_(ID3D11ShaderReflectionConstantBuffer*, GetBuffer)(THIS) PURE; + + STDMETHOD_(UINT, GetInterfaceSlot)(THIS_ _In_ UINT uArrayIndex) PURE; +}; + +// {EB62D63D-93DD-4318-8AE8-C6F83AD371B8} +interface DECLSPEC_UUID("EB62D63D-93DD-4318-8AE8-C6F83AD371B8") ID3D11ShaderReflectionConstantBuffer; +DEFINE_GUID(IID_ID3D11ShaderReflectionConstantBuffer, +0xeb62d63d, 0x93dd, 0x4318, 0x8a, 0xe8, 0xc6, 0xf8, 0x3a, 0xd3, 0x71, 0xb8); + +#undef INTERFACE +#define INTERFACE ID3D11ShaderReflectionConstantBuffer + +DECLARE_INTERFACE(ID3D11ShaderReflectionConstantBuffer) +{ + STDMETHOD(GetDesc)(THIS_ D3D11_SHADER_BUFFER_DESC *pDesc) PURE; + + STDMETHOD_(ID3D11ShaderReflectionVariable*, GetVariableByIndex)(THIS_ _In_ UINT Index) PURE; + STDMETHOD_(ID3D11ShaderReflectionVariable*, GetVariableByName)(THIS_ _In_ LPCSTR Name) PURE; +}; + +// The ID3D11ShaderReflection IID may change from SDK version to SDK version +// if the reflection API changes. This prevents new code with the new API +// from working with an old binary. Recompiling with the new header +// will pick up the new IID. + +// 8d536ca1-0cca-4956-a837-786963755584 +interface DECLSPEC_UUID("8d536ca1-0cca-4956-a837-786963755584") ID3D11ShaderReflection; +DEFINE_GUID(IID_ID3D11ShaderReflection, +0x8d536ca1, 0x0cca, 0x4956, 0xa8, 0x37, 0x78, 0x69, 0x63, 0x75, 0x55, 0x84); + +#undef INTERFACE +#define INTERFACE ID3D11ShaderReflection + +DECLARE_INTERFACE_(ID3D11ShaderReflection, IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ _In_ REFIID iid, + _Out_ LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + STDMETHOD(GetDesc)(THIS_ _Out_ D3D11_SHADER_DESC *pDesc) PURE; + + STDMETHOD_(ID3D11ShaderReflectionConstantBuffer*, GetConstantBufferByIndex)(THIS_ _In_ UINT Index) PURE; + STDMETHOD_(ID3D11ShaderReflectionConstantBuffer*, GetConstantBufferByName)(THIS_ _In_ LPCSTR Name) PURE; + + STDMETHOD(GetResourceBindingDesc)(THIS_ _In_ UINT ResourceIndex, + _Out_ D3D11_SHADER_INPUT_BIND_DESC *pDesc) PURE; + + STDMETHOD(GetInputParameterDesc)(THIS_ _In_ UINT ParameterIndex, + _Out_ D3D11_SIGNATURE_PARAMETER_DESC *pDesc) PURE; + STDMETHOD(GetOutputParameterDesc)(THIS_ _In_ UINT ParameterIndex, + _Out_ D3D11_SIGNATURE_PARAMETER_DESC *pDesc) PURE; + STDMETHOD(GetPatchConstantParameterDesc)(THIS_ _In_ UINT ParameterIndex, + _Out_ D3D11_SIGNATURE_PARAMETER_DESC *pDesc) PURE; + + STDMETHOD_(ID3D11ShaderReflectionVariable*, GetVariableByName)(THIS_ _In_ LPCSTR Name) PURE; + + STDMETHOD(GetResourceBindingDescByName)(THIS_ _In_ LPCSTR Name, + _Out_ D3D11_SHADER_INPUT_BIND_DESC *pDesc) PURE; + + STDMETHOD_(UINT, GetMovInstructionCount)(THIS) PURE; + STDMETHOD_(UINT, GetMovcInstructionCount)(THIS) PURE; + STDMETHOD_(UINT, GetConversionInstructionCount)(THIS) PURE; + STDMETHOD_(UINT, GetBitwiseInstructionCount)(THIS) PURE; + + STDMETHOD_(D3D_PRIMITIVE, GetGSInputPrimitive)(THIS) PURE; + STDMETHOD_(BOOL, IsSampleFrequencyShader)(THIS) PURE; + + STDMETHOD_(UINT, GetNumInterfaceSlots)(THIS) PURE; + STDMETHOD(GetMinFeatureLevel)(THIS_ _Out_ enum D3D_FEATURE_LEVEL* pLevel) PURE; + + STDMETHOD_(UINT, GetThreadGroupSize)(THIS_ + _Out_opt_ UINT* pSizeX, + _Out_opt_ UINT* pSizeY, + _Out_opt_ UINT* pSizeZ) PURE; + + STDMETHOD_(UINT64, GetRequiresFlags)(THIS) PURE; +}; + +// {54384F1B-5B3E-4BB7-AE01-60BA3097CBB6} +interface DECLSPEC_UUID("54384F1B-5B3E-4BB7-AE01-60BA3097CBB6") ID3D11LibraryReflection; +DEFINE_GUID(IID_ID3D11LibraryReflection, +0x54384f1b, 0x5b3e, 0x4bb7, 0xae, 0x1, 0x60, 0xba, 0x30, 0x97, 0xcb, 0xb6); + +#undef INTERFACE +#define INTERFACE ID3D11LibraryReflection + +DECLARE_INTERFACE_(ID3D11LibraryReflection, IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ _In_ REFIID iid, _Out_ LPVOID * ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + STDMETHOD(GetDesc)(THIS_ _Out_ D3D11_LIBRARY_DESC * pDesc) PURE; + + STDMETHOD_(ID3D11FunctionReflection *, GetFunctionByIndex)(THIS_ _In_ INT FunctionIndex) PURE; +}; + +// {207BCECB-D683-4A06-A8A3-9B149B9F73A4} +interface DECLSPEC_UUID("207BCECB-D683-4A06-A8A3-9B149B9F73A4") ID3D11FunctionReflection; +DEFINE_GUID(IID_ID3D11FunctionReflection, +0x207bcecb, 0xd683, 0x4a06, 0xa8, 0xa3, 0x9b, 0x14, 0x9b, 0x9f, 0x73, 0xa4); + +#undef INTERFACE +#define INTERFACE ID3D11FunctionReflection + +DECLARE_INTERFACE(ID3D11FunctionReflection) +{ + STDMETHOD(GetDesc)(THIS_ _Out_ D3D11_FUNCTION_DESC * pDesc) PURE; + + STDMETHOD_(ID3D11ShaderReflectionConstantBuffer *, GetConstantBufferByIndex)(THIS_ _In_ UINT BufferIndex) PURE; + STDMETHOD_(ID3D11ShaderReflectionConstantBuffer *, GetConstantBufferByName)(THIS_ _In_ LPCSTR Name) PURE; + + STDMETHOD(GetResourceBindingDesc)(THIS_ _In_ UINT ResourceIndex, + _Out_ D3D11_SHADER_INPUT_BIND_DESC * pDesc) PURE; + + STDMETHOD_(ID3D11ShaderReflectionVariable *, GetVariableByName)(THIS_ _In_ LPCSTR Name) PURE; + + STDMETHOD(GetResourceBindingDescByName)(THIS_ _In_ LPCSTR Name, + _Out_ D3D11_SHADER_INPUT_BIND_DESC * pDesc) PURE; + + // Use D3D_RETURN_PARAMETER_INDEX to get description of the return value. + STDMETHOD_(ID3D11FunctionParameterReflection *, GetFunctionParameter)(THIS_ _In_ INT ParameterIndex) PURE; +}; + +// {42757488-334F-47FE-982E-1A65D08CC462} +interface DECLSPEC_UUID("42757488-334F-47FE-982E-1A65D08CC462") ID3D11FunctionParameterReflection; +DEFINE_GUID(IID_ID3D11FunctionParameterReflection, +0x42757488, 0x334f, 0x47fe, 0x98, 0x2e, 0x1a, 0x65, 0xd0, 0x8c, 0xc4, 0x62); + +#undef INTERFACE +#define INTERFACE ID3D11FunctionParameterReflection + +DECLARE_INTERFACE(ID3D11FunctionParameterReflection) +{ + STDMETHOD(GetDesc)(THIS_ _Out_ D3D11_PARAMETER_DESC * pDesc) PURE; +}; + +// {CAC701EE-80FC-4122-8242-10B39C8CEC34} +interface DECLSPEC_UUID("CAC701EE-80FC-4122-8242-10B39C8CEC34") ID3D11Module; +DEFINE_GUID(IID_ID3D11Module, +0xcac701ee, 0x80fc, 0x4122, 0x82, 0x42, 0x10, 0xb3, 0x9c, 0x8c, 0xec, 0x34); + +#undef INTERFACE +#define INTERFACE ID3D11Module + +DECLARE_INTERFACE_(ID3D11Module, IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ _In_ REFIID iid, _Out_ LPVOID * ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // Create an instance of a module for resource re-binding. + STDMETHOD(CreateInstance)(THIS_ _In_opt_ LPCSTR pNamespace, + _COM_Outptr_ interface ID3D11ModuleInstance ** ppModuleInstance) PURE; +}; + + +// {469E07F7-045A-48D5-AA12-68A478CDF75D} +interface DECLSPEC_UUID("469E07F7-045A-48D5-AA12-68A478CDF75D") ID3D11ModuleInstance; +DEFINE_GUID(IID_ID3D11ModuleInstance, +0x469e07f7, 0x45a, 0x48d5, 0xaa, 0x12, 0x68, 0xa4, 0x78, 0xcd, 0xf7, 0x5d); + +#undef INTERFACE +#define INTERFACE ID3D11ModuleInstance + +DECLARE_INTERFACE_(ID3D11ModuleInstance, IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ _In_ REFIID iid, _Out_ LPVOID * ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // + // Resource binding API. + // + STDMETHOD(BindConstantBuffer)(THIS_ _In_ UINT uSrcSlot, _In_ UINT uDstSlot, _In_ UINT cbDstOffset) PURE; + STDMETHOD(BindConstantBufferByName)(THIS_ _In_ LPCSTR pName, _In_ UINT uDstSlot, _In_ UINT cbDstOffset) PURE; + + STDMETHOD(BindResource)(THIS_ _In_ UINT uSrcSlot, _In_ UINT uDstSlot, _In_ UINT uCount) PURE; + STDMETHOD(BindResourceByName)(THIS_ _In_ LPCSTR pName, _In_ UINT uDstSlot, _In_ UINT uCount) PURE; + + STDMETHOD(BindSampler)(THIS_ _In_ UINT uSrcSlot, _In_ UINT uDstSlot, _In_ UINT uCount) PURE; + STDMETHOD(BindSamplerByName)(THIS_ _In_ LPCSTR pName, _In_ UINT uDstSlot, _In_ UINT uCount) PURE; + + STDMETHOD(BindUnorderedAccessView)(THIS_ _In_ UINT uSrcSlot, _In_ UINT uDstSlot, _In_ UINT uCount) PURE; + STDMETHOD(BindUnorderedAccessViewByName)(THIS_ _In_ LPCSTR pName, _In_ UINT uDstSlot, _In_ UINT uCount) PURE; + + STDMETHOD(BindResourceAsUnorderedAccessView)(THIS_ _In_ UINT uSrcSrvSlot, _In_ UINT uDstUavSlot, _In_ UINT uCount) PURE; + STDMETHOD(BindResourceAsUnorderedAccessViewByName)(THIS_ _In_ LPCSTR pSrvName, _In_ UINT uDstUavSlot, _In_ UINT uCount) PURE; +}; + + +// {59A6CD0E-E10D-4C1F-88C0-63ABA1DAF30E} +interface DECLSPEC_UUID("59A6CD0E-E10D-4C1F-88C0-63ABA1DAF30E") ID3D11Linker; +DEFINE_GUID(IID_ID3D11Linker, +0x59a6cd0e, 0xe10d, 0x4c1f, 0x88, 0xc0, 0x63, 0xab, 0xa1, 0xda, 0xf3, 0xe); + +#undef INTERFACE +#define INTERFACE ID3D11Linker + +DECLARE_INTERFACE_(ID3D11Linker, IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ _In_ REFIID iid, _Out_ LPVOID * ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // Link the shader and produce a shader blob suitable to D3D runtime. + STDMETHOD(Link)(THIS_ _In_ interface ID3D11ModuleInstance * pEntry, + _In_ LPCSTR pEntryName, + _In_ LPCSTR pTargetName, + _In_ UINT uFlags, + _COM_Outptr_ ID3DBlob ** ppShaderBlob, + _Always_(_Outptr_opt_result_maybenull_) ID3DBlob ** ppErrorBuffer) PURE; + + // Add an instance of a library module to be used for linking. + STDMETHOD(UseLibrary)(THIS_ _In_ interface ID3D11ModuleInstance * pLibraryMI) PURE; + + // Add a clip plane with the plane coefficients taken from a cbuffer entry for 10L9 shaders. + STDMETHOD(AddClipPlaneFromCBuffer)(THIS_ _In_ UINT uCBufferSlot, _In_ UINT uCBufferEntry) PURE; +}; + + +// {D80DD70C-8D2F-4751-94A1-03C79B3556DB} +interface DECLSPEC_UUID("D80DD70C-8D2F-4751-94A1-03C79B3556DB") ID3D11LinkingNode; +DEFINE_GUID(IID_ID3D11LinkingNode, +0xd80dd70c, 0x8d2f, 0x4751, 0x94, 0xa1, 0x3, 0xc7, 0x9b, 0x35, 0x56, 0xdb); + +#undef INTERFACE +#define INTERFACE ID3D11LinkingNode + +DECLARE_INTERFACE_(ID3D11LinkingNode, IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ _In_ REFIID iid, _Out_ LPVOID * ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; +}; + + +// {54133220-1CE8-43D3-8236-9855C5CEECFF} +interface DECLSPEC_UUID("54133220-1CE8-43D3-8236-9855C5CEECFF") ID3D11FunctionLinkingGraph; +DEFINE_GUID(IID_ID3D11FunctionLinkingGraph, +0x54133220, 0x1ce8, 0x43d3, 0x82, 0x36, 0x98, 0x55, 0xc5, 0xce, 0xec, 0xff); + +#undef INTERFACE +#define INTERFACE ID3D11FunctionLinkingGraph + +DECLARE_INTERFACE_(ID3D11FunctionLinkingGraph, IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ _In_ REFIID iid, _Out_ LPVOID * ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // Create a shader module out of FLG description. + STDMETHOD(CreateModuleInstance)(THIS_ _COM_Outptr_ interface ID3D11ModuleInstance ** ppModuleInstance, + _Always_(_Outptr_opt_result_maybenull_) ID3DBlob ** ppErrorBuffer) PURE; + + STDMETHOD(SetInputSignature)(THIS_ __in_ecount(cInputParameters) const D3D11_PARAMETER_DESC * pInputParameters, + _In_ UINT cInputParameters, + _COM_Outptr_ interface ID3D11LinkingNode ** ppInputNode) PURE; + + STDMETHOD(SetOutputSignature)(THIS_ __in_ecount(cOutputParameters) const D3D11_PARAMETER_DESC * pOutputParameters, + _In_ UINT cOutputParameters, + _COM_Outptr_ interface ID3D11LinkingNode ** ppOutputNode) PURE; + + STDMETHOD(CallFunction)(THIS_ _In_opt_ LPCSTR pModuleInstanceNamespace, + _In_ interface ID3D11Module * pModuleWithFunctionPrototype, + _In_ LPCSTR pFunctionName, + _COM_Outptr_ interface ID3D11LinkingNode ** ppCallNode) PURE; + + STDMETHOD(PassValue)(THIS_ _In_ interface ID3D11LinkingNode * pSrcNode, + _In_ INT SrcParameterIndex, + _In_ interface ID3D11LinkingNode * pDstNode, + _In_ INT DstParameterIndex) PURE; + + STDMETHOD(PassValueWithSwizzle)(THIS_ _In_ interface ID3D11LinkingNode * pSrcNode, + _In_ INT SrcParameterIndex, + _In_ LPCSTR pSrcSwizzle, + _In_ interface ID3D11LinkingNode * pDstNode, + _In_ INT DstParameterIndex, + _In_ LPCSTR pDstSwizzle) PURE; + + STDMETHOD(GetLastError)(THIS_ _Always_(_Outptr_opt_result_maybenull_) ID3DBlob ** ppErrorBuffer) PURE; + + STDMETHOD(GenerateHlsl)(THIS_ _In_ UINT uFlags, // uFlags is reserved for future use. + _COM_Outptr_ ID3DBlob ** ppBuffer) PURE; +}; + + +////////////////////////////////////////////////////////////////////////////// +// APIs ////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + +#ifdef __cplusplus +} +#endif //__cplusplus + +#endif //__D3D11SHADER_H__ + diff --git a/gfx/include/dxsdk/d3d11shadertracing.h b/gfx/include/dxsdk/d3d11shadertracing.h new file mode 100644 index 0000000000..1291ec82f1 --- /dev/null +++ b/gfx/include/dxsdk/d3d11shadertracing.h @@ -0,0 +1,570 @@ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ +/* @@MIDL_FILE_HEADING( ) */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __d3d11ShaderTracing_h__ +#define __d3d11ShaderTracing_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __ID3D11ShaderTrace_FWD_DEFINED__ +#define __ID3D11ShaderTrace_FWD_DEFINED__ +typedef interface ID3D11ShaderTrace ID3D11ShaderTrace; + +#endif /* __ID3D11ShaderTrace_FWD_DEFINED__ */ + + +#ifndef __ID3D11ShaderTraceFactory_FWD_DEFINED__ +#define __ID3D11ShaderTraceFactory_FWD_DEFINED__ +typedef interface ID3D11ShaderTraceFactory ID3D11ShaderTraceFactory; + +#endif /* __ID3D11ShaderTraceFactory_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_d3d11ShaderTracing_0000_0000 */ +/* [local] */ + +typedef +enum D3D11_SHADER_TYPE + { + D3D11_VERTEX_SHADER = 1, + D3D11_HULL_SHADER = 2, + D3D11_DOMAIN_SHADER = 3, + D3D11_GEOMETRY_SHADER = 4, + D3D11_PIXEL_SHADER = 5, + D3D11_COMPUTE_SHADER = 6 + } D3D11_SHADER_TYPE; + +#define D3D11_TRACE_COMPONENT_X 0x1 +#define D3D11_TRACE_COMPONENT_Y 0x2 +#define D3D11_TRACE_COMPONENT_Z 0x4 +#define D3D11_TRACE_COMPONENT_W 0x8 +typedef UINT8 D3D11_TRACE_COMPONENT_MASK; + +typedef struct D3D11_VERTEX_SHADER_TRACE_DESC + { + UINT64 Invocation; + } D3D11_VERTEX_SHADER_TRACE_DESC; + +typedef struct D3D11_HULL_SHADER_TRACE_DESC + { + UINT64 Invocation; + } D3D11_HULL_SHADER_TRACE_DESC; + +typedef struct D3D11_DOMAIN_SHADER_TRACE_DESC + { + UINT64 Invocation; + } D3D11_DOMAIN_SHADER_TRACE_DESC; + +typedef struct D3D11_GEOMETRY_SHADER_TRACE_DESC + { + UINT64 Invocation; + } D3D11_GEOMETRY_SHADER_TRACE_DESC; + +typedef struct D3D11_PIXEL_SHADER_TRACE_DESC + { + UINT64 Invocation; + INT X; + INT Y; + UINT64 SampleMask; + } D3D11_PIXEL_SHADER_TRACE_DESC; + +typedef struct D3D11_COMPUTE_SHADER_TRACE_DESC + { + UINT64 Invocation; + UINT ThreadIDInGroup[ 3 ]; + UINT ThreadGroupID[ 3 ]; + } D3D11_COMPUTE_SHADER_TRACE_DESC; + +#define D3D11_SHADER_TRACE_FLAG_RECORD_REGISTER_WRITES 0x1 +#define D3D11_SHADER_TRACE_FLAG_RECORD_REGISTER_READS 0x2 +typedef struct D3D11_SHADER_TRACE_DESC + { + D3D11_SHADER_TYPE Type; + UINT Flags; + union + { + D3D11_VERTEX_SHADER_TRACE_DESC VertexShaderTraceDesc; + D3D11_HULL_SHADER_TRACE_DESC HullShaderTraceDesc; + D3D11_DOMAIN_SHADER_TRACE_DESC DomainShaderTraceDesc; + D3D11_GEOMETRY_SHADER_TRACE_DESC GeometryShaderTraceDesc; + D3D11_PIXEL_SHADER_TRACE_DESC PixelShaderTraceDesc; + D3D11_COMPUTE_SHADER_TRACE_DESC ComputeShaderTraceDesc; + } ; + } D3D11_SHADER_TRACE_DESC; + +typedef +enum D3D11_TRACE_GS_INPUT_PRIMITIVE + { + D3D11_TRACE_GS_INPUT_PRIMITIVE_UNDEFINED = 0, + D3D11_TRACE_GS_INPUT_PRIMITIVE_POINT = 1, + D3D11_TRACE_GS_INPUT_PRIMITIVE_LINE = 2, + D3D11_TRACE_GS_INPUT_PRIMITIVE_TRIANGLE = 3, + D3D11_TRACE_GS_INPUT_PRIMITIVE_LINE_ADJ = 6, + D3D11_TRACE_GS_INPUT_PRIMITIVE_TRIANGLE_ADJ = 7 + } D3D11_TRACE_GS_INPUT_PRIMITIVE; + +typedef struct D3D11_TRACE_STATS + { + D3D11_SHADER_TRACE_DESC TraceDesc; + UINT8 NumInvocationsInStamp; + UINT8 TargetStampIndex; + UINT NumTraceSteps; + D3D11_TRACE_COMPONENT_MASK InputMask[ 32 ]; + D3D11_TRACE_COMPONENT_MASK OutputMask[ 32 ]; + UINT16 NumTemps; + UINT16 MaxIndexableTempIndex; + UINT16 IndexableTempSize[ 4096 ]; + UINT16 ImmediateConstantBufferSize; + UINT PixelPosition[ 4 ][ 2 ]; + UINT64 PixelCoverageMask[ 4 ]; + UINT64 PixelDiscardedMask[ 4 ]; + UINT64 PixelCoverageMaskAfterShader[ 4 ]; + UINT64 PixelCoverageMaskAfterA2CSampleMask[ 4 ]; + UINT64 PixelCoverageMaskAfterA2CSampleMaskDepth[ 4 ]; + UINT64 PixelCoverageMaskAfterA2CSampleMaskDepthStencil[ 4 ]; + BOOL PSOutputsDepth; + BOOL PSOutputsMask; + D3D11_TRACE_GS_INPUT_PRIMITIVE GSInputPrimitive; + BOOL GSInputsPrimitiveID; + D3D11_TRACE_COMPONENT_MASK HSOutputPatchConstantMask[ 32 ]; + D3D11_TRACE_COMPONENT_MASK DSInputPatchConstantMask[ 32 ]; + } D3D11_TRACE_STATS; + +typedef struct D3D11_TRACE_VALUE + { + UINT Bits[ 4 ]; + D3D11_TRACE_COMPONENT_MASK ValidMask; + } D3D11_TRACE_VALUE; + +typedef +enum D3D11_TRACE_REGISTER_TYPE + { + D3D11_TRACE_OUTPUT_NULL_REGISTER = 0, + D3D11_TRACE_INPUT_REGISTER = ( D3D11_TRACE_OUTPUT_NULL_REGISTER + 1 ) , + D3D11_TRACE_INPUT_PRIMITIVE_ID_REGISTER = ( D3D11_TRACE_INPUT_REGISTER + 1 ) , + D3D11_TRACE_IMMEDIATE_CONSTANT_BUFFER = ( D3D11_TRACE_INPUT_PRIMITIVE_ID_REGISTER + 1 ) , + D3D11_TRACE_TEMP_REGISTER = ( D3D11_TRACE_IMMEDIATE_CONSTANT_BUFFER + 1 ) , + D3D11_TRACE_INDEXABLE_TEMP_REGISTER = ( D3D11_TRACE_TEMP_REGISTER + 1 ) , + D3D11_TRACE_OUTPUT_REGISTER = ( D3D11_TRACE_INDEXABLE_TEMP_REGISTER + 1 ) , + D3D11_TRACE_OUTPUT_DEPTH_REGISTER = ( D3D11_TRACE_OUTPUT_REGISTER + 1 ) , + D3D11_TRACE_CONSTANT_BUFFER = ( D3D11_TRACE_OUTPUT_DEPTH_REGISTER + 1 ) , + D3D11_TRACE_IMMEDIATE32 = ( D3D11_TRACE_CONSTANT_BUFFER + 1 ) , + D3D11_TRACE_SAMPLER = ( D3D11_TRACE_IMMEDIATE32 + 1 ) , + D3D11_TRACE_RESOURCE = ( D3D11_TRACE_SAMPLER + 1 ) , + D3D11_TRACE_RASTERIZER = ( D3D11_TRACE_RESOURCE + 1 ) , + D3D11_TRACE_OUTPUT_COVERAGE_MASK = ( D3D11_TRACE_RASTERIZER + 1 ) , + D3D11_TRACE_STREAM = ( D3D11_TRACE_OUTPUT_COVERAGE_MASK + 1 ) , + D3D11_TRACE_THIS_POINTER = ( D3D11_TRACE_STREAM + 1 ) , + D3D11_TRACE_OUTPUT_CONTROL_POINT_ID_REGISTER = ( D3D11_TRACE_THIS_POINTER + 1 ) , + D3D11_TRACE_INPUT_FORK_INSTANCE_ID_REGISTER = ( D3D11_TRACE_OUTPUT_CONTROL_POINT_ID_REGISTER + 1 ) , + D3D11_TRACE_INPUT_JOIN_INSTANCE_ID_REGISTER = ( D3D11_TRACE_INPUT_FORK_INSTANCE_ID_REGISTER + 1 ) , + D3D11_TRACE_INPUT_CONTROL_POINT_REGISTER = ( D3D11_TRACE_INPUT_JOIN_INSTANCE_ID_REGISTER + 1 ) , + D3D11_TRACE_OUTPUT_CONTROL_POINT_REGISTER = ( D3D11_TRACE_INPUT_CONTROL_POINT_REGISTER + 1 ) , + D3D11_TRACE_INPUT_PATCH_CONSTANT_REGISTER = ( D3D11_TRACE_OUTPUT_CONTROL_POINT_REGISTER + 1 ) , + D3D11_TRACE_INPUT_DOMAIN_POINT_REGISTER = ( D3D11_TRACE_INPUT_PATCH_CONSTANT_REGISTER + 1 ) , + D3D11_TRACE_UNORDERED_ACCESS_VIEW = ( D3D11_TRACE_INPUT_DOMAIN_POINT_REGISTER + 1 ) , + D3D11_TRACE_THREAD_GROUP_SHARED_MEMORY = ( D3D11_TRACE_UNORDERED_ACCESS_VIEW + 1 ) , + D3D11_TRACE_INPUT_THREAD_ID_REGISTER = ( D3D11_TRACE_THREAD_GROUP_SHARED_MEMORY + 1 ) , + D3D11_TRACE_INPUT_THREAD_GROUP_ID_REGISTER = ( D3D11_TRACE_INPUT_THREAD_ID_REGISTER + 1 ) , + D3D11_TRACE_INPUT_THREAD_ID_IN_GROUP_REGISTER = ( D3D11_TRACE_INPUT_THREAD_GROUP_ID_REGISTER + 1 ) , + D3D11_TRACE_INPUT_COVERAGE_MASK_REGISTER = ( D3D11_TRACE_INPUT_THREAD_ID_IN_GROUP_REGISTER + 1 ) , + D3D11_TRACE_INPUT_THREAD_ID_IN_GROUP_FLATTENED_REGISTER = ( D3D11_TRACE_INPUT_COVERAGE_MASK_REGISTER + 1 ) , + D3D11_TRACE_INPUT_GS_INSTANCE_ID_REGISTER = ( D3D11_TRACE_INPUT_THREAD_ID_IN_GROUP_FLATTENED_REGISTER + 1 ) , + D3D11_TRACE_OUTPUT_DEPTH_GREATER_EQUAL_REGISTER = ( D3D11_TRACE_INPUT_GS_INSTANCE_ID_REGISTER + 1 ) , + D3D11_TRACE_OUTPUT_DEPTH_LESS_EQUAL_REGISTER = ( D3D11_TRACE_OUTPUT_DEPTH_GREATER_EQUAL_REGISTER + 1 ) , + D3D11_TRACE_IMMEDIATE64 = ( D3D11_TRACE_OUTPUT_DEPTH_LESS_EQUAL_REGISTER + 1 ) , + D3D11_TRACE_INPUT_CYCLE_COUNTER_REGISTER = ( D3D11_TRACE_IMMEDIATE64 + 1 ) , + D3D11_TRACE_INTERFACE_POINTER = ( D3D11_TRACE_INPUT_CYCLE_COUNTER_REGISTER + 1 ) + } D3D11_TRACE_REGISTER_TYPE; + +#define D3D11_TRACE_REGISTER_FLAGS_RELATIVE_INDEXING 0x1 +typedef struct D3D11_TRACE_REGISTER + { + D3D11_TRACE_REGISTER_TYPE RegType; + union + { + UINT16 Index1D; + UINT16 Index2D[ 2 ]; + } ; + UINT8 OperandIndex; + UINT8 Flags; + } D3D11_TRACE_REGISTER; + +#define D3D11_TRACE_MISC_GS_EMIT 0x1 +#define D3D11_TRACE_MISC_GS_CUT 0x2 +#define D3D11_TRACE_MISC_PS_DISCARD 0x4 +#define D3D11_TRACE_MISC_GS_EMIT_STREAM 0x8 +#define D3D11_TRACE_MISC_GS_CUT_STREAM 0x10 +#define D3D11_TRACE_MISC_HALT 0x20 +#define D3D11_TRACE_MISC_MESSAGE 0x40 +typedef UINT16 D3D11_TRACE_MISC_OPERATIONS_MASK; + +typedef struct D3D11_TRACE_STEP + { + UINT ID; + BOOL InstructionActive; + UINT8 NumRegistersWritten; + UINT8 NumRegistersRead; + D3D11_TRACE_MISC_OPERATIONS_MASK MiscOperations; + UINT OpcodeType; + UINT64 CurrentGlobalCycle; + } D3D11_TRACE_STEP; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11ShaderTracing_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11ShaderTracing_0000_0000_v0_0_s_ifspec; + +#ifndef __ID3D11ShaderTrace_INTERFACE_DEFINED__ +#define __ID3D11ShaderTrace_INTERFACE_DEFINED__ + +/* interface ID3D11ShaderTrace */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11ShaderTrace; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("36b013e6-2811-4845-baa7-d623fe0df104") + ID3D11ShaderTrace : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE TraceReady( + /* [annotation] */ + _Out_opt_ UINT64 *pTestCount) = 0; + + virtual void STDMETHODCALLTYPE ResetTrace( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTraceStats( + /* [annotation] */ + _Out_ D3D11_TRACE_STATS *pTraceStats) = 0; + + virtual HRESULT STDMETHODCALLTYPE PSSelectStamp( + /* [annotation] */ + _In_ UINT stampIndex) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetInitialRegisterContents( + /* [annotation] */ + _In_ D3D11_TRACE_REGISTER *pRegister, + /* [annotation] */ + _Out_ D3D11_TRACE_VALUE *pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStep( + /* [annotation] */ + _In_ UINT stepIndex, + /* [annotation] */ + _Out_ D3D11_TRACE_STEP *pTraceStep) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetWrittenRegister( + /* [annotation] */ + _In_ UINT stepIndex, + /* [annotation] */ + _In_ UINT writtenRegisterIndex, + /* [annotation] */ + _Out_ D3D11_TRACE_REGISTER *pRegister, + /* [annotation] */ + _Out_ D3D11_TRACE_VALUE *pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetReadRegister( + /* [annotation] */ + _In_ UINT stepIndex, + /* [annotation] */ + _In_ UINT readRegisterIndex, + /* [annotation] */ + _Out_ D3D11_TRACE_REGISTER *pRegister, + /* [annotation] */ + _Out_ D3D11_TRACE_VALUE *pValue) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11ShaderTraceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11ShaderTrace * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11ShaderTrace * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11ShaderTrace * This); + + HRESULT ( STDMETHODCALLTYPE *TraceReady )( + ID3D11ShaderTrace * This, + /* [annotation] */ + _Out_opt_ UINT64 *pTestCount); + + void ( STDMETHODCALLTYPE *ResetTrace )( + ID3D11ShaderTrace * This); + + HRESULT ( STDMETHODCALLTYPE *GetTraceStats )( + ID3D11ShaderTrace * This, + /* [annotation] */ + _Out_ D3D11_TRACE_STATS *pTraceStats); + + HRESULT ( STDMETHODCALLTYPE *PSSelectStamp )( + ID3D11ShaderTrace * This, + /* [annotation] */ + _In_ UINT stampIndex); + + HRESULT ( STDMETHODCALLTYPE *GetInitialRegisterContents )( + ID3D11ShaderTrace * This, + /* [annotation] */ + _In_ D3D11_TRACE_REGISTER *pRegister, + /* [annotation] */ + _Out_ D3D11_TRACE_VALUE *pValue); + + HRESULT ( STDMETHODCALLTYPE *GetStep )( + ID3D11ShaderTrace * This, + /* [annotation] */ + _In_ UINT stepIndex, + /* [annotation] */ + _Out_ D3D11_TRACE_STEP *pTraceStep); + + HRESULT ( STDMETHODCALLTYPE *GetWrittenRegister )( + ID3D11ShaderTrace * This, + /* [annotation] */ + _In_ UINT stepIndex, + /* [annotation] */ + _In_ UINT writtenRegisterIndex, + /* [annotation] */ + _Out_ D3D11_TRACE_REGISTER *pRegister, + /* [annotation] */ + _Out_ D3D11_TRACE_VALUE *pValue); + + HRESULT ( STDMETHODCALLTYPE *GetReadRegister )( + ID3D11ShaderTrace * This, + /* [annotation] */ + _In_ UINT stepIndex, + /* [annotation] */ + _In_ UINT readRegisterIndex, + /* [annotation] */ + _Out_ D3D11_TRACE_REGISTER *pRegister, + /* [annotation] */ + _Out_ D3D11_TRACE_VALUE *pValue); + + END_INTERFACE + } ID3D11ShaderTraceVtbl; + + interface ID3D11ShaderTrace + { + CONST_VTBL struct ID3D11ShaderTraceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11ShaderTrace_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11ShaderTrace_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11ShaderTrace_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11ShaderTrace_TraceReady(This,pTestCount) \ + ( (This)->lpVtbl -> TraceReady(This,pTestCount) ) + +#define ID3D11ShaderTrace_ResetTrace(This) \ + ( (This)->lpVtbl -> ResetTrace(This) ) + +#define ID3D11ShaderTrace_GetTraceStats(This,pTraceStats) \ + ( (This)->lpVtbl -> GetTraceStats(This,pTraceStats) ) + +#define ID3D11ShaderTrace_PSSelectStamp(This,stampIndex) \ + ( (This)->lpVtbl -> PSSelectStamp(This,stampIndex) ) + +#define ID3D11ShaderTrace_GetInitialRegisterContents(This,pRegister,pValue) \ + ( (This)->lpVtbl -> GetInitialRegisterContents(This,pRegister,pValue) ) + +#define ID3D11ShaderTrace_GetStep(This,stepIndex,pTraceStep) \ + ( (This)->lpVtbl -> GetStep(This,stepIndex,pTraceStep) ) + +#define ID3D11ShaderTrace_GetWrittenRegister(This,stepIndex,writtenRegisterIndex,pRegister,pValue) \ + ( (This)->lpVtbl -> GetWrittenRegister(This,stepIndex,writtenRegisterIndex,pRegister,pValue) ) + +#define ID3D11ShaderTrace_GetReadRegister(This,stepIndex,readRegisterIndex,pRegister,pValue) \ + ( (This)->lpVtbl -> GetReadRegister(This,stepIndex,readRegisterIndex,pRegister,pValue) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11ShaderTrace_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D11ShaderTraceFactory_INTERFACE_DEFINED__ +#define __ID3D11ShaderTraceFactory_INTERFACE_DEFINED__ + +/* interface ID3D11ShaderTraceFactory */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D11ShaderTraceFactory; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1fbad429-66ab-41cc-9617-667ac10e4459") + ID3D11ShaderTraceFactory : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE CreateShaderTrace( + /* [annotation] */ + _In_ IUnknown *pShader, + /* [annotation] */ + _In_ D3D11_SHADER_TRACE_DESC *pTraceDesc, + /* [annotation] */ + _COM_Outptr_ ID3D11ShaderTrace **ppShaderTrace) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D11ShaderTraceFactoryVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D11ShaderTraceFactory * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D11ShaderTraceFactory * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D11ShaderTraceFactory * This); + + HRESULT ( STDMETHODCALLTYPE *CreateShaderTrace )( + ID3D11ShaderTraceFactory * This, + /* [annotation] */ + _In_ IUnknown *pShader, + /* [annotation] */ + _In_ D3D11_SHADER_TRACE_DESC *pTraceDesc, + /* [annotation] */ + _COM_Outptr_ ID3D11ShaderTrace **ppShaderTrace); + + END_INTERFACE + } ID3D11ShaderTraceFactoryVtbl; + + interface ID3D11ShaderTraceFactory + { + CONST_VTBL struct ID3D11ShaderTraceFactoryVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D11ShaderTraceFactory_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D11ShaderTraceFactory_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D11ShaderTraceFactory_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D11ShaderTraceFactory_CreateShaderTrace(This,pShader,pTraceDesc,ppShaderTrace) \ + ( (This)->lpVtbl -> CreateShaderTrace(This,pShader,pTraceDesc,ppShaderTrace) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D11ShaderTraceFactory_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d11ShaderTracing_0000_0002 */ +/* [local] */ + +HRESULT WINAPI +D3DDisassemble11Trace(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData, + _In_ SIZE_T SrcDataSize, + _In_ ID3D11ShaderTrace* pTrace, + _In_ UINT StartStep, + _In_ UINT NumSteps, + _In_ UINT Flags, + _COM_Outptr_ interface ID3D10Blob** ppDisassembly); + + +extern RPC_IF_HANDLE __MIDL_itf_d3d11ShaderTracing_0000_0002_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d11ShaderTracing_0000_0002_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/d3d12.h b/gfx/include/dxsdk/d3d12.h new file mode 100644 index 0000000000..1946eb3d03 --- /dev/null +++ b/gfx/include/dxsdk/d3d12.h @@ -0,0 +1,10359 @@ +/*------------------------------------------------------------------------------------- + * + * Copyright (c) Microsoft Corporation + * + *-------------------------------------------------------------------------------------*/ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __d3d12_h__ +#define __d3d12_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __ID3D12Object_FWD_DEFINED__ +#define __ID3D12Object_FWD_DEFINED__ +typedef interface ID3D12Object ID3D12Object; + +#endif /* __ID3D12Object_FWD_DEFINED__ */ + + +#ifndef __ID3D12DeviceChild_FWD_DEFINED__ +#define __ID3D12DeviceChild_FWD_DEFINED__ +typedef interface ID3D12DeviceChild ID3D12DeviceChild; + +#endif /* __ID3D12DeviceChild_FWD_DEFINED__ */ + + +#ifndef __ID3D12RootSignature_FWD_DEFINED__ +#define __ID3D12RootSignature_FWD_DEFINED__ +typedef interface ID3D12RootSignature ID3D12RootSignature; + +#endif /* __ID3D12RootSignature_FWD_DEFINED__ */ + + +#ifndef __ID3D12RootSignatureDeserializer_FWD_DEFINED__ +#define __ID3D12RootSignatureDeserializer_FWD_DEFINED__ +typedef interface ID3D12RootSignatureDeserializer ID3D12RootSignatureDeserializer; + +#endif /* __ID3D12RootSignatureDeserializer_FWD_DEFINED__ */ + + +#ifndef __ID3D12VersionedRootSignatureDeserializer_FWD_DEFINED__ +#define __ID3D12VersionedRootSignatureDeserializer_FWD_DEFINED__ +typedef interface ID3D12VersionedRootSignatureDeserializer ID3D12VersionedRootSignatureDeserializer; + +#endif /* __ID3D12VersionedRootSignatureDeserializer_FWD_DEFINED__ */ + + +#ifndef __ID3D12Pageable_FWD_DEFINED__ +#define __ID3D12Pageable_FWD_DEFINED__ +typedef interface ID3D12Pageable ID3D12Pageable; + +#endif /* __ID3D12Pageable_FWD_DEFINED__ */ + + +#ifndef __ID3D12Heap_FWD_DEFINED__ +#define __ID3D12Heap_FWD_DEFINED__ +typedef interface ID3D12Heap ID3D12Heap; + +#endif /* __ID3D12Heap_FWD_DEFINED__ */ + + +#ifndef __ID3D12Resource_FWD_DEFINED__ +#define __ID3D12Resource_FWD_DEFINED__ +typedef interface ID3D12Resource ID3D12Resource; + +#endif /* __ID3D12Resource_FWD_DEFINED__ */ + + +#ifndef __ID3D12CommandAllocator_FWD_DEFINED__ +#define __ID3D12CommandAllocator_FWD_DEFINED__ +typedef interface ID3D12CommandAllocator ID3D12CommandAllocator; + +#endif /* __ID3D12CommandAllocator_FWD_DEFINED__ */ + + +#ifndef __ID3D12Fence_FWD_DEFINED__ +#define __ID3D12Fence_FWD_DEFINED__ +typedef interface ID3D12Fence ID3D12Fence; + +#endif /* __ID3D12Fence_FWD_DEFINED__ */ + + +#ifndef __ID3D12Fence1_FWD_DEFINED__ +#define __ID3D12Fence1_FWD_DEFINED__ +typedef interface ID3D12Fence1 ID3D12Fence1; + +#endif /* __ID3D12Fence1_FWD_DEFINED__ */ + + +#ifndef __ID3D12PipelineState_FWD_DEFINED__ +#define __ID3D12PipelineState_FWD_DEFINED__ +typedef interface ID3D12PipelineState ID3D12PipelineState; + +#endif /* __ID3D12PipelineState_FWD_DEFINED__ */ + + +#ifndef __ID3D12DescriptorHeap_FWD_DEFINED__ +#define __ID3D12DescriptorHeap_FWD_DEFINED__ +typedef interface ID3D12DescriptorHeap ID3D12DescriptorHeap; + +#endif /* __ID3D12DescriptorHeap_FWD_DEFINED__ */ + + +#ifndef __ID3D12QueryHeap_FWD_DEFINED__ +#define __ID3D12QueryHeap_FWD_DEFINED__ +typedef interface ID3D12QueryHeap ID3D12QueryHeap; + +#endif /* __ID3D12QueryHeap_FWD_DEFINED__ */ + + +#ifndef __ID3D12CommandSignature_FWD_DEFINED__ +#define __ID3D12CommandSignature_FWD_DEFINED__ +typedef interface ID3D12CommandSignature ID3D12CommandSignature; + +#endif /* __ID3D12CommandSignature_FWD_DEFINED__ */ + + +#ifndef __ID3D12CommandList_FWD_DEFINED__ +#define __ID3D12CommandList_FWD_DEFINED__ +typedef interface ID3D12CommandList ID3D12CommandList; + +#endif /* __ID3D12CommandList_FWD_DEFINED__ */ + + +#ifndef __ID3D12GraphicsCommandList_FWD_DEFINED__ +#define __ID3D12GraphicsCommandList_FWD_DEFINED__ +typedef interface ID3D12GraphicsCommandList ID3D12GraphicsCommandList; + +#endif /* __ID3D12GraphicsCommandList_FWD_DEFINED__ */ + + +#ifndef __ID3D12GraphicsCommandList1_FWD_DEFINED__ +#define __ID3D12GraphicsCommandList1_FWD_DEFINED__ +typedef interface ID3D12GraphicsCommandList1 ID3D12GraphicsCommandList1; + +#endif /* __ID3D12GraphicsCommandList1_FWD_DEFINED__ */ + + +#ifndef __ID3D12GraphicsCommandList2_FWD_DEFINED__ +#define __ID3D12GraphicsCommandList2_FWD_DEFINED__ +typedef interface ID3D12GraphicsCommandList2 ID3D12GraphicsCommandList2; + +#endif /* __ID3D12GraphicsCommandList2_FWD_DEFINED__ */ + + +#ifndef __ID3D12CommandQueue_FWD_DEFINED__ +#define __ID3D12CommandQueue_FWD_DEFINED__ +typedef interface ID3D12CommandQueue ID3D12CommandQueue; + +#endif /* __ID3D12CommandQueue_FWD_DEFINED__ */ + + +#ifndef __ID3D12Device_FWD_DEFINED__ +#define __ID3D12Device_FWD_DEFINED__ +typedef interface ID3D12Device ID3D12Device; + +#endif /* __ID3D12Device_FWD_DEFINED__ */ + + +#ifndef __ID3D12PipelineLibrary_FWD_DEFINED__ +#define __ID3D12PipelineLibrary_FWD_DEFINED__ +typedef interface ID3D12PipelineLibrary ID3D12PipelineLibrary; + +#endif /* __ID3D12PipelineLibrary_FWD_DEFINED__ */ + + +#ifndef __ID3D12PipelineLibrary1_FWD_DEFINED__ +#define __ID3D12PipelineLibrary1_FWD_DEFINED__ +typedef interface ID3D12PipelineLibrary1 ID3D12PipelineLibrary1; + +#endif /* __ID3D12PipelineLibrary1_FWD_DEFINED__ */ + + +#ifndef __ID3D12Device1_FWD_DEFINED__ +#define __ID3D12Device1_FWD_DEFINED__ +typedef interface ID3D12Device1 ID3D12Device1; + +#endif /* __ID3D12Device1_FWD_DEFINED__ */ + + +#ifndef __ID3D12Device2_FWD_DEFINED__ +#define __ID3D12Device2_FWD_DEFINED__ +typedef interface ID3D12Device2 ID3D12Device2; + +#endif /* __ID3D12Device2_FWD_DEFINED__ */ + + +#ifndef __ID3D12Device3_FWD_DEFINED__ +#define __ID3D12Device3_FWD_DEFINED__ +typedef interface ID3D12Device3 ID3D12Device3; + +#endif /* __ID3D12Device3_FWD_DEFINED__ */ + + +#ifndef __ID3D12Tools_FWD_DEFINED__ +#define __ID3D12Tools_FWD_DEFINED__ +typedef interface ID3D12Tools ID3D12Tools; + +#endif /* __ID3D12Tools_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "dxgicommon.h" +#include "dxgiformat.h" +#include "d3dcommon.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_d3d12_0000_0000 */ +/* [local] */ + +/*#include */ +/*#pragma region App Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ +#ifndef _D3D12_CONSTANTS +#define _D3D12_CONSTANTS +#define D3D12_16BIT_INDEX_STRIP_CUT_VALUE ( 0xffff ) + +#define D3D12_32BIT_INDEX_STRIP_CUT_VALUE ( 0xffffffff ) + +#define D3D12_8BIT_INDEX_STRIP_CUT_VALUE ( 0xff ) + +#define D3D12_APPEND_ALIGNED_ELEMENT ( 0xffffffff ) + +#define D3D12_ARRAY_AXIS_ADDRESS_RANGE_BIT_COUNT ( 9 ) + +#define D3D12_CLIP_OR_CULL_DISTANCE_COUNT ( 8 ) + +#define D3D12_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT ( 2 ) + +#define D3D12_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT ( 14 ) + +#define D3D12_COMMONSHADER_CONSTANT_BUFFER_COMPONENTS ( 4 ) + +#define D3D12_COMMONSHADER_CONSTANT_BUFFER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_COMMONSHADER_CONSTANT_BUFFER_HW_SLOT_COUNT ( 15 ) + +#define D3D12_COMMONSHADER_CONSTANT_BUFFER_PARTIAL_UPDATE_EXTENTS_BYTE_ALIGNMENT ( 16 ) + +#define D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COMPONENTS ( 4 ) + +#define D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT ( 15 ) + +#define D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READS_PER_INST ( 1 ) + +#define D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READ_PORTS ( 1 ) + +#define D3D12_COMMONSHADER_FLOWCONTROL_NESTING_LIMIT ( 64 ) + +#define D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COMPONENTS ( 4 ) + +#define D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COUNT ( 1 ) + +#define D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READS_PER_INST ( 1 ) + +#define D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READ_PORTS ( 1 ) + +#define D3D12_COMMONSHADER_IMMEDIATE_VALUE_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_COMPONENTS ( 1 ) + +#define D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_COUNT ( 128 ) + +#define D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_READS_PER_INST ( 1 ) + +#define D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_READ_PORTS ( 1 ) + +#define D3D12_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT ( 128 ) + +#define D3D12_COMMONSHADER_SAMPLER_REGISTER_COMPONENTS ( 1 ) + +#define D3D12_COMMONSHADER_SAMPLER_REGISTER_COUNT ( 16 ) + +#define D3D12_COMMONSHADER_SAMPLER_REGISTER_READS_PER_INST ( 1 ) + +#define D3D12_COMMONSHADER_SAMPLER_REGISTER_READ_PORTS ( 1 ) + +#define D3D12_COMMONSHADER_SAMPLER_SLOT_COUNT ( 16 ) + +#define D3D12_COMMONSHADER_SUBROUTINE_NESTING_LIMIT ( 32 ) + +#define D3D12_COMMONSHADER_TEMP_REGISTER_COMPONENTS ( 4 ) + +#define D3D12_COMMONSHADER_TEMP_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_COMMONSHADER_TEMP_REGISTER_COUNT ( 4096 ) + +#define D3D12_COMMONSHADER_TEMP_REGISTER_READS_PER_INST ( 3 ) + +#define D3D12_COMMONSHADER_TEMP_REGISTER_READ_PORTS ( 3 ) + +#define D3D12_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MAX ( 10 ) + +#define D3D12_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MIN ( -10 ) + +#define D3D12_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE ( -8 ) + +#define D3D12_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE ( 7 ) + +#define D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT ( 256 ) + +#define D3D12_CS_4_X_BUCKET00_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 256 ) + +#define D3D12_CS_4_X_BUCKET00_MAX_NUM_THREADS_PER_GROUP ( 64 ) + +#define D3D12_CS_4_X_BUCKET01_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 240 ) + +#define D3D12_CS_4_X_BUCKET01_MAX_NUM_THREADS_PER_GROUP ( 68 ) + +#define D3D12_CS_4_X_BUCKET02_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 224 ) + +#define D3D12_CS_4_X_BUCKET02_MAX_NUM_THREADS_PER_GROUP ( 72 ) + +#define D3D12_CS_4_X_BUCKET03_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 208 ) + +#define D3D12_CS_4_X_BUCKET03_MAX_NUM_THREADS_PER_GROUP ( 76 ) + +#define D3D12_CS_4_X_BUCKET04_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 192 ) + +#define D3D12_CS_4_X_BUCKET04_MAX_NUM_THREADS_PER_GROUP ( 84 ) + +#define D3D12_CS_4_X_BUCKET05_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 176 ) + +#define D3D12_CS_4_X_BUCKET05_MAX_NUM_THREADS_PER_GROUP ( 92 ) + +#define D3D12_CS_4_X_BUCKET06_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 160 ) + +#define D3D12_CS_4_X_BUCKET06_MAX_NUM_THREADS_PER_GROUP ( 100 ) + +#define D3D12_CS_4_X_BUCKET07_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 144 ) + +#define D3D12_CS_4_X_BUCKET07_MAX_NUM_THREADS_PER_GROUP ( 112 ) + +#define D3D12_CS_4_X_BUCKET08_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 128 ) + +#define D3D12_CS_4_X_BUCKET08_MAX_NUM_THREADS_PER_GROUP ( 128 ) + +#define D3D12_CS_4_X_BUCKET09_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 112 ) + +#define D3D12_CS_4_X_BUCKET09_MAX_NUM_THREADS_PER_GROUP ( 144 ) + +#define D3D12_CS_4_X_BUCKET10_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 96 ) + +#define D3D12_CS_4_X_BUCKET10_MAX_NUM_THREADS_PER_GROUP ( 168 ) + +#define D3D12_CS_4_X_BUCKET11_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 80 ) + +#define D3D12_CS_4_X_BUCKET11_MAX_NUM_THREADS_PER_GROUP ( 204 ) + +#define D3D12_CS_4_X_BUCKET12_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 64 ) + +#define D3D12_CS_4_X_BUCKET12_MAX_NUM_THREADS_PER_GROUP ( 256 ) + +#define D3D12_CS_4_X_BUCKET13_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 48 ) + +#define D3D12_CS_4_X_BUCKET13_MAX_NUM_THREADS_PER_GROUP ( 340 ) + +#define D3D12_CS_4_X_BUCKET14_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 32 ) + +#define D3D12_CS_4_X_BUCKET14_MAX_NUM_THREADS_PER_GROUP ( 512 ) + +#define D3D12_CS_4_X_BUCKET15_MAX_BYTES_TGSM_WRITABLE_PER_THREAD ( 16 ) + +#define D3D12_CS_4_X_BUCKET15_MAX_NUM_THREADS_PER_GROUP ( 768 ) + +#define D3D12_CS_4_X_DISPATCH_MAX_THREAD_GROUPS_IN_Z_DIMENSION ( 1 ) + +#define D3D12_CS_4_X_RAW_UAV_BYTE_ALIGNMENT ( 256 ) + +#define D3D12_CS_4_X_THREAD_GROUP_MAX_THREADS_PER_GROUP ( 768 ) + +#define D3D12_CS_4_X_THREAD_GROUP_MAX_X ( 768 ) + +#define D3D12_CS_4_X_THREAD_GROUP_MAX_Y ( 768 ) + +#define D3D12_CS_4_X_UAV_REGISTER_COUNT ( 1 ) + +#define D3D12_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION ( 65535 ) + +#define D3D12_CS_TGSM_REGISTER_COUNT ( 8192 ) + +#define D3D12_CS_TGSM_REGISTER_READS_PER_INST ( 1 ) + +#define D3D12_CS_TGSM_RESOURCE_REGISTER_COMPONENTS ( 1 ) + +#define D3D12_CS_TGSM_RESOURCE_REGISTER_READ_PORTS ( 1 ) + +#define D3D12_CS_THREADGROUPID_REGISTER_COMPONENTS ( 3 ) + +#define D3D12_CS_THREADGROUPID_REGISTER_COUNT ( 1 ) + +#define D3D12_CS_THREADIDINGROUPFLATTENED_REGISTER_COMPONENTS ( 1 ) + +#define D3D12_CS_THREADIDINGROUPFLATTENED_REGISTER_COUNT ( 1 ) + +#define D3D12_CS_THREADIDINGROUP_REGISTER_COMPONENTS ( 3 ) + +#define D3D12_CS_THREADIDINGROUP_REGISTER_COUNT ( 1 ) + +#define D3D12_CS_THREADID_REGISTER_COMPONENTS ( 3 ) + +#define D3D12_CS_THREADID_REGISTER_COUNT ( 1 ) + +#define D3D12_CS_THREAD_GROUP_MAX_THREADS_PER_GROUP ( 1024 ) + +#define D3D12_CS_THREAD_GROUP_MAX_X ( 1024 ) + +#define D3D12_CS_THREAD_GROUP_MAX_Y ( 1024 ) + +#define D3D12_CS_THREAD_GROUP_MAX_Z ( 64 ) + +#define D3D12_CS_THREAD_GROUP_MIN_X ( 1 ) + +#define D3D12_CS_THREAD_GROUP_MIN_Y ( 1 ) + +#define D3D12_CS_THREAD_GROUP_MIN_Z ( 1 ) + +#define D3D12_CS_THREAD_LOCAL_TEMP_REGISTER_POOL ( 16384 ) + +#define D3D12_DEFAULT_BLEND_FACTOR_ALPHA ( 1.0f ) +#define D3D12_DEFAULT_BLEND_FACTOR_BLUE ( 1.0f ) +#define D3D12_DEFAULT_BLEND_FACTOR_GREEN ( 1.0f ) +#define D3D12_DEFAULT_BLEND_FACTOR_RED ( 1.0f ) +#define D3D12_DEFAULT_BORDER_COLOR_COMPONENT ( 0.0f ) +#define D3D12_DEFAULT_DEPTH_BIAS ( 0 ) + +#define D3D12_DEFAULT_DEPTH_BIAS_CLAMP ( 0.0f ) +#define D3D12_DEFAULT_MAX_ANISOTROPY ( 16 ) + +#define D3D12_DEFAULT_MIP_LOD_BIAS ( 0.0f ) +#define D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT ( 4194304 ) + +#define D3D12_DEFAULT_RENDER_TARGET_ARRAY_INDEX ( 0 ) + +#define D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT ( 65536 ) + +#define D3D12_DEFAULT_SAMPLE_MASK ( 0xffffffff ) + +#define D3D12_DEFAULT_SCISSOR_ENDX ( 0 ) + +#define D3D12_DEFAULT_SCISSOR_ENDY ( 0 ) + +#define D3D12_DEFAULT_SCISSOR_STARTX ( 0 ) + +#define D3D12_DEFAULT_SCISSOR_STARTY ( 0 ) + +#define D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS ( 0.0f ) +#define D3D12_DEFAULT_STENCIL_READ_MASK ( 0xff ) + +#define D3D12_DEFAULT_STENCIL_REFERENCE ( 0 ) + +#define D3D12_DEFAULT_STENCIL_WRITE_MASK ( 0xff ) + +#define D3D12_DEFAULT_VIEWPORT_AND_SCISSORRECT_INDEX ( 0 ) + +#define D3D12_DEFAULT_VIEWPORT_HEIGHT ( 0 ) + +#define D3D12_DEFAULT_VIEWPORT_MAX_DEPTH ( 0.0f ) +#define D3D12_DEFAULT_VIEWPORT_MIN_DEPTH ( 0.0f ) +#define D3D12_DEFAULT_VIEWPORT_TOPLEFTX ( 0 ) + +#define D3D12_DEFAULT_VIEWPORT_TOPLEFTY ( 0 ) + +#define D3D12_DEFAULT_VIEWPORT_WIDTH ( 0 ) + +#define D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND ( 0xffffffff ) + +#define D3D12_DRIVER_RESERVED_REGISTER_SPACE_VALUES_END ( 0xfffffff7 ) + +#define D3D12_DRIVER_RESERVED_REGISTER_SPACE_VALUES_START ( 0xfffffff0 ) + +#define D3D12_DS_INPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS ( 3968 ) + +#define D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENTS ( 4 ) + +#define D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COUNT ( 32 ) + +#define D3D12_DS_INPUT_CONTROL_POINT_REGISTER_READS_PER_INST ( 2 ) + +#define D3D12_DS_INPUT_CONTROL_POINT_REGISTER_READ_PORTS ( 1 ) + +#define D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENTS ( 3 ) + +#define D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COUNT ( 1 ) + +#define D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_READS_PER_INST ( 2 ) + +#define D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_READ_PORTS ( 1 ) + +#define D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENTS ( 4 ) + +#define D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COUNT ( 32 ) + +#define D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST ( 2 ) + +#define D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_READ_PORTS ( 1 ) + +#define D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS ( 1 ) + +#define D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COUNT ( 1 ) + +#define D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST ( 2 ) + +#define D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS ( 1 ) + +#define D3D12_DS_OUTPUT_REGISTER_COMPONENTS ( 4 ) + +#define D3D12_DS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_DS_OUTPUT_REGISTER_COUNT ( 32 ) + +#define D3D12_FLOAT16_FUSED_TOLERANCE_IN_ULP ( 0.6 ) +#define D3D12_FLOAT32_MAX ( 3.402823466e+38f ) +#define D3D12_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP ( 0.6f ) +#define D3D12_FLOAT_TO_SRGB_EXPONENT_DENOMINATOR ( 2.4f ) +#define D3D12_FLOAT_TO_SRGB_EXPONENT_NUMERATOR ( 1.0f ) +#define D3D12_FLOAT_TO_SRGB_OFFSET ( 0.055f ) +#define D3D12_FLOAT_TO_SRGB_SCALE_1 ( 12.92f ) +#define D3D12_FLOAT_TO_SRGB_SCALE_2 ( 1.055f ) +#define D3D12_FLOAT_TO_SRGB_THRESHOLD ( 0.0031308f ) +#define D3D12_FTOI_INSTRUCTION_MAX_INPUT ( 2147483647.999f ) +#define D3D12_FTOI_INSTRUCTION_MIN_INPUT ( -2147483648.999f ) +#define D3D12_FTOU_INSTRUCTION_MAX_INPUT ( 4294967295.999f ) +#define D3D12_FTOU_INSTRUCTION_MIN_INPUT ( 0.0f ) +#define D3D12_GS_INPUT_INSTANCE_ID_READS_PER_INST ( 2 ) + +#define D3D12_GS_INPUT_INSTANCE_ID_READ_PORTS ( 1 ) + +#define D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENTS ( 1 ) + +#define D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COUNT ( 1 ) + +#define D3D12_GS_INPUT_PRIM_CONST_REGISTER_COMPONENTS ( 1 ) + +#define D3D12_GS_INPUT_PRIM_CONST_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_GS_INPUT_PRIM_CONST_REGISTER_COUNT ( 1 ) + +#define D3D12_GS_INPUT_PRIM_CONST_REGISTER_READS_PER_INST ( 2 ) + +#define D3D12_GS_INPUT_PRIM_CONST_REGISTER_READ_PORTS ( 1 ) + +#define D3D12_GS_INPUT_REGISTER_COMPONENTS ( 4 ) + +#define D3D12_GS_INPUT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_GS_INPUT_REGISTER_COUNT ( 32 ) + +#define D3D12_GS_INPUT_REGISTER_READS_PER_INST ( 2 ) + +#define D3D12_GS_INPUT_REGISTER_READ_PORTS ( 1 ) + +#define D3D12_GS_INPUT_REGISTER_VERTICES ( 32 ) + +#define D3D12_GS_MAX_INSTANCE_COUNT ( 32 ) + +#define D3D12_GS_MAX_OUTPUT_VERTEX_COUNT_ACROSS_INSTANCES ( 1024 ) + +#define D3D12_GS_OUTPUT_ELEMENTS ( 32 ) + +#define D3D12_GS_OUTPUT_REGISTER_COMPONENTS ( 4 ) + +#define D3D12_GS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_GS_OUTPUT_REGISTER_COUNT ( 32 ) + +#define D3D12_HS_CONTROL_POINT_PHASE_INPUT_REGISTER_COUNT ( 32 ) + +#define D3D12_HS_CONTROL_POINT_PHASE_OUTPUT_REGISTER_COUNT ( 32 ) + +#define D3D12_HS_CONTROL_POINT_REGISTER_COMPONENTS ( 4 ) + +#define D3D12_HS_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_HS_CONTROL_POINT_REGISTER_READS_PER_INST ( 2 ) + +#define D3D12_HS_CONTROL_POINT_REGISTER_READ_PORTS ( 1 ) + +#define D3D12_HS_FORK_PHASE_INSTANCE_COUNT_UPPER_BOUND ( 0xffffffff ) + +#define D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENTS ( 1 ) + +#define D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COUNT ( 1 ) + +#define D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READS_PER_INST ( 2 ) + +#define D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READ_PORTS ( 1 ) + +#define D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENTS ( 1 ) + +#define D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COUNT ( 1 ) + +#define D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READS_PER_INST ( 2 ) + +#define D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READ_PORTS ( 1 ) + +#define D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS ( 1 ) + +#define D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COUNT ( 1 ) + +#define D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST ( 2 ) + +#define D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS ( 1 ) + +#define D3D12_HS_JOIN_PHASE_INSTANCE_COUNT_UPPER_BOUND ( 0xffffffff ) + +#define D3D12_HS_MAXTESSFACTOR_LOWER_BOUND ( 1.0f ) +#define D3D12_HS_MAXTESSFACTOR_UPPER_BOUND ( 64.0f ) +#define D3D12_HS_OUTPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS ( 3968 ) + +#define D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENTS ( 1 ) + +#define D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COUNT ( 1 ) + +#define D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READS_PER_INST ( 2 ) + +#define D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READ_PORTS ( 1 ) + +#define D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENTS ( 4 ) + +#define D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COUNT ( 32 ) + +#define D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST ( 2 ) + +#define D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READ_PORTS ( 1 ) + +#define D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_SCALAR_COMPONENTS ( 128 ) + +#define D3D12_IA_DEFAULT_INDEX_BUFFER_OFFSET_IN_BYTES ( 0 ) + +#define D3D12_IA_DEFAULT_PRIMITIVE_TOPOLOGY ( 0 ) + +#define D3D12_IA_DEFAULT_VERTEX_BUFFER_OFFSET_IN_BYTES ( 0 ) + +#define D3D12_IA_INDEX_INPUT_RESOURCE_SLOT_COUNT ( 1 ) + +#define D3D12_IA_INSTANCE_ID_BIT_COUNT ( 32 ) + +#define D3D12_IA_INTEGER_ARITHMETIC_BIT_COUNT ( 32 ) + +#define D3D12_IA_PATCH_MAX_CONTROL_POINT_COUNT ( 32 ) + +#define D3D12_IA_PRIMITIVE_ID_BIT_COUNT ( 32 ) + +#define D3D12_IA_VERTEX_ID_BIT_COUNT ( 32 ) + +#define D3D12_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT ( 32 ) + +#define D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS ( 128 ) + +#define D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT ( 32 ) + +#define D3D12_INTEGER_DIVIDE_BY_ZERO_QUOTIENT ( 0xffffffff ) + +#define D3D12_INTEGER_DIVIDE_BY_ZERO_REMAINDER ( 0xffffffff ) + +#define D3D12_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL ( 0xffffffff ) + +#define D3D12_KEEP_UNORDERED_ACCESS_VIEWS ( 0xffffffff ) + +#define D3D12_LINEAR_GAMMA ( 1.0f ) +#define D3D12_MAJOR_VERSION ( 12 ) + +#define D3D12_MAX_BORDER_COLOR_COMPONENT ( 1.0f ) +#define D3D12_MAX_DEPTH ( 1.0f ) +#define D3D12_MAX_LIVE_STATIC_SAMPLERS ( 2032 ) + +#define D3D12_MAX_MAXANISOTROPY ( 16 ) + +#define D3D12_MAX_MULTISAMPLE_SAMPLE_COUNT ( 32 ) + +#define D3D12_MAX_POSITION_VALUE ( 3.402823466e+34f ) +#define D3D12_MAX_ROOT_COST ( 64 ) + +#define D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_1 ( 1000000 ) + +#define D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_2 ( 1000000 ) + +#define D3D12_MAX_SHADER_VISIBLE_SAMPLER_HEAP_SIZE ( 2048 ) + +#define D3D12_MAX_TEXTURE_DIMENSION_2_TO_EXP ( 17 ) + +#define D3D12_MAX_VIEW_INSTANCE_COUNT ( 4 ) + +#define D3D12_MINOR_VERSION ( 0 ) + +#define D3D12_MIN_BORDER_COLOR_COMPONENT ( 0.0f ) +#define D3D12_MIN_DEPTH ( 0.0f ) +#define D3D12_MIN_MAXANISOTROPY ( 0 ) + +#define D3D12_MIP_LOD_BIAS_MAX ( 15.99f ) +#define D3D12_MIP_LOD_BIAS_MIN ( -16.0f ) +#define D3D12_MIP_LOD_FRACTIONAL_BIT_COUNT ( 8 ) + +#define D3D12_MIP_LOD_RANGE_BIT_COUNT ( 8 ) + +#define D3D12_MULTISAMPLE_ANTIALIAS_LINE_WIDTH ( 1.4f ) +#define D3D12_NONSAMPLE_FETCH_OUT_OF_RANGE_ACCESS_RESULT ( 0 ) + +#define D3D12_OS_RESERVED_REGISTER_SPACE_VALUES_END ( 0xffffffff ) + +#define D3D12_OS_RESERVED_REGISTER_SPACE_VALUES_START ( 0xfffffff8 ) + +#define D3D12_PACKED_TILE ( 0xffffffff ) + +#define D3D12_PIXEL_ADDRESS_RANGE_BIT_COUNT ( 15 ) + +#define D3D12_PRE_SCISSOR_PIXEL_ADDRESS_RANGE_BIT_COUNT ( 16 ) + +#define D3D12_PS_CS_UAV_REGISTER_COMPONENTS ( 1 ) + +#define D3D12_PS_CS_UAV_REGISTER_COUNT ( 8 ) + +#define D3D12_PS_CS_UAV_REGISTER_READS_PER_INST ( 1 ) + +#define D3D12_PS_CS_UAV_REGISTER_READ_PORTS ( 1 ) + +#define D3D12_PS_FRONTFACING_DEFAULT_VALUE ( 0xffffffff ) + +#define D3D12_PS_FRONTFACING_FALSE_VALUE ( 0 ) + +#define D3D12_PS_FRONTFACING_TRUE_VALUE ( 0xffffffff ) + +#define D3D12_PS_INPUT_REGISTER_COMPONENTS ( 4 ) + +#define D3D12_PS_INPUT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_PS_INPUT_REGISTER_COUNT ( 32 ) + +#define D3D12_PS_INPUT_REGISTER_READS_PER_INST ( 2 ) + +#define D3D12_PS_INPUT_REGISTER_READ_PORTS ( 1 ) + +#define D3D12_PS_LEGACY_PIXEL_CENTER_FRACTIONAL_COMPONENT ( 0.0f ) +#define D3D12_PS_OUTPUT_DEPTH_REGISTER_COMPONENTS ( 1 ) + +#define D3D12_PS_OUTPUT_DEPTH_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_PS_OUTPUT_DEPTH_REGISTER_COUNT ( 1 ) + +#define D3D12_PS_OUTPUT_MASK_REGISTER_COMPONENTS ( 1 ) + +#define D3D12_PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_PS_OUTPUT_MASK_REGISTER_COUNT ( 1 ) + +#define D3D12_PS_OUTPUT_REGISTER_COMPONENTS ( 4 ) + +#define D3D12_PS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_PS_OUTPUT_REGISTER_COUNT ( 8 ) + +#define D3D12_PS_PIXEL_CENTER_FRACTIONAL_COMPONENT ( 0.5f ) +#define D3D12_RAW_UAV_SRV_BYTE_ALIGNMENT ( 16 ) + +#define D3D12_REQ_BLEND_OBJECT_COUNT_PER_DEVICE ( 4096 ) + +#define D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP ( 27 ) + +#define D3D12_REQ_CONSTANT_BUFFER_ELEMENT_COUNT ( 4096 ) + +#define D3D12_REQ_DEPTH_STENCIL_OBJECT_COUNT_PER_DEVICE ( 4096 ) + +#define D3D12_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP ( 32 ) + +#define D3D12_REQ_DRAW_VERTEX_COUNT_2_TO_EXP ( 32 ) + +#define D3D12_REQ_FILTERING_HW_ADDRESSABLE_RESOURCE_DIMENSION ( 16384 ) + +#define D3D12_REQ_GS_INVOCATION_32BIT_OUTPUT_COMPONENT_LIMIT ( 1024 ) + +#define D3D12_REQ_IMMEDIATE_CONSTANT_BUFFER_ELEMENT_COUNT ( 4096 ) + +#define D3D12_REQ_MAXANISOTROPY ( 16 ) + +#define D3D12_REQ_MIP_LEVELS ( 15 ) + +#define D3D12_REQ_MULTI_ELEMENT_STRUCTURE_SIZE_IN_BYTES ( 2048 ) + +#define D3D12_REQ_RASTERIZER_OBJECT_COUNT_PER_DEVICE ( 4096 ) + +#define D3D12_REQ_RENDER_TO_BUFFER_WINDOW_WIDTH ( 16384 ) + +#define D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_A_TERM ( 128 ) + +#define D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_B_TERM ( 0.25f ) +#define D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_C_TERM ( 2048 ) + +#define D3D12_REQ_RESOURCE_VIEW_COUNT_PER_DEVICE_2_TO_EXP ( 20 ) + +#define D3D12_REQ_SAMPLER_OBJECT_COUNT_PER_DEVICE ( 4096 ) + +#define D3D12_REQ_SUBRESOURCES ( 30720 ) + +#define D3D12_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION ( 2048 ) + +#define D3D12_REQ_TEXTURE1D_U_DIMENSION ( 16384 ) + +#define D3D12_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION ( 2048 ) + +#define D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION ( 16384 ) + +#define D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION ( 2048 ) + +#define D3D12_REQ_TEXTURECUBE_DIMENSION ( 16384 ) + +#define D3D12_RESINFO_INSTRUCTION_MISSING_COMPONENT_RETVAL ( 0 ) + +#define D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES ( 0xffffffff ) + +#define D3D12_SHADER_MAJOR_VERSION ( 5 ) + +#define D3D12_SHADER_MAX_INSTANCES ( 65535 ) + +#define D3D12_SHADER_MAX_INTERFACES ( 253 ) + +#define D3D12_SHADER_MAX_INTERFACE_CALL_SITES ( 4096 ) + +#define D3D12_SHADER_MAX_TYPES ( 65535 ) + +#define D3D12_SHADER_MINOR_VERSION ( 1 ) + +#define D3D12_SHIFT_INSTRUCTION_PAD_VALUE ( 0 ) + +#define D3D12_SHIFT_INSTRUCTION_SHIFT_VALUE_BIT_COUNT ( 5 ) + +#define D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT ( 8 ) + +#define D3D12_SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT ( 65536 ) + +#define D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT ( 4096 ) + +#define D3D12_SO_BUFFER_MAX_STRIDE_IN_BYTES ( 2048 ) + +#define D3D12_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES ( 512 ) + +#define D3D12_SO_BUFFER_SLOT_COUNT ( 4 ) + +#define D3D12_SO_DDI_REGISTER_INDEX_DENOTING_GAP ( 0xffffffff ) + +#define D3D12_SO_NO_RASTERIZED_STREAM ( 0xffffffff ) + +#define D3D12_SO_OUTPUT_COMPONENT_COUNT ( 128 ) + +#define D3D12_SO_STREAM_COUNT ( 4 ) + +#define D3D12_SPEC_DATE_DAY ( 14 ) + +#define D3D12_SPEC_DATE_MONTH ( 11 ) + +#define D3D12_SPEC_DATE_YEAR ( 2014 ) + +#define D3D12_SPEC_VERSION ( 1.16 ) +#define D3D12_SRGB_GAMMA ( 2.2f ) +#define D3D12_SRGB_TO_FLOAT_DENOMINATOR_1 ( 12.92f ) +#define D3D12_SRGB_TO_FLOAT_DENOMINATOR_2 ( 1.055f ) +#define D3D12_SRGB_TO_FLOAT_EXPONENT ( 2.4f ) +#define D3D12_SRGB_TO_FLOAT_OFFSET ( 0.055f ) +#define D3D12_SRGB_TO_FLOAT_THRESHOLD ( 0.04045f ) +#define D3D12_SRGB_TO_FLOAT_TOLERANCE_IN_ULP ( 0.5f ) +#define D3D12_STANDARD_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_STANDARD_COMPONENT_BIT_COUNT_DOUBLED ( 64 ) + +#define D3D12_STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE ( 4 ) + +#define D3D12_STANDARD_PIXEL_COMPONENT_COUNT ( 128 ) + +#define D3D12_STANDARD_PIXEL_ELEMENT_COUNT ( 32 ) + +#define D3D12_STANDARD_VECTOR_SIZE ( 4 ) + +#define D3D12_STANDARD_VERTEX_ELEMENT_COUNT ( 32 ) + +#define D3D12_STANDARD_VERTEX_TOTAL_COMPONENT_COUNT ( 64 ) + +#define D3D12_SUBPIXEL_FRACTIONAL_BIT_COUNT ( 8 ) + +#define D3D12_SUBTEXEL_FRACTIONAL_BIT_COUNT ( 8 ) + +#define D3D12_SYSTEM_RESERVED_REGISTER_SPACE_VALUES_END ( 0xffffffff ) + +#define D3D12_SYSTEM_RESERVED_REGISTER_SPACE_VALUES_START ( 0xfffffff0 ) + +#define D3D12_TESSELLATOR_MAX_EVEN_TESSELLATION_FACTOR ( 64 ) + +#define D3D12_TESSELLATOR_MAX_ISOLINE_DENSITY_TESSELLATION_FACTOR ( 64 ) + +#define D3D12_TESSELLATOR_MAX_ODD_TESSELLATION_FACTOR ( 63 ) + +#define D3D12_TESSELLATOR_MAX_TESSELLATION_FACTOR ( 64 ) + +#define D3D12_TESSELLATOR_MIN_EVEN_TESSELLATION_FACTOR ( 2 ) + +#define D3D12_TESSELLATOR_MIN_ISOLINE_DENSITY_TESSELLATION_FACTOR ( 1 ) + +#define D3D12_TESSELLATOR_MIN_ODD_TESSELLATION_FACTOR ( 1 ) + +#define D3D12_TEXEL_ADDRESS_RANGE_BIT_COUNT ( 16 ) + +#define D3D12_TEXTURE_DATA_PITCH_ALIGNMENT ( 256 ) + +#define D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT ( 512 ) + +#define D3D12_TILED_RESOURCE_TILE_SIZE_IN_BYTES ( 65536 ) + +#define D3D12_UAV_COUNTER_PLACEMENT_ALIGNMENT ( 4096 ) + +#define D3D12_UAV_SLOT_COUNT ( 64 ) + +#define D3D12_UNBOUND_MEMORY_ACCESS_RESULT ( 0 ) + +#define D3D12_VIDEO_DECODE_MAX_ARGUMENTS ( 10 ) + +#define D3D12_VIDEO_DECODE_STATUS_MACROBLOCKS_AFFECTED_UNKNOWN ( 0xffffffff ) + +#define D3D12_VIDEO_PROCESS_MAX_FILTERS ( 32 ) + +#define D3D12_VIDEO_PROCESS_STEREO_VIEWS ( 2 ) + +#define D3D12_VIEWPORT_AND_SCISSORRECT_MAX_INDEX ( 15 ) + +#define D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE ( 16 ) + +#define D3D12_VIEWPORT_BOUNDS_MAX ( 32767 ) + +#define D3D12_VIEWPORT_BOUNDS_MIN ( -32768 ) + +#define D3D12_VS_INPUT_REGISTER_COMPONENTS ( 4 ) + +#define D3D12_VS_INPUT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_VS_INPUT_REGISTER_COUNT ( 32 ) + +#define D3D12_VS_INPUT_REGISTER_READS_PER_INST ( 2 ) + +#define D3D12_VS_INPUT_REGISTER_READ_PORTS ( 1 ) + +#define D3D12_VS_OUTPUT_REGISTER_COMPONENTS ( 4 ) + +#define D3D12_VS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT ( 32 ) + +#define D3D12_VS_OUTPUT_REGISTER_COUNT ( 32 ) + +#define D3D12_WHQL_CONTEXT_COUNT_FOR_RESOURCE_LIMIT ( 10 ) + +#define D3D12_WHQL_DRAWINDEXED_INDEX_COUNT_2_TO_EXP ( 25 ) + +#define D3D12_WHQL_DRAW_VERTEX_COUNT_2_TO_EXP ( 25 ) + +#endif + +typedef UINT64 D3D12_GPU_VIRTUAL_ADDRESS; + +typedef +enum D3D12_COMMAND_LIST_TYPE + { + D3D12_COMMAND_LIST_TYPE_DIRECT = 0, + D3D12_COMMAND_LIST_TYPE_BUNDLE = 1, + D3D12_COMMAND_LIST_TYPE_COMPUTE = 2, + D3D12_COMMAND_LIST_TYPE_COPY = 3, + D3D12_COMMAND_LIST_TYPE_VIDEO_DECODE = 4, + D3D12_COMMAND_LIST_TYPE_VIDEO_PROCESS = 5 + } D3D12_COMMAND_LIST_TYPE; + +typedef +enum D3D12_COMMAND_QUEUE_FLAGS + { + D3D12_COMMAND_QUEUE_FLAG_NONE = 0, + D3D12_COMMAND_QUEUE_FLAG_DISABLE_GPU_TIMEOUT = 0x1 + } D3D12_COMMAND_QUEUE_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_COMMAND_QUEUE_FLAGS ); +typedef +enum D3D12_COMMAND_QUEUE_PRIORITY + { + D3D12_COMMAND_QUEUE_PRIORITY_NORMAL = 0, + D3D12_COMMAND_QUEUE_PRIORITY_HIGH = 100, + D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME = 10000 + } D3D12_COMMAND_QUEUE_PRIORITY; + +typedef struct D3D12_COMMAND_QUEUE_DESC + { + D3D12_COMMAND_LIST_TYPE Type; + INT Priority; + D3D12_COMMAND_QUEUE_FLAGS Flags; + UINT NodeMask; + } D3D12_COMMAND_QUEUE_DESC; + +typedef +enum D3D12_PRIMITIVE_TOPOLOGY_TYPE + { + D3D12_PRIMITIVE_TOPOLOGY_TYPE_UNDEFINED = 0, + D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT = 1, + D3D12_PRIMITIVE_TOPOLOGY_TYPE_LINE = 2, + D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE = 3, + D3D12_PRIMITIVE_TOPOLOGY_TYPE_PATCH = 4 + } D3D12_PRIMITIVE_TOPOLOGY_TYPE; + +typedef +enum D3D12_INPUT_CLASSIFICATION + { + D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA = 0, + D3D12_INPUT_CLASSIFICATION_PER_INSTANCE_DATA = 1 + } D3D12_INPUT_CLASSIFICATION; + +typedef struct D3D12_INPUT_ELEMENT_DESC + { + LPCSTR SemanticName; + UINT SemanticIndex; + DXGI_FORMAT Format; + UINT InputSlot; + UINT AlignedByteOffset; + D3D12_INPUT_CLASSIFICATION InputSlotClass; + UINT InstanceDataStepRate; + } D3D12_INPUT_ELEMENT_DESC; + +typedef +enum D3D12_FILL_MODE + { + D3D12_FILL_MODE_WIREFRAME = 2, + D3D12_FILL_MODE_SOLID = 3 + } D3D12_FILL_MODE; + +typedef D3D_PRIMITIVE_TOPOLOGY D3D12_PRIMITIVE_TOPOLOGY; + +typedef D3D_PRIMITIVE D3D12_PRIMITIVE; + +typedef +enum D3D12_CULL_MODE + { + D3D12_CULL_MODE_NONE = 1, + D3D12_CULL_MODE_FRONT = 2, + D3D12_CULL_MODE_BACK = 3 + } D3D12_CULL_MODE; + +typedef struct D3D12_SO_DECLARATION_ENTRY + { + UINT Stream; + LPCSTR SemanticName; + UINT SemanticIndex; + BYTE StartComponent; + BYTE ComponentCount; + BYTE OutputSlot; + } D3D12_SO_DECLARATION_ENTRY; + +typedef struct D3D12_VIEWPORT + { + FLOAT TopLeftX; + FLOAT TopLeftY; + FLOAT Width; + FLOAT Height; + FLOAT MinDepth; + FLOAT MaxDepth; + } D3D12_VIEWPORT; + +typedef RECT D3D12_RECT; + +typedef struct D3D12_BOX + { + UINT left; + UINT top; + UINT front; + UINT right; + UINT bottom; + UINT back; + } D3D12_BOX; + +typedef +enum D3D12_COMPARISON_FUNC + { + D3D12_COMPARISON_FUNC_NEVER = 1, + D3D12_COMPARISON_FUNC_LESS = 2, + D3D12_COMPARISON_FUNC_EQUAL = 3, + D3D12_COMPARISON_FUNC_LESS_EQUAL = 4, + D3D12_COMPARISON_FUNC_GREATER = 5, + D3D12_COMPARISON_FUNC_NOT_EQUAL = 6, + D3D12_COMPARISON_FUNC_GREATER_EQUAL = 7, + D3D12_COMPARISON_FUNC_ALWAYS = 8 + } D3D12_COMPARISON_FUNC; + +typedef +enum D3D12_DEPTH_WRITE_MASK + { + D3D12_DEPTH_WRITE_MASK_ZERO = 0, + D3D12_DEPTH_WRITE_MASK_ALL = 1 + } D3D12_DEPTH_WRITE_MASK; + +typedef +enum D3D12_STENCIL_OP + { + D3D12_STENCIL_OP_KEEP = 1, + D3D12_STENCIL_OP_ZERO = 2, + D3D12_STENCIL_OP_REPLACE = 3, + D3D12_STENCIL_OP_INCR_SAT = 4, + D3D12_STENCIL_OP_DECR_SAT = 5, + D3D12_STENCIL_OP_INVERT = 6, + D3D12_STENCIL_OP_INCR = 7, + D3D12_STENCIL_OP_DECR = 8 + } D3D12_STENCIL_OP; + +typedef struct D3D12_DEPTH_STENCILOP_DESC + { + D3D12_STENCIL_OP StencilFailOp; + D3D12_STENCIL_OP StencilDepthFailOp; + D3D12_STENCIL_OP StencilPassOp; + D3D12_COMPARISON_FUNC StencilFunc; + } D3D12_DEPTH_STENCILOP_DESC; + +typedef struct D3D12_DEPTH_STENCIL_DESC + { + BOOL DepthEnable; + D3D12_DEPTH_WRITE_MASK DepthWriteMask; + D3D12_COMPARISON_FUNC DepthFunc; + BOOL StencilEnable; + UINT8 StencilReadMask; + UINT8 StencilWriteMask; + D3D12_DEPTH_STENCILOP_DESC FrontFace; + D3D12_DEPTH_STENCILOP_DESC BackFace; + } D3D12_DEPTH_STENCIL_DESC; + +typedef struct D3D12_DEPTH_STENCIL_DESC1 + { + BOOL DepthEnable; + D3D12_DEPTH_WRITE_MASK DepthWriteMask; + D3D12_COMPARISON_FUNC DepthFunc; + BOOL StencilEnable; + UINT8 StencilReadMask; + UINT8 StencilWriteMask; + D3D12_DEPTH_STENCILOP_DESC FrontFace; + D3D12_DEPTH_STENCILOP_DESC BackFace; + BOOL DepthBoundsTestEnable; + } D3D12_DEPTH_STENCIL_DESC1; + +typedef +enum D3D12_BLEND + { + D3D12_BLEND_ZERO = 1, + D3D12_BLEND_ONE = 2, + D3D12_BLEND_SRC_COLOR = 3, + D3D12_BLEND_INV_SRC_COLOR = 4, + D3D12_BLEND_SRC_ALPHA = 5, + D3D12_BLEND_INV_SRC_ALPHA = 6, + D3D12_BLEND_DEST_ALPHA = 7, + D3D12_BLEND_INV_DEST_ALPHA = 8, + D3D12_BLEND_DEST_COLOR = 9, + D3D12_BLEND_INV_DEST_COLOR = 10, + D3D12_BLEND_SRC_ALPHA_SAT = 11, + D3D12_BLEND_BLEND_FACTOR = 14, + D3D12_BLEND_INV_BLEND_FACTOR = 15, + D3D12_BLEND_SRC1_COLOR = 16, + D3D12_BLEND_INV_SRC1_COLOR = 17, + D3D12_BLEND_SRC1_ALPHA = 18, + D3D12_BLEND_INV_SRC1_ALPHA = 19 + } D3D12_BLEND; + +typedef +enum D3D12_BLEND_OP + { + D3D12_BLEND_OP_ADD = 1, + D3D12_BLEND_OP_SUBTRACT = 2, + D3D12_BLEND_OP_REV_SUBTRACT = 3, + D3D12_BLEND_OP_MIN = 4, + D3D12_BLEND_OP_MAX = 5 + } D3D12_BLEND_OP; + +typedef +enum D3D12_COLOR_WRITE_ENABLE + { + D3D12_COLOR_WRITE_ENABLE_RED = 1, + D3D12_COLOR_WRITE_ENABLE_GREEN = 2, + D3D12_COLOR_WRITE_ENABLE_BLUE = 4, + D3D12_COLOR_WRITE_ENABLE_ALPHA = 8, + D3D12_COLOR_WRITE_ENABLE_ALL = ( ( ( D3D12_COLOR_WRITE_ENABLE_RED | D3D12_COLOR_WRITE_ENABLE_GREEN ) | D3D12_COLOR_WRITE_ENABLE_BLUE ) | D3D12_COLOR_WRITE_ENABLE_ALPHA ) + } D3D12_COLOR_WRITE_ENABLE; + +typedef +enum D3D12_LOGIC_OP + { + D3D12_LOGIC_OP_CLEAR = 0, + D3D12_LOGIC_OP_SET = ( D3D12_LOGIC_OP_CLEAR + 1 ) , + D3D12_LOGIC_OP_COPY = ( D3D12_LOGIC_OP_SET + 1 ) , + D3D12_LOGIC_OP_COPY_INVERTED = ( D3D12_LOGIC_OP_COPY + 1 ) , + D3D12_LOGIC_OP_NOOP = ( D3D12_LOGIC_OP_COPY_INVERTED + 1 ) , + D3D12_LOGIC_OP_INVERT = ( D3D12_LOGIC_OP_NOOP + 1 ) , + D3D12_LOGIC_OP_AND = ( D3D12_LOGIC_OP_INVERT + 1 ) , + D3D12_LOGIC_OP_NAND = ( D3D12_LOGIC_OP_AND + 1 ) , + D3D12_LOGIC_OP_OR = ( D3D12_LOGIC_OP_NAND + 1 ) , + D3D12_LOGIC_OP_NOR = ( D3D12_LOGIC_OP_OR + 1 ) , + D3D12_LOGIC_OP_XOR = ( D3D12_LOGIC_OP_NOR + 1 ) , + D3D12_LOGIC_OP_EQUIV = ( D3D12_LOGIC_OP_XOR + 1 ) , + D3D12_LOGIC_OP_AND_REVERSE = ( D3D12_LOGIC_OP_EQUIV + 1 ) , + D3D12_LOGIC_OP_AND_INVERTED = ( D3D12_LOGIC_OP_AND_REVERSE + 1 ) , + D3D12_LOGIC_OP_OR_REVERSE = ( D3D12_LOGIC_OP_AND_INVERTED + 1 ) , + D3D12_LOGIC_OP_OR_INVERTED = ( D3D12_LOGIC_OP_OR_REVERSE + 1 ) + } D3D12_LOGIC_OP; + +typedef struct D3D12_RENDER_TARGET_BLEND_DESC + { + BOOL BlendEnable; + BOOL LogicOpEnable; + D3D12_BLEND SrcBlend; + D3D12_BLEND DestBlend; + D3D12_BLEND_OP BlendOp; + D3D12_BLEND SrcBlendAlpha; + D3D12_BLEND DestBlendAlpha; + D3D12_BLEND_OP BlendOpAlpha; + D3D12_LOGIC_OP LogicOp; + UINT8 RenderTargetWriteMask; + } D3D12_RENDER_TARGET_BLEND_DESC; + +typedef struct D3D12_BLEND_DESC + { + BOOL AlphaToCoverageEnable; + BOOL IndependentBlendEnable; + D3D12_RENDER_TARGET_BLEND_DESC RenderTarget[ 8 ]; + } D3D12_BLEND_DESC; + +/* Note, the array size for RenderTarget[] above is D3D12_SIMULTANEOUS_RENDERTARGET_COUNT. + IDL processing/generation of this header replaces the define; this comment is merely explaining what happened. */ +typedef +enum D3D12_CONSERVATIVE_RASTERIZATION_MODE + { + D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF = 0, + D3D12_CONSERVATIVE_RASTERIZATION_MODE_ON = 1 + } D3D12_CONSERVATIVE_RASTERIZATION_MODE; + +typedef struct D3D12_RASTERIZER_DESC + { + D3D12_FILL_MODE FillMode; + D3D12_CULL_MODE CullMode; + BOOL FrontCounterClockwise; + INT DepthBias; + FLOAT DepthBiasClamp; + FLOAT SlopeScaledDepthBias; + BOOL DepthClipEnable; + BOOL MultisampleEnable; + BOOL AntialiasedLineEnable; + UINT ForcedSampleCount; + D3D12_CONSERVATIVE_RASTERIZATION_MODE ConservativeRaster; + } D3D12_RASTERIZER_DESC; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0000_v0_0_s_ifspec; + +#ifndef __ID3D12Object_INTERFACE_DEFINED__ +#define __ID3D12Object_INTERFACE_DEFINED__ + +/* interface ID3D12Object */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12Object; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("c4fec28f-7966-4e95-9f94-f431cb56c3b8") + ID3D12Object : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetPrivateData( + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPrivateData( + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPrivateDataInterface( + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetName( + _In_z_ LPCWSTR Name) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12ObjectVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12Object * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12Object * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12Object * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12Object * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12Object * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12Object * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12Object * This, + _In_z_ LPCWSTR Name); + + END_INTERFACE + } ID3D12ObjectVtbl; + + interface ID3D12Object + { + CONST_VTBL struct ID3D12ObjectVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12Object_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12Object_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12Object_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12Object_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12Object_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12Object_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12Object_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12Object_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12DeviceChild_INTERFACE_DEFINED__ +#define __ID3D12DeviceChild_INTERFACE_DEFINED__ + +/* interface ID3D12DeviceChild */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12DeviceChild; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("905db94b-a00c-4140-9df5-2b64ca9ea357") + ID3D12DeviceChild : public ID3D12Object + { + public: + virtual HRESULT STDMETHODCALLTYPE GetDevice( + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12DeviceChildVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12DeviceChild * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12DeviceChild * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12DeviceChild * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12DeviceChild * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12DeviceChild * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12DeviceChild * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12DeviceChild * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12DeviceChild * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + END_INTERFACE + } ID3D12DeviceChildVtbl; + + interface ID3D12DeviceChild + { + CONST_VTBL struct ID3D12DeviceChildVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12DeviceChild_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12DeviceChild_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12DeviceChild_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12DeviceChild_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12DeviceChild_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12DeviceChild_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12DeviceChild_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12DeviceChild_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12DeviceChild_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12RootSignature_INTERFACE_DEFINED__ +#define __ID3D12RootSignature_INTERFACE_DEFINED__ + +/* interface ID3D12RootSignature */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12RootSignature; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("c54a6b66-72df-4ee8-8be5-a946a1429214") + ID3D12RootSignature : public ID3D12DeviceChild + { + public: + }; + + +#else /* C style interface */ + + typedef struct ID3D12RootSignatureVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12RootSignature * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12RootSignature * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12RootSignature * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12RootSignature * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12RootSignature * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12RootSignature * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12RootSignature * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12RootSignature * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + END_INTERFACE + } ID3D12RootSignatureVtbl; + + interface ID3D12RootSignature + { + CONST_VTBL struct ID3D12RootSignatureVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12RootSignature_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12RootSignature_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12RootSignature_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12RootSignature_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12RootSignature_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12RootSignature_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12RootSignature_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12RootSignature_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12RootSignature_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12_0000_0001 */ +/* [local] */ + +typedef struct D3D12_SHADER_BYTECODE + { + _Field_size_bytes_full_(BytecodeLength) const void *pShaderBytecode; + SIZE_T BytecodeLength; + } D3D12_SHADER_BYTECODE; + +typedef struct D3D12_STREAM_OUTPUT_DESC + { + _Field_size_full_(NumEntries) const D3D12_SO_DECLARATION_ENTRY *pSODeclaration; + UINT NumEntries; + _Field_size_full_(NumStrides) const UINT *pBufferStrides; + UINT NumStrides; + UINT RasterizedStream; + } D3D12_STREAM_OUTPUT_DESC; + +typedef struct D3D12_INPUT_LAYOUT_DESC + { + _Field_size_full_(NumElements) const D3D12_INPUT_ELEMENT_DESC *pInputElementDescs; + UINT NumElements; + } D3D12_INPUT_LAYOUT_DESC; + +typedef +enum D3D12_INDEX_BUFFER_STRIP_CUT_VALUE + { + D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_DISABLED = 0, + D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFF = 1, + D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFFFFFF = 2 + } D3D12_INDEX_BUFFER_STRIP_CUT_VALUE; + +typedef struct D3D12_CACHED_PIPELINE_STATE + { + _Field_size_bytes_full_(CachedBlobSizeInBytes) const void *pCachedBlob; + SIZE_T CachedBlobSizeInBytes; + } D3D12_CACHED_PIPELINE_STATE; + +typedef +enum D3D12_PIPELINE_STATE_FLAGS + { + D3D12_PIPELINE_STATE_FLAG_NONE = 0, + D3D12_PIPELINE_STATE_FLAG_TOOL_DEBUG = 0x1 + } D3D12_PIPELINE_STATE_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_PIPELINE_STATE_FLAGS ); +typedef struct D3D12_GRAPHICS_PIPELINE_STATE_DESC + { + ID3D12RootSignature *pRootSignature; + D3D12_SHADER_BYTECODE VS; + D3D12_SHADER_BYTECODE PS; + D3D12_SHADER_BYTECODE DS; + D3D12_SHADER_BYTECODE HS; + D3D12_SHADER_BYTECODE GS; + D3D12_STREAM_OUTPUT_DESC StreamOutput; + D3D12_BLEND_DESC BlendState; + UINT SampleMask; + D3D12_RASTERIZER_DESC RasterizerState; + D3D12_DEPTH_STENCIL_DESC DepthStencilState; + D3D12_INPUT_LAYOUT_DESC InputLayout; + D3D12_INDEX_BUFFER_STRIP_CUT_VALUE IBStripCutValue; + D3D12_PRIMITIVE_TOPOLOGY_TYPE PrimitiveTopologyType; + UINT NumRenderTargets; + DXGI_FORMAT RTVFormats[ 8 ]; + DXGI_FORMAT DSVFormat; + DXGI_SAMPLE_DESC SampleDesc; + UINT NodeMask; + D3D12_CACHED_PIPELINE_STATE CachedPSO; + D3D12_PIPELINE_STATE_FLAGS Flags; + } D3D12_GRAPHICS_PIPELINE_STATE_DESC; + +typedef struct D3D12_COMPUTE_PIPELINE_STATE_DESC + { + ID3D12RootSignature *pRootSignature; + D3D12_SHADER_BYTECODE CS; + UINT NodeMask; + D3D12_CACHED_PIPELINE_STATE CachedPSO; + D3D12_PIPELINE_STATE_FLAGS Flags; + } D3D12_COMPUTE_PIPELINE_STATE_DESC; + +struct D3D12_RT_FORMAT_ARRAY + { + DXGI_FORMAT RTFormats[ 8 ]; + UINT NumRenderTargets; + } ; +typedef struct D3D12_PIPELINE_STATE_STREAM_DESC + { + _In_ SIZE_T SizeInBytes; + _In_reads_(_Inexpressible_("Dependent on size of subobjects")) void *pPipelineStateSubobjectStream; + } D3D12_PIPELINE_STATE_STREAM_DESC; + +typedef +enum D3D12_PIPELINE_STATE_SUBOBJECT_TYPE + { + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_ROOT_SIGNATURE = 0, + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_VS = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_ROOT_SIGNATURE + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_PS = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_VS + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DS = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_PS + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_HS = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DS + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_GS = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_HS + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_CS = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_GS + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_STREAM_OUTPUT = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_CS + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_BLEND = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_STREAM_OUTPUT + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_SAMPLE_MASK = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_BLEND + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RASTERIZER = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_SAMPLE_MASK + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RASTERIZER + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_INPUT_LAYOUT = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_IB_STRIP_CUT_VALUE = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_INPUT_LAYOUT + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_PRIMITIVE_TOPOLOGY = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_IB_STRIP_CUT_VALUE + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RENDER_TARGET_FORMATS = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_PRIMITIVE_TOPOLOGY + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL_FORMAT = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RENDER_TARGET_FORMATS + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_SAMPLE_DESC = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL_FORMAT + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_NODE_MASK = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_SAMPLE_DESC + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_CACHED_PSO = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_NODE_MASK + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_FLAGS = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_CACHED_PSO + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL1 = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_FLAGS + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_VIEW_INSTANCING = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL1 + 1 ) , + D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_MAX_VALID = ( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_VIEW_INSTANCING + 1 ) + } D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; + +typedef +enum D3D12_FEATURE + { + D3D12_FEATURE_D3D12_OPTIONS = 0, + D3D12_FEATURE_ARCHITECTURE = 1, + D3D12_FEATURE_FEATURE_LEVELS = 2, + D3D12_FEATURE_FORMAT_SUPPORT = 3, + D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS = 4, + D3D12_FEATURE_FORMAT_INFO = 5, + D3D12_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT = 6, + D3D12_FEATURE_SHADER_MODEL = 7, + D3D12_FEATURE_D3D12_OPTIONS1 = 8, + D3D12_FEATURE_ROOT_SIGNATURE = 12, + D3D12_FEATURE_ARCHITECTURE1 = 16, + D3D12_FEATURE_D3D12_OPTIONS2 = 18, + D3D12_FEATURE_SHADER_CACHE = 19, + D3D12_FEATURE_COMMAND_QUEUE_PRIORITY = 20, + D3D12_FEATURE_D3D12_OPTIONS3 = 21, + D3D12_FEATURE_EXISTING_HEAPS = 22 + } D3D12_FEATURE; + +typedef +enum D3D12_SHADER_MIN_PRECISION_SUPPORT + { + D3D12_SHADER_MIN_PRECISION_SUPPORT_NONE = 0, + D3D12_SHADER_MIN_PRECISION_SUPPORT_10_BIT = 0x1, + D3D12_SHADER_MIN_PRECISION_SUPPORT_16_BIT = 0x2 + } D3D12_SHADER_MIN_PRECISION_SUPPORT; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_SHADER_MIN_PRECISION_SUPPORT ); +typedef +enum D3D12_TILED_RESOURCES_TIER + { + D3D12_TILED_RESOURCES_TIER_NOT_SUPPORTED = 0, + D3D12_TILED_RESOURCES_TIER_1 = 1, + D3D12_TILED_RESOURCES_TIER_2 = 2, + D3D12_TILED_RESOURCES_TIER_3 = 3 + } D3D12_TILED_RESOURCES_TIER; + +typedef +enum D3D12_RESOURCE_BINDING_TIER + { + D3D12_RESOURCE_BINDING_TIER_1 = 1, + D3D12_RESOURCE_BINDING_TIER_2 = 2, + D3D12_RESOURCE_BINDING_TIER_3 = 3 + } D3D12_RESOURCE_BINDING_TIER; + +typedef +enum D3D12_CONSERVATIVE_RASTERIZATION_TIER + { + D3D12_CONSERVATIVE_RASTERIZATION_TIER_NOT_SUPPORTED = 0, + D3D12_CONSERVATIVE_RASTERIZATION_TIER_1 = 1, + D3D12_CONSERVATIVE_RASTERIZATION_TIER_2 = 2, + D3D12_CONSERVATIVE_RASTERIZATION_TIER_3 = 3 + } D3D12_CONSERVATIVE_RASTERIZATION_TIER; + +typedef +enum D3D12_FORMAT_SUPPORT1 + { + D3D12_FORMAT_SUPPORT1_NONE = 0, + D3D12_FORMAT_SUPPORT1_BUFFER = 0x1, + D3D12_FORMAT_SUPPORT1_IA_VERTEX_BUFFER = 0x2, + D3D12_FORMAT_SUPPORT1_IA_INDEX_BUFFER = 0x4, + D3D12_FORMAT_SUPPORT1_SO_BUFFER = 0x8, + D3D12_FORMAT_SUPPORT1_TEXTURE1D = 0x10, + D3D12_FORMAT_SUPPORT1_TEXTURE2D = 0x20, + D3D12_FORMAT_SUPPORT1_TEXTURE3D = 0x40, + D3D12_FORMAT_SUPPORT1_TEXTURECUBE = 0x80, + D3D12_FORMAT_SUPPORT1_SHADER_LOAD = 0x100, + D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE = 0x200, + D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_COMPARISON = 0x400, + D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_MONO_TEXT = 0x800, + D3D12_FORMAT_SUPPORT1_MIP = 0x1000, + D3D12_FORMAT_SUPPORT1_RENDER_TARGET = 0x4000, + D3D12_FORMAT_SUPPORT1_BLENDABLE = 0x8000, + D3D12_FORMAT_SUPPORT1_DEPTH_STENCIL = 0x10000, + D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RESOLVE = 0x40000, + D3D12_FORMAT_SUPPORT1_DISPLAY = 0x80000, + D3D12_FORMAT_SUPPORT1_CAST_WITHIN_BIT_LAYOUT = 0x100000, + D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RENDERTARGET = 0x200000, + D3D12_FORMAT_SUPPORT1_MULTISAMPLE_LOAD = 0x400000, + D3D12_FORMAT_SUPPORT1_SHADER_GATHER = 0x800000, + D3D12_FORMAT_SUPPORT1_BACK_BUFFER_CAST = 0x1000000, + D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW = 0x2000000, + D3D12_FORMAT_SUPPORT1_SHADER_GATHER_COMPARISON = 0x4000000, + D3D12_FORMAT_SUPPORT1_DECODER_OUTPUT = 0x8000000, + D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_OUTPUT = 0x10000000, + D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_INPUT = 0x20000000, + D3D12_FORMAT_SUPPORT1_VIDEO_ENCODER = 0x40000000 + } D3D12_FORMAT_SUPPORT1; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_FORMAT_SUPPORT1 ); +typedef +enum D3D12_FORMAT_SUPPORT2 + { + D3D12_FORMAT_SUPPORT2_NONE = 0, + D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_ADD = 0x1, + D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_BITWISE_OPS = 0x2, + D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE = 0x4, + D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE = 0x8, + D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX = 0x10, + D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX = 0x20, + D3D12_FORMAT_SUPPORT2_UAV_TYPED_LOAD = 0x40, + D3D12_FORMAT_SUPPORT2_UAV_TYPED_STORE = 0x80, + D3D12_FORMAT_SUPPORT2_OUTPUT_MERGER_LOGIC_OP = 0x100, + D3D12_FORMAT_SUPPORT2_TILED = 0x200, + D3D12_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY = 0x4000 + } D3D12_FORMAT_SUPPORT2; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_FORMAT_SUPPORT2 ); +typedef +enum D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS + { + D3D12_MULTISAMPLE_QUALITY_LEVELS_FLAG_NONE = 0, + D3D12_MULTISAMPLE_QUALITY_LEVELS_FLAG_TILED_RESOURCE = 0x1 + } D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS ); +typedef +enum D3D12_CROSS_NODE_SHARING_TIER + { + D3D12_CROSS_NODE_SHARING_TIER_NOT_SUPPORTED = 0, + D3D12_CROSS_NODE_SHARING_TIER_1_EMULATED = 1, + D3D12_CROSS_NODE_SHARING_TIER_1 = 2, + D3D12_CROSS_NODE_SHARING_TIER_2 = 3 + } D3D12_CROSS_NODE_SHARING_TIER; + +typedef +enum D3D12_RESOURCE_HEAP_TIER + { + D3D12_RESOURCE_HEAP_TIER_1 = 1, + D3D12_RESOURCE_HEAP_TIER_2 = 2 + } D3D12_RESOURCE_HEAP_TIER; + +typedef +enum D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER + { + D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER_NOT_SUPPORTED = 0, + D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER_1 = 1, + D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER_2 = 2 + } D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER; + +typedef +enum D3D12_VIEW_INSTANCING_TIER + { + D3D12_VIEW_INSTANCING_TIER_NOT_SUPPORTED = 0, + D3D12_VIEW_INSTANCING_TIER_1 = 1, + D3D12_VIEW_INSTANCING_TIER_2 = 2, + D3D12_VIEW_INSTANCING_TIER_3 = 3 + } D3D12_VIEW_INSTANCING_TIER; + +typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS + { + _Out_ BOOL DoublePrecisionFloatShaderOps; + _Out_ BOOL OutputMergerLogicOp; + _Out_ D3D12_SHADER_MIN_PRECISION_SUPPORT MinPrecisionSupport; + _Out_ D3D12_TILED_RESOURCES_TIER TiledResourcesTier; + _Out_ D3D12_RESOURCE_BINDING_TIER ResourceBindingTier; + _Out_ BOOL PSSpecifiedStencilRefSupported; + _Out_ BOOL TypedUAVLoadAdditionalFormats; + _Out_ BOOL ROVsSupported; + _Out_ D3D12_CONSERVATIVE_RASTERIZATION_TIER ConservativeRasterizationTier; + _Out_ UINT MaxGPUVirtualAddressBitsPerResource; + _Out_ BOOL StandardSwizzle64KBSupported; + _Out_ D3D12_CROSS_NODE_SHARING_TIER CrossNodeSharingTier; + _Out_ BOOL CrossAdapterRowMajorTextureSupported; + _Out_ BOOL VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation; + _Out_ D3D12_RESOURCE_HEAP_TIER ResourceHeapTier; + } D3D12_FEATURE_DATA_D3D12_OPTIONS; + +typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS1 + { + _Out_ BOOL WaveOps; + _Out_ UINT WaveLaneCountMin; + _Out_ UINT WaveLaneCountMax; + _Out_ UINT TotalLaneCount; + _Out_ BOOL ExpandedComputeResourceStates; + _Out_ BOOL Int64ShaderOps; + } D3D12_FEATURE_DATA_D3D12_OPTIONS1; + +typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS2 + { + _Out_ BOOL DepthBoundsTestSupported; + _Out_ D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER ProgrammableSamplePositionsTier; + } D3D12_FEATURE_DATA_D3D12_OPTIONS2; + +typedef +enum D3D_ROOT_SIGNATURE_VERSION + { + D3D_ROOT_SIGNATURE_VERSION_1 = 0x1, + D3D_ROOT_SIGNATURE_VERSION_1_0 = 0x1, + D3D_ROOT_SIGNATURE_VERSION_1_1 = 0x2 + } D3D_ROOT_SIGNATURE_VERSION; + +typedef struct D3D12_FEATURE_DATA_ROOT_SIGNATURE + { + _Inout_ D3D_ROOT_SIGNATURE_VERSION HighestVersion; + } D3D12_FEATURE_DATA_ROOT_SIGNATURE; + +typedef struct D3D12_FEATURE_DATA_ARCHITECTURE + { + _In_ UINT NodeIndex; + _Out_ BOOL TileBasedRenderer; + _Out_ BOOL UMA; + _Out_ BOOL CacheCoherentUMA; + } D3D12_FEATURE_DATA_ARCHITECTURE; + +typedef struct D3D12_FEATURE_DATA_ARCHITECTURE1 + { + _In_ UINT NodeIndex; + _Out_ BOOL TileBasedRenderer; + _Out_ BOOL UMA; + _Out_ BOOL CacheCoherentUMA; + _Out_ BOOL IsolatedMMU; + } D3D12_FEATURE_DATA_ARCHITECTURE1; + +typedef struct D3D12_FEATURE_DATA_FEATURE_LEVELS + { + _In_ UINT NumFeatureLevels; + _In_reads_(NumFeatureLevels) const D3D_FEATURE_LEVEL *pFeatureLevelsRequested; + _Out_ D3D_FEATURE_LEVEL MaxSupportedFeatureLevel; + } D3D12_FEATURE_DATA_FEATURE_LEVELS; + +typedef +enum D3D_SHADER_MODEL + { + D3D_SHADER_MODEL_5_1 = 0x51, + D3D_SHADER_MODEL_6_0 = 0x60, + D3D_SHADER_MODEL_6_1 = 0x61 + } D3D_SHADER_MODEL; + +typedef struct D3D12_FEATURE_DATA_SHADER_MODEL + { + _Inout_ D3D_SHADER_MODEL HighestShaderModel; + } D3D12_FEATURE_DATA_SHADER_MODEL; + +typedef struct D3D12_FEATURE_DATA_FORMAT_SUPPORT + { + _In_ DXGI_FORMAT Format; + _Out_ D3D12_FORMAT_SUPPORT1 Support1; + _Out_ D3D12_FORMAT_SUPPORT2 Support2; + } D3D12_FEATURE_DATA_FORMAT_SUPPORT; + +typedef struct D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS + { + _In_ DXGI_FORMAT Format; + _In_ UINT SampleCount; + _In_ D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS Flags; + _Out_ UINT NumQualityLevels; + } D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS; + +typedef struct D3D12_FEATURE_DATA_FORMAT_INFO + { + DXGI_FORMAT Format; + UINT8 PlaneCount; + } D3D12_FEATURE_DATA_FORMAT_INFO; + +typedef struct D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT + { + UINT MaxGPUVirtualAddressBitsPerResource; + UINT MaxGPUVirtualAddressBitsPerProcess; + } D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT; + +typedef +enum D3D12_SHADER_CACHE_SUPPORT_FLAGS + { + D3D12_SHADER_CACHE_SUPPORT_NONE = 0, + D3D12_SHADER_CACHE_SUPPORT_SINGLE_PSO = 0x1, + D3D12_SHADER_CACHE_SUPPORT_LIBRARY = 0x2, + D3D12_SHADER_CACHE_SUPPORT_AUTOMATIC_INPROC_CACHE = 0x4, + D3D12_SHADER_CACHE_SUPPORT_AUTOMATIC_DISK_CACHE = 0x8 + } D3D12_SHADER_CACHE_SUPPORT_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_SHADER_CACHE_SUPPORT_FLAGS ); +typedef struct D3D12_FEATURE_DATA_SHADER_CACHE + { + _Out_ D3D12_SHADER_CACHE_SUPPORT_FLAGS SupportFlags; + } D3D12_FEATURE_DATA_SHADER_CACHE; + +typedef struct D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY + { + _In_ D3D12_COMMAND_LIST_TYPE CommandListType; + _In_ UINT Priority; + _Out_ BOOL PriorityForTypeIsSupported; + } D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY; + +typedef +enum D3D12_COMMAND_LIST_SUPPORT_FLAGS + { + D3D12_COMMAND_LIST_SUPPORT_FLAG_NONE = 0, + D3D12_COMMAND_LIST_SUPPORT_FLAG_DIRECT = ( 1 << D3D12_COMMAND_LIST_TYPE_DIRECT ) , + D3D12_COMMAND_LIST_SUPPORT_FLAG_BUNDLE = ( 1 << D3D12_COMMAND_LIST_TYPE_BUNDLE ) , + D3D12_COMMAND_LIST_SUPPORT_FLAG_COMPUTE = ( 1 << D3D12_COMMAND_LIST_TYPE_COMPUTE ) , + D3D12_COMMAND_LIST_SUPPORT_FLAG_COPY = ( 1 << D3D12_COMMAND_LIST_TYPE_COPY ) , + D3D12_COMMAND_LIST_SUPPORT_FLAG_VIDEO_DECODE = ( 1 << D3D12_COMMAND_LIST_TYPE_VIDEO_DECODE ) , + D3D12_COMMAND_LIST_SUPPORT_FLAG_VIDEO_PROCESS = ( 1 << D3D12_COMMAND_LIST_TYPE_VIDEO_PROCESS ) + } D3D12_COMMAND_LIST_SUPPORT_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_COMMAND_LIST_SUPPORT_FLAGS ); +typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS3 + { + _Out_ BOOL CopyQueueTimestampQueriesSupported; + _Out_ BOOL CastingFullyTypedFormatSupported; + _Out_ D3D12_COMMAND_LIST_SUPPORT_FLAGS WriteBufferImmediateSupportFlags; + _Out_ D3D12_VIEW_INSTANCING_TIER ViewInstancingTier; + _Out_ BOOL BarycentricsSupported; + } D3D12_FEATURE_DATA_D3D12_OPTIONS3; + +typedef struct D3D12_FEATURE_DATA_EXISTING_HEAPS + { + _Out_ BOOL Supported; + } D3D12_FEATURE_DATA_EXISTING_HEAPS; + +typedef struct D3D12_RESOURCE_ALLOCATION_INFO + { + UINT64 SizeInBytes; + UINT64 Alignment; + } D3D12_RESOURCE_ALLOCATION_INFO; + +typedef +enum D3D12_HEAP_TYPE + { + D3D12_HEAP_TYPE_DEFAULT = 1, + D3D12_HEAP_TYPE_UPLOAD = 2, + D3D12_HEAP_TYPE_READBACK = 3, + D3D12_HEAP_TYPE_CUSTOM = 4 + } D3D12_HEAP_TYPE; + +typedef +enum D3D12_CPU_PAGE_PROPERTY + { + D3D12_CPU_PAGE_PROPERTY_UNKNOWN = 0, + D3D12_CPU_PAGE_PROPERTY_NOT_AVAILABLE = 1, + D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE = 2, + D3D12_CPU_PAGE_PROPERTY_WRITE_BACK = 3 + } D3D12_CPU_PAGE_PROPERTY; + +typedef +enum D3D12_MEMORY_POOL + { + D3D12_MEMORY_POOL_UNKNOWN = 0, + D3D12_MEMORY_POOL_L0 = 1, + D3D12_MEMORY_POOL_L1 = 2 + } D3D12_MEMORY_POOL; + +typedef struct D3D12_HEAP_PROPERTIES + { + D3D12_HEAP_TYPE Type; + D3D12_CPU_PAGE_PROPERTY CPUPageProperty; + D3D12_MEMORY_POOL MemoryPoolPreference; + UINT CreationNodeMask; + UINT VisibleNodeMask; + } D3D12_HEAP_PROPERTIES; + +typedef +enum D3D12_HEAP_FLAGS + { + D3D12_HEAP_FLAG_NONE = 0, + D3D12_HEAP_FLAG_SHARED = 0x1, + D3D12_HEAP_FLAG_DENY_BUFFERS = 0x4, + D3D12_HEAP_FLAG_ALLOW_DISPLAY = 0x8, + D3D12_HEAP_FLAG_SHARED_CROSS_ADAPTER = 0x20, + D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES = 0x40, + D3D12_HEAP_FLAG_DENY_NON_RT_DS_TEXTURES = 0x80, + D3D12_HEAP_FLAG_HARDWARE_PROTECTED = 0x100, + D3D12_HEAP_FLAG_ALLOW_WRITE_WATCH = 0x200, + D3D12_HEAP_FLAG_ALLOW_ALL_BUFFERS_AND_TEXTURES = 0, + D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS = 0xc0, + D3D12_HEAP_FLAG_ALLOW_ONLY_NON_RT_DS_TEXTURES = 0x44, + D3D12_HEAP_FLAG_ALLOW_ONLY_RT_DS_TEXTURES = 0x84 + } D3D12_HEAP_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_HEAP_FLAGS ); +typedef struct D3D12_HEAP_DESC + { + UINT64 SizeInBytes; + D3D12_HEAP_PROPERTIES Properties; + UINT64 Alignment; + D3D12_HEAP_FLAGS Flags; + } D3D12_HEAP_DESC; + +typedef +enum D3D12_RESOURCE_DIMENSION + { + D3D12_RESOURCE_DIMENSION_UNKNOWN = 0, + D3D12_RESOURCE_DIMENSION_BUFFER = 1, + D3D12_RESOURCE_DIMENSION_TEXTURE1D = 2, + D3D12_RESOURCE_DIMENSION_TEXTURE2D = 3, + D3D12_RESOURCE_DIMENSION_TEXTURE3D = 4 + } D3D12_RESOURCE_DIMENSION; + +typedef +enum D3D12_TEXTURE_LAYOUT + { + D3D12_TEXTURE_LAYOUT_UNKNOWN = 0, + D3D12_TEXTURE_LAYOUT_ROW_MAJOR = 1, + D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE = 2, + D3D12_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE = 3 + } D3D12_TEXTURE_LAYOUT; + +typedef +enum D3D12_RESOURCE_FLAGS + { + D3D12_RESOURCE_FLAG_NONE = 0, + D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET = 0x1, + D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL = 0x2, + D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS = 0x4, + D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE = 0x8, + D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER = 0x10, + D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS = 0x20, + D3D12_RESOURCE_FLAG_VIDEO_DECODE_REFERENCE_ONLY = 0x40 + } D3D12_RESOURCE_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_RESOURCE_FLAGS ); +typedef struct D3D12_RESOURCE_DESC + { + D3D12_RESOURCE_DIMENSION Dimension; + UINT64 Alignment; + UINT64 Width; + UINT Height; + UINT16 DepthOrArraySize; + UINT16 MipLevels; + DXGI_FORMAT Format; + DXGI_SAMPLE_DESC SampleDesc; + D3D12_TEXTURE_LAYOUT Layout; + D3D12_RESOURCE_FLAGS Flags; + } D3D12_RESOURCE_DESC; + +typedef struct D3D12_DEPTH_STENCIL_VALUE + { + FLOAT Depth; + UINT8 Stencil; + } D3D12_DEPTH_STENCIL_VALUE; + +typedef struct D3D12_CLEAR_VALUE + { + DXGI_FORMAT Format; + union + { + FLOAT Color[ 4 ]; + D3D12_DEPTH_STENCIL_VALUE DepthStencil; + } ; + } D3D12_CLEAR_VALUE; + +typedef struct D3D12_RANGE + { + SIZE_T Begin; + SIZE_T End; + } D3D12_RANGE; + +typedef struct D3D12_RANGE_UINT64 + { + UINT64 Begin; + UINT64 End; + } D3D12_RANGE_UINT64; + +typedef struct D3D12_SUBRESOURCE_RANGE_UINT64 + { + UINT Subresource; + D3D12_RANGE_UINT64 Range; + } D3D12_SUBRESOURCE_RANGE_UINT64; + +typedef struct D3D12_SUBRESOURCE_INFO + { + UINT64 Offset; + UINT RowPitch; + UINT DepthPitch; + } D3D12_SUBRESOURCE_INFO; + +typedef struct D3D12_TILED_RESOURCE_COORDINATE + { + UINT X; + UINT Y; + UINT Z; + UINT Subresource; + } D3D12_TILED_RESOURCE_COORDINATE; + +typedef struct D3D12_TILE_REGION_SIZE + { + UINT NumTiles; + BOOL UseBox; + UINT Width; + UINT16 Height; + UINT16 Depth; + } D3D12_TILE_REGION_SIZE; + +typedef +enum D3D12_TILE_RANGE_FLAGS + { + D3D12_TILE_RANGE_FLAG_NONE = 0, + D3D12_TILE_RANGE_FLAG_NULL = 1, + D3D12_TILE_RANGE_FLAG_SKIP = 2, + D3D12_TILE_RANGE_FLAG_REUSE_SINGLE_TILE = 4 + } D3D12_TILE_RANGE_FLAGS; + +typedef struct D3D12_SUBRESOURCE_TILING + { + UINT WidthInTiles; + UINT16 HeightInTiles; + UINT16 DepthInTiles; + UINT StartTileIndexInOverallResource; + } D3D12_SUBRESOURCE_TILING; + +typedef struct D3D12_TILE_SHAPE + { + UINT WidthInTexels; + UINT HeightInTexels; + UINT DepthInTexels; + } D3D12_TILE_SHAPE; + +typedef struct D3D12_PACKED_MIP_INFO + { + UINT8 NumStandardMips; + UINT8 NumPackedMips; + UINT NumTilesForPackedMips; + UINT StartTileIndexInOverallResource; + } D3D12_PACKED_MIP_INFO; + +typedef +enum D3D12_TILE_MAPPING_FLAGS + { + D3D12_TILE_MAPPING_FLAG_NONE = 0, + D3D12_TILE_MAPPING_FLAG_NO_HAZARD = 0x1 + } D3D12_TILE_MAPPING_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_TILE_MAPPING_FLAGS ); +typedef +enum D3D12_TILE_COPY_FLAGS + { + D3D12_TILE_COPY_FLAG_NONE = 0, + D3D12_TILE_COPY_FLAG_NO_HAZARD = 0x1, + D3D12_TILE_COPY_FLAG_LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE = 0x2, + D3D12_TILE_COPY_FLAG_SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER = 0x4 + } D3D12_TILE_COPY_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_TILE_COPY_FLAGS ); +typedef +enum D3D12_RESOURCE_STATES + { + D3D12_RESOURCE_STATE_COMMON = 0, + D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER = 0x1, + D3D12_RESOURCE_STATE_INDEX_BUFFER = 0x2, + D3D12_RESOURCE_STATE_RENDER_TARGET = 0x4, + D3D12_RESOURCE_STATE_UNORDERED_ACCESS = 0x8, + D3D12_RESOURCE_STATE_DEPTH_WRITE = 0x10, + D3D12_RESOURCE_STATE_DEPTH_READ = 0x20, + D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE = 0x40, + D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE = 0x80, + D3D12_RESOURCE_STATE_STREAM_OUT = 0x100, + D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT = 0x200, + D3D12_RESOURCE_STATE_COPY_DEST = 0x400, + D3D12_RESOURCE_STATE_COPY_SOURCE = 0x800, + D3D12_RESOURCE_STATE_RESOLVE_DEST = 0x1000, + D3D12_RESOURCE_STATE_RESOLVE_SOURCE = 0x2000, + D3D12_RESOURCE_STATE_GENERIC_READ = ( ( ( ( ( 0x1 | 0x2 ) | 0x40 ) | 0x80 ) | 0x200 ) | 0x800 ) , + D3D12_RESOURCE_STATE_PRESENT = 0, + D3D12_RESOURCE_STATE_PREDICATION = 0x200, + D3D12_RESOURCE_STATE_VIDEO_DECODE_READ = 0x10000, + D3D12_RESOURCE_STATE_VIDEO_DECODE_WRITE = 0x20000, + D3D12_RESOURCE_STATE_VIDEO_PROCESS_READ = 0x40000, + D3D12_RESOURCE_STATE_VIDEO_PROCESS_WRITE = 0x80000 + } D3D12_RESOURCE_STATES; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_RESOURCE_STATES ); +typedef +enum D3D12_RESOURCE_BARRIER_TYPE + { + D3D12_RESOURCE_BARRIER_TYPE_TRANSITION = 0, + D3D12_RESOURCE_BARRIER_TYPE_ALIASING = ( D3D12_RESOURCE_BARRIER_TYPE_TRANSITION + 1 ) , + D3D12_RESOURCE_BARRIER_TYPE_UAV = ( D3D12_RESOURCE_BARRIER_TYPE_ALIASING + 1 ) + } D3D12_RESOURCE_BARRIER_TYPE; + + +typedef struct D3D12_RESOURCE_TRANSITION_BARRIER + { + ID3D12Resource *pResource; + UINT Subresource; + D3D12_RESOURCE_STATES StateBefore; + D3D12_RESOURCE_STATES StateAfter; + } D3D12_RESOURCE_TRANSITION_BARRIER; + +typedef struct D3D12_RESOURCE_ALIASING_BARRIER + { + ID3D12Resource *pResourceBefore; + ID3D12Resource *pResourceAfter; + } D3D12_RESOURCE_ALIASING_BARRIER; + +typedef struct D3D12_RESOURCE_UAV_BARRIER + { + ID3D12Resource *pResource; + } D3D12_RESOURCE_UAV_BARRIER; + +typedef +enum D3D12_RESOURCE_BARRIER_FLAGS + { + D3D12_RESOURCE_BARRIER_FLAG_NONE = 0, + D3D12_RESOURCE_BARRIER_FLAG_BEGIN_ONLY = 0x1, + D3D12_RESOURCE_BARRIER_FLAG_END_ONLY = 0x2 + } D3D12_RESOURCE_BARRIER_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_RESOURCE_BARRIER_FLAGS ); +typedef struct D3D12_RESOURCE_BARRIER + { + D3D12_RESOURCE_BARRIER_TYPE Type; + D3D12_RESOURCE_BARRIER_FLAGS Flags; + union + { + D3D12_RESOURCE_TRANSITION_BARRIER Transition; + D3D12_RESOURCE_ALIASING_BARRIER Aliasing; + D3D12_RESOURCE_UAV_BARRIER UAV; + } ; + } D3D12_RESOURCE_BARRIER; + +typedef struct D3D12_SUBRESOURCE_FOOTPRINT + { + DXGI_FORMAT Format; + UINT Width; + UINT Height; + UINT Depth; + UINT RowPitch; + } D3D12_SUBRESOURCE_FOOTPRINT; + +typedef struct D3D12_PLACED_SUBRESOURCE_FOOTPRINT + { + UINT64 Offset; + D3D12_SUBRESOURCE_FOOTPRINT Footprint; + } D3D12_PLACED_SUBRESOURCE_FOOTPRINT; + +typedef +enum D3D12_TEXTURE_COPY_TYPE + { + D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX = 0, + D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT = 1 + } D3D12_TEXTURE_COPY_TYPE; + +typedef struct D3D12_TEXTURE_COPY_LOCATION + { + ID3D12Resource *pResource; + D3D12_TEXTURE_COPY_TYPE Type; + union + { + D3D12_PLACED_SUBRESOURCE_FOOTPRINT PlacedFootprint; + UINT SubresourceIndex; + } ; + } D3D12_TEXTURE_COPY_LOCATION; + +typedef +enum D3D12_RESOLVE_MODE + { + D3D12_RESOLVE_MODE_DECOMPRESS = 0, + D3D12_RESOLVE_MODE_MIN = 1, + D3D12_RESOLVE_MODE_MAX = 2, + D3D12_RESOLVE_MODE_AVERAGE = 3 + } D3D12_RESOLVE_MODE; + +typedef struct D3D12_SAMPLE_POSITION + { + INT8 X; + INT8 Y; + } D3D12_SAMPLE_POSITION; + +typedef struct D3D12_VIEW_INSTANCE_LOCATION + { + UINT ViewportArrayIndex; + UINT RenderTargetArrayIndex; + } D3D12_VIEW_INSTANCE_LOCATION; + +typedef +enum D3D12_VIEW_INSTANCING_FLAGS + { + D3D12_VIEW_INSTANCING_FLAG_NONE = 0, + D3D12_VIEW_INSTANCING_FLAG_ENABLE_VIEW_INSTANCE_MASKING = 0x1 + } D3D12_VIEW_INSTANCING_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_VIEW_INSTANCING_FLAGS ); +typedef struct D3D12_VIEW_INSTANCING_DESC + { + UINT ViewInstanceCount; + _Field_size_full_(ViewInstanceCount) const D3D12_VIEW_INSTANCE_LOCATION *pViewInstanceLocations; + D3D12_VIEW_INSTANCING_FLAGS Flags; + } D3D12_VIEW_INSTANCING_DESC; + +typedef +enum D3D12_SHADER_COMPONENT_MAPPING + { + D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_0 = 0, + D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_1 = 1, + D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_2 = 2, + D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_3 = 3, + D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_0 = 4, + D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_1 = 5 + } D3D12_SHADER_COMPONENT_MAPPING; + +#define D3D12_SHADER_COMPONENT_MAPPING_MASK 0x7 +#define D3D12_SHADER_COMPONENT_MAPPING_SHIFT 3 +#define D3D12_SHADER_COMPONENT_MAPPING_ALWAYS_SET_BIT_AVOIDING_ZEROMEM_MISTAKES (1<<(D3D12_SHADER_COMPONENT_MAPPING_SHIFT*4)) +#define D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(Src0,Src1,Src2,Src3) ((((Src0)&D3D12_SHADER_COMPONENT_MAPPING_MASK)| \ + (((Src1)&D3D12_SHADER_COMPONENT_MAPPING_MASK)<> (D3D12_SHADER_COMPONENT_MAPPING_SHIFT*ComponentToExtract) & D3D12_SHADER_COMPONENT_MAPPING_MASK)) +#define D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(0,1,2,3) +typedef +enum D3D12_BUFFER_SRV_FLAGS + { + D3D12_BUFFER_SRV_FLAG_NONE = 0, + D3D12_BUFFER_SRV_FLAG_RAW = 0x1 + } D3D12_BUFFER_SRV_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_BUFFER_SRV_FLAGS ); +typedef struct D3D12_BUFFER_SRV + { + UINT64 FirstElement; + UINT NumElements; + UINT StructureByteStride; + D3D12_BUFFER_SRV_FLAGS Flags; + } D3D12_BUFFER_SRV; + +typedef struct D3D12_TEX1D_SRV + { + UINT MostDetailedMip; + UINT MipLevels; + FLOAT ResourceMinLODClamp; + } D3D12_TEX1D_SRV; + +typedef struct D3D12_TEX1D_ARRAY_SRV + { + UINT MostDetailedMip; + UINT MipLevels; + UINT FirstArraySlice; + UINT ArraySize; + FLOAT ResourceMinLODClamp; + } D3D12_TEX1D_ARRAY_SRV; + +typedef struct D3D12_TEX2D_SRV + { + UINT MostDetailedMip; + UINT MipLevels; + UINT PlaneSlice; + FLOAT ResourceMinLODClamp; + } D3D12_TEX2D_SRV; + +typedef struct D3D12_TEX2D_ARRAY_SRV + { + UINT MostDetailedMip; + UINT MipLevels; + UINT FirstArraySlice; + UINT ArraySize; + UINT PlaneSlice; + FLOAT ResourceMinLODClamp; + } D3D12_TEX2D_ARRAY_SRV; + +typedef struct D3D12_TEX3D_SRV + { + UINT MostDetailedMip; + UINT MipLevels; + FLOAT ResourceMinLODClamp; + } D3D12_TEX3D_SRV; + +typedef struct D3D12_TEXCUBE_SRV + { + UINT MostDetailedMip; + UINT MipLevels; + FLOAT ResourceMinLODClamp; + } D3D12_TEXCUBE_SRV; + +typedef struct D3D12_TEXCUBE_ARRAY_SRV + { + UINT MostDetailedMip; + UINT MipLevels; + UINT First2DArrayFace; + UINT NumCubes; + FLOAT ResourceMinLODClamp; + } D3D12_TEXCUBE_ARRAY_SRV; + +typedef struct D3D12_TEX2DMS_SRV + { + UINT UnusedField_NothingToDefine; + } D3D12_TEX2DMS_SRV; + +typedef struct D3D12_TEX2DMS_ARRAY_SRV + { + UINT FirstArraySlice; + UINT ArraySize; + } D3D12_TEX2DMS_ARRAY_SRV; + +typedef +enum D3D12_SRV_DIMENSION + { + D3D12_SRV_DIMENSION_UNKNOWN = 0, + D3D12_SRV_DIMENSION_BUFFER = 1, + D3D12_SRV_DIMENSION_TEXTURE1D = 2, + D3D12_SRV_DIMENSION_TEXTURE1DARRAY = 3, + D3D12_SRV_DIMENSION_TEXTURE2D = 4, + D3D12_SRV_DIMENSION_TEXTURE2DARRAY = 5, + D3D12_SRV_DIMENSION_TEXTURE2DMS = 6, + D3D12_SRV_DIMENSION_TEXTURE2DMSARRAY = 7, + D3D12_SRV_DIMENSION_TEXTURE3D = 8, + D3D12_SRV_DIMENSION_TEXTURECUBE = 9, + D3D12_SRV_DIMENSION_TEXTURECUBEARRAY = 10 + } D3D12_SRV_DIMENSION; + +typedef struct D3D12_SHADER_RESOURCE_VIEW_DESC + { + DXGI_FORMAT Format; + D3D12_SRV_DIMENSION ViewDimension; + UINT Shader4ComponentMapping; + union + { + D3D12_BUFFER_SRV Buffer; + D3D12_TEX1D_SRV Texture1D; + D3D12_TEX1D_ARRAY_SRV Texture1DArray; + D3D12_TEX2D_SRV Texture2D; + D3D12_TEX2D_ARRAY_SRV Texture2DArray; + D3D12_TEX2DMS_SRV Texture2DMS; + D3D12_TEX2DMS_ARRAY_SRV Texture2DMSArray; + D3D12_TEX3D_SRV Texture3D; + D3D12_TEXCUBE_SRV TextureCube; + D3D12_TEXCUBE_ARRAY_SRV TextureCubeArray; + } ; + } D3D12_SHADER_RESOURCE_VIEW_DESC; + +typedef struct D3D12_CONSTANT_BUFFER_VIEW_DESC + { + D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; + UINT SizeInBytes; + } D3D12_CONSTANT_BUFFER_VIEW_DESC; + +typedef +enum D3D12_FILTER + { + D3D12_FILTER_MIN_MAG_MIP_POINT = 0, + D3D12_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x1, + D3D12_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x4, + D3D12_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x5, + D3D12_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x10, + D3D12_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x11, + D3D12_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x14, + D3D12_FILTER_MIN_MAG_MIP_LINEAR = 0x15, + D3D12_FILTER_ANISOTROPIC = 0x55, + D3D12_FILTER_COMPARISON_MIN_MAG_MIP_POINT = 0x80, + D3D12_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 0x81, + D3D12_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x84, + D3D12_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 0x85, + D3D12_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 0x90, + D3D12_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x91, + D3D12_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 0x94, + D3D12_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR = 0x95, + D3D12_FILTER_COMPARISON_ANISOTROPIC = 0xd5, + D3D12_FILTER_MINIMUM_MIN_MAG_MIP_POINT = 0x100, + D3D12_FILTER_MINIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x101, + D3D12_FILTER_MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x104, + D3D12_FILTER_MINIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x105, + D3D12_FILTER_MINIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x110, + D3D12_FILTER_MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x111, + D3D12_FILTER_MINIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x114, + D3D12_FILTER_MINIMUM_MIN_MAG_MIP_LINEAR = 0x115, + D3D12_FILTER_MINIMUM_ANISOTROPIC = 0x155, + D3D12_FILTER_MAXIMUM_MIN_MAG_MIP_POINT = 0x180, + D3D12_FILTER_MAXIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x181, + D3D12_FILTER_MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x184, + D3D12_FILTER_MAXIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x185, + D3D12_FILTER_MAXIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x190, + D3D12_FILTER_MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x191, + D3D12_FILTER_MAXIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x194, + D3D12_FILTER_MAXIMUM_MIN_MAG_MIP_LINEAR = 0x195, + D3D12_FILTER_MAXIMUM_ANISOTROPIC = 0x1d5 + } D3D12_FILTER; + +typedef +enum D3D12_FILTER_TYPE + { + D3D12_FILTER_TYPE_POINT = 0, + D3D12_FILTER_TYPE_LINEAR = 1 + } D3D12_FILTER_TYPE; + +typedef +enum D3D12_FILTER_REDUCTION_TYPE + { + D3D12_FILTER_REDUCTION_TYPE_STANDARD = 0, + D3D12_FILTER_REDUCTION_TYPE_COMPARISON = 1, + D3D12_FILTER_REDUCTION_TYPE_MINIMUM = 2, + D3D12_FILTER_REDUCTION_TYPE_MAXIMUM = 3 + } D3D12_FILTER_REDUCTION_TYPE; + +#define D3D12_FILTER_REDUCTION_TYPE_MASK ( 0x3 ) + +#define D3D12_FILTER_REDUCTION_TYPE_SHIFT ( 7 ) + +#define D3D12_FILTER_TYPE_MASK ( 0x3 ) + +#define D3D12_MIN_FILTER_SHIFT ( 4 ) + +#define D3D12_MAG_FILTER_SHIFT ( 2 ) + +#define D3D12_MIP_FILTER_SHIFT ( 0 ) + +#define D3D12_ANISOTROPIC_FILTERING_BIT ( 0x40 ) + +#define D3D12_ENCODE_BASIC_FILTER( min, mag, mip, reduction ) \ + ( ( D3D12_FILTER ) ( \ + ( ( ( min ) & D3D12_FILTER_TYPE_MASK ) << D3D12_MIN_FILTER_SHIFT ) | \ + ( ( ( mag ) & D3D12_FILTER_TYPE_MASK ) << D3D12_MAG_FILTER_SHIFT ) | \ + ( ( ( mip ) & D3D12_FILTER_TYPE_MASK ) << D3D12_MIP_FILTER_SHIFT ) | \ + ( ( ( reduction ) & D3D12_FILTER_REDUCTION_TYPE_MASK ) << D3D12_FILTER_REDUCTION_TYPE_SHIFT ) ) ) +#define D3D12_ENCODE_ANISOTROPIC_FILTER( reduction ) \ + ( ( D3D12_FILTER ) ( \ + D3D12_ANISOTROPIC_FILTERING_BIT | \ + D3D12_ENCODE_BASIC_FILTER( D3D12_FILTER_TYPE_LINEAR, \ + D3D12_FILTER_TYPE_LINEAR, \ + D3D12_FILTER_TYPE_LINEAR, \ + reduction ) ) ) +#define D3D12_DECODE_MIN_FILTER( D3D12Filter ) \ + ( ( D3D12_FILTER_TYPE ) \ + ( ( ( D3D12Filter ) >> D3D12_MIN_FILTER_SHIFT ) & D3D12_FILTER_TYPE_MASK ) ) +#define D3D12_DECODE_MAG_FILTER( D3D12Filter ) \ + ( ( D3D12_FILTER_TYPE ) \ + ( ( ( D3D12Filter ) >> D3D12_MAG_FILTER_SHIFT ) & D3D12_FILTER_TYPE_MASK ) ) +#define D3D12_DECODE_MIP_FILTER( D3D12Filter ) \ + ( ( D3D12_FILTER_TYPE ) \ + ( ( ( D3D12Filter ) >> D3D12_MIP_FILTER_SHIFT ) & D3D12_FILTER_TYPE_MASK ) ) +#define D3D12_DECODE_FILTER_REDUCTION( D3D12Filter ) \ + ( ( D3D12_FILTER_REDUCTION_TYPE ) \ + ( ( ( D3D12Filter ) >> D3D12_FILTER_REDUCTION_TYPE_SHIFT ) & D3D12_FILTER_REDUCTION_TYPE_MASK ) ) +#define D3D12_DECODE_IS_COMPARISON_FILTER( D3D12Filter ) \ + ( D3D12_DECODE_FILTER_REDUCTION( D3D12Filter ) == D3D12_FILTER_REDUCTION_TYPE_COMPARISON ) +#define D3D12_DECODE_IS_ANISOTROPIC_FILTER( D3D12Filter ) \ + ( ( ( D3D12Filter ) & D3D12_ANISOTROPIC_FILTERING_BIT ) && \ + ( D3D12_FILTER_TYPE_LINEAR == D3D12_DECODE_MIN_FILTER( D3D12Filter ) ) && \ + ( D3D12_FILTER_TYPE_LINEAR == D3D12_DECODE_MAG_FILTER( D3D12Filter ) ) && \ + ( D3D12_FILTER_TYPE_LINEAR == D3D12_DECODE_MIP_FILTER( D3D12Filter ) ) ) +typedef +enum D3D12_TEXTURE_ADDRESS_MODE + { + D3D12_TEXTURE_ADDRESS_MODE_WRAP = 1, + D3D12_TEXTURE_ADDRESS_MODE_MIRROR = 2, + D3D12_TEXTURE_ADDRESS_MODE_CLAMP = 3, + D3D12_TEXTURE_ADDRESS_MODE_BORDER = 4, + D3D12_TEXTURE_ADDRESS_MODE_MIRROR_ONCE = 5 + } D3D12_TEXTURE_ADDRESS_MODE; + +typedef struct D3D12_SAMPLER_DESC + { + D3D12_FILTER Filter; + D3D12_TEXTURE_ADDRESS_MODE AddressU; + D3D12_TEXTURE_ADDRESS_MODE AddressV; + D3D12_TEXTURE_ADDRESS_MODE AddressW; + FLOAT MipLODBias; + UINT MaxAnisotropy; + D3D12_COMPARISON_FUNC ComparisonFunc; + FLOAT BorderColor[ 4 ]; + FLOAT MinLOD; + FLOAT MaxLOD; + } D3D12_SAMPLER_DESC; + +typedef +enum D3D12_BUFFER_UAV_FLAGS + { + D3D12_BUFFER_UAV_FLAG_NONE = 0, + D3D12_BUFFER_UAV_FLAG_RAW = 0x1 + } D3D12_BUFFER_UAV_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_BUFFER_UAV_FLAGS ); +typedef struct D3D12_BUFFER_UAV + { + UINT64 FirstElement; + UINT NumElements; + UINT StructureByteStride; + UINT64 CounterOffsetInBytes; + D3D12_BUFFER_UAV_FLAGS Flags; + } D3D12_BUFFER_UAV; + +typedef struct D3D12_TEX1D_UAV + { + UINT MipSlice; + } D3D12_TEX1D_UAV; + +typedef struct D3D12_TEX1D_ARRAY_UAV + { + UINT MipSlice; + UINT FirstArraySlice; + UINT ArraySize; + } D3D12_TEX1D_ARRAY_UAV; + +typedef struct D3D12_TEX2D_UAV + { + UINT MipSlice; + UINT PlaneSlice; + } D3D12_TEX2D_UAV; + +typedef struct D3D12_TEX2D_ARRAY_UAV + { + UINT MipSlice; + UINT FirstArraySlice; + UINT ArraySize; + UINT PlaneSlice; + } D3D12_TEX2D_ARRAY_UAV; + +typedef struct D3D12_TEX3D_UAV + { + UINT MipSlice; + UINT FirstWSlice; + UINT WSize; + } D3D12_TEX3D_UAV; + +typedef +enum D3D12_UAV_DIMENSION + { + D3D12_UAV_DIMENSION_UNKNOWN = 0, + D3D12_UAV_DIMENSION_BUFFER = 1, + D3D12_UAV_DIMENSION_TEXTURE1D = 2, + D3D12_UAV_DIMENSION_TEXTURE1DARRAY = 3, + D3D12_UAV_DIMENSION_TEXTURE2D = 4, + D3D12_UAV_DIMENSION_TEXTURE2DARRAY = 5, + D3D12_UAV_DIMENSION_TEXTURE3D = 8 + } D3D12_UAV_DIMENSION; + +typedef struct D3D12_UNORDERED_ACCESS_VIEW_DESC + { + DXGI_FORMAT Format; + D3D12_UAV_DIMENSION ViewDimension; + union + { + D3D12_BUFFER_UAV Buffer; + D3D12_TEX1D_UAV Texture1D; + D3D12_TEX1D_ARRAY_UAV Texture1DArray; + D3D12_TEX2D_UAV Texture2D; + D3D12_TEX2D_ARRAY_UAV Texture2DArray; + D3D12_TEX3D_UAV Texture3D; + } ; + } D3D12_UNORDERED_ACCESS_VIEW_DESC; + +typedef struct D3D12_BUFFER_RTV + { + UINT64 FirstElement; + UINT NumElements; + } D3D12_BUFFER_RTV; + +typedef struct D3D12_TEX1D_RTV + { + UINT MipSlice; + } D3D12_TEX1D_RTV; + +typedef struct D3D12_TEX1D_ARRAY_RTV + { + UINT MipSlice; + UINT FirstArraySlice; + UINT ArraySize; + } D3D12_TEX1D_ARRAY_RTV; + +typedef struct D3D12_TEX2D_RTV + { + UINT MipSlice; + UINT PlaneSlice; + } D3D12_TEX2D_RTV; + +typedef struct D3D12_TEX2DMS_RTV + { + UINT UnusedField_NothingToDefine; + } D3D12_TEX2DMS_RTV; + +typedef struct D3D12_TEX2D_ARRAY_RTV + { + UINT MipSlice; + UINT FirstArraySlice; + UINT ArraySize; + UINT PlaneSlice; + } D3D12_TEX2D_ARRAY_RTV; + +typedef struct D3D12_TEX2DMS_ARRAY_RTV + { + UINT FirstArraySlice; + UINT ArraySize; + } D3D12_TEX2DMS_ARRAY_RTV; + +typedef struct D3D12_TEX3D_RTV + { + UINT MipSlice; + UINT FirstWSlice; + UINT WSize; + } D3D12_TEX3D_RTV; + +typedef +enum D3D12_RTV_DIMENSION + { + D3D12_RTV_DIMENSION_UNKNOWN = 0, + D3D12_RTV_DIMENSION_BUFFER = 1, + D3D12_RTV_DIMENSION_TEXTURE1D = 2, + D3D12_RTV_DIMENSION_TEXTURE1DARRAY = 3, + D3D12_RTV_DIMENSION_TEXTURE2D = 4, + D3D12_RTV_DIMENSION_TEXTURE2DARRAY = 5, + D3D12_RTV_DIMENSION_TEXTURE2DMS = 6, + D3D12_RTV_DIMENSION_TEXTURE2DMSARRAY = 7, + D3D12_RTV_DIMENSION_TEXTURE3D = 8 + } D3D12_RTV_DIMENSION; + +typedef struct D3D12_RENDER_TARGET_VIEW_DESC + { + DXGI_FORMAT Format; + D3D12_RTV_DIMENSION ViewDimension; + union + { + D3D12_BUFFER_RTV Buffer; + D3D12_TEX1D_RTV Texture1D; + D3D12_TEX1D_ARRAY_RTV Texture1DArray; + D3D12_TEX2D_RTV Texture2D; + D3D12_TEX2D_ARRAY_RTV Texture2DArray; + D3D12_TEX2DMS_RTV Texture2DMS; + D3D12_TEX2DMS_ARRAY_RTV Texture2DMSArray; + D3D12_TEX3D_RTV Texture3D; + } ; + } D3D12_RENDER_TARGET_VIEW_DESC; + +typedef struct D3D12_TEX1D_DSV + { + UINT MipSlice; + } D3D12_TEX1D_DSV; + +typedef struct D3D12_TEX1D_ARRAY_DSV + { + UINT MipSlice; + UINT FirstArraySlice; + UINT ArraySize; + } D3D12_TEX1D_ARRAY_DSV; + +typedef struct D3D12_TEX2D_DSV + { + UINT MipSlice; + } D3D12_TEX2D_DSV; + +typedef struct D3D12_TEX2D_ARRAY_DSV + { + UINT MipSlice; + UINT FirstArraySlice; + UINT ArraySize; + } D3D12_TEX2D_ARRAY_DSV; + +typedef struct D3D12_TEX2DMS_DSV + { + UINT UnusedField_NothingToDefine; + } D3D12_TEX2DMS_DSV; + +typedef struct D3D12_TEX2DMS_ARRAY_DSV + { + UINT FirstArraySlice; + UINT ArraySize; + } D3D12_TEX2DMS_ARRAY_DSV; + +typedef +enum D3D12_DSV_FLAGS + { + D3D12_DSV_FLAG_NONE = 0, + D3D12_DSV_FLAG_READ_ONLY_DEPTH = 0x1, + D3D12_DSV_FLAG_READ_ONLY_STENCIL = 0x2 + } D3D12_DSV_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_DSV_FLAGS ); +typedef +enum D3D12_DSV_DIMENSION + { + D3D12_DSV_DIMENSION_UNKNOWN = 0, + D3D12_DSV_DIMENSION_TEXTURE1D = 1, + D3D12_DSV_DIMENSION_TEXTURE1DARRAY = 2, + D3D12_DSV_DIMENSION_TEXTURE2D = 3, + D3D12_DSV_DIMENSION_TEXTURE2DARRAY = 4, + D3D12_DSV_DIMENSION_TEXTURE2DMS = 5, + D3D12_DSV_DIMENSION_TEXTURE2DMSARRAY = 6 + } D3D12_DSV_DIMENSION; + +typedef struct D3D12_DEPTH_STENCIL_VIEW_DESC + { + DXGI_FORMAT Format; + D3D12_DSV_DIMENSION ViewDimension; + D3D12_DSV_FLAGS Flags; + union + { + D3D12_TEX1D_DSV Texture1D; + D3D12_TEX1D_ARRAY_DSV Texture1DArray; + D3D12_TEX2D_DSV Texture2D; + D3D12_TEX2D_ARRAY_DSV Texture2DArray; + D3D12_TEX2DMS_DSV Texture2DMS; + D3D12_TEX2DMS_ARRAY_DSV Texture2DMSArray; + } ; + } D3D12_DEPTH_STENCIL_VIEW_DESC; + +typedef +enum D3D12_CLEAR_FLAGS + { + D3D12_CLEAR_FLAG_DEPTH = 0x1, + D3D12_CLEAR_FLAG_STENCIL = 0x2 + } D3D12_CLEAR_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_CLEAR_FLAGS ); +typedef +enum D3D12_FENCE_FLAGS + { + D3D12_FENCE_FLAG_NONE = 0, + D3D12_FENCE_FLAG_SHARED = 0x1, + D3D12_FENCE_FLAG_SHARED_CROSS_ADAPTER = 0x2, + D3D12_FENCE_FLAG_NON_MONITORED = 0x4 + } D3D12_FENCE_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_FENCE_FLAGS ); +typedef +enum D3D12_DESCRIPTOR_HEAP_TYPE + { + D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV = 0, + D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER = ( D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV + 1 ) , + D3D12_DESCRIPTOR_HEAP_TYPE_RTV = ( D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER + 1 ) , + D3D12_DESCRIPTOR_HEAP_TYPE_DSV = ( D3D12_DESCRIPTOR_HEAP_TYPE_RTV + 1 ) , + D3D12_DESCRIPTOR_HEAP_TYPE_NUM_TYPES = ( D3D12_DESCRIPTOR_HEAP_TYPE_DSV + 1 ) + } D3D12_DESCRIPTOR_HEAP_TYPE; + +typedef +enum D3D12_DESCRIPTOR_HEAP_FLAGS + { + D3D12_DESCRIPTOR_HEAP_FLAG_NONE = 0, + D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE = 0x1 + } D3D12_DESCRIPTOR_HEAP_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_DESCRIPTOR_HEAP_FLAGS ); +typedef struct D3D12_DESCRIPTOR_HEAP_DESC + { + D3D12_DESCRIPTOR_HEAP_TYPE Type; + UINT NumDescriptors; + D3D12_DESCRIPTOR_HEAP_FLAGS Flags; + UINT NodeMask; + } D3D12_DESCRIPTOR_HEAP_DESC; + +typedef +enum D3D12_DESCRIPTOR_RANGE_TYPE + { + D3D12_DESCRIPTOR_RANGE_TYPE_SRV = 0, + D3D12_DESCRIPTOR_RANGE_TYPE_UAV = ( D3D12_DESCRIPTOR_RANGE_TYPE_SRV + 1 ) , + D3D12_DESCRIPTOR_RANGE_TYPE_CBV = ( D3D12_DESCRIPTOR_RANGE_TYPE_UAV + 1 ) , + D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER = ( D3D12_DESCRIPTOR_RANGE_TYPE_CBV + 1 ) + } D3D12_DESCRIPTOR_RANGE_TYPE; + +typedef struct D3D12_DESCRIPTOR_RANGE + { + D3D12_DESCRIPTOR_RANGE_TYPE RangeType; + UINT NumDescriptors; + UINT BaseShaderRegister; + UINT RegisterSpace; + UINT OffsetInDescriptorsFromTableStart; + } D3D12_DESCRIPTOR_RANGE; + +typedef struct D3D12_ROOT_DESCRIPTOR_TABLE + { + UINT NumDescriptorRanges; + _Field_size_full_(NumDescriptorRanges) const D3D12_DESCRIPTOR_RANGE *pDescriptorRanges; + } D3D12_ROOT_DESCRIPTOR_TABLE; + +typedef struct D3D12_ROOT_CONSTANTS + { + UINT ShaderRegister; + UINT RegisterSpace; + UINT Num32BitValues; + } D3D12_ROOT_CONSTANTS; + +typedef struct D3D12_ROOT_DESCRIPTOR + { + UINT ShaderRegister; + UINT RegisterSpace; + } D3D12_ROOT_DESCRIPTOR; + +typedef +enum D3D12_SHADER_VISIBILITY + { + D3D12_SHADER_VISIBILITY_ALL = 0, + D3D12_SHADER_VISIBILITY_VERTEX = 1, + D3D12_SHADER_VISIBILITY_HULL = 2, + D3D12_SHADER_VISIBILITY_DOMAIN = 3, + D3D12_SHADER_VISIBILITY_GEOMETRY = 4, + D3D12_SHADER_VISIBILITY_PIXEL = 5 + } D3D12_SHADER_VISIBILITY; + +typedef +enum D3D12_ROOT_PARAMETER_TYPE + { + D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE = 0, + D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS = ( D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE + 1 ) , + D3D12_ROOT_PARAMETER_TYPE_CBV = ( D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS + 1 ) , + D3D12_ROOT_PARAMETER_TYPE_SRV = ( D3D12_ROOT_PARAMETER_TYPE_CBV + 1 ) , + D3D12_ROOT_PARAMETER_TYPE_UAV = ( D3D12_ROOT_PARAMETER_TYPE_SRV + 1 ) + } D3D12_ROOT_PARAMETER_TYPE; + +typedef struct D3D12_ROOT_PARAMETER + { + D3D12_ROOT_PARAMETER_TYPE ParameterType; + union + { + D3D12_ROOT_DESCRIPTOR_TABLE DescriptorTable; + D3D12_ROOT_CONSTANTS Constants; + D3D12_ROOT_DESCRIPTOR Descriptor; + } ; + D3D12_SHADER_VISIBILITY ShaderVisibility; + } D3D12_ROOT_PARAMETER; + +typedef +enum D3D12_ROOT_SIGNATURE_FLAGS + { + D3D12_ROOT_SIGNATURE_FLAG_NONE = 0, + D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT = 0x1, + D3D12_ROOT_SIGNATURE_FLAG_DENY_VERTEX_SHADER_ROOT_ACCESS = 0x2, + D3D12_ROOT_SIGNATURE_FLAG_DENY_HULL_SHADER_ROOT_ACCESS = 0x4, + D3D12_ROOT_SIGNATURE_FLAG_DENY_DOMAIN_SHADER_ROOT_ACCESS = 0x8, + D3D12_ROOT_SIGNATURE_FLAG_DENY_GEOMETRY_SHADER_ROOT_ACCESS = 0x10, + D3D12_ROOT_SIGNATURE_FLAG_DENY_PIXEL_SHADER_ROOT_ACCESS = 0x20, + D3D12_ROOT_SIGNATURE_FLAG_ALLOW_STREAM_OUTPUT = 0x40 + } D3D12_ROOT_SIGNATURE_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_ROOT_SIGNATURE_FLAGS ); +typedef +enum D3D12_STATIC_BORDER_COLOR + { + D3D12_STATIC_BORDER_COLOR_TRANSPARENT_BLACK = 0, + D3D12_STATIC_BORDER_COLOR_OPAQUE_BLACK = ( D3D12_STATIC_BORDER_COLOR_TRANSPARENT_BLACK + 1 ) , + D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE = ( D3D12_STATIC_BORDER_COLOR_OPAQUE_BLACK + 1 ) + } D3D12_STATIC_BORDER_COLOR; + +typedef struct D3D12_STATIC_SAMPLER_DESC + { + D3D12_FILTER Filter; + D3D12_TEXTURE_ADDRESS_MODE AddressU; + D3D12_TEXTURE_ADDRESS_MODE AddressV; + D3D12_TEXTURE_ADDRESS_MODE AddressW; + FLOAT MipLODBias; + UINT MaxAnisotropy; + D3D12_COMPARISON_FUNC ComparisonFunc; + D3D12_STATIC_BORDER_COLOR BorderColor; + FLOAT MinLOD; + FLOAT MaxLOD; + UINT ShaderRegister; + UINT RegisterSpace; + D3D12_SHADER_VISIBILITY ShaderVisibility; + } D3D12_STATIC_SAMPLER_DESC; + +typedef struct D3D12_ROOT_SIGNATURE_DESC + { + UINT NumParameters; + _Field_size_full_(NumParameters) const D3D12_ROOT_PARAMETER *pParameters; + UINT NumStaticSamplers; + _Field_size_full_(NumStaticSamplers) const D3D12_STATIC_SAMPLER_DESC *pStaticSamplers; + D3D12_ROOT_SIGNATURE_FLAGS Flags; + } D3D12_ROOT_SIGNATURE_DESC; + +typedef +enum D3D12_DESCRIPTOR_RANGE_FLAGS + { + D3D12_DESCRIPTOR_RANGE_FLAG_NONE = 0, + D3D12_DESCRIPTOR_RANGE_FLAG_DESCRIPTORS_VOLATILE = 0x1, + D3D12_DESCRIPTOR_RANGE_FLAG_DATA_VOLATILE = 0x2, + D3D12_DESCRIPTOR_RANGE_FLAG_DATA_STATIC_WHILE_SET_AT_EXECUTE = 0x4, + D3D12_DESCRIPTOR_RANGE_FLAG_DATA_STATIC = 0x8 + } D3D12_DESCRIPTOR_RANGE_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_DESCRIPTOR_RANGE_FLAGS ); +typedef struct D3D12_DESCRIPTOR_RANGE1 + { + D3D12_DESCRIPTOR_RANGE_TYPE RangeType; + UINT NumDescriptors; + UINT BaseShaderRegister; + UINT RegisterSpace; + D3D12_DESCRIPTOR_RANGE_FLAGS Flags; + UINT OffsetInDescriptorsFromTableStart; + } D3D12_DESCRIPTOR_RANGE1; + +typedef struct D3D12_ROOT_DESCRIPTOR_TABLE1 + { + UINT NumDescriptorRanges; + _Field_size_full_(NumDescriptorRanges) const D3D12_DESCRIPTOR_RANGE1 *pDescriptorRanges; + } D3D12_ROOT_DESCRIPTOR_TABLE1; + +typedef +enum D3D12_ROOT_DESCRIPTOR_FLAGS + { + D3D12_ROOT_DESCRIPTOR_FLAG_NONE = 0, + D3D12_ROOT_DESCRIPTOR_FLAG_DATA_VOLATILE = 0x2, + D3D12_ROOT_DESCRIPTOR_FLAG_DATA_STATIC_WHILE_SET_AT_EXECUTE = 0x4, + D3D12_ROOT_DESCRIPTOR_FLAG_DATA_STATIC = 0x8 + } D3D12_ROOT_DESCRIPTOR_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_ROOT_DESCRIPTOR_FLAGS ); +typedef struct D3D12_ROOT_DESCRIPTOR1 + { + UINT ShaderRegister; + UINT RegisterSpace; + D3D12_ROOT_DESCRIPTOR_FLAGS Flags; + } D3D12_ROOT_DESCRIPTOR1; + +typedef struct D3D12_ROOT_PARAMETER1 + { + D3D12_ROOT_PARAMETER_TYPE ParameterType; + union + { + D3D12_ROOT_DESCRIPTOR_TABLE1 DescriptorTable; + D3D12_ROOT_CONSTANTS Constants; + D3D12_ROOT_DESCRIPTOR1 Descriptor; + } ; + D3D12_SHADER_VISIBILITY ShaderVisibility; + } D3D12_ROOT_PARAMETER1; + +typedef struct D3D12_ROOT_SIGNATURE_DESC1 + { + UINT NumParameters; + _Field_size_full_(NumParameters) const D3D12_ROOT_PARAMETER1 *pParameters; + UINT NumStaticSamplers; + _Field_size_full_(NumStaticSamplers) const D3D12_STATIC_SAMPLER_DESC *pStaticSamplers; + D3D12_ROOT_SIGNATURE_FLAGS Flags; + } D3D12_ROOT_SIGNATURE_DESC1; + +typedef struct D3D12_VERSIONED_ROOT_SIGNATURE_DESC + { + D3D_ROOT_SIGNATURE_VERSION Version; + union + { + D3D12_ROOT_SIGNATURE_DESC Desc_1_0; + D3D12_ROOT_SIGNATURE_DESC1 Desc_1_1; + } ; + } D3D12_VERSIONED_ROOT_SIGNATURE_DESC; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0001_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0001_v0_0_s_ifspec; + +#ifndef __ID3D12RootSignatureDeserializer_INTERFACE_DEFINED__ +#define __ID3D12RootSignatureDeserializer_INTERFACE_DEFINED__ + +/* interface ID3D12RootSignatureDeserializer */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12RootSignatureDeserializer; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("34AB647B-3CC8-46AC-841B-C0965645C046") + ID3D12RootSignatureDeserializer : public IUnknown + { + public: + virtual const D3D12_ROOT_SIGNATURE_DESC *STDMETHODCALLTYPE GetRootSignatureDesc( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12RootSignatureDeserializerVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12RootSignatureDeserializer * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12RootSignatureDeserializer * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12RootSignatureDeserializer * This); + + const D3D12_ROOT_SIGNATURE_DESC *( STDMETHODCALLTYPE *GetRootSignatureDesc )( + ID3D12RootSignatureDeserializer * This); + + END_INTERFACE + } ID3D12RootSignatureDeserializerVtbl; + + interface ID3D12RootSignatureDeserializer + { + CONST_VTBL struct ID3D12RootSignatureDeserializerVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12RootSignatureDeserializer_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12RootSignatureDeserializer_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12RootSignatureDeserializer_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12RootSignatureDeserializer_GetRootSignatureDesc(This) \ + ( (This)->lpVtbl -> GetRootSignatureDesc(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12RootSignatureDeserializer_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12VersionedRootSignatureDeserializer_INTERFACE_DEFINED__ +#define __ID3D12VersionedRootSignatureDeserializer_INTERFACE_DEFINED__ + +/* interface ID3D12VersionedRootSignatureDeserializer */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12VersionedRootSignatureDeserializer; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("7F91CE67-090C-4BB7-B78E-ED8FF2E31DA0") + ID3D12VersionedRootSignatureDeserializer : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetRootSignatureDescAtVersion( + D3D_ROOT_SIGNATURE_VERSION convertToVersion, + _Out_ const D3D12_VERSIONED_ROOT_SIGNATURE_DESC **ppDesc) = 0; + + virtual const D3D12_VERSIONED_ROOT_SIGNATURE_DESC *STDMETHODCALLTYPE GetUnconvertedRootSignatureDesc( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12VersionedRootSignatureDeserializerVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12VersionedRootSignatureDeserializer * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12VersionedRootSignatureDeserializer * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12VersionedRootSignatureDeserializer * This); + + HRESULT ( STDMETHODCALLTYPE *GetRootSignatureDescAtVersion )( + ID3D12VersionedRootSignatureDeserializer * This, + D3D_ROOT_SIGNATURE_VERSION convertToVersion, + _Out_ const D3D12_VERSIONED_ROOT_SIGNATURE_DESC **ppDesc); + + const D3D12_VERSIONED_ROOT_SIGNATURE_DESC *( STDMETHODCALLTYPE *GetUnconvertedRootSignatureDesc )( + ID3D12VersionedRootSignatureDeserializer * This); + + END_INTERFACE + } ID3D12VersionedRootSignatureDeserializerVtbl; + + interface ID3D12VersionedRootSignatureDeserializer + { + CONST_VTBL struct ID3D12VersionedRootSignatureDeserializerVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12VersionedRootSignatureDeserializer_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12VersionedRootSignatureDeserializer_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12VersionedRootSignatureDeserializer_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12VersionedRootSignatureDeserializer_GetRootSignatureDescAtVersion(This,convertToVersion,ppDesc) \ + ( (This)->lpVtbl -> GetRootSignatureDescAtVersion(This,convertToVersion,ppDesc) ) + +#define ID3D12VersionedRootSignatureDeserializer_GetUnconvertedRootSignatureDesc(This) \ + ( (This)->lpVtbl -> GetUnconvertedRootSignatureDesc(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12VersionedRootSignatureDeserializer_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12_0000_0003 */ +/* [local] */ + +typedef HRESULT (WINAPI* PFN_D3D12_SERIALIZE_ROOT_SIGNATURE)( + _In_ const D3D12_ROOT_SIGNATURE_DESC* pRootSignature, + _In_ D3D_ROOT_SIGNATURE_VERSION Version, + _Out_ ID3DBlob** ppBlob, + _Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorBlob); + +HRESULT WINAPI D3D12SerializeRootSignature( + _In_ const D3D12_ROOT_SIGNATURE_DESC* pRootSignature, + _In_ D3D_ROOT_SIGNATURE_VERSION Version, + _Out_ ID3DBlob** ppBlob, + _Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorBlob); + +typedef HRESULT (WINAPI* PFN_D3D12_CREATE_ROOT_SIGNATURE_DESERIALIZER)( + _In_reads_bytes_(SrcDataSizeInBytes) LPCVOID pSrcData, + _In_ SIZE_T SrcDataSizeInBytes, + _In_ REFIID pRootSignatureDeserializerInterface, + _Out_ void** ppRootSignatureDeserializer); + +HRESULT WINAPI D3D12CreateRootSignatureDeserializer( + _In_reads_bytes_(SrcDataSizeInBytes) LPCVOID pSrcData, + _In_ SIZE_T SrcDataSizeInBytes, + _In_ REFIID pRootSignatureDeserializerInterface, + _Out_ void** ppRootSignatureDeserializer); + +typedef HRESULT (WINAPI* PFN_D3D12_SERIALIZE_VERSIONED_ROOT_SIGNATURE)( + _In_ const D3D12_VERSIONED_ROOT_SIGNATURE_DESC* pRootSignature, + _Out_ ID3DBlob** ppBlob, + _Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorBlob); + +HRESULT WINAPI D3D12SerializeVersionedRootSignature( + _In_ const D3D12_VERSIONED_ROOT_SIGNATURE_DESC* pRootSignature, + _Out_ ID3DBlob** ppBlob, + _Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorBlob); + +typedef HRESULT (WINAPI* PFN_D3D12_CREATE_VERSIONED_ROOT_SIGNATURE_DESERIALIZER)( + _In_reads_bytes_(SrcDataSizeInBytes) LPCVOID pSrcData, + _In_ SIZE_T SrcDataSizeInBytes, + _In_ REFIID pRootSignatureDeserializerInterface, + _Out_ void** ppRootSignatureDeserializer); + +HRESULT WINAPI D3D12CreateVersionedRootSignatureDeserializer( + _In_reads_bytes_(SrcDataSizeInBytes) LPCVOID pSrcData, + _In_ SIZE_T SrcDataSizeInBytes, + _In_ REFIID pRootSignatureDeserializerInterface, + _Out_ void** ppRootSignatureDeserializer); + +typedef struct D3D12_CPU_DESCRIPTOR_HANDLE + { + SIZE_T ptr; + } D3D12_CPU_DESCRIPTOR_HANDLE; + +typedef struct D3D12_GPU_DESCRIPTOR_HANDLE + { + UINT64 ptr; + } D3D12_GPU_DESCRIPTOR_HANDLE; + +// If rects are supplied in D3D12_DISCARD_REGION, below, the resource +// must have 2D subresources with all specified subresources the same dimension. +typedef struct D3D12_DISCARD_REGION + { + UINT NumRects; + _In_reads_(NumRects) const D3D12_RECT *pRects; + UINT FirstSubresource; + UINT NumSubresources; + } D3D12_DISCARD_REGION; + +typedef +enum D3D12_QUERY_HEAP_TYPE + { + D3D12_QUERY_HEAP_TYPE_OCCLUSION = 0, + D3D12_QUERY_HEAP_TYPE_TIMESTAMP = 1, + D3D12_QUERY_HEAP_TYPE_PIPELINE_STATISTICS = 2, + D3D12_QUERY_HEAP_TYPE_SO_STATISTICS = 3, + D3D12_QUERY_HEAP_TYPE_VIDEO_DECODE_STATISTICS = 4, + D3D12_QUERY_HEAP_TYPE_COPY_QUEUE_TIMESTAMP = 5 + } D3D12_QUERY_HEAP_TYPE; + +typedef struct D3D12_QUERY_HEAP_DESC + { + D3D12_QUERY_HEAP_TYPE Type; + UINT Count; + UINT NodeMask; + } D3D12_QUERY_HEAP_DESC; + +typedef +enum D3D12_QUERY_TYPE + { + D3D12_QUERY_TYPE_OCCLUSION = 0, + D3D12_QUERY_TYPE_BINARY_OCCLUSION = 1, + D3D12_QUERY_TYPE_TIMESTAMP = 2, + D3D12_QUERY_TYPE_PIPELINE_STATISTICS = 3, + D3D12_QUERY_TYPE_SO_STATISTICS_STREAM0 = 4, + D3D12_QUERY_TYPE_SO_STATISTICS_STREAM1 = 5, + D3D12_QUERY_TYPE_SO_STATISTICS_STREAM2 = 6, + D3D12_QUERY_TYPE_SO_STATISTICS_STREAM3 = 7, + D3D12_QUERY_TYPE_VIDEO_DECODE_STATISTICS = 8 + } D3D12_QUERY_TYPE; + +typedef +enum D3D12_PREDICATION_OP + { + D3D12_PREDICATION_OP_EQUAL_ZERO = 0, + D3D12_PREDICATION_OP_NOT_EQUAL_ZERO = 1 + } D3D12_PREDICATION_OP; + +typedef struct D3D12_QUERY_DATA_PIPELINE_STATISTICS + { + UINT64 IAVertices; + UINT64 IAPrimitives; + UINT64 VSInvocations; + UINT64 GSInvocations; + UINT64 GSPrimitives; + UINT64 CInvocations; + UINT64 CPrimitives; + UINT64 PSInvocations; + UINT64 HSInvocations; + UINT64 DSInvocations; + UINT64 CSInvocations; + } D3D12_QUERY_DATA_PIPELINE_STATISTICS; + +typedef struct D3D12_QUERY_DATA_SO_STATISTICS + { + UINT64 NumPrimitivesWritten; + UINT64 PrimitivesStorageNeeded; + } D3D12_QUERY_DATA_SO_STATISTICS; + +typedef struct D3D12_STREAM_OUTPUT_BUFFER_VIEW + { + D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; + UINT64 SizeInBytes; + D3D12_GPU_VIRTUAL_ADDRESS BufferFilledSizeLocation; + } D3D12_STREAM_OUTPUT_BUFFER_VIEW; + +typedef struct D3D12_DRAW_ARGUMENTS + { + UINT VertexCountPerInstance; + UINT InstanceCount; + UINT StartVertexLocation; + UINT StartInstanceLocation; + } D3D12_DRAW_ARGUMENTS; + +typedef struct D3D12_DRAW_INDEXED_ARGUMENTS + { + UINT IndexCountPerInstance; + UINT InstanceCount; + UINT StartIndexLocation; + INT BaseVertexLocation; + UINT StartInstanceLocation; + } D3D12_DRAW_INDEXED_ARGUMENTS; + +typedef struct D3D12_DISPATCH_ARGUMENTS + { + UINT ThreadGroupCountX; + UINT ThreadGroupCountY; + UINT ThreadGroupCountZ; + } D3D12_DISPATCH_ARGUMENTS; + +typedef struct D3D12_VERTEX_BUFFER_VIEW + { + D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; + UINT SizeInBytes; + UINT StrideInBytes; + } D3D12_VERTEX_BUFFER_VIEW; + +typedef struct D3D12_INDEX_BUFFER_VIEW + { + D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; + UINT SizeInBytes; + DXGI_FORMAT Format; + } D3D12_INDEX_BUFFER_VIEW; + +typedef +enum D3D12_INDIRECT_ARGUMENT_TYPE + { + D3D12_INDIRECT_ARGUMENT_TYPE_DRAW = 0, + D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED = ( D3D12_INDIRECT_ARGUMENT_TYPE_DRAW + 1 ) , + D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH = ( D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED + 1 ) , + D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW = ( D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH + 1 ) , + D3D12_INDIRECT_ARGUMENT_TYPE_INDEX_BUFFER_VIEW = ( D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW + 1 ) , + D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT = ( D3D12_INDIRECT_ARGUMENT_TYPE_INDEX_BUFFER_VIEW + 1 ) , + D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW = ( D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT + 1 ) , + D3D12_INDIRECT_ARGUMENT_TYPE_SHADER_RESOURCE_VIEW = ( D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW + 1 ) , + D3D12_INDIRECT_ARGUMENT_TYPE_UNORDERED_ACCESS_VIEW = ( D3D12_INDIRECT_ARGUMENT_TYPE_SHADER_RESOURCE_VIEW + 1 ) + } D3D12_INDIRECT_ARGUMENT_TYPE; + +typedef struct D3D12_INDIRECT_ARGUMENT_DESC + { + D3D12_INDIRECT_ARGUMENT_TYPE Type; + union + { + struct + { + UINT Slot; + } VertexBuffer; + struct + { + UINT RootParameterIndex; + UINT DestOffsetIn32BitValues; + UINT Num32BitValuesToSet; + } Constant; + struct + { + UINT RootParameterIndex; + } ConstantBufferView; + struct + { + UINT RootParameterIndex; + } ShaderResourceView; + struct + { + UINT RootParameterIndex; + } UnorderedAccessView; + } ; + } D3D12_INDIRECT_ARGUMENT_DESC; + +typedef struct D3D12_COMMAND_SIGNATURE_DESC + { + UINT ByteStride; + UINT NumArgumentDescs; + _Field_size_full_(NumArgumentDescs) const D3D12_INDIRECT_ARGUMENT_DESC *pArgumentDescs; + UINT NodeMask; + } D3D12_COMMAND_SIGNATURE_DESC; + + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0003_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0003_v0_0_s_ifspec; + +#ifndef __ID3D12Pageable_INTERFACE_DEFINED__ +#define __ID3D12Pageable_INTERFACE_DEFINED__ + +/* interface ID3D12Pageable */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12Pageable; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("63ee58fb-1268-4835-86da-f008ce62f0d6") + ID3D12Pageable : public ID3D12DeviceChild + { + public: + }; + + +#else /* C style interface */ + + typedef struct ID3D12PageableVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12Pageable * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12Pageable * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12Pageable * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12Pageable * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12Pageable * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12Pageable * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12Pageable * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12Pageable * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + END_INTERFACE + } ID3D12PageableVtbl; + + interface ID3D12Pageable + { + CONST_VTBL struct ID3D12PageableVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12Pageable_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12Pageable_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12Pageable_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12Pageable_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12Pageable_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12Pageable_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12Pageable_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12Pageable_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12Pageable_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12Heap_INTERFACE_DEFINED__ +#define __ID3D12Heap_INTERFACE_DEFINED__ + +/* interface ID3D12Heap */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12Heap; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6b3b2502-6e51-45b3-90ee-9884265e8df3") + ID3D12Heap : public ID3D12Pageable + { + public: + virtual D3D12_HEAP_DESC STDMETHODCALLTYPE GetDesc( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12HeapVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12Heap * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12Heap * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12Heap * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12Heap * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12Heap * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12Heap * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12Heap * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12Heap * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + D3D12_HEAP_DESC ( STDMETHODCALLTYPE *GetDesc )( + ID3D12Heap * This); + + END_INTERFACE + } ID3D12HeapVtbl; + + interface ID3D12Heap + { + CONST_VTBL struct ID3D12HeapVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12Heap_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12Heap_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12Heap_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12Heap_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12Heap_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12Heap_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12Heap_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12Heap_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + + +#define ID3D12Heap_GetDesc(This) \ + ( (This)->lpVtbl -> GetDesc(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + + + + + +#endif /* __ID3D12Heap_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12Resource_INTERFACE_DEFINED__ +#define __ID3D12Resource_INTERFACE_DEFINED__ + +/* interface ID3D12Resource */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12Resource; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("696442be-a72e-4059-bc79-5b5c98040fad") + ID3D12Resource : public ID3D12Pageable + { + public: + virtual HRESULT STDMETHODCALLTYPE Map( + UINT Subresource, + _In_opt_ const D3D12_RANGE *pReadRange, + _Outptr_opt_result_bytebuffer_(_Inexpressible_("Dependent on resource")) void **ppData) = 0; + + virtual void STDMETHODCALLTYPE Unmap( + UINT Subresource, + _In_opt_ const D3D12_RANGE *pWrittenRange) = 0; + + virtual D3D12_RESOURCE_DESC STDMETHODCALLTYPE GetDesc( void) = 0; + + virtual D3D12_GPU_VIRTUAL_ADDRESS STDMETHODCALLTYPE GetGPUVirtualAddress( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE WriteToSubresource( + UINT DstSubresource, + _In_opt_ const D3D12_BOX *pDstBox, + _In_ const void *pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReadFromSubresource( + _Out_ void *pDstData, + UINT DstRowPitch, + UINT DstDepthPitch, + UINT SrcSubresource, + _In_opt_ const D3D12_BOX *pSrcBox) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetHeapProperties( + _Out_opt_ D3D12_HEAP_PROPERTIES *pHeapProperties, + _Out_opt_ D3D12_HEAP_FLAGS *pHeapFlags) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12ResourceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12Resource * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12Resource * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12Resource * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12Resource * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12Resource * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12Resource * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12Resource * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12Resource * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + HRESULT ( STDMETHODCALLTYPE *Map )( + ID3D12Resource * This, + UINT Subresource, + _In_opt_ const D3D12_RANGE *pReadRange, + _Outptr_opt_result_bytebuffer_(_Inexpressible_("Dependent on resource")) void **ppData); + + void ( STDMETHODCALLTYPE *Unmap )( + ID3D12Resource * This, + UINT Subresource, + _In_opt_ const D3D12_RANGE *pWrittenRange); + + D3D12_RESOURCE_DESC ( STDMETHODCALLTYPE *GetDesc )( + ID3D12Resource * This); + + D3D12_GPU_VIRTUAL_ADDRESS ( STDMETHODCALLTYPE *GetGPUVirtualAddress )( + ID3D12Resource * This); + + HRESULT ( STDMETHODCALLTYPE *WriteToSubresource )( + ID3D12Resource * This, + UINT DstSubresource, + _In_opt_ const D3D12_BOX *pDstBox, + _In_ const void *pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch); + + HRESULT ( STDMETHODCALLTYPE *ReadFromSubresource )( + ID3D12Resource * This, + _Out_ void *pDstData, + UINT DstRowPitch, + UINT DstDepthPitch, + UINT SrcSubresource, + _In_opt_ const D3D12_BOX *pSrcBox); + + HRESULT ( STDMETHODCALLTYPE *GetHeapProperties )( + ID3D12Resource * This, + _Out_opt_ D3D12_HEAP_PROPERTIES *pHeapProperties, + _Out_opt_ D3D12_HEAP_FLAGS *pHeapFlags); + + END_INTERFACE + } ID3D12ResourceVtbl; + + interface ID3D12Resource + { + CONST_VTBL struct ID3D12ResourceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12Resource_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12Resource_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12Resource_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12Resource_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12Resource_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12Resource_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12Resource_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12Resource_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + + +#define ID3D12Resource_Map(This,Subresource,pReadRange,ppData) \ + ( (This)->lpVtbl -> Map(This,Subresource,pReadRange,ppData) ) + +#define ID3D12Resource_Unmap(This,Subresource,pWrittenRange) \ + ( (This)->lpVtbl -> Unmap(This,Subresource,pWrittenRange) ) + +#define ID3D12Resource_GetDesc(This) \ + ( (This)->lpVtbl -> GetDesc(This) ) + +#define ID3D12Resource_GetGPUVirtualAddress(This) \ + ( (This)->lpVtbl -> GetGPUVirtualAddress(This) ) + +#define ID3D12Resource_WriteToSubresource(This,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) \ + ( (This)->lpVtbl -> WriteToSubresource(This,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) ) + +#define ID3D12Resource_ReadFromSubresource(This,pDstData,DstRowPitch,DstDepthPitch,SrcSubresource,pSrcBox) \ + ( (This)->lpVtbl -> ReadFromSubresource(This,pDstData,DstRowPitch,DstDepthPitch,SrcSubresource,pSrcBox) ) + +#define ID3D12Resource_GetHeapProperties(This,pHeapProperties,pHeapFlags) \ + ( (This)->lpVtbl -> GetHeapProperties(This,pHeapProperties,pHeapFlags) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + + + + + +#endif /* __ID3D12Resource_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12CommandAllocator_INTERFACE_DEFINED__ +#define __ID3D12CommandAllocator_INTERFACE_DEFINED__ + +/* interface ID3D12CommandAllocator */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12CommandAllocator; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6102dee4-af59-4b09-b999-b44d73f09b24") + ID3D12CommandAllocator : public ID3D12Pageable + { + public: + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12CommandAllocatorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12CommandAllocator * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12CommandAllocator * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12CommandAllocator * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12CommandAllocator * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12CommandAllocator * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12CommandAllocator * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12CommandAllocator * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12CommandAllocator * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + ID3D12CommandAllocator * This); + + END_INTERFACE + } ID3D12CommandAllocatorVtbl; + + interface ID3D12CommandAllocator + { + CONST_VTBL struct ID3D12CommandAllocatorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12CommandAllocator_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12CommandAllocator_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12CommandAllocator_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12CommandAllocator_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12CommandAllocator_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12CommandAllocator_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12CommandAllocator_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12CommandAllocator_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + + +#define ID3D12CommandAllocator_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12CommandAllocator_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12Fence_INTERFACE_DEFINED__ +#define __ID3D12Fence_INTERFACE_DEFINED__ + +/* interface ID3D12Fence */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12Fence; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("0a753dcf-c4d8-4b91-adf6-be5a60d95a76") + ID3D12Fence : public ID3D12Pageable + { + public: + virtual UINT64 STDMETHODCALLTYPE GetCompletedValue( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetEventOnCompletion( + UINT64 Value, + HANDLE hEvent) = 0; + + virtual HRESULT STDMETHODCALLTYPE Signal( + UINT64 Value) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12FenceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12Fence * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12Fence * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12Fence * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12Fence * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12Fence * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12Fence * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12Fence * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12Fence * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + UINT64 ( STDMETHODCALLTYPE *GetCompletedValue )( + ID3D12Fence * This); + + HRESULT ( STDMETHODCALLTYPE *SetEventOnCompletion )( + ID3D12Fence * This, + UINT64 Value, + HANDLE hEvent); + + HRESULT ( STDMETHODCALLTYPE *Signal )( + ID3D12Fence * This, + UINT64 Value); + + END_INTERFACE + } ID3D12FenceVtbl; + + interface ID3D12Fence + { + CONST_VTBL struct ID3D12FenceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12Fence_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12Fence_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12Fence_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12Fence_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12Fence_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12Fence_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12Fence_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12Fence_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + + +#define ID3D12Fence_GetCompletedValue(This) \ + ( (This)->lpVtbl -> GetCompletedValue(This) ) + +#define ID3D12Fence_SetEventOnCompletion(This,Value,hEvent) \ + ( (This)->lpVtbl -> SetEventOnCompletion(This,Value,hEvent) ) + +#define ID3D12Fence_Signal(This,Value) \ + ( (This)->lpVtbl -> Signal(This,Value) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12Fence_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12Fence1_INTERFACE_DEFINED__ +#define __ID3D12Fence1_INTERFACE_DEFINED__ + +/* interface ID3D12Fence1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12Fence1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("433685fe-e22b-4ca0-a8db-b5b4f4dd0e4a") + ID3D12Fence1 : public ID3D12Fence + { + public: + virtual D3D12_FENCE_FLAGS STDMETHODCALLTYPE GetCreationFlags( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12Fence1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12Fence1 * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12Fence1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12Fence1 * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12Fence1 * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12Fence1 * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12Fence1 * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12Fence1 * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12Fence1 * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + UINT64 ( STDMETHODCALLTYPE *GetCompletedValue )( + ID3D12Fence1 * This); + + HRESULT ( STDMETHODCALLTYPE *SetEventOnCompletion )( + ID3D12Fence1 * This, + UINT64 Value, + HANDLE hEvent); + + HRESULT ( STDMETHODCALLTYPE *Signal )( + ID3D12Fence1 * This, + UINT64 Value); + + D3D12_FENCE_FLAGS ( STDMETHODCALLTYPE *GetCreationFlags )( + ID3D12Fence1 * This); + + END_INTERFACE + } ID3D12Fence1Vtbl; + + interface ID3D12Fence1 + { + CONST_VTBL struct ID3D12Fence1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12Fence1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12Fence1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12Fence1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12Fence1_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12Fence1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12Fence1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12Fence1_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12Fence1_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + + +#define ID3D12Fence1_GetCompletedValue(This) \ + ( (This)->lpVtbl -> GetCompletedValue(This) ) + +#define ID3D12Fence1_SetEventOnCompletion(This,Value,hEvent) \ + ( (This)->lpVtbl -> SetEventOnCompletion(This,Value,hEvent) ) + +#define ID3D12Fence1_Signal(This,Value) \ + ( (This)->lpVtbl -> Signal(This,Value) ) + + +#define ID3D12Fence1_GetCreationFlags(This) \ + ( (This)->lpVtbl -> GetCreationFlags(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12Fence1_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12PipelineState_INTERFACE_DEFINED__ +#define __ID3D12PipelineState_INTERFACE_DEFINED__ + +/* interface ID3D12PipelineState */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12PipelineState; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("765a30f3-f624-4c6f-a828-ace948622445") + ID3D12PipelineState : public ID3D12Pageable + { + public: + virtual HRESULT STDMETHODCALLTYPE GetCachedBlob( + _COM_Outptr_ ID3DBlob **ppBlob) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12PipelineStateVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12PipelineState * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12PipelineState * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12PipelineState * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12PipelineState * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12PipelineState * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12PipelineState * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12PipelineState * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12PipelineState * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + HRESULT ( STDMETHODCALLTYPE *GetCachedBlob )( + ID3D12PipelineState * This, + _COM_Outptr_ ID3DBlob **ppBlob); + + END_INTERFACE + } ID3D12PipelineStateVtbl; + + interface ID3D12PipelineState + { + CONST_VTBL struct ID3D12PipelineStateVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12PipelineState_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12PipelineState_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12PipelineState_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12PipelineState_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12PipelineState_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12PipelineState_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12PipelineState_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12PipelineState_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + + +#define ID3D12PipelineState_GetCachedBlob(This,ppBlob) \ + ( (This)->lpVtbl -> GetCachedBlob(This,ppBlob) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12PipelineState_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12DescriptorHeap_INTERFACE_DEFINED__ +#define __ID3D12DescriptorHeap_INTERFACE_DEFINED__ + +/* interface ID3D12DescriptorHeap */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12DescriptorHeap; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("8efb471d-616c-4f49-90f7-127bb763fa51") + ID3D12DescriptorHeap : public ID3D12Pageable + { + public: + virtual D3D12_DESCRIPTOR_HEAP_DESC STDMETHODCALLTYPE GetDesc( void) = 0; + + virtual D3D12_CPU_DESCRIPTOR_HANDLE STDMETHODCALLTYPE GetCPUDescriptorHandleForHeapStart( void) = 0; + + virtual D3D12_GPU_DESCRIPTOR_HANDLE STDMETHODCALLTYPE GetGPUDescriptorHandleForHeapStart( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12DescriptorHeapVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12DescriptorHeap * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12DescriptorHeap * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12DescriptorHeap * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12DescriptorHeap * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12DescriptorHeap * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12DescriptorHeap * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12DescriptorHeap * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12DescriptorHeap * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + D3D12_DESCRIPTOR_HEAP_DESC ( STDMETHODCALLTYPE *GetDesc )( + ID3D12DescriptorHeap * This); + + D3D12_CPU_DESCRIPTOR_HANDLE ( STDMETHODCALLTYPE *GetCPUDescriptorHandleForHeapStart )( + ID3D12DescriptorHeap * This); + + D3D12_GPU_DESCRIPTOR_HANDLE ( STDMETHODCALLTYPE *GetGPUDescriptorHandleForHeapStart )( + ID3D12DescriptorHeap * This); + + END_INTERFACE + } ID3D12DescriptorHeapVtbl; + + interface ID3D12DescriptorHeap + { + CONST_VTBL struct ID3D12DescriptorHeapVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12DescriptorHeap_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12DescriptorHeap_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12DescriptorHeap_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12DescriptorHeap_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12DescriptorHeap_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12DescriptorHeap_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12DescriptorHeap_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12DescriptorHeap_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + + +#define ID3D12DescriptorHeap_GetDesc(This) \ + ( (This)->lpVtbl -> GetDesc(This) ) + +#define ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(This) \ + ( (This)->lpVtbl -> GetCPUDescriptorHandleForHeapStart(This) ) + +#define ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(This) \ + ( (This)->lpVtbl -> GetGPUDescriptorHandleForHeapStart(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + + + + + + + + + + + + + +#endif /* __ID3D12DescriptorHeap_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12QueryHeap_INTERFACE_DEFINED__ +#define __ID3D12QueryHeap_INTERFACE_DEFINED__ + +/* interface ID3D12QueryHeap */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12QueryHeap; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("0d9658ae-ed45-469e-a61d-970ec583cab4") + ID3D12QueryHeap : public ID3D12Pageable + { + public: + }; + + +#else /* C style interface */ + + typedef struct ID3D12QueryHeapVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12QueryHeap * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12QueryHeap * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12QueryHeap * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12QueryHeap * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12QueryHeap * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12QueryHeap * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12QueryHeap * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12QueryHeap * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + END_INTERFACE + } ID3D12QueryHeapVtbl; + + interface ID3D12QueryHeap + { + CONST_VTBL struct ID3D12QueryHeapVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12QueryHeap_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12QueryHeap_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12QueryHeap_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12QueryHeap_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12QueryHeap_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12QueryHeap_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12QueryHeap_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12QueryHeap_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12QueryHeap_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12CommandSignature_INTERFACE_DEFINED__ +#define __ID3D12CommandSignature_INTERFACE_DEFINED__ + +/* interface ID3D12CommandSignature */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12CommandSignature; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("c36a797c-ec80-4f0a-8985-a7b2475082d1") + ID3D12CommandSignature : public ID3D12Pageable + { + public: + }; + + +#else /* C style interface */ + + typedef struct ID3D12CommandSignatureVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12CommandSignature * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12CommandSignature * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12CommandSignature * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12CommandSignature * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12CommandSignature * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12CommandSignature * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12CommandSignature * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12CommandSignature * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + END_INTERFACE + } ID3D12CommandSignatureVtbl; + + interface ID3D12CommandSignature + { + CONST_VTBL struct ID3D12CommandSignatureVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12CommandSignature_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12CommandSignature_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12CommandSignature_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12CommandSignature_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12CommandSignature_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12CommandSignature_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12CommandSignature_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12CommandSignature_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12CommandSignature_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12CommandList_INTERFACE_DEFINED__ +#define __ID3D12CommandList_INTERFACE_DEFINED__ + +/* interface ID3D12CommandList */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12CommandList; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("7116d91c-e7e4-47ce-b8c6-ec8168f437e5") + ID3D12CommandList : public ID3D12DeviceChild + { + public: + virtual D3D12_COMMAND_LIST_TYPE STDMETHODCALLTYPE GetType( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12CommandListVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12CommandList * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12CommandList * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12CommandList * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12CommandList * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12CommandList * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12CommandList * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12CommandList * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12CommandList * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + D3D12_COMMAND_LIST_TYPE ( STDMETHODCALLTYPE *GetType )( + ID3D12CommandList * This); + + END_INTERFACE + } ID3D12CommandListVtbl; + + interface ID3D12CommandList + { + CONST_VTBL struct ID3D12CommandListVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12CommandList_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12CommandList_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12CommandList_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12CommandList_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12CommandList_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12CommandList_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12CommandList_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12CommandList_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + +#define ID3D12CommandList_GetType(This) \ + ( (This)->lpVtbl -> GetType(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12CommandList_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12GraphicsCommandList_INTERFACE_DEFINED__ +#define __ID3D12GraphicsCommandList_INTERFACE_DEFINED__ + +/* interface ID3D12GraphicsCommandList */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12GraphicsCommandList; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("5b160d0f-ac1b-4185-8ba8-b3ae42a5a455") + ID3D12GraphicsCommandList : public ID3D12CommandList + { + public: + virtual HRESULT STDMETHODCALLTYPE Close( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( + _In_ ID3D12CommandAllocator *pAllocator, + _In_opt_ ID3D12PipelineState *pInitialState) = 0; + + virtual void STDMETHODCALLTYPE ClearState( + _In_opt_ ID3D12PipelineState *pPipelineState) = 0; + + virtual void STDMETHODCALLTYPE DrawInstanced( + _In_ UINT VertexCountPerInstance, + _In_ UINT InstanceCount, + _In_ UINT StartVertexLocation, + _In_ UINT StartInstanceLocation) = 0; + + virtual void STDMETHODCALLTYPE DrawIndexedInstanced( + _In_ UINT IndexCountPerInstance, + _In_ UINT InstanceCount, + _In_ UINT StartIndexLocation, + _In_ INT BaseVertexLocation, + _In_ UINT StartInstanceLocation) = 0; + + virtual void STDMETHODCALLTYPE Dispatch( + _In_ UINT ThreadGroupCountX, + _In_ UINT ThreadGroupCountY, + _In_ UINT ThreadGroupCountZ) = 0; + + virtual void STDMETHODCALLTYPE CopyBufferRegion( + _In_ ID3D12Resource *pDstBuffer, + UINT64 DstOffset, + _In_ ID3D12Resource *pSrcBuffer, + UINT64 SrcOffset, + UINT64 NumBytes) = 0; + + virtual void STDMETHODCALLTYPE CopyTextureRegion( + _In_ const D3D12_TEXTURE_COPY_LOCATION *pDst, + UINT DstX, + UINT DstY, + UINT DstZ, + _In_ const D3D12_TEXTURE_COPY_LOCATION *pSrc, + _In_opt_ const D3D12_BOX *pSrcBox) = 0; + + virtual void STDMETHODCALLTYPE CopyResource( + _In_ ID3D12Resource *pDstResource, + _In_ ID3D12Resource *pSrcResource) = 0; + + virtual void STDMETHODCALLTYPE CopyTiles( + _In_ ID3D12Resource *pTiledResource, + _In_ const D3D12_TILED_RESOURCE_COORDINATE *pTileRegionStartCoordinate, + _In_ const D3D12_TILE_REGION_SIZE *pTileRegionSize, + _In_ ID3D12Resource *pBuffer, + UINT64 BufferStartOffsetInBytes, + D3D12_TILE_COPY_FLAGS Flags) = 0; + + virtual void STDMETHODCALLTYPE ResolveSubresource( + _In_ ID3D12Resource *pDstResource, + _In_ UINT DstSubresource, + _In_ ID3D12Resource *pSrcResource, + _In_ UINT SrcSubresource, + _In_ DXGI_FORMAT Format) = 0; + + virtual void STDMETHODCALLTYPE IASetPrimitiveTopology( + _In_ D3D12_PRIMITIVE_TOPOLOGY PrimitiveTopology) = 0; + + virtual void STDMETHODCALLTYPE RSSetViewports( + _In_range_(0, D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumViewports, + _In_reads_( NumViewports) const D3D12_VIEWPORT *pViewports) = 0; + + virtual void STDMETHODCALLTYPE RSSetScissorRects( + _In_range_(0, D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumRects, + _In_reads_( NumRects) const D3D12_RECT *pRects) = 0; + + virtual void STDMETHODCALLTYPE OMSetBlendFactor( + _In_reads_opt_(4) const FLOAT BlendFactor[ 4 ]) = 0; + + virtual void STDMETHODCALLTYPE OMSetStencilRef( + _In_ UINT StencilRef) = 0; + + virtual void STDMETHODCALLTYPE SetPipelineState( + _In_ ID3D12PipelineState *pPipelineState) = 0; + + virtual void STDMETHODCALLTYPE ResourceBarrier( + _In_ UINT NumBarriers, + _In_reads_(NumBarriers) const D3D12_RESOURCE_BARRIER *pBarriers) = 0; + + virtual void STDMETHODCALLTYPE ExecuteBundle( + _In_ ID3D12GraphicsCommandList *pCommandList) = 0; + + virtual void STDMETHODCALLTYPE SetDescriptorHeaps( + _In_ UINT NumDescriptorHeaps, + _In_reads_(NumDescriptorHeaps) ID3D12DescriptorHeap *const *ppDescriptorHeaps) = 0; + + virtual void STDMETHODCALLTYPE SetComputeRootSignature( + _In_opt_ ID3D12RootSignature *pRootSignature) = 0; + + virtual void STDMETHODCALLTYPE SetGraphicsRootSignature( + _In_opt_ ID3D12RootSignature *pRootSignature) = 0; + + virtual void STDMETHODCALLTYPE SetComputeRootDescriptorTable( + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor) = 0; + + virtual void STDMETHODCALLTYPE SetGraphicsRootDescriptorTable( + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor) = 0; + + virtual void STDMETHODCALLTYPE SetComputeRoot32BitConstant( + _In_ UINT RootParameterIndex, + _In_ UINT SrcData, + _In_ UINT DestOffsetIn32BitValues) = 0; + + virtual void STDMETHODCALLTYPE SetGraphicsRoot32BitConstant( + _In_ UINT RootParameterIndex, + _In_ UINT SrcData, + _In_ UINT DestOffsetIn32BitValues) = 0; + + virtual void STDMETHODCALLTYPE SetComputeRoot32BitConstants( + _In_ UINT RootParameterIndex, + _In_ UINT Num32BitValuesToSet, + _In_reads_(Num32BitValuesToSet*sizeof(UINT)) const void *pSrcData, + _In_ UINT DestOffsetIn32BitValues) = 0; + + virtual void STDMETHODCALLTYPE SetGraphicsRoot32BitConstants( + _In_ UINT RootParameterIndex, + _In_ UINT Num32BitValuesToSet, + _In_reads_(Num32BitValuesToSet*sizeof(UINT)) const void *pSrcData, + _In_ UINT DestOffsetIn32BitValues) = 0; + + virtual void STDMETHODCALLTYPE SetComputeRootConstantBufferView( + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation) = 0; + + virtual void STDMETHODCALLTYPE SetGraphicsRootConstantBufferView( + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation) = 0; + + virtual void STDMETHODCALLTYPE SetComputeRootShaderResourceView( + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation) = 0; + + virtual void STDMETHODCALLTYPE SetGraphicsRootShaderResourceView( + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation) = 0; + + virtual void STDMETHODCALLTYPE SetComputeRootUnorderedAccessView( + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation) = 0; + + virtual void STDMETHODCALLTYPE SetGraphicsRootUnorderedAccessView( + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation) = 0; + + virtual void STDMETHODCALLTYPE IASetIndexBuffer( + _In_opt_ const D3D12_INDEX_BUFFER_VIEW *pView) = 0; + + virtual void STDMETHODCALLTYPE IASetVertexBuffers( + _In_ UINT StartSlot, + _In_ UINT NumViews, + _In_reads_opt_(NumViews) const D3D12_VERTEX_BUFFER_VIEW *pViews) = 0; + + virtual void STDMETHODCALLTYPE SOSetTargets( + _In_ UINT StartSlot, + _In_ UINT NumViews, + _In_reads_opt_(NumViews) const D3D12_STREAM_OUTPUT_BUFFER_VIEW *pViews) = 0; + + virtual void STDMETHODCALLTYPE OMSetRenderTargets( + _In_ UINT NumRenderTargetDescriptors, + _In_opt_ const D3D12_CPU_DESCRIPTOR_HANDLE *pRenderTargetDescriptors, + _In_ BOOL RTsSingleHandleToDescriptorRange, + _In_opt_ const D3D12_CPU_DESCRIPTOR_HANDLE *pDepthStencilDescriptor) = 0; + + virtual void STDMETHODCALLTYPE ClearDepthStencilView( + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DepthStencilView, + _In_ D3D12_CLEAR_FLAGS ClearFlags, + _In_ FLOAT Depth, + _In_ UINT8 Stencil, + _In_ UINT NumRects, + _In_reads_(NumRects) const D3D12_RECT *pRects) = 0; + + virtual void STDMETHODCALLTYPE ClearRenderTargetView( + _In_ D3D12_CPU_DESCRIPTOR_HANDLE RenderTargetView, + _In_ const FLOAT ColorRGBA[ 4 ], + _In_ UINT NumRects, + _In_reads_(NumRects) const D3D12_RECT *pRects) = 0; + + virtual void STDMETHODCALLTYPE ClearUnorderedAccessViewUint( + _In_ D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, + _In_ ID3D12Resource *pResource, + _In_ const UINT Values[ 4 ], + _In_ UINT NumRects, + _In_reads_(NumRects) const D3D12_RECT *pRects) = 0; + + virtual void STDMETHODCALLTYPE ClearUnorderedAccessViewFloat( + _In_ D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, + _In_ ID3D12Resource *pResource, + _In_ const FLOAT Values[ 4 ], + _In_ UINT NumRects, + _In_reads_(NumRects) const D3D12_RECT *pRects) = 0; + + virtual void STDMETHODCALLTYPE DiscardResource( + _In_ ID3D12Resource *pResource, + _In_opt_ const D3D12_DISCARD_REGION *pRegion) = 0; + + virtual void STDMETHODCALLTYPE BeginQuery( + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT Index) = 0; + + virtual void STDMETHODCALLTYPE EndQuery( + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT Index) = 0; + + virtual void STDMETHODCALLTYPE ResolveQueryData( + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT StartIndex, + _In_ UINT NumQueries, + _In_ ID3D12Resource *pDestinationBuffer, + _In_ UINT64 AlignedDestinationBufferOffset) = 0; + + virtual void STDMETHODCALLTYPE SetPredication( + _In_opt_ ID3D12Resource *pBuffer, + _In_ UINT64 AlignedBufferOffset, + _In_ D3D12_PREDICATION_OP Operation) = 0; + + virtual void STDMETHODCALLTYPE SetMarker( + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size) = 0; + + virtual void STDMETHODCALLTYPE BeginEvent( + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size) = 0; + + virtual void STDMETHODCALLTYPE EndEvent( void) = 0; + + virtual void STDMETHODCALLTYPE ExecuteIndirect( + _In_ ID3D12CommandSignature *pCommandSignature, + _In_ UINT MaxCommandCount, + _In_ ID3D12Resource *pArgumentBuffer, + _In_ UINT64 ArgumentBufferOffset, + _In_opt_ ID3D12Resource *pCountBuffer, + _In_ UINT64 CountBufferOffset) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12GraphicsCommandListVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12GraphicsCommandList * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12GraphicsCommandList * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12GraphicsCommandList * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12GraphicsCommandList * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12GraphicsCommandList * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12GraphicsCommandList * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12GraphicsCommandList * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12GraphicsCommandList * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + D3D12_COMMAND_LIST_TYPE ( STDMETHODCALLTYPE *GetType )( + ID3D12GraphicsCommandList * This); + + HRESULT ( STDMETHODCALLTYPE *Close )( + ID3D12GraphicsCommandList * This); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + ID3D12GraphicsCommandList * This, + _In_ ID3D12CommandAllocator *pAllocator, + _In_opt_ ID3D12PipelineState *pInitialState); + + void ( STDMETHODCALLTYPE *ClearState )( + ID3D12GraphicsCommandList * This, + _In_opt_ ID3D12PipelineState *pPipelineState); + + void ( STDMETHODCALLTYPE *DrawInstanced )( + ID3D12GraphicsCommandList * This, + _In_ UINT VertexCountPerInstance, + _In_ UINT InstanceCount, + _In_ UINT StartVertexLocation, + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *DrawIndexedInstanced )( + ID3D12GraphicsCommandList * This, + _In_ UINT IndexCountPerInstance, + _In_ UINT InstanceCount, + _In_ UINT StartIndexLocation, + _In_ INT BaseVertexLocation, + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *Dispatch )( + ID3D12GraphicsCommandList * This, + _In_ UINT ThreadGroupCountX, + _In_ UINT ThreadGroupCountY, + _In_ UINT ThreadGroupCountZ); + + void ( STDMETHODCALLTYPE *CopyBufferRegion )( + ID3D12GraphicsCommandList * This, + _In_ ID3D12Resource *pDstBuffer, + UINT64 DstOffset, + _In_ ID3D12Resource *pSrcBuffer, + UINT64 SrcOffset, + UINT64 NumBytes); + + void ( STDMETHODCALLTYPE *CopyTextureRegion )( + ID3D12GraphicsCommandList * This, + _In_ const D3D12_TEXTURE_COPY_LOCATION *pDst, + UINT DstX, + UINT DstY, + UINT DstZ, + _In_ const D3D12_TEXTURE_COPY_LOCATION *pSrc, + _In_opt_ const D3D12_BOX *pSrcBox); + + void ( STDMETHODCALLTYPE *CopyResource )( + ID3D12GraphicsCommandList * This, + _In_ ID3D12Resource *pDstResource, + _In_ ID3D12Resource *pSrcResource); + + void ( STDMETHODCALLTYPE *CopyTiles )( + ID3D12GraphicsCommandList * This, + _In_ ID3D12Resource *pTiledResource, + _In_ const D3D12_TILED_RESOURCE_COORDINATE *pTileRegionStartCoordinate, + _In_ const D3D12_TILE_REGION_SIZE *pTileRegionSize, + _In_ ID3D12Resource *pBuffer, + UINT64 BufferStartOffsetInBytes, + D3D12_TILE_COPY_FLAGS Flags); + + void ( STDMETHODCALLTYPE *ResolveSubresource )( + ID3D12GraphicsCommandList * This, + _In_ ID3D12Resource *pDstResource, + _In_ UINT DstSubresource, + _In_ ID3D12Resource *pSrcResource, + _In_ UINT SrcSubresource, + _In_ DXGI_FORMAT Format); + + void ( STDMETHODCALLTYPE *IASetPrimitiveTopology )( + ID3D12GraphicsCommandList * This, + _In_ D3D12_PRIMITIVE_TOPOLOGY PrimitiveTopology); + + void ( STDMETHODCALLTYPE *RSSetViewports )( + ID3D12GraphicsCommandList * This, + _In_range_(0, D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumViewports, + _In_reads_( NumViewports) const D3D12_VIEWPORT *pViewports); + + void ( STDMETHODCALLTYPE *RSSetScissorRects )( + ID3D12GraphicsCommandList * This, + _In_range_(0, D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumRects, + _In_reads_( NumRects) const D3D12_RECT *pRects); + + void ( STDMETHODCALLTYPE *OMSetBlendFactor )( + ID3D12GraphicsCommandList * This, + _In_reads_opt_(4) const FLOAT BlendFactor[ 4 ]); + + void ( STDMETHODCALLTYPE *OMSetStencilRef )( + ID3D12GraphicsCommandList * This, + _In_ UINT StencilRef); + + void ( STDMETHODCALLTYPE *SetPipelineState )( + ID3D12GraphicsCommandList * This, + _In_ ID3D12PipelineState *pPipelineState); + + void ( STDMETHODCALLTYPE *ResourceBarrier )( + ID3D12GraphicsCommandList * This, + _In_ UINT NumBarriers, + _In_reads_(NumBarriers) const D3D12_RESOURCE_BARRIER *pBarriers); + + void ( STDMETHODCALLTYPE *ExecuteBundle )( + ID3D12GraphicsCommandList * This, + _In_ ID3D12GraphicsCommandList *pCommandList); + + void ( STDMETHODCALLTYPE *SetDescriptorHeaps )( + ID3D12GraphicsCommandList * This, + _In_ UINT NumDescriptorHeaps, + _In_reads_(NumDescriptorHeaps) ID3D12DescriptorHeap *const *ppDescriptorHeaps); + + void ( STDMETHODCALLTYPE *SetComputeRootSignature )( + ID3D12GraphicsCommandList * This, + _In_opt_ ID3D12RootSignature *pRootSignature); + + void ( STDMETHODCALLTYPE *SetGraphicsRootSignature )( + ID3D12GraphicsCommandList * This, + _In_opt_ ID3D12RootSignature *pRootSignature); + + void ( STDMETHODCALLTYPE *SetComputeRootDescriptorTable )( + ID3D12GraphicsCommandList * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor); + + void ( STDMETHODCALLTYPE *SetGraphicsRootDescriptorTable )( + ID3D12GraphicsCommandList * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor); + + void ( STDMETHODCALLTYPE *SetComputeRoot32BitConstant )( + ID3D12GraphicsCommandList * This, + _In_ UINT RootParameterIndex, + _In_ UINT SrcData, + _In_ UINT DestOffsetIn32BitValues); + + void ( STDMETHODCALLTYPE *SetGraphicsRoot32BitConstant )( + ID3D12GraphicsCommandList * This, + _In_ UINT RootParameterIndex, + _In_ UINT SrcData, + _In_ UINT DestOffsetIn32BitValues); + + void ( STDMETHODCALLTYPE *SetComputeRoot32BitConstants )( + ID3D12GraphicsCommandList * This, + _In_ UINT RootParameterIndex, + _In_ UINT Num32BitValuesToSet, + _In_reads_(Num32BitValuesToSet*sizeof(UINT)) const void *pSrcData, + _In_ UINT DestOffsetIn32BitValues); + + void ( STDMETHODCALLTYPE *SetGraphicsRoot32BitConstants )( + ID3D12GraphicsCommandList * This, + _In_ UINT RootParameterIndex, + _In_ UINT Num32BitValuesToSet, + _In_reads_(Num32BitValuesToSet*sizeof(UINT)) const void *pSrcData, + _In_ UINT DestOffsetIn32BitValues); + + void ( STDMETHODCALLTYPE *SetComputeRootConstantBufferView )( + ID3D12GraphicsCommandList * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *SetGraphicsRootConstantBufferView )( + ID3D12GraphicsCommandList * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *SetComputeRootShaderResourceView )( + ID3D12GraphicsCommandList * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *SetGraphicsRootShaderResourceView )( + ID3D12GraphicsCommandList * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *SetComputeRootUnorderedAccessView )( + ID3D12GraphicsCommandList * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *SetGraphicsRootUnorderedAccessView )( + ID3D12GraphicsCommandList * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *IASetIndexBuffer )( + ID3D12GraphicsCommandList * This, + _In_opt_ const D3D12_INDEX_BUFFER_VIEW *pView); + + void ( STDMETHODCALLTYPE *IASetVertexBuffers )( + ID3D12GraphicsCommandList * This, + _In_ UINT StartSlot, + _In_ UINT NumViews, + _In_reads_opt_(NumViews) const D3D12_VERTEX_BUFFER_VIEW *pViews); + + void ( STDMETHODCALLTYPE *SOSetTargets )( + ID3D12GraphicsCommandList * This, + _In_ UINT StartSlot, + _In_ UINT NumViews, + _In_reads_opt_(NumViews) const D3D12_STREAM_OUTPUT_BUFFER_VIEW *pViews); + + void ( STDMETHODCALLTYPE *OMSetRenderTargets )( + ID3D12GraphicsCommandList * This, + _In_ UINT NumRenderTargetDescriptors, + _In_opt_ const D3D12_CPU_DESCRIPTOR_HANDLE *pRenderTargetDescriptors, + _In_ BOOL RTsSingleHandleToDescriptorRange, + _In_opt_ const D3D12_CPU_DESCRIPTOR_HANDLE *pDepthStencilDescriptor); + + void ( STDMETHODCALLTYPE *ClearDepthStencilView )( + ID3D12GraphicsCommandList * This, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DepthStencilView, + _In_ D3D12_CLEAR_FLAGS ClearFlags, + _In_ FLOAT Depth, + _In_ UINT8 Stencil, + _In_ UINT NumRects, + _In_reads_(NumRects) const D3D12_RECT *pRects); + + void ( STDMETHODCALLTYPE *ClearRenderTargetView )( + ID3D12GraphicsCommandList * This, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE RenderTargetView, + _In_ const FLOAT ColorRGBA[ 4 ], + _In_ UINT NumRects, + _In_reads_(NumRects) const D3D12_RECT *pRects); + + void ( STDMETHODCALLTYPE *ClearUnorderedAccessViewUint )( + ID3D12GraphicsCommandList * This, + _In_ D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, + _In_ ID3D12Resource *pResource, + _In_ const UINT Values[ 4 ], + _In_ UINT NumRects, + _In_reads_(NumRects) const D3D12_RECT *pRects); + + void ( STDMETHODCALLTYPE *ClearUnorderedAccessViewFloat )( + ID3D12GraphicsCommandList * This, + _In_ D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, + _In_ ID3D12Resource *pResource, + _In_ const FLOAT Values[ 4 ], + _In_ UINT NumRects, + _In_reads_(NumRects) const D3D12_RECT *pRects); + + void ( STDMETHODCALLTYPE *DiscardResource )( + ID3D12GraphicsCommandList * This, + _In_ ID3D12Resource *pResource, + _In_opt_ const D3D12_DISCARD_REGION *pRegion); + + void ( STDMETHODCALLTYPE *BeginQuery )( + ID3D12GraphicsCommandList * This, + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT Index); + + void ( STDMETHODCALLTYPE *EndQuery )( + ID3D12GraphicsCommandList * This, + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT Index); + + void ( STDMETHODCALLTYPE *ResolveQueryData )( + ID3D12GraphicsCommandList * This, + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT StartIndex, + _In_ UINT NumQueries, + _In_ ID3D12Resource *pDestinationBuffer, + _In_ UINT64 AlignedDestinationBufferOffset); + + void ( STDMETHODCALLTYPE *SetPredication )( + ID3D12GraphicsCommandList * This, + _In_opt_ ID3D12Resource *pBuffer, + _In_ UINT64 AlignedBufferOffset, + _In_ D3D12_PREDICATION_OP Operation); + + void ( STDMETHODCALLTYPE *SetMarker )( + ID3D12GraphicsCommandList * This, + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size); + + void ( STDMETHODCALLTYPE *BeginEvent )( + ID3D12GraphicsCommandList * This, + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size); + + void ( STDMETHODCALLTYPE *EndEvent )( + ID3D12GraphicsCommandList * This); + + void ( STDMETHODCALLTYPE *ExecuteIndirect )( + ID3D12GraphicsCommandList * This, + _In_ ID3D12CommandSignature *pCommandSignature, + _In_ UINT MaxCommandCount, + _In_ ID3D12Resource *pArgumentBuffer, + _In_ UINT64 ArgumentBufferOffset, + _In_opt_ ID3D12Resource *pCountBuffer, + _In_ UINT64 CountBufferOffset); + + END_INTERFACE + } ID3D12GraphicsCommandListVtbl; + + interface ID3D12GraphicsCommandList + { + CONST_VTBL struct ID3D12GraphicsCommandListVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12GraphicsCommandList_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12GraphicsCommandList_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12GraphicsCommandList_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12GraphicsCommandList_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12GraphicsCommandList_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12GraphicsCommandList_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12GraphicsCommandList_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12GraphicsCommandList_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + +#define ID3D12GraphicsCommandList_GetType(This) \ + ( (This)->lpVtbl -> GetType(This) ) + + +#define ID3D12GraphicsCommandList_Close(This) \ + ( (This)->lpVtbl -> Close(This) ) + +#define ID3D12GraphicsCommandList_Reset(This,pAllocator,pInitialState) \ + ( (This)->lpVtbl -> Reset(This,pAllocator,pInitialState) ) + +#define ID3D12GraphicsCommandList_ClearState(This,pPipelineState) \ + ( (This)->lpVtbl -> ClearState(This,pPipelineState) ) + +#define ID3D12GraphicsCommandList_DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) ) + +#define ID3D12GraphicsCommandList_DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) ) + +#define ID3D12GraphicsCommandList_Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) \ + ( (This)->lpVtbl -> Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) ) + +#define ID3D12GraphicsCommandList_CopyBufferRegion(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,NumBytes) \ + ( (This)->lpVtbl -> CopyBufferRegion(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,NumBytes) ) + +#define ID3D12GraphicsCommandList_CopyTextureRegion(This,pDst,DstX,DstY,DstZ,pSrc,pSrcBox) \ + ( (This)->lpVtbl -> CopyTextureRegion(This,pDst,DstX,DstY,DstZ,pSrc,pSrcBox) ) + +#define ID3D12GraphicsCommandList_CopyResource(This,pDstResource,pSrcResource) \ + ( (This)->lpVtbl -> CopyResource(This,pDstResource,pSrcResource) ) + +#define ID3D12GraphicsCommandList_CopyTiles(This,pTiledResource,pTileRegionStartCoordinate,pTileRegionSize,pBuffer,BufferStartOffsetInBytes,Flags) \ + ( (This)->lpVtbl -> CopyTiles(This,pTiledResource,pTileRegionStartCoordinate,pTileRegionSize,pBuffer,BufferStartOffsetInBytes,Flags) ) + +#define ID3D12GraphicsCommandList_ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) \ + ( (This)->lpVtbl -> ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) ) + +#define ID3D12GraphicsCommandList_IASetPrimitiveTopology(This,PrimitiveTopology) \ + ( (This)->lpVtbl -> IASetPrimitiveTopology(This,PrimitiveTopology) ) + +#define ID3D12GraphicsCommandList_RSSetViewports(This,NumViewports,pViewports) \ + ( (This)->lpVtbl -> RSSetViewports(This,NumViewports,pViewports) ) + +#define ID3D12GraphicsCommandList_RSSetScissorRects(This,NumRects,pRects) \ + ( (This)->lpVtbl -> RSSetScissorRects(This,NumRects,pRects) ) + +#define ID3D12GraphicsCommandList_OMSetBlendFactor(This,BlendFactor) \ + ( (This)->lpVtbl -> OMSetBlendFactor(This,BlendFactor) ) + +#define ID3D12GraphicsCommandList_OMSetStencilRef(This,StencilRef) \ + ( (This)->lpVtbl -> OMSetStencilRef(This,StencilRef) ) + +#define ID3D12GraphicsCommandList_SetPipelineState(This,pPipelineState) \ + ( (This)->lpVtbl -> SetPipelineState(This,pPipelineState) ) + +#define ID3D12GraphicsCommandList_ResourceBarrier(This,NumBarriers,pBarriers) \ + ( (This)->lpVtbl -> ResourceBarrier(This,NumBarriers,pBarriers) ) + +#define ID3D12GraphicsCommandList_ExecuteBundle(This,pCommandList) \ + ( (This)->lpVtbl -> ExecuteBundle(This,pCommandList) ) + +#define ID3D12GraphicsCommandList_SetDescriptorHeaps(This,NumDescriptorHeaps,ppDescriptorHeaps) \ + ( (This)->lpVtbl -> SetDescriptorHeaps(This,NumDescriptorHeaps,ppDescriptorHeaps) ) + +#define ID3D12GraphicsCommandList_SetComputeRootSignature(This,pRootSignature) \ + ( (This)->lpVtbl -> SetComputeRootSignature(This,pRootSignature) ) + +#define ID3D12GraphicsCommandList_SetGraphicsRootSignature(This,pRootSignature) \ + ( (This)->lpVtbl -> SetGraphicsRootSignature(This,pRootSignature) ) + +#define ID3D12GraphicsCommandList_SetComputeRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) \ + ( (This)->lpVtbl -> SetComputeRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) ) + +#define ID3D12GraphicsCommandList_SetGraphicsRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) \ + ( (This)->lpVtbl -> SetGraphicsRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) ) + +#define ID3D12GraphicsCommandList_SetComputeRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) \ + ( (This)->lpVtbl -> SetComputeRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) ) + +#define ID3D12GraphicsCommandList_SetGraphicsRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) \ + ( (This)->lpVtbl -> SetGraphicsRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) ) + +#define ID3D12GraphicsCommandList_SetComputeRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) \ + ( (This)->lpVtbl -> SetComputeRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) ) + +#define ID3D12GraphicsCommandList_SetGraphicsRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) \ + ( (This)->lpVtbl -> SetGraphicsRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) ) + +#define ID3D12GraphicsCommandList_SetComputeRootConstantBufferView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetComputeRootConstantBufferView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetGraphicsRootConstantBufferView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList_SetComputeRootShaderResourceView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetComputeRootShaderResourceView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList_SetGraphicsRootShaderResourceView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetGraphicsRootShaderResourceView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList_SetComputeRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetComputeRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList_SetGraphicsRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetGraphicsRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList_IASetIndexBuffer(This,pView) \ + ( (This)->lpVtbl -> IASetIndexBuffer(This,pView) ) + +#define ID3D12GraphicsCommandList_IASetVertexBuffers(This,StartSlot,NumViews,pViews) \ + ( (This)->lpVtbl -> IASetVertexBuffers(This,StartSlot,NumViews,pViews) ) + +#define ID3D12GraphicsCommandList_SOSetTargets(This,StartSlot,NumViews,pViews) \ + ( (This)->lpVtbl -> SOSetTargets(This,StartSlot,NumViews,pViews) ) + +#define ID3D12GraphicsCommandList_OMSetRenderTargets(This,NumRenderTargetDescriptors,pRenderTargetDescriptors,RTsSingleHandleToDescriptorRange,pDepthStencilDescriptor) \ + ( (This)->lpVtbl -> OMSetRenderTargets(This,NumRenderTargetDescriptors,pRenderTargetDescriptors,RTsSingleHandleToDescriptorRange,pDepthStencilDescriptor) ) + +#define ID3D12GraphicsCommandList_ClearDepthStencilView(This,DepthStencilView,ClearFlags,Depth,Stencil,NumRects,pRects) \ + ( (This)->lpVtbl -> ClearDepthStencilView(This,DepthStencilView,ClearFlags,Depth,Stencil,NumRects,pRects) ) + +#define ID3D12GraphicsCommandList_ClearRenderTargetView(This,RenderTargetView,ColorRGBA,NumRects,pRects) \ + ( (This)->lpVtbl -> ClearRenderTargetView(This,RenderTargetView,ColorRGBA,NumRects,pRects) ) + +#define ID3D12GraphicsCommandList_ClearUnorderedAccessViewUint(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) \ + ( (This)->lpVtbl -> ClearUnorderedAccessViewUint(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) ) + +#define ID3D12GraphicsCommandList_ClearUnorderedAccessViewFloat(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) \ + ( (This)->lpVtbl -> ClearUnorderedAccessViewFloat(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) ) + +#define ID3D12GraphicsCommandList_DiscardResource(This,pResource,pRegion) \ + ( (This)->lpVtbl -> DiscardResource(This,pResource,pRegion) ) + +#define ID3D12GraphicsCommandList_BeginQuery(This,pQueryHeap,Type,Index) \ + ( (This)->lpVtbl -> BeginQuery(This,pQueryHeap,Type,Index) ) + +#define ID3D12GraphicsCommandList_EndQuery(This,pQueryHeap,Type,Index) \ + ( (This)->lpVtbl -> EndQuery(This,pQueryHeap,Type,Index) ) + +#define ID3D12GraphicsCommandList_ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset) \ + ( (This)->lpVtbl -> ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset) ) + +#define ID3D12GraphicsCommandList_SetPredication(This,pBuffer,AlignedBufferOffset,Operation) \ + ( (This)->lpVtbl -> SetPredication(This,pBuffer,AlignedBufferOffset,Operation) ) + +#define ID3D12GraphicsCommandList_SetMarker(This,Metadata,pData,Size) \ + ( (This)->lpVtbl -> SetMarker(This,Metadata,pData,Size) ) + +#define ID3D12GraphicsCommandList_BeginEvent(This,Metadata,pData,Size) \ + ( (This)->lpVtbl -> BeginEvent(This,Metadata,pData,Size) ) + +#define ID3D12GraphicsCommandList_EndEvent(This) \ + ( (This)->lpVtbl -> EndEvent(This) ) + +#define ID3D12GraphicsCommandList_ExecuteIndirect(This,pCommandSignature,MaxCommandCount,pArgumentBuffer,ArgumentBufferOffset,pCountBuffer,CountBufferOffset) \ + ( (This)->lpVtbl -> ExecuteIndirect(This,pCommandSignature,MaxCommandCount,pArgumentBuffer,ArgumentBufferOffset,pCountBuffer,CountBufferOffset) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12GraphicsCommandList_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12GraphicsCommandList1_INTERFACE_DEFINED__ +#define __ID3D12GraphicsCommandList1_INTERFACE_DEFINED__ + +/* interface ID3D12GraphicsCommandList1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12GraphicsCommandList1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("553103fb-1fe7-4557-bb38-946d7d0e7ca7") + ID3D12GraphicsCommandList1 : public ID3D12GraphicsCommandList + { + public: + virtual void STDMETHODCALLTYPE AtomicCopyBufferUINT( + _In_ ID3D12Resource *pDstBuffer, + UINT64 DstOffset, + _In_ ID3D12Resource *pSrcBuffer, + UINT64 SrcOffset, + UINT Dependencies, + _In_reads_(Dependencies) ID3D12Resource *const *ppDependentResources, + _In_reads_(Dependencies) const D3D12_SUBRESOURCE_RANGE_UINT64 *pDependentSubresourceRanges) = 0; + + virtual void STDMETHODCALLTYPE AtomicCopyBufferUINT64( + _In_ ID3D12Resource *pDstBuffer, + UINT64 DstOffset, + _In_ ID3D12Resource *pSrcBuffer, + UINT64 SrcOffset, + UINT Dependencies, + _In_reads_(Dependencies) ID3D12Resource *const *ppDependentResources, + _In_reads_(Dependencies) const D3D12_SUBRESOURCE_RANGE_UINT64 *pDependentSubresourceRanges) = 0; + + virtual void STDMETHODCALLTYPE OMSetDepthBounds( + _In_ FLOAT Min, + _In_ FLOAT Max) = 0; + + virtual void STDMETHODCALLTYPE SetSamplePositions( + _In_ UINT NumSamplesPerPixel, + _In_ UINT NumPixels, + _In_reads_(NumSamplesPerPixel*NumPixels) D3D12_SAMPLE_POSITION *pSamplePositions) = 0; + + virtual void STDMETHODCALLTYPE ResolveSubresourceRegion( + _In_ ID3D12Resource *pDstResource, + _In_ UINT DstSubresource, + _In_ UINT DstX, + _In_ UINT DstY, + _In_ ID3D12Resource *pSrcResource, + _In_ UINT SrcSubresource, + _In_opt_ D3D12_RECT *pSrcRect, + _In_ DXGI_FORMAT Format, + _In_ D3D12_RESOLVE_MODE ResolveMode) = 0; + + virtual void STDMETHODCALLTYPE SetViewInstanceMask( + _In_ UINT Mask) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12GraphicsCommandList1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12GraphicsCommandList1 * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12GraphicsCommandList1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12GraphicsCommandList1 * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12GraphicsCommandList1 * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12GraphicsCommandList1 * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12GraphicsCommandList1 * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12GraphicsCommandList1 * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12GraphicsCommandList1 * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + D3D12_COMMAND_LIST_TYPE ( STDMETHODCALLTYPE *GetType )( + ID3D12GraphicsCommandList1 * This); + + HRESULT ( STDMETHODCALLTYPE *Close )( + ID3D12GraphicsCommandList1 * This); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + ID3D12GraphicsCommandList1 * This, + _In_ ID3D12CommandAllocator *pAllocator, + _In_opt_ ID3D12PipelineState *pInitialState); + + void ( STDMETHODCALLTYPE *ClearState )( + ID3D12GraphicsCommandList1 * This, + _In_opt_ ID3D12PipelineState *pPipelineState); + + void ( STDMETHODCALLTYPE *DrawInstanced )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT VertexCountPerInstance, + _In_ UINT InstanceCount, + _In_ UINT StartVertexLocation, + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *DrawIndexedInstanced )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT IndexCountPerInstance, + _In_ UINT InstanceCount, + _In_ UINT StartIndexLocation, + _In_ INT BaseVertexLocation, + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *Dispatch )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT ThreadGroupCountX, + _In_ UINT ThreadGroupCountY, + _In_ UINT ThreadGroupCountZ); + + void ( STDMETHODCALLTYPE *CopyBufferRegion )( + ID3D12GraphicsCommandList1 * This, + _In_ ID3D12Resource *pDstBuffer, + UINT64 DstOffset, + _In_ ID3D12Resource *pSrcBuffer, + UINT64 SrcOffset, + UINT64 NumBytes); + + void ( STDMETHODCALLTYPE *CopyTextureRegion )( + ID3D12GraphicsCommandList1 * This, + _In_ const D3D12_TEXTURE_COPY_LOCATION *pDst, + UINT DstX, + UINT DstY, + UINT DstZ, + _In_ const D3D12_TEXTURE_COPY_LOCATION *pSrc, + _In_opt_ const D3D12_BOX *pSrcBox); + + void ( STDMETHODCALLTYPE *CopyResource )( + ID3D12GraphicsCommandList1 * This, + _In_ ID3D12Resource *pDstResource, + _In_ ID3D12Resource *pSrcResource); + + void ( STDMETHODCALLTYPE *CopyTiles )( + ID3D12GraphicsCommandList1 * This, + _In_ ID3D12Resource *pTiledResource, + _In_ const D3D12_TILED_RESOURCE_COORDINATE *pTileRegionStartCoordinate, + _In_ const D3D12_TILE_REGION_SIZE *pTileRegionSize, + _In_ ID3D12Resource *pBuffer, + UINT64 BufferStartOffsetInBytes, + D3D12_TILE_COPY_FLAGS Flags); + + void ( STDMETHODCALLTYPE *ResolveSubresource )( + ID3D12GraphicsCommandList1 * This, + _In_ ID3D12Resource *pDstResource, + _In_ UINT DstSubresource, + _In_ ID3D12Resource *pSrcResource, + _In_ UINT SrcSubresource, + _In_ DXGI_FORMAT Format); + + void ( STDMETHODCALLTYPE *IASetPrimitiveTopology )( + ID3D12GraphicsCommandList1 * This, + _In_ D3D12_PRIMITIVE_TOPOLOGY PrimitiveTopology); + + void ( STDMETHODCALLTYPE *RSSetViewports )( + ID3D12GraphicsCommandList1 * This, + _In_range_(0, D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumViewports, + _In_reads_( NumViewports) const D3D12_VIEWPORT *pViewports); + + void ( STDMETHODCALLTYPE *RSSetScissorRects )( + ID3D12GraphicsCommandList1 * This, + _In_range_(0, D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumRects, + _In_reads_( NumRects) const D3D12_RECT *pRects); + + void ( STDMETHODCALLTYPE *OMSetBlendFactor )( + ID3D12GraphicsCommandList1 * This, + _In_reads_opt_(4) const FLOAT BlendFactor[ 4 ]); + + void ( STDMETHODCALLTYPE *OMSetStencilRef )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT StencilRef); + + void ( STDMETHODCALLTYPE *SetPipelineState )( + ID3D12GraphicsCommandList1 * This, + _In_ ID3D12PipelineState *pPipelineState); + + void ( STDMETHODCALLTYPE *ResourceBarrier )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT NumBarriers, + _In_reads_(NumBarriers) const D3D12_RESOURCE_BARRIER *pBarriers); + + void ( STDMETHODCALLTYPE *ExecuteBundle )( + ID3D12GraphicsCommandList1 * This, + _In_ ID3D12GraphicsCommandList *pCommandList); + + void ( STDMETHODCALLTYPE *SetDescriptorHeaps )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT NumDescriptorHeaps, + _In_reads_(NumDescriptorHeaps) ID3D12DescriptorHeap *const *ppDescriptorHeaps); + + void ( STDMETHODCALLTYPE *SetComputeRootSignature )( + ID3D12GraphicsCommandList1 * This, + _In_opt_ ID3D12RootSignature *pRootSignature); + + void ( STDMETHODCALLTYPE *SetGraphicsRootSignature )( + ID3D12GraphicsCommandList1 * This, + _In_opt_ ID3D12RootSignature *pRootSignature); + + void ( STDMETHODCALLTYPE *SetComputeRootDescriptorTable )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor); + + void ( STDMETHODCALLTYPE *SetGraphicsRootDescriptorTable )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor); + + void ( STDMETHODCALLTYPE *SetComputeRoot32BitConstant )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT RootParameterIndex, + _In_ UINT SrcData, + _In_ UINT DestOffsetIn32BitValues); + + void ( STDMETHODCALLTYPE *SetGraphicsRoot32BitConstant )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT RootParameterIndex, + _In_ UINT SrcData, + _In_ UINT DestOffsetIn32BitValues); + + void ( STDMETHODCALLTYPE *SetComputeRoot32BitConstants )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT RootParameterIndex, + _In_ UINT Num32BitValuesToSet, + _In_reads_(Num32BitValuesToSet*sizeof(UINT)) const void *pSrcData, + _In_ UINT DestOffsetIn32BitValues); + + void ( STDMETHODCALLTYPE *SetGraphicsRoot32BitConstants )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT RootParameterIndex, + _In_ UINT Num32BitValuesToSet, + _In_reads_(Num32BitValuesToSet*sizeof(UINT)) const void *pSrcData, + _In_ UINT DestOffsetIn32BitValues); + + void ( STDMETHODCALLTYPE *SetComputeRootConstantBufferView )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *SetGraphicsRootConstantBufferView )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *SetComputeRootShaderResourceView )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *SetGraphicsRootShaderResourceView )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *SetComputeRootUnorderedAccessView )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *SetGraphicsRootUnorderedAccessView )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *IASetIndexBuffer )( + ID3D12GraphicsCommandList1 * This, + _In_opt_ const D3D12_INDEX_BUFFER_VIEW *pView); + + void ( STDMETHODCALLTYPE *IASetVertexBuffers )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT StartSlot, + _In_ UINT NumViews, + _In_reads_opt_(NumViews) const D3D12_VERTEX_BUFFER_VIEW *pViews); + + void ( STDMETHODCALLTYPE *SOSetTargets )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT StartSlot, + _In_ UINT NumViews, + _In_reads_opt_(NumViews) const D3D12_STREAM_OUTPUT_BUFFER_VIEW *pViews); + + void ( STDMETHODCALLTYPE *OMSetRenderTargets )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT NumRenderTargetDescriptors, + _In_opt_ const D3D12_CPU_DESCRIPTOR_HANDLE *pRenderTargetDescriptors, + _In_ BOOL RTsSingleHandleToDescriptorRange, + _In_opt_ const D3D12_CPU_DESCRIPTOR_HANDLE *pDepthStencilDescriptor); + + void ( STDMETHODCALLTYPE *ClearDepthStencilView )( + ID3D12GraphicsCommandList1 * This, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DepthStencilView, + _In_ D3D12_CLEAR_FLAGS ClearFlags, + _In_ FLOAT Depth, + _In_ UINT8 Stencil, + _In_ UINT NumRects, + _In_reads_(NumRects) const D3D12_RECT *pRects); + + void ( STDMETHODCALLTYPE *ClearRenderTargetView )( + ID3D12GraphicsCommandList1 * This, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE RenderTargetView, + _In_ const FLOAT ColorRGBA[ 4 ], + _In_ UINT NumRects, + _In_reads_(NumRects) const D3D12_RECT *pRects); + + void ( STDMETHODCALLTYPE *ClearUnorderedAccessViewUint )( + ID3D12GraphicsCommandList1 * This, + _In_ D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, + _In_ ID3D12Resource *pResource, + _In_ const UINT Values[ 4 ], + _In_ UINT NumRects, + _In_reads_(NumRects) const D3D12_RECT *pRects); + + void ( STDMETHODCALLTYPE *ClearUnorderedAccessViewFloat )( + ID3D12GraphicsCommandList1 * This, + _In_ D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, + _In_ ID3D12Resource *pResource, + _In_ const FLOAT Values[ 4 ], + _In_ UINT NumRects, + _In_reads_(NumRects) const D3D12_RECT *pRects); + + void ( STDMETHODCALLTYPE *DiscardResource )( + ID3D12GraphicsCommandList1 * This, + _In_ ID3D12Resource *pResource, + _In_opt_ const D3D12_DISCARD_REGION *pRegion); + + void ( STDMETHODCALLTYPE *BeginQuery )( + ID3D12GraphicsCommandList1 * This, + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT Index); + + void ( STDMETHODCALLTYPE *EndQuery )( + ID3D12GraphicsCommandList1 * This, + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT Index); + + void ( STDMETHODCALLTYPE *ResolveQueryData )( + ID3D12GraphicsCommandList1 * This, + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT StartIndex, + _In_ UINT NumQueries, + _In_ ID3D12Resource *pDestinationBuffer, + _In_ UINT64 AlignedDestinationBufferOffset); + + void ( STDMETHODCALLTYPE *SetPredication )( + ID3D12GraphicsCommandList1 * This, + _In_opt_ ID3D12Resource *pBuffer, + _In_ UINT64 AlignedBufferOffset, + _In_ D3D12_PREDICATION_OP Operation); + + void ( STDMETHODCALLTYPE *SetMarker )( + ID3D12GraphicsCommandList1 * This, + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size); + + void ( STDMETHODCALLTYPE *BeginEvent )( + ID3D12GraphicsCommandList1 * This, + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size); + + void ( STDMETHODCALLTYPE *EndEvent )( + ID3D12GraphicsCommandList1 * This); + + void ( STDMETHODCALLTYPE *ExecuteIndirect )( + ID3D12GraphicsCommandList1 * This, + _In_ ID3D12CommandSignature *pCommandSignature, + _In_ UINT MaxCommandCount, + _In_ ID3D12Resource *pArgumentBuffer, + _In_ UINT64 ArgumentBufferOffset, + _In_opt_ ID3D12Resource *pCountBuffer, + _In_ UINT64 CountBufferOffset); + + void ( STDMETHODCALLTYPE *AtomicCopyBufferUINT )( + ID3D12GraphicsCommandList1 * This, + _In_ ID3D12Resource *pDstBuffer, + UINT64 DstOffset, + _In_ ID3D12Resource *pSrcBuffer, + UINT64 SrcOffset, + UINT Dependencies, + _In_reads_(Dependencies) ID3D12Resource *const *ppDependentResources, + _In_reads_(Dependencies) const D3D12_SUBRESOURCE_RANGE_UINT64 *pDependentSubresourceRanges); + + void ( STDMETHODCALLTYPE *AtomicCopyBufferUINT64 )( + ID3D12GraphicsCommandList1 * This, + _In_ ID3D12Resource *pDstBuffer, + UINT64 DstOffset, + _In_ ID3D12Resource *pSrcBuffer, + UINT64 SrcOffset, + UINT Dependencies, + _In_reads_(Dependencies) ID3D12Resource *const *ppDependentResources, + _In_reads_(Dependencies) const D3D12_SUBRESOURCE_RANGE_UINT64 *pDependentSubresourceRanges); + + void ( STDMETHODCALLTYPE *OMSetDepthBounds )( + ID3D12GraphicsCommandList1 * This, + _In_ FLOAT Min, + _In_ FLOAT Max); + + void ( STDMETHODCALLTYPE *SetSamplePositions )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT NumSamplesPerPixel, + _In_ UINT NumPixels, + _In_reads_(NumSamplesPerPixel*NumPixels) D3D12_SAMPLE_POSITION *pSamplePositions); + + void ( STDMETHODCALLTYPE *ResolveSubresourceRegion )( + ID3D12GraphicsCommandList1 * This, + _In_ ID3D12Resource *pDstResource, + _In_ UINT DstSubresource, + _In_ UINT DstX, + _In_ UINT DstY, + _In_ ID3D12Resource *pSrcResource, + _In_ UINT SrcSubresource, + _In_opt_ D3D12_RECT *pSrcRect, + _In_ DXGI_FORMAT Format, + _In_ D3D12_RESOLVE_MODE ResolveMode); + + void ( STDMETHODCALLTYPE *SetViewInstanceMask )( + ID3D12GraphicsCommandList1 * This, + _In_ UINT Mask); + + END_INTERFACE + } ID3D12GraphicsCommandList1Vtbl; + + interface ID3D12GraphicsCommandList1 + { + CONST_VTBL struct ID3D12GraphicsCommandList1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12GraphicsCommandList1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12GraphicsCommandList1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12GraphicsCommandList1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12GraphicsCommandList1_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12GraphicsCommandList1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12GraphicsCommandList1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12GraphicsCommandList1_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12GraphicsCommandList1_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + +#define ID3D12GraphicsCommandList1_GetType(This) \ + ( (This)->lpVtbl -> GetType(This) ) + + +#define ID3D12GraphicsCommandList1_Close(This) \ + ( (This)->lpVtbl -> Close(This) ) + +#define ID3D12GraphicsCommandList1_Reset(This,pAllocator,pInitialState) \ + ( (This)->lpVtbl -> Reset(This,pAllocator,pInitialState) ) + +#define ID3D12GraphicsCommandList1_ClearState(This,pPipelineState) \ + ( (This)->lpVtbl -> ClearState(This,pPipelineState) ) + +#define ID3D12GraphicsCommandList1_DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) ) + +#define ID3D12GraphicsCommandList1_DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) ) + +#define ID3D12GraphicsCommandList1_Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) \ + ( (This)->lpVtbl -> Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) ) + +#define ID3D12GraphicsCommandList1_CopyBufferRegion(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,NumBytes) \ + ( (This)->lpVtbl -> CopyBufferRegion(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,NumBytes) ) + +#define ID3D12GraphicsCommandList1_CopyTextureRegion(This,pDst,DstX,DstY,DstZ,pSrc,pSrcBox) \ + ( (This)->lpVtbl -> CopyTextureRegion(This,pDst,DstX,DstY,DstZ,pSrc,pSrcBox) ) + +#define ID3D12GraphicsCommandList1_CopyResource(This,pDstResource,pSrcResource) \ + ( (This)->lpVtbl -> CopyResource(This,pDstResource,pSrcResource) ) + +#define ID3D12GraphicsCommandList1_CopyTiles(This,pTiledResource,pTileRegionStartCoordinate,pTileRegionSize,pBuffer,BufferStartOffsetInBytes,Flags) \ + ( (This)->lpVtbl -> CopyTiles(This,pTiledResource,pTileRegionStartCoordinate,pTileRegionSize,pBuffer,BufferStartOffsetInBytes,Flags) ) + +#define ID3D12GraphicsCommandList1_ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) \ + ( (This)->lpVtbl -> ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) ) + +#define ID3D12GraphicsCommandList1_IASetPrimitiveTopology(This,PrimitiveTopology) \ + ( (This)->lpVtbl -> IASetPrimitiveTopology(This,PrimitiveTopology) ) + +#define ID3D12GraphicsCommandList1_RSSetViewports(This,NumViewports,pViewports) \ + ( (This)->lpVtbl -> RSSetViewports(This,NumViewports,pViewports) ) + +#define ID3D12GraphicsCommandList1_RSSetScissorRects(This,NumRects,pRects) \ + ( (This)->lpVtbl -> RSSetScissorRects(This,NumRects,pRects) ) + +#define ID3D12GraphicsCommandList1_OMSetBlendFactor(This,BlendFactor) \ + ( (This)->lpVtbl -> OMSetBlendFactor(This,BlendFactor) ) + +#define ID3D12GraphicsCommandList1_OMSetStencilRef(This,StencilRef) \ + ( (This)->lpVtbl -> OMSetStencilRef(This,StencilRef) ) + +#define ID3D12GraphicsCommandList1_SetPipelineState(This,pPipelineState) \ + ( (This)->lpVtbl -> SetPipelineState(This,pPipelineState) ) + +#define ID3D12GraphicsCommandList1_ResourceBarrier(This,NumBarriers,pBarriers) \ + ( (This)->lpVtbl -> ResourceBarrier(This,NumBarriers,pBarriers) ) + +#define ID3D12GraphicsCommandList1_ExecuteBundle(This,pCommandList) \ + ( (This)->lpVtbl -> ExecuteBundle(This,pCommandList) ) + +#define ID3D12GraphicsCommandList1_SetDescriptorHeaps(This,NumDescriptorHeaps,ppDescriptorHeaps) \ + ( (This)->lpVtbl -> SetDescriptorHeaps(This,NumDescriptorHeaps,ppDescriptorHeaps) ) + +#define ID3D12GraphicsCommandList1_SetComputeRootSignature(This,pRootSignature) \ + ( (This)->lpVtbl -> SetComputeRootSignature(This,pRootSignature) ) + +#define ID3D12GraphicsCommandList1_SetGraphicsRootSignature(This,pRootSignature) \ + ( (This)->lpVtbl -> SetGraphicsRootSignature(This,pRootSignature) ) + +#define ID3D12GraphicsCommandList1_SetComputeRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) \ + ( (This)->lpVtbl -> SetComputeRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) ) + +#define ID3D12GraphicsCommandList1_SetGraphicsRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) \ + ( (This)->lpVtbl -> SetGraphicsRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) ) + +#define ID3D12GraphicsCommandList1_SetComputeRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) \ + ( (This)->lpVtbl -> SetComputeRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) ) + +#define ID3D12GraphicsCommandList1_SetGraphicsRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) \ + ( (This)->lpVtbl -> SetGraphicsRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) ) + +#define ID3D12GraphicsCommandList1_SetComputeRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) \ + ( (This)->lpVtbl -> SetComputeRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) ) + +#define ID3D12GraphicsCommandList1_SetGraphicsRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) \ + ( (This)->lpVtbl -> SetGraphicsRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) ) + +#define ID3D12GraphicsCommandList1_SetComputeRootConstantBufferView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetComputeRootConstantBufferView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList1_SetGraphicsRootConstantBufferView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetGraphicsRootConstantBufferView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList1_SetComputeRootShaderResourceView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetComputeRootShaderResourceView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList1_SetGraphicsRootShaderResourceView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetGraphicsRootShaderResourceView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList1_SetComputeRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetComputeRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList1_SetGraphicsRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetGraphicsRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList1_IASetIndexBuffer(This,pView) \ + ( (This)->lpVtbl -> IASetIndexBuffer(This,pView) ) + +#define ID3D12GraphicsCommandList1_IASetVertexBuffers(This,StartSlot,NumViews,pViews) \ + ( (This)->lpVtbl -> IASetVertexBuffers(This,StartSlot,NumViews,pViews) ) + +#define ID3D12GraphicsCommandList1_SOSetTargets(This,StartSlot,NumViews,pViews) \ + ( (This)->lpVtbl -> SOSetTargets(This,StartSlot,NumViews,pViews) ) + +#define ID3D12GraphicsCommandList1_OMSetRenderTargets(This,NumRenderTargetDescriptors,pRenderTargetDescriptors,RTsSingleHandleToDescriptorRange,pDepthStencilDescriptor) \ + ( (This)->lpVtbl -> OMSetRenderTargets(This,NumRenderTargetDescriptors,pRenderTargetDescriptors,RTsSingleHandleToDescriptorRange,pDepthStencilDescriptor) ) + +#define ID3D12GraphicsCommandList1_ClearDepthStencilView(This,DepthStencilView,ClearFlags,Depth,Stencil,NumRects,pRects) \ + ( (This)->lpVtbl -> ClearDepthStencilView(This,DepthStencilView,ClearFlags,Depth,Stencil,NumRects,pRects) ) + +#define ID3D12GraphicsCommandList1_ClearRenderTargetView(This,RenderTargetView,ColorRGBA,NumRects,pRects) \ + ( (This)->lpVtbl -> ClearRenderTargetView(This,RenderTargetView,ColorRGBA,NumRects,pRects) ) + +#define ID3D12GraphicsCommandList1_ClearUnorderedAccessViewUint(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) \ + ( (This)->lpVtbl -> ClearUnorderedAccessViewUint(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) ) + +#define ID3D12GraphicsCommandList1_ClearUnorderedAccessViewFloat(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) \ + ( (This)->lpVtbl -> ClearUnorderedAccessViewFloat(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) ) + +#define ID3D12GraphicsCommandList1_DiscardResource(This,pResource,pRegion) \ + ( (This)->lpVtbl -> DiscardResource(This,pResource,pRegion) ) + +#define ID3D12GraphicsCommandList1_BeginQuery(This,pQueryHeap,Type,Index) \ + ( (This)->lpVtbl -> BeginQuery(This,pQueryHeap,Type,Index) ) + +#define ID3D12GraphicsCommandList1_EndQuery(This,pQueryHeap,Type,Index) \ + ( (This)->lpVtbl -> EndQuery(This,pQueryHeap,Type,Index) ) + +#define ID3D12GraphicsCommandList1_ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset) \ + ( (This)->lpVtbl -> ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset) ) + +#define ID3D12GraphicsCommandList1_SetPredication(This,pBuffer,AlignedBufferOffset,Operation) \ + ( (This)->lpVtbl -> SetPredication(This,pBuffer,AlignedBufferOffset,Operation) ) + +#define ID3D12GraphicsCommandList1_SetMarker(This,Metadata,pData,Size) \ + ( (This)->lpVtbl -> SetMarker(This,Metadata,pData,Size) ) + +#define ID3D12GraphicsCommandList1_BeginEvent(This,Metadata,pData,Size) \ + ( (This)->lpVtbl -> BeginEvent(This,Metadata,pData,Size) ) + +#define ID3D12GraphicsCommandList1_EndEvent(This) \ + ( (This)->lpVtbl -> EndEvent(This) ) + +#define ID3D12GraphicsCommandList1_ExecuteIndirect(This,pCommandSignature,MaxCommandCount,pArgumentBuffer,ArgumentBufferOffset,pCountBuffer,CountBufferOffset) \ + ( (This)->lpVtbl -> ExecuteIndirect(This,pCommandSignature,MaxCommandCount,pArgumentBuffer,ArgumentBufferOffset,pCountBuffer,CountBufferOffset) ) + + +#define ID3D12GraphicsCommandList1_AtomicCopyBufferUINT(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) \ + ( (This)->lpVtbl -> AtomicCopyBufferUINT(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) ) + +#define ID3D12GraphicsCommandList1_AtomicCopyBufferUINT64(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) \ + ( (This)->lpVtbl -> AtomicCopyBufferUINT64(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) ) + +#define ID3D12GraphicsCommandList1_OMSetDepthBounds(This,Min,Max) \ + ( (This)->lpVtbl -> OMSetDepthBounds(This,Min,Max) ) + +#define ID3D12GraphicsCommandList1_SetSamplePositions(This,NumSamplesPerPixel,NumPixels,pSamplePositions) \ + ( (This)->lpVtbl -> SetSamplePositions(This,NumSamplesPerPixel,NumPixels,pSamplePositions) ) + +#define ID3D12GraphicsCommandList1_ResolveSubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,pSrcResource,SrcSubresource,pSrcRect,Format,ResolveMode) \ + ( (This)->lpVtbl -> ResolveSubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,pSrcResource,SrcSubresource,pSrcRect,Format,ResolveMode) ) + +#define ID3D12GraphicsCommandList1_SetViewInstanceMask(This,Mask) \ + ( (This)->lpVtbl -> SetViewInstanceMask(This,Mask) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12GraphicsCommandList1_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12_0000_0018 */ +/* [local] */ + +typedef struct D3D12_WRITEBUFFERIMMEDIATE_PARAMETER + { + D3D12_GPU_VIRTUAL_ADDRESS Dest; + UINT32 Value; + } D3D12_WRITEBUFFERIMMEDIATE_PARAMETER; + +typedef +enum D3D12_WRITEBUFFERIMMEDIATE_MODE + { + D3D12_WRITEBUFFERIMMEDIATE_MODE_DEFAULT = 0, + D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_IN = 0x1, + D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_OUT = 0x2 + } D3D12_WRITEBUFFERIMMEDIATE_MODE; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0018_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0018_v0_0_s_ifspec; + +#ifndef __ID3D12GraphicsCommandList2_INTERFACE_DEFINED__ +#define __ID3D12GraphicsCommandList2_INTERFACE_DEFINED__ + +/* interface ID3D12GraphicsCommandList2 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12GraphicsCommandList2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("38C3E585-FF17-412C-9150-4FC6F9D72A28") + ID3D12GraphicsCommandList2 : public ID3D12GraphicsCommandList1 + { + public: + virtual void STDMETHODCALLTYPE WriteBufferImmediate( + UINT Count, + _In_reads_(Count) const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *pParams, + _In_reads_opt_(Count) const D3D12_WRITEBUFFERIMMEDIATE_MODE *pModes) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12GraphicsCommandList2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12GraphicsCommandList2 * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12GraphicsCommandList2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12GraphicsCommandList2 * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12GraphicsCommandList2 * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12GraphicsCommandList2 * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12GraphicsCommandList2 * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12GraphicsCommandList2 * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12GraphicsCommandList2 * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + D3D12_COMMAND_LIST_TYPE ( STDMETHODCALLTYPE *GetType )( + ID3D12GraphicsCommandList2 * This); + + HRESULT ( STDMETHODCALLTYPE *Close )( + ID3D12GraphicsCommandList2 * This); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + ID3D12GraphicsCommandList2 * This, + _In_ ID3D12CommandAllocator *pAllocator, + _In_opt_ ID3D12PipelineState *pInitialState); + + void ( STDMETHODCALLTYPE *ClearState )( + ID3D12GraphicsCommandList2 * This, + _In_opt_ ID3D12PipelineState *pPipelineState); + + void ( STDMETHODCALLTYPE *DrawInstanced )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT VertexCountPerInstance, + _In_ UINT InstanceCount, + _In_ UINT StartVertexLocation, + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *DrawIndexedInstanced )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT IndexCountPerInstance, + _In_ UINT InstanceCount, + _In_ UINT StartIndexLocation, + _In_ INT BaseVertexLocation, + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *Dispatch )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT ThreadGroupCountX, + _In_ UINT ThreadGroupCountY, + _In_ UINT ThreadGroupCountZ); + + void ( STDMETHODCALLTYPE *CopyBufferRegion )( + ID3D12GraphicsCommandList2 * This, + _In_ ID3D12Resource *pDstBuffer, + UINT64 DstOffset, + _In_ ID3D12Resource *pSrcBuffer, + UINT64 SrcOffset, + UINT64 NumBytes); + + void ( STDMETHODCALLTYPE *CopyTextureRegion )( + ID3D12GraphicsCommandList2 * This, + _In_ const D3D12_TEXTURE_COPY_LOCATION *pDst, + UINT DstX, + UINT DstY, + UINT DstZ, + _In_ const D3D12_TEXTURE_COPY_LOCATION *pSrc, + _In_opt_ const D3D12_BOX *pSrcBox); + + void ( STDMETHODCALLTYPE *CopyResource )( + ID3D12GraphicsCommandList2 * This, + _In_ ID3D12Resource *pDstResource, + _In_ ID3D12Resource *pSrcResource); + + void ( STDMETHODCALLTYPE *CopyTiles )( + ID3D12GraphicsCommandList2 * This, + _In_ ID3D12Resource *pTiledResource, + _In_ const D3D12_TILED_RESOURCE_COORDINATE *pTileRegionStartCoordinate, + _In_ const D3D12_TILE_REGION_SIZE *pTileRegionSize, + _In_ ID3D12Resource *pBuffer, + UINT64 BufferStartOffsetInBytes, + D3D12_TILE_COPY_FLAGS Flags); + + void ( STDMETHODCALLTYPE *ResolveSubresource )( + ID3D12GraphicsCommandList2 * This, + _In_ ID3D12Resource *pDstResource, + _In_ UINT DstSubresource, + _In_ ID3D12Resource *pSrcResource, + _In_ UINT SrcSubresource, + _In_ DXGI_FORMAT Format); + + void ( STDMETHODCALLTYPE *IASetPrimitiveTopology )( + ID3D12GraphicsCommandList2 * This, + _In_ D3D12_PRIMITIVE_TOPOLOGY PrimitiveTopology); + + void ( STDMETHODCALLTYPE *RSSetViewports )( + ID3D12GraphicsCommandList2 * This, + _In_range_(0, D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumViewports, + _In_reads_( NumViewports) const D3D12_VIEWPORT *pViewports); + + void ( STDMETHODCALLTYPE *RSSetScissorRects )( + ID3D12GraphicsCommandList2 * This, + _In_range_(0, D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumRects, + _In_reads_( NumRects) const D3D12_RECT *pRects); + + void ( STDMETHODCALLTYPE *OMSetBlendFactor )( + ID3D12GraphicsCommandList2 * This, + _In_reads_opt_(4) const FLOAT BlendFactor[ 4 ]); + + void ( STDMETHODCALLTYPE *OMSetStencilRef )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT StencilRef); + + void ( STDMETHODCALLTYPE *SetPipelineState )( + ID3D12GraphicsCommandList2 * This, + _In_ ID3D12PipelineState *pPipelineState); + + void ( STDMETHODCALLTYPE *ResourceBarrier )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT NumBarriers, + _In_reads_(NumBarriers) const D3D12_RESOURCE_BARRIER *pBarriers); + + void ( STDMETHODCALLTYPE *ExecuteBundle )( + ID3D12GraphicsCommandList2 * This, + _In_ ID3D12GraphicsCommandList *pCommandList); + + void ( STDMETHODCALLTYPE *SetDescriptorHeaps )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT NumDescriptorHeaps, + _In_reads_(NumDescriptorHeaps) ID3D12DescriptorHeap *const *ppDescriptorHeaps); + + void ( STDMETHODCALLTYPE *SetComputeRootSignature )( + ID3D12GraphicsCommandList2 * This, + _In_opt_ ID3D12RootSignature *pRootSignature); + + void ( STDMETHODCALLTYPE *SetGraphicsRootSignature )( + ID3D12GraphicsCommandList2 * This, + _In_opt_ ID3D12RootSignature *pRootSignature); + + void ( STDMETHODCALLTYPE *SetComputeRootDescriptorTable )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor); + + void ( STDMETHODCALLTYPE *SetGraphicsRootDescriptorTable )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor); + + void ( STDMETHODCALLTYPE *SetComputeRoot32BitConstant )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT RootParameterIndex, + _In_ UINT SrcData, + _In_ UINT DestOffsetIn32BitValues); + + void ( STDMETHODCALLTYPE *SetGraphicsRoot32BitConstant )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT RootParameterIndex, + _In_ UINT SrcData, + _In_ UINT DestOffsetIn32BitValues); + + void ( STDMETHODCALLTYPE *SetComputeRoot32BitConstants )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT RootParameterIndex, + _In_ UINT Num32BitValuesToSet, + _In_reads_(Num32BitValuesToSet*sizeof(UINT)) const void *pSrcData, + _In_ UINT DestOffsetIn32BitValues); + + void ( STDMETHODCALLTYPE *SetGraphicsRoot32BitConstants )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT RootParameterIndex, + _In_ UINT Num32BitValuesToSet, + _In_reads_(Num32BitValuesToSet*sizeof(UINT)) const void *pSrcData, + _In_ UINT DestOffsetIn32BitValues); + + void ( STDMETHODCALLTYPE *SetComputeRootConstantBufferView )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *SetGraphicsRootConstantBufferView )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *SetComputeRootShaderResourceView )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *SetGraphicsRootShaderResourceView )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *SetComputeRootUnorderedAccessView )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *SetGraphicsRootUnorderedAccessView )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *IASetIndexBuffer )( + ID3D12GraphicsCommandList2 * This, + _In_opt_ const D3D12_INDEX_BUFFER_VIEW *pView); + + void ( STDMETHODCALLTYPE *IASetVertexBuffers )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT StartSlot, + _In_ UINT NumViews, + _In_reads_opt_(NumViews) const D3D12_VERTEX_BUFFER_VIEW *pViews); + + void ( STDMETHODCALLTYPE *SOSetTargets )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT StartSlot, + _In_ UINT NumViews, + _In_reads_opt_(NumViews) const D3D12_STREAM_OUTPUT_BUFFER_VIEW *pViews); + + void ( STDMETHODCALLTYPE *OMSetRenderTargets )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT NumRenderTargetDescriptors, + _In_opt_ const D3D12_CPU_DESCRIPTOR_HANDLE *pRenderTargetDescriptors, + _In_ BOOL RTsSingleHandleToDescriptorRange, + _In_opt_ const D3D12_CPU_DESCRIPTOR_HANDLE *pDepthStencilDescriptor); + + void ( STDMETHODCALLTYPE *ClearDepthStencilView )( + ID3D12GraphicsCommandList2 * This, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DepthStencilView, + _In_ D3D12_CLEAR_FLAGS ClearFlags, + _In_ FLOAT Depth, + _In_ UINT8 Stencil, + _In_ UINT NumRects, + _In_reads_(NumRects) const D3D12_RECT *pRects); + + void ( STDMETHODCALLTYPE *ClearRenderTargetView )( + ID3D12GraphicsCommandList2 * This, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE RenderTargetView, + _In_ const FLOAT ColorRGBA[ 4 ], + _In_ UINT NumRects, + _In_reads_(NumRects) const D3D12_RECT *pRects); + + void ( STDMETHODCALLTYPE *ClearUnorderedAccessViewUint )( + ID3D12GraphicsCommandList2 * This, + _In_ D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, + _In_ ID3D12Resource *pResource, + _In_ const UINT Values[ 4 ], + _In_ UINT NumRects, + _In_reads_(NumRects) const D3D12_RECT *pRects); + + void ( STDMETHODCALLTYPE *ClearUnorderedAccessViewFloat )( + ID3D12GraphicsCommandList2 * This, + _In_ D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, + _In_ ID3D12Resource *pResource, + _In_ const FLOAT Values[ 4 ], + _In_ UINT NumRects, + _In_reads_(NumRects) const D3D12_RECT *pRects); + + void ( STDMETHODCALLTYPE *DiscardResource )( + ID3D12GraphicsCommandList2 * This, + _In_ ID3D12Resource *pResource, + _In_opt_ const D3D12_DISCARD_REGION *pRegion); + + void ( STDMETHODCALLTYPE *BeginQuery )( + ID3D12GraphicsCommandList2 * This, + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT Index); + + void ( STDMETHODCALLTYPE *EndQuery )( + ID3D12GraphicsCommandList2 * This, + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT Index); + + void ( STDMETHODCALLTYPE *ResolveQueryData )( + ID3D12GraphicsCommandList2 * This, + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT StartIndex, + _In_ UINT NumQueries, + _In_ ID3D12Resource *pDestinationBuffer, + _In_ UINT64 AlignedDestinationBufferOffset); + + void ( STDMETHODCALLTYPE *SetPredication )( + ID3D12GraphicsCommandList2 * This, + _In_opt_ ID3D12Resource *pBuffer, + _In_ UINT64 AlignedBufferOffset, + _In_ D3D12_PREDICATION_OP Operation); + + void ( STDMETHODCALLTYPE *SetMarker )( + ID3D12GraphicsCommandList2 * This, + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size); + + void ( STDMETHODCALLTYPE *BeginEvent )( + ID3D12GraphicsCommandList2 * This, + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size); + + void ( STDMETHODCALLTYPE *EndEvent )( + ID3D12GraphicsCommandList2 * This); + + void ( STDMETHODCALLTYPE *ExecuteIndirect )( + ID3D12GraphicsCommandList2 * This, + _In_ ID3D12CommandSignature *pCommandSignature, + _In_ UINT MaxCommandCount, + _In_ ID3D12Resource *pArgumentBuffer, + _In_ UINT64 ArgumentBufferOffset, + _In_opt_ ID3D12Resource *pCountBuffer, + _In_ UINT64 CountBufferOffset); + + void ( STDMETHODCALLTYPE *AtomicCopyBufferUINT )( + ID3D12GraphicsCommandList2 * This, + _In_ ID3D12Resource *pDstBuffer, + UINT64 DstOffset, + _In_ ID3D12Resource *pSrcBuffer, + UINT64 SrcOffset, + UINT Dependencies, + _In_reads_(Dependencies) ID3D12Resource *const *ppDependentResources, + _In_reads_(Dependencies) const D3D12_SUBRESOURCE_RANGE_UINT64 *pDependentSubresourceRanges); + + void ( STDMETHODCALLTYPE *AtomicCopyBufferUINT64 )( + ID3D12GraphicsCommandList2 * This, + _In_ ID3D12Resource *pDstBuffer, + UINT64 DstOffset, + _In_ ID3D12Resource *pSrcBuffer, + UINT64 SrcOffset, + UINT Dependencies, + _In_reads_(Dependencies) ID3D12Resource *const *ppDependentResources, + _In_reads_(Dependencies) const D3D12_SUBRESOURCE_RANGE_UINT64 *pDependentSubresourceRanges); + + void ( STDMETHODCALLTYPE *OMSetDepthBounds )( + ID3D12GraphicsCommandList2 * This, + _In_ FLOAT Min, + _In_ FLOAT Max); + + void ( STDMETHODCALLTYPE *SetSamplePositions )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT NumSamplesPerPixel, + _In_ UINT NumPixels, + _In_reads_(NumSamplesPerPixel*NumPixels) D3D12_SAMPLE_POSITION *pSamplePositions); + + void ( STDMETHODCALLTYPE *ResolveSubresourceRegion )( + ID3D12GraphicsCommandList2 * This, + _In_ ID3D12Resource *pDstResource, + _In_ UINT DstSubresource, + _In_ UINT DstX, + _In_ UINT DstY, + _In_ ID3D12Resource *pSrcResource, + _In_ UINT SrcSubresource, + _In_opt_ D3D12_RECT *pSrcRect, + _In_ DXGI_FORMAT Format, + _In_ D3D12_RESOLVE_MODE ResolveMode); + + void ( STDMETHODCALLTYPE *SetViewInstanceMask )( + ID3D12GraphicsCommandList2 * This, + _In_ UINT Mask); + + void ( STDMETHODCALLTYPE *WriteBufferImmediate )( + ID3D12GraphicsCommandList2 * This, + UINT Count, + _In_reads_(Count) const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *pParams, + _In_reads_opt_(Count) const D3D12_WRITEBUFFERIMMEDIATE_MODE *pModes); + + END_INTERFACE + } ID3D12GraphicsCommandList2Vtbl; + + interface ID3D12GraphicsCommandList2 + { + CONST_VTBL struct ID3D12GraphicsCommandList2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12GraphicsCommandList2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12GraphicsCommandList2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12GraphicsCommandList2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12GraphicsCommandList2_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12GraphicsCommandList2_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12GraphicsCommandList2_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12GraphicsCommandList2_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12GraphicsCommandList2_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + +#define ID3D12GraphicsCommandList2_GetType(This) \ + ( (This)->lpVtbl -> GetType(This) ) + + +#define ID3D12GraphicsCommandList2_Close(This) \ + ( (This)->lpVtbl -> Close(This) ) + +#define ID3D12GraphicsCommandList2_Reset(This,pAllocator,pInitialState) \ + ( (This)->lpVtbl -> Reset(This,pAllocator,pInitialState) ) + +#define ID3D12GraphicsCommandList2_ClearState(This,pPipelineState) \ + ( (This)->lpVtbl -> ClearState(This,pPipelineState) ) + +#define ID3D12GraphicsCommandList2_DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) ) + +#define ID3D12GraphicsCommandList2_DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) ) + +#define ID3D12GraphicsCommandList2_Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) \ + ( (This)->lpVtbl -> Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) ) + +#define ID3D12GraphicsCommandList2_CopyBufferRegion(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,NumBytes) \ + ( (This)->lpVtbl -> CopyBufferRegion(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,NumBytes) ) + +#define ID3D12GraphicsCommandList2_CopyTextureRegion(This,pDst,DstX,DstY,DstZ,pSrc,pSrcBox) \ + ( (This)->lpVtbl -> CopyTextureRegion(This,pDst,DstX,DstY,DstZ,pSrc,pSrcBox) ) + +#define ID3D12GraphicsCommandList2_CopyResource(This,pDstResource,pSrcResource) \ + ( (This)->lpVtbl -> CopyResource(This,pDstResource,pSrcResource) ) + +#define ID3D12GraphicsCommandList2_CopyTiles(This,pTiledResource,pTileRegionStartCoordinate,pTileRegionSize,pBuffer,BufferStartOffsetInBytes,Flags) \ + ( (This)->lpVtbl -> CopyTiles(This,pTiledResource,pTileRegionStartCoordinate,pTileRegionSize,pBuffer,BufferStartOffsetInBytes,Flags) ) + +#define ID3D12GraphicsCommandList2_ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) \ + ( (This)->lpVtbl -> ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) ) + +#define ID3D12GraphicsCommandList2_IASetPrimitiveTopology(This,PrimitiveTopology) \ + ( (This)->lpVtbl -> IASetPrimitiveTopology(This,PrimitiveTopology) ) + +#define ID3D12GraphicsCommandList2_RSSetViewports(This,NumViewports,pViewports) \ + ( (This)->lpVtbl -> RSSetViewports(This,NumViewports,pViewports) ) + +#define ID3D12GraphicsCommandList2_RSSetScissorRects(This,NumRects,pRects) \ + ( (This)->lpVtbl -> RSSetScissorRects(This,NumRects,pRects) ) + +#define ID3D12GraphicsCommandList2_OMSetBlendFactor(This,BlendFactor) \ + ( (This)->lpVtbl -> OMSetBlendFactor(This,BlendFactor) ) + +#define ID3D12GraphicsCommandList2_OMSetStencilRef(This,StencilRef) \ + ( (This)->lpVtbl -> OMSetStencilRef(This,StencilRef) ) + +#define ID3D12GraphicsCommandList2_SetPipelineState(This,pPipelineState) \ + ( (This)->lpVtbl -> SetPipelineState(This,pPipelineState) ) + +#define ID3D12GraphicsCommandList2_ResourceBarrier(This,NumBarriers,pBarriers) \ + ( (This)->lpVtbl -> ResourceBarrier(This,NumBarriers,pBarriers) ) + +#define ID3D12GraphicsCommandList2_ExecuteBundle(This,pCommandList) \ + ( (This)->lpVtbl -> ExecuteBundle(This,pCommandList) ) + +#define ID3D12GraphicsCommandList2_SetDescriptorHeaps(This,NumDescriptorHeaps,ppDescriptorHeaps) \ + ( (This)->lpVtbl -> SetDescriptorHeaps(This,NumDescriptorHeaps,ppDescriptorHeaps) ) + +#define ID3D12GraphicsCommandList2_SetComputeRootSignature(This,pRootSignature) \ + ( (This)->lpVtbl -> SetComputeRootSignature(This,pRootSignature) ) + +#define ID3D12GraphicsCommandList2_SetGraphicsRootSignature(This,pRootSignature) \ + ( (This)->lpVtbl -> SetGraphicsRootSignature(This,pRootSignature) ) + +#define ID3D12GraphicsCommandList2_SetComputeRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) \ + ( (This)->lpVtbl -> SetComputeRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) ) + +#define ID3D12GraphicsCommandList2_SetGraphicsRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) \ + ( (This)->lpVtbl -> SetGraphicsRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) ) + +#define ID3D12GraphicsCommandList2_SetComputeRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) \ + ( (This)->lpVtbl -> SetComputeRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) ) + +#define ID3D12GraphicsCommandList2_SetGraphicsRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) \ + ( (This)->lpVtbl -> SetGraphicsRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) ) + +#define ID3D12GraphicsCommandList2_SetComputeRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) \ + ( (This)->lpVtbl -> SetComputeRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) ) + +#define ID3D12GraphicsCommandList2_SetGraphicsRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) \ + ( (This)->lpVtbl -> SetGraphicsRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) ) + +#define ID3D12GraphicsCommandList2_SetComputeRootConstantBufferView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetComputeRootConstantBufferView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList2_SetGraphicsRootConstantBufferView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetGraphicsRootConstantBufferView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList2_SetComputeRootShaderResourceView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetComputeRootShaderResourceView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList2_SetGraphicsRootShaderResourceView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetGraphicsRootShaderResourceView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList2_SetComputeRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetComputeRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList2_SetGraphicsRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetGraphicsRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList2_IASetIndexBuffer(This,pView) \ + ( (This)->lpVtbl -> IASetIndexBuffer(This,pView) ) + +#define ID3D12GraphicsCommandList2_IASetVertexBuffers(This,StartSlot,NumViews,pViews) \ + ( (This)->lpVtbl -> IASetVertexBuffers(This,StartSlot,NumViews,pViews) ) + +#define ID3D12GraphicsCommandList2_SOSetTargets(This,StartSlot,NumViews,pViews) \ + ( (This)->lpVtbl -> SOSetTargets(This,StartSlot,NumViews,pViews) ) + +#define ID3D12GraphicsCommandList2_OMSetRenderTargets(This,NumRenderTargetDescriptors,pRenderTargetDescriptors,RTsSingleHandleToDescriptorRange,pDepthStencilDescriptor) \ + ( (This)->lpVtbl -> OMSetRenderTargets(This,NumRenderTargetDescriptors,pRenderTargetDescriptors,RTsSingleHandleToDescriptorRange,pDepthStencilDescriptor) ) + +#define ID3D12GraphicsCommandList2_ClearDepthStencilView(This,DepthStencilView,ClearFlags,Depth,Stencil,NumRects,pRects) \ + ( (This)->lpVtbl -> ClearDepthStencilView(This,DepthStencilView,ClearFlags,Depth,Stencil,NumRects,pRects) ) + +#define ID3D12GraphicsCommandList2_ClearRenderTargetView(This,RenderTargetView,ColorRGBA,NumRects,pRects) \ + ( (This)->lpVtbl -> ClearRenderTargetView(This,RenderTargetView,ColorRGBA,NumRects,pRects) ) + +#define ID3D12GraphicsCommandList2_ClearUnorderedAccessViewUint(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) \ + ( (This)->lpVtbl -> ClearUnorderedAccessViewUint(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) ) + +#define ID3D12GraphicsCommandList2_ClearUnorderedAccessViewFloat(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) \ + ( (This)->lpVtbl -> ClearUnorderedAccessViewFloat(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) ) + +#define ID3D12GraphicsCommandList2_DiscardResource(This,pResource,pRegion) \ + ( (This)->lpVtbl -> DiscardResource(This,pResource,pRegion) ) + +#define ID3D12GraphicsCommandList2_BeginQuery(This,pQueryHeap,Type,Index) \ + ( (This)->lpVtbl -> BeginQuery(This,pQueryHeap,Type,Index) ) + +#define ID3D12GraphicsCommandList2_EndQuery(This,pQueryHeap,Type,Index) \ + ( (This)->lpVtbl -> EndQuery(This,pQueryHeap,Type,Index) ) + +#define ID3D12GraphicsCommandList2_ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset) \ + ( (This)->lpVtbl -> ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset) ) + +#define ID3D12GraphicsCommandList2_SetPredication(This,pBuffer,AlignedBufferOffset,Operation) \ + ( (This)->lpVtbl -> SetPredication(This,pBuffer,AlignedBufferOffset,Operation) ) + +#define ID3D12GraphicsCommandList2_SetMarker(This,Metadata,pData,Size) \ + ( (This)->lpVtbl -> SetMarker(This,Metadata,pData,Size) ) + +#define ID3D12GraphicsCommandList2_BeginEvent(This,Metadata,pData,Size) \ + ( (This)->lpVtbl -> BeginEvent(This,Metadata,pData,Size) ) + +#define ID3D12GraphicsCommandList2_EndEvent(This) \ + ( (This)->lpVtbl -> EndEvent(This) ) + +#define ID3D12GraphicsCommandList2_ExecuteIndirect(This,pCommandSignature,MaxCommandCount,pArgumentBuffer,ArgumentBufferOffset,pCountBuffer,CountBufferOffset) \ + ( (This)->lpVtbl -> ExecuteIndirect(This,pCommandSignature,MaxCommandCount,pArgumentBuffer,ArgumentBufferOffset,pCountBuffer,CountBufferOffset) ) + + +#define ID3D12GraphicsCommandList2_AtomicCopyBufferUINT(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) \ + ( (This)->lpVtbl -> AtomicCopyBufferUINT(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) ) + +#define ID3D12GraphicsCommandList2_AtomicCopyBufferUINT64(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) \ + ( (This)->lpVtbl -> AtomicCopyBufferUINT64(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) ) + +#define ID3D12GraphicsCommandList2_OMSetDepthBounds(This,Min,Max) \ + ( (This)->lpVtbl -> OMSetDepthBounds(This,Min,Max) ) + +#define ID3D12GraphicsCommandList2_SetSamplePositions(This,NumSamplesPerPixel,NumPixels,pSamplePositions) \ + ( (This)->lpVtbl -> SetSamplePositions(This,NumSamplesPerPixel,NumPixels,pSamplePositions) ) + +#define ID3D12GraphicsCommandList2_ResolveSubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,pSrcResource,SrcSubresource,pSrcRect,Format,ResolveMode) \ + ( (This)->lpVtbl -> ResolveSubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,pSrcResource,SrcSubresource,pSrcRect,Format,ResolveMode) ) + +#define ID3D12GraphicsCommandList2_SetViewInstanceMask(This,Mask) \ + ( (This)->lpVtbl -> SetViewInstanceMask(This,Mask) ) + + +#define ID3D12GraphicsCommandList2_WriteBufferImmediate(This,Count,pParams,pModes) \ + ( (This)->lpVtbl -> WriteBufferImmediate(This,Count,pParams,pModes) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12GraphicsCommandList2_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12CommandQueue_INTERFACE_DEFINED__ +#define __ID3D12CommandQueue_INTERFACE_DEFINED__ + +/* interface ID3D12CommandQueue */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12CommandQueue; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("0ec870a6-5d7e-4c22-8cfc-5baae07616ed") + ID3D12CommandQueue : public ID3D12Pageable + { + public: + virtual void STDMETHODCALLTYPE UpdateTileMappings( + _In_ ID3D12Resource *pResource, + UINT NumResourceRegions, + _In_reads_opt_(NumResourceRegions) const D3D12_TILED_RESOURCE_COORDINATE *pResourceRegionStartCoordinates, + _In_reads_opt_(NumResourceRegions) const D3D12_TILE_REGION_SIZE *pResourceRegionSizes, + _In_opt_ ID3D12Heap *pHeap, + UINT NumRanges, + _In_reads_opt_(NumRanges) const D3D12_TILE_RANGE_FLAGS *pRangeFlags, + _In_reads_opt_(NumRanges) const UINT *pHeapRangeStartOffsets, + _In_reads_opt_(NumRanges) const UINT *pRangeTileCounts, + D3D12_TILE_MAPPING_FLAGS Flags) = 0; + + virtual void STDMETHODCALLTYPE CopyTileMappings( + _In_ ID3D12Resource *pDstResource, + _In_ const D3D12_TILED_RESOURCE_COORDINATE *pDstRegionStartCoordinate, + _In_ ID3D12Resource *pSrcResource, + _In_ const D3D12_TILED_RESOURCE_COORDINATE *pSrcRegionStartCoordinate, + _In_ const D3D12_TILE_REGION_SIZE *pRegionSize, + D3D12_TILE_MAPPING_FLAGS Flags) = 0; + + virtual void STDMETHODCALLTYPE ExecuteCommandLists( + _In_ UINT NumCommandLists, + _In_reads_(NumCommandLists) ID3D12CommandList *const *ppCommandLists) = 0; + + virtual void STDMETHODCALLTYPE SetMarker( + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size) = 0; + + virtual void STDMETHODCALLTYPE BeginEvent( + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size) = 0; + + virtual void STDMETHODCALLTYPE EndEvent( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Signal( + ID3D12Fence *pFence, + UINT64 Value) = 0; + + virtual HRESULT STDMETHODCALLTYPE Wait( + ID3D12Fence *pFence, + UINT64 Value) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTimestampFrequency( + _Out_ UINT64 *pFrequency) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetClockCalibration( + _Out_ UINT64 *pGpuTimestamp, + _Out_ UINT64 *pCpuTimestamp) = 0; + + virtual D3D12_COMMAND_QUEUE_DESC STDMETHODCALLTYPE GetDesc( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12CommandQueueVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12CommandQueue * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12CommandQueue * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12CommandQueue * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12CommandQueue * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12CommandQueue * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12CommandQueue * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12CommandQueue * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12CommandQueue * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + void ( STDMETHODCALLTYPE *UpdateTileMappings )( + ID3D12CommandQueue * This, + _In_ ID3D12Resource *pResource, + UINT NumResourceRegions, + _In_reads_opt_(NumResourceRegions) const D3D12_TILED_RESOURCE_COORDINATE *pResourceRegionStartCoordinates, + _In_reads_opt_(NumResourceRegions) const D3D12_TILE_REGION_SIZE *pResourceRegionSizes, + _In_opt_ ID3D12Heap *pHeap, + UINT NumRanges, + _In_reads_opt_(NumRanges) const D3D12_TILE_RANGE_FLAGS *pRangeFlags, + _In_reads_opt_(NumRanges) const UINT *pHeapRangeStartOffsets, + _In_reads_opt_(NumRanges) const UINT *pRangeTileCounts, + D3D12_TILE_MAPPING_FLAGS Flags); + + void ( STDMETHODCALLTYPE *CopyTileMappings )( + ID3D12CommandQueue * This, + _In_ ID3D12Resource *pDstResource, + _In_ const D3D12_TILED_RESOURCE_COORDINATE *pDstRegionStartCoordinate, + _In_ ID3D12Resource *pSrcResource, + _In_ const D3D12_TILED_RESOURCE_COORDINATE *pSrcRegionStartCoordinate, + _In_ const D3D12_TILE_REGION_SIZE *pRegionSize, + D3D12_TILE_MAPPING_FLAGS Flags); + + void ( STDMETHODCALLTYPE *ExecuteCommandLists )( + ID3D12CommandQueue * This, + _In_ UINT NumCommandLists, + _In_reads_(NumCommandLists) ID3D12CommandList *const *ppCommandLists); + + void ( STDMETHODCALLTYPE *SetMarker )( + ID3D12CommandQueue * This, + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size); + + void ( STDMETHODCALLTYPE *BeginEvent )( + ID3D12CommandQueue * This, + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size); + + void ( STDMETHODCALLTYPE *EndEvent )( + ID3D12CommandQueue * This); + + HRESULT ( STDMETHODCALLTYPE *Signal )( + ID3D12CommandQueue * This, + ID3D12Fence *pFence, + UINT64 Value); + + HRESULT ( STDMETHODCALLTYPE *Wait )( + ID3D12CommandQueue * This, + ID3D12Fence *pFence, + UINT64 Value); + + HRESULT ( STDMETHODCALLTYPE *GetTimestampFrequency )( + ID3D12CommandQueue * This, + _Out_ UINT64 *pFrequency); + + HRESULT ( STDMETHODCALLTYPE *GetClockCalibration )( + ID3D12CommandQueue * This, + _Out_ UINT64 *pGpuTimestamp, + _Out_ UINT64 *pCpuTimestamp); + + D3D12_COMMAND_QUEUE_DESC ( STDMETHODCALLTYPE *GetDesc )( + ID3D12CommandQueue * This); + + END_INTERFACE + } ID3D12CommandQueueVtbl; + + interface ID3D12CommandQueue + { + CONST_VTBL struct ID3D12CommandQueueVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12CommandQueue_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12CommandQueue_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12CommandQueue_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12CommandQueue_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12CommandQueue_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12CommandQueue_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12CommandQueue_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12CommandQueue_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + + +#define ID3D12CommandQueue_UpdateTileMappings(This,pResource,NumResourceRegions,pResourceRegionStartCoordinates,pResourceRegionSizes,pHeap,NumRanges,pRangeFlags,pHeapRangeStartOffsets,pRangeTileCounts,Flags) \ + ( (This)->lpVtbl -> UpdateTileMappings(This,pResource,NumResourceRegions,pResourceRegionStartCoordinates,pResourceRegionSizes,pHeap,NumRanges,pRangeFlags,pHeapRangeStartOffsets,pRangeTileCounts,Flags) ) + +#define ID3D12CommandQueue_CopyTileMappings(This,pDstResource,pDstRegionStartCoordinate,pSrcResource,pSrcRegionStartCoordinate,pRegionSize,Flags) \ + ( (This)->lpVtbl -> CopyTileMappings(This,pDstResource,pDstRegionStartCoordinate,pSrcResource,pSrcRegionStartCoordinate,pRegionSize,Flags) ) + +#define ID3D12CommandQueue_ExecuteCommandLists(This,NumCommandLists,ppCommandLists) \ + ( (This)->lpVtbl -> ExecuteCommandLists(This,NumCommandLists,ppCommandLists) ) + +#define ID3D12CommandQueue_SetMarker(This,Metadata,pData,Size) \ + ( (This)->lpVtbl -> SetMarker(This,Metadata,pData,Size) ) + +#define ID3D12CommandQueue_BeginEvent(This,Metadata,pData,Size) \ + ( (This)->lpVtbl -> BeginEvent(This,Metadata,pData,Size) ) + +#define ID3D12CommandQueue_EndEvent(This) \ + ( (This)->lpVtbl -> EndEvent(This) ) + +#define ID3D12CommandQueue_Signal(This,pFence,Value) \ + ( (This)->lpVtbl -> Signal(This,pFence,Value) ) + +#define ID3D12CommandQueue_Wait(This,pFence,Value) \ + ( (This)->lpVtbl -> Wait(This,pFence,Value) ) + +#define ID3D12CommandQueue_GetTimestampFrequency(This,pFrequency) \ + ( (This)->lpVtbl -> GetTimestampFrequency(This,pFrequency) ) + +#define ID3D12CommandQueue_GetClockCalibration(This,pGpuTimestamp,pCpuTimestamp) \ + ( (This)->lpVtbl -> GetClockCalibration(This,pGpuTimestamp,pCpuTimestamp) ) + +#define ID3D12CommandQueue_GetDesc(This) \ + ( (This)->lpVtbl -> GetDesc(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + + + + + +#endif /* __ID3D12CommandQueue_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12_0000_0020 */ +/* [local] */ + +#ifdef __midl +#ifndef LUID_DEFINED +#define LUID_DEFINED 1 +typedef struct __LUID + { + DWORD LowPart; + LONG HighPart; + } LUID; + +typedef struct __LUID *PLUID; + +#endif +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0020_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0020_v0_0_s_ifspec; + +#ifndef __ID3D12Device_INTERFACE_DEFINED__ +#define __ID3D12Device_INTERFACE_DEFINED__ + +/* interface ID3D12Device */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12Device; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("189819f1-1db6-4b57-be54-1821339b85f7") + ID3D12Device : public ID3D12Object + { + public: + virtual UINT STDMETHODCALLTYPE GetNodeCount( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateCommandQueue( + _In_ const D3D12_COMMAND_QUEUE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppCommandQueue) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateCommandAllocator( + _In_ D3D12_COMMAND_LIST_TYPE type, + REFIID riid, + _COM_Outptr_ void **ppCommandAllocator) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateGraphicsPipelineState( + _In_ const D3D12_GRAPHICS_PIPELINE_STATE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateComputePipelineState( + _In_ const D3D12_COMPUTE_PIPELINE_STATE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateCommandList( + _In_ UINT nodeMask, + _In_ D3D12_COMMAND_LIST_TYPE type, + _In_ ID3D12CommandAllocator *pCommandAllocator, + _In_opt_ ID3D12PipelineState *pInitialState, + REFIID riid, + _COM_Outptr_ void **ppCommandList) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckFeatureSupport( + D3D12_FEATURE Feature, + _Inout_updates_bytes_(FeatureSupportDataSize) void *pFeatureSupportData, + UINT FeatureSupportDataSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateDescriptorHeap( + _In_ const D3D12_DESCRIPTOR_HEAP_DESC *pDescriptorHeapDesc, + REFIID riid, + _COM_Outptr_ void **ppvHeap) = 0; + + virtual UINT STDMETHODCALLTYPE GetDescriptorHandleIncrementSize( + _In_ D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapType) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateRootSignature( + _In_ UINT nodeMask, + _In_reads_(blobLengthInBytes) const void *pBlobWithRootSignature, + _In_ SIZE_T blobLengthInBytes, + REFIID riid, + _COM_Outptr_ void **ppvRootSignature) = 0; + + virtual void STDMETHODCALLTYPE CreateConstantBufferView( + _In_opt_ const D3D12_CONSTANT_BUFFER_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor) = 0; + + virtual void STDMETHODCALLTYPE CreateShaderResourceView( + _In_opt_ ID3D12Resource *pResource, + _In_opt_ const D3D12_SHADER_RESOURCE_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor) = 0; + + virtual void STDMETHODCALLTYPE CreateUnorderedAccessView( + _In_opt_ ID3D12Resource *pResource, + _In_opt_ ID3D12Resource *pCounterResource, + _In_opt_ const D3D12_UNORDERED_ACCESS_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor) = 0; + + virtual void STDMETHODCALLTYPE CreateRenderTargetView( + _In_opt_ ID3D12Resource *pResource, + _In_opt_ const D3D12_RENDER_TARGET_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor) = 0; + + virtual void STDMETHODCALLTYPE CreateDepthStencilView( + _In_opt_ ID3D12Resource *pResource, + _In_opt_ const D3D12_DEPTH_STENCIL_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor) = 0; + + virtual void STDMETHODCALLTYPE CreateSampler( + _In_ const D3D12_SAMPLER_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor) = 0; + + virtual void STDMETHODCALLTYPE CopyDescriptors( + _In_ UINT NumDestDescriptorRanges, + _In_reads_(NumDestDescriptorRanges) const D3D12_CPU_DESCRIPTOR_HANDLE *pDestDescriptorRangeStarts, + _In_reads_opt_(NumDestDescriptorRanges) const UINT *pDestDescriptorRangeSizes, + _In_ UINT NumSrcDescriptorRanges, + _In_reads_(NumSrcDescriptorRanges) const D3D12_CPU_DESCRIPTOR_HANDLE *pSrcDescriptorRangeStarts, + _In_reads_opt_(NumSrcDescriptorRanges) const UINT *pSrcDescriptorRangeSizes, + _In_ D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType) = 0; + + virtual void STDMETHODCALLTYPE CopyDescriptorsSimple( + _In_ UINT NumDescriptors, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptorRangeStart, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE SrcDescriptorRangeStart, + _In_ D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType) = 0; + + virtual D3D12_RESOURCE_ALLOCATION_INFO STDMETHODCALLTYPE GetResourceAllocationInfo( + _In_ UINT visibleMask, + _In_ UINT numResourceDescs, + _In_reads_(numResourceDescs) const D3D12_RESOURCE_DESC *pResourceDescs) = 0; + + virtual D3D12_HEAP_PROPERTIES STDMETHODCALLTYPE GetCustomHeapProperties( + _In_ UINT nodeMask, + D3D12_HEAP_TYPE heapType) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateCommittedResource( + _In_ const D3D12_HEAP_PROPERTIES *pHeapProperties, + D3D12_HEAP_FLAGS HeapFlags, + _In_ const D3D12_RESOURCE_DESC *pDesc, + D3D12_RESOURCE_STATES InitialResourceState, + _In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue, + REFIID riidResource, + _COM_Outptr_opt_ void **ppvResource) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateHeap( + _In_ const D3D12_HEAP_DESC *pDesc, + REFIID riid, + _COM_Outptr_opt_ void **ppvHeap) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreatePlacedResource( + _In_ ID3D12Heap *pHeap, + UINT64 HeapOffset, + _In_ const D3D12_RESOURCE_DESC *pDesc, + D3D12_RESOURCE_STATES InitialState, + _In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue, + REFIID riid, + _COM_Outptr_opt_ void **ppvResource) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateReservedResource( + _In_ const D3D12_RESOURCE_DESC *pDesc, + D3D12_RESOURCE_STATES InitialState, + _In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue, + REFIID riid, + _COM_Outptr_opt_ void **ppvResource) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSharedHandle( + _In_ ID3D12DeviceChild *pObject, + _In_opt_ const SECURITY_ATTRIBUTES *pAttributes, + DWORD Access, + _In_opt_ LPCWSTR Name, + _Out_ HANDLE *pHandle) = 0; + + virtual HRESULT STDMETHODCALLTYPE OpenSharedHandle( + _In_ HANDLE NTHandle, + REFIID riid, + _COM_Outptr_opt_ void **ppvObj) = 0; + + virtual HRESULT STDMETHODCALLTYPE OpenSharedHandleByName( + _In_ LPCWSTR Name, + DWORD Access, + /* [annotation][out] */ + _Out_ HANDLE *pNTHandle) = 0; + + virtual HRESULT STDMETHODCALLTYPE MakeResident( + UINT NumObjects, + _In_reads_(NumObjects) ID3D12Pageable *const *ppObjects) = 0; + + virtual HRESULT STDMETHODCALLTYPE Evict( + UINT NumObjects, + _In_reads_(NumObjects) ID3D12Pageable *const *ppObjects) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateFence( + UINT64 InitialValue, + D3D12_FENCE_FLAGS Flags, + REFIID riid, + _COM_Outptr_ void **ppFence) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDeviceRemovedReason( void) = 0; + + virtual void STDMETHODCALLTYPE GetCopyableFootprints( + _In_ const D3D12_RESOURCE_DESC *pResourceDesc, + _In_range_(0,D3D12_REQ_SUBRESOURCES) UINT FirstSubresource, + _In_range_(0,D3D12_REQ_SUBRESOURCES-FirstSubresource) UINT NumSubresources, + UINT64 BaseOffset, + _Out_writes_opt_(NumSubresources) D3D12_PLACED_SUBRESOURCE_FOOTPRINT *pLayouts, + _Out_writes_opt_(NumSubresources) UINT *pNumRows, + _Out_writes_opt_(NumSubresources) UINT64 *pRowSizeInBytes, + _Out_opt_ UINT64 *pTotalBytes) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateQueryHeap( + _In_ const D3D12_QUERY_HEAP_DESC *pDesc, + REFIID riid, + _COM_Outptr_opt_ void **ppvHeap) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetStablePowerState( + BOOL Enable) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateCommandSignature( + _In_ const D3D12_COMMAND_SIGNATURE_DESC *pDesc, + _In_opt_ ID3D12RootSignature *pRootSignature, + REFIID riid, + _COM_Outptr_opt_ void **ppvCommandSignature) = 0; + + virtual void STDMETHODCALLTYPE GetResourceTiling( + _In_ ID3D12Resource *pTiledResource, + _Out_opt_ UINT *pNumTilesForEntireResource, + _Out_opt_ D3D12_PACKED_MIP_INFO *pPackedMipDesc, + _Out_opt_ D3D12_TILE_SHAPE *pStandardTileShapeForNonPackedMips, + _Inout_opt_ UINT *pNumSubresourceTilings, + _In_ UINT FirstSubresourceTilingToGet, + _Out_writes_(*pNumSubresourceTilings) D3D12_SUBRESOURCE_TILING *pSubresourceTilingsForNonPackedMips) = 0; + + virtual LUID STDMETHODCALLTYPE GetAdapterLuid( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12DeviceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12Device * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12Device * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12Device * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12Device * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12Device * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12Device * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12Device * This, + _In_z_ LPCWSTR Name); + + UINT ( STDMETHODCALLTYPE *GetNodeCount )( + ID3D12Device * This); + + HRESULT ( STDMETHODCALLTYPE *CreateCommandQueue )( + ID3D12Device * This, + _In_ const D3D12_COMMAND_QUEUE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppCommandQueue); + + HRESULT ( STDMETHODCALLTYPE *CreateCommandAllocator )( + ID3D12Device * This, + _In_ D3D12_COMMAND_LIST_TYPE type, + REFIID riid, + _COM_Outptr_ void **ppCommandAllocator); + + HRESULT ( STDMETHODCALLTYPE *CreateGraphicsPipelineState )( + ID3D12Device * This, + _In_ const D3D12_GRAPHICS_PIPELINE_STATE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState); + + HRESULT ( STDMETHODCALLTYPE *CreateComputePipelineState )( + ID3D12Device * This, + _In_ const D3D12_COMPUTE_PIPELINE_STATE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState); + + HRESULT ( STDMETHODCALLTYPE *CreateCommandList )( + ID3D12Device * This, + _In_ UINT nodeMask, + _In_ D3D12_COMMAND_LIST_TYPE type, + _In_ ID3D12CommandAllocator *pCommandAllocator, + _In_opt_ ID3D12PipelineState *pInitialState, + REFIID riid, + _COM_Outptr_ void **ppCommandList); + + HRESULT ( STDMETHODCALLTYPE *CheckFeatureSupport )( + ID3D12Device * This, + D3D12_FEATURE Feature, + _Inout_updates_bytes_(FeatureSupportDataSize) void *pFeatureSupportData, + UINT FeatureSupportDataSize); + + HRESULT ( STDMETHODCALLTYPE *CreateDescriptorHeap )( + ID3D12Device * This, + _In_ const D3D12_DESCRIPTOR_HEAP_DESC *pDescriptorHeapDesc, + REFIID riid, + _COM_Outptr_ void **ppvHeap); + + UINT ( STDMETHODCALLTYPE *GetDescriptorHandleIncrementSize )( + ID3D12Device * This, + _In_ D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapType); + + HRESULT ( STDMETHODCALLTYPE *CreateRootSignature )( + ID3D12Device * This, + _In_ UINT nodeMask, + _In_reads_(blobLengthInBytes) const void *pBlobWithRootSignature, + _In_ SIZE_T blobLengthInBytes, + REFIID riid, + _COM_Outptr_ void **ppvRootSignature); + + void ( STDMETHODCALLTYPE *CreateConstantBufferView )( + ID3D12Device * This, + _In_opt_ const D3D12_CONSTANT_BUFFER_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateShaderResourceView )( + ID3D12Device * This, + _In_opt_ ID3D12Resource *pResource, + _In_opt_ const D3D12_SHADER_RESOURCE_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateUnorderedAccessView )( + ID3D12Device * This, + _In_opt_ ID3D12Resource *pResource, + _In_opt_ ID3D12Resource *pCounterResource, + _In_opt_ const D3D12_UNORDERED_ACCESS_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateRenderTargetView )( + ID3D12Device * This, + _In_opt_ ID3D12Resource *pResource, + _In_opt_ const D3D12_RENDER_TARGET_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateDepthStencilView )( + ID3D12Device * This, + _In_opt_ ID3D12Resource *pResource, + _In_opt_ const D3D12_DEPTH_STENCIL_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateSampler )( + ID3D12Device * This, + _In_ const D3D12_SAMPLER_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CopyDescriptors )( + ID3D12Device * This, + _In_ UINT NumDestDescriptorRanges, + _In_reads_(NumDestDescriptorRanges) const D3D12_CPU_DESCRIPTOR_HANDLE *pDestDescriptorRangeStarts, + _In_reads_opt_(NumDestDescriptorRanges) const UINT *pDestDescriptorRangeSizes, + _In_ UINT NumSrcDescriptorRanges, + _In_reads_(NumSrcDescriptorRanges) const D3D12_CPU_DESCRIPTOR_HANDLE *pSrcDescriptorRangeStarts, + _In_reads_opt_(NumSrcDescriptorRanges) const UINT *pSrcDescriptorRangeSizes, + _In_ D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType); + + void ( STDMETHODCALLTYPE *CopyDescriptorsSimple )( + ID3D12Device * This, + _In_ UINT NumDescriptors, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptorRangeStart, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE SrcDescriptorRangeStart, + _In_ D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType); + + D3D12_RESOURCE_ALLOCATION_INFO ( STDMETHODCALLTYPE *GetResourceAllocationInfo )( + ID3D12Device * This, + _In_ UINT visibleMask, + _In_ UINT numResourceDescs, + _In_reads_(numResourceDescs) const D3D12_RESOURCE_DESC *pResourceDescs); + + D3D12_HEAP_PROPERTIES ( STDMETHODCALLTYPE *GetCustomHeapProperties )( + ID3D12Device * This, + _In_ UINT nodeMask, + D3D12_HEAP_TYPE heapType); + + HRESULT ( STDMETHODCALLTYPE *CreateCommittedResource )( + ID3D12Device * This, + _In_ const D3D12_HEAP_PROPERTIES *pHeapProperties, + D3D12_HEAP_FLAGS HeapFlags, + _In_ const D3D12_RESOURCE_DESC *pDesc, + D3D12_RESOURCE_STATES InitialResourceState, + _In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue, + REFIID riidResource, + _COM_Outptr_opt_ void **ppvResource); + + HRESULT ( STDMETHODCALLTYPE *CreateHeap )( + ID3D12Device * This, + _In_ const D3D12_HEAP_DESC *pDesc, + REFIID riid, + _COM_Outptr_opt_ void **ppvHeap); + + HRESULT ( STDMETHODCALLTYPE *CreatePlacedResource )( + ID3D12Device * This, + _In_ ID3D12Heap *pHeap, + UINT64 HeapOffset, + _In_ const D3D12_RESOURCE_DESC *pDesc, + D3D12_RESOURCE_STATES InitialState, + _In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue, + REFIID riid, + _COM_Outptr_opt_ void **ppvResource); + + HRESULT ( STDMETHODCALLTYPE *CreateReservedResource )( + ID3D12Device * This, + _In_ const D3D12_RESOURCE_DESC *pDesc, + D3D12_RESOURCE_STATES InitialState, + _In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue, + REFIID riid, + _COM_Outptr_opt_ void **ppvResource); + + HRESULT ( STDMETHODCALLTYPE *CreateSharedHandle )( + ID3D12Device * This, + _In_ ID3D12DeviceChild *pObject, + _In_opt_ const SECURITY_ATTRIBUTES *pAttributes, + DWORD Access, + _In_opt_ LPCWSTR Name, + _Out_ HANDLE *pHandle); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedHandle )( + ID3D12Device * This, + _In_ HANDLE NTHandle, + REFIID riid, + _COM_Outptr_opt_ void **ppvObj); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedHandleByName )( + ID3D12Device * This, + _In_ LPCWSTR Name, + DWORD Access, + /* [annotation][out] */ + _Out_ HANDLE *pNTHandle); + + HRESULT ( STDMETHODCALLTYPE *MakeResident )( + ID3D12Device * This, + UINT NumObjects, + _In_reads_(NumObjects) ID3D12Pageable *const *ppObjects); + + HRESULT ( STDMETHODCALLTYPE *Evict )( + ID3D12Device * This, + UINT NumObjects, + _In_reads_(NumObjects) ID3D12Pageable *const *ppObjects); + + HRESULT ( STDMETHODCALLTYPE *CreateFence )( + ID3D12Device * This, + UINT64 InitialValue, + D3D12_FENCE_FLAGS Flags, + REFIID riid, + _COM_Outptr_ void **ppFence); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceRemovedReason )( + ID3D12Device * This); + + void ( STDMETHODCALLTYPE *GetCopyableFootprints )( + ID3D12Device * This, + _In_ const D3D12_RESOURCE_DESC *pResourceDesc, + _In_range_(0,D3D12_REQ_SUBRESOURCES) UINT FirstSubresource, + _In_range_(0,D3D12_REQ_SUBRESOURCES-FirstSubresource) UINT NumSubresources, + UINT64 BaseOffset, + _Out_writes_opt_(NumSubresources) D3D12_PLACED_SUBRESOURCE_FOOTPRINT *pLayouts, + _Out_writes_opt_(NumSubresources) UINT *pNumRows, + _Out_writes_opt_(NumSubresources) UINT64 *pRowSizeInBytes, + _Out_opt_ UINT64 *pTotalBytes); + + HRESULT ( STDMETHODCALLTYPE *CreateQueryHeap )( + ID3D12Device * This, + _In_ const D3D12_QUERY_HEAP_DESC *pDesc, + REFIID riid, + _COM_Outptr_opt_ void **ppvHeap); + + HRESULT ( STDMETHODCALLTYPE *SetStablePowerState )( + ID3D12Device * This, + BOOL Enable); + + HRESULT ( STDMETHODCALLTYPE *CreateCommandSignature )( + ID3D12Device * This, + _In_ const D3D12_COMMAND_SIGNATURE_DESC *pDesc, + _In_opt_ ID3D12RootSignature *pRootSignature, + REFIID riid, + _COM_Outptr_opt_ void **ppvCommandSignature); + + void ( STDMETHODCALLTYPE *GetResourceTiling )( + ID3D12Device * This, + _In_ ID3D12Resource *pTiledResource, + _Out_opt_ UINT *pNumTilesForEntireResource, + _Out_opt_ D3D12_PACKED_MIP_INFO *pPackedMipDesc, + _Out_opt_ D3D12_TILE_SHAPE *pStandardTileShapeForNonPackedMips, + _Inout_opt_ UINT *pNumSubresourceTilings, + _In_ UINT FirstSubresourceTilingToGet, + _Out_writes_(*pNumSubresourceTilings) D3D12_SUBRESOURCE_TILING *pSubresourceTilingsForNonPackedMips); + + LUID ( STDMETHODCALLTYPE *GetAdapterLuid )( + ID3D12Device * This); + + END_INTERFACE + } ID3D12DeviceVtbl; + + interface ID3D12Device + { + CONST_VTBL struct ID3D12DeviceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12Device_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12Device_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12Device_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12Device_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12Device_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12Device_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12Device_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12Device_GetNodeCount(This) \ + ( (This)->lpVtbl -> GetNodeCount(This) ) + +#define ID3D12Device_CreateCommandQueue(This,pDesc,riid,ppCommandQueue) \ + ( (This)->lpVtbl -> CreateCommandQueue(This,pDesc,riid,ppCommandQueue) ) + +#define ID3D12Device_CreateCommandAllocator(This,type,riid,ppCommandAllocator) \ + ( (This)->lpVtbl -> CreateCommandAllocator(This,type,riid,ppCommandAllocator) ) + +#define ID3D12Device_CreateGraphicsPipelineState(This,pDesc,riid,ppPipelineState) \ + ( (This)->lpVtbl -> CreateGraphicsPipelineState(This,pDesc,riid,ppPipelineState) ) + +#define ID3D12Device_CreateComputePipelineState(This,pDesc,riid,ppPipelineState) \ + ( (This)->lpVtbl -> CreateComputePipelineState(This,pDesc,riid,ppPipelineState) ) + +#define ID3D12Device_CreateCommandList(This,nodeMask,type,pCommandAllocator,pInitialState,riid,ppCommandList) \ + ( (This)->lpVtbl -> CreateCommandList(This,nodeMask,type,pCommandAllocator,pInitialState,riid,ppCommandList) ) + +#define ID3D12Device_CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) \ + ( (This)->lpVtbl -> CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) ) + +#define ID3D12Device_CreateDescriptorHeap(This,pDescriptorHeapDesc,riid,ppvHeap) \ + ( (This)->lpVtbl -> CreateDescriptorHeap(This,pDescriptorHeapDesc,riid,ppvHeap) ) + +#define ID3D12Device_GetDescriptorHandleIncrementSize(This,DescriptorHeapType) \ + ( (This)->lpVtbl -> GetDescriptorHandleIncrementSize(This,DescriptorHeapType) ) + +#define ID3D12Device_CreateRootSignature(This,nodeMask,pBlobWithRootSignature,blobLengthInBytes,riid,ppvRootSignature) \ + ( (This)->lpVtbl -> CreateRootSignature(This,nodeMask,pBlobWithRootSignature,blobLengthInBytes,riid,ppvRootSignature) ) + +#define ID3D12Device_CreateConstantBufferView(This,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateConstantBufferView(This,pDesc,DestDescriptor) ) + +#define ID3D12Device_CreateShaderResourceView(This,pResource,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateShaderResourceView(This,pResource,pDesc,DestDescriptor) ) + +#define ID3D12Device_CreateUnorderedAccessView(This,pResource,pCounterResource,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateUnorderedAccessView(This,pResource,pCounterResource,pDesc,DestDescriptor) ) + +#define ID3D12Device_CreateRenderTargetView(This,pResource,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateRenderTargetView(This,pResource,pDesc,DestDescriptor) ) + +#define ID3D12Device_CreateDepthStencilView(This,pResource,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateDepthStencilView(This,pResource,pDesc,DestDescriptor) ) + +#define ID3D12Device_CreateSampler(This,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateSampler(This,pDesc,DestDescriptor) ) + +#define ID3D12Device_CopyDescriptors(This,NumDestDescriptorRanges,pDestDescriptorRangeStarts,pDestDescriptorRangeSizes,NumSrcDescriptorRanges,pSrcDescriptorRangeStarts,pSrcDescriptorRangeSizes,DescriptorHeapsType) \ + ( (This)->lpVtbl -> CopyDescriptors(This,NumDestDescriptorRanges,pDestDescriptorRangeStarts,pDestDescriptorRangeSizes,NumSrcDescriptorRanges,pSrcDescriptorRangeStarts,pSrcDescriptorRangeSizes,DescriptorHeapsType) ) + +#define ID3D12Device_CopyDescriptorsSimple(This,NumDescriptors,DestDescriptorRangeStart,SrcDescriptorRangeStart,DescriptorHeapsType) \ + ( (This)->lpVtbl -> CopyDescriptorsSimple(This,NumDescriptors,DestDescriptorRangeStart,SrcDescriptorRangeStart,DescriptorHeapsType) ) + +#define ID3D12Device_GetResourceAllocationInfo(This,visibleMask,numResourceDescs,pResourceDescs) \ + ( (This)->lpVtbl -> GetResourceAllocationInfo(This,visibleMask,numResourceDescs,pResourceDescs) ) + +#define ID3D12Device_GetCustomHeapProperties(This,nodeMask,heapType) \ + ( (This)->lpVtbl -> GetCustomHeapProperties(This,nodeMask,heapType) ) + +#define ID3D12Device_CreateCommittedResource(This,pHeapProperties,HeapFlags,pDesc,InitialResourceState,pOptimizedClearValue,riidResource,ppvResource) \ + ( (This)->lpVtbl -> CreateCommittedResource(This,pHeapProperties,HeapFlags,pDesc,InitialResourceState,pOptimizedClearValue,riidResource,ppvResource) ) + +#define ID3D12Device_CreateHeap(This,pDesc,riid,ppvHeap) \ + ( (This)->lpVtbl -> CreateHeap(This,pDesc,riid,ppvHeap) ) + +#define ID3D12Device_CreatePlacedResource(This,pHeap,HeapOffset,pDesc,InitialState,pOptimizedClearValue,riid,ppvResource) \ + ( (This)->lpVtbl -> CreatePlacedResource(This,pHeap,HeapOffset,pDesc,InitialState,pOptimizedClearValue,riid,ppvResource) ) + +#define ID3D12Device_CreateReservedResource(This,pDesc,InitialState,pOptimizedClearValue,riid,ppvResource) \ + ( (This)->lpVtbl -> CreateReservedResource(This,pDesc,InitialState,pOptimizedClearValue,riid,ppvResource) ) + +#define ID3D12Device_CreateSharedHandle(This,pObject,pAttributes,Access,Name,pHandle) \ + ( (This)->lpVtbl -> CreateSharedHandle(This,pObject,pAttributes,Access,Name,pHandle) ) + +#define ID3D12Device_OpenSharedHandle(This,NTHandle,riid,ppvObj) \ + ( (This)->lpVtbl -> OpenSharedHandle(This,NTHandle,riid,ppvObj) ) + +#define ID3D12Device_OpenSharedHandleByName(This,Name,Access,pNTHandle) \ + ( (This)->lpVtbl -> OpenSharedHandleByName(This,Name,Access,pNTHandle) ) + +#define ID3D12Device_MakeResident(This,NumObjects,ppObjects) \ + ( (This)->lpVtbl -> MakeResident(This,NumObjects,ppObjects) ) + +#define ID3D12Device_Evict(This,NumObjects,ppObjects) \ + ( (This)->lpVtbl -> Evict(This,NumObjects,ppObjects) ) + +#define ID3D12Device_CreateFence(This,InitialValue,Flags,riid,ppFence) \ + ( (This)->lpVtbl -> CreateFence(This,InitialValue,Flags,riid,ppFence) ) + +#define ID3D12Device_GetDeviceRemovedReason(This) \ + ( (This)->lpVtbl -> GetDeviceRemovedReason(This) ) + +#define ID3D12Device_GetCopyableFootprints(This,pResourceDesc,FirstSubresource,NumSubresources,BaseOffset,pLayouts,pNumRows,pRowSizeInBytes,pTotalBytes) \ + ( (This)->lpVtbl -> GetCopyableFootprints(This,pResourceDesc,FirstSubresource,NumSubresources,BaseOffset,pLayouts,pNumRows,pRowSizeInBytes,pTotalBytes) ) + +#define ID3D12Device_CreateQueryHeap(This,pDesc,riid,ppvHeap) \ + ( (This)->lpVtbl -> CreateQueryHeap(This,pDesc,riid,ppvHeap) ) + +#define ID3D12Device_SetStablePowerState(This,Enable) \ + ( (This)->lpVtbl -> SetStablePowerState(This,Enable) ) + +#define ID3D12Device_CreateCommandSignature(This,pDesc,pRootSignature,riid,ppvCommandSignature) \ + ( (This)->lpVtbl -> CreateCommandSignature(This,pDesc,pRootSignature,riid,ppvCommandSignature) ) + +#define ID3D12Device_GetResourceTiling(This,pTiledResource,pNumTilesForEntireResource,pPackedMipDesc,pStandardTileShapeForNonPackedMips,pNumSubresourceTilings,FirstSubresourceTilingToGet,pSubresourceTilingsForNonPackedMips) \ + ( (This)->lpVtbl -> GetResourceTiling(This,pTiledResource,pNumTilesForEntireResource,pPackedMipDesc,pStandardTileShapeForNonPackedMips,pNumSubresourceTilings,FirstSubresourceTilingToGet,pSubresourceTilingsForNonPackedMips) ) + +#define ID3D12Device_GetAdapterLuid(This) \ + ( (This)->lpVtbl -> GetAdapterLuid(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + + + + + + + + + + + + + +#endif /* __ID3D12Device_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12PipelineLibrary_INTERFACE_DEFINED__ +#define __ID3D12PipelineLibrary_INTERFACE_DEFINED__ + +/* interface ID3D12PipelineLibrary */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12PipelineLibrary; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("c64226a8-9201-46af-b4cc-53fb9ff7414f") + ID3D12PipelineLibrary : public ID3D12DeviceChild + { + public: + virtual HRESULT STDMETHODCALLTYPE StorePipeline( + _In_opt_ LPCWSTR pName, + _In_ ID3D12PipelineState *pPipeline) = 0; + + virtual HRESULT STDMETHODCALLTYPE LoadGraphicsPipeline( + _In_ LPCWSTR pName, + _In_ const D3D12_GRAPHICS_PIPELINE_STATE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState) = 0; + + virtual HRESULT STDMETHODCALLTYPE LoadComputePipeline( + _In_ LPCWSTR pName, + _In_ const D3D12_COMPUTE_PIPELINE_STATE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState) = 0; + + virtual SIZE_T STDMETHODCALLTYPE GetSerializedSize( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Serialize( + _Out_writes_(DataSizeInBytes) void *pData, + SIZE_T DataSizeInBytes) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12PipelineLibraryVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12PipelineLibrary * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12PipelineLibrary * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12PipelineLibrary * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12PipelineLibrary * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12PipelineLibrary * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12PipelineLibrary * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12PipelineLibrary * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12PipelineLibrary * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + HRESULT ( STDMETHODCALLTYPE *StorePipeline )( + ID3D12PipelineLibrary * This, + _In_opt_ LPCWSTR pName, + _In_ ID3D12PipelineState *pPipeline); + + HRESULT ( STDMETHODCALLTYPE *LoadGraphicsPipeline )( + ID3D12PipelineLibrary * This, + _In_ LPCWSTR pName, + _In_ const D3D12_GRAPHICS_PIPELINE_STATE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState); + + HRESULT ( STDMETHODCALLTYPE *LoadComputePipeline )( + ID3D12PipelineLibrary * This, + _In_ LPCWSTR pName, + _In_ const D3D12_COMPUTE_PIPELINE_STATE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState); + + SIZE_T ( STDMETHODCALLTYPE *GetSerializedSize )( + ID3D12PipelineLibrary * This); + + HRESULT ( STDMETHODCALLTYPE *Serialize )( + ID3D12PipelineLibrary * This, + _Out_writes_(DataSizeInBytes) void *pData, + SIZE_T DataSizeInBytes); + + END_INTERFACE + } ID3D12PipelineLibraryVtbl; + + interface ID3D12PipelineLibrary + { + CONST_VTBL struct ID3D12PipelineLibraryVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12PipelineLibrary_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12PipelineLibrary_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12PipelineLibrary_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12PipelineLibrary_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12PipelineLibrary_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12PipelineLibrary_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12PipelineLibrary_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12PipelineLibrary_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + +#define ID3D12PipelineLibrary_StorePipeline(This,pName,pPipeline) \ + ( (This)->lpVtbl -> StorePipeline(This,pName,pPipeline) ) + +#define ID3D12PipelineLibrary_LoadGraphicsPipeline(This,pName,pDesc,riid,ppPipelineState) \ + ( (This)->lpVtbl -> LoadGraphicsPipeline(This,pName,pDesc,riid,ppPipelineState) ) + +#define ID3D12PipelineLibrary_LoadComputePipeline(This,pName,pDesc,riid,ppPipelineState) \ + ( (This)->lpVtbl -> LoadComputePipeline(This,pName,pDesc,riid,ppPipelineState) ) + +#define ID3D12PipelineLibrary_GetSerializedSize(This) \ + ( (This)->lpVtbl -> GetSerializedSize(This) ) + +#define ID3D12PipelineLibrary_Serialize(This,pData,DataSizeInBytes) \ + ( (This)->lpVtbl -> Serialize(This,pData,DataSizeInBytes) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12PipelineLibrary_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12PipelineLibrary1_INTERFACE_DEFINED__ +#define __ID3D12PipelineLibrary1_INTERFACE_DEFINED__ + +/* interface ID3D12PipelineLibrary1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12PipelineLibrary1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("80eabf42-2568-4e5e-bd82-c37f86961dc3") + ID3D12PipelineLibrary1 : public ID3D12PipelineLibrary + { + public: + virtual HRESULT STDMETHODCALLTYPE LoadPipeline( + _In_ LPCWSTR pName, + _In_ const D3D12_PIPELINE_STATE_STREAM_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12PipelineLibrary1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12PipelineLibrary1 * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12PipelineLibrary1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12PipelineLibrary1 * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12PipelineLibrary1 * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12PipelineLibrary1 * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12PipelineLibrary1 * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12PipelineLibrary1 * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12PipelineLibrary1 * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + HRESULT ( STDMETHODCALLTYPE *StorePipeline )( + ID3D12PipelineLibrary1 * This, + _In_opt_ LPCWSTR pName, + _In_ ID3D12PipelineState *pPipeline); + + HRESULT ( STDMETHODCALLTYPE *LoadGraphicsPipeline )( + ID3D12PipelineLibrary1 * This, + _In_ LPCWSTR pName, + _In_ const D3D12_GRAPHICS_PIPELINE_STATE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState); + + HRESULT ( STDMETHODCALLTYPE *LoadComputePipeline )( + ID3D12PipelineLibrary1 * This, + _In_ LPCWSTR pName, + _In_ const D3D12_COMPUTE_PIPELINE_STATE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState); + + SIZE_T ( STDMETHODCALLTYPE *GetSerializedSize )( + ID3D12PipelineLibrary1 * This); + + HRESULT ( STDMETHODCALLTYPE *Serialize )( + ID3D12PipelineLibrary1 * This, + _Out_writes_(DataSizeInBytes) void *pData, + SIZE_T DataSizeInBytes); + + HRESULT ( STDMETHODCALLTYPE *LoadPipeline )( + ID3D12PipelineLibrary1 * This, + _In_ LPCWSTR pName, + _In_ const D3D12_PIPELINE_STATE_STREAM_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState); + + END_INTERFACE + } ID3D12PipelineLibrary1Vtbl; + + interface ID3D12PipelineLibrary1 + { + CONST_VTBL struct ID3D12PipelineLibrary1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12PipelineLibrary1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12PipelineLibrary1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12PipelineLibrary1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12PipelineLibrary1_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12PipelineLibrary1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12PipelineLibrary1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12PipelineLibrary1_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12PipelineLibrary1_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + +#define ID3D12PipelineLibrary1_StorePipeline(This,pName,pPipeline) \ + ( (This)->lpVtbl -> StorePipeline(This,pName,pPipeline) ) + +#define ID3D12PipelineLibrary1_LoadGraphicsPipeline(This,pName,pDesc,riid,ppPipelineState) \ + ( (This)->lpVtbl -> LoadGraphicsPipeline(This,pName,pDesc,riid,ppPipelineState) ) + +#define ID3D12PipelineLibrary1_LoadComputePipeline(This,pName,pDesc,riid,ppPipelineState) \ + ( (This)->lpVtbl -> LoadComputePipeline(This,pName,pDesc,riid,ppPipelineState) ) + +#define ID3D12PipelineLibrary1_GetSerializedSize(This) \ + ( (This)->lpVtbl -> GetSerializedSize(This) ) + +#define ID3D12PipelineLibrary1_Serialize(This,pData,DataSizeInBytes) \ + ( (This)->lpVtbl -> Serialize(This,pData,DataSizeInBytes) ) + + +#define ID3D12PipelineLibrary1_LoadPipeline(This,pName,pDesc,riid,ppPipelineState) \ + ( (This)->lpVtbl -> LoadPipeline(This,pName,pDesc,riid,ppPipelineState) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12PipelineLibrary1_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12_0000_0023 */ +/* [local] */ + +typedef +enum D3D12_MULTIPLE_FENCE_WAIT_FLAGS + { + D3D12_MULTIPLE_FENCE_WAIT_FLAG_NONE = 0, + D3D12_MULTIPLE_FENCE_WAIT_FLAG_ANY = 0x1, + D3D12_MULTIPLE_FENCE_WAIT_FLAG_ALL = 0 + } D3D12_MULTIPLE_FENCE_WAIT_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_MULTIPLE_FENCE_WAIT_FLAGS ); +typedef +enum D3D12_RESIDENCY_PRIORITY + { + D3D12_RESIDENCY_PRIORITY_MINIMUM = 0x28000000, + D3D12_RESIDENCY_PRIORITY_LOW = 0x50000000, + D3D12_RESIDENCY_PRIORITY_NORMAL = 0x78000000, + D3D12_RESIDENCY_PRIORITY_HIGH = 0xa0010000, + D3D12_RESIDENCY_PRIORITY_MAXIMUM = 0xc8000000 + } D3D12_RESIDENCY_PRIORITY; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0023_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0023_v0_0_s_ifspec; + +#ifndef __ID3D12Device1_INTERFACE_DEFINED__ +#define __ID3D12Device1_INTERFACE_DEFINED__ + +/* interface ID3D12Device1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12Device1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("77acce80-638e-4e65-8895-c1f23386863e") + ID3D12Device1 : public ID3D12Device + { + public: + virtual HRESULT STDMETHODCALLTYPE CreatePipelineLibrary( + _In_reads_(BlobLength) const void *pLibraryBlob, + SIZE_T BlobLength, + REFIID riid, + _COM_Outptr_ void **ppPipelineLibrary) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetEventOnMultipleFenceCompletion( + _In_reads_(NumFences) ID3D12Fence *const *ppFences, + _In_reads_(NumFences) const UINT64 *pFenceValues, + UINT NumFences, + D3D12_MULTIPLE_FENCE_WAIT_FLAGS Flags, + HANDLE hEvent) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetResidencyPriority( + UINT NumObjects, + _In_reads_(NumObjects) ID3D12Pageable *const *ppObjects, + _In_reads_(NumObjects) const D3D12_RESIDENCY_PRIORITY *pPriorities) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12Device1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12Device1 * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12Device1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12Device1 * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12Device1 * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12Device1 * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12Device1 * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12Device1 * This, + _In_z_ LPCWSTR Name); + + UINT ( STDMETHODCALLTYPE *GetNodeCount )( + ID3D12Device1 * This); + + HRESULT ( STDMETHODCALLTYPE *CreateCommandQueue )( + ID3D12Device1 * This, + _In_ const D3D12_COMMAND_QUEUE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppCommandQueue); + + HRESULT ( STDMETHODCALLTYPE *CreateCommandAllocator )( + ID3D12Device1 * This, + _In_ D3D12_COMMAND_LIST_TYPE type, + REFIID riid, + _COM_Outptr_ void **ppCommandAllocator); + + HRESULT ( STDMETHODCALLTYPE *CreateGraphicsPipelineState )( + ID3D12Device1 * This, + _In_ const D3D12_GRAPHICS_PIPELINE_STATE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState); + + HRESULT ( STDMETHODCALLTYPE *CreateComputePipelineState )( + ID3D12Device1 * This, + _In_ const D3D12_COMPUTE_PIPELINE_STATE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState); + + HRESULT ( STDMETHODCALLTYPE *CreateCommandList )( + ID3D12Device1 * This, + _In_ UINT nodeMask, + _In_ D3D12_COMMAND_LIST_TYPE type, + _In_ ID3D12CommandAllocator *pCommandAllocator, + _In_opt_ ID3D12PipelineState *pInitialState, + REFIID riid, + _COM_Outptr_ void **ppCommandList); + + HRESULT ( STDMETHODCALLTYPE *CheckFeatureSupport )( + ID3D12Device1 * This, + D3D12_FEATURE Feature, + _Inout_updates_bytes_(FeatureSupportDataSize) void *pFeatureSupportData, + UINT FeatureSupportDataSize); + + HRESULT ( STDMETHODCALLTYPE *CreateDescriptorHeap )( + ID3D12Device1 * This, + _In_ const D3D12_DESCRIPTOR_HEAP_DESC *pDescriptorHeapDesc, + REFIID riid, + _COM_Outptr_ void **ppvHeap); + + UINT ( STDMETHODCALLTYPE *GetDescriptorHandleIncrementSize )( + ID3D12Device1 * This, + _In_ D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapType); + + HRESULT ( STDMETHODCALLTYPE *CreateRootSignature )( + ID3D12Device1 * This, + _In_ UINT nodeMask, + _In_reads_(blobLengthInBytes) const void *pBlobWithRootSignature, + _In_ SIZE_T blobLengthInBytes, + REFIID riid, + _COM_Outptr_ void **ppvRootSignature); + + void ( STDMETHODCALLTYPE *CreateConstantBufferView )( + ID3D12Device1 * This, + _In_opt_ const D3D12_CONSTANT_BUFFER_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateShaderResourceView )( + ID3D12Device1 * This, + _In_opt_ ID3D12Resource *pResource, + _In_opt_ const D3D12_SHADER_RESOURCE_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateUnorderedAccessView )( + ID3D12Device1 * This, + _In_opt_ ID3D12Resource *pResource, + _In_opt_ ID3D12Resource *pCounterResource, + _In_opt_ const D3D12_UNORDERED_ACCESS_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateRenderTargetView )( + ID3D12Device1 * This, + _In_opt_ ID3D12Resource *pResource, + _In_opt_ const D3D12_RENDER_TARGET_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateDepthStencilView )( + ID3D12Device1 * This, + _In_opt_ ID3D12Resource *pResource, + _In_opt_ const D3D12_DEPTH_STENCIL_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateSampler )( + ID3D12Device1 * This, + _In_ const D3D12_SAMPLER_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CopyDescriptors )( + ID3D12Device1 * This, + _In_ UINT NumDestDescriptorRanges, + _In_reads_(NumDestDescriptorRanges) const D3D12_CPU_DESCRIPTOR_HANDLE *pDestDescriptorRangeStarts, + _In_reads_opt_(NumDestDescriptorRanges) const UINT *pDestDescriptorRangeSizes, + _In_ UINT NumSrcDescriptorRanges, + _In_reads_(NumSrcDescriptorRanges) const D3D12_CPU_DESCRIPTOR_HANDLE *pSrcDescriptorRangeStarts, + _In_reads_opt_(NumSrcDescriptorRanges) const UINT *pSrcDescriptorRangeSizes, + _In_ D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType); + + void ( STDMETHODCALLTYPE *CopyDescriptorsSimple )( + ID3D12Device1 * This, + _In_ UINT NumDescriptors, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptorRangeStart, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE SrcDescriptorRangeStart, + _In_ D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType); + + D3D12_RESOURCE_ALLOCATION_INFO ( STDMETHODCALLTYPE *GetResourceAllocationInfo )( + ID3D12Device1 * This, + _In_ UINT visibleMask, + _In_ UINT numResourceDescs, + _In_reads_(numResourceDescs) const D3D12_RESOURCE_DESC *pResourceDescs); + + D3D12_HEAP_PROPERTIES ( STDMETHODCALLTYPE *GetCustomHeapProperties )( + ID3D12Device1 * This, + _In_ UINT nodeMask, + D3D12_HEAP_TYPE heapType); + + HRESULT ( STDMETHODCALLTYPE *CreateCommittedResource )( + ID3D12Device1 * This, + _In_ const D3D12_HEAP_PROPERTIES *pHeapProperties, + D3D12_HEAP_FLAGS HeapFlags, + _In_ const D3D12_RESOURCE_DESC *pDesc, + D3D12_RESOURCE_STATES InitialResourceState, + _In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue, + REFIID riidResource, + _COM_Outptr_opt_ void **ppvResource); + + HRESULT ( STDMETHODCALLTYPE *CreateHeap )( + ID3D12Device1 * This, + _In_ const D3D12_HEAP_DESC *pDesc, + REFIID riid, + _COM_Outptr_opt_ void **ppvHeap); + + HRESULT ( STDMETHODCALLTYPE *CreatePlacedResource )( + ID3D12Device1 * This, + _In_ ID3D12Heap *pHeap, + UINT64 HeapOffset, + _In_ const D3D12_RESOURCE_DESC *pDesc, + D3D12_RESOURCE_STATES InitialState, + _In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue, + REFIID riid, + _COM_Outptr_opt_ void **ppvResource); + + HRESULT ( STDMETHODCALLTYPE *CreateReservedResource )( + ID3D12Device1 * This, + _In_ const D3D12_RESOURCE_DESC *pDesc, + D3D12_RESOURCE_STATES InitialState, + _In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue, + REFIID riid, + _COM_Outptr_opt_ void **ppvResource); + + HRESULT ( STDMETHODCALLTYPE *CreateSharedHandle )( + ID3D12Device1 * This, + _In_ ID3D12DeviceChild *pObject, + _In_opt_ const SECURITY_ATTRIBUTES *pAttributes, + DWORD Access, + _In_opt_ LPCWSTR Name, + _Out_ HANDLE *pHandle); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedHandle )( + ID3D12Device1 * This, + _In_ HANDLE NTHandle, + REFIID riid, + _COM_Outptr_opt_ void **ppvObj); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedHandleByName )( + ID3D12Device1 * This, + _In_ LPCWSTR Name, + DWORD Access, + /* [annotation][out] */ + _Out_ HANDLE *pNTHandle); + + HRESULT ( STDMETHODCALLTYPE *MakeResident )( + ID3D12Device1 * This, + UINT NumObjects, + _In_reads_(NumObjects) ID3D12Pageable *const *ppObjects); + + HRESULT ( STDMETHODCALLTYPE *Evict )( + ID3D12Device1 * This, + UINT NumObjects, + _In_reads_(NumObjects) ID3D12Pageable *const *ppObjects); + + HRESULT ( STDMETHODCALLTYPE *CreateFence )( + ID3D12Device1 * This, + UINT64 InitialValue, + D3D12_FENCE_FLAGS Flags, + REFIID riid, + _COM_Outptr_ void **ppFence); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceRemovedReason )( + ID3D12Device1 * This); + + void ( STDMETHODCALLTYPE *GetCopyableFootprints )( + ID3D12Device1 * This, + _In_ const D3D12_RESOURCE_DESC *pResourceDesc, + _In_range_(0,D3D12_REQ_SUBRESOURCES) UINT FirstSubresource, + _In_range_(0,D3D12_REQ_SUBRESOURCES-FirstSubresource) UINT NumSubresources, + UINT64 BaseOffset, + _Out_writes_opt_(NumSubresources) D3D12_PLACED_SUBRESOURCE_FOOTPRINT *pLayouts, + _Out_writes_opt_(NumSubresources) UINT *pNumRows, + _Out_writes_opt_(NumSubresources) UINT64 *pRowSizeInBytes, + _Out_opt_ UINT64 *pTotalBytes); + + HRESULT ( STDMETHODCALLTYPE *CreateQueryHeap )( + ID3D12Device1 * This, + _In_ const D3D12_QUERY_HEAP_DESC *pDesc, + REFIID riid, + _COM_Outptr_opt_ void **ppvHeap); + + HRESULT ( STDMETHODCALLTYPE *SetStablePowerState )( + ID3D12Device1 * This, + BOOL Enable); + + HRESULT ( STDMETHODCALLTYPE *CreateCommandSignature )( + ID3D12Device1 * This, + _In_ const D3D12_COMMAND_SIGNATURE_DESC *pDesc, + _In_opt_ ID3D12RootSignature *pRootSignature, + REFIID riid, + _COM_Outptr_opt_ void **ppvCommandSignature); + + void ( STDMETHODCALLTYPE *GetResourceTiling )( + ID3D12Device1 * This, + _In_ ID3D12Resource *pTiledResource, + _Out_opt_ UINT *pNumTilesForEntireResource, + _Out_opt_ D3D12_PACKED_MIP_INFO *pPackedMipDesc, + _Out_opt_ D3D12_TILE_SHAPE *pStandardTileShapeForNonPackedMips, + _Inout_opt_ UINT *pNumSubresourceTilings, + _In_ UINT FirstSubresourceTilingToGet, + _Out_writes_(*pNumSubresourceTilings) D3D12_SUBRESOURCE_TILING *pSubresourceTilingsForNonPackedMips); + + LUID ( STDMETHODCALLTYPE *GetAdapterLuid )( + ID3D12Device1 * This); + + HRESULT ( STDMETHODCALLTYPE *CreatePipelineLibrary )( + ID3D12Device1 * This, + _In_reads_(BlobLength) const void *pLibraryBlob, + SIZE_T BlobLength, + REFIID riid, + _COM_Outptr_ void **ppPipelineLibrary); + + HRESULT ( STDMETHODCALLTYPE *SetEventOnMultipleFenceCompletion )( + ID3D12Device1 * This, + _In_reads_(NumFences) ID3D12Fence *const *ppFences, + _In_reads_(NumFences) const UINT64 *pFenceValues, + UINT NumFences, + D3D12_MULTIPLE_FENCE_WAIT_FLAGS Flags, + HANDLE hEvent); + + HRESULT ( STDMETHODCALLTYPE *SetResidencyPriority )( + ID3D12Device1 * This, + UINT NumObjects, + _In_reads_(NumObjects) ID3D12Pageable *const *ppObjects, + _In_reads_(NumObjects) const D3D12_RESIDENCY_PRIORITY *pPriorities); + + END_INTERFACE + } ID3D12Device1Vtbl; + + interface ID3D12Device1 + { + CONST_VTBL struct ID3D12Device1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12Device1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12Device1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12Device1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12Device1_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12Device1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12Device1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12Device1_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12Device1_GetNodeCount(This) \ + ( (This)->lpVtbl -> GetNodeCount(This) ) + +#define ID3D12Device1_CreateCommandQueue(This,pDesc,riid,ppCommandQueue) \ + ( (This)->lpVtbl -> CreateCommandQueue(This,pDesc,riid,ppCommandQueue) ) + +#define ID3D12Device1_CreateCommandAllocator(This,type,riid,ppCommandAllocator) \ + ( (This)->lpVtbl -> CreateCommandAllocator(This,type,riid,ppCommandAllocator) ) + +#define ID3D12Device1_CreateGraphicsPipelineState(This,pDesc,riid,ppPipelineState) \ + ( (This)->lpVtbl -> CreateGraphicsPipelineState(This,pDesc,riid,ppPipelineState) ) + +#define ID3D12Device1_CreateComputePipelineState(This,pDesc,riid,ppPipelineState) \ + ( (This)->lpVtbl -> CreateComputePipelineState(This,pDesc,riid,ppPipelineState) ) + +#define ID3D12Device1_CreateCommandList(This,nodeMask,type,pCommandAllocator,pInitialState,riid,ppCommandList) \ + ( (This)->lpVtbl -> CreateCommandList(This,nodeMask,type,pCommandAllocator,pInitialState,riid,ppCommandList) ) + +#define ID3D12Device1_CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) \ + ( (This)->lpVtbl -> CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) ) + +#define ID3D12Device1_CreateDescriptorHeap(This,pDescriptorHeapDesc,riid,ppvHeap) \ + ( (This)->lpVtbl -> CreateDescriptorHeap(This,pDescriptorHeapDesc,riid,ppvHeap) ) + +#define ID3D12Device1_GetDescriptorHandleIncrementSize(This,DescriptorHeapType) \ + ( (This)->lpVtbl -> GetDescriptorHandleIncrementSize(This,DescriptorHeapType) ) + +#define ID3D12Device1_CreateRootSignature(This,nodeMask,pBlobWithRootSignature,blobLengthInBytes,riid,ppvRootSignature) \ + ( (This)->lpVtbl -> CreateRootSignature(This,nodeMask,pBlobWithRootSignature,blobLengthInBytes,riid,ppvRootSignature) ) + +#define ID3D12Device1_CreateConstantBufferView(This,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateConstantBufferView(This,pDesc,DestDescriptor) ) + +#define ID3D12Device1_CreateShaderResourceView(This,pResource,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateShaderResourceView(This,pResource,pDesc,DestDescriptor) ) + +#define ID3D12Device1_CreateUnorderedAccessView(This,pResource,pCounterResource,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateUnorderedAccessView(This,pResource,pCounterResource,pDesc,DestDescriptor) ) + +#define ID3D12Device1_CreateRenderTargetView(This,pResource,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateRenderTargetView(This,pResource,pDesc,DestDescriptor) ) + +#define ID3D12Device1_CreateDepthStencilView(This,pResource,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateDepthStencilView(This,pResource,pDesc,DestDescriptor) ) + +#define ID3D12Device1_CreateSampler(This,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateSampler(This,pDesc,DestDescriptor) ) + +#define ID3D12Device1_CopyDescriptors(This,NumDestDescriptorRanges,pDestDescriptorRangeStarts,pDestDescriptorRangeSizes,NumSrcDescriptorRanges,pSrcDescriptorRangeStarts,pSrcDescriptorRangeSizes,DescriptorHeapsType) \ + ( (This)->lpVtbl -> CopyDescriptors(This,NumDestDescriptorRanges,pDestDescriptorRangeStarts,pDestDescriptorRangeSizes,NumSrcDescriptorRanges,pSrcDescriptorRangeStarts,pSrcDescriptorRangeSizes,DescriptorHeapsType) ) + +#define ID3D12Device1_CopyDescriptorsSimple(This,NumDescriptors,DestDescriptorRangeStart,SrcDescriptorRangeStart,DescriptorHeapsType) \ + ( (This)->lpVtbl -> CopyDescriptorsSimple(This,NumDescriptors,DestDescriptorRangeStart,SrcDescriptorRangeStart,DescriptorHeapsType) ) + +#define ID3D12Device1_GetResourceAllocationInfo(This,visibleMask,numResourceDescs,pResourceDescs) \ + ( (This)->lpVtbl -> GetResourceAllocationInfo(This,visibleMask,numResourceDescs,pResourceDescs) ) + +#define ID3D12Device1_GetCustomHeapProperties(This,nodeMask,heapType) \ + ( (This)->lpVtbl -> GetCustomHeapProperties(This,nodeMask,heapType) ) + +#define ID3D12Device1_CreateCommittedResource(This,pHeapProperties,HeapFlags,pDesc,InitialResourceState,pOptimizedClearValue,riidResource,ppvResource) \ + ( (This)->lpVtbl -> CreateCommittedResource(This,pHeapProperties,HeapFlags,pDesc,InitialResourceState,pOptimizedClearValue,riidResource,ppvResource) ) + +#define ID3D12Device1_CreateHeap(This,pDesc,riid,ppvHeap) \ + ( (This)->lpVtbl -> CreateHeap(This,pDesc,riid,ppvHeap) ) + +#define ID3D12Device1_CreatePlacedResource(This,pHeap,HeapOffset,pDesc,InitialState,pOptimizedClearValue,riid,ppvResource) \ + ( (This)->lpVtbl -> CreatePlacedResource(This,pHeap,HeapOffset,pDesc,InitialState,pOptimizedClearValue,riid,ppvResource) ) + +#define ID3D12Device1_CreateReservedResource(This,pDesc,InitialState,pOptimizedClearValue,riid,ppvResource) \ + ( (This)->lpVtbl -> CreateReservedResource(This,pDesc,InitialState,pOptimizedClearValue,riid,ppvResource) ) + +#define ID3D12Device1_CreateSharedHandle(This,pObject,pAttributes,Access,Name,pHandle) \ + ( (This)->lpVtbl -> CreateSharedHandle(This,pObject,pAttributes,Access,Name,pHandle) ) + +#define ID3D12Device1_OpenSharedHandle(This,NTHandle,riid,ppvObj) \ + ( (This)->lpVtbl -> OpenSharedHandle(This,NTHandle,riid,ppvObj) ) + +#define ID3D12Device1_OpenSharedHandleByName(This,Name,Access,pNTHandle) \ + ( (This)->lpVtbl -> OpenSharedHandleByName(This,Name,Access,pNTHandle) ) + +#define ID3D12Device1_MakeResident(This,NumObjects,ppObjects) \ + ( (This)->lpVtbl -> MakeResident(This,NumObjects,ppObjects) ) + +#define ID3D12Device1_Evict(This,NumObjects,ppObjects) \ + ( (This)->lpVtbl -> Evict(This,NumObjects,ppObjects) ) + +#define ID3D12Device1_CreateFence(This,InitialValue,Flags,riid,ppFence) \ + ( (This)->lpVtbl -> CreateFence(This,InitialValue,Flags,riid,ppFence) ) + +#define ID3D12Device1_GetDeviceRemovedReason(This) \ + ( (This)->lpVtbl -> GetDeviceRemovedReason(This) ) + +#define ID3D12Device1_GetCopyableFootprints(This,pResourceDesc,FirstSubresource,NumSubresources,BaseOffset,pLayouts,pNumRows,pRowSizeInBytes,pTotalBytes) \ + ( (This)->lpVtbl -> GetCopyableFootprints(This,pResourceDesc,FirstSubresource,NumSubresources,BaseOffset,pLayouts,pNumRows,pRowSizeInBytes,pTotalBytes) ) + +#define ID3D12Device1_CreateQueryHeap(This,pDesc,riid,ppvHeap) \ + ( (This)->lpVtbl -> CreateQueryHeap(This,pDesc,riid,ppvHeap) ) + +#define ID3D12Device1_SetStablePowerState(This,Enable) \ + ( (This)->lpVtbl -> SetStablePowerState(This,Enable) ) + +#define ID3D12Device1_CreateCommandSignature(This,pDesc,pRootSignature,riid,ppvCommandSignature) \ + ( (This)->lpVtbl -> CreateCommandSignature(This,pDesc,pRootSignature,riid,ppvCommandSignature) ) + +#define ID3D12Device1_GetResourceTiling(This,pTiledResource,pNumTilesForEntireResource,pPackedMipDesc,pStandardTileShapeForNonPackedMips,pNumSubresourceTilings,FirstSubresourceTilingToGet,pSubresourceTilingsForNonPackedMips) \ + ( (This)->lpVtbl -> GetResourceTiling(This,pTiledResource,pNumTilesForEntireResource,pPackedMipDesc,pStandardTileShapeForNonPackedMips,pNumSubresourceTilings,FirstSubresourceTilingToGet,pSubresourceTilingsForNonPackedMips) ) + +#define ID3D12Device1_GetAdapterLuid(This) \ + ( (This)->lpVtbl -> GetAdapterLuid(This) ) + + +#define ID3D12Device1_CreatePipelineLibrary(This,pLibraryBlob,BlobLength,riid,ppPipelineLibrary) \ + ( (This)->lpVtbl -> CreatePipelineLibrary(This,pLibraryBlob,BlobLength,riid,ppPipelineLibrary) ) + +#define ID3D12Device1_SetEventOnMultipleFenceCompletion(This,ppFences,pFenceValues,NumFences,Flags,hEvent) \ + ( (This)->lpVtbl -> SetEventOnMultipleFenceCompletion(This,ppFences,pFenceValues,NumFences,Flags,hEvent) ) + +#define ID3D12Device1_SetResidencyPriority(This,NumObjects,ppObjects,pPriorities) \ + ( (This)->lpVtbl -> SetResidencyPriority(This,NumObjects,ppObjects,pPriorities) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12Device1_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12Device2_INTERFACE_DEFINED__ +#define __ID3D12Device2_INTERFACE_DEFINED__ + +/* interface ID3D12Device2 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12Device2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("30baa41e-b15b-475c-a0bb-1af5c5b64328") + ID3D12Device2 : public ID3D12Device1 + { + public: + virtual HRESULT STDMETHODCALLTYPE CreatePipelineState( + const D3D12_PIPELINE_STATE_STREAM_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12Device2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12Device2 * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12Device2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12Device2 * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12Device2 * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12Device2 * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12Device2 * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12Device2 * This, + _In_z_ LPCWSTR Name); + + UINT ( STDMETHODCALLTYPE *GetNodeCount )( + ID3D12Device2 * This); + + HRESULT ( STDMETHODCALLTYPE *CreateCommandQueue )( + ID3D12Device2 * This, + _In_ const D3D12_COMMAND_QUEUE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppCommandQueue); + + HRESULT ( STDMETHODCALLTYPE *CreateCommandAllocator )( + ID3D12Device2 * This, + _In_ D3D12_COMMAND_LIST_TYPE type, + REFIID riid, + _COM_Outptr_ void **ppCommandAllocator); + + HRESULT ( STDMETHODCALLTYPE *CreateGraphicsPipelineState )( + ID3D12Device2 * This, + _In_ const D3D12_GRAPHICS_PIPELINE_STATE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState); + + HRESULT ( STDMETHODCALLTYPE *CreateComputePipelineState )( + ID3D12Device2 * This, + _In_ const D3D12_COMPUTE_PIPELINE_STATE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState); + + HRESULT ( STDMETHODCALLTYPE *CreateCommandList )( + ID3D12Device2 * This, + _In_ UINT nodeMask, + _In_ D3D12_COMMAND_LIST_TYPE type, + _In_ ID3D12CommandAllocator *pCommandAllocator, + _In_opt_ ID3D12PipelineState *pInitialState, + REFIID riid, + _COM_Outptr_ void **ppCommandList); + + HRESULT ( STDMETHODCALLTYPE *CheckFeatureSupport )( + ID3D12Device2 * This, + D3D12_FEATURE Feature, + _Inout_updates_bytes_(FeatureSupportDataSize) void *pFeatureSupportData, + UINT FeatureSupportDataSize); + + HRESULT ( STDMETHODCALLTYPE *CreateDescriptorHeap )( + ID3D12Device2 * This, + _In_ const D3D12_DESCRIPTOR_HEAP_DESC *pDescriptorHeapDesc, + REFIID riid, + _COM_Outptr_ void **ppvHeap); + + UINT ( STDMETHODCALLTYPE *GetDescriptorHandleIncrementSize )( + ID3D12Device2 * This, + _In_ D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapType); + + HRESULT ( STDMETHODCALLTYPE *CreateRootSignature )( + ID3D12Device2 * This, + _In_ UINT nodeMask, + _In_reads_(blobLengthInBytes) const void *pBlobWithRootSignature, + _In_ SIZE_T blobLengthInBytes, + REFIID riid, + _COM_Outptr_ void **ppvRootSignature); + + void ( STDMETHODCALLTYPE *CreateConstantBufferView )( + ID3D12Device2 * This, + _In_opt_ const D3D12_CONSTANT_BUFFER_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateShaderResourceView )( + ID3D12Device2 * This, + _In_opt_ ID3D12Resource *pResource, + _In_opt_ const D3D12_SHADER_RESOURCE_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateUnorderedAccessView )( + ID3D12Device2 * This, + _In_opt_ ID3D12Resource *pResource, + _In_opt_ ID3D12Resource *pCounterResource, + _In_opt_ const D3D12_UNORDERED_ACCESS_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateRenderTargetView )( + ID3D12Device2 * This, + _In_opt_ ID3D12Resource *pResource, + _In_opt_ const D3D12_RENDER_TARGET_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateDepthStencilView )( + ID3D12Device2 * This, + _In_opt_ ID3D12Resource *pResource, + _In_opt_ const D3D12_DEPTH_STENCIL_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateSampler )( + ID3D12Device2 * This, + _In_ const D3D12_SAMPLER_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CopyDescriptors )( + ID3D12Device2 * This, + _In_ UINT NumDestDescriptorRanges, + _In_reads_(NumDestDescriptorRanges) const D3D12_CPU_DESCRIPTOR_HANDLE *pDestDescriptorRangeStarts, + _In_reads_opt_(NumDestDescriptorRanges) const UINT *pDestDescriptorRangeSizes, + _In_ UINT NumSrcDescriptorRanges, + _In_reads_(NumSrcDescriptorRanges) const D3D12_CPU_DESCRIPTOR_HANDLE *pSrcDescriptorRangeStarts, + _In_reads_opt_(NumSrcDescriptorRanges) const UINT *pSrcDescriptorRangeSizes, + _In_ D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType); + + void ( STDMETHODCALLTYPE *CopyDescriptorsSimple )( + ID3D12Device2 * This, + _In_ UINT NumDescriptors, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptorRangeStart, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE SrcDescriptorRangeStart, + _In_ D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType); + + D3D12_RESOURCE_ALLOCATION_INFO ( STDMETHODCALLTYPE *GetResourceAllocationInfo )( + ID3D12Device2 * This, + _In_ UINT visibleMask, + _In_ UINT numResourceDescs, + _In_reads_(numResourceDescs) const D3D12_RESOURCE_DESC *pResourceDescs); + + D3D12_HEAP_PROPERTIES ( STDMETHODCALLTYPE *GetCustomHeapProperties )( + ID3D12Device2 * This, + _In_ UINT nodeMask, + D3D12_HEAP_TYPE heapType); + + HRESULT ( STDMETHODCALLTYPE *CreateCommittedResource )( + ID3D12Device2 * This, + _In_ const D3D12_HEAP_PROPERTIES *pHeapProperties, + D3D12_HEAP_FLAGS HeapFlags, + _In_ const D3D12_RESOURCE_DESC *pDesc, + D3D12_RESOURCE_STATES InitialResourceState, + _In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue, + REFIID riidResource, + _COM_Outptr_opt_ void **ppvResource); + + HRESULT ( STDMETHODCALLTYPE *CreateHeap )( + ID3D12Device2 * This, + _In_ const D3D12_HEAP_DESC *pDesc, + REFIID riid, + _COM_Outptr_opt_ void **ppvHeap); + + HRESULT ( STDMETHODCALLTYPE *CreatePlacedResource )( + ID3D12Device2 * This, + _In_ ID3D12Heap *pHeap, + UINT64 HeapOffset, + _In_ const D3D12_RESOURCE_DESC *pDesc, + D3D12_RESOURCE_STATES InitialState, + _In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue, + REFIID riid, + _COM_Outptr_opt_ void **ppvResource); + + HRESULT ( STDMETHODCALLTYPE *CreateReservedResource )( + ID3D12Device2 * This, + _In_ const D3D12_RESOURCE_DESC *pDesc, + D3D12_RESOURCE_STATES InitialState, + _In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue, + REFIID riid, + _COM_Outptr_opt_ void **ppvResource); + + HRESULT ( STDMETHODCALLTYPE *CreateSharedHandle )( + ID3D12Device2 * This, + _In_ ID3D12DeviceChild *pObject, + _In_opt_ const SECURITY_ATTRIBUTES *pAttributes, + DWORD Access, + _In_opt_ LPCWSTR Name, + _Out_ HANDLE *pHandle); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedHandle )( + ID3D12Device2 * This, + _In_ HANDLE NTHandle, + REFIID riid, + _COM_Outptr_opt_ void **ppvObj); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedHandleByName )( + ID3D12Device2 * This, + _In_ LPCWSTR Name, + DWORD Access, + /* [annotation][out] */ + _Out_ HANDLE *pNTHandle); + + HRESULT ( STDMETHODCALLTYPE *MakeResident )( + ID3D12Device2 * This, + UINT NumObjects, + _In_reads_(NumObjects) ID3D12Pageable *const *ppObjects); + + HRESULT ( STDMETHODCALLTYPE *Evict )( + ID3D12Device2 * This, + UINT NumObjects, + _In_reads_(NumObjects) ID3D12Pageable *const *ppObjects); + + HRESULT ( STDMETHODCALLTYPE *CreateFence )( + ID3D12Device2 * This, + UINT64 InitialValue, + D3D12_FENCE_FLAGS Flags, + REFIID riid, + _COM_Outptr_ void **ppFence); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceRemovedReason )( + ID3D12Device2 * This); + + void ( STDMETHODCALLTYPE *GetCopyableFootprints )( + ID3D12Device2 * This, + _In_ const D3D12_RESOURCE_DESC *pResourceDesc, + _In_range_(0,D3D12_REQ_SUBRESOURCES) UINT FirstSubresource, + _In_range_(0,D3D12_REQ_SUBRESOURCES-FirstSubresource) UINT NumSubresources, + UINT64 BaseOffset, + _Out_writes_opt_(NumSubresources) D3D12_PLACED_SUBRESOURCE_FOOTPRINT *pLayouts, + _Out_writes_opt_(NumSubresources) UINT *pNumRows, + _Out_writes_opt_(NumSubresources) UINT64 *pRowSizeInBytes, + _Out_opt_ UINT64 *pTotalBytes); + + HRESULT ( STDMETHODCALLTYPE *CreateQueryHeap )( + ID3D12Device2 * This, + _In_ const D3D12_QUERY_HEAP_DESC *pDesc, + REFIID riid, + _COM_Outptr_opt_ void **ppvHeap); + + HRESULT ( STDMETHODCALLTYPE *SetStablePowerState )( + ID3D12Device2 * This, + BOOL Enable); + + HRESULT ( STDMETHODCALLTYPE *CreateCommandSignature )( + ID3D12Device2 * This, + _In_ const D3D12_COMMAND_SIGNATURE_DESC *pDesc, + _In_opt_ ID3D12RootSignature *pRootSignature, + REFIID riid, + _COM_Outptr_opt_ void **ppvCommandSignature); + + void ( STDMETHODCALLTYPE *GetResourceTiling )( + ID3D12Device2 * This, + _In_ ID3D12Resource *pTiledResource, + _Out_opt_ UINT *pNumTilesForEntireResource, + _Out_opt_ D3D12_PACKED_MIP_INFO *pPackedMipDesc, + _Out_opt_ D3D12_TILE_SHAPE *pStandardTileShapeForNonPackedMips, + _Inout_opt_ UINT *pNumSubresourceTilings, + _In_ UINT FirstSubresourceTilingToGet, + _Out_writes_(*pNumSubresourceTilings) D3D12_SUBRESOURCE_TILING *pSubresourceTilingsForNonPackedMips); + + LUID ( STDMETHODCALLTYPE *GetAdapterLuid )( + ID3D12Device2 * This); + + HRESULT ( STDMETHODCALLTYPE *CreatePipelineLibrary )( + ID3D12Device2 * This, + _In_reads_(BlobLength) const void *pLibraryBlob, + SIZE_T BlobLength, + REFIID riid, + _COM_Outptr_ void **ppPipelineLibrary); + + HRESULT ( STDMETHODCALLTYPE *SetEventOnMultipleFenceCompletion )( + ID3D12Device2 * This, + _In_reads_(NumFences) ID3D12Fence *const *ppFences, + _In_reads_(NumFences) const UINT64 *pFenceValues, + UINT NumFences, + D3D12_MULTIPLE_FENCE_WAIT_FLAGS Flags, + HANDLE hEvent); + + HRESULT ( STDMETHODCALLTYPE *SetResidencyPriority )( + ID3D12Device2 * This, + UINT NumObjects, + _In_reads_(NumObjects) ID3D12Pageable *const *ppObjects, + _In_reads_(NumObjects) const D3D12_RESIDENCY_PRIORITY *pPriorities); + + HRESULT ( STDMETHODCALLTYPE *CreatePipelineState )( + ID3D12Device2 * This, + const D3D12_PIPELINE_STATE_STREAM_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState); + + END_INTERFACE + } ID3D12Device2Vtbl; + + interface ID3D12Device2 + { + CONST_VTBL struct ID3D12Device2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12Device2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12Device2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12Device2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12Device2_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12Device2_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12Device2_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12Device2_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12Device2_GetNodeCount(This) \ + ( (This)->lpVtbl -> GetNodeCount(This) ) + +#define ID3D12Device2_CreateCommandQueue(This,pDesc,riid,ppCommandQueue) \ + ( (This)->lpVtbl -> CreateCommandQueue(This,pDesc,riid,ppCommandQueue) ) + +#define ID3D12Device2_CreateCommandAllocator(This,type,riid,ppCommandAllocator) \ + ( (This)->lpVtbl -> CreateCommandAllocator(This,type,riid,ppCommandAllocator) ) + +#define ID3D12Device2_CreateGraphicsPipelineState(This,pDesc,riid,ppPipelineState) \ + ( (This)->lpVtbl -> CreateGraphicsPipelineState(This,pDesc,riid,ppPipelineState) ) + +#define ID3D12Device2_CreateComputePipelineState(This,pDesc,riid,ppPipelineState) \ + ( (This)->lpVtbl -> CreateComputePipelineState(This,pDesc,riid,ppPipelineState) ) + +#define ID3D12Device2_CreateCommandList(This,nodeMask,type,pCommandAllocator,pInitialState,riid,ppCommandList) \ + ( (This)->lpVtbl -> CreateCommandList(This,nodeMask,type,pCommandAllocator,pInitialState,riid,ppCommandList) ) + +#define ID3D12Device2_CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) \ + ( (This)->lpVtbl -> CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) ) + +#define ID3D12Device2_CreateDescriptorHeap(This,pDescriptorHeapDesc,riid,ppvHeap) \ + ( (This)->lpVtbl -> CreateDescriptorHeap(This,pDescriptorHeapDesc,riid,ppvHeap) ) + +#define ID3D12Device2_GetDescriptorHandleIncrementSize(This,DescriptorHeapType) \ + ( (This)->lpVtbl -> GetDescriptorHandleIncrementSize(This,DescriptorHeapType) ) + +#define ID3D12Device2_CreateRootSignature(This,nodeMask,pBlobWithRootSignature,blobLengthInBytes,riid,ppvRootSignature) \ + ( (This)->lpVtbl -> CreateRootSignature(This,nodeMask,pBlobWithRootSignature,blobLengthInBytes,riid,ppvRootSignature) ) + +#define ID3D12Device2_CreateConstantBufferView(This,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateConstantBufferView(This,pDesc,DestDescriptor) ) + +#define ID3D12Device2_CreateShaderResourceView(This,pResource,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateShaderResourceView(This,pResource,pDesc,DestDescriptor) ) + +#define ID3D12Device2_CreateUnorderedAccessView(This,pResource,pCounterResource,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateUnorderedAccessView(This,pResource,pCounterResource,pDesc,DestDescriptor) ) + +#define ID3D12Device2_CreateRenderTargetView(This,pResource,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateRenderTargetView(This,pResource,pDesc,DestDescriptor) ) + +#define ID3D12Device2_CreateDepthStencilView(This,pResource,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateDepthStencilView(This,pResource,pDesc,DestDescriptor) ) + +#define ID3D12Device2_CreateSampler(This,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateSampler(This,pDesc,DestDescriptor) ) + +#define ID3D12Device2_CopyDescriptors(This,NumDestDescriptorRanges,pDestDescriptorRangeStarts,pDestDescriptorRangeSizes,NumSrcDescriptorRanges,pSrcDescriptorRangeStarts,pSrcDescriptorRangeSizes,DescriptorHeapsType) \ + ( (This)->lpVtbl -> CopyDescriptors(This,NumDestDescriptorRanges,pDestDescriptorRangeStarts,pDestDescriptorRangeSizes,NumSrcDescriptorRanges,pSrcDescriptorRangeStarts,pSrcDescriptorRangeSizes,DescriptorHeapsType) ) + +#define ID3D12Device2_CopyDescriptorsSimple(This,NumDescriptors,DestDescriptorRangeStart,SrcDescriptorRangeStart,DescriptorHeapsType) \ + ( (This)->lpVtbl -> CopyDescriptorsSimple(This,NumDescriptors,DestDescriptorRangeStart,SrcDescriptorRangeStart,DescriptorHeapsType) ) + +#define ID3D12Device2_GetResourceAllocationInfo(This,visibleMask,numResourceDescs,pResourceDescs) \ + ( (This)->lpVtbl -> GetResourceAllocationInfo(This,visibleMask,numResourceDescs,pResourceDescs) ) + +#define ID3D12Device2_GetCustomHeapProperties(This,nodeMask,heapType) \ + ( (This)->lpVtbl -> GetCustomHeapProperties(This,nodeMask,heapType) ) + +#define ID3D12Device2_CreateCommittedResource(This,pHeapProperties,HeapFlags,pDesc,InitialResourceState,pOptimizedClearValue,riidResource,ppvResource) \ + ( (This)->lpVtbl -> CreateCommittedResource(This,pHeapProperties,HeapFlags,pDesc,InitialResourceState,pOptimizedClearValue,riidResource,ppvResource) ) + +#define ID3D12Device2_CreateHeap(This,pDesc,riid,ppvHeap) \ + ( (This)->lpVtbl -> CreateHeap(This,pDesc,riid,ppvHeap) ) + +#define ID3D12Device2_CreatePlacedResource(This,pHeap,HeapOffset,pDesc,InitialState,pOptimizedClearValue,riid,ppvResource) \ + ( (This)->lpVtbl -> CreatePlacedResource(This,pHeap,HeapOffset,pDesc,InitialState,pOptimizedClearValue,riid,ppvResource) ) + +#define ID3D12Device2_CreateReservedResource(This,pDesc,InitialState,pOptimizedClearValue,riid,ppvResource) \ + ( (This)->lpVtbl -> CreateReservedResource(This,pDesc,InitialState,pOptimizedClearValue,riid,ppvResource) ) + +#define ID3D12Device2_CreateSharedHandle(This,pObject,pAttributes,Access,Name,pHandle) \ + ( (This)->lpVtbl -> CreateSharedHandle(This,pObject,pAttributes,Access,Name,pHandle) ) + +#define ID3D12Device2_OpenSharedHandle(This,NTHandle,riid,ppvObj) \ + ( (This)->lpVtbl -> OpenSharedHandle(This,NTHandle,riid,ppvObj) ) + +#define ID3D12Device2_OpenSharedHandleByName(This,Name,Access,pNTHandle) \ + ( (This)->lpVtbl -> OpenSharedHandleByName(This,Name,Access,pNTHandle) ) + +#define ID3D12Device2_MakeResident(This,NumObjects,ppObjects) \ + ( (This)->lpVtbl -> MakeResident(This,NumObjects,ppObjects) ) + +#define ID3D12Device2_Evict(This,NumObjects,ppObjects) \ + ( (This)->lpVtbl -> Evict(This,NumObjects,ppObjects) ) + +#define ID3D12Device2_CreateFence(This,InitialValue,Flags,riid,ppFence) \ + ( (This)->lpVtbl -> CreateFence(This,InitialValue,Flags,riid,ppFence) ) + +#define ID3D12Device2_GetDeviceRemovedReason(This) \ + ( (This)->lpVtbl -> GetDeviceRemovedReason(This) ) + +#define ID3D12Device2_GetCopyableFootprints(This,pResourceDesc,FirstSubresource,NumSubresources,BaseOffset,pLayouts,pNumRows,pRowSizeInBytes,pTotalBytes) \ + ( (This)->lpVtbl -> GetCopyableFootprints(This,pResourceDesc,FirstSubresource,NumSubresources,BaseOffset,pLayouts,pNumRows,pRowSizeInBytes,pTotalBytes) ) + +#define ID3D12Device2_CreateQueryHeap(This,pDesc,riid,ppvHeap) \ + ( (This)->lpVtbl -> CreateQueryHeap(This,pDesc,riid,ppvHeap) ) + +#define ID3D12Device2_SetStablePowerState(This,Enable) \ + ( (This)->lpVtbl -> SetStablePowerState(This,Enable) ) + +#define ID3D12Device2_CreateCommandSignature(This,pDesc,pRootSignature,riid,ppvCommandSignature) \ + ( (This)->lpVtbl -> CreateCommandSignature(This,pDesc,pRootSignature,riid,ppvCommandSignature) ) + +#define ID3D12Device2_GetResourceTiling(This,pTiledResource,pNumTilesForEntireResource,pPackedMipDesc,pStandardTileShapeForNonPackedMips,pNumSubresourceTilings,FirstSubresourceTilingToGet,pSubresourceTilingsForNonPackedMips) \ + ( (This)->lpVtbl -> GetResourceTiling(This,pTiledResource,pNumTilesForEntireResource,pPackedMipDesc,pStandardTileShapeForNonPackedMips,pNumSubresourceTilings,FirstSubresourceTilingToGet,pSubresourceTilingsForNonPackedMips) ) + +#define ID3D12Device2_GetAdapterLuid(This) \ + ( (This)->lpVtbl -> GetAdapterLuid(This) ) + + +#define ID3D12Device2_CreatePipelineLibrary(This,pLibraryBlob,BlobLength,riid,ppPipelineLibrary) \ + ( (This)->lpVtbl -> CreatePipelineLibrary(This,pLibraryBlob,BlobLength,riid,ppPipelineLibrary) ) + +#define ID3D12Device2_SetEventOnMultipleFenceCompletion(This,ppFences,pFenceValues,NumFences,Flags,hEvent) \ + ( (This)->lpVtbl -> SetEventOnMultipleFenceCompletion(This,ppFences,pFenceValues,NumFences,Flags,hEvent) ) + +#define ID3D12Device2_SetResidencyPriority(This,NumObjects,ppObjects,pPriorities) \ + ( (This)->lpVtbl -> SetResidencyPriority(This,NumObjects,ppObjects,pPriorities) ) + + +#define ID3D12Device2_CreatePipelineState(This,pDesc,riid,ppPipelineState) \ + ( (This)->lpVtbl -> CreatePipelineState(This,pDesc,riid,ppPipelineState) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12Device2_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12_0000_0025 */ +/* [local] */ + +typedef +enum D3D12_RESIDENCY_FLAGS + { + D3D12_RESIDENCY_FLAG_NONE = 0, + D3D12_RESIDENCY_FLAG_DENY_OVERBUDGET = 0x1 + } D3D12_RESIDENCY_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_RESIDENCY_FLAGS ); + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0025_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0025_v0_0_s_ifspec; + +#ifndef __ID3D12Device3_INTERFACE_DEFINED__ +#define __ID3D12Device3_INTERFACE_DEFINED__ + +/* interface ID3D12Device3 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12Device3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("81dadc15-2bad-4392-93c5-101345c4aa98") + ID3D12Device3 : public ID3D12Device2 + { + public: + virtual HRESULT STDMETHODCALLTYPE OpenExistingHeapFromAddress( + _In_ const void *pAddress, + REFIID riid, + _COM_Outptr_ void **ppvHeap) = 0; + + virtual HRESULT STDMETHODCALLTYPE OpenExistingHeapFromFileMapping( + _In_ HANDLE hFileMapping, + REFIID riid, + _COM_Outptr_ void **ppvHeap) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnqueueMakeResident( + D3D12_RESIDENCY_FLAGS Flags, + UINT NumObjects, + _In_reads_(NumObjects) ID3D12Pageable *const *ppObjects, + _In_ ID3D12Fence *pFenceToSignal, + UINT64 FenceValueToSignal) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12Device3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12Device3 * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12Device3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12Device3 * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12Device3 * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12Device3 * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12Device3 * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12Device3 * This, + _In_z_ LPCWSTR Name); + + UINT ( STDMETHODCALLTYPE *GetNodeCount )( + ID3D12Device3 * This); + + HRESULT ( STDMETHODCALLTYPE *CreateCommandQueue )( + ID3D12Device3 * This, + _In_ const D3D12_COMMAND_QUEUE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppCommandQueue); + + HRESULT ( STDMETHODCALLTYPE *CreateCommandAllocator )( + ID3D12Device3 * This, + _In_ D3D12_COMMAND_LIST_TYPE type, + REFIID riid, + _COM_Outptr_ void **ppCommandAllocator); + + HRESULT ( STDMETHODCALLTYPE *CreateGraphicsPipelineState )( + ID3D12Device3 * This, + _In_ const D3D12_GRAPHICS_PIPELINE_STATE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState); + + HRESULT ( STDMETHODCALLTYPE *CreateComputePipelineState )( + ID3D12Device3 * This, + _In_ const D3D12_COMPUTE_PIPELINE_STATE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState); + + HRESULT ( STDMETHODCALLTYPE *CreateCommandList )( + ID3D12Device3 * This, + _In_ UINT nodeMask, + _In_ D3D12_COMMAND_LIST_TYPE type, + _In_ ID3D12CommandAllocator *pCommandAllocator, + _In_opt_ ID3D12PipelineState *pInitialState, + REFIID riid, + _COM_Outptr_ void **ppCommandList); + + HRESULT ( STDMETHODCALLTYPE *CheckFeatureSupport )( + ID3D12Device3 * This, + D3D12_FEATURE Feature, + _Inout_updates_bytes_(FeatureSupportDataSize) void *pFeatureSupportData, + UINT FeatureSupportDataSize); + + HRESULT ( STDMETHODCALLTYPE *CreateDescriptorHeap )( + ID3D12Device3 * This, + _In_ const D3D12_DESCRIPTOR_HEAP_DESC *pDescriptorHeapDesc, + REFIID riid, + _COM_Outptr_ void **ppvHeap); + + UINT ( STDMETHODCALLTYPE *GetDescriptorHandleIncrementSize )( + ID3D12Device3 * This, + _In_ D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapType); + + HRESULT ( STDMETHODCALLTYPE *CreateRootSignature )( + ID3D12Device3 * This, + _In_ UINT nodeMask, + _In_reads_(blobLengthInBytes) const void *pBlobWithRootSignature, + _In_ SIZE_T blobLengthInBytes, + REFIID riid, + _COM_Outptr_ void **ppvRootSignature); + + void ( STDMETHODCALLTYPE *CreateConstantBufferView )( + ID3D12Device3 * This, + _In_opt_ const D3D12_CONSTANT_BUFFER_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateShaderResourceView )( + ID3D12Device3 * This, + _In_opt_ ID3D12Resource *pResource, + _In_opt_ const D3D12_SHADER_RESOURCE_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateUnorderedAccessView )( + ID3D12Device3 * This, + _In_opt_ ID3D12Resource *pResource, + _In_opt_ ID3D12Resource *pCounterResource, + _In_opt_ const D3D12_UNORDERED_ACCESS_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateRenderTargetView )( + ID3D12Device3 * This, + _In_opt_ ID3D12Resource *pResource, + _In_opt_ const D3D12_RENDER_TARGET_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateDepthStencilView )( + ID3D12Device3 * This, + _In_opt_ ID3D12Resource *pResource, + _In_opt_ const D3D12_DEPTH_STENCIL_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateSampler )( + ID3D12Device3 * This, + _In_ const D3D12_SAMPLER_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CopyDescriptors )( + ID3D12Device3 * This, + _In_ UINT NumDestDescriptorRanges, + _In_reads_(NumDestDescriptorRanges) const D3D12_CPU_DESCRIPTOR_HANDLE *pDestDescriptorRangeStarts, + _In_reads_opt_(NumDestDescriptorRanges) const UINT *pDestDescriptorRangeSizes, + _In_ UINT NumSrcDescriptorRanges, + _In_reads_(NumSrcDescriptorRanges) const D3D12_CPU_DESCRIPTOR_HANDLE *pSrcDescriptorRangeStarts, + _In_reads_opt_(NumSrcDescriptorRanges) const UINT *pSrcDescriptorRangeSizes, + _In_ D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType); + + void ( STDMETHODCALLTYPE *CopyDescriptorsSimple )( + ID3D12Device3 * This, + _In_ UINT NumDescriptors, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptorRangeStart, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE SrcDescriptorRangeStart, + _In_ D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType); + + D3D12_RESOURCE_ALLOCATION_INFO ( STDMETHODCALLTYPE *GetResourceAllocationInfo )( + ID3D12Device3 * This, + _In_ UINT visibleMask, + _In_ UINT numResourceDescs, + _In_reads_(numResourceDescs) const D3D12_RESOURCE_DESC *pResourceDescs); + + D3D12_HEAP_PROPERTIES ( STDMETHODCALLTYPE *GetCustomHeapProperties )( + ID3D12Device3 * This, + _In_ UINT nodeMask, + D3D12_HEAP_TYPE heapType); + + HRESULT ( STDMETHODCALLTYPE *CreateCommittedResource )( + ID3D12Device3 * This, + _In_ const D3D12_HEAP_PROPERTIES *pHeapProperties, + D3D12_HEAP_FLAGS HeapFlags, + _In_ const D3D12_RESOURCE_DESC *pDesc, + D3D12_RESOURCE_STATES InitialResourceState, + _In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue, + REFIID riidResource, + _COM_Outptr_opt_ void **ppvResource); + + HRESULT ( STDMETHODCALLTYPE *CreateHeap )( + ID3D12Device3 * This, + _In_ const D3D12_HEAP_DESC *pDesc, + REFIID riid, + _COM_Outptr_opt_ void **ppvHeap); + + HRESULT ( STDMETHODCALLTYPE *CreatePlacedResource )( + ID3D12Device3 * This, + _In_ ID3D12Heap *pHeap, + UINT64 HeapOffset, + _In_ const D3D12_RESOURCE_DESC *pDesc, + D3D12_RESOURCE_STATES InitialState, + _In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue, + REFIID riid, + _COM_Outptr_opt_ void **ppvResource); + + HRESULT ( STDMETHODCALLTYPE *CreateReservedResource )( + ID3D12Device3 * This, + _In_ const D3D12_RESOURCE_DESC *pDesc, + D3D12_RESOURCE_STATES InitialState, + _In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue, + REFIID riid, + _COM_Outptr_opt_ void **ppvResource); + + HRESULT ( STDMETHODCALLTYPE *CreateSharedHandle )( + ID3D12Device3 * This, + _In_ ID3D12DeviceChild *pObject, + _In_opt_ const SECURITY_ATTRIBUTES *pAttributes, + DWORD Access, + _In_opt_ LPCWSTR Name, + _Out_ HANDLE *pHandle); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedHandle )( + ID3D12Device3 * This, + _In_ HANDLE NTHandle, + REFIID riid, + _COM_Outptr_opt_ void **ppvObj); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedHandleByName )( + ID3D12Device3 * This, + _In_ LPCWSTR Name, + DWORD Access, + /* [annotation][out] */ + _Out_ HANDLE *pNTHandle); + + HRESULT ( STDMETHODCALLTYPE *MakeResident )( + ID3D12Device3 * This, + UINT NumObjects, + _In_reads_(NumObjects) ID3D12Pageable *const *ppObjects); + + HRESULT ( STDMETHODCALLTYPE *Evict )( + ID3D12Device3 * This, + UINT NumObjects, + _In_reads_(NumObjects) ID3D12Pageable *const *ppObjects); + + HRESULT ( STDMETHODCALLTYPE *CreateFence )( + ID3D12Device3 * This, + UINT64 InitialValue, + D3D12_FENCE_FLAGS Flags, + REFIID riid, + _COM_Outptr_ void **ppFence); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceRemovedReason )( + ID3D12Device3 * This); + + void ( STDMETHODCALLTYPE *GetCopyableFootprints )( + ID3D12Device3 * This, + _In_ const D3D12_RESOURCE_DESC *pResourceDesc, + _In_range_(0,D3D12_REQ_SUBRESOURCES) UINT FirstSubresource, + _In_range_(0,D3D12_REQ_SUBRESOURCES-FirstSubresource) UINT NumSubresources, + UINT64 BaseOffset, + _Out_writes_opt_(NumSubresources) D3D12_PLACED_SUBRESOURCE_FOOTPRINT *pLayouts, + _Out_writes_opt_(NumSubresources) UINT *pNumRows, + _Out_writes_opt_(NumSubresources) UINT64 *pRowSizeInBytes, + _Out_opt_ UINT64 *pTotalBytes); + + HRESULT ( STDMETHODCALLTYPE *CreateQueryHeap )( + ID3D12Device3 * This, + _In_ const D3D12_QUERY_HEAP_DESC *pDesc, + REFIID riid, + _COM_Outptr_opt_ void **ppvHeap); + + HRESULT ( STDMETHODCALLTYPE *SetStablePowerState )( + ID3D12Device3 * This, + BOOL Enable); + + HRESULT ( STDMETHODCALLTYPE *CreateCommandSignature )( + ID3D12Device3 * This, + _In_ const D3D12_COMMAND_SIGNATURE_DESC *pDesc, + _In_opt_ ID3D12RootSignature *pRootSignature, + REFIID riid, + _COM_Outptr_opt_ void **ppvCommandSignature); + + void ( STDMETHODCALLTYPE *GetResourceTiling )( + ID3D12Device3 * This, + _In_ ID3D12Resource *pTiledResource, + _Out_opt_ UINT *pNumTilesForEntireResource, + _Out_opt_ D3D12_PACKED_MIP_INFO *pPackedMipDesc, + _Out_opt_ D3D12_TILE_SHAPE *pStandardTileShapeForNonPackedMips, + _Inout_opt_ UINT *pNumSubresourceTilings, + _In_ UINT FirstSubresourceTilingToGet, + _Out_writes_(*pNumSubresourceTilings) D3D12_SUBRESOURCE_TILING *pSubresourceTilingsForNonPackedMips); + + LUID ( STDMETHODCALLTYPE *GetAdapterLuid )( + ID3D12Device3 * This); + + HRESULT ( STDMETHODCALLTYPE *CreatePipelineLibrary )( + ID3D12Device3 * This, + _In_reads_(BlobLength) const void *pLibraryBlob, + SIZE_T BlobLength, + REFIID riid, + _COM_Outptr_ void **ppPipelineLibrary); + + HRESULT ( STDMETHODCALLTYPE *SetEventOnMultipleFenceCompletion )( + ID3D12Device3 * This, + _In_reads_(NumFences) ID3D12Fence *const *ppFences, + _In_reads_(NumFences) const UINT64 *pFenceValues, + UINT NumFences, + D3D12_MULTIPLE_FENCE_WAIT_FLAGS Flags, + HANDLE hEvent); + + HRESULT ( STDMETHODCALLTYPE *SetResidencyPriority )( + ID3D12Device3 * This, + UINT NumObjects, + _In_reads_(NumObjects) ID3D12Pageable *const *ppObjects, + _In_reads_(NumObjects) const D3D12_RESIDENCY_PRIORITY *pPriorities); + + HRESULT ( STDMETHODCALLTYPE *CreatePipelineState )( + ID3D12Device3 * This, + const D3D12_PIPELINE_STATE_STREAM_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState); + + HRESULT ( STDMETHODCALLTYPE *OpenExistingHeapFromAddress )( + ID3D12Device3 * This, + _In_ const void *pAddress, + REFIID riid, + _COM_Outptr_ void **ppvHeap); + + HRESULT ( STDMETHODCALLTYPE *OpenExistingHeapFromFileMapping )( + ID3D12Device3 * This, + _In_ HANDLE hFileMapping, + REFIID riid, + _COM_Outptr_ void **ppvHeap); + + HRESULT ( STDMETHODCALLTYPE *EnqueueMakeResident )( + ID3D12Device3 * This, + D3D12_RESIDENCY_FLAGS Flags, + UINT NumObjects, + _In_reads_(NumObjects) ID3D12Pageable *const *ppObjects, + _In_ ID3D12Fence *pFenceToSignal, + UINT64 FenceValueToSignal); + + END_INTERFACE + } ID3D12Device3Vtbl; + + interface ID3D12Device3 + { + CONST_VTBL struct ID3D12Device3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12Device3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12Device3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12Device3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12Device3_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12Device3_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12Device3_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12Device3_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12Device3_GetNodeCount(This) \ + ( (This)->lpVtbl -> GetNodeCount(This) ) + +#define ID3D12Device3_CreateCommandQueue(This,pDesc,riid,ppCommandQueue) \ + ( (This)->lpVtbl -> CreateCommandQueue(This,pDesc,riid,ppCommandQueue) ) + +#define ID3D12Device3_CreateCommandAllocator(This,type,riid,ppCommandAllocator) \ + ( (This)->lpVtbl -> CreateCommandAllocator(This,type,riid,ppCommandAllocator) ) + +#define ID3D12Device3_CreateGraphicsPipelineState(This,pDesc,riid,ppPipelineState) \ + ( (This)->lpVtbl -> CreateGraphicsPipelineState(This,pDesc,riid,ppPipelineState) ) + +#define ID3D12Device3_CreateComputePipelineState(This,pDesc,riid,ppPipelineState) \ + ( (This)->lpVtbl -> CreateComputePipelineState(This,pDesc,riid,ppPipelineState) ) + +#define ID3D12Device3_CreateCommandList(This,nodeMask,type,pCommandAllocator,pInitialState,riid,ppCommandList) \ + ( (This)->lpVtbl -> CreateCommandList(This,nodeMask,type,pCommandAllocator,pInitialState,riid,ppCommandList) ) + +#define ID3D12Device3_CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) \ + ( (This)->lpVtbl -> CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) ) + +#define ID3D12Device3_CreateDescriptorHeap(This,pDescriptorHeapDesc,riid,ppvHeap) \ + ( (This)->lpVtbl -> CreateDescriptorHeap(This,pDescriptorHeapDesc,riid,ppvHeap) ) + +#define ID3D12Device3_GetDescriptorHandleIncrementSize(This,DescriptorHeapType) \ + ( (This)->lpVtbl -> GetDescriptorHandleIncrementSize(This,DescriptorHeapType) ) + +#define ID3D12Device3_CreateRootSignature(This,nodeMask,pBlobWithRootSignature,blobLengthInBytes,riid,ppvRootSignature) \ + ( (This)->lpVtbl -> CreateRootSignature(This,nodeMask,pBlobWithRootSignature,blobLengthInBytes,riid,ppvRootSignature) ) + +#define ID3D12Device3_CreateConstantBufferView(This,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateConstantBufferView(This,pDesc,DestDescriptor) ) + +#define ID3D12Device3_CreateShaderResourceView(This,pResource,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateShaderResourceView(This,pResource,pDesc,DestDescriptor) ) + +#define ID3D12Device3_CreateUnorderedAccessView(This,pResource,pCounterResource,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateUnorderedAccessView(This,pResource,pCounterResource,pDesc,DestDescriptor) ) + +#define ID3D12Device3_CreateRenderTargetView(This,pResource,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateRenderTargetView(This,pResource,pDesc,DestDescriptor) ) + +#define ID3D12Device3_CreateDepthStencilView(This,pResource,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateDepthStencilView(This,pResource,pDesc,DestDescriptor) ) + +#define ID3D12Device3_CreateSampler(This,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateSampler(This,pDesc,DestDescriptor) ) + +#define ID3D12Device3_CopyDescriptors(This,NumDestDescriptorRanges,pDestDescriptorRangeStarts,pDestDescriptorRangeSizes,NumSrcDescriptorRanges,pSrcDescriptorRangeStarts,pSrcDescriptorRangeSizes,DescriptorHeapsType) \ + ( (This)->lpVtbl -> CopyDescriptors(This,NumDestDescriptorRanges,pDestDescriptorRangeStarts,pDestDescriptorRangeSizes,NumSrcDescriptorRanges,pSrcDescriptorRangeStarts,pSrcDescriptorRangeSizes,DescriptorHeapsType) ) + +#define ID3D12Device3_CopyDescriptorsSimple(This,NumDescriptors,DestDescriptorRangeStart,SrcDescriptorRangeStart,DescriptorHeapsType) \ + ( (This)->lpVtbl -> CopyDescriptorsSimple(This,NumDescriptors,DestDescriptorRangeStart,SrcDescriptorRangeStart,DescriptorHeapsType) ) + +#define ID3D12Device3_GetResourceAllocationInfo(This,visibleMask,numResourceDescs,pResourceDescs) \ + ( (This)->lpVtbl -> GetResourceAllocationInfo(This,visibleMask,numResourceDescs,pResourceDescs) ) + +#define ID3D12Device3_GetCustomHeapProperties(This,nodeMask,heapType) \ + ( (This)->lpVtbl -> GetCustomHeapProperties(This,nodeMask,heapType) ) + +#define ID3D12Device3_CreateCommittedResource(This,pHeapProperties,HeapFlags,pDesc,InitialResourceState,pOptimizedClearValue,riidResource,ppvResource) \ + ( (This)->lpVtbl -> CreateCommittedResource(This,pHeapProperties,HeapFlags,pDesc,InitialResourceState,pOptimizedClearValue,riidResource,ppvResource) ) + +#define ID3D12Device3_CreateHeap(This,pDesc,riid,ppvHeap) \ + ( (This)->lpVtbl -> CreateHeap(This,pDesc,riid,ppvHeap) ) + +#define ID3D12Device3_CreatePlacedResource(This,pHeap,HeapOffset,pDesc,InitialState,pOptimizedClearValue,riid,ppvResource) \ + ( (This)->lpVtbl -> CreatePlacedResource(This,pHeap,HeapOffset,pDesc,InitialState,pOptimizedClearValue,riid,ppvResource) ) + +#define ID3D12Device3_CreateReservedResource(This,pDesc,InitialState,pOptimizedClearValue,riid,ppvResource) \ + ( (This)->lpVtbl -> CreateReservedResource(This,pDesc,InitialState,pOptimizedClearValue,riid,ppvResource) ) + +#define ID3D12Device3_CreateSharedHandle(This,pObject,pAttributes,Access,Name,pHandle) \ + ( (This)->lpVtbl -> CreateSharedHandle(This,pObject,pAttributes,Access,Name,pHandle) ) + +#define ID3D12Device3_OpenSharedHandle(This,NTHandle,riid,ppvObj) \ + ( (This)->lpVtbl -> OpenSharedHandle(This,NTHandle,riid,ppvObj) ) + +#define ID3D12Device3_OpenSharedHandleByName(This,Name,Access,pNTHandle) \ + ( (This)->lpVtbl -> OpenSharedHandleByName(This,Name,Access,pNTHandle) ) + +#define ID3D12Device3_MakeResident(This,NumObjects,ppObjects) \ + ( (This)->lpVtbl -> MakeResident(This,NumObjects,ppObjects) ) + +#define ID3D12Device3_Evict(This,NumObjects,ppObjects) \ + ( (This)->lpVtbl -> Evict(This,NumObjects,ppObjects) ) + +#define ID3D12Device3_CreateFence(This,InitialValue,Flags,riid,ppFence) \ + ( (This)->lpVtbl -> CreateFence(This,InitialValue,Flags,riid,ppFence) ) + +#define ID3D12Device3_GetDeviceRemovedReason(This) \ + ( (This)->lpVtbl -> GetDeviceRemovedReason(This) ) + +#define ID3D12Device3_GetCopyableFootprints(This,pResourceDesc,FirstSubresource,NumSubresources,BaseOffset,pLayouts,pNumRows,pRowSizeInBytes,pTotalBytes) \ + ( (This)->lpVtbl -> GetCopyableFootprints(This,pResourceDesc,FirstSubresource,NumSubresources,BaseOffset,pLayouts,pNumRows,pRowSizeInBytes,pTotalBytes) ) + +#define ID3D12Device3_CreateQueryHeap(This,pDesc,riid,ppvHeap) \ + ( (This)->lpVtbl -> CreateQueryHeap(This,pDesc,riid,ppvHeap) ) + +#define ID3D12Device3_SetStablePowerState(This,Enable) \ + ( (This)->lpVtbl -> SetStablePowerState(This,Enable) ) + +#define ID3D12Device3_CreateCommandSignature(This,pDesc,pRootSignature,riid,ppvCommandSignature) \ + ( (This)->lpVtbl -> CreateCommandSignature(This,pDesc,pRootSignature,riid,ppvCommandSignature) ) + +#define ID3D12Device3_GetResourceTiling(This,pTiledResource,pNumTilesForEntireResource,pPackedMipDesc,pStandardTileShapeForNonPackedMips,pNumSubresourceTilings,FirstSubresourceTilingToGet,pSubresourceTilingsForNonPackedMips) \ + ( (This)->lpVtbl -> GetResourceTiling(This,pTiledResource,pNumTilesForEntireResource,pPackedMipDesc,pStandardTileShapeForNonPackedMips,pNumSubresourceTilings,FirstSubresourceTilingToGet,pSubresourceTilingsForNonPackedMips) ) + +#define ID3D12Device3_GetAdapterLuid(This) \ + ( (This)->lpVtbl -> GetAdapterLuid(This) ) + + +#define ID3D12Device3_CreatePipelineLibrary(This,pLibraryBlob,BlobLength,riid,ppPipelineLibrary) \ + ( (This)->lpVtbl -> CreatePipelineLibrary(This,pLibraryBlob,BlobLength,riid,ppPipelineLibrary) ) + +#define ID3D12Device3_SetEventOnMultipleFenceCompletion(This,ppFences,pFenceValues,NumFences,Flags,hEvent) \ + ( (This)->lpVtbl -> SetEventOnMultipleFenceCompletion(This,ppFences,pFenceValues,NumFences,Flags,hEvent) ) + +#define ID3D12Device3_SetResidencyPriority(This,NumObjects,ppObjects,pPriorities) \ + ( (This)->lpVtbl -> SetResidencyPriority(This,NumObjects,ppObjects,pPriorities) ) + + +#define ID3D12Device3_CreatePipelineState(This,pDesc,riid,ppPipelineState) \ + ( (This)->lpVtbl -> CreatePipelineState(This,pDesc,riid,ppPipelineState) ) + + +#define ID3D12Device3_OpenExistingHeapFromAddress(This,pAddress,riid,ppvHeap) \ + ( (This)->lpVtbl -> OpenExistingHeapFromAddress(This,pAddress,riid,ppvHeap) ) + +#define ID3D12Device3_OpenExistingHeapFromFileMapping(This,hFileMapping,riid,ppvHeap) \ + ( (This)->lpVtbl -> OpenExistingHeapFromFileMapping(This,hFileMapping,riid,ppvHeap) ) + +#define ID3D12Device3_EnqueueMakeResident(This,Flags,NumObjects,ppObjects,pFenceToSignal,FenceValueToSignal) \ + ( (This)->lpVtbl -> EnqueueMakeResident(This,Flags,NumObjects,ppObjects,pFenceToSignal,FenceValueToSignal) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12Device3_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12Tools_INTERFACE_DEFINED__ +#define __ID3D12Tools_INTERFACE_DEFINED__ + +/* interface ID3D12Tools */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12Tools; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("7071e1f0-e84b-4b33-974f-12fa49de65c5") + ID3D12Tools : public IUnknown + { + public: + virtual void STDMETHODCALLTYPE EnableShaderInstrumentation( + BOOL bEnable) = 0; + + virtual BOOL STDMETHODCALLTYPE ShaderInstrumentationEnabled( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12ToolsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12Tools * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12Tools * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12Tools * This); + + void ( STDMETHODCALLTYPE *EnableShaderInstrumentation )( + ID3D12Tools * This, + BOOL bEnable); + + BOOL ( STDMETHODCALLTYPE *ShaderInstrumentationEnabled )( + ID3D12Tools * This); + + END_INTERFACE + } ID3D12ToolsVtbl; + + interface ID3D12Tools + { + CONST_VTBL struct ID3D12ToolsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12Tools_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12Tools_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12Tools_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12Tools_EnableShaderInstrumentation(This,bEnable) \ + ( (This)->lpVtbl -> EnableShaderInstrumentation(This,bEnable) ) + +#define ID3D12Tools_ShaderInstrumentationEnabled(This) \ + ( (This)->lpVtbl -> ShaderInstrumentationEnabled(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12Tools_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12_0000_0027 */ +/* [local] */ + +typedef struct D3D12_SUBRESOURCE_DATA + { + const void *pData; + LONG_PTR RowPitch; + LONG_PTR SlicePitch; + } D3D12_SUBRESOURCE_DATA; + +typedef struct D3D12_MEMCPY_DEST + { + void *pData; + SIZE_T RowPitch; + SIZE_T SlicePitch; + } D3D12_MEMCPY_DEST; + +#if !defined( D3D12_IGNORE_SDK_LAYERS ) +#include "d3d12sdklayers.h" +#endif + +/////////////////////////////////////////////////////////////////////////// +// D3D12CreateDevice +// ------------------ +// +// pAdapter +// If NULL, D3D12CreateDevice will choose the primary adapter. +// If non-NULL, D3D12CreateDevice will use the provided adapter. +// MinimumFeatureLevel +// The minimum feature level required for successful device creation. +// riid +// The interface IID of the device to be returned. Expected: ID3D12Device. +// ppDevice +// Pointer to returned interface. May be NULL. +// +// Return Values +// Any of those documented for +// CreateDXGIFactory1 +// IDXGIFactory::EnumAdapters +// D3D12CreateDevice +// +/////////////////////////////////////////////////////////////////////////// +typedef HRESULT (WINAPI* PFN_D3D12_CREATE_DEVICE)( _In_opt_ IUnknown*, + D3D_FEATURE_LEVEL, + _In_ REFIID, _COM_Outptr_opt_ void** ); + +HRESULT WINAPI D3D12CreateDevice( + _In_opt_ IUnknown* pAdapter, + D3D_FEATURE_LEVEL MinimumFeatureLevel, + _In_ REFIID riid, // Expected: ID3D12Device + _COM_Outptr_opt_ void** ppDevice ); + + +typedef HRESULT (WINAPI* PFN_D3D12_GET_DEBUG_INTERFACE)( _In_ REFIID, _COM_Outptr_opt_ void** ); + +HRESULT WINAPI D3D12GetDebugInterface( _In_ REFIID riid, _COM_Outptr_opt_ void** ppvDebug ); + +// -------------------------------------------------------------------------------------------------------------------------------- +// D3D12EnableExperimentalFeatures +// +// Pass in a list of feature GUIDs to be enabled together. +// +// If a particular feature requires some configuration information on enablement, it will have +// a configuration struct that can be passed alongside the GUID. +// +// Some features might use an interface IID as the GUID. For these, once the feature is enabled via +// D3D12EnableExperimentalFeatures, D3D12GetDebugInterface can then be called with the IID to retrieve the interface +// for manipulating the feature. This allows for control that might not cleanly be expressed by just +// the configuration struct that D3D12EnableExperimentalFeatures provides. +// +// If this method is called and a change to existing feature enablement is made, +// all current D3D12 devices are set to DEVICE_REMOVED state, since under the covers there is really only one +// singleton device for a process. Removing the devices when configuration changes prevents +// mismatched expectations of how a device is supposed to work after it has been created from the app's point of view. +// +// The call returns E_NOINTERFACE if an unrecognized feature is passed in or Windows Developer mode is not on. +// The call returns E_INVALIDARG if the configuration of a feature is incorrect, the set of features passed +// in are known to be incompatible with each other, or other errors. +// Returns S_OK otherwise. +// +// -------------------------------------------------------------------------------------------------------------------------------- +HRESULT WINAPI D3D12EnableExperimentalFeatures( + UINT NumFeatures, + __in_ecount(NumFeatures) const IID* pIIDs, + __in_ecount_opt(NumFeatures) void* pConfigurationStructs, + __in_ecount_opt(NumFeatures) UINT* pConfigurationStructSizes); + +// -------------------------------------------------------------------------------------------------------------------------------- +// Experimental Feature: D3D12ExperimentalShaderModels +// +// Use with D3D12EnableExperimentalFeatures to enable experimental shader model support, +// meaning shader models that haven't been finalized for use in retail. +// +// Enabling D3D12ExperimentalShaderModels needs no configuration struct, pass NULL in the pConfigurationStructs array. +// +// -------------------------------------------------------------------------------------------------------------------------------- +static const UUID D3D12ExperimentalShaderModels = { /* 76f5573e-f13a-40f5-b297-81ce9e18933f */ + 0x76f5573e, + 0xf13a, + 0x40f5, + { 0xb2, 0x97, 0x81, 0xce, 0x9e, 0x18, 0x93, 0x3f } +}; +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ +DEFINE_GUID(IID_ID3D12Object,0xc4fec28f,0x7966,0x4e95,0x9f,0x94,0xf4,0x31,0xcb,0x56,0xc3,0xb8); +DEFINE_GUID(IID_ID3D12DeviceChild,0x905db94b,0xa00c,0x4140,0x9d,0xf5,0x2b,0x64,0xca,0x9e,0xa3,0x57); +DEFINE_GUID(IID_ID3D12RootSignature,0xc54a6b66,0x72df,0x4ee8,0x8b,0xe5,0xa9,0x46,0xa1,0x42,0x92,0x14); +DEFINE_GUID(IID_ID3D12RootSignatureDeserializer,0x34AB647B,0x3CC8,0x46AC,0x84,0x1B,0xC0,0x96,0x56,0x45,0xC0,0x46); +DEFINE_GUID(IID_ID3D12VersionedRootSignatureDeserializer,0x7F91CE67,0x090C,0x4BB7,0xB7,0x8E,0xED,0x8F,0xF2,0xE3,0x1D,0xA0); +DEFINE_GUID(IID_ID3D12Pageable,0x63ee58fb,0x1268,0x4835,0x86,0xda,0xf0,0x08,0xce,0x62,0xf0,0xd6); +DEFINE_GUID(IID_ID3D12Heap,0x6b3b2502,0x6e51,0x45b3,0x90,0xee,0x98,0x84,0x26,0x5e,0x8d,0xf3); +DEFINE_GUID(IID_ID3D12Resource,0x696442be,0xa72e,0x4059,0xbc,0x79,0x5b,0x5c,0x98,0x04,0x0f,0xad); +DEFINE_GUID(IID_ID3D12CommandAllocator,0x6102dee4,0xaf59,0x4b09,0xb9,0x99,0xb4,0x4d,0x73,0xf0,0x9b,0x24); +DEFINE_GUID(IID_ID3D12Fence,0x0a753dcf,0xc4d8,0x4b91,0xad,0xf6,0xbe,0x5a,0x60,0xd9,0x5a,0x76); +DEFINE_GUID(IID_ID3D12Fence1,0x433685fe,0xe22b,0x4ca0,0xa8,0xdb,0xb5,0xb4,0xf4,0xdd,0x0e,0x4a); +DEFINE_GUID(IID_ID3D12PipelineState,0x765a30f3,0xf624,0x4c6f,0xa8,0x28,0xac,0xe9,0x48,0x62,0x24,0x45); +DEFINE_GUID(IID_ID3D12DescriptorHeap,0x8efb471d,0x616c,0x4f49,0x90,0xf7,0x12,0x7b,0xb7,0x63,0xfa,0x51); +DEFINE_GUID(IID_ID3D12QueryHeap,0x0d9658ae,0xed45,0x469e,0xa6,0x1d,0x97,0x0e,0xc5,0x83,0xca,0xb4); +DEFINE_GUID(IID_ID3D12CommandSignature,0xc36a797c,0xec80,0x4f0a,0x89,0x85,0xa7,0xb2,0x47,0x50,0x82,0xd1); +DEFINE_GUID(IID_ID3D12CommandList,0x7116d91c,0xe7e4,0x47ce,0xb8,0xc6,0xec,0x81,0x68,0xf4,0x37,0xe5); +DEFINE_GUID(IID_ID3D12GraphicsCommandList,0x5b160d0f,0xac1b,0x4185,0x8b,0xa8,0xb3,0xae,0x42,0xa5,0xa4,0x55); +DEFINE_GUID(IID_ID3D12GraphicsCommandList1,0x553103fb,0x1fe7,0x4557,0xbb,0x38,0x94,0x6d,0x7d,0x0e,0x7c,0xa7); +DEFINE_GUID(IID_ID3D12GraphicsCommandList2,0x38C3E585,0xFF17,0x412C,0x91,0x50,0x4F,0xC6,0xF9,0xD7,0x2A,0x28); +DEFINE_GUID(IID_ID3D12CommandQueue,0x0ec870a6,0x5d7e,0x4c22,0x8c,0xfc,0x5b,0xaa,0xe0,0x76,0x16,0xed); +DEFINE_GUID(IID_ID3D12Device,0x189819f1,0x1db6,0x4b57,0xbe,0x54,0x18,0x21,0x33,0x9b,0x85,0xf7); +DEFINE_GUID(IID_ID3D12PipelineLibrary,0xc64226a8,0x9201,0x46af,0xb4,0xcc,0x53,0xfb,0x9f,0xf7,0x41,0x4f); +DEFINE_GUID(IID_ID3D12PipelineLibrary1,0x80eabf42,0x2568,0x4e5e,0xbd,0x82,0xc3,0x7f,0x86,0x96,0x1d,0xc3); +DEFINE_GUID(IID_ID3D12Device1,0x77acce80,0x638e,0x4e65,0x88,0x95,0xc1,0xf2,0x33,0x86,0x86,0x3e); +DEFINE_GUID(IID_ID3D12Device2,0x30baa41e,0xb15b,0x475c,0xa0,0xbb,0x1a,0xf5,0xc5,0xb6,0x43,0x28); +DEFINE_GUID(IID_ID3D12Device3,0x81dadc15,0x2bad,0x4392,0x93,0xc5,0x10,0x13,0x45,0xc4,0xaa,0x98); +DEFINE_GUID(IID_ID3D12Tools,0x7071e1f0,0xe84b,0x4b33,0x97,0x4f,0x12,0xfa,0x49,0xde,0x65,0xc5); + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0027_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0027_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/d3d12sdklayers.h b/gfx/include/dxsdk/d3d12sdklayers.h new file mode 100644 index 0000000000..11a1566bee --- /dev/null +++ b/gfx/include/dxsdk/d3d12sdklayers.h @@ -0,0 +1,2710 @@ +/*------------------------------------------------------------------------------------- + * + * Copyright (c) Microsoft Corporation + * + *-------------------------------------------------------------------------------------*/ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __d3d12sdklayers_h__ +#define __d3d12sdklayers_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __ID3D12Debug_FWD_DEFINED__ +#define __ID3D12Debug_FWD_DEFINED__ +typedef interface ID3D12Debug ID3D12Debug; + +#endif /* __ID3D12Debug_FWD_DEFINED__ */ + + +#ifndef __ID3D12Debug1_FWD_DEFINED__ +#define __ID3D12Debug1_FWD_DEFINED__ +typedef interface ID3D12Debug1 ID3D12Debug1; + +#endif /* __ID3D12Debug1_FWD_DEFINED__ */ + + +#ifndef __ID3D12Debug2_FWD_DEFINED__ +#define __ID3D12Debug2_FWD_DEFINED__ +typedef interface ID3D12Debug2 ID3D12Debug2; + +#endif /* __ID3D12Debug2_FWD_DEFINED__ */ + + +#ifndef __ID3D12DebugDevice1_FWD_DEFINED__ +#define __ID3D12DebugDevice1_FWD_DEFINED__ +typedef interface ID3D12DebugDevice1 ID3D12DebugDevice1; + +#endif /* __ID3D12DebugDevice1_FWD_DEFINED__ */ + + +#ifndef __ID3D12DebugDevice_FWD_DEFINED__ +#define __ID3D12DebugDevice_FWD_DEFINED__ +typedef interface ID3D12DebugDevice ID3D12DebugDevice; + +#endif /* __ID3D12DebugDevice_FWD_DEFINED__ */ + + +#ifndef __ID3D12DebugCommandQueue_FWD_DEFINED__ +#define __ID3D12DebugCommandQueue_FWD_DEFINED__ +typedef interface ID3D12DebugCommandQueue ID3D12DebugCommandQueue; + +#endif /* __ID3D12DebugCommandQueue_FWD_DEFINED__ */ + + +#ifndef __ID3D12DebugCommandList1_FWD_DEFINED__ +#define __ID3D12DebugCommandList1_FWD_DEFINED__ +typedef interface ID3D12DebugCommandList1 ID3D12DebugCommandList1; + +#endif /* __ID3D12DebugCommandList1_FWD_DEFINED__ */ + + +#ifndef __ID3D12DebugCommandList_FWD_DEFINED__ +#define __ID3D12DebugCommandList_FWD_DEFINED__ +typedef interface ID3D12DebugCommandList ID3D12DebugCommandList; + +#endif /* __ID3D12DebugCommandList_FWD_DEFINED__ */ + + +#ifndef __ID3D12SharingContract_FWD_DEFINED__ +#define __ID3D12SharingContract_FWD_DEFINED__ +typedef interface ID3D12SharingContract ID3D12SharingContract; + +#endif /* __ID3D12SharingContract_FWD_DEFINED__ */ + + +#ifndef __ID3D12InfoQueue_FWD_DEFINED__ +#define __ID3D12InfoQueue_FWD_DEFINED__ +typedef interface ID3D12InfoQueue ID3D12InfoQueue; + +#endif /* __ID3D12InfoQueue_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "d3d12.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_d3d12sdklayers_0000_0000 */ +/* [local] */ + +/*#include */ +/*#pragma region App Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0000_v0_0_s_ifspec; + +#ifndef __ID3D12Debug_INTERFACE_DEFINED__ +#define __ID3D12Debug_INTERFACE_DEFINED__ + +/* interface ID3D12Debug */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12Debug; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("344488b7-6846-474b-b989-f027448245e0") + ID3D12Debug : public IUnknown + { + public: + virtual void STDMETHODCALLTYPE EnableDebugLayer( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12DebugVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12Debug * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12Debug * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12Debug * This); + + void ( STDMETHODCALLTYPE *EnableDebugLayer )( + ID3D12Debug * This); + + END_INTERFACE + } ID3D12DebugVtbl; + + interface ID3D12Debug + { + CONST_VTBL struct ID3D12DebugVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12Debug_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12Debug_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12Debug_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12Debug_EnableDebugLayer(This) \ + ( (This)->lpVtbl -> EnableDebugLayer(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12Debug_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12Debug1_INTERFACE_DEFINED__ +#define __ID3D12Debug1_INTERFACE_DEFINED__ + +/* interface ID3D12Debug1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12Debug1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("affaa4ca-63fe-4d8e-b8ad-159000af4304") + ID3D12Debug1 : public IUnknown + { + public: + virtual void STDMETHODCALLTYPE EnableDebugLayer( void) = 0; + + virtual void STDMETHODCALLTYPE SetEnableGPUBasedValidation( + BOOL Enable) = 0; + + virtual void STDMETHODCALLTYPE SetEnableSynchronizedCommandQueueValidation( + BOOL Enable) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12Debug1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12Debug1 * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12Debug1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12Debug1 * This); + + void ( STDMETHODCALLTYPE *EnableDebugLayer )( + ID3D12Debug1 * This); + + void ( STDMETHODCALLTYPE *SetEnableGPUBasedValidation )( + ID3D12Debug1 * This, + BOOL Enable); + + void ( STDMETHODCALLTYPE *SetEnableSynchronizedCommandQueueValidation )( + ID3D12Debug1 * This, + BOOL Enable); + + END_INTERFACE + } ID3D12Debug1Vtbl; + + interface ID3D12Debug1 + { + CONST_VTBL struct ID3D12Debug1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12Debug1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12Debug1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12Debug1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12Debug1_EnableDebugLayer(This) \ + ( (This)->lpVtbl -> EnableDebugLayer(This) ) + +#define ID3D12Debug1_SetEnableGPUBasedValidation(This,Enable) \ + ( (This)->lpVtbl -> SetEnableGPUBasedValidation(This,Enable) ) + +#define ID3D12Debug1_SetEnableSynchronizedCommandQueueValidation(This,Enable) \ + ( (This)->lpVtbl -> SetEnableSynchronizedCommandQueueValidation(This,Enable) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12Debug1_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12sdklayers_0000_0002 */ +/* [local] */ + +typedef +enum D3D12_GPU_BASED_VALIDATION_FLAGS + { + D3D12_GPU_BASED_VALIDATION_FLAGS_NONE = 0, + D3D12_GPU_BASED_VALIDATION_FLAGS_DISABLE_STATE_TRACKING = 0x1 + } D3D12_GPU_BASED_VALIDATION_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS(D3D12_GPU_BASED_VALIDATION_FLAGS) + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0002_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0002_v0_0_s_ifspec; + +#ifndef __ID3D12Debug2_INTERFACE_DEFINED__ +#define __ID3D12Debug2_INTERFACE_DEFINED__ + +/* interface ID3D12Debug2 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12Debug2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("93a665c4-a3b2-4e5d-b692-a26ae14e3374") + ID3D12Debug2 : public IUnknown + { + public: + virtual void STDMETHODCALLTYPE SetGPUBasedValidationFlags( + D3D12_GPU_BASED_VALIDATION_FLAGS Flags) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12Debug2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12Debug2 * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12Debug2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12Debug2 * This); + + void ( STDMETHODCALLTYPE *SetGPUBasedValidationFlags )( + ID3D12Debug2 * This, + D3D12_GPU_BASED_VALIDATION_FLAGS Flags); + + END_INTERFACE + } ID3D12Debug2Vtbl; + + interface ID3D12Debug2 + { + CONST_VTBL struct ID3D12Debug2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12Debug2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12Debug2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12Debug2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12Debug2_SetGPUBasedValidationFlags(This,Flags) \ + ( (This)->lpVtbl -> SetGPUBasedValidationFlags(This,Flags) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12Debug2_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12sdklayers_0000_0003 */ +/* [local] */ + +typedef +enum D3D12_RLDO_FLAGS + { + D3D12_RLDO_NONE = 0, + D3D12_RLDO_SUMMARY = 0x1, + D3D12_RLDO_DETAIL = 0x2, + D3D12_RLDO_IGNORE_INTERNAL = 0x4 + } D3D12_RLDO_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS(D3D12_RLDO_FLAGS) +typedef +enum D3D12_DEBUG_DEVICE_PARAMETER_TYPE + { + D3D12_DEBUG_DEVICE_PARAMETER_FEATURE_FLAGS = 0, + D3D12_DEBUG_DEVICE_PARAMETER_GPU_BASED_VALIDATION_SETTINGS = ( D3D12_DEBUG_DEVICE_PARAMETER_FEATURE_FLAGS + 1 ) , + D3D12_DEBUG_DEVICE_PARAMETER_GPU_SLOWDOWN_PERFORMANCE_FACTOR = ( D3D12_DEBUG_DEVICE_PARAMETER_GPU_BASED_VALIDATION_SETTINGS + 1 ) + } D3D12_DEBUG_DEVICE_PARAMETER_TYPE; + +typedef +enum D3D12_DEBUG_FEATURE + { + D3D12_DEBUG_FEATURE_NONE = 0, + D3D12_DEBUG_FEATURE_ALLOW_BEHAVIOR_CHANGING_DEBUG_AIDS = 0x1, + D3D12_DEBUG_FEATURE_CONSERVATIVE_RESOURCE_STATE_TRACKING = 0x2, + D3D12_DEBUG_FEATURE_DISABLE_VIRTUALIZED_BUNDLES_VALIDATION = 0x4, + D3D12_DEBUG_FEATURE_VALID_MASK = ( ( D3D12_DEBUG_FEATURE_ALLOW_BEHAVIOR_CHANGING_DEBUG_AIDS | D3D12_DEBUG_FEATURE_CONSERVATIVE_RESOURCE_STATE_TRACKING ) | D3D12_DEBUG_FEATURE_DISABLE_VIRTUALIZED_BUNDLES_VALIDATION ) + } D3D12_DEBUG_FEATURE; + +DEFINE_ENUM_FLAG_OPERATORS(D3D12_DEBUG_FEATURE) +typedef +enum D3D12_GPU_BASED_VALIDATION_SHADER_PATCH_MODE + { + D3D12_GPU_BASED_VALIDATION_SHADER_PATCH_MODE_NONE = 0, + D3D12_GPU_BASED_VALIDATION_SHADER_PATCH_MODE_STATE_TRACKING_ONLY = ( D3D12_GPU_BASED_VALIDATION_SHADER_PATCH_MODE_NONE + 1 ) , + D3D12_GPU_BASED_VALIDATION_SHADER_PATCH_MODE_UNGUARDED_VALIDATION = ( D3D12_GPU_BASED_VALIDATION_SHADER_PATCH_MODE_STATE_TRACKING_ONLY + 1 ) , + D3D12_GPU_BASED_VALIDATION_SHADER_PATCH_MODE_GUARDED_VALIDATION = ( D3D12_GPU_BASED_VALIDATION_SHADER_PATCH_MODE_UNGUARDED_VALIDATION + 1 ) , + NUM_D3D12_GPU_BASED_VALIDATION_SHADER_PATCH_MODES = ( D3D12_GPU_BASED_VALIDATION_SHADER_PATCH_MODE_GUARDED_VALIDATION + 1 ) + } D3D12_GPU_BASED_VALIDATION_SHADER_PATCH_MODE; + +typedef +enum D3D12_GPU_BASED_VALIDATION_PIPELINE_STATE_CREATE_FLAGS + { + D3D12_GPU_BASED_VALIDATION_PIPELINE_STATE_CREATE_FLAG_NONE = 0, + D3D12_GPU_BASED_VALIDATION_PIPELINE_STATE_CREATE_FLAG_FRONT_LOAD_CREATE_TRACKING_ONLY_SHADERS = 0x1, + D3D12_GPU_BASED_VALIDATION_PIPELINE_STATE_CREATE_FLAG_FRONT_LOAD_CREATE_UNGUARDED_VALIDATION_SHADERS = 0x2, + D3D12_GPU_BASED_VALIDATION_PIPELINE_STATE_CREATE_FLAG_FRONT_LOAD_CREATE_GUARDED_VALIDATION_SHADERS = 0x4, + D3D12_GPU_BASED_VALIDATION_PIPELINE_STATE_CREATE_FLAGS_VALID_MASK = 0x7 + } D3D12_GPU_BASED_VALIDATION_PIPELINE_STATE_CREATE_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS(D3D12_GPU_BASED_VALIDATION_PIPELINE_STATE_CREATE_FLAGS) +typedef struct D3D12_DEBUG_DEVICE_GPU_BASED_VALIDATION_SETTINGS + { + UINT MaxMessagesPerCommandList; + D3D12_GPU_BASED_VALIDATION_SHADER_PATCH_MODE DefaultShaderPatchMode; + D3D12_GPU_BASED_VALIDATION_PIPELINE_STATE_CREATE_FLAGS PipelineStateCreateFlags; + } D3D12_DEBUG_DEVICE_GPU_BASED_VALIDATION_SETTINGS; + +typedef struct D3D12_DEBUG_DEVICE_GPU_SLOWDOWN_PERFORMANCE_FACTOR + { + FLOAT SlowdownFactor; + } D3D12_DEBUG_DEVICE_GPU_SLOWDOWN_PERFORMANCE_FACTOR; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0003_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0003_v0_0_s_ifspec; + +#ifndef __ID3D12DebugDevice1_INTERFACE_DEFINED__ +#define __ID3D12DebugDevice1_INTERFACE_DEFINED__ + +/* interface ID3D12DebugDevice1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12DebugDevice1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("a9b71770-d099-4a65-a698-3dee10020f88") + ID3D12DebugDevice1 : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetDebugParameter( + D3D12_DEBUG_DEVICE_PARAMETER_TYPE Type, + _In_reads_bytes_(DataSize) const void *pData, + UINT DataSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDebugParameter( + D3D12_DEBUG_DEVICE_PARAMETER_TYPE Type, + _Out_writes_bytes_(DataSize) void *pData, + UINT DataSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReportLiveDeviceObjects( + D3D12_RLDO_FLAGS Flags) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12DebugDevice1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12DebugDevice1 * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12DebugDevice1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12DebugDevice1 * This); + + HRESULT ( STDMETHODCALLTYPE *SetDebugParameter )( + ID3D12DebugDevice1 * This, + D3D12_DEBUG_DEVICE_PARAMETER_TYPE Type, + _In_reads_bytes_(DataSize) const void *pData, + UINT DataSize); + + HRESULT ( STDMETHODCALLTYPE *GetDebugParameter )( + ID3D12DebugDevice1 * This, + D3D12_DEBUG_DEVICE_PARAMETER_TYPE Type, + _Out_writes_bytes_(DataSize) void *pData, + UINT DataSize); + + HRESULT ( STDMETHODCALLTYPE *ReportLiveDeviceObjects )( + ID3D12DebugDevice1 * This, + D3D12_RLDO_FLAGS Flags); + + END_INTERFACE + } ID3D12DebugDevice1Vtbl; + + interface ID3D12DebugDevice1 + { + CONST_VTBL struct ID3D12DebugDevice1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12DebugDevice1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12DebugDevice1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12DebugDevice1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12DebugDevice1_SetDebugParameter(This,Type,pData,DataSize) \ + ( (This)->lpVtbl -> SetDebugParameter(This,Type,pData,DataSize) ) + +#define ID3D12DebugDevice1_GetDebugParameter(This,Type,pData,DataSize) \ + ( (This)->lpVtbl -> GetDebugParameter(This,Type,pData,DataSize) ) + +#define ID3D12DebugDevice1_ReportLiveDeviceObjects(This,Flags) \ + ( (This)->lpVtbl -> ReportLiveDeviceObjects(This,Flags) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12DebugDevice1_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12DebugDevice_INTERFACE_DEFINED__ +#define __ID3D12DebugDevice_INTERFACE_DEFINED__ + +/* interface ID3D12DebugDevice */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12DebugDevice; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3febd6dd-4973-4787-8194-e45f9e28923e") + ID3D12DebugDevice : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetFeatureMask( + D3D12_DEBUG_FEATURE Mask) = 0; + + virtual D3D12_DEBUG_FEATURE STDMETHODCALLTYPE GetFeatureMask( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReportLiveDeviceObjects( + D3D12_RLDO_FLAGS Flags) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12DebugDeviceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12DebugDevice * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12DebugDevice * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12DebugDevice * This); + + HRESULT ( STDMETHODCALLTYPE *SetFeatureMask )( + ID3D12DebugDevice * This, + D3D12_DEBUG_FEATURE Mask); + + D3D12_DEBUG_FEATURE ( STDMETHODCALLTYPE *GetFeatureMask )( + ID3D12DebugDevice * This); + + HRESULT ( STDMETHODCALLTYPE *ReportLiveDeviceObjects )( + ID3D12DebugDevice * This, + D3D12_RLDO_FLAGS Flags); + + END_INTERFACE + } ID3D12DebugDeviceVtbl; + + interface ID3D12DebugDevice + { + CONST_VTBL struct ID3D12DebugDeviceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12DebugDevice_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12DebugDevice_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12DebugDevice_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12DebugDevice_SetFeatureMask(This,Mask) \ + ( (This)->lpVtbl -> SetFeatureMask(This,Mask) ) + +#define ID3D12DebugDevice_GetFeatureMask(This) \ + ( (This)->lpVtbl -> GetFeatureMask(This) ) + +#define ID3D12DebugDevice_ReportLiveDeviceObjects(This,Flags) \ + ( (This)->lpVtbl -> ReportLiveDeviceObjects(This,Flags) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12DebugDevice_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12sdklayers_0000_0005 */ +/* [local] */ + +DEFINE_GUID(DXGI_DEBUG_D3D12, 0xcf59a98c, 0xa950, 0x4326, 0x91, 0xef, 0x9b, 0xba, 0xa1, 0x7b, 0xfd, 0x95); + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0005_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0005_v0_0_s_ifspec; + +#ifndef __ID3D12DebugCommandQueue_INTERFACE_DEFINED__ +#define __ID3D12DebugCommandQueue_INTERFACE_DEFINED__ + +/* interface ID3D12DebugCommandQueue */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12DebugCommandQueue; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("09e0bf36-54ac-484f-8847-4baeeab6053a") + ID3D12DebugCommandQueue : public IUnknown + { + public: + virtual BOOL STDMETHODCALLTYPE AssertResourceState( + _In_ ID3D12Resource *pResource, + UINT Subresource, + UINT State) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12DebugCommandQueueVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12DebugCommandQueue * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12DebugCommandQueue * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12DebugCommandQueue * This); + + BOOL ( STDMETHODCALLTYPE *AssertResourceState )( + ID3D12DebugCommandQueue * This, + _In_ ID3D12Resource *pResource, + UINT Subresource, + UINT State); + + END_INTERFACE + } ID3D12DebugCommandQueueVtbl; + + interface ID3D12DebugCommandQueue + { + CONST_VTBL struct ID3D12DebugCommandQueueVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12DebugCommandQueue_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12DebugCommandQueue_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12DebugCommandQueue_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12DebugCommandQueue_AssertResourceState(This,pResource,Subresource,State) \ + ( (This)->lpVtbl -> AssertResourceState(This,pResource,Subresource,State) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12DebugCommandQueue_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12sdklayers_0000_0006 */ +/* [local] */ + +typedef +enum D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE + { + D3D12_DEBUG_COMMAND_LIST_PARAMETER_GPU_BASED_VALIDATION_SETTINGS = 0 + } D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE; + +typedef struct D3D12_DEBUG_COMMAND_LIST_GPU_BASED_VALIDATION_SETTINGS + { + D3D12_GPU_BASED_VALIDATION_SHADER_PATCH_MODE ShaderPatchMode; + } D3D12_DEBUG_COMMAND_LIST_GPU_BASED_VALIDATION_SETTINGS; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0006_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0006_v0_0_s_ifspec; + +#ifndef __ID3D12DebugCommandList1_INTERFACE_DEFINED__ +#define __ID3D12DebugCommandList1_INTERFACE_DEFINED__ + +/* interface ID3D12DebugCommandList1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12DebugCommandList1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("102ca951-311b-4b01-b11f-ecb83e061b37") + ID3D12DebugCommandList1 : public IUnknown + { + public: + virtual BOOL STDMETHODCALLTYPE AssertResourceState( + _In_ ID3D12Resource *pResource, + UINT Subresource, + UINT State) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDebugParameter( + D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE Type, + _In_reads_bytes_(DataSize) const void *pData, + UINT DataSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDebugParameter( + D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE Type, + _Out_writes_bytes_(DataSize) void *pData, + UINT DataSize) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12DebugCommandList1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12DebugCommandList1 * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12DebugCommandList1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12DebugCommandList1 * This); + + BOOL ( STDMETHODCALLTYPE *AssertResourceState )( + ID3D12DebugCommandList1 * This, + _In_ ID3D12Resource *pResource, + UINT Subresource, + UINT State); + + HRESULT ( STDMETHODCALLTYPE *SetDebugParameter )( + ID3D12DebugCommandList1 * This, + D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE Type, + _In_reads_bytes_(DataSize) const void *pData, + UINT DataSize); + + HRESULT ( STDMETHODCALLTYPE *GetDebugParameter )( + ID3D12DebugCommandList1 * This, + D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE Type, + _Out_writes_bytes_(DataSize) void *pData, + UINT DataSize); + + END_INTERFACE + } ID3D12DebugCommandList1Vtbl; + + interface ID3D12DebugCommandList1 + { + CONST_VTBL struct ID3D12DebugCommandList1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12DebugCommandList1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12DebugCommandList1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12DebugCommandList1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12DebugCommandList1_AssertResourceState(This,pResource,Subresource,State) \ + ( (This)->lpVtbl -> AssertResourceState(This,pResource,Subresource,State) ) + +#define ID3D12DebugCommandList1_SetDebugParameter(This,Type,pData,DataSize) \ + ( (This)->lpVtbl -> SetDebugParameter(This,Type,pData,DataSize) ) + +#define ID3D12DebugCommandList1_GetDebugParameter(This,Type,pData,DataSize) \ + ( (This)->lpVtbl -> GetDebugParameter(This,Type,pData,DataSize) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12DebugCommandList1_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12DebugCommandList_INTERFACE_DEFINED__ +#define __ID3D12DebugCommandList_INTERFACE_DEFINED__ + +/* interface ID3D12DebugCommandList */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12DebugCommandList; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("09e0bf36-54ac-484f-8847-4baeeab6053f") + ID3D12DebugCommandList : public IUnknown + { + public: + virtual BOOL STDMETHODCALLTYPE AssertResourceState( + _In_ ID3D12Resource *pResource, + UINT Subresource, + UINT State) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetFeatureMask( + D3D12_DEBUG_FEATURE Mask) = 0; + + virtual D3D12_DEBUG_FEATURE STDMETHODCALLTYPE GetFeatureMask( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12DebugCommandListVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12DebugCommandList * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12DebugCommandList * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12DebugCommandList * This); + + BOOL ( STDMETHODCALLTYPE *AssertResourceState )( + ID3D12DebugCommandList * This, + _In_ ID3D12Resource *pResource, + UINT Subresource, + UINT State); + + HRESULT ( STDMETHODCALLTYPE *SetFeatureMask )( + ID3D12DebugCommandList * This, + D3D12_DEBUG_FEATURE Mask); + + D3D12_DEBUG_FEATURE ( STDMETHODCALLTYPE *GetFeatureMask )( + ID3D12DebugCommandList * This); + + END_INTERFACE + } ID3D12DebugCommandListVtbl; + + interface ID3D12DebugCommandList + { + CONST_VTBL struct ID3D12DebugCommandListVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12DebugCommandList_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12DebugCommandList_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12DebugCommandList_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12DebugCommandList_AssertResourceState(This,pResource,Subresource,State) \ + ( (This)->lpVtbl -> AssertResourceState(This,pResource,Subresource,State) ) + +#define ID3D12DebugCommandList_SetFeatureMask(This,Mask) \ + ( (This)->lpVtbl -> SetFeatureMask(This,Mask) ) + +#define ID3D12DebugCommandList_GetFeatureMask(This) \ + ( (This)->lpVtbl -> GetFeatureMask(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12DebugCommandList_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12SharingContract_INTERFACE_DEFINED__ +#define __ID3D12SharingContract_INTERFACE_DEFINED__ + +/* interface ID3D12SharingContract */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12SharingContract; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("a251ff70-cdeb-49fa-9bcf-5ebdf4dbaca9") + ID3D12SharingContract : public IUnknown + { + public: + virtual void STDMETHODCALLTYPE Present( + _In_ ID3D12Resource *pResource, + UINT Subresource) = 0; + + virtual void STDMETHODCALLTYPE SharedFenceSignal( + _In_ ID3D12Fence *pFence, + UINT64 FenceValue) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12SharingContractVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12SharingContract * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12SharingContract * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12SharingContract * This); + + void ( STDMETHODCALLTYPE *Present )( + ID3D12SharingContract * This, + _In_ ID3D12Resource *pResource, + UINT Subresource); + + void ( STDMETHODCALLTYPE *SharedFenceSignal )( + ID3D12SharingContract * This, + _In_ ID3D12Fence *pFence, + UINT64 FenceValue); + + END_INTERFACE + } ID3D12SharingContractVtbl; + + interface ID3D12SharingContract + { + CONST_VTBL struct ID3D12SharingContractVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12SharingContract_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12SharingContract_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12SharingContract_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12SharingContract_Present(This,pResource,Subresource) \ + ( (This)->lpVtbl -> Present(This,pResource,Subresource) ) + +#define ID3D12SharingContract_SharedFenceSignal(This,pFence,FenceValue) \ + ( (This)->lpVtbl -> SharedFenceSignal(This,pFence,FenceValue) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12SharingContract_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12sdklayers_0000_0009 */ +/* [local] */ + +typedef +enum D3D12_MESSAGE_CATEGORY + { + D3D12_MESSAGE_CATEGORY_APPLICATION_DEFINED = 0, + D3D12_MESSAGE_CATEGORY_MISCELLANEOUS = ( D3D12_MESSAGE_CATEGORY_APPLICATION_DEFINED + 1 ) , + D3D12_MESSAGE_CATEGORY_INITIALIZATION = ( D3D12_MESSAGE_CATEGORY_MISCELLANEOUS + 1 ) , + D3D12_MESSAGE_CATEGORY_CLEANUP = ( D3D12_MESSAGE_CATEGORY_INITIALIZATION + 1 ) , + D3D12_MESSAGE_CATEGORY_COMPILATION = ( D3D12_MESSAGE_CATEGORY_CLEANUP + 1 ) , + D3D12_MESSAGE_CATEGORY_STATE_CREATION = ( D3D12_MESSAGE_CATEGORY_COMPILATION + 1 ) , + D3D12_MESSAGE_CATEGORY_STATE_SETTING = ( D3D12_MESSAGE_CATEGORY_STATE_CREATION + 1 ) , + D3D12_MESSAGE_CATEGORY_STATE_GETTING = ( D3D12_MESSAGE_CATEGORY_STATE_SETTING + 1 ) , + D3D12_MESSAGE_CATEGORY_RESOURCE_MANIPULATION = ( D3D12_MESSAGE_CATEGORY_STATE_GETTING + 1 ) , + D3D12_MESSAGE_CATEGORY_EXECUTION = ( D3D12_MESSAGE_CATEGORY_RESOURCE_MANIPULATION + 1 ) , + D3D12_MESSAGE_CATEGORY_SHADER = ( D3D12_MESSAGE_CATEGORY_EXECUTION + 1 ) + } D3D12_MESSAGE_CATEGORY; + +typedef +enum D3D12_MESSAGE_SEVERITY + { + D3D12_MESSAGE_SEVERITY_CORRUPTION = 0, + D3D12_MESSAGE_SEVERITY_ERROR = ( D3D12_MESSAGE_SEVERITY_CORRUPTION + 1 ) , + D3D12_MESSAGE_SEVERITY_WARNING = ( D3D12_MESSAGE_SEVERITY_ERROR + 1 ) , + D3D12_MESSAGE_SEVERITY_INFO = ( D3D12_MESSAGE_SEVERITY_WARNING + 1 ) , + D3D12_MESSAGE_SEVERITY_MESSAGE = ( D3D12_MESSAGE_SEVERITY_INFO + 1 ) + } D3D12_MESSAGE_SEVERITY; + +typedef +enum D3D12_MESSAGE_ID + { + D3D12_MESSAGE_ID_UNKNOWN = 0, + D3D12_MESSAGE_ID_STRING_FROM_APPLICATION = ( D3D12_MESSAGE_ID_UNKNOWN + 1 ) , + D3D12_MESSAGE_ID_CORRUPTED_THIS = ( D3D12_MESSAGE_ID_STRING_FROM_APPLICATION + 1 ) , + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER1 = ( D3D12_MESSAGE_ID_CORRUPTED_THIS + 1 ) , + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER2 = ( D3D12_MESSAGE_ID_CORRUPTED_PARAMETER1 + 1 ) , + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER3 = ( D3D12_MESSAGE_ID_CORRUPTED_PARAMETER2 + 1 ) , + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER4 = ( D3D12_MESSAGE_ID_CORRUPTED_PARAMETER3 + 1 ) , + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER5 = ( D3D12_MESSAGE_ID_CORRUPTED_PARAMETER4 + 1 ) , + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER6 = ( D3D12_MESSAGE_ID_CORRUPTED_PARAMETER5 + 1 ) , + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER7 = ( D3D12_MESSAGE_ID_CORRUPTED_PARAMETER6 + 1 ) , + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER8 = ( D3D12_MESSAGE_ID_CORRUPTED_PARAMETER7 + 1 ) , + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER9 = ( D3D12_MESSAGE_ID_CORRUPTED_PARAMETER8 + 1 ) , + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER10 = ( D3D12_MESSAGE_ID_CORRUPTED_PARAMETER9 + 1 ) , + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER11 = ( D3D12_MESSAGE_ID_CORRUPTED_PARAMETER10 + 1 ) , + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER12 = ( D3D12_MESSAGE_ID_CORRUPTED_PARAMETER11 + 1 ) , + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER13 = ( D3D12_MESSAGE_ID_CORRUPTED_PARAMETER12 + 1 ) , + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER14 = ( D3D12_MESSAGE_ID_CORRUPTED_PARAMETER13 + 1 ) , + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER15 = ( D3D12_MESSAGE_ID_CORRUPTED_PARAMETER14 + 1 ) , + D3D12_MESSAGE_ID_CORRUPTED_MULTITHREADING = ( D3D12_MESSAGE_ID_CORRUPTED_PARAMETER15 + 1 ) , + D3D12_MESSAGE_ID_MESSAGE_REPORTING_OUTOFMEMORY = ( D3D12_MESSAGE_ID_CORRUPTED_MULTITHREADING + 1 ) , + D3D12_MESSAGE_ID_GETPRIVATEDATA_MOREDATA = ( D3D12_MESSAGE_ID_MESSAGE_REPORTING_OUTOFMEMORY + 1 ) , + D3D12_MESSAGE_ID_SETPRIVATEDATA_INVALIDFREEDATA = ( D3D12_MESSAGE_ID_GETPRIVATEDATA_MOREDATA + 1 ) , + D3D12_MESSAGE_ID_SETPRIVATEDATA_INVALIDIUNKNOWN = ( D3D12_MESSAGE_ID_SETPRIVATEDATA_INVALIDFREEDATA + 1 ) , + D3D12_MESSAGE_ID_SETPRIVATEDATA_INVALIDFLAGS = ( D3D12_MESSAGE_ID_SETPRIVATEDATA_INVALIDIUNKNOWN + 1 ) , + D3D12_MESSAGE_ID_SETPRIVATEDATA_CHANGINGPARAMS = ( D3D12_MESSAGE_ID_SETPRIVATEDATA_INVALIDFLAGS + 1 ) , + D3D12_MESSAGE_ID_SETPRIVATEDATA_OUTOFMEMORY = ( D3D12_MESSAGE_ID_SETPRIVATEDATA_CHANGINGPARAMS + 1 ) , + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_UNRECOGNIZEDFORMAT = ( D3D12_MESSAGE_ID_SETPRIVATEDATA_OUTOFMEMORY + 1 ) , + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDESC = ( D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_UNRECOGNIZEDFORMAT + 1 ) , + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDFORMAT = ( D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDESC + 1 ) , + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDVIDEOPLANESLICE = ( D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDFORMAT + 1 ) , + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDPLANESLICE = ( D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDVIDEOPLANESLICE + 1 ) , + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDIMENSIONS = ( D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDPLANESLICE + 1 ) , + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDRESOURCE = ( D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDIMENSIONS + 1 ) , + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDARG_RETURN = ( D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDRESOURCE + 1 ) , + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_OUTOFMEMORY_RETURN = ( D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDARG_RETURN + 1 ) , + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_UNRECOGNIZEDFORMAT = ( D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_OUTOFMEMORY_RETURN + 1 ) , + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_UNSUPPORTEDFORMAT = ( D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_UNRECOGNIZEDFORMAT + 1 ) , + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDESC = ( D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_UNSUPPORTEDFORMAT + 1 ) , + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDFORMAT = ( D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDESC + 1 ) , + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDVIDEOPLANESLICE = ( D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDFORMAT + 1 ) , + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDPLANESLICE = ( D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDVIDEOPLANESLICE + 1 ) , + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDIMENSIONS = ( D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDPLANESLICE + 1 ) , + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDRESOURCE = ( D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDIMENSIONS + 1 ) , + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDARG_RETURN = ( D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDRESOURCE + 1 ) , + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_OUTOFMEMORY_RETURN = ( D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDARG_RETURN + 1 ) , + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_UNRECOGNIZEDFORMAT = ( D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_OUTOFMEMORY_RETURN + 1 ) , + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDESC = ( D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_UNRECOGNIZEDFORMAT + 1 ) , + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDFORMAT = ( D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDESC + 1 ) , + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDIMENSIONS = ( D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDFORMAT + 1 ) , + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDRESOURCE = ( D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDIMENSIONS + 1 ) , + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDARG_RETURN = ( D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDRESOURCE + 1 ) , + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_OUTOFMEMORY_RETURN = ( D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDARG_RETURN + 1 ) , + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_OUTOFMEMORY = ( D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_OUTOFMEMORY_RETURN + 1 ) , + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_TOOMANYELEMENTS = ( D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_OUTOFMEMORY + 1 ) , + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDFORMAT = ( D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_TOOMANYELEMENTS + 1 ) , + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INCOMPATIBLEFORMAT = ( D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDFORMAT + 1 ) , + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOT = ( D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INCOMPATIBLEFORMAT + 1 ) , + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDINPUTSLOTCLASS = ( D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOT + 1 ) , + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_STEPRATESLOTCLASSMISMATCH = ( D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDINPUTSLOTCLASS + 1 ) , + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOTCLASSCHANGE = ( D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_STEPRATESLOTCLASSMISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSTEPRATECHANGE = ( D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOTCLASSCHANGE + 1 ) , + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDALIGNMENT = ( D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSTEPRATECHANGE + 1 ) , + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_DUPLICATESEMANTIC = ( D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDALIGNMENT + 1 ) , + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_UNPARSEABLEINPUTSIGNATURE = ( D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_DUPLICATESEMANTIC + 1 ) , + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_NULLSEMANTIC = ( D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_UNPARSEABLEINPUTSIGNATURE + 1 ) , + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_MISSINGELEMENT = ( D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_NULLSEMANTIC + 1 ) , + D3D12_MESSAGE_ID_CREATEVERTEXSHADER_OUTOFMEMORY = ( D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_MISSINGELEMENT + 1 ) , + D3D12_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERBYTECODE = ( D3D12_MESSAGE_ID_CREATEVERTEXSHADER_OUTOFMEMORY + 1 ) , + D3D12_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERTYPE = ( D3D12_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERBYTECODE + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADER_OUTOFMEMORY = ( D3D12_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERTYPE + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERBYTECODE = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADER_OUTOFMEMORY + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERTYPE = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERBYTECODE + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTOFMEMORY = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERTYPE + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERBYTECODE = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTOFMEMORY + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERTYPE = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERBYTECODE + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMENTRIES = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERTYPE + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSTREAMSTRIDEUNUSED = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMENTRIES + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDDECL = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSTREAMSTRIDEUNUSED + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_EXPECTEDDECL = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDDECL + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSLOT0EXPECTED = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_EXPECTEDDECL + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSLOT = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSLOT0EXPECTED + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_ONLYONEELEMENTPERSLOT = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSLOT + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDCOMPONENTCOUNT = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_ONLYONEELEMENTPERSLOT + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTARTCOMPONENTANDCOMPONENTCOUNT = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDCOMPONENTCOUNT + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDGAPDEFINITION = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTARTCOMPONENTANDCOMPONENTCOUNT + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_REPEATEDOUTPUT = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDGAPDEFINITION + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSTREAMSTRIDE = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_REPEATEDOUTPUT + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGSEMANTIC = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSTREAMSTRIDE + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MASKMISMATCH = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGSEMANTIC + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_CANTHAVEONLYGAPS = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MASKMISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DECLTOOCOMPLEX = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_CANTHAVEONLYGAPS + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGOUTPUTSIGNATURE = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DECLTOOCOMPLEX + 1 ) , + D3D12_MESSAGE_ID_CREATEPIXELSHADER_OUTOFMEMORY = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGOUTPUTSIGNATURE + 1 ) , + D3D12_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERBYTECODE = ( D3D12_MESSAGE_ID_CREATEPIXELSHADER_OUTOFMEMORY + 1 ) , + D3D12_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERTYPE = ( D3D12_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERBYTECODE + 1 ) , + D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDFILLMODE = ( D3D12_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERTYPE + 1 ) , + D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDCULLMODE = ( D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDFILLMODE + 1 ) , + D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDDEPTHBIASCLAMP = ( D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDCULLMODE + 1 ) , + D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDSLOPESCALEDDEPTHBIAS = ( D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDDEPTHBIASCLAMP + 1 ) , + D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_NULLDESC = ( D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDSLOPESCALEDDEPTHBIAS + 1 ) , + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHWRITEMASK = ( D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_NULLDESC + 1 ) , + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHFUNC = ( D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHWRITEMASK + 1 ) , + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFAILOP = ( D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHFUNC + 1 ) , + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILZFAILOP = ( D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFAILOP + 1 ) , + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILPASSOP = ( D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILZFAILOP + 1 ) , + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFUNC = ( D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILPASSOP + 1 ) , + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFAILOP = ( D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFUNC + 1 ) , + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILZFAILOP = ( D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFAILOP + 1 ) , + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILPASSOP = ( D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILZFAILOP + 1 ) , + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFUNC = ( D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILPASSOP + 1 ) , + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_NULLDESC = ( D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFUNC + 1 ) , + D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLEND = ( D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_NULLDESC + 1 ) , + D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLEND = ( D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLEND + 1 ) , + D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOP = ( D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLEND + 1 ) , + D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLENDALPHA = ( D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOP + 1 ) , + D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLENDALPHA = ( D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLENDALPHA + 1 ) , + D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOPALPHA = ( D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLENDALPHA + 1 ) , + D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDRENDERTARGETWRITEMASK = ( D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOPALPHA + 1 ) , + D3D12_MESSAGE_ID_CREATEBLENDSTATE_NULLDESC = ( D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDRENDERTARGETWRITEMASK + 1 ) , + D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDFILTER = ( D3D12_MESSAGE_ID_CREATEBLENDSTATE_NULLDESC + 1 ) , + D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSU = ( D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDFILTER + 1 ) , + D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSV = ( D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSU + 1 ) , + D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSW = ( D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSV + 1 ) , + D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMIPLODBIAS = ( D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSW + 1 ) , + D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXANISOTROPY = ( D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMIPLODBIAS + 1 ) , + D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDCOMPARISONFUNC = ( D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXANISOTROPY + 1 ) , + D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMINLOD = ( D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDCOMPARISONFUNC + 1 ) , + D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXLOD = ( D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMINLOD + 1 ) , + D3D12_MESSAGE_ID_CREATESAMPLERSTATE_NULLDESC = ( D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXLOD + 1 ) , + D3D12_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNRECOGNIZED = ( D3D12_MESSAGE_ID_CREATESAMPLERSTATE_NULLDESC + 1 ) , + D3D12_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNDEFINED = ( D3D12_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNRECOGNIZED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_INVALIDVIEWPORT = ( D3D12_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNDEFINED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_INVALIDSCISSOR = ( D3D12_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_INVALIDVIEWPORT + 1 ) , + D3D12_MESSAGE_ID_CLEARRENDERTARGETVIEW_DENORMFLUSH = ( D3D12_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_INVALIDSCISSOR + 1 ) , + D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_DENORMFLUSH = ( D3D12_MESSAGE_ID_CLEARRENDERTARGETVIEW_DENORMFLUSH + 1 ) , + D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_INVALID = ( D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_DENORMFLUSH + 1 ) , + D3D12_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCE = ( D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_INVALID + 1 ) , + D3D12_MESSAGE_ID_COPYRESOURCE_INVALIDDESTINATIONSTATE = ( D3D12_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCE + 1 ) , + D3D12_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCESTATE = ( D3D12_MESSAGE_ID_COPYRESOURCE_INVALIDDESTINATIONSTATE + 1 ) , + D3D12_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSUBRESOURCE = ( D3D12_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCESTATE + 1 ) , + D3D12_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONBOX = ( D3D12_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSUBRESOURCE + 1 ) , + D3D12_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSTATE = ( D3D12_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONBOX + 1 ) , + D3D12_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_INVALID = ( D3D12_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSTATE + 1 ) , + D3D12_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_SUBRESOURCE_INVALID = ( D3D12_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_INVALID + 1 ) , + D3D12_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_INVALID = ( D3D12_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_SUBRESOURCE_INVALID + 1 ) , + D3D12_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_SUBRESOURCE_INVALID = ( D3D12_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_INVALID + 1 ) , + D3D12_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_FORMAT_INVALID = ( D3D12_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_SUBRESOURCE_INVALID + 1 ) , + D3D12_MESSAGE_ID_BUFFER_MAP_INVALIDMAPTYPE = ( D3D12_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_FORMAT_INVALID + 1 ) , + D3D12_MESSAGE_ID_BUFFER_MAP_INVALIDFLAGS = ( D3D12_MESSAGE_ID_BUFFER_MAP_INVALIDMAPTYPE + 1 ) , + D3D12_MESSAGE_ID_BUFFER_MAP_ALREADYMAPPED = ( D3D12_MESSAGE_ID_BUFFER_MAP_INVALIDFLAGS + 1 ) , + D3D12_MESSAGE_ID_BUFFER_MAP_DEVICEREMOVED_RETURN = ( D3D12_MESSAGE_ID_BUFFER_MAP_ALREADYMAPPED + 1 ) , + D3D12_MESSAGE_ID_BUFFER_UNMAP_NOTMAPPED = ( D3D12_MESSAGE_ID_BUFFER_MAP_DEVICEREMOVED_RETURN + 1 ) , + D3D12_MESSAGE_ID_TEXTURE1D_MAP_INVALIDMAPTYPE = ( D3D12_MESSAGE_ID_BUFFER_UNMAP_NOTMAPPED + 1 ) , + D3D12_MESSAGE_ID_TEXTURE1D_MAP_INVALIDSUBRESOURCE = ( D3D12_MESSAGE_ID_TEXTURE1D_MAP_INVALIDMAPTYPE + 1 ) , + D3D12_MESSAGE_ID_TEXTURE1D_MAP_INVALIDFLAGS = ( D3D12_MESSAGE_ID_TEXTURE1D_MAP_INVALIDSUBRESOURCE + 1 ) , + D3D12_MESSAGE_ID_TEXTURE1D_MAP_ALREADYMAPPED = ( D3D12_MESSAGE_ID_TEXTURE1D_MAP_INVALIDFLAGS + 1 ) , + D3D12_MESSAGE_ID_TEXTURE1D_MAP_DEVICEREMOVED_RETURN = ( D3D12_MESSAGE_ID_TEXTURE1D_MAP_ALREADYMAPPED + 1 ) , + D3D12_MESSAGE_ID_TEXTURE1D_UNMAP_INVALIDSUBRESOURCE = ( D3D12_MESSAGE_ID_TEXTURE1D_MAP_DEVICEREMOVED_RETURN + 1 ) , + D3D12_MESSAGE_ID_TEXTURE1D_UNMAP_NOTMAPPED = ( D3D12_MESSAGE_ID_TEXTURE1D_UNMAP_INVALIDSUBRESOURCE + 1 ) , + D3D12_MESSAGE_ID_TEXTURE2D_MAP_INVALIDMAPTYPE = ( D3D12_MESSAGE_ID_TEXTURE1D_UNMAP_NOTMAPPED + 1 ) , + D3D12_MESSAGE_ID_TEXTURE2D_MAP_INVALIDSUBRESOURCE = ( D3D12_MESSAGE_ID_TEXTURE2D_MAP_INVALIDMAPTYPE + 1 ) , + D3D12_MESSAGE_ID_TEXTURE2D_MAP_INVALIDFLAGS = ( D3D12_MESSAGE_ID_TEXTURE2D_MAP_INVALIDSUBRESOURCE + 1 ) , + D3D12_MESSAGE_ID_TEXTURE2D_MAP_ALREADYMAPPED = ( D3D12_MESSAGE_ID_TEXTURE2D_MAP_INVALIDFLAGS + 1 ) , + D3D12_MESSAGE_ID_TEXTURE2D_MAP_DEVICEREMOVED_RETURN = ( D3D12_MESSAGE_ID_TEXTURE2D_MAP_ALREADYMAPPED + 1 ) , + D3D12_MESSAGE_ID_TEXTURE2D_UNMAP_INVALIDSUBRESOURCE = ( D3D12_MESSAGE_ID_TEXTURE2D_MAP_DEVICEREMOVED_RETURN + 1 ) , + D3D12_MESSAGE_ID_TEXTURE2D_UNMAP_NOTMAPPED = ( D3D12_MESSAGE_ID_TEXTURE2D_UNMAP_INVALIDSUBRESOURCE + 1 ) , + D3D12_MESSAGE_ID_TEXTURE3D_MAP_INVALIDMAPTYPE = ( D3D12_MESSAGE_ID_TEXTURE2D_UNMAP_NOTMAPPED + 1 ) , + D3D12_MESSAGE_ID_TEXTURE3D_MAP_INVALIDSUBRESOURCE = ( D3D12_MESSAGE_ID_TEXTURE3D_MAP_INVALIDMAPTYPE + 1 ) , + D3D12_MESSAGE_ID_TEXTURE3D_MAP_INVALIDFLAGS = ( D3D12_MESSAGE_ID_TEXTURE3D_MAP_INVALIDSUBRESOURCE + 1 ) , + D3D12_MESSAGE_ID_TEXTURE3D_MAP_ALREADYMAPPED = ( D3D12_MESSAGE_ID_TEXTURE3D_MAP_INVALIDFLAGS + 1 ) , + D3D12_MESSAGE_ID_TEXTURE3D_MAP_DEVICEREMOVED_RETURN = ( D3D12_MESSAGE_ID_TEXTURE3D_MAP_ALREADYMAPPED + 1 ) , + D3D12_MESSAGE_ID_TEXTURE3D_UNMAP_INVALIDSUBRESOURCE = ( D3D12_MESSAGE_ID_TEXTURE3D_MAP_DEVICEREMOVED_RETURN + 1 ) , + D3D12_MESSAGE_ID_TEXTURE3D_UNMAP_NOTMAPPED = ( D3D12_MESSAGE_ID_TEXTURE3D_UNMAP_INVALIDSUBRESOURCE + 1 ) , + D3D12_MESSAGE_ID_CHECKFORMATSUPPORT_FORMAT_DEPRECATED = ( D3D12_MESSAGE_ID_TEXTURE3D_UNMAP_NOTMAPPED + 1 ) , + D3D12_MESSAGE_ID_CHECKMULTISAMPLEQUALITYLEVELS_FORMAT_DEPRECATED = ( D3D12_MESSAGE_ID_CHECKFORMATSUPPORT_FORMAT_DEPRECATED + 1 ) , + D3D12_MESSAGE_ID_SETEXCEPTIONMODE_UNRECOGNIZEDFLAGS = ( D3D12_MESSAGE_ID_CHECKMULTISAMPLEQUALITYLEVELS_FORMAT_DEPRECATED + 1 ) , + D3D12_MESSAGE_ID_SETEXCEPTIONMODE_INVALIDARG_RETURN = ( D3D12_MESSAGE_ID_SETEXCEPTIONMODE_UNRECOGNIZEDFLAGS + 1 ) , + D3D12_MESSAGE_ID_SETEXCEPTIONMODE_DEVICEREMOVED_RETURN = ( D3D12_MESSAGE_ID_SETEXCEPTIONMODE_INVALIDARG_RETURN + 1 ) , + D3D12_MESSAGE_ID_REF_SIMULATING_INFINITELY_FAST_HARDWARE = ( D3D12_MESSAGE_ID_SETEXCEPTIONMODE_DEVICEREMOVED_RETURN + 1 ) , + D3D12_MESSAGE_ID_REF_THREADING_MODE = ( D3D12_MESSAGE_ID_REF_SIMULATING_INFINITELY_FAST_HARDWARE + 1 ) , + D3D12_MESSAGE_ID_REF_UMDRIVER_EXCEPTION = ( D3D12_MESSAGE_ID_REF_THREADING_MODE + 1 ) , + D3D12_MESSAGE_ID_REF_KMDRIVER_EXCEPTION = ( D3D12_MESSAGE_ID_REF_UMDRIVER_EXCEPTION + 1 ) , + D3D12_MESSAGE_ID_REF_HARDWARE_EXCEPTION = ( D3D12_MESSAGE_ID_REF_KMDRIVER_EXCEPTION + 1 ) , + D3D12_MESSAGE_ID_REF_ACCESSING_INDEXABLE_TEMP_OUT_OF_RANGE = ( D3D12_MESSAGE_ID_REF_HARDWARE_EXCEPTION + 1 ) , + D3D12_MESSAGE_ID_REF_PROBLEM_PARSING_SHADER = ( D3D12_MESSAGE_ID_REF_ACCESSING_INDEXABLE_TEMP_OUT_OF_RANGE + 1 ) , + D3D12_MESSAGE_ID_REF_OUT_OF_MEMORY = ( D3D12_MESSAGE_ID_REF_PROBLEM_PARSING_SHADER + 1 ) , + D3D12_MESSAGE_ID_REF_INFO = ( D3D12_MESSAGE_ID_REF_OUT_OF_MEMORY + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_VERTEXPOS_OVERFLOW = ( D3D12_MESSAGE_ID_REF_INFO + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAWINDEXED_INDEXPOS_OVERFLOW = ( D3D12_MESSAGE_ID_DEVICE_DRAW_VERTEXPOS_OVERFLOW + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAWINSTANCED_VERTEXPOS_OVERFLOW = ( D3D12_MESSAGE_ID_DEVICE_DRAWINDEXED_INDEXPOS_OVERFLOW + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAWINSTANCED_INSTANCEPOS_OVERFLOW = ( D3D12_MESSAGE_ID_DEVICE_DRAWINSTANCED_VERTEXPOS_OVERFLOW + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INSTANCEPOS_OVERFLOW = ( D3D12_MESSAGE_ID_DEVICE_DRAWINSTANCED_INSTANCEPOS_OVERFLOW + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INDEXPOS_OVERFLOW = ( D3D12_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INSTANCEPOS_OVERFLOW + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_VERTEX_SHADER_NOT_SET = ( D3D12_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INDEXPOS_OVERFLOW + 1 ) , + D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND = ( D3D12_MESSAGE_ID_DEVICE_DRAW_VERTEX_SHADER_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERINDEX = ( D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND + 1 ) , + D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_COMPONENTTYPE = ( D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERINDEX + 1 ) , + D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERMASK = ( D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_COMPONENTTYPE + 1 ) , + D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SYSTEMVALUE = ( D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERMASK + 1 ) , + D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_NEVERWRITTEN_ALWAYSREADS = ( D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SYSTEMVALUE + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_ROOT_SIGNATURE_NOT_SET = ( D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_NEVERWRITTEN_ALWAYSREADS + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_ROOT_SIGNATURE_MISMATCH = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_ROOT_SIGNATURE_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_BUFFER_NOT_SET = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_ROOT_SIGNATURE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INPUTLAYOUT_NOT_SET = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_BUFFER_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_CONSTANT_BUFFER_NOT_SET = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INPUTLAYOUT_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_CONSTANT_BUFFER_TOO_SMALL = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_CONSTANT_BUFFER_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_SAMPLER_NOT_SET = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_CONSTANT_BUFFER_TOO_SMALL + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_SHADERRESOURCEVIEW_NOT_SET = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_SAMPLER_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VIEW_DIMENSION_MISMATCH = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_SHADERRESOURCEVIEW_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_BUFFER_STRIDE_TOO_SMALL = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VIEW_DIMENSION_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_BUFFER_TOO_SMALL = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_BUFFER_STRIDE_TOO_SMALL + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INDEX_BUFFER_NOT_SET = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_BUFFER_TOO_SMALL + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INDEX_BUFFER_FORMAT_INVALID = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INDEX_BUFFER_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INDEX_BUFFER_TOO_SMALL = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INDEX_BUFFER_FORMAT_INVALID + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_GS_INPUT_PRIMITIVE_MISMATCH = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INDEX_BUFFER_TOO_SMALL + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RESOURCE_RETURN_TYPE_MISMATCH = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_GS_INPUT_PRIMITIVE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_POSITION_NOT_PRESENT = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RESOURCE_RETURN_TYPE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_OUTPUT_STREAM_NOT_SET = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_POSITION_NOT_PRESENT + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_BOUND_RESOURCE_MAPPED = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_OUTPUT_STREAM_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INVALID_PRIMITIVETOPOLOGY = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_BOUND_RESOURCE_MAPPED + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_OFFSET_UNALIGNED = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INVALID_PRIMITIVETOPOLOGY + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_STRIDE_UNALIGNED = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_OFFSET_UNALIGNED + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INDEX_OFFSET_UNALIGNED = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_STRIDE_UNALIGNED + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_OUTPUT_STREAM_OFFSET_UNALIGNED = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INDEX_OFFSET_UNALIGNED + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RESOURCE_FORMAT_LD_UNSUPPORTED = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_OUTPUT_STREAM_OFFSET_UNALIGNED + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RESOURCE_FORMAT_SAMPLE_UNSUPPORTED = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RESOURCE_FORMAT_LD_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RESOURCE_FORMAT_SAMPLE_C_UNSUPPORTED = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RESOURCE_FORMAT_SAMPLE_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RESOURCE_MULTISAMPLE_UNSUPPORTED = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RESOURCE_FORMAT_SAMPLE_C_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_SO_TARGETS_BOUND_WITHOUT_SOURCE = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RESOURCE_MULTISAMPLE_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_SO_STRIDE_LARGER_THAN_BUFFER = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_SO_TARGETS_BOUND_WITHOUT_SOURCE + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_OM_RENDER_TARGET_DOES_NOT_SUPPORT_BLENDING = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_SO_STRIDE_LARGER_THAN_BUFFER + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_OM_DUAL_SOURCE_BLENDING_CAN_ONLY_HAVE_RENDER_TARGET_0 = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_OM_RENDER_TARGET_DOES_NOT_SUPPORT_BLENDING + 1 ) , + D3D12_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_AT_FAULT = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_OM_DUAL_SOURCE_BLENDING_CAN_ONLY_HAVE_RENDER_TARGET_0 + 1 ) , + D3D12_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_POSSIBLY_AT_FAULT = ( D3D12_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_AT_FAULT + 1 ) , + D3D12_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_NOT_AT_FAULT = ( D3D12_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_POSSIBLY_AT_FAULT + 1 ) , + D3D12_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_INVALIDARG_RETURN = ( D3D12_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_NOT_AT_FAULT + 1 ) , + D3D12_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_OUTOFMEMORY_RETURN = ( D3D12_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_INVALIDARG_RETURN + 1 ) , + D3D12_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_BADINTERFACE_RETURN = ( D3D12_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_OUTOFMEMORY_RETURN + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_VIEWPORT_NOT_SET = ( D3D12_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_BADINTERFACE_RETURN + 1 ) , + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_TRAILING_DIGIT_IN_SEMANTIC = ( D3D12_MESSAGE_ID_DEVICE_DRAW_VIEWPORT_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_TRAILING_DIGIT_IN_SEMANTIC = ( D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_TRAILING_DIGIT_IN_SEMANTIC + 1 ) , + D3D12_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_DENORMFLUSH = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_TRAILING_DIGIT_IN_SEMANTIC + 1 ) , + D3D12_MESSAGE_ID_OMSETRENDERTARGETS_INVALIDVIEW = ( D3D12_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_DENORMFLUSH + 1 ) , + D3D12_MESSAGE_ID_DEVICE_SETTEXTFILTERSIZE_INVALIDDIMENSIONS = ( D3D12_MESSAGE_ID_OMSETRENDERTARGETS_INVALIDVIEW + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_SAMPLER_MISMATCH = ( D3D12_MESSAGE_ID_DEVICE_SETTEXTFILTERSIZE_INVALIDDIMENSIONS + 1 ) , + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_TYPE_MISMATCH = ( D3D12_MESSAGE_ID_DEVICE_DRAW_SAMPLER_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_BLENDSTATE_GETDESC_LEGACY = ( D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_TYPE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_SHADERRESOURCEVIEW_GETDESC_LEGACY = ( D3D12_MESSAGE_ID_BLENDSTATE_GETDESC_LEGACY + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_PS_OUTPUT_TYPE_MISMATCH = ( D3D12_MESSAGE_ID_SHADERRESOURCEVIEW_GETDESC_LEGACY + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_GATHER_UNSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_DRAW_PS_OUTPUT_TYPE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_INVALID_USE_OF_CENTER_MULTISAMPLE_PATTERN = ( D3D12_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_GATHER_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_STRIDE_TOO_LARGE = ( D3D12_MESSAGE_ID_DEVICE_DRAW_INVALID_USE_OF_CENTER_MULTISAMPLE_PATTERN + 1 ) , + D3D12_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_INVALIDRANGE = ( D3D12_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_STRIDE_TOO_LARGE + 1 ) , + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_EMPTY_LAYOUT = ( D3D12_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_INVALIDRANGE + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_RESOURCE_SAMPLE_COUNT_MISMATCH = ( D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_EMPTY_LAYOUT + 1 ) , + D3D12_MESSAGE_ID_LIVE_OBJECT_SUMMARY = ( D3D12_MESSAGE_ID_DEVICE_DRAW_RESOURCE_SAMPLE_COUNT_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_LIVE_BUFFER = ( D3D12_MESSAGE_ID_LIVE_OBJECT_SUMMARY + 1 ) , + D3D12_MESSAGE_ID_LIVE_TEXTURE1D = ( D3D12_MESSAGE_ID_LIVE_BUFFER + 1 ) , + D3D12_MESSAGE_ID_LIVE_TEXTURE2D = ( D3D12_MESSAGE_ID_LIVE_TEXTURE1D + 1 ) , + D3D12_MESSAGE_ID_LIVE_TEXTURE3D = ( D3D12_MESSAGE_ID_LIVE_TEXTURE2D + 1 ) , + D3D12_MESSAGE_ID_LIVE_SHADERRESOURCEVIEW = ( D3D12_MESSAGE_ID_LIVE_TEXTURE3D + 1 ) , + D3D12_MESSAGE_ID_LIVE_RENDERTARGETVIEW = ( D3D12_MESSAGE_ID_LIVE_SHADERRESOURCEVIEW + 1 ) , + D3D12_MESSAGE_ID_LIVE_DEPTHSTENCILVIEW = ( D3D12_MESSAGE_ID_LIVE_RENDERTARGETVIEW + 1 ) , + D3D12_MESSAGE_ID_LIVE_VERTEXSHADER = ( D3D12_MESSAGE_ID_LIVE_DEPTHSTENCILVIEW + 1 ) , + D3D12_MESSAGE_ID_LIVE_GEOMETRYSHADER = ( D3D12_MESSAGE_ID_LIVE_VERTEXSHADER + 1 ) , + D3D12_MESSAGE_ID_LIVE_PIXELSHADER = ( D3D12_MESSAGE_ID_LIVE_GEOMETRYSHADER + 1 ) , + D3D12_MESSAGE_ID_LIVE_INPUTLAYOUT = ( D3D12_MESSAGE_ID_LIVE_PIXELSHADER + 1 ) , + D3D12_MESSAGE_ID_LIVE_SAMPLER = ( D3D12_MESSAGE_ID_LIVE_INPUTLAYOUT + 1 ) , + D3D12_MESSAGE_ID_LIVE_BLENDSTATE = ( D3D12_MESSAGE_ID_LIVE_SAMPLER + 1 ) , + D3D12_MESSAGE_ID_LIVE_DEPTHSTENCILSTATE = ( D3D12_MESSAGE_ID_LIVE_BLENDSTATE + 1 ) , + D3D12_MESSAGE_ID_LIVE_RASTERIZERSTATE = ( D3D12_MESSAGE_ID_LIVE_DEPTHSTENCILSTATE + 1 ) , + D3D12_MESSAGE_ID_LIVE_QUERY = ( D3D12_MESSAGE_ID_LIVE_RASTERIZERSTATE + 1 ) , + D3D12_MESSAGE_ID_LIVE_PREDICATE = ( D3D12_MESSAGE_ID_LIVE_QUERY + 1 ) , + D3D12_MESSAGE_ID_LIVE_COUNTER = ( D3D12_MESSAGE_ID_LIVE_PREDICATE + 1 ) , + D3D12_MESSAGE_ID_LIVE_DEVICE = ( D3D12_MESSAGE_ID_LIVE_COUNTER + 1 ) , + D3D12_MESSAGE_ID_LIVE_SWAPCHAIN = ( D3D12_MESSAGE_ID_LIVE_DEVICE + 1 ) , + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDFLAGS = ( D3D12_MESSAGE_ID_LIVE_SWAPCHAIN + 1 ) , + D3D12_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDCLASSLINKAGE = ( D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDFLAGS + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDCLASSLINKAGE = ( D3D12_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDCLASSLINKAGE + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMSTREAMS = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDCLASSLINKAGE + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTREAMTORASTERIZER = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMSTREAMS + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDSTREAMS = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTREAMTORASTERIZER + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDCLASSLINKAGE = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDSTREAMS + 1 ) , + D3D12_MESSAGE_ID_CREATEPIXELSHADER_INVALIDCLASSLINKAGE = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDCLASSLINKAGE + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTREAM = ( D3D12_MESSAGE_ID_CREATEPIXELSHADER_INVALIDCLASSLINKAGE + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDENTRIES = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTREAM + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDSTRIDES = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDENTRIES + 1 ) , + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMSTRIDES = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDSTRIDES + 1 ) , + D3D12_MESSAGE_ID_CREATEHULLSHADER_INVALIDCALL = ( D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMSTRIDES + 1 ) , + D3D12_MESSAGE_ID_CREATEHULLSHADER_OUTOFMEMORY = ( D3D12_MESSAGE_ID_CREATEHULLSHADER_INVALIDCALL + 1 ) , + D3D12_MESSAGE_ID_CREATEHULLSHADER_INVALIDSHADERBYTECODE = ( D3D12_MESSAGE_ID_CREATEHULLSHADER_OUTOFMEMORY + 1 ) , + D3D12_MESSAGE_ID_CREATEHULLSHADER_INVALIDSHADERTYPE = ( D3D12_MESSAGE_ID_CREATEHULLSHADER_INVALIDSHADERBYTECODE + 1 ) , + D3D12_MESSAGE_ID_CREATEHULLSHADER_INVALIDCLASSLINKAGE = ( D3D12_MESSAGE_ID_CREATEHULLSHADER_INVALIDSHADERTYPE + 1 ) , + D3D12_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDCALL = ( D3D12_MESSAGE_ID_CREATEHULLSHADER_INVALIDCLASSLINKAGE + 1 ) , + D3D12_MESSAGE_ID_CREATEDOMAINSHADER_OUTOFMEMORY = ( D3D12_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDCALL + 1 ) , + D3D12_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDSHADERBYTECODE = ( D3D12_MESSAGE_ID_CREATEDOMAINSHADER_OUTOFMEMORY + 1 ) , + D3D12_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDSHADERTYPE = ( D3D12_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDSHADERBYTECODE + 1 ) , + D3D12_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDCLASSLINKAGE = ( D3D12_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDSHADERTYPE + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_HS_XOR_DS_MISMATCH = ( D3D12_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDCLASSLINKAGE + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAWINDIRECT_INVALID_ARG_BUFFER = ( D3D12_MESSAGE_ID_DEVICE_DRAW_HS_XOR_DS_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAWINDIRECT_OFFSET_UNALIGNED = ( D3D12_MESSAGE_ID_DEVICE_DRAWINDIRECT_INVALID_ARG_BUFFER + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAWINDIRECT_OFFSET_OVERFLOW = ( D3D12_MESSAGE_ID_DEVICE_DRAWINDIRECT_OFFSET_UNALIGNED + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_MAP_INVALIDMAPTYPE = ( D3D12_MESSAGE_ID_DEVICE_DRAWINDIRECT_OFFSET_OVERFLOW + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_MAP_INVALIDSUBRESOURCE = ( D3D12_MESSAGE_ID_RESOURCE_MAP_INVALIDMAPTYPE + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_MAP_INVALIDFLAGS = ( D3D12_MESSAGE_ID_RESOURCE_MAP_INVALIDSUBRESOURCE + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_MAP_ALREADYMAPPED = ( D3D12_MESSAGE_ID_RESOURCE_MAP_INVALIDFLAGS + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_MAP_DEVICEREMOVED_RETURN = ( D3D12_MESSAGE_ID_RESOURCE_MAP_ALREADYMAPPED + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_MAP_OUTOFMEMORY_RETURN = ( D3D12_MESSAGE_ID_RESOURCE_MAP_DEVICEREMOVED_RETURN + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_MAP_WITHOUT_INITIAL_DISCARD = ( D3D12_MESSAGE_ID_RESOURCE_MAP_OUTOFMEMORY_RETURN + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_UNMAP_INVALIDSUBRESOURCE = ( D3D12_MESSAGE_ID_RESOURCE_MAP_WITHOUT_INITIAL_DISCARD + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_UNMAP_NOTMAPPED = ( D3D12_MESSAGE_ID_RESOURCE_UNMAP_INVALIDSUBRESOURCE + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_RASTERIZING_CONTROL_POINTS = ( D3D12_MESSAGE_ID_RESOURCE_UNMAP_NOTMAPPED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_DRAW_RASTERIZING_CONTROL_POINTS + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_HS_DS_SIGNATURE_MISMATCH = ( D3D12_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_HULL_SHADER_INPUT_TOPOLOGY_MISMATCH = ( D3D12_MESSAGE_ID_DEVICE_DRAW_HS_DS_SIGNATURE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_HS_DS_CONTROL_POINT_COUNT_MISMATCH = ( D3D12_MESSAGE_ID_DEVICE_DRAW_HULL_SHADER_INPUT_TOPOLOGY_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_HS_DS_TESSELLATOR_DOMAIN_MISMATCH = ( D3D12_MESSAGE_ID_DEVICE_DRAW_HS_DS_CONTROL_POINT_COUNT_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CHECKFEATURESUPPORT_UNRECOGNIZED_FEATURE = ( D3D12_MESSAGE_ID_DEVICE_DRAW_HS_DS_TESSELLATOR_DOMAIN_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CHECKFEATURESUPPORT_MISMATCHED_DATA_SIZE = ( D3D12_MESSAGE_ID_DEVICE_CHECKFEATURESUPPORT_UNRECOGNIZED_FEATURE + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CHECKFEATURESUPPORT_INVALIDARG_RETURN = ( D3D12_MESSAGE_ID_DEVICE_CHECKFEATURESUPPORT_MISMATCHED_DATA_SIZE + 1 ) , + D3D12_MESSAGE_ID_CREATECOMPUTESHADER_INVALIDCALL = ( D3D12_MESSAGE_ID_DEVICE_CHECKFEATURESUPPORT_INVALIDARG_RETURN + 1 ) , + D3D12_MESSAGE_ID_CREATECOMPUTESHADER_OUTOFMEMORY = ( D3D12_MESSAGE_ID_CREATECOMPUTESHADER_INVALIDCALL + 1 ) , + D3D12_MESSAGE_ID_CREATECOMPUTESHADER_INVALIDSHADERBYTECODE = ( D3D12_MESSAGE_ID_CREATECOMPUTESHADER_OUTOFMEMORY + 1 ) , + D3D12_MESSAGE_ID_CREATECOMPUTESHADER_INVALIDCLASSLINKAGE = ( D3D12_MESSAGE_ID_CREATECOMPUTESHADER_INVALIDSHADERBYTECODE + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CSSETSHADERRESOURCES_VIEWS_EMPTY = ( D3D12_MESSAGE_ID_CREATECOMPUTESHADER_INVALIDCLASSLINKAGE + 1 ) , + D3D12_MESSAGE_ID_CSSETCONSTANTBUFFERS_INVALIDBUFFER = ( D3D12_MESSAGE_ID_DEVICE_CSSETSHADERRESOURCES_VIEWS_EMPTY + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CSSETCONSTANTBUFFERS_BUFFERS_EMPTY = ( D3D12_MESSAGE_ID_CSSETCONSTANTBUFFERS_INVALIDBUFFER + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CSSETSAMPLERS_SAMPLERS_EMPTY = ( D3D12_MESSAGE_ID_DEVICE_CSSETCONSTANTBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CSGETSHADERRESOURCES_VIEWS_EMPTY = ( D3D12_MESSAGE_ID_DEVICE_CSSETSAMPLERS_SAMPLERS_EMPTY + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CSGETCONSTANTBUFFERS_BUFFERS_EMPTY = ( D3D12_MESSAGE_ID_DEVICE_CSGETSHADERRESOURCES_VIEWS_EMPTY + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CSGETSAMPLERS_SAMPLERS_EMPTY = ( D3D12_MESSAGE_ID_DEVICE_CSGETCONSTANTBUFFERS_BUFFERS_EMPTY + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_DOUBLEFLOATOPSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CSGETSAMPLERS_SAMPLERS_EMPTY + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEHULLSHADER_DOUBLEFLOATOPSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_DOUBLEFLOATOPSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_DOUBLEFLOATOPSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEHULLSHADER_DOUBLEFLOATOPSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_DOUBLEFLOATOPSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_DOUBLEFLOATOPSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DOUBLEFLOATOPSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_DOUBLEFLOATOPSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_DOUBLEFLOATOPSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DOUBLEFLOATOPSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_DOUBLEFLOATOPSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_DOUBLEFLOATOPSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_CREATEBUFFER_INVALIDSTRUCTURESTRIDE = ( D3D12_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_DOUBLEFLOATOPSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDFLAGS = ( D3D12_MESSAGE_ID_CREATEBUFFER_INVALIDSTRUCTURESTRIDE + 1 ) , + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDRESOURCE = ( D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDFLAGS + 1 ) , + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDDESC = ( D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDRESOURCE + 1 ) , + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDFORMAT = ( D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDDESC + 1 ) , + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDVIDEOPLANESLICE = ( D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDFORMAT + 1 ) , + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDPLANESLICE = ( D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDVIDEOPLANESLICE + 1 ) , + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDDIMENSIONS = ( D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDPLANESLICE + 1 ) , + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_UNRECOGNIZEDFORMAT = ( D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDDIMENSIONS + 1 ) , + D3D12_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_OVERLAPPING_OLD_SLOTS = ( D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_UNRECOGNIZEDFORMAT + 1 ) , + D3D12_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_NO_OP = ( D3D12_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_OVERLAPPING_OLD_SLOTS + 1 ) , + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDARG_RETURN = ( D3D12_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_NO_OP + 1 ) , + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_OUTOFMEMORY_RETURN = ( D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDARG_RETURN + 1 ) , + D3D12_MESSAGE_ID_CLEARUNORDEREDACCESSVIEW_DENORMFLUSH = ( D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_OUTOFMEMORY_RETURN + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CSSETUNORDEREDACCESSS_VIEWS_EMPTY = ( D3D12_MESSAGE_ID_CLEARUNORDEREDACCESSVIEW_DENORMFLUSH + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CSGETUNORDEREDACCESSS_VIEWS_EMPTY = ( D3D12_MESSAGE_ID_DEVICE_CSSETUNORDEREDACCESSS_VIEWS_EMPTY + 1 ) , + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDFLAGS = ( D3D12_MESSAGE_ID_DEVICE_CSGETUNORDEREDACCESSS_VIEWS_EMPTY + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_INVALID_ARG_BUFFER = ( D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDFLAGS + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_OFFSET_UNALIGNED = ( D3D12_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_INVALID_ARG_BUFFER + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_OFFSET_OVERFLOW = ( D3D12_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_OFFSET_UNALIGNED + 1 ) , + D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_DEPTH_READONLY = ( D3D12_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_OFFSET_OVERFLOW + 1 ) , + D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_STENCIL_READONLY = ( D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_DEPTH_READONLY + 1 ) , + D3D12_MESSAGE_ID_CHECKFEATURESUPPORT_FORMAT_DEPRECATED = ( D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_STENCIL_READONLY + 1 ) , + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_RETURN_TYPE_MISMATCH = ( D3D12_MESSAGE_ID_CHECKFEATURESUPPORT_FORMAT_DEPRECATED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_NOT_SET = ( D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_RETURN_TYPE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_UNORDEREDACCESSVIEW_RENDERTARGETVIEW_OVERLAP = ( D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_DIMENSION_MISMATCH = ( D3D12_MESSAGE_ID_DEVICE_DRAW_UNORDEREDACCESSVIEW_RENDERTARGETVIEW_OVERLAP + 1 ) , + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_APPEND_UNSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_DIMENSION_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMICS_UNSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_APPEND_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_STRUCTURE_STRIDE_MISMATCH = ( D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMICS_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_BUFFER_TYPE_MISMATCH = ( D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_STRUCTURE_STRIDE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_RAW_UNSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_BUFFER_TYPE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_FORMAT_LD_UNSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_RAW_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_FORMAT_STORE_UNSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_FORMAT_LD_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_ADD_UNSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_FORMAT_STORE_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_BITWISE_OPS_UNSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_ADD_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_CMPSTORE_CMPEXCHANGE_UNSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_BITWISE_OPS_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_EXCHANGE_UNSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_CMPSTORE_CMPEXCHANGE_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_SIGNED_MINMAX_UNSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_EXCHANGE_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_UNSIGNED_MINMAX_UNSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_SIGNED_MINMAX_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DISPATCH_BOUND_RESOURCE_MAPPED = ( D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_UNSIGNED_MINMAX_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DISPATCH_THREADGROUPCOUNT_OVERFLOW = ( D3D12_MESSAGE_ID_DEVICE_DISPATCH_BOUND_RESOURCE_MAPPED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DISPATCH_THREADGROUPCOUNT_ZERO = ( D3D12_MESSAGE_ID_DEVICE_DISPATCH_THREADGROUPCOUNT_OVERFLOW + 1 ) , + D3D12_MESSAGE_ID_DEVICE_SHADERRESOURCEVIEW_STRUCTURE_STRIDE_MISMATCH = ( D3D12_MESSAGE_ID_DEVICE_DISPATCH_THREADGROUPCOUNT_ZERO + 1 ) , + D3D12_MESSAGE_ID_DEVICE_SHADERRESOURCEVIEW_BUFFER_TYPE_MISMATCH = ( D3D12_MESSAGE_ID_DEVICE_SHADERRESOURCEVIEW_STRUCTURE_STRIDE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_DEVICE_SHADERRESOURCEVIEW_RAW_UNSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_SHADERRESOURCEVIEW_BUFFER_TYPE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DISPATCH_UNSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_SHADERRESOURCEVIEW_RAW_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_UNSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_DISPATCH_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_COPYSTRUCTURECOUNT_INVALIDOFFSET = ( D3D12_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_COPYSTRUCTURECOUNT_LARGEOFFSET = ( D3D12_MESSAGE_ID_COPYSTRUCTURECOUNT_INVALIDOFFSET + 1 ) , + D3D12_MESSAGE_ID_COPYSTRUCTURECOUNT_INVALIDDESTINATIONSTATE = ( D3D12_MESSAGE_ID_COPYSTRUCTURECOUNT_LARGEOFFSET + 1 ) , + D3D12_MESSAGE_ID_COPYSTRUCTURECOUNT_INVALIDSOURCESTATE = ( D3D12_MESSAGE_ID_COPYSTRUCTURECOUNT_INVALIDDESTINATIONSTATE + 1 ) , + D3D12_MESSAGE_ID_CHECKFORMATSUPPORT_FORMAT_NOT_SUPPORTED = ( D3D12_MESSAGE_ID_COPYSTRUCTURECOUNT_INVALIDSOURCESTATE + 1 ) , + D3D12_MESSAGE_ID_CLEARUNORDEREDACCESSVIEWFLOAT_INVALIDFORMAT = ( D3D12_MESSAGE_ID_CHECKFORMATSUPPORT_FORMAT_NOT_SUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_COUNTER_UNSUPPORTED = ( D3D12_MESSAGE_ID_CLEARUNORDEREDACCESSVIEWFLOAT_INVALIDFORMAT + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_PIXEL_SHADER_WITHOUT_RTV_OR_DSV = ( D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_COUNTER_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_SHADER_ABORT = ( D3D12_MESSAGE_ID_DEVICE_DRAW_PIXEL_SHADER_WITHOUT_RTV_OR_DSV + 1 ) , + D3D12_MESSAGE_ID_SHADER_MESSAGE = ( D3D12_MESSAGE_ID_SHADER_ABORT + 1 ) , + D3D12_MESSAGE_ID_SHADER_ERROR = ( D3D12_MESSAGE_ID_SHADER_MESSAGE + 1 ) , + D3D12_MESSAGE_ID_OFFERRESOURCES_INVALIDRESOURCE = ( D3D12_MESSAGE_ID_SHADER_ERROR + 1 ) , + D3D12_MESSAGE_ID_ENQUEUESETEVENT_INVALIDARG_RETURN = ( D3D12_MESSAGE_ID_OFFERRESOURCES_INVALIDRESOURCE + 1 ) , + D3D12_MESSAGE_ID_ENQUEUESETEVENT_OUTOFMEMORY_RETURN = ( D3D12_MESSAGE_ID_ENQUEUESETEVENT_INVALIDARG_RETURN + 1 ) , + D3D12_MESSAGE_ID_ENQUEUESETEVENT_ACCESSDENIED_RETURN = ( D3D12_MESSAGE_ID_ENQUEUESETEVENT_OUTOFMEMORY_RETURN + 1 ) , + D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDFORCEDSAMPLECOUNT = ( D3D12_MESSAGE_ID_ENQUEUESETEVENT_ACCESSDENIED_RETURN + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_INVALID_USE_OF_FORCED_SAMPLE_COUNT = ( D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDFORCEDSAMPLECOUNT + 1 ) , + D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDLOGICOPS = ( D3D12_MESSAGE_ID_DEVICE_DRAW_INVALID_USE_OF_FORCED_SAMPLE_COUNT + 1 ) , + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDARRAYWITHDECODER = ( D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDLOGICOPS + 1 ) , + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDARRAYWITHDECODER = ( D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDARRAYWITHDECODER + 1 ) , + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDARRAYWITHDECODER = ( D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDARRAYWITHDECODER + 1 ) , + D3D12_MESSAGE_ID_DEVICE_LOCKEDOUT_INTERFACE = ( D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDARRAYWITHDECODER + 1 ) , + D3D12_MESSAGE_ID_OFFERRESOURCES_INVALIDPRIORITY = ( D3D12_MESSAGE_ID_DEVICE_LOCKEDOUT_INTERFACE + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CLEARVIEW_INVALIDVIEW = ( D3D12_MESSAGE_ID_OFFERRESOURCES_INVALIDPRIORITY + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CLEARVIEW_INVALIDVIEW + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_SHADEREXTENSIONSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_DOUBLEEXTENSIONSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEHULLSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_SHADEREXTENSIONSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEHULLSHADER_SHADEREXTENSIONSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEHULLSHADER_DOUBLEEXTENSIONSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEHULLSHADER_SHADEREXTENSIONSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_SHADEREXTENSIONSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_DOUBLEEXTENSIONSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_SHADEREXTENSIONSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_SHADEREXTENSIONSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_DOUBLEEXTENSIONSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DOUBLEEXTENSIONSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_SHADEREXTENSIONSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_SHADEREXTENSIONSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DOUBLEEXTENSIONSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_SHADEREXTENSIONSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_SHADEREXTENSIONSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_DOUBLEEXTENSIONSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_DOUBLEEXTENSIONSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_SHADEREXTENSIONSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_SHADEREXTENSIONSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_DOUBLEEXTENSIONSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_MINPRECISION = ( D3D12_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_SHADEREXTENSIONSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_UAVSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_MINPRECISION + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEHULLSHADER_UAVSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_UAVSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_UAVSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEHULLSHADER_UAVSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_UAVSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_UAVSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UAVSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_UAVSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_UAVSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UAVSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_UAVSNOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_UAVSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_INVALIDOFFSET = ( D3D12_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_UAVSNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_TOOMANYVIEWS = ( D3D12_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_INVALIDOFFSET + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CLEARVIEW_NOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_TOOMANYVIEWS + 1 ) , + D3D12_MESSAGE_ID_SWAPDEVICECONTEXTSTATE_NOTSUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_CLEARVIEW_NOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_UPDATESUBRESOURCE_PREFERUPDATESUBRESOURCE1 = ( D3D12_MESSAGE_ID_SWAPDEVICECONTEXTSTATE_NOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_GETDC_INACCESSIBLE = ( D3D12_MESSAGE_ID_UPDATESUBRESOURCE_PREFERUPDATESUBRESOURCE1 + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CLEARVIEW_INVALIDRECT = ( D3D12_MESSAGE_ID_GETDC_INACCESSIBLE + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_SAMPLE_MASK_IGNORED_ON_FL9 = ( D3D12_MESSAGE_ID_DEVICE_CLEARVIEW_INVALIDRECT + 1 ) , + D3D12_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE1_NOT_SUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_DRAW_SAMPLE_MASK_IGNORED_ON_FL9 + 1 ) , + D3D12_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_BY_NAME_NOT_SUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE1_NOT_SUPPORTED + 1 ) , + D3D12_MESSAGE_ID_ENQUEUESETEVENT_NOT_SUPPORTED = ( D3D12_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_BY_NAME_NOT_SUPPORTED + 1 ) , + D3D12_MESSAGE_ID_OFFERRELEASE_NOT_SUPPORTED = ( D3D12_MESSAGE_ID_ENQUEUESETEVENT_NOT_SUPPORTED + 1 ) , + D3D12_MESSAGE_ID_OFFERRESOURCES_INACCESSIBLE = ( D3D12_MESSAGE_ID_OFFERRELEASE_NOT_SUPPORTED + 1 ) , + D3D12_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDMSAA = ( D3D12_MESSAGE_ID_OFFERRESOURCES_INACCESSIBLE + 1 ) , + D3D12_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_INVALIDMSAA = ( D3D12_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDMSAA + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CLEARVIEW_INVALIDSOURCERECT = ( D3D12_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_INVALIDMSAA + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CLEARVIEW_EMPTYRECT = ( D3D12_MESSAGE_ID_DEVICE_CLEARVIEW_INVALIDSOURCERECT + 1 ) , + D3D12_MESSAGE_ID_UPDATESUBRESOURCE_EMPTYDESTBOX = ( D3D12_MESSAGE_ID_DEVICE_CLEARVIEW_EMPTYRECT + 1 ) , + D3D12_MESSAGE_ID_COPYSUBRESOURCEREGION_EMPTYSOURCEBOX = ( D3D12_MESSAGE_ID_UPDATESUBRESOURCE_EMPTYDESTBOX + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_OM_RENDER_TARGET_DOES_NOT_SUPPORT_LOGIC_OPS = ( D3D12_MESSAGE_ID_COPYSUBRESOURCEREGION_EMPTYSOURCEBOX + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_DEPTHSTENCILVIEW_NOT_SET = ( D3D12_MESSAGE_ID_DEVICE_DRAW_OM_RENDER_TARGET_DOES_NOT_SUPPORT_LOGIC_OPS + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_RENDERTARGETVIEW_NOT_SET = ( D3D12_MESSAGE_ID_DEVICE_DRAW_DEPTHSTENCILVIEW_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_RENDERTARGETVIEW_NOT_SET_DUE_TO_FLIP_PRESENT = ( D3D12_MESSAGE_ID_DEVICE_DRAW_RENDERTARGETVIEW_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_NOT_SET_DUE_TO_FLIP_PRESENT = ( D3D12_MESSAGE_ID_DEVICE_DRAW_RENDERTARGETVIEW_NOT_SET_DUE_TO_FLIP_PRESENT + 1 ) , + D3D12_MESSAGE_ID_GETDATAFORNEWHARDWAREKEY_NULLPARAM = ( D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_NOT_SET_DUE_TO_FLIP_PRESENT + 1 ) , + D3D12_MESSAGE_ID_CHECKCRYPTOSESSIONSTATUS_NULLPARAM = ( D3D12_MESSAGE_ID_GETDATAFORNEWHARDWAREKEY_NULLPARAM + 1 ) , + D3D12_MESSAGE_ID_SETEVENTONHARDWARECONTENTPROTECTIONTILT_NULLPARAM = ( D3D12_MESSAGE_ID_CHECKCRYPTOSESSIONSTATUS_NULLPARAM + 1 ) , + D3D12_MESSAGE_ID_GETVIDEODECODERCAPS_NULLPARAM = ( D3D12_MESSAGE_ID_SETEVENTONHARDWARECONTENTPROTECTIONTILT_NULLPARAM + 1 ) , + D3D12_MESSAGE_ID_GETVIDEODECODERCAPS_ZEROWIDTHHEIGHT = ( D3D12_MESSAGE_ID_GETVIDEODECODERCAPS_NULLPARAM + 1 ) , + D3D12_MESSAGE_ID_CHECKVIDEODECODERDOWNSAMPLING_NULLPARAM = ( D3D12_MESSAGE_ID_GETVIDEODECODERCAPS_ZEROWIDTHHEIGHT + 1 ) , + D3D12_MESSAGE_ID_CHECKVIDEODECODERDOWNSAMPLING_INVALIDCOLORSPACE = ( D3D12_MESSAGE_ID_CHECKVIDEODECODERDOWNSAMPLING_NULLPARAM + 1 ) , + D3D12_MESSAGE_ID_CHECKVIDEODECODERDOWNSAMPLING_ZEROWIDTHHEIGHT = ( D3D12_MESSAGE_ID_CHECKVIDEODECODERDOWNSAMPLING_INVALIDCOLORSPACE + 1 ) , + D3D12_MESSAGE_ID_VIDEODECODERENABLEDOWNSAMPLING_NULLPARAM = ( D3D12_MESSAGE_ID_CHECKVIDEODECODERDOWNSAMPLING_ZEROWIDTHHEIGHT + 1 ) , + D3D12_MESSAGE_ID_VIDEODECODERENABLEDOWNSAMPLING_UNSUPPORTED = ( D3D12_MESSAGE_ID_VIDEODECODERENABLEDOWNSAMPLING_NULLPARAM + 1 ) , + D3D12_MESSAGE_ID_VIDEODECODERUPDATEDOWNSAMPLING_NULLPARAM = ( D3D12_MESSAGE_ID_VIDEODECODERENABLEDOWNSAMPLING_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_VIDEODECODERUPDATEDOWNSAMPLING_UNSUPPORTED = ( D3D12_MESSAGE_ID_VIDEODECODERUPDATEDOWNSAMPLING_NULLPARAM + 1 ) , + D3D12_MESSAGE_ID_CHECKVIDEOPROCESSORFORMATCONVERSION_NULLPARAM = ( D3D12_MESSAGE_ID_VIDEODECODERUPDATEDOWNSAMPLING_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTCOLORSPACE1_NULLPARAM = ( D3D12_MESSAGE_ID_CHECKVIDEOPROCESSORFORMATCONVERSION_NULLPARAM + 1 ) , + D3D12_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTCOLORSPACE1_NULLPARAM = ( D3D12_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTCOLORSPACE1_NULLPARAM + 1 ) , + D3D12_MESSAGE_ID_VIDEOPROCESSORSETSTREAMCOLORSPACE1_NULLPARAM = ( D3D12_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTCOLORSPACE1_NULLPARAM + 1 ) , + D3D12_MESSAGE_ID_VIDEOPROCESSORSETSTREAMCOLORSPACE1_INVALIDSTREAM = ( D3D12_MESSAGE_ID_VIDEOPROCESSORSETSTREAMCOLORSPACE1_NULLPARAM + 1 ) , + D3D12_MESSAGE_ID_VIDEOPROCESSORSETSTREAMMIRROR_NULLPARAM = ( D3D12_MESSAGE_ID_VIDEOPROCESSORSETSTREAMCOLORSPACE1_INVALIDSTREAM + 1 ) , + D3D12_MESSAGE_ID_VIDEOPROCESSORSETSTREAMMIRROR_INVALIDSTREAM = ( D3D12_MESSAGE_ID_VIDEOPROCESSORSETSTREAMMIRROR_NULLPARAM + 1 ) , + D3D12_MESSAGE_ID_VIDEOPROCESSORSETSTREAMMIRROR_UNSUPPORTED = ( D3D12_MESSAGE_ID_VIDEOPROCESSORSETSTREAMMIRROR_INVALIDSTREAM + 1 ) , + D3D12_MESSAGE_ID_VIDEOPROCESSORGETSTREAMCOLORSPACE1_NULLPARAM = ( D3D12_MESSAGE_ID_VIDEOPROCESSORSETSTREAMMIRROR_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_VIDEOPROCESSORGETSTREAMMIRROR_NULLPARAM = ( D3D12_MESSAGE_ID_VIDEOPROCESSORGETSTREAMCOLORSPACE1_NULLPARAM + 1 ) , + D3D12_MESSAGE_ID_RECOMMENDVIDEODECODERDOWNSAMPLING_NULLPARAM = ( D3D12_MESSAGE_ID_VIDEOPROCESSORGETSTREAMMIRROR_NULLPARAM + 1 ) , + D3D12_MESSAGE_ID_RECOMMENDVIDEODECODERDOWNSAMPLING_INVALIDCOLORSPACE = ( D3D12_MESSAGE_ID_RECOMMENDVIDEODECODERDOWNSAMPLING_NULLPARAM + 1 ) , + D3D12_MESSAGE_ID_RECOMMENDVIDEODECODERDOWNSAMPLING_ZEROWIDTHHEIGHT = ( D3D12_MESSAGE_ID_RECOMMENDVIDEODECODERDOWNSAMPLING_INVALIDCOLORSPACE + 1 ) , + D3D12_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTSHADERUSAGE_NULLPARAM = ( D3D12_MESSAGE_ID_RECOMMENDVIDEODECODERDOWNSAMPLING_ZEROWIDTHHEIGHT + 1 ) , + D3D12_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTSHADERUSAGE_NULLPARAM = ( D3D12_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTSHADERUSAGE_NULLPARAM + 1 ) , + D3D12_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_NULLPARAM = ( D3D12_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTSHADERUSAGE_NULLPARAM + 1 ) , + D3D12_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_INVALIDSTREAMCOUNT = ( D3D12_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_NULLPARAM + 1 ) , + D3D12_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_TARGETRECT = ( D3D12_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_INVALIDSTREAMCOUNT + 1 ) , + D3D12_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_INVALIDSOURCERECT = ( D3D12_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_TARGETRECT + 1 ) , + D3D12_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_INVALIDDESTRECT = ( D3D12_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_INVALIDSOURCERECT + 1 ) , + D3D12_MESSAGE_ID_CREATEBUFFER_INVALIDUSAGE = ( D3D12_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_INVALIDDESTRECT + 1 ) , + D3D12_MESSAGE_ID_CREATETEXTURE1D_INVALIDUSAGE = ( D3D12_MESSAGE_ID_CREATEBUFFER_INVALIDUSAGE + 1 ) , + D3D12_MESSAGE_ID_CREATETEXTURE2D_INVALIDUSAGE = ( D3D12_MESSAGE_ID_CREATETEXTURE1D_INVALIDUSAGE + 1 ) , + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_LEVEL9_STEPRATE_NOT_1 = ( D3D12_MESSAGE_ID_CREATETEXTURE2D_INVALIDUSAGE + 1 ) , + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_LEVEL9_INSTANCING_NOT_SUPPORTED = ( D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_LEVEL9_STEPRATE_NOT_1 + 1 ) , + D3D12_MESSAGE_ID_UPDATETILEMAPPINGS_INVALID_PARAMETER = ( D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_LEVEL9_INSTANCING_NOT_SUPPORTED + 1 ) , + D3D12_MESSAGE_ID_COPYTILEMAPPINGS_INVALID_PARAMETER = ( D3D12_MESSAGE_ID_UPDATETILEMAPPINGS_INVALID_PARAMETER + 1 ) , + D3D12_MESSAGE_ID_COPYTILES_INVALID_PARAMETER = ( D3D12_MESSAGE_ID_COPYTILEMAPPINGS_INVALID_PARAMETER + 1 ) , + D3D12_MESSAGE_ID_NULL_TILE_MAPPING_ACCESS_WARNING = ( D3D12_MESSAGE_ID_COPYTILES_INVALID_PARAMETER + 1 ) , + D3D12_MESSAGE_ID_NULL_TILE_MAPPING_ACCESS_ERROR = ( D3D12_MESSAGE_ID_NULL_TILE_MAPPING_ACCESS_WARNING + 1 ) , + D3D12_MESSAGE_ID_DIRTY_TILE_MAPPING_ACCESS = ( D3D12_MESSAGE_ID_NULL_TILE_MAPPING_ACCESS_ERROR + 1 ) , + D3D12_MESSAGE_ID_DUPLICATE_TILE_MAPPINGS_IN_COVERED_AREA = ( D3D12_MESSAGE_ID_DIRTY_TILE_MAPPING_ACCESS + 1 ) , + D3D12_MESSAGE_ID_TILE_MAPPINGS_IN_COVERED_AREA_DUPLICATED_OUTSIDE = ( D3D12_MESSAGE_ID_DUPLICATE_TILE_MAPPINGS_IN_COVERED_AREA + 1 ) , + D3D12_MESSAGE_ID_TILE_MAPPINGS_SHARED_BETWEEN_INCOMPATIBLE_RESOURCES = ( D3D12_MESSAGE_ID_TILE_MAPPINGS_IN_COVERED_AREA_DUPLICATED_OUTSIDE + 1 ) , + D3D12_MESSAGE_ID_TILE_MAPPINGS_SHARED_BETWEEN_INPUT_AND_OUTPUT = ( D3D12_MESSAGE_ID_TILE_MAPPINGS_SHARED_BETWEEN_INCOMPATIBLE_RESOURCES + 1 ) , + D3D12_MESSAGE_ID_CHECKMULTISAMPLEQUALITYLEVELS_INVALIDFLAGS = ( D3D12_MESSAGE_ID_TILE_MAPPINGS_SHARED_BETWEEN_INPUT_AND_OUTPUT + 1 ) , + D3D12_MESSAGE_ID_GETRESOURCETILING_NONTILED_RESOURCE = ( D3D12_MESSAGE_ID_CHECKMULTISAMPLEQUALITYLEVELS_INVALIDFLAGS + 1 ) , + D3D12_MESSAGE_ID_NEED_TO_CALL_TILEDRESOURCEBARRIER = ( D3D12_MESSAGE_ID_GETRESOURCETILING_NONTILED_RESOURCE + 1 ) , + D3D12_MESSAGE_ID_CREATEDEVICE_INVALIDARGS = ( D3D12_MESSAGE_ID_NEED_TO_CALL_TILEDRESOURCEBARRIER + 1 ) , + D3D12_MESSAGE_ID_CREATEDEVICE_WARNING = ( D3D12_MESSAGE_ID_CREATEDEVICE_INVALIDARGS + 1 ) , + D3D12_MESSAGE_ID_TILED_RESOURCE_TIER_1_BUFFER_TEXTURE_MISMATCH = ( D3D12_MESSAGE_ID_CREATEDEVICE_WARNING + 1 ) , + D3D12_MESSAGE_ID_CREATE_CRYPTOSESSION = ( D3D12_MESSAGE_ID_TILED_RESOURCE_TIER_1_BUFFER_TEXTURE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATE_AUTHENTICATEDCHANNEL = ( D3D12_MESSAGE_ID_CREATE_CRYPTOSESSION + 1 ) , + D3D12_MESSAGE_ID_LIVE_CRYPTOSESSION = ( D3D12_MESSAGE_ID_CREATE_AUTHENTICATEDCHANNEL + 1 ) , + D3D12_MESSAGE_ID_LIVE_AUTHENTICATEDCHANNEL = ( D3D12_MESSAGE_ID_LIVE_CRYPTOSESSION + 1 ) , + D3D12_MESSAGE_ID_DESTROY_CRYPTOSESSION = ( D3D12_MESSAGE_ID_LIVE_AUTHENTICATEDCHANNEL + 1 ) , + D3D12_MESSAGE_ID_DESTROY_AUTHENTICATEDCHANNEL = ( D3D12_MESSAGE_ID_DESTROY_CRYPTOSESSION + 1 ) , + D3D12_MESSAGE_ID_MAP_INVALID_SUBRESOURCE = ( D3D12_MESSAGE_ID_DESTROY_AUTHENTICATEDCHANNEL + 1 ) , + D3D12_MESSAGE_ID_MAP_INVALID_TYPE = ( D3D12_MESSAGE_ID_MAP_INVALID_SUBRESOURCE + 1 ) , + D3D12_MESSAGE_ID_MAP_UNSUPPORTED_TYPE = ( D3D12_MESSAGE_ID_MAP_INVALID_TYPE + 1 ) , + D3D12_MESSAGE_ID_UNMAP_INVALID_SUBRESOURCE = ( D3D12_MESSAGE_ID_MAP_UNSUPPORTED_TYPE + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_TYPE = ( D3D12_MESSAGE_ID_UNMAP_INVALID_SUBRESOURCE + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_NULL_POINTER = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_TYPE + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_SUBRESOURCE = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_NULL_POINTER + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_RESERVED_BITS = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_SUBRESOURCE + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_MISSING_BIND_FLAGS = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_RESERVED_BITS + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_MISMATCHING_MISC_FLAGS = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_MISSING_BIND_FLAGS + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_MATCHING_STATES = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_MISMATCHING_MISC_FLAGS + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_COMBINATION = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_MATCHING_STATES + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_BEFORE_AFTER_MISMATCH = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_COMBINATION + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_RESOURCE = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_BEFORE_AFTER_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_SAMPLE_COUNT = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_RESOURCE + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_FLAGS = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_SAMPLE_COUNT + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_COMBINED_FLAGS = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_FLAGS + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_FLAGS_FOR_FORMAT = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_COMBINED_FLAGS + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_SPLIT_BARRIER = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_FLAGS_FOR_FORMAT + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_UNMATCHED_END = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_SPLIT_BARRIER + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_UNMATCHED_BEGIN = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_UNMATCHED_END + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_FLAG = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_UNMATCHED_BEGIN + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_COMMAND_LIST_TYPE = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_FLAG + 1 ) , + D3D12_MESSAGE_ID_INVALID_SUBRESOURCE_STATE = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_COMMAND_LIST_TYPE + 1 ) , + D3D12_MESSAGE_ID_INEFFICIENT_PRESENT = ( D3D12_MESSAGE_ID_INVALID_SUBRESOURCE_STATE + 1 ) , + D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_CONTENTION = ( D3D12_MESSAGE_ID_INEFFICIENT_PRESENT + 1 ) , + D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_RESET = ( D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_CONTENTION + 1 ) , + D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_RESET_BUNDLE = ( D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_RESET + 1 ) , + D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_CANNOT_RESET = ( D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_RESET_BUNDLE + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_OPEN = ( D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_CANNOT_RESET + 1 ) , + D3D12_MESSAGE_ID_QUERY_STATE_MISMATCH = ( D3D12_MESSAGE_ID_COMMAND_LIST_OPEN + 1 ) , + D3D12_MESSAGE_ID_INVALID_BUNDLE_API = ( D3D12_MESSAGE_ID_QUERY_STATE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_CLOSED = ( D3D12_MESSAGE_ID_INVALID_BUNDLE_API + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_CLOSED_WITH_INVALID_RESOURCE = ( D3D12_MESSAGE_ID_COMMAND_LIST_CLOSED + 1 ) , + D3D12_MESSAGE_ID_WRONG_COMMAND_ALLOCATOR_TYPE = ( D3D12_MESSAGE_ID_COMMAND_LIST_CLOSED_WITH_INVALID_RESOURCE + 1 ) , + D3D12_MESSAGE_ID_INVALID_INDIRECT_ARGUMENT_BUFFER = ( D3D12_MESSAGE_ID_WRONG_COMMAND_ALLOCATOR_TYPE + 1 ) , + D3D12_MESSAGE_ID_COMPUTE_AND_GRAPHICS_PIPELINE = ( D3D12_MESSAGE_ID_INVALID_INDIRECT_ARGUMENT_BUFFER + 1 ) , + D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_SYNC = ( D3D12_MESSAGE_ID_COMPUTE_AND_GRAPHICS_PIPELINE + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_SYNC = ( D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_SYNC + 1 ) , + D3D12_MESSAGE_ID_SET_DESCRIPTOR_HEAP_INVALID = ( D3D12_MESSAGE_ID_COMMAND_LIST_SYNC + 1 ) , + D3D12_MESSAGE_ID_CREATE_QUEUE_IMAGE_NOT_SUPPORTED = ( D3D12_MESSAGE_ID_SET_DESCRIPTOR_HEAP_INVALID + 1 ) , + D3D12_MESSAGE_ID_CREATE_COMMAND_ALLOCATOR_IMAGE_NOT_SUPPORTED = ( D3D12_MESSAGE_ID_CREATE_QUEUE_IMAGE_NOT_SUPPORTED + 1 ) , + D3D12_MESSAGE_ID_CREATE_COMMANDQUEUE = ( D3D12_MESSAGE_ID_CREATE_COMMAND_ALLOCATOR_IMAGE_NOT_SUPPORTED + 1 ) , + D3D12_MESSAGE_ID_CREATE_COMMANDALLOCATOR = ( D3D12_MESSAGE_ID_CREATE_COMMANDQUEUE + 1 ) , + D3D12_MESSAGE_ID_CREATE_PIPELINESTATE = ( D3D12_MESSAGE_ID_CREATE_COMMANDALLOCATOR + 1 ) , + D3D12_MESSAGE_ID_CREATE_COMMANDLIST12 = ( D3D12_MESSAGE_ID_CREATE_PIPELINESTATE + 1 ) , + D3D12_MESSAGE_ID_CREATE_IMAGECOMMANDLIST = ( D3D12_MESSAGE_ID_CREATE_COMMANDLIST12 + 1 ) , + D3D12_MESSAGE_ID_CREATE_RESOURCE = ( D3D12_MESSAGE_ID_CREATE_IMAGECOMMANDLIST + 1 ) , + D3D12_MESSAGE_ID_CREATE_DESCRIPTORHEAP = ( D3D12_MESSAGE_ID_CREATE_RESOURCE + 1 ) , + D3D12_MESSAGE_ID_CREATE_ROOTSIGNATURE = ( D3D12_MESSAGE_ID_CREATE_DESCRIPTORHEAP + 1 ) , + D3D12_MESSAGE_ID_CREATE_LIBRARY = ( D3D12_MESSAGE_ID_CREATE_ROOTSIGNATURE + 1 ) , + D3D12_MESSAGE_ID_CREATE_HEAP = ( D3D12_MESSAGE_ID_CREATE_LIBRARY + 1 ) , + D3D12_MESSAGE_ID_CREATE_MONITOREDFENCE = ( D3D12_MESSAGE_ID_CREATE_HEAP + 1 ) , + D3D12_MESSAGE_ID_CREATE_QUERYHEAP = ( D3D12_MESSAGE_ID_CREATE_MONITOREDFENCE + 1 ) , + D3D12_MESSAGE_ID_CREATE_COMMANDSIGNATURE = ( D3D12_MESSAGE_ID_CREATE_QUERYHEAP + 1 ) , + D3D12_MESSAGE_ID_LIVE_COMMANDQUEUE = ( D3D12_MESSAGE_ID_CREATE_COMMANDSIGNATURE + 1 ) , + D3D12_MESSAGE_ID_LIVE_COMMANDALLOCATOR = ( D3D12_MESSAGE_ID_LIVE_COMMANDQUEUE + 1 ) , + D3D12_MESSAGE_ID_LIVE_PIPELINESTATE = ( D3D12_MESSAGE_ID_LIVE_COMMANDALLOCATOR + 1 ) , + D3D12_MESSAGE_ID_LIVE_COMMANDLIST12 = ( D3D12_MESSAGE_ID_LIVE_PIPELINESTATE + 1 ) , + D3D12_MESSAGE_ID_LIVE_IMAGECOMMANDLIST = ( D3D12_MESSAGE_ID_LIVE_COMMANDLIST12 + 1 ) , + D3D12_MESSAGE_ID_LIVE_RESOURCE = ( D3D12_MESSAGE_ID_LIVE_IMAGECOMMANDLIST + 1 ) , + D3D12_MESSAGE_ID_LIVE_DESCRIPTORHEAP = ( D3D12_MESSAGE_ID_LIVE_RESOURCE + 1 ) , + D3D12_MESSAGE_ID_LIVE_ROOTSIGNATURE = ( D3D12_MESSAGE_ID_LIVE_DESCRIPTORHEAP + 1 ) , + D3D12_MESSAGE_ID_LIVE_LIBRARY = ( D3D12_MESSAGE_ID_LIVE_ROOTSIGNATURE + 1 ) , + D3D12_MESSAGE_ID_LIVE_HEAP = ( D3D12_MESSAGE_ID_LIVE_LIBRARY + 1 ) , + D3D12_MESSAGE_ID_LIVE_MONITOREDFENCE = ( D3D12_MESSAGE_ID_LIVE_HEAP + 1 ) , + D3D12_MESSAGE_ID_LIVE_QUERYHEAP = ( D3D12_MESSAGE_ID_LIVE_MONITOREDFENCE + 1 ) , + D3D12_MESSAGE_ID_LIVE_COMMANDSIGNATURE = ( D3D12_MESSAGE_ID_LIVE_QUERYHEAP + 1 ) , + D3D12_MESSAGE_ID_DESTROY_COMMANDQUEUE = ( D3D12_MESSAGE_ID_LIVE_COMMANDSIGNATURE + 1 ) , + D3D12_MESSAGE_ID_DESTROY_COMMANDALLOCATOR = ( D3D12_MESSAGE_ID_DESTROY_COMMANDQUEUE + 1 ) , + D3D12_MESSAGE_ID_DESTROY_PIPELINESTATE = ( D3D12_MESSAGE_ID_DESTROY_COMMANDALLOCATOR + 1 ) , + D3D12_MESSAGE_ID_DESTROY_COMMANDLIST12 = ( D3D12_MESSAGE_ID_DESTROY_PIPELINESTATE + 1 ) , + D3D12_MESSAGE_ID_DESTROY_IMAGECOMMANDLIST = ( D3D12_MESSAGE_ID_DESTROY_COMMANDLIST12 + 1 ) , + D3D12_MESSAGE_ID_DESTROY_RESOURCE = ( D3D12_MESSAGE_ID_DESTROY_IMAGECOMMANDLIST + 1 ) , + D3D12_MESSAGE_ID_DESTROY_DESCRIPTORHEAP = ( D3D12_MESSAGE_ID_DESTROY_RESOURCE + 1 ) , + D3D12_MESSAGE_ID_DESTROY_ROOTSIGNATURE = ( D3D12_MESSAGE_ID_DESTROY_DESCRIPTORHEAP + 1 ) , + D3D12_MESSAGE_ID_DESTROY_LIBRARY = ( D3D12_MESSAGE_ID_DESTROY_ROOTSIGNATURE + 1 ) , + D3D12_MESSAGE_ID_DESTROY_HEAP = ( D3D12_MESSAGE_ID_DESTROY_LIBRARY + 1 ) , + D3D12_MESSAGE_ID_DESTROY_MONITOREDFENCE = ( D3D12_MESSAGE_ID_DESTROY_HEAP + 1 ) , + D3D12_MESSAGE_ID_DESTROY_QUERYHEAP = ( D3D12_MESSAGE_ID_DESTROY_MONITOREDFENCE + 1 ) , + D3D12_MESSAGE_ID_DESTROY_COMMANDSIGNATURE = ( D3D12_MESSAGE_ID_DESTROY_QUERYHEAP + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDHEAPTYPE = ( D3D12_MESSAGE_ID_DESTROY_COMMANDSIGNATURE + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDDIMENSIONS = ( D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDHEAPTYPE + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDMISCFLAGS = ( D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDDIMENSIONS + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDMISCFLAGS = ( D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDMISCFLAGS + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_LARGEALLOCATION = ( D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDMISCFLAGS + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_SMALLALLOCATION = ( D3D12_MESSAGE_ID_CREATERESOURCE_LARGEALLOCATION + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDARG_RETURN = ( D3D12_MESSAGE_ID_CREATERESOURCE_SMALLALLOCATION + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_OUTOFMEMORY_RETURN = ( D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDARG_RETURN + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDDESC = ( D3D12_MESSAGE_ID_CREATERESOURCE_OUTOFMEMORY_RETURN + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDINITIALSTATE = ( D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDDESC + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_HAS_PENDING_INITIAL_DATA = ( D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDINITIALSTATE + 1 ) , + D3D12_MESSAGE_ID_POSSIBLY_INVALID_SUBRESOURCE_STATE = ( D3D12_MESSAGE_ID_RESOURCE_HAS_PENDING_INITIAL_DATA + 1 ) , + D3D12_MESSAGE_ID_INVALID_USE_OF_NON_RESIDENT_RESOURCE = ( D3D12_MESSAGE_ID_POSSIBLY_INVALID_SUBRESOURCE_STATE + 1 ) , + D3D12_MESSAGE_ID_POSSIBLE_INVALID_USE_OF_NON_RESIDENT_RESOURCE = ( D3D12_MESSAGE_ID_INVALID_USE_OF_NON_RESIDENT_RESOURCE + 1 ) , + D3D12_MESSAGE_ID_BUNDLE_PIPELINE_STATE_MISMATCH = ( D3D12_MESSAGE_ID_POSSIBLE_INVALID_USE_OF_NON_RESIDENT_RESOURCE + 1 ) , + D3D12_MESSAGE_ID_PRIMITIVE_TOPOLOGY_MISMATCH_PIPELINE_STATE = ( D3D12_MESSAGE_ID_BUNDLE_PIPELINE_STATE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_RENDER_TARGET_NUMBER_MISMATCH_PIPELINE_STATE = ( D3D12_MESSAGE_ID_PRIMITIVE_TOPOLOGY_MISMATCH_PIPELINE_STATE + 1 ) , + D3D12_MESSAGE_ID_RENDER_TARGET_FORMAT_MISMATCH_PIPELINE_STATE = ( D3D12_MESSAGE_ID_RENDER_TARGET_NUMBER_MISMATCH_PIPELINE_STATE + 1 ) , + D3D12_MESSAGE_ID_RENDER_TARGET_SAMPLE_DESC_MISMATCH_PIPELINE_STATE = ( D3D12_MESSAGE_ID_RENDER_TARGET_FORMAT_MISMATCH_PIPELINE_STATE + 1 ) , + D3D12_MESSAGE_ID_DEPTH_STENCIL_FORMAT_MISMATCH_PIPELINE_STATE = ( D3D12_MESSAGE_ID_RENDER_TARGET_SAMPLE_DESC_MISMATCH_PIPELINE_STATE + 1 ) , + D3D12_MESSAGE_ID_DEPTH_STENCIL_SAMPLE_DESC_MISMATCH_PIPELINE_STATE = ( D3D12_MESSAGE_ID_DEPTH_STENCIL_FORMAT_MISMATCH_PIPELINE_STATE + 1 ) , + D3D12_MESSAGE_ID_RENDER_TARGET_NUMBER_MISMATCH_BUNDLE_PIPELINE_STATE = ( D3D12_MESSAGE_ID_DEPTH_STENCIL_SAMPLE_DESC_MISMATCH_PIPELINE_STATE + 1 ) , + D3D12_MESSAGE_ID_RENDER_TARGET_FORMAT_MISMATCH_BUNDLE_PIPELINE_STATE = ( D3D12_MESSAGE_ID_RENDER_TARGET_NUMBER_MISMATCH_BUNDLE_PIPELINE_STATE + 1 ) , + D3D12_MESSAGE_ID_RENDER_TARGET_SAMPLE_DESC_MISMATCH_BUNDLE_PIPELINE_STATE = ( D3D12_MESSAGE_ID_RENDER_TARGET_FORMAT_MISMATCH_BUNDLE_PIPELINE_STATE + 1 ) , + D3D12_MESSAGE_ID_DEPTH_STENCIL_FORMAT_MISMATCH_BUNDLE_PIPELINE_STATE = ( D3D12_MESSAGE_ID_RENDER_TARGET_SAMPLE_DESC_MISMATCH_BUNDLE_PIPELINE_STATE + 1 ) , + D3D12_MESSAGE_ID_DEPTH_STENCIL_SAMPLE_DESC_MISMATCH_BUNDLE_PIPELINE_STATE = ( D3D12_MESSAGE_ID_DEPTH_STENCIL_FORMAT_MISMATCH_BUNDLE_PIPELINE_STATE + 1 ) , + D3D12_MESSAGE_ID_CREATESHADER_INVALIDBYTECODE = ( D3D12_MESSAGE_ID_DEPTH_STENCIL_SAMPLE_DESC_MISMATCH_BUNDLE_PIPELINE_STATE + 1 ) , + D3D12_MESSAGE_ID_CREATEHEAP_NULLDESC = ( D3D12_MESSAGE_ID_CREATESHADER_INVALIDBYTECODE + 1 ) , + D3D12_MESSAGE_ID_CREATEHEAP_INVALIDSIZE = ( D3D12_MESSAGE_ID_CREATEHEAP_NULLDESC + 1 ) , + D3D12_MESSAGE_ID_CREATEHEAP_UNRECOGNIZEDHEAPTYPE = ( D3D12_MESSAGE_ID_CREATEHEAP_INVALIDSIZE + 1 ) , + D3D12_MESSAGE_ID_CREATEHEAP_UNRECOGNIZEDCPUPAGEPROPERTIES = ( D3D12_MESSAGE_ID_CREATEHEAP_UNRECOGNIZEDHEAPTYPE + 1 ) , + D3D12_MESSAGE_ID_CREATEHEAP_UNRECOGNIZEDMEMORYPOOL = ( D3D12_MESSAGE_ID_CREATEHEAP_UNRECOGNIZEDCPUPAGEPROPERTIES + 1 ) , + D3D12_MESSAGE_ID_CREATEHEAP_INVALIDPROPERTIES = ( D3D12_MESSAGE_ID_CREATEHEAP_UNRECOGNIZEDMEMORYPOOL + 1 ) , + D3D12_MESSAGE_ID_CREATEHEAP_INVALIDALIGNMENT = ( D3D12_MESSAGE_ID_CREATEHEAP_INVALIDPROPERTIES + 1 ) , + D3D12_MESSAGE_ID_CREATEHEAP_UNRECOGNIZEDMISCFLAGS = ( D3D12_MESSAGE_ID_CREATEHEAP_INVALIDALIGNMENT + 1 ) , + D3D12_MESSAGE_ID_CREATEHEAP_INVALIDMISCFLAGS = ( D3D12_MESSAGE_ID_CREATEHEAP_UNRECOGNIZEDMISCFLAGS + 1 ) , + D3D12_MESSAGE_ID_CREATEHEAP_INVALIDARG_RETURN = ( D3D12_MESSAGE_ID_CREATEHEAP_INVALIDMISCFLAGS + 1 ) , + D3D12_MESSAGE_ID_CREATEHEAP_OUTOFMEMORY_RETURN = ( D3D12_MESSAGE_ID_CREATEHEAP_INVALIDARG_RETURN + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_NULLHEAPPROPERTIES = ( D3D12_MESSAGE_ID_CREATEHEAP_OUTOFMEMORY_RETURN + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_UNRECOGNIZEDHEAPTYPE = ( D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_NULLHEAPPROPERTIES + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_UNRECOGNIZEDCPUPAGEPROPERTIES = ( D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_UNRECOGNIZEDHEAPTYPE + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_UNRECOGNIZEDMEMORYPOOL = ( D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_UNRECOGNIZEDCPUPAGEPROPERTIES + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_INVALIDHEAPPROPERTIES = ( D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_UNRECOGNIZEDMEMORYPOOL + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_UNRECOGNIZEDHEAPMISCFLAGS = ( D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_INVALIDHEAPPROPERTIES + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_INVALIDHEAPMISCFLAGS = ( D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_UNRECOGNIZEDHEAPMISCFLAGS + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_INVALIDARG_RETURN = ( D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_INVALIDHEAPMISCFLAGS + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_OUTOFMEMORY_RETURN = ( D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_INVALIDARG_RETURN + 1 ) , + D3D12_MESSAGE_ID_GETCUSTOMHEAPPROPERTIES_UNRECOGNIZEDHEAPTYPE = ( D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_OUTOFMEMORY_RETURN + 1 ) , + D3D12_MESSAGE_ID_GETCUSTOMHEAPPROPERTIES_INVALIDHEAPTYPE = ( D3D12_MESSAGE_ID_GETCUSTOMHEAPPROPERTIES_UNRECOGNIZEDHEAPTYPE + 1 ) , + D3D12_MESSAGE_ID_CREATE_DESCRIPTOR_HEAP_INVALID_DESC = ( D3D12_MESSAGE_ID_GETCUSTOMHEAPPROPERTIES_INVALIDHEAPTYPE + 1 ) , + D3D12_MESSAGE_ID_INVALID_DESCRIPTOR_HANDLE = ( D3D12_MESSAGE_ID_CREATE_DESCRIPTOR_HEAP_INVALID_DESC + 1 ) , + D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALID_CONSERVATIVERASTERMODE = ( D3D12_MESSAGE_ID_INVALID_DESCRIPTOR_HANDLE + 1 ) , + D3D12_MESSAGE_ID_DEVICE_DRAW_INVALID_SYSTEMVALUE = ( D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALID_CONSERVATIVERASTERMODE + 1 ) , + D3D12_MESSAGE_ID_CREATE_CONSTANT_BUFFER_VIEW_INVALID_RESOURCE = ( D3D12_MESSAGE_ID_DEVICE_DRAW_INVALID_SYSTEMVALUE + 1 ) , + D3D12_MESSAGE_ID_CREATE_CONSTANT_BUFFER_VIEW_INVALID_DESC = ( D3D12_MESSAGE_ID_CREATE_CONSTANT_BUFFER_VIEW_INVALID_RESOURCE + 1 ) , + D3D12_MESSAGE_ID_CREATE_CONSTANT_BUFFER_VIEW_LARGE_OFFSET = ( D3D12_MESSAGE_ID_CREATE_CONSTANT_BUFFER_VIEW_INVALID_DESC + 1 ) , + D3D12_MESSAGE_ID_CREATE_UNORDEREDACCESS_VIEW_INVALID_COUNTER_USAGE = ( D3D12_MESSAGE_ID_CREATE_CONSTANT_BUFFER_VIEW_LARGE_OFFSET + 1 ) , + D3D12_MESSAGE_ID_COPY_DESCRIPTORS_INVALID_RANGES = ( D3D12_MESSAGE_ID_CREATE_UNORDEREDACCESS_VIEW_INVALID_COUNTER_USAGE + 1 ) , + D3D12_MESSAGE_ID_COPY_DESCRIPTORS_WRITE_ONLY_DESCRIPTOR = ( D3D12_MESSAGE_ID_COPY_DESCRIPTORS_INVALID_RANGES + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_RTV_FORMAT_NOT_UNKNOWN = ( D3D12_MESSAGE_ID_COPY_DESCRIPTORS_WRITE_ONLY_DESCRIPTOR + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_RENDER_TARGET_COUNT = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_RTV_FORMAT_NOT_UNKNOWN + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_VERTEX_SHADER_NOT_SET = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_RENDER_TARGET_COUNT + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INPUTLAYOUT_NOT_SET = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_VERTEX_SHADER_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_HS_DS_SIGNATURE_MISMATCH = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INPUTLAYOUT_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_REGISTERINDEX = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_HS_DS_SIGNATURE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_COMPONENTTYPE = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_REGISTERINDEX + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_REGISTERMASK = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_COMPONENTTYPE + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_SYSTEMVALUE = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_REGISTERMASK + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_NEVERWRITTEN_ALWAYSREADS = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_SYSTEMVALUE + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_MINPRECISION = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_NEVERWRITTEN_ALWAYSREADS + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_MINPRECISION + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_HS_XOR_DS_MISMATCH = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_HULL_SHADER_INPUT_TOPOLOGY_MISMATCH = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_HS_XOR_DS_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_HS_DS_CONTROL_POINT_COUNT_MISMATCH = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_HULL_SHADER_INPUT_TOPOLOGY_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_HS_DS_TESSELLATOR_DOMAIN_MISMATCH = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_HS_DS_CONTROL_POINT_COUNT_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_USE_OF_CENTER_MULTISAMPLE_PATTERN = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_HS_DS_TESSELLATOR_DOMAIN_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_USE_OF_FORCED_SAMPLE_COUNT = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_USE_OF_CENTER_MULTISAMPLE_PATTERN + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_PRIMITIVETOPOLOGY = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_USE_OF_FORCED_SAMPLE_COUNT + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_SYSTEMVALUE = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_PRIMITIVETOPOLOGY + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_OM_DUAL_SOURCE_BLENDING_CAN_ONLY_HAVE_RENDER_TARGET_0 = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_SYSTEMVALUE + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_OM_RENDER_TARGET_DOES_NOT_SUPPORT_BLENDING = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_OM_DUAL_SOURCE_BLENDING_CAN_ONLY_HAVE_RENDER_TARGET_0 + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_PS_OUTPUT_TYPE_MISMATCH = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_OM_RENDER_TARGET_DOES_NOT_SUPPORT_BLENDING + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_OM_RENDER_TARGET_DOES_NOT_SUPPORT_LOGIC_OPS = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_PS_OUTPUT_TYPE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_RENDERTARGETVIEW_NOT_SET = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_OM_RENDER_TARGET_DOES_NOT_SUPPORT_LOGIC_OPS + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_DEPTHSTENCILVIEW_NOT_SET = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_RENDERTARGETVIEW_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_GS_INPUT_PRIMITIVE_MISMATCH = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_DEPTHSTENCILVIEW_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_POSITION_NOT_PRESENT = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_GS_INPUT_PRIMITIVE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_MISSING_ROOT_SIGNATURE_FLAGS = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_POSITION_NOT_PRESENT + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_INDEX_BUFFER_PROPERTIES = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_MISSING_ROOT_SIGNATURE_FLAGS + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_SAMPLE_DESC = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_INDEX_BUFFER_PROPERTIES + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_HS_ROOT_SIGNATURE_MISMATCH = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_SAMPLE_DESC + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_DS_ROOT_SIGNATURE_MISMATCH = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_HS_ROOT_SIGNATURE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_VS_ROOT_SIGNATURE_MISMATCH = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_DS_ROOT_SIGNATURE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_GS_ROOT_SIGNATURE_MISMATCH = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_VS_ROOT_SIGNATURE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_PS_ROOT_SIGNATURE_MISMATCH = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_GS_ROOT_SIGNATURE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_MISSING_ROOT_SIGNATURE = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_PS_ROOT_SIGNATURE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_EXECUTE_BUNDLE_OPEN_BUNDLE = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_MISSING_ROOT_SIGNATURE + 1 ) , + D3D12_MESSAGE_ID_EXECUTE_BUNDLE_DESCRIPTOR_HEAP_MISMATCH = ( D3D12_MESSAGE_ID_EXECUTE_BUNDLE_OPEN_BUNDLE + 1 ) , + D3D12_MESSAGE_ID_EXECUTE_BUNDLE_TYPE = ( D3D12_MESSAGE_ID_EXECUTE_BUNDLE_DESCRIPTOR_HEAP_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_DRAW_EMPTY_SCISSOR_RECTANGLE = ( D3D12_MESSAGE_ID_EXECUTE_BUNDLE_TYPE + 1 ) , + D3D12_MESSAGE_ID_CREATE_ROOT_SIGNATURE_BLOB_NOT_FOUND = ( D3D12_MESSAGE_ID_DRAW_EMPTY_SCISSOR_RECTANGLE + 1 ) , + D3D12_MESSAGE_ID_CREATE_ROOT_SIGNATURE_DESERIALIZE_FAILED = ( D3D12_MESSAGE_ID_CREATE_ROOT_SIGNATURE_BLOB_NOT_FOUND + 1 ) , + D3D12_MESSAGE_ID_CREATE_ROOT_SIGNATURE_INVALID_CONFIGURATION = ( D3D12_MESSAGE_ID_CREATE_ROOT_SIGNATURE_DESERIALIZE_FAILED + 1 ) , + D3D12_MESSAGE_ID_CREATE_ROOT_SIGNATURE_NOT_SUPPORTED_ON_DEVICE = ( D3D12_MESSAGE_ID_CREATE_ROOT_SIGNATURE_INVALID_CONFIGURATION + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_NULLRESOURCEPROPERTIES = ( D3D12_MESSAGE_ID_CREATE_ROOT_SIGNATURE_NOT_SUPPORTED_ON_DEVICE + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_NULLHEAP = ( D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_NULLRESOURCEPROPERTIES + 1 ) , + D3D12_MESSAGE_ID_GETRESOURCEALLOCATIONINFO_INVALIDRDESCS = ( D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_NULLHEAP + 1 ) , + D3D12_MESSAGE_ID_MAKERESIDENT_NULLOBJECTARRAY = ( D3D12_MESSAGE_ID_GETRESOURCEALLOCATIONINFO_INVALIDRDESCS + 1 ) , + D3D12_MESSAGE_ID_MAKERESIDENT_INVALIDOBJECT = ( D3D12_MESSAGE_ID_MAKERESIDENT_NULLOBJECTARRAY + 1 ) , + D3D12_MESSAGE_ID_EVICT_NULLOBJECTARRAY = ( D3D12_MESSAGE_ID_MAKERESIDENT_INVALIDOBJECT + 1 ) , + D3D12_MESSAGE_ID_EVICT_INVALIDOBJECT = ( D3D12_MESSAGE_ID_EVICT_NULLOBJECTARRAY + 1 ) , + D3D12_MESSAGE_ID_HEAPS_UNSUPPORTED = ( D3D12_MESSAGE_ID_EVICT_INVALIDOBJECT + 1 ) , + D3D12_MESSAGE_ID_SET_DESCRIPTOR_TABLE_INVALID = ( D3D12_MESSAGE_ID_HEAPS_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_SET_ROOT_CONSTANT_INVALID = ( D3D12_MESSAGE_ID_SET_DESCRIPTOR_TABLE_INVALID + 1 ) , + D3D12_MESSAGE_ID_SET_ROOT_CONSTANT_BUFFER_VIEW_INVALID = ( D3D12_MESSAGE_ID_SET_ROOT_CONSTANT_INVALID + 1 ) , + D3D12_MESSAGE_ID_SET_ROOT_SHADER_RESOURCE_VIEW_INVALID = ( D3D12_MESSAGE_ID_SET_ROOT_CONSTANT_BUFFER_VIEW_INVALID + 1 ) , + D3D12_MESSAGE_ID_SET_ROOT_UNORDERED_ACCESS_VIEW_INVALID = ( D3D12_MESSAGE_ID_SET_ROOT_SHADER_RESOURCE_VIEW_INVALID + 1 ) , + D3D12_MESSAGE_ID_SET_VERTEX_BUFFERS_INVALID_DESC = ( D3D12_MESSAGE_ID_SET_ROOT_UNORDERED_ACCESS_VIEW_INVALID + 1 ) , + D3D12_MESSAGE_ID_SET_VERTEX_BUFFERS_LARGE_OFFSET = ( D3D12_MESSAGE_ID_SET_VERTEX_BUFFERS_INVALID_DESC + 1 ) , + D3D12_MESSAGE_ID_SET_INDEX_BUFFER_INVALID_DESC = ( D3D12_MESSAGE_ID_SET_VERTEX_BUFFERS_LARGE_OFFSET + 1 ) , + D3D12_MESSAGE_ID_SET_INDEX_BUFFER_LARGE_OFFSET = ( D3D12_MESSAGE_ID_SET_INDEX_BUFFER_INVALID_DESC + 1 ) , + D3D12_MESSAGE_ID_SET_STREAM_OUTPUT_BUFFERS_INVALID_DESC = ( D3D12_MESSAGE_ID_SET_INDEX_BUFFER_LARGE_OFFSET + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDDIMENSIONALITY = ( D3D12_MESSAGE_ID_SET_STREAM_OUTPUT_BUFFERS_INVALID_DESC + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDLAYOUT = ( D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDDIMENSIONALITY + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDDIMENSIONALITY = ( D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDLAYOUT + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDALIGNMENT = ( D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDDIMENSIONALITY + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDMIPLEVELS = ( D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDALIGNMENT + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDSAMPLEDESC = ( D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDMIPLEVELS + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDLAYOUT = ( D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDSAMPLEDESC + 1 ) , + D3D12_MESSAGE_ID_SET_INDEX_BUFFER_INVALID = ( D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDLAYOUT + 1 ) , + D3D12_MESSAGE_ID_SET_VERTEX_BUFFERS_INVALID = ( D3D12_MESSAGE_ID_SET_INDEX_BUFFER_INVALID + 1 ) , + D3D12_MESSAGE_ID_SET_STREAM_OUTPUT_BUFFERS_INVALID = ( D3D12_MESSAGE_ID_SET_VERTEX_BUFFERS_INVALID + 1 ) , + D3D12_MESSAGE_ID_SET_RENDER_TARGETS_INVALID = ( D3D12_MESSAGE_ID_SET_STREAM_OUTPUT_BUFFERS_INVALID + 1 ) , + D3D12_MESSAGE_ID_CREATEQUERY_HEAP_INVALID_PARAMETERS = ( D3D12_MESSAGE_ID_SET_RENDER_TARGETS_INVALID + 1 ) , + D3D12_MESSAGE_ID_CREATEQUERY_HEAP_JPEG_NOT_SUPPORTED = ( D3D12_MESSAGE_ID_CREATEQUERY_HEAP_INVALID_PARAMETERS + 1 ) , + D3D12_MESSAGE_ID_BEGIN_END_QUERY_INVALID_PARAMETERS = ( D3D12_MESSAGE_ID_CREATEQUERY_HEAP_JPEG_NOT_SUPPORTED + 1 ) , + D3D12_MESSAGE_ID_CLOSE_COMMAND_LIST_OPEN_QUERY = ( D3D12_MESSAGE_ID_BEGIN_END_QUERY_INVALID_PARAMETERS + 1 ) , + D3D12_MESSAGE_ID_RESOLVE_QUERY_DATA_INVALID_PARAMETERS = ( D3D12_MESSAGE_ID_CLOSE_COMMAND_LIST_OPEN_QUERY + 1 ) , + D3D12_MESSAGE_ID_SET_PREDICATION_INVALID_PARAMETERS = ( D3D12_MESSAGE_ID_RESOLVE_QUERY_DATA_INVALID_PARAMETERS + 1 ) , + D3D12_MESSAGE_ID_TIMESTAMPS_NOT_SUPPORTED = ( D3D12_MESSAGE_ID_SET_PREDICATION_INVALID_PARAMETERS + 1 ) , + D3D12_MESSAGE_ID_UNSTABLE_POWER_STATE = ( D3D12_MESSAGE_ID_TIMESTAMPS_NOT_SUPPORTED + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDFORMAT = ( D3D12_MESSAGE_ID_UNSTABLE_POWER_STATE + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDFORMAT = ( D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDFORMAT + 1 ) , + D3D12_MESSAGE_ID_GETCOPYABLELAYOUT_INVALIDSUBRESOURCERANGE = ( D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDFORMAT + 1 ) , + D3D12_MESSAGE_ID_GETCOPYABLELAYOUT_INVALIDBASEOFFSET = ( D3D12_MESSAGE_ID_GETCOPYABLELAYOUT_INVALIDSUBRESOURCERANGE + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_HEAP = ( D3D12_MESSAGE_ID_GETCOPYABLELAYOUT_INVALIDBASEOFFSET + 1 ) , + D3D12_MESSAGE_ID_CREATE_SAMPLER_INVALID = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_HEAP + 1 ) , + D3D12_MESSAGE_ID_CREATECOMMANDSIGNATURE_INVALID = ( D3D12_MESSAGE_ID_CREATE_SAMPLER_INVALID + 1 ) , + D3D12_MESSAGE_ID_EXECUTE_INDIRECT_INVALID_PARAMETERS = ( D3D12_MESSAGE_ID_CREATECOMMANDSIGNATURE_INVALID + 1 ) , + D3D12_MESSAGE_ID_GETGPUVIRTUALADDRESS_INVALID_RESOURCE_DIMENSION = ( D3D12_MESSAGE_ID_EXECUTE_INDIRECT_INVALID_PARAMETERS + 1 ) , + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDPLANEINDEX = ( D3D12_MESSAGE_ID_GETGPUVIRTUALADDRESS_INVALID_RESOURCE_DIMENSION + 4 ) , + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDVIDEOPLANEINDEX = ( D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDPLANEINDEX + 1 ) , + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_AMBIGUOUSVIDEOPLANEINDEX = ( D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDVIDEOPLANEINDEX + 1 ) , + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDPLANEINDEX = ( D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_AMBIGUOUSVIDEOPLANEINDEX + 1 ) , + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDVIDEOPLANEINDEX = ( D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDPLANEINDEX + 1 ) , + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_AMBIGUOUSVIDEOPLANEINDEX = ( D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDVIDEOPLANEINDEX + 1 ) , + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDPLANEINDEX = ( D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_AMBIGUOUSVIDEOPLANEINDEX + 1 ) , + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDVIDEOPLANEINDEX = ( D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDPLANEINDEX + 1 ) , + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_AMBIGUOUSVIDEOPLANEINDEX = ( D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDVIDEOPLANEINDEX + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_INVALIDSCANDATAOFFSET = ( D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_AMBIGUOUSVIDEOPLANEINDEX + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_NOTSUPPORTED = ( D3D12_MESSAGE_ID_JPEGDECODE_INVALIDSCANDATAOFFSET + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_DIMENSIONSTOOLARGE = ( D3D12_MESSAGE_ID_JPEGDECODE_NOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_INVALIDCOMPONENTS = ( D3D12_MESSAGE_ID_JPEGDECODE_DIMENSIONSTOOLARGE + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDCOMPONENTS = ( D3D12_MESSAGE_ID_JPEGDECODE_INVALIDCOMPONENTS + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_DESTINATIONNOT2D = ( D3D12_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDCOMPONENTS + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_TILEDRESOURCESUNSUPPORTED = ( D3D12_MESSAGE_ID_JPEGDECODE_DESTINATIONNOT2D + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_GUARDRECTSUNSUPPORTED = ( D3D12_MESSAGE_ID_JPEGDECODE_TILEDRESOURCESUNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_FORMATUNSUPPORTED = ( D3D12_MESSAGE_ID_JPEGDECODE_GUARDRECTSUNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_INVALIDSUBRESOURCE = ( D3D12_MESSAGE_ID_JPEGDECODE_FORMATUNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_INVALIDMIPLEVEL = ( D3D12_MESSAGE_ID_JPEGDECODE_INVALIDSUBRESOURCE + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_EMPTYDESTBOX = ( D3D12_MESSAGE_ID_JPEGDECODE_INVALIDMIPLEVEL + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_DESTBOXNOT2D = ( D3D12_MESSAGE_ID_JPEGDECODE_EMPTYDESTBOX + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_DESTBOXNOTSUB = ( D3D12_MESSAGE_ID_JPEGDECODE_DESTBOXNOT2D + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_DESTBOXESINTERSECT = ( D3D12_MESSAGE_ID_JPEGDECODE_DESTBOXNOTSUB + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_XSUBSAMPLEMISMATCH = ( D3D12_MESSAGE_ID_JPEGDECODE_DESTBOXESINTERSECT + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_YSUBSAMPLEMISMATCH = ( D3D12_MESSAGE_ID_JPEGDECODE_XSUBSAMPLEMISMATCH + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_XSUBSAMPLEODD = ( D3D12_MESSAGE_ID_JPEGDECODE_YSUBSAMPLEMISMATCH + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_YSUBSAMPLEODD = ( D3D12_MESSAGE_ID_JPEGDECODE_XSUBSAMPLEODD + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_UPSCALEUNSUPPORTED = ( D3D12_MESSAGE_ID_JPEGDECODE_YSUBSAMPLEODD + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_TIER4DOWNSCALETOLARGE = ( D3D12_MESSAGE_ID_JPEGDECODE_UPSCALEUNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_TIER3DOWNSCALEUNSUPPORTED = ( D3D12_MESSAGE_ID_JPEGDECODE_TIER4DOWNSCALETOLARGE + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_CHROMASIZEMISMATCH = ( D3D12_MESSAGE_ID_JPEGDECODE_TIER3DOWNSCALEUNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_LUMACHROMASIZEMISMATCH = ( D3D12_MESSAGE_ID_JPEGDECODE_CHROMASIZEMISMATCH + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_INVALIDNUMDESTINATIONS = ( D3D12_MESSAGE_ID_JPEGDECODE_LUMACHROMASIZEMISMATCH + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_SUBBOXUNSUPPORTED = ( D3D12_MESSAGE_ID_JPEGDECODE_INVALIDNUMDESTINATIONS + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_1DESTUNSUPPORTEDFORMAT = ( D3D12_MESSAGE_ID_JPEGDECODE_SUBBOXUNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_3DESTUNSUPPORTEDFORMAT = ( D3D12_MESSAGE_ID_JPEGDECODE_1DESTUNSUPPORTEDFORMAT + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_SCALEUNSUPPORTED = ( D3D12_MESSAGE_ID_JPEGDECODE_3DESTUNSUPPORTEDFORMAT + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_INVALIDSOURCESIZE = ( D3D12_MESSAGE_ID_JPEGDECODE_SCALEUNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_INVALIDCOPYFLAGS = ( D3D12_MESSAGE_ID_JPEGDECODE_INVALIDSOURCESIZE + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_HAZARD = ( D3D12_MESSAGE_ID_JPEGDECODE_INVALIDCOPYFLAGS + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDSRCBUFFERUSAGE = ( D3D12_MESSAGE_ID_JPEGDECODE_HAZARD + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDSRCBUFFERMISCFLAGS = ( D3D12_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDSRCBUFFERUSAGE + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDDSTTEXTUREUSAGE = ( D3D12_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDSRCBUFFERMISCFLAGS + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_BACKBUFFERNOTSUPPORTED = ( D3D12_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDDSTTEXTUREUSAGE + 1 ) , + D3D12_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDCOPYFLAGS = ( D3D12_MESSAGE_ID_JPEGDECODE_BACKBUFFERNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_JPEGENCODE_NOTSUPPORTED = ( D3D12_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDCOPYFLAGS + 1 ) , + D3D12_MESSAGE_ID_JPEGENCODE_INVALIDSCANDATAOFFSET = ( D3D12_MESSAGE_ID_JPEGENCODE_NOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_JPEGENCODE_INVALIDCOMPONENTS = ( D3D12_MESSAGE_ID_JPEGENCODE_INVALIDSCANDATAOFFSET + 1 ) , + D3D12_MESSAGE_ID_JPEGENCODE_SOURCENOT2D = ( D3D12_MESSAGE_ID_JPEGENCODE_INVALIDCOMPONENTS + 1 ) , + D3D12_MESSAGE_ID_JPEGENCODE_TILEDRESOURCESUNSUPPORTED = ( D3D12_MESSAGE_ID_JPEGENCODE_SOURCENOT2D + 1 ) , + D3D12_MESSAGE_ID_JPEGENCODE_GUARDRECTSUNSUPPORTED = ( D3D12_MESSAGE_ID_JPEGENCODE_TILEDRESOURCESUNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_JPEGENCODE_XSUBSAMPLEMISMATCH = ( D3D12_MESSAGE_ID_JPEGENCODE_GUARDRECTSUNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_JPEGENCODE_YSUBSAMPLEMISMATCH = ( D3D12_MESSAGE_ID_JPEGENCODE_XSUBSAMPLEMISMATCH + 1 ) , + D3D12_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDCOMPONENTS = ( D3D12_MESSAGE_ID_JPEGENCODE_YSUBSAMPLEMISMATCH + 1 ) , + D3D12_MESSAGE_ID_JPEGENCODE_FORMATUNSUPPORTED = ( D3D12_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDCOMPONENTS + 1 ) , + D3D12_MESSAGE_ID_JPEGENCODE_INVALIDSUBRESOURCE = ( D3D12_MESSAGE_ID_JPEGENCODE_FORMATUNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_JPEGENCODE_INVALIDMIPLEVEL = ( D3D12_MESSAGE_ID_JPEGENCODE_INVALIDSUBRESOURCE + 1 ) , + D3D12_MESSAGE_ID_JPEGENCODE_DIMENSIONSTOOLARGE = ( D3D12_MESSAGE_ID_JPEGENCODE_INVALIDMIPLEVEL + 1 ) , + D3D12_MESSAGE_ID_JPEGENCODE_HAZARD = ( D3D12_MESSAGE_ID_JPEGENCODE_DIMENSIONSTOOLARGE + 1 ) , + D3D12_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDDSTBUFFERUSAGE = ( D3D12_MESSAGE_ID_JPEGENCODE_HAZARD + 1 ) , + D3D12_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDDSTBUFFERMISCFLAGS = ( D3D12_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDDSTBUFFERUSAGE + 1 ) , + D3D12_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDSRCTEXTUREUSAGE = ( D3D12_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDDSTBUFFERMISCFLAGS + 1 ) , + D3D12_MESSAGE_ID_JPEGENCODE_BACKBUFFERNOTSUPPORTED = ( D3D12_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDSRCTEXTUREUSAGE + 1 ) , + D3D12_MESSAGE_ID_CREATEQUERYORPREDICATE_UNSUPPORTEDCONTEXTTYPEFORQUERY = ( D3D12_MESSAGE_ID_JPEGENCODE_BACKBUFFERNOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_FLUSH1_INVALIDCONTEXTTYPE = ( D3D12_MESSAGE_ID_CREATEQUERYORPREDICATE_UNSUPPORTEDCONTEXTTYPEFORQUERY + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDCLEARVALUE = ( D3D12_MESSAGE_ID_FLUSH1_INVALIDCONTEXTTYPE + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDCLEARVALUEFORMAT = ( D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDCLEARVALUE + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDCLEARVALUEFORMAT = ( D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDCLEARVALUEFORMAT + 1 ) , + D3D12_MESSAGE_ID_CREATERESOURCE_CLEARVALUEDENORMFLUSH = ( D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDCLEARVALUEFORMAT + 1 ) , + D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_INVALIDDEPTH = ( D3D12_MESSAGE_ID_CREATERESOURCE_CLEARVALUEDENORMFLUSH + 1 ) , + D3D12_MESSAGE_ID_CLEARRENDERTARGETVIEW_MISMATCHINGCLEARVALUE = ( D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_INVALIDDEPTH + 1 ) , + D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_MISMATCHINGCLEARVALUE = ( D3D12_MESSAGE_ID_CLEARRENDERTARGETVIEW_MISMATCHINGCLEARVALUE + 1 ) , + D3D12_MESSAGE_ID_MAP_INVALIDHEAP = ( D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_MISMATCHINGCLEARVALUE + 1 ) , + D3D12_MESSAGE_ID_UNMAP_INVALIDHEAP = ( D3D12_MESSAGE_ID_MAP_INVALIDHEAP + 1 ) , + D3D12_MESSAGE_ID_MAP_INVALIDRESOURCE = ( D3D12_MESSAGE_ID_UNMAP_INVALIDHEAP + 1 ) , + D3D12_MESSAGE_ID_UNMAP_INVALIDRESOURCE = ( D3D12_MESSAGE_ID_MAP_INVALIDRESOURCE + 1 ) , + D3D12_MESSAGE_ID_MAP_INVALIDSUBRESOURCE = ( D3D12_MESSAGE_ID_UNMAP_INVALIDRESOURCE + 1 ) , + D3D12_MESSAGE_ID_UNMAP_INVALIDSUBRESOURCE = ( D3D12_MESSAGE_ID_MAP_INVALIDSUBRESOURCE + 1 ) , + D3D12_MESSAGE_ID_MAP_INVALIDRANGE = ( D3D12_MESSAGE_ID_UNMAP_INVALIDSUBRESOURCE + 1 ) , + D3D12_MESSAGE_ID_UNMAP_INVALIDRANGE = ( D3D12_MESSAGE_ID_MAP_INVALIDRANGE + 1 ) , + D3D12_MESSAGE_ID_MAP_NULLRANGE = ( D3D12_MESSAGE_ID_UNMAP_INVALIDRANGE + 1 ) , + D3D12_MESSAGE_ID_UNMAP_NULLRANGE = ( D3D12_MESSAGE_ID_MAP_NULLRANGE + 1 ) , + D3D12_MESSAGE_ID_MAP_INVALIDDATAPOINTER = ( D3D12_MESSAGE_ID_UNMAP_NULLRANGE + 1 ) , + D3D12_MESSAGE_ID_MAP_INVALIDARG_RETURN = ( D3D12_MESSAGE_ID_MAP_INVALIDDATAPOINTER + 1 ) , + D3D12_MESSAGE_ID_MAP_OUTOFMEMORY_RETURN = ( D3D12_MESSAGE_ID_MAP_INVALIDARG_RETURN + 1 ) , + D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_BUNDLENOTSUPPORTED = ( D3D12_MESSAGE_ID_MAP_OUTOFMEMORY_RETURN + 1 ) , + D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_COMMANDLISTMISMATCH = ( D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_BUNDLENOTSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_OPENCOMMANDLIST = ( D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_COMMANDLISTMISMATCH + 1 ) , + D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_FAILEDCOMMANDLIST = ( D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_OPENCOMMANDLIST + 1 ) , + D3D12_MESSAGE_ID_COPYBUFFERREGION_NULLDST = ( D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_FAILEDCOMMANDLIST + 1 ) , + D3D12_MESSAGE_ID_COPYBUFFERREGION_INVALIDDSTRESOURCEDIMENSION = ( D3D12_MESSAGE_ID_COPYBUFFERREGION_NULLDST + 1 ) , + D3D12_MESSAGE_ID_COPYBUFFERREGION_DSTRANGEOUTOFBOUNDS = ( D3D12_MESSAGE_ID_COPYBUFFERREGION_INVALIDDSTRESOURCEDIMENSION + 1 ) , + D3D12_MESSAGE_ID_COPYBUFFERREGION_NULLSRC = ( D3D12_MESSAGE_ID_COPYBUFFERREGION_DSTRANGEOUTOFBOUNDS + 1 ) , + D3D12_MESSAGE_ID_COPYBUFFERREGION_INVALIDSRCRESOURCEDIMENSION = ( D3D12_MESSAGE_ID_COPYBUFFERREGION_NULLSRC + 1 ) , + D3D12_MESSAGE_ID_COPYBUFFERREGION_SRCRANGEOUTOFBOUNDS = ( D3D12_MESSAGE_ID_COPYBUFFERREGION_INVALIDSRCRESOURCEDIMENSION + 1 ) , + D3D12_MESSAGE_ID_COPYBUFFERREGION_INVALIDCOPYFLAGS = ( D3D12_MESSAGE_ID_COPYBUFFERREGION_SRCRANGEOUTOFBOUNDS + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_NULLDST = ( D3D12_MESSAGE_ID_COPYBUFFERREGION_INVALIDCOPYFLAGS + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_UNRECOGNIZEDDSTTYPE = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_NULLDST + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTRESOURCEDIMENSION = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_UNRECOGNIZEDDSTTYPE + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTRESOURCE = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTRESOURCEDIMENSION + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTSUBRESOURCE = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTRESOURCE + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTOFFSET = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTSUBRESOURCE + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_UNRECOGNIZEDDSTFORMAT = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTOFFSET + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTFORMAT = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_UNRECOGNIZEDDSTFORMAT + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTDIMENSIONS = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTFORMAT + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTROWPITCH = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTDIMENSIONS + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTPLACEMENT = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTROWPITCH + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTDSPLACEDFOOTPRINTFORMAT = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTPLACEMENT + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_DSTREGIONOUTOFBOUNDS = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTDSPLACEDFOOTPRINTFORMAT + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_NULLSRC = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_DSTREGIONOUTOFBOUNDS + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_UNRECOGNIZEDSRCTYPE = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_NULLSRC + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCRESOURCEDIMENSION = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_UNRECOGNIZEDSRCTYPE + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCRESOURCE = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCRESOURCEDIMENSION + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCSUBRESOURCE = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCRESOURCE + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCOFFSET = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCSUBRESOURCE + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_UNRECOGNIZEDSRCFORMAT = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCOFFSET + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCFORMAT = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_UNRECOGNIZEDSRCFORMAT + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCDIMENSIONS = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCFORMAT + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCROWPITCH = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCDIMENSIONS + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCPLACEMENT = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCROWPITCH + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCDSPLACEDFOOTPRINTFORMAT = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCPLACEMENT + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_SRCREGIONOUTOFBOUNDS = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCDSPLACEDFOOTPRINTFORMAT + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTCOORDINATES = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_SRCREGIONOUTOFBOUNDS + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCBOX = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTCOORDINATES + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_FORMATMISMATCH = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCBOX + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_EMPTYBOX = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_FORMATMISMATCH + 1 ) , + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDCOPYFLAGS = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_EMPTYBOX + 1 ) , + D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_INVALID_SUBRESOURCE_INDEX = ( D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDCOPYFLAGS + 1 ) , + D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_INVALID_FORMAT = ( D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_INVALID_SUBRESOURCE_INDEX + 1 ) , + D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_RESOURCE_MISMATCH = ( D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_INVALID_FORMAT + 1 ) , + D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_INVALID_SAMPLE_COUNT = ( D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_RESOURCE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATECOMPUTEPIPELINESTATE_INVALID_SHADER = ( D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_INVALID_SAMPLE_COUNT + 1 ) , + D3D12_MESSAGE_ID_CREATECOMPUTEPIPELINESTATE_CS_ROOT_SIGNATURE_MISMATCH = ( D3D12_MESSAGE_ID_CREATECOMPUTEPIPELINESTATE_INVALID_SHADER + 1 ) , + D3D12_MESSAGE_ID_CREATECOMPUTEPIPELINESTATE_MISSING_ROOT_SIGNATURE = ( D3D12_MESSAGE_ID_CREATECOMPUTEPIPELINESTATE_CS_ROOT_SIGNATURE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATEPIPELINESTATE_INVALIDCACHEDBLOB = ( D3D12_MESSAGE_ID_CREATECOMPUTEPIPELINESTATE_MISSING_ROOT_SIGNATURE + 1 ) , + D3D12_MESSAGE_ID_CREATEPIPELINESTATE_CACHEDBLOBADAPTERMISMATCH = ( D3D12_MESSAGE_ID_CREATEPIPELINESTATE_INVALIDCACHEDBLOB + 1 ) , + D3D12_MESSAGE_ID_CREATEPIPELINESTATE_CACHEDBLOBDRIVERVERSIONMISMATCH = ( D3D12_MESSAGE_ID_CREATEPIPELINESTATE_CACHEDBLOBADAPTERMISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATEPIPELINESTATE_CACHEDBLOBDESCMISMATCH = ( D3D12_MESSAGE_ID_CREATEPIPELINESTATE_CACHEDBLOBDRIVERVERSIONMISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATEPIPELINESTATE_CACHEDBLOBIGNORED = ( D3D12_MESSAGE_ID_CREATEPIPELINESTATE_CACHEDBLOBDESCMISMATCH + 1 ) , + D3D12_MESSAGE_ID_WRITETOSUBRESOURCE_INVALIDHEAP = ( D3D12_MESSAGE_ID_CREATEPIPELINESTATE_CACHEDBLOBIGNORED + 1 ) , + D3D12_MESSAGE_ID_WRITETOSUBRESOURCE_INVALIDRESOURCE = ( D3D12_MESSAGE_ID_WRITETOSUBRESOURCE_INVALIDHEAP + 1 ) , + D3D12_MESSAGE_ID_WRITETOSUBRESOURCE_INVALIDBOX = ( D3D12_MESSAGE_ID_WRITETOSUBRESOURCE_INVALIDRESOURCE + 1 ) , + D3D12_MESSAGE_ID_WRITETOSUBRESOURCE_INVALIDSUBRESOURCE = ( D3D12_MESSAGE_ID_WRITETOSUBRESOURCE_INVALIDBOX + 1 ) , + D3D12_MESSAGE_ID_WRITETOSUBRESOURCE_EMPTYBOX = ( D3D12_MESSAGE_ID_WRITETOSUBRESOURCE_INVALIDSUBRESOURCE + 1 ) , + D3D12_MESSAGE_ID_READFROMSUBRESOURCE_INVALIDHEAP = ( D3D12_MESSAGE_ID_WRITETOSUBRESOURCE_EMPTYBOX + 1 ) , + D3D12_MESSAGE_ID_READFROMSUBRESOURCE_INVALIDRESOURCE = ( D3D12_MESSAGE_ID_READFROMSUBRESOURCE_INVALIDHEAP + 1 ) , + D3D12_MESSAGE_ID_READFROMSUBRESOURCE_INVALIDBOX = ( D3D12_MESSAGE_ID_READFROMSUBRESOURCE_INVALIDRESOURCE + 1 ) , + D3D12_MESSAGE_ID_READFROMSUBRESOURCE_INVALIDSUBRESOURCE = ( D3D12_MESSAGE_ID_READFROMSUBRESOURCE_INVALIDBOX + 1 ) , + D3D12_MESSAGE_ID_READFROMSUBRESOURCE_EMPTYBOX = ( D3D12_MESSAGE_ID_READFROMSUBRESOURCE_INVALIDSUBRESOURCE + 1 ) , + D3D12_MESSAGE_ID_TOO_MANY_NODES_SPECIFIED = ( D3D12_MESSAGE_ID_READFROMSUBRESOURCE_EMPTYBOX + 1 ) , + D3D12_MESSAGE_ID_INVALID_NODE_INDEX = ( D3D12_MESSAGE_ID_TOO_MANY_NODES_SPECIFIED + 1 ) , + D3D12_MESSAGE_ID_GETHEAPPROPERTIES_INVALIDRESOURCE = ( D3D12_MESSAGE_ID_INVALID_NODE_INDEX + 1 ) , + D3D12_MESSAGE_ID_NODE_MASK_MISMATCH = ( D3D12_MESSAGE_ID_GETHEAPPROPERTIES_INVALIDRESOURCE + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_OUTOFMEMORY = ( D3D12_MESSAGE_ID_NODE_MASK_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_MULTIPLE_SWAPCHAIN_BUFFER_REFERENCES = ( D3D12_MESSAGE_ID_COMMAND_LIST_OUTOFMEMORY + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_TOO_MANY_SWAPCHAIN_REFERENCES = ( D3D12_MESSAGE_ID_COMMAND_LIST_MULTIPLE_SWAPCHAIN_BUFFER_REFERENCES + 1 ) , + D3D12_MESSAGE_ID_COMMAND_QUEUE_TOO_MANY_SWAPCHAIN_REFERENCES = ( D3D12_MESSAGE_ID_COMMAND_LIST_TOO_MANY_SWAPCHAIN_REFERENCES + 1 ) , + D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_WRONGSWAPCHAINBUFFERREFERENCE = ( D3D12_MESSAGE_ID_COMMAND_QUEUE_TOO_MANY_SWAPCHAIN_REFERENCES + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_SETRENDERTARGETS_INVALIDNUMRENDERTARGETS = ( D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_WRONGSWAPCHAINBUFFERREFERENCE + 1 ) , + D3D12_MESSAGE_ID_CREATE_QUEUE_INVALID_TYPE = ( D3D12_MESSAGE_ID_COMMAND_LIST_SETRENDERTARGETS_INVALIDNUMRENDERTARGETS + 1 ) , + D3D12_MESSAGE_ID_CREATE_QUEUE_INVALID_FLAGS = ( D3D12_MESSAGE_ID_CREATE_QUEUE_INVALID_TYPE + 1 ) , + D3D12_MESSAGE_ID_CREATESHAREDRESOURCE_INVALIDFLAGS = ( D3D12_MESSAGE_ID_CREATE_QUEUE_INVALID_FLAGS + 1 ) , + D3D12_MESSAGE_ID_CREATESHAREDRESOURCE_INVALIDFORMAT = ( D3D12_MESSAGE_ID_CREATESHAREDRESOURCE_INVALIDFLAGS + 1 ) , + D3D12_MESSAGE_ID_CREATESHAREDHEAP_INVALIDFLAGS = ( D3D12_MESSAGE_ID_CREATESHAREDRESOURCE_INVALIDFORMAT + 1 ) , + D3D12_MESSAGE_ID_REFLECTSHAREDPROPERTIES_UNRECOGNIZEDPROPERTIES = ( D3D12_MESSAGE_ID_CREATESHAREDHEAP_INVALIDFLAGS + 1 ) , + D3D12_MESSAGE_ID_REFLECTSHAREDPROPERTIES_INVALIDSIZE = ( D3D12_MESSAGE_ID_REFLECTSHAREDPROPERTIES_UNRECOGNIZEDPROPERTIES + 1 ) , + D3D12_MESSAGE_ID_REFLECTSHAREDPROPERTIES_INVALIDOBJECT = ( D3D12_MESSAGE_ID_REFLECTSHAREDPROPERTIES_INVALIDSIZE + 1 ) , + D3D12_MESSAGE_ID_KEYEDMUTEX_INVALIDOBJECT = ( D3D12_MESSAGE_ID_REFLECTSHAREDPROPERTIES_INVALIDOBJECT + 1 ) , + D3D12_MESSAGE_ID_KEYEDMUTEX_INVALIDKEY = ( D3D12_MESSAGE_ID_KEYEDMUTEX_INVALIDOBJECT + 1 ) , + D3D12_MESSAGE_ID_KEYEDMUTEX_WRONGSTATE = ( D3D12_MESSAGE_ID_KEYEDMUTEX_INVALIDKEY + 1 ) , + D3D12_MESSAGE_ID_CREATE_QUEUE_INVALID_PRIORITY = ( D3D12_MESSAGE_ID_KEYEDMUTEX_WRONGSTATE + 1 ) , + D3D12_MESSAGE_ID_OBJECT_DELETED_WHILE_STILL_IN_USE = ( D3D12_MESSAGE_ID_CREATE_QUEUE_INVALID_PRIORITY + 1 ) , + D3D12_MESSAGE_ID_CREATEPIPELINESTATE_INVALID_FLAGS = ( D3D12_MESSAGE_ID_OBJECT_DELETED_WHILE_STILL_IN_USE + 1 ) , + D3D12_MESSAGE_ID_HEAP_ADDRESS_RANGE_HAS_NO_RESOURCE = ( D3D12_MESSAGE_ID_CREATEPIPELINESTATE_INVALID_FLAGS + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RENDER_TARGET_DELETED = ( D3D12_MESSAGE_ID_HEAP_ADDRESS_RANGE_HAS_NO_RESOURCE + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_ALL_RENDER_TARGETS_HAVE_UNKNOWN_FORMAT = ( D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RENDER_TARGET_DELETED + 1 ) , + D3D12_MESSAGE_ID_HEAP_ADDRESS_RANGE_INTERSECTS_MULTIPLE_BUFFERS = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_ALL_RENDER_TARGETS_HAVE_UNKNOWN_FORMAT + 1 ) , + D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_GPU_WRITTEN_READBACK_RESOURCE_MAPPED = ( D3D12_MESSAGE_ID_HEAP_ADDRESS_RANGE_INTERSECTS_MULTIPLE_BUFFERS + 1 ) , + D3D12_MESSAGE_ID_UNMAP_RANGE_NOT_NEEDED = ( D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_GPU_WRITTEN_READBACK_RESOURCE_MAPPED + 1 ) , + D3D12_MESSAGE_ID_UNMAP_RANGE_NOT_EMPTY = ( D3D12_MESSAGE_ID_UNMAP_RANGE_NOT_NEEDED + 1 ) , + D3D12_MESSAGE_ID_MAP_INVALID_NULLRANGE = ( D3D12_MESSAGE_ID_UNMAP_RANGE_NOT_EMPTY + 1 ) , + D3D12_MESSAGE_ID_UNMAP_INVALID_NULLRANGE = ( D3D12_MESSAGE_ID_MAP_INVALID_NULLRANGE + 1 ) , + D3D12_MESSAGE_ID_NO_GRAPHICS_API_SUPPORT = ( D3D12_MESSAGE_ID_UNMAP_INVALID_NULLRANGE + 1 ) , + D3D12_MESSAGE_ID_NO_COMPUTE_API_SUPPORT = ( D3D12_MESSAGE_ID_NO_GRAPHICS_API_SUPPORT + 1 ) , + D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_RESOURCE_FLAGS_NOT_SUPPORTED = ( D3D12_MESSAGE_ID_NO_COMPUTE_API_SUPPORT + 1 ) , + D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_ROOT_ARGUMENT_UNINITIALIZED = ( D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_RESOURCE_FLAGS_NOT_SUPPORTED + 1 ) , + D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_DESCRIPTOR_HEAP_INDEX_OUT_OF_BOUNDS = ( D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_ROOT_ARGUMENT_UNINITIALIZED + 1 ) , + D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_DESCRIPTOR_TABLE_REGISTER_INDEX_OUT_OF_BOUNDS = ( D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_DESCRIPTOR_HEAP_INDEX_OUT_OF_BOUNDS + 1 ) , + D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_DESCRIPTOR_UNINITIALIZED = ( D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_DESCRIPTOR_TABLE_REGISTER_INDEX_OUT_OF_BOUNDS + 1 ) , + D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_DESCRIPTOR_TYPE_MISMATCH = ( D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_DESCRIPTOR_UNINITIALIZED + 1 ) , + D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_SRV_RESOURCE_DIMENSION_MISMATCH = ( D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_DESCRIPTOR_TYPE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_UAV_RESOURCE_DIMENSION_MISMATCH = ( D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_SRV_RESOURCE_DIMENSION_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_INCOMPATIBLE_RESOURCE_STATE = ( D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_UAV_RESOURCE_DIMENSION_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_COPYRESOURCE_NULLDST = ( D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_INCOMPATIBLE_RESOURCE_STATE + 1 ) , + D3D12_MESSAGE_ID_COPYRESOURCE_INVALIDDSTRESOURCE = ( D3D12_MESSAGE_ID_COPYRESOURCE_NULLDST + 1 ) , + D3D12_MESSAGE_ID_COPYRESOURCE_NULLSRC = ( D3D12_MESSAGE_ID_COPYRESOURCE_INVALIDDSTRESOURCE + 1 ) , + D3D12_MESSAGE_ID_COPYRESOURCE_INVALIDSRCRESOURCE = ( D3D12_MESSAGE_ID_COPYRESOURCE_NULLSRC + 1 ) , + D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_NULLDST = ( D3D12_MESSAGE_ID_COPYRESOURCE_INVALIDSRCRESOURCE + 1 ) , + D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_INVALIDDSTRESOURCE = ( D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_NULLDST + 1 ) , + D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_NULLSRC = ( D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_INVALIDDSTRESOURCE + 1 ) , + D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_INVALIDSRCRESOURCE = ( D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_NULLSRC + 1 ) , + D3D12_MESSAGE_ID_PIPELINE_STATE_TYPE_MISMATCH = ( D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_INVALIDSRCRESOURCE + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DISPATCH_ROOT_SIGNATURE_NOT_SET = ( D3D12_MESSAGE_ID_PIPELINE_STATE_TYPE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DISPATCH_ROOT_SIGNATURE_MISMATCH = ( D3D12_MESSAGE_ID_COMMAND_LIST_DISPATCH_ROOT_SIGNATURE_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_ZERO_BARRIERS = ( D3D12_MESSAGE_ID_COMMAND_LIST_DISPATCH_ROOT_SIGNATURE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_BEGIN_END_EVENT_MISMATCH = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_ZERO_BARRIERS + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_POSSIBLE_BEFORE_AFTER_MISMATCH = ( D3D12_MESSAGE_ID_BEGIN_END_EVENT_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_MISMATCHING_BEGIN_END = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_POSSIBLE_BEFORE_AFTER_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_INVALID_RESOURCE = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_MISMATCHING_BEGIN_END + 1 ) , + D3D12_MESSAGE_ID_USE_OF_ZERO_REFCOUNT_OBJECT = ( D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_INVALID_RESOURCE + 1 ) , + D3D12_MESSAGE_ID_OBJECT_EVICTED_WHILE_STILL_IN_USE = ( D3D12_MESSAGE_ID_USE_OF_ZERO_REFCOUNT_OBJECT + 1 ) , + D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_ROOT_DESCRIPTOR_ACCESS_OUT_OF_BOUNDS = ( D3D12_MESSAGE_ID_OBJECT_EVICTED_WHILE_STILL_IN_USE + 1 ) , + D3D12_MESSAGE_ID_CREATEPIPELINELIBRARY_INVALIDLIBRARYBLOB = ( D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_ROOT_DESCRIPTOR_ACCESS_OUT_OF_BOUNDS + 1 ) , + D3D12_MESSAGE_ID_CREATEPIPELINELIBRARY_DRIVERVERSIONMISMATCH = ( D3D12_MESSAGE_ID_CREATEPIPELINELIBRARY_INVALIDLIBRARYBLOB + 1 ) , + D3D12_MESSAGE_ID_CREATEPIPELINELIBRARY_ADAPTERVERSIONMISMATCH = ( D3D12_MESSAGE_ID_CREATEPIPELINELIBRARY_DRIVERVERSIONMISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATEPIPELINELIBRARY_UNSUPPORTED = ( D3D12_MESSAGE_ID_CREATEPIPELINELIBRARY_ADAPTERVERSIONMISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATE_PIPELINELIBRARY = ( D3D12_MESSAGE_ID_CREATEPIPELINELIBRARY_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_LIVE_PIPELINELIBRARY = ( D3D12_MESSAGE_ID_CREATE_PIPELINELIBRARY + 1 ) , + D3D12_MESSAGE_ID_DESTROY_PIPELINELIBRARY = ( D3D12_MESSAGE_ID_LIVE_PIPELINELIBRARY + 1 ) , + D3D12_MESSAGE_ID_STOREPIPELINE_NONAME = ( D3D12_MESSAGE_ID_DESTROY_PIPELINELIBRARY + 1 ) , + D3D12_MESSAGE_ID_STOREPIPELINE_DUPLICATENAME = ( D3D12_MESSAGE_ID_STOREPIPELINE_NONAME + 1 ) , + D3D12_MESSAGE_ID_LOADPIPELINE_NAMENOTFOUND = ( D3D12_MESSAGE_ID_STOREPIPELINE_DUPLICATENAME + 1 ) , + D3D12_MESSAGE_ID_LOADPIPELINE_INVALIDDESC = ( D3D12_MESSAGE_ID_LOADPIPELINE_NAMENOTFOUND + 1 ) , + D3D12_MESSAGE_ID_PIPELINELIBRARY_SERIALIZE_NOTENOUGHMEMORY = ( D3D12_MESSAGE_ID_LOADPIPELINE_INVALIDDESC + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_PS_OUTPUT_RT_OUTPUT_MISMATCH = ( D3D12_MESSAGE_ID_PIPELINELIBRARY_SERIALIZE_NOTENOUGHMEMORY + 1 ) , + D3D12_MESSAGE_ID_SETEVENTONMULTIPLEFENCECOMPLETION_INVALIDFLAGS = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_PS_OUTPUT_RT_OUTPUT_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATE_QUEUE_VIDEO_NOT_SUPPORTED = ( D3D12_MESSAGE_ID_SETEVENTONMULTIPLEFENCECOMPLETION_INVALIDFLAGS + 1 ) , + D3D12_MESSAGE_ID_CREATE_COMMAND_ALLOCATOR_VIDEO_NOT_SUPPORTED = ( D3D12_MESSAGE_ID_CREATE_QUEUE_VIDEO_NOT_SUPPORTED + 1 ) , + D3D12_MESSAGE_ID_CREATEQUERY_HEAP_VIDEO_DECODE_STATISTICS_NOT_SUPPORTED = ( D3D12_MESSAGE_ID_CREATE_COMMAND_ALLOCATOR_VIDEO_NOT_SUPPORTED + 1 ) , + D3D12_MESSAGE_ID_CREATE_VIDEODECODECOMMANDLIST = ( D3D12_MESSAGE_ID_CREATEQUERY_HEAP_VIDEO_DECODE_STATISTICS_NOT_SUPPORTED + 1 ) , + D3D12_MESSAGE_ID_CREATE_VIDEODECODER = ( D3D12_MESSAGE_ID_CREATE_VIDEODECODECOMMANDLIST + 1 ) , + D3D12_MESSAGE_ID_CREATE_VIDEODECODESTREAM = ( D3D12_MESSAGE_ID_CREATE_VIDEODECODER + 1 ) , + D3D12_MESSAGE_ID_LIVE_VIDEODECODECOMMANDLIST = ( D3D12_MESSAGE_ID_CREATE_VIDEODECODESTREAM + 1 ) , + D3D12_MESSAGE_ID_LIVE_VIDEODECODER = ( D3D12_MESSAGE_ID_LIVE_VIDEODECODECOMMANDLIST + 1 ) , + D3D12_MESSAGE_ID_LIVE_VIDEODECODESTREAM = ( D3D12_MESSAGE_ID_LIVE_VIDEODECODER + 1 ) , + D3D12_MESSAGE_ID_DESTROY_VIDEODECODECOMMANDLIST = ( D3D12_MESSAGE_ID_LIVE_VIDEODECODESTREAM + 1 ) , + D3D12_MESSAGE_ID_DESTROY_VIDEODECODER = ( D3D12_MESSAGE_ID_DESTROY_VIDEODECODECOMMANDLIST + 1 ) , + D3D12_MESSAGE_ID_DESTROY_VIDEODECODESTREAM = ( D3D12_MESSAGE_ID_DESTROY_VIDEODECODER + 1 ) , + D3D12_MESSAGE_ID_DECODE_FRAME_INVALID_PARAMETERS = ( D3D12_MESSAGE_ID_DESTROY_VIDEODECODESTREAM + 1 ) , + D3D12_MESSAGE_ID_DEPRECATED_API = ( D3D12_MESSAGE_ID_DECODE_FRAME_INVALID_PARAMETERS + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_MISMATCHING_COMMAND_LIST_TYPE = ( D3D12_MESSAGE_ID_DEPRECATED_API + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_DESCRIPTOR_TABLE_NOT_SET = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_MISMATCHING_COMMAND_LIST_TYPE + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_ROOT_CONSTANT_BUFFER_VIEW_NOT_SET = ( D3D12_MESSAGE_ID_COMMAND_LIST_DESCRIPTOR_TABLE_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_ROOT_SHADER_RESOURCE_VIEW_NOT_SET = ( D3D12_MESSAGE_ID_COMMAND_LIST_ROOT_CONSTANT_BUFFER_VIEW_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_ROOT_UNORDERED_ACCESS_VIEW_NOT_SET = ( D3D12_MESSAGE_ID_COMMAND_LIST_ROOT_SHADER_RESOURCE_VIEW_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_DISCARD_INVALID_SUBRESOURCE_RANGE = ( D3D12_MESSAGE_ID_COMMAND_LIST_ROOT_UNORDERED_ACCESS_VIEW_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_DISCARD_ONE_SUBRESOURCE_FOR_MIPS_WITH_RECTS = ( D3D12_MESSAGE_ID_DISCARD_INVALID_SUBRESOURCE_RANGE + 1 ) , + D3D12_MESSAGE_ID_DISCARD_NO_RECTS_FOR_NON_TEXTURE2D = ( D3D12_MESSAGE_ID_DISCARD_ONE_SUBRESOURCE_FOR_MIPS_WITH_RECTS + 1 ) , + D3D12_MESSAGE_ID_COPY_ON_SAME_SUBRESOURCE = ( D3D12_MESSAGE_ID_DISCARD_NO_RECTS_FOR_NON_TEXTURE2D + 1 ) , + D3D12_MESSAGE_ID_SETRESIDENCYPRIORITY_INVALID_PAGEABLE = ( D3D12_MESSAGE_ID_COPY_ON_SAME_SUBRESOURCE + 1 ) , + D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_UNSUPPORTED = ( D3D12_MESSAGE_ID_SETRESIDENCYPRIORITY_INVALID_PAGEABLE + 1 ) , + D3D12_MESSAGE_ID_STATIC_DESCRIPTOR_INVALID_DESCRIPTOR_CHANGE = ( D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_DATA_STATIC_DESCRIPTOR_INVALID_DATA_CHANGE = ( D3D12_MESSAGE_ID_STATIC_DESCRIPTOR_INVALID_DESCRIPTOR_CHANGE + 1 ) , + D3D12_MESSAGE_ID_DATA_STATIC_WHILE_SET_AT_EXECUTE_DESCRIPTOR_INVALID_DATA_CHANGE = ( D3D12_MESSAGE_ID_DATA_STATIC_DESCRIPTOR_INVALID_DATA_CHANGE + 1 ) , + D3D12_MESSAGE_ID_EXECUTE_BUNDLE_STATIC_DESCRIPTOR_DATA_STATIC_NOT_SET = ( D3D12_MESSAGE_ID_DATA_STATIC_WHILE_SET_AT_EXECUTE_DESCRIPTOR_INVALID_DATA_CHANGE + 1 ) , + D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_RESOURCE_ACCESS_OUT_OF_BOUNDS = ( D3D12_MESSAGE_ID_EXECUTE_BUNDLE_STATIC_DESCRIPTOR_DATA_STATIC_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_SAMPLER_MODE_MISMATCH = ( D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_RESOURCE_ACCESS_OUT_OF_BOUNDS + 1 ) , + D3D12_MESSAGE_ID_CREATE_FENCE_INVALID_FLAGS = ( D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_SAMPLER_MODE_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_RESOURCE_BARRIER_DUPLICATE_SUBRESOURCE_TRANSITIONS = ( D3D12_MESSAGE_ID_CREATE_FENCE_INVALID_FLAGS + 1 ) , + D3D12_MESSAGE_ID_SETRESIDENCYPRIORITY_INVALID_PRIORITY = ( D3D12_MESSAGE_ID_RESOURCE_BARRIER_DUPLICATE_SUBRESOURCE_TRANSITIONS + 1 ) , + D3D12_MESSAGE_ID_CREATE_PASS = ( D3D12_MESSAGE_ID_SETRESIDENCYPRIORITY_INVALID_PRIORITY + 1 ) , + D3D12_MESSAGE_ID_DESTROY_PASS = ( D3D12_MESSAGE_ID_CREATE_PASS + 1 ) , + D3D12_MESSAGE_ID_LIVE_PASS = ( D3D12_MESSAGE_ID_DESTROY_PASS + 1 ) , + D3D12_MESSAGE_ID_CREATE_DESCRIPTOR_HEAP_LARGE_NUM_DESCRIPTORS = ( D3D12_MESSAGE_ID_LIVE_PASS + 1 ) , + D3D12_MESSAGE_ID_BEGIN_EVENT = ( D3D12_MESSAGE_ID_CREATE_DESCRIPTOR_HEAP_LARGE_NUM_DESCRIPTORS + 1 ) , + D3D12_MESSAGE_ID_END_EVENT = ( D3D12_MESSAGE_ID_BEGIN_EVENT + 1 ) , + D3D12_MESSAGE_ID_CREATEDEVICE_DEBUG_LAYER_STARTUP_OPTIONS = ( D3D12_MESSAGE_ID_END_EVENT + 1 ) , + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_DEPTHBOUNDSTEST_UNSUPPORTED = ( D3D12_MESSAGE_ID_CREATEDEVICE_DEBUG_LAYER_STARTUP_OPTIONS + 1 ) , + D3D12_MESSAGE_ID_CREATEPIPELINESTATE_DUPLICATE_SUBOBJECT = ( D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_DEPTHBOUNDSTEST_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_CREATEPIPELINESTATE_UNKNOWN_SUBOBJECT = ( D3D12_MESSAGE_ID_CREATEPIPELINESTATE_DUPLICATE_SUBOBJECT + 1 ) , + D3D12_MESSAGE_ID_CREATEPIPELINESTATE_ZERO_SIZE_STREAM = ( D3D12_MESSAGE_ID_CREATEPIPELINESTATE_UNKNOWN_SUBOBJECT + 1 ) , + D3D12_MESSAGE_ID_CREATEPIPELINESTATE_INVALID_STREAM = ( D3D12_MESSAGE_ID_CREATEPIPELINESTATE_ZERO_SIZE_STREAM + 1 ) , + D3D12_MESSAGE_ID_CREATEPIPELINESTATE_CANNOT_DEDUCE_TYPE = ( D3D12_MESSAGE_ID_CREATEPIPELINESTATE_INVALID_STREAM + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_STATIC_DESCRIPTOR_RESOURCE_DIMENSION_MISMATCH = ( D3D12_MESSAGE_ID_CREATEPIPELINESTATE_CANNOT_DEDUCE_TYPE + 1 ) , + D3D12_MESSAGE_ID_CREATE_COMMAND_QUEUE_INSUFFICIENT_PRIVILEGE_FOR_GLOBAL_REALTIME = ( D3D12_MESSAGE_ID_COMMAND_LIST_STATIC_DESCRIPTOR_RESOURCE_DIMENSION_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_CREATE_COMMAND_QUEUE_INSUFFICIENT_HARDWARE_SUPPORT_FOR_GLOBAL_REALTIME = ( D3D12_MESSAGE_ID_CREATE_COMMAND_QUEUE_INSUFFICIENT_PRIVILEGE_FOR_GLOBAL_REALTIME + 1 ) , + D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_INVALID_ARCHITECTURE = ( D3D12_MESSAGE_ID_CREATE_COMMAND_QUEUE_INSUFFICIENT_HARDWARE_SUPPORT_FOR_GLOBAL_REALTIME + 1 ) , + D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_NULL_DST = ( D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_INVALID_ARCHITECTURE + 1 ) , + D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_INVALID_DST_RESOURCE_DIMENSION = ( D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_NULL_DST + 1 ) , + D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_DST_RANGE_OUT_OF_BOUNDS = ( D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_INVALID_DST_RESOURCE_DIMENSION + 1 ) , + D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_NULL_SRC = ( D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_DST_RANGE_OUT_OF_BOUNDS + 1 ) , + D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_INVALID_SRC_RESOURCE_DIMENSION = ( D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_NULL_SRC + 1 ) , + D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_SRC_RANGE_OUT_OF_BOUNDS = ( D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_INVALID_SRC_RESOURCE_DIMENSION + 1 ) , + D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_INVALID_OFFSET_ALIGNMENT = ( D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_SRC_RANGE_OUT_OF_BOUNDS + 1 ) , + D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_NULL_DEPENDENT_RESOURCES = ( D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_INVALID_OFFSET_ALIGNMENT + 1 ) , + D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_NULL_DEPENDENT_SUBRESOURCE_RANGES = ( D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_NULL_DEPENDENT_RESOURCES + 1 ) , + D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_INVALID_DEPENDENT_RESOURCE = ( D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_NULL_DEPENDENT_SUBRESOURCE_RANGES + 1 ) , + D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_INVALID_DEPENDENT_SUBRESOURCE_RANGE = ( D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_INVALID_DEPENDENT_RESOURCE + 1 ) , + D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_DEPENDENT_SUBRESOURCE_OUT_OF_BOUNDS = ( D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_INVALID_DEPENDENT_SUBRESOURCE_RANGE + 1 ) , + D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_DEPENDENT_RANGE_OUT_OF_BOUNDS = ( D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_DEPENDENT_SUBRESOURCE_OUT_OF_BOUNDS + 1 ) , + D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_ZERO_DEPENDENCIES = ( D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_DEPENDENT_RANGE_OUT_OF_BOUNDS + 1 ) , + D3D12_MESSAGE_ID_DEVICE_CREATE_SHARED_HANDLE_INVALIDARG = ( D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_ZERO_DEPENDENCIES + 1 ) , + D3D12_MESSAGE_ID_DESCRIPTOR_HANDLE_WITH_INVALID_RESOURCE = ( D3D12_MESSAGE_ID_DEVICE_CREATE_SHARED_HANDLE_INVALIDARG + 1 ) , + D3D12_MESSAGE_ID_SETDEPTHBOUNDS_INVALIDARGS = ( D3D12_MESSAGE_ID_DESCRIPTOR_HANDLE_WITH_INVALID_RESOURCE + 1 ) , + D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_RESOURCE_STATE_IMPRECISE = ( D3D12_MESSAGE_ID_SETDEPTHBOUNDS_INVALIDARGS + 1 ) , + D3D12_MESSAGE_ID_COMMAND_LIST_PIPELINE_STATE_NOT_SET = ( D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_RESOURCE_STATE_IMPRECISE + 1 ) , + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_MODEL_MISMATCH = ( D3D12_MESSAGE_ID_COMMAND_LIST_PIPELINE_STATE_NOT_SET + 1 ) , + D3D12_MESSAGE_ID_OBJECT_ACCESSED_WHILE_STILL_IN_USE = ( D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_MODEL_MISMATCH + 1 ) , + D3D12_MESSAGE_ID_PROGRAMMABLE_MSAA_UNSUPPORTED = ( D3D12_MESSAGE_ID_OBJECT_ACCESSED_WHILE_STILL_IN_USE + 1 ) , + D3D12_MESSAGE_ID_SETSAMPLEPOSITIONS_INVALIDARGS = ( D3D12_MESSAGE_ID_PROGRAMMABLE_MSAA_UNSUPPORTED + 1 ) , + D3D12_MESSAGE_ID_RESOLVESUBRESOURCEREGION_INVALID_RECT = ( D3D12_MESSAGE_ID_SETSAMPLEPOSITIONS_INVALIDARGS + 1 ) , + D3D12_MESSAGE_ID_CREATE_VIDEODECODECOMMANDQUEUE = ( D3D12_MESSAGE_ID_RESOLVESUBRESOURCEREGION_INVALID_RECT + 1 ) , + D3D12_MESSAGE_ID_CREATE_VIDEOPROCESSCOMMANDLIST = ( D3D12_MESSAGE_ID_CREATE_VIDEODECODECOMMANDQUEUE + 1 ) , + D3D12_MESSAGE_ID_CREATE_VIDEOPROCESSCOMMANDQUEUE = ( D3D12_MESSAGE_ID_CREATE_VIDEOPROCESSCOMMANDLIST + 1 ) , + D3D12_MESSAGE_ID_LIVE_VIDEODECODECOMMANDQUEUE = ( D3D12_MESSAGE_ID_CREATE_VIDEOPROCESSCOMMANDQUEUE + 1 ) , + D3D12_MESSAGE_ID_LIVE_VIDEOPROCESSCOMMANDLIST = ( D3D12_MESSAGE_ID_LIVE_VIDEODECODECOMMANDQUEUE + 1 ) , + D3D12_MESSAGE_ID_LIVE_VIDEOPROCESSCOMMANDQUEUE = ( D3D12_MESSAGE_ID_LIVE_VIDEOPROCESSCOMMANDLIST + 1 ) , + D3D12_MESSAGE_ID_DESTROY_VIDEODECODECOMMANDQUEUE = ( D3D12_MESSAGE_ID_LIVE_VIDEOPROCESSCOMMANDQUEUE + 1 ) , + D3D12_MESSAGE_ID_DESTROY_VIDEOPROCESSCOMMANDLIST = ( D3D12_MESSAGE_ID_DESTROY_VIDEODECODECOMMANDQUEUE + 1 ) , + D3D12_MESSAGE_ID_DESTROY_VIDEOPROCESSCOMMANDQUEUE = ( D3D12_MESSAGE_ID_DESTROY_VIDEOPROCESSCOMMANDLIST + 1 ) , + D3D12_MESSAGE_ID_CREATE_VIDEOPROCESSOR = ( D3D12_MESSAGE_ID_DESTROY_VIDEOPROCESSCOMMANDQUEUE + 1 ) , + D3D12_MESSAGE_ID_CREATE_VIDEOPROCESSSTREAM = ( D3D12_MESSAGE_ID_CREATE_VIDEOPROCESSOR + 1 ) , + D3D12_MESSAGE_ID_LIVE_VIDEOPROCESSOR = ( D3D12_MESSAGE_ID_CREATE_VIDEOPROCESSSTREAM + 1 ) , + D3D12_MESSAGE_ID_LIVE_VIDEOPROCESSSTREAM = ( D3D12_MESSAGE_ID_LIVE_VIDEOPROCESSOR + 1 ) , + D3D12_MESSAGE_ID_DESTROY_VIDEOPROCESSOR = ( D3D12_MESSAGE_ID_LIVE_VIDEOPROCESSSTREAM + 1 ) , + D3D12_MESSAGE_ID_DESTROY_VIDEOPROCESSSTREAM = ( D3D12_MESSAGE_ID_DESTROY_VIDEOPROCESSOR + 1 ) , + D3D12_MESSAGE_ID_PROCESS_FRAME_INVALID_PARAMETERS = ( D3D12_MESSAGE_ID_DESTROY_VIDEOPROCESSSTREAM + 1 ) , + D3D12_MESSAGE_ID_COPY_INVALIDLAYOUT = ( D3D12_MESSAGE_ID_PROCESS_FRAME_INVALID_PARAMETERS + 1 ) , + D3D12_MESSAGE_ID_CREATE_CRYPTO_SESSION = 1068, + D3D12_MESSAGE_ID_CREATE_CRYPTO_SESSION_POLICY = 1069, + D3D12_MESSAGE_ID_CREATE_PROTECTED_RESOURCE_SESSION = 1070, + D3D12_MESSAGE_ID_LIVE_CRYPTO_SESSION = 1071, + D3D12_MESSAGE_ID_LIVE_CRYPTO_SESSION_POLICY = 1072, + D3D12_MESSAGE_ID_LIVE_PROTECTED_RESOURCE_SESSION = 1073, + D3D12_MESSAGE_ID_DESTROY_CRYPTO_SESSION = 1074, + D3D12_MESSAGE_ID_DESTROY_CRYPTO_SESSION_POLICY = 1075, + D3D12_MESSAGE_ID_DESTROY_PROTECTED_RESOURCE_SESSION = 1076, + D3D12_MESSAGE_ID_PROTECTED_RESOURCE_SESSION_UNSUPPORTED = 1077, + D3D12_MESSAGE_ID_FENCE_INVALIDOPERATION = 1078, + D3D12_MESSAGE_ID_CREATEQUERY_HEAP_COPY_QUEUE_TIMESTAMPS_NOT_SUPPORTED = 1079, + D3D12_MESSAGE_ID_SAMPLEPOSITIONS_MISMATCH_DEFERRED = 1080, + D3D12_MESSAGE_ID_SAMPLEPOSITIONS_MISMATCH_RECORDTIME_ASSUMEDFROMFIRSTUSE = 1081, + D3D12_MESSAGE_ID_SAMPLEPOSITIONS_MISMATCH_RECORDTIME_ASSUMEDFROMCLEAR = 1082, + D3D12_MESSAGE_ID_CREATE_VIDEODECODERHEAP = 1083, + D3D12_MESSAGE_ID_LIVE_VIDEODECODERHEAP = 1084, + D3D12_MESSAGE_ID_DESTROY_VIDEODECODERHEAP = 1085, + D3D12_MESSAGE_ID_OPENEXISTINGHEAP_INVALIDARG_RETURN = 1086, + D3D12_MESSAGE_ID_OPENEXISTINGHEAP_OUTOFMEMORY_RETURN = 1087, + D3D12_MESSAGE_ID_OPENEXISTINGHEAP_INVALIDADDRESS = 1088, + D3D12_MESSAGE_ID_OPENEXISTINGHEAP_INVALIDHANDLE = 1089, + D3D12_MESSAGE_ID_WRITEBUFFERIMMEDIATE_INVALID_DEST = 1090, + D3D12_MESSAGE_ID_WRITEBUFFERIMMEDIATE_INVALID_MODE = 1091, + D3D12_MESSAGE_ID_WRITEBUFFERIMMEDIATE_INVALID_ALIGNMENT = 1092, + D3D12_MESSAGE_ID_WRITEBUFFERIMMEDIATE_NOT_SUPPORTED = 1093, + D3D12_MESSAGE_ID_SETVIEWINSTANCEMASK_INVALIDARGS = 1094, + D3D12_MESSAGE_ID_VIEW_INSTANCING_UNSUPPORTED = 1095, + D3D12_MESSAGE_ID_VIEW_INSTANCING_INVALIDARGS = 1096, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_MISMATCH_DECODE_REFERENCE_ONLY_FLAG = 1097, + D3D12_MESSAGE_ID_COPYRESOURCE_MISMATCH_DECODE_REFERENCE_ONLY_FLAG = 1098, + D3D12_MESSAGE_ID_CREATE_VIDEO_DECODE_HEAP_CAPS_FAILURE = 1099, + D3D12_MESSAGE_ID_CREATE_VIDEO_DECODE_HEAP_CAPS_UNSUPPORTED = 1100, + D3D12_MESSAGE_ID_VIDEO_DECODE_SUPPORT_INVALID_INPUT = 1101, + D3D12_MESSAGE_ID_CREATE_VIDEO_DECODER_UNSUPPORTED = 1102, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_METADATA_ERROR = 1103, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_VIEW_INSTANCING_VERTEX_SIZE_EXCEEDED = 1104, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_RUNTIME_INTERNAL_ERROR = 1105, + D3D12_MESSAGE_ID_NO_VIDEO_API_SUPPORT = 1106, + D3D12_MESSAGE_ID_VIDEO_PROCESS_SUPPORT_INVALID_INPUT = 1107, + D3D12_MESSAGE_ID_CREATE_VIDEO_PROCESSOR_CAPS_FAILURE = 1108, + D3D12_MESSAGE_ID_VIDEO_PROCESS_SUPPORT_UNSUPPORTED_FORMAT = 1109, + D3D12_MESSAGE_ID_VIDEO_DECODE_FRAME_INVALID_ARGUMENT = 1110, + D3D12_MESSAGE_ID_ENQUEUE_MAKE_RESIDENT_INVALID_FLAGS = 1111, + D3D12_MESSAGE_ID_OPENEXISTINGHEAP_UNSUPPORTED = 1112, + D3D12_MESSAGE_ID_VIDEO_PROCESS_FRAMES_INVALID_ARGUMENT = 1113, + D3D12_MESSAGE_ID_D3D12_MESSAGES_END = ( D3D12_MESSAGE_ID_VIDEO_PROCESS_FRAMES_INVALID_ARGUMENT + 1 ) + } D3D12_MESSAGE_ID; + +static_assert(D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_UNSUPPORTED == 1000, "Publicly released SDK D3D12_MESSAGE_ID enum values must not be changed. New enum values must be added to the end of the list."); +static_assert(D3D12_MESSAGE_ID_COPY_INVALIDLAYOUT == 1067, "Publicly released SDK D3D12_MESSAGE_ID enum values must not be changed. New enum values must be added to the end of the list."); +typedef struct D3D12_MESSAGE + { + D3D12_MESSAGE_CATEGORY Category; + D3D12_MESSAGE_SEVERITY Severity; + D3D12_MESSAGE_ID ID; + _Field_size_(DescriptionByteLength) const char *pDescription; + SIZE_T DescriptionByteLength; + } D3D12_MESSAGE; + +typedef struct D3D12_INFO_QUEUE_FILTER_DESC + { + UINT NumCategories; + _Field_size_(NumCategories) D3D12_MESSAGE_CATEGORY *pCategoryList; + UINT NumSeverities; + _Field_size_(NumSeverities) D3D12_MESSAGE_SEVERITY *pSeverityList; + UINT NumIDs; + _Field_size_(NumIDs) D3D12_MESSAGE_ID *pIDList; + } D3D12_INFO_QUEUE_FILTER_DESC; + +typedef struct D3D12_INFO_QUEUE_FILTER + { + D3D12_INFO_QUEUE_FILTER_DESC AllowList; + D3D12_INFO_QUEUE_FILTER_DESC DenyList; + } D3D12_INFO_QUEUE_FILTER; + +#define D3D12_INFO_QUEUE_DEFAULT_MESSAGE_COUNT_LIMIT 1024 + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0009_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0009_v0_0_s_ifspec; + +#ifndef __ID3D12InfoQueue_INTERFACE_DEFINED__ +#define __ID3D12InfoQueue_INTERFACE_DEFINED__ + +/* interface ID3D12InfoQueue */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12InfoQueue; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("0742a90b-c387-483f-b946-30a7e4e61458") + ID3D12InfoQueue : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetMessageCountLimit( + _In_ UINT64 MessageCountLimit) = 0; + + virtual void STDMETHODCALLTYPE ClearStoredMessages( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMessage( + _In_ UINT64 MessageIndex, + _Out_writes_bytes_opt_(*pMessageByteLength) D3D12_MESSAGE *pMessage, + _Inout_ SIZE_T *pMessageByteLength) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetNumMessagesAllowedByStorageFilter( void) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetNumMessagesDeniedByStorageFilter( void) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetNumStoredMessages( void) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetNumStoredMessagesAllowedByRetrievalFilter( void) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetNumMessagesDiscardedByMessageCountLimit( void) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetMessageCountLimit( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddStorageFilterEntries( + _In_ D3D12_INFO_QUEUE_FILTER *pFilter) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStorageFilter( + _Out_writes_bytes_opt_(*pFilterByteLength) D3D12_INFO_QUEUE_FILTER *pFilter, + _Inout_ SIZE_T *pFilterByteLength) = 0; + + virtual void STDMETHODCALLTYPE ClearStorageFilter( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushEmptyStorageFilter( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushCopyOfStorageFilter( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushStorageFilter( + _In_ D3D12_INFO_QUEUE_FILTER *pFilter) = 0; + + virtual void STDMETHODCALLTYPE PopStorageFilter( void) = 0; + + virtual UINT STDMETHODCALLTYPE GetStorageFilterStackSize( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddRetrievalFilterEntries( + _In_ D3D12_INFO_QUEUE_FILTER *pFilter) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRetrievalFilter( + _Out_writes_bytes_opt_(*pFilterByteLength) D3D12_INFO_QUEUE_FILTER *pFilter, + _Inout_ SIZE_T *pFilterByteLength) = 0; + + virtual void STDMETHODCALLTYPE ClearRetrievalFilter( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushEmptyRetrievalFilter( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushCopyOfRetrievalFilter( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushRetrievalFilter( + _In_ D3D12_INFO_QUEUE_FILTER *pFilter) = 0; + + virtual void STDMETHODCALLTYPE PopRetrievalFilter( void) = 0; + + virtual UINT STDMETHODCALLTYPE GetRetrievalFilterStackSize( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddMessage( + _In_ D3D12_MESSAGE_CATEGORY Category, + _In_ D3D12_MESSAGE_SEVERITY Severity, + _In_ D3D12_MESSAGE_ID ID, + _In_ LPCSTR pDescription) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddApplicationMessage( + _In_ D3D12_MESSAGE_SEVERITY Severity, + _In_ LPCSTR pDescription) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetBreakOnCategory( + _In_ D3D12_MESSAGE_CATEGORY Category, + _In_ BOOL bEnable) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetBreakOnSeverity( + _In_ D3D12_MESSAGE_SEVERITY Severity, + _In_ BOOL bEnable) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetBreakOnID( + _In_ D3D12_MESSAGE_ID ID, + _In_ BOOL bEnable) = 0; + + virtual BOOL STDMETHODCALLTYPE GetBreakOnCategory( + _In_ D3D12_MESSAGE_CATEGORY Category) = 0; + + virtual BOOL STDMETHODCALLTYPE GetBreakOnSeverity( + _In_ D3D12_MESSAGE_SEVERITY Severity) = 0; + + virtual BOOL STDMETHODCALLTYPE GetBreakOnID( + _In_ D3D12_MESSAGE_ID ID) = 0; + + virtual void STDMETHODCALLTYPE SetMuteDebugOutput( + _In_ BOOL bMute) = 0; + + virtual BOOL STDMETHODCALLTYPE GetMuteDebugOutput( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12InfoQueueVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12InfoQueue * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12InfoQueue * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *SetMessageCountLimit )( + ID3D12InfoQueue * This, + _In_ UINT64 MessageCountLimit); + + void ( STDMETHODCALLTYPE *ClearStoredMessages )( + ID3D12InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *GetMessage )( + ID3D12InfoQueue * This, + _In_ UINT64 MessageIndex, + _Out_writes_bytes_opt_(*pMessageByteLength) D3D12_MESSAGE *pMessage, + _Inout_ SIZE_T *pMessageByteLength); + + UINT64 ( STDMETHODCALLTYPE *GetNumMessagesAllowedByStorageFilter )( + ID3D12InfoQueue * This); + + UINT64 ( STDMETHODCALLTYPE *GetNumMessagesDeniedByStorageFilter )( + ID3D12InfoQueue * This); + + UINT64 ( STDMETHODCALLTYPE *GetNumStoredMessages )( + ID3D12InfoQueue * This); + + UINT64 ( STDMETHODCALLTYPE *GetNumStoredMessagesAllowedByRetrievalFilter )( + ID3D12InfoQueue * This); + + UINT64 ( STDMETHODCALLTYPE *GetNumMessagesDiscardedByMessageCountLimit )( + ID3D12InfoQueue * This); + + UINT64 ( STDMETHODCALLTYPE *GetMessageCountLimit )( + ID3D12InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *AddStorageFilterEntries )( + ID3D12InfoQueue * This, + _In_ D3D12_INFO_QUEUE_FILTER *pFilter); + + HRESULT ( STDMETHODCALLTYPE *GetStorageFilter )( + ID3D12InfoQueue * This, + _Out_writes_bytes_opt_(*pFilterByteLength) D3D12_INFO_QUEUE_FILTER *pFilter, + _Inout_ SIZE_T *pFilterByteLength); + + void ( STDMETHODCALLTYPE *ClearStorageFilter )( + ID3D12InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *PushEmptyStorageFilter )( + ID3D12InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *PushCopyOfStorageFilter )( + ID3D12InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *PushStorageFilter )( + ID3D12InfoQueue * This, + _In_ D3D12_INFO_QUEUE_FILTER *pFilter); + + void ( STDMETHODCALLTYPE *PopStorageFilter )( + ID3D12InfoQueue * This); + + UINT ( STDMETHODCALLTYPE *GetStorageFilterStackSize )( + ID3D12InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *AddRetrievalFilterEntries )( + ID3D12InfoQueue * This, + _In_ D3D12_INFO_QUEUE_FILTER *pFilter); + + HRESULT ( STDMETHODCALLTYPE *GetRetrievalFilter )( + ID3D12InfoQueue * This, + _Out_writes_bytes_opt_(*pFilterByteLength) D3D12_INFO_QUEUE_FILTER *pFilter, + _Inout_ SIZE_T *pFilterByteLength); + + void ( STDMETHODCALLTYPE *ClearRetrievalFilter )( + ID3D12InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *PushEmptyRetrievalFilter )( + ID3D12InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *PushCopyOfRetrievalFilter )( + ID3D12InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *PushRetrievalFilter )( + ID3D12InfoQueue * This, + _In_ D3D12_INFO_QUEUE_FILTER *pFilter); + + void ( STDMETHODCALLTYPE *PopRetrievalFilter )( + ID3D12InfoQueue * This); + + UINT ( STDMETHODCALLTYPE *GetRetrievalFilterStackSize )( + ID3D12InfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *AddMessage )( + ID3D12InfoQueue * This, + _In_ D3D12_MESSAGE_CATEGORY Category, + _In_ D3D12_MESSAGE_SEVERITY Severity, + _In_ D3D12_MESSAGE_ID ID, + _In_ LPCSTR pDescription); + + HRESULT ( STDMETHODCALLTYPE *AddApplicationMessage )( + ID3D12InfoQueue * This, + _In_ D3D12_MESSAGE_SEVERITY Severity, + _In_ LPCSTR pDescription); + + HRESULT ( STDMETHODCALLTYPE *SetBreakOnCategory )( + ID3D12InfoQueue * This, + _In_ D3D12_MESSAGE_CATEGORY Category, + _In_ BOOL bEnable); + + HRESULT ( STDMETHODCALLTYPE *SetBreakOnSeverity )( + ID3D12InfoQueue * This, + _In_ D3D12_MESSAGE_SEVERITY Severity, + _In_ BOOL bEnable); + + HRESULT ( STDMETHODCALLTYPE *SetBreakOnID )( + ID3D12InfoQueue * This, + _In_ D3D12_MESSAGE_ID ID, + _In_ BOOL bEnable); + + BOOL ( STDMETHODCALLTYPE *GetBreakOnCategory )( + ID3D12InfoQueue * This, + _In_ D3D12_MESSAGE_CATEGORY Category); + + BOOL ( STDMETHODCALLTYPE *GetBreakOnSeverity )( + ID3D12InfoQueue * This, + _In_ D3D12_MESSAGE_SEVERITY Severity); + + BOOL ( STDMETHODCALLTYPE *GetBreakOnID )( + ID3D12InfoQueue * This, + _In_ D3D12_MESSAGE_ID ID); + + void ( STDMETHODCALLTYPE *SetMuteDebugOutput )( + ID3D12InfoQueue * This, + _In_ BOOL bMute); + + BOOL ( STDMETHODCALLTYPE *GetMuteDebugOutput )( + ID3D12InfoQueue * This); + + END_INTERFACE + } ID3D12InfoQueueVtbl; + + interface ID3D12InfoQueue + { + CONST_VTBL struct ID3D12InfoQueueVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12InfoQueue_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12InfoQueue_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12InfoQueue_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12InfoQueue_SetMessageCountLimit(This,MessageCountLimit) \ + ( (This)->lpVtbl -> SetMessageCountLimit(This,MessageCountLimit) ) + +#define ID3D12InfoQueue_ClearStoredMessages(This) \ + ( (This)->lpVtbl -> ClearStoredMessages(This) ) + +#define ID3D12InfoQueue_GetMessage(This,MessageIndex,pMessage,pMessageByteLength) \ + ( (This)->lpVtbl -> GetMessage(This,MessageIndex,pMessage,pMessageByteLength) ) + +#define ID3D12InfoQueue_GetNumMessagesAllowedByStorageFilter(This) \ + ( (This)->lpVtbl -> GetNumMessagesAllowedByStorageFilter(This) ) + +#define ID3D12InfoQueue_GetNumMessagesDeniedByStorageFilter(This) \ + ( (This)->lpVtbl -> GetNumMessagesDeniedByStorageFilter(This) ) + +#define ID3D12InfoQueue_GetNumStoredMessages(This) \ + ( (This)->lpVtbl -> GetNumStoredMessages(This) ) + +#define ID3D12InfoQueue_GetNumStoredMessagesAllowedByRetrievalFilter(This) \ + ( (This)->lpVtbl -> GetNumStoredMessagesAllowedByRetrievalFilter(This) ) + +#define ID3D12InfoQueue_GetNumMessagesDiscardedByMessageCountLimit(This) \ + ( (This)->lpVtbl -> GetNumMessagesDiscardedByMessageCountLimit(This) ) + +#define ID3D12InfoQueue_GetMessageCountLimit(This) \ + ( (This)->lpVtbl -> GetMessageCountLimit(This) ) + +#define ID3D12InfoQueue_AddStorageFilterEntries(This,pFilter) \ + ( (This)->lpVtbl -> AddStorageFilterEntries(This,pFilter) ) + +#define ID3D12InfoQueue_GetStorageFilter(This,pFilter,pFilterByteLength) \ + ( (This)->lpVtbl -> GetStorageFilter(This,pFilter,pFilterByteLength) ) + +#define ID3D12InfoQueue_ClearStorageFilter(This) \ + ( (This)->lpVtbl -> ClearStorageFilter(This) ) + +#define ID3D12InfoQueue_PushEmptyStorageFilter(This) \ + ( (This)->lpVtbl -> PushEmptyStorageFilter(This) ) + +#define ID3D12InfoQueue_PushCopyOfStorageFilter(This) \ + ( (This)->lpVtbl -> PushCopyOfStorageFilter(This) ) + +#define ID3D12InfoQueue_PushStorageFilter(This,pFilter) \ + ( (This)->lpVtbl -> PushStorageFilter(This,pFilter) ) + +#define ID3D12InfoQueue_PopStorageFilter(This) \ + ( (This)->lpVtbl -> PopStorageFilter(This) ) + +#define ID3D12InfoQueue_GetStorageFilterStackSize(This) \ + ( (This)->lpVtbl -> GetStorageFilterStackSize(This) ) + +#define ID3D12InfoQueue_AddRetrievalFilterEntries(This,pFilter) \ + ( (This)->lpVtbl -> AddRetrievalFilterEntries(This,pFilter) ) + +#define ID3D12InfoQueue_GetRetrievalFilter(This,pFilter,pFilterByteLength) \ + ( (This)->lpVtbl -> GetRetrievalFilter(This,pFilter,pFilterByteLength) ) + +#define ID3D12InfoQueue_ClearRetrievalFilter(This) \ + ( (This)->lpVtbl -> ClearRetrievalFilter(This) ) + +#define ID3D12InfoQueue_PushEmptyRetrievalFilter(This) \ + ( (This)->lpVtbl -> PushEmptyRetrievalFilter(This) ) + +#define ID3D12InfoQueue_PushCopyOfRetrievalFilter(This) \ + ( (This)->lpVtbl -> PushCopyOfRetrievalFilter(This) ) + +#define ID3D12InfoQueue_PushRetrievalFilter(This,pFilter) \ + ( (This)->lpVtbl -> PushRetrievalFilter(This,pFilter) ) + +#define ID3D12InfoQueue_PopRetrievalFilter(This) \ + ( (This)->lpVtbl -> PopRetrievalFilter(This) ) + +#define ID3D12InfoQueue_GetRetrievalFilterStackSize(This) \ + ( (This)->lpVtbl -> GetRetrievalFilterStackSize(This) ) + +#define ID3D12InfoQueue_AddMessage(This,Category,Severity,ID,pDescription) \ + ( (This)->lpVtbl -> AddMessage(This,Category,Severity,ID,pDescription) ) + +#define ID3D12InfoQueue_AddApplicationMessage(This,Severity,pDescription) \ + ( (This)->lpVtbl -> AddApplicationMessage(This,Severity,pDescription) ) + +#define ID3D12InfoQueue_SetBreakOnCategory(This,Category,bEnable) \ + ( (This)->lpVtbl -> SetBreakOnCategory(This,Category,bEnable) ) + +#define ID3D12InfoQueue_SetBreakOnSeverity(This,Severity,bEnable) \ + ( (This)->lpVtbl -> SetBreakOnSeverity(This,Severity,bEnable) ) + +#define ID3D12InfoQueue_SetBreakOnID(This,ID,bEnable) \ + ( (This)->lpVtbl -> SetBreakOnID(This,ID,bEnable) ) + +#define ID3D12InfoQueue_GetBreakOnCategory(This,Category) \ + ( (This)->lpVtbl -> GetBreakOnCategory(This,Category) ) + +#define ID3D12InfoQueue_GetBreakOnSeverity(This,Severity) \ + ( (This)->lpVtbl -> GetBreakOnSeverity(This,Severity) ) + +#define ID3D12InfoQueue_GetBreakOnID(This,ID) \ + ( (This)->lpVtbl -> GetBreakOnID(This,ID) ) + +#define ID3D12InfoQueue_SetMuteDebugOutput(This,bMute) \ + ( (This)->lpVtbl -> SetMuteDebugOutput(This,bMute) ) + +#define ID3D12InfoQueue_GetMuteDebugOutput(This) \ + ( (This)->lpVtbl -> GetMuteDebugOutput(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12InfoQueue_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12sdklayers_0000_0010 */ +/* [local] */ + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ +DEFINE_GUID(IID_ID3D12Debug,0x344488b7,0x6846,0x474b,0xb9,0x89,0xf0,0x27,0x44,0x82,0x45,0xe0); +DEFINE_GUID(IID_ID3D12Debug1,0xaffaa4ca,0x63fe,0x4d8e,0xb8,0xad,0x15,0x90,0x00,0xaf,0x43,0x04); +DEFINE_GUID(IID_ID3D12Debug2,0x93a665c4,0xa3b2,0x4e5d,0xb6,0x92,0xa2,0x6a,0xe1,0x4e,0x33,0x74); +DEFINE_GUID(IID_ID3D12DebugDevice1,0xa9b71770,0xd099,0x4a65,0xa6,0x98,0x3d,0xee,0x10,0x02,0x0f,0x88); +DEFINE_GUID(IID_ID3D12DebugDevice,0x3febd6dd,0x4973,0x4787,0x81,0x94,0xe4,0x5f,0x9e,0x28,0x92,0x3e); +DEFINE_GUID(IID_ID3D12DebugCommandQueue,0x09e0bf36,0x54ac,0x484f,0x88,0x47,0x4b,0xae,0xea,0xb6,0x05,0x3a); +DEFINE_GUID(IID_ID3D12DebugCommandList1,0x102ca951,0x311b,0x4b01,0xb1,0x1f,0xec,0xb8,0x3e,0x06,0x1b,0x37); +DEFINE_GUID(IID_ID3D12DebugCommandList,0x09e0bf36,0x54ac,0x484f,0x88,0x47,0x4b,0xae,0xea,0xb6,0x05,0x3f); +DEFINE_GUID(IID_ID3D12SharingContract,0xa251ff70,0xcdeb,0x49fa,0x9b,0xcf,0x5e,0xbd,0xf4,0xdb,0xac,0xa9); +DEFINE_GUID(IID_ID3D12InfoQueue,0x0742a90b,0xc387,0x483f,0xb9,0x46,0x30,0xa7,0xe4,0xe6,0x14,0x58); + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0010_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0010_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/d3d12shader.h b/gfx/include/dxsdk/d3d12shader.h new file mode 100644 index 0000000000..fbeb7633d2 --- /dev/null +++ b/gfx/include/dxsdk/d3d12shader.h @@ -0,0 +1,459 @@ +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// File: D3D12Shader.h +// Content: D3D12 Shader Types and APIs +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef __D3D12SHADER_H__ +#define __D3D12SHADER_H__ + +#include "d3dcommon.h" + +typedef enum D3D12_SHADER_VERSION_TYPE +{ + D3D12_SHVER_PIXEL_SHADER = 0, + D3D12_SHVER_VERTEX_SHADER = 1, + D3D12_SHVER_GEOMETRY_SHADER = 2, + + // D3D11 Shaders + D3D12_SHVER_HULL_SHADER = 3, + D3D12_SHVER_DOMAIN_SHADER = 4, + D3D12_SHVER_COMPUTE_SHADER = 5, + + D3D12_SHVER_RESERVED0 = 0xFFF0, +} D3D12_SHADER_VERSION_TYPE; + +#define D3D12_SHVER_GET_TYPE(_Version) \ + (((_Version) >> 16) & 0xffff) +#define D3D12_SHVER_GET_MAJOR(_Version) \ + (((_Version) >> 4) & 0xf) +#define D3D12_SHVER_GET_MINOR(_Version) \ + (((_Version) >> 0) & 0xf) + +// Slot ID for library function return +#define D3D_RETURN_PARAMETER_INDEX (-1) + +typedef D3D_RESOURCE_RETURN_TYPE D3D12_RESOURCE_RETURN_TYPE; + +typedef D3D_CBUFFER_TYPE D3D12_CBUFFER_TYPE; + + +typedef struct _D3D12_SIGNATURE_PARAMETER_DESC +{ + LPCSTR SemanticName; // Name of the semantic + UINT SemanticIndex; // Index of the semantic + UINT Register; // Number of member variables + D3D_NAME SystemValueType;// A predefined system value, or D3D_NAME_UNDEFINED if not applicable + D3D_REGISTER_COMPONENT_TYPE ComponentType; // Scalar type (e.g. uint, float, etc.) + BYTE Mask; // Mask to indicate which components of the register + // are used (combination of D3D10_COMPONENT_MASK values) + BYTE ReadWriteMask; // Mask to indicate whether a given component is + // never written (if this is an output signature) or + // always read (if this is an input signature). + // (combination of D3D_MASK_* values) + UINT Stream; // Stream index + D3D_MIN_PRECISION MinPrecision; // Minimum desired interpolation precision +} D3D12_SIGNATURE_PARAMETER_DESC; + +typedef struct _D3D12_SHADER_BUFFER_DESC +{ + LPCSTR Name; // Name of the constant buffer + D3D_CBUFFER_TYPE Type; // Indicates type of buffer content + UINT Variables; // Number of member variables + UINT Size; // Size of CB (in bytes) + UINT uFlags; // Buffer description flags +} D3D12_SHADER_BUFFER_DESC; + +typedef struct _D3D12_SHADER_VARIABLE_DESC +{ + LPCSTR Name; // Name of the variable + UINT StartOffset; // Offset in constant buffer's backing store + UINT Size; // Size of variable (in bytes) + UINT uFlags; // Variable flags + LPVOID DefaultValue; // Raw pointer to default value + UINT StartTexture; // First texture index (or -1 if no textures used) + UINT TextureSize; // Number of texture slots possibly used. + UINT StartSampler; // First sampler index (or -1 if no textures used) + UINT SamplerSize; // Number of sampler slots possibly used. +} D3D12_SHADER_VARIABLE_DESC; + +typedef struct _D3D12_SHADER_TYPE_DESC +{ + D3D_SHADER_VARIABLE_CLASS Class; // Variable class (e.g. object, matrix, etc.) + D3D_SHADER_VARIABLE_TYPE Type; // Variable type (e.g. float, sampler, etc.) + UINT Rows; // Number of rows (for matrices, 1 for other numeric, 0 if not applicable) + UINT Columns; // Number of columns (for vectors & matrices, 1 for other numeric, 0 if not applicable) + UINT Elements; // Number of elements (0 if not an array) + UINT Members; // Number of members (0 if not a structure) + UINT Offset; // Offset from the start of structure (0 if not a structure member) + LPCSTR Name; // Name of type, can be NULL +} D3D12_SHADER_TYPE_DESC; + +typedef D3D_TESSELLATOR_DOMAIN D3D12_TESSELLATOR_DOMAIN; + +typedef D3D_TESSELLATOR_PARTITIONING D3D12_TESSELLATOR_PARTITIONING; + +typedef D3D_TESSELLATOR_OUTPUT_PRIMITIVE D3D12_TESSELLATOR_OUTPUT_PRIMITIVE; + +typedef struct _D3D12_SHADER_DESC +{ + UINT Version; // Shader version + LPCSTR Creator; // Creator string + UINT Flags; // Shader compilation/parse flags + + UINT ConstantBuffers; // Number of constant buffers + UINT BoundResources; // Number of bound resources + UINT InputParameters; // Number of parameters in the input signature + UINT OutputParameters; // Number of parameters in the output signature + + UINT InstructionCount; // Number of emitted instructions + UINT TempRegisterCount; // Number of temporary registers used + UINT TempArrayCount; // Number of temporary arrays used + UINT DefCount; // Number of constant defines + UINT DclCount; // Number of declarations (input + output) + UINT TextureNormalInstructions; // Number of non-categorized texture instructions + UINT TextureLoadInstructions; // Number of texture load instructions + UINT TextureCompInstructions; // Number of texture comparison instructions + UINT TextureBiasInstructions; // Number of texture bias instructions + UINT TextureGradientInstructions; // Number of texture gradient instructions + UINT FloatInstructionCount; // Number of floating point arithmetic instructions used + UINT IntInstructionCount; // Number of signed integer arithmetic instructions used + UINT UintInstructionCount; // Number of unsigned integer arithmetic instructions used + UINT StaticFlowControlCount; // Number of static flow control instructions used + UINT DynamicFlowControlCount; // Number of dynamic flow control instructions used + UINT MacroInstructionCount; // Number of macro instructions used + UINT ArrayInstructionCount; // Number of array instructions used + UINT CutInstructionCount; // Number of cut instructions used + UINT EmitInstructionCount; // Number of emit instructions used + D3D_PRIMITIVE_TOPOLOGY GSOutputTopology; // Geometry shader output topology + UINT GSMaxOutputVertexCount; // Geometry shader maximum output vertex count + D3D_PRIMITIVE InputPrimitive; // GS/HS input primitive + UINT PatchConstantParameters; // Number of parameters in the patch constant signature + UINT cGSInstanceCount; // Number of Geometry shader instances + UINT cControlPoints; // Number of control points in the HS->DS stage + D3D_TESSELLATOR_OUTPUT_PRIMITIVE HSOutputPrimitive; // Primitive output by the tessellator + D3D_TESSELLATOR_PARTITIONING HSPartitioning; // Partitioning mode of the tessellator + D3D_TESSELLATOR_DOMAIN TessellatorDomain; // Domain of the tessellator (quad, tri, isoline) + // instruction counts + UINT cBarrierInstructions; // Number of barrier instructions in a compute shader + UINT cInterlockedInstructions; // Number of interlocked instructions + UINT cTextureStoreInstructions; // Number of texture writes +} D3D12_SHADER_DESC; + +typedef struct _D3D12_SHADER_INPUT_BIND_DESC +{ + LPCSTR Name; // Name of the resource + D3D_SHADER_INPUT_TYPE Type; // Type of resource (e.g. texture, cbuffer, etc.) + UINT BindPoint; // Starting bind point + UINT BindCount; // Number of contiguous bind points (for arrays) + + UINT uFlags; // Input binding flags + D3D_RESOURCE_RETURN_TYPE ReturnType; // Return type (if texture) + D3D_SRV_DIMENSION Dimension; // Dimension (if texture) + UINT NumSamples; // Number of samples (0 if not MS texture) + UINT Space; // Register space + UINT uID; // Range ID in the bytecode +} D3D12_SHADER_INPUT_BIND_DESC; + +#define D3D_SHADER_REQUIRES_DOUBLES 0x00000001 +#define D3D_SHADER_REQUIRES_EARLY_DEPTH_STENCIL 0x00000002 +#define D3D_SHADER_REQUIRES_UAVS_AT_EVERY_STAGE 0x00000004 +#define D3D_SHADER_REQUIRES_64_UAVS 0x00000008 +#define D3D_SHADER_REQUIRES_MINIMUM_PRECISION 0x00000010 +#define D3D_SHADER_REQUIRES_11_1_DOUBLE_EXTENSIONS 0x00000020 +#define D3D_SHADER_REQUIRES_11_1_SHADER_EXTENSIONS 0x00000040 +#define D3D_SHADER_REQUIRES_LEVEL_9_COMPARISON_FILTERING 0x00000080 +#define D3D_SHADER_REQUIRES_TILED_RESOURCES 0x00000100 +#define D3D_SHADER_REQUIRES_STENCIL_REF 0x00000200 +#define D3D_SHADER_REQUIRES_INNER_COVERAGE 0x00000400 +#define D3D_SHADER_REQUIRES_TYPED_UAV_LOAD_ADDITIONAL_FORMATS 0x00000800 +#define D3D_SHADER_REQUIRES_ROVS 0x00001000 +#define D3D_SHADER_REQUIRES_VIEWPORT_AND_RT_ARRAY_INDEX_FROM_ANY_SHADER_FEEDING_RASTERIZER 0x00002000 + + +typedef struct _D3D12_LIBRARY_DESC +{ + LPCSTR Creator; // The name of the originator of the library. + UINT Flags; // Compilation flags. + UINT FunctionCount; // Number of functions exported from the library. +} D3D12_LIBRARY_DESC; + +typedef struct _D3D12_FUNCTION_DESC +{ + UINT Version; // Shader version + LPCSTR Creator; // Creator string + UINT Flags; // Shader compilation/parse flags + + UINT ConstantBuffers; // Number of constant buffers + UINT BoundResources; // Number of bound resources + + UINT InstructionCount; // Number of emitted instructions + UINT TempRegisterCount; // Number of temporary registers used + UINT TempArrayCount; // Number of temporary arrays used + UINT DefCount; // Number of constant defines + UINT DclCount; // Number of declarations (input + output) + UINT TextureNormalInstructions; // Number of non-categorized texture instructions + UINT TextureLoadInstructions; // Number of texture load instructions + UINT TextureCompInstructions; // Number of texture comparison instructions + UINT TextureBiasInstructions; // Number of texture bias instructions + UINT TextureGradientInstructions; // Number of texture gradient instructions + UINT FloatInstructionCount; // Number of floating point arithmetic instructions used + UINT IntInstructionCount; // Number of signed integer arithmetic instructions used + UINT UintInstructionCount; // Number of unsigned integer arithmetic instructions used + UINT StaticFlowControlCount; // Number of static flow control instructions used + UINT DynamicFlowControlCount; // Number of dynamic flow control instructions used + UINT MacroInstructionCount; // Number of macro instructions used + UINT ArrayInstructionCount; // Number of array instructions used + UINT MovInstructionCount; // Number of mov instructions used + UINT MovcInstructionCount; // Number of movc instructions used + UINT ConversionInstructionCount; // Number of type conversion instructions used + UINT BitwiseInstructionCount; // Number of bitwise arithmetic instructions used + D3D_FEATURE_LEVEL MinFeatureLevel; // Min target of the function byte code + UINT64 RequiredFeatureFlags; // Required feature flags + + LPCSTR Name; // Function name + INT FunctionParameterCount; // Number of logical parameters in the function signature (not including return) + BOOL HasReturn; // TRUE, if function returns a value, false - it is a subroutine + BOOL Has10Level9VertexShader; // TRUE, if there is a 10L9 VS blob + BOOL Has10Level9PixelShader; // TRUE, if there is a 10L9 PS blob +} D3D12_FUNCTION_DESC; + +typedef struct _D3D12_PARAMETER_DESC +{ + LPCSTR Name; // Parameter name. + LPCSTR SemanticName; // Parameter semantic name (+index). + D3D_SHADER_VARIABLE_TYPE Type; // Element type. + D3D_SHADER_VARIABLE_CLASS Class; // Scalar/Vector/Matrix. + UINT Rows; // Rows are for matrix parameters. + UINT Columns; // Components or Columns in matrix. + D3D_INTERPOLATION_MODE InterpolationMode; // Interpolation mode. + D3D_PARAMETER_FLAGS Flags; // Parameter modifiers. + + UINT FirstInRegister; // The first input register for this parameter. + UINT FirstInComponent; // The first input register component for this parameter. + UINT FirstOutRegister; // The first output register for this parameter. + UINT FirstOutComponent; // The first output register component for this parameter. +} D3D12_PARAMETER_DESC; + + +////////////////////////////////////////////////////////////////////////////// +// Interfaces //////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +typedef interface ID3D12ShaderReflectionType ID3D12ShaderReflectionType; +typedef interface ID3D12ShaderReflectionType *LPD3D12SHADERREFLECTIONTYPE; + +typedef interface ID3D12ShaderReflectionVariable ID3D12ShaderReflectionVariable; +typedef interface ID3D12ShaderReflectionVariable *LPD3D12SHADERREFLECTIONVARIABLE; + +typedef interface ID3D12ShaderReflectionConstantBuffer ID3D12ShaderReflectionConstantBuffer; +typedef interface ID3D12ShaderReflectionConstantBuffer *LPD3D12SHADERREFLECTIONCONSTANTBUFFER; + +typedef interface ID3D12ShaderReflection ID3D12ShaderReflection; +typedef interface ID3D12ShaderReflection *LPD3D12SHADERREFLECTION; + +typedef interface ID3D12LibraryReflection ID3D12LibraryReflection; +typedef interface ID3D12LibraryReflection *LPD3D12LIBRARYREFLECTION; + +typedef interface ID3D12FunctionReflection ID3D12FunctionReflection; +typedef interface ID3D12FunctionReflection *LPD3D12FUNCTIONREFLECTION; + +typedef interface ID3D12FunctionParameterReflection ID3D12FunctionParameterReflection; +typedef interface ID3D12FunctionParameterReflection *LPD3D12FUNCTIONPARAMETERREFLECTION; + + +// {E913C351-783D-48CA-A1D1-4F306284AD56} +interface DECLSPEC_UUID("E913C351-783D-48CA-A1D1-4F306284AD56") ID3D12ShaderReflectionType; +DEFINE_GUID(IID_ID3D12ShaderReflectionType, +0xe913c351, 0x783d, 0x48ca, 0xa1, 0xd1, 0x4f, 0x30, 0x62, 0x84, 0xad, 0x56); + +#undef INTERFACE +#define INTERFACE ID3D12ShaderReflectionType + +DECLARE_INTERFACE(ID3D12ShaderReflectionType) +{ + STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_SHADER_TYPE_DESC *pDesc) PURE; + + STDMETHOD_(ID3D12ShaderReflectionType*, GetMemberTypeByIndex)(THIS_ _In_ UINT Index) PURE; + STDMETHOD_(ID3D12ShaderReflectionType*, GetMemberTypeByName)(THIS_ _In_ LPCSTR Name) PURE; + STDMETHOD_(LPCSTR, GetMemberTypeName)(THIS_ _In_ UINT Index) PURE; + + STDMETHOD(IsEqual)(THIS_ _In_ ID3D12ShaderReflectionType* pType) PURE; + STDMETHOD_(ID3D12ShaderReflectionType*, GetSubType)(THIS) PURE; + STDMETHOD_(ID3D12ShaderReflectionType*, GetBaseClass)(THIS) PURE; + STDMETHOD_(UINT, GetNumInterfaces)(THIS) PURE; + STDMETHOD_(ID3D12ShaderReflectionType*, GetInterfaceByIndex)(THIS_ _In_ UINT uIndex) PURE; + STDMETHOD(IsOfType)(THIS_ _In_ ID3D12ShaderReflectionType* pType) PURE; + STDMETHOD(ImplementsInterface)(THIS_ _In_ ID3D12ShaderReflectionType* pBase) PURE; +}; + +// {8337A8A6-A216-444A-B2F4-314733A73AEA} +interface DECLSPEC_UUID("8337A8A6-A216-444A-B2F4-314733A73AEA") ID3D12ShaderReflectionVariable; +DEFINE_GUID(IID_ID3D12ShaderReflectionVariable, +0x8337a8a6, 0xa216, 0x444a, 0xb2, 0xf4, 0x31, 0x47, 0x33, 0xa7, 0x3a, 0xea); + +#undef INTERFACE +#define INTERFACE ID3D12ShaderReflectionVariable + +DECLARE_INTERFACE(ID3D12ShaderReflectionVariable) +{ + STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_SHADER_VARIABLE_DESC *pDesc) PURE; + + STDMETHOD_(ID3D12ShaderReflectionType*, GetType)(THIS) PURE; + STDMETHOD_(ID3D12ShaderReflectionConstantBuffer*, GetBuffer)(THIS) PURE; + + STDMETHOD_(UINT, GetInterfaceSlot)(THIS_ _In_ UINT uArrayIndex) PURE; +}; + +// {C59598B4-48B3-4869-B9B1-B1618B14A8B7} +interface DECLSPEC_UUID("C59598B4-48B3-4869-B9B1-B1618B14A8B7") ID3D12ShaderReflectionConstantBuffer; +DEFINE_GUID(IID_ID3D12ShaderReflectionConstantBuffer, +0xc59598b4, 0x48b3, 0x4869, 0xb9, 0xb1, 0xb1, 0x61, 0x8b, 0x14, 0xa8, 0xb7); + +#undef INTERFACE +#define INTERFACE ID3D12ShaderReflectionConstantBuffer + +DECLARE_INTERFACE(ID3D12ShaderReflectionConstantBuffer) +{ + STDMETHOD(GetDesc)(THIS_ D3D12_SHADER_BUFFER_DESC *pDesc) PURE; + + STDMETHOD_(ID3D12ShaderReflectionVariable*, GetVariableByIndex)(THIS_ _In_ UINT Index) PURE; + STDMETHOD_(ID3D12ShaderReflectionVariable*, GetVariableByName)(THIS_ _In_ LPCSTR Name) PURE; +}; + +// The ID3D12ShaderReflection IID may change from SDK version to SDK version +// if the reflection API changes. This prevents new code with the new API +// from working with an old binary. Recompiling with the new header +// will pick up the new IID. + +// {5A58797D-A72C-478D-8BA2-EFC6B0EFE88E} +interface DECLSPEC_UUID("5A58797D-A72C-478D-8BA2-EFC6B0EFE88E") ID3D12ShaderReflection; +DEFINE_GUID(IID_ID3D12ShaderReflection, +0x5a58797d, 0xa72c, 0x478d, 0x8b, 0xa2, 0xef, 0xc6, 0xb0, 0xef, 0xe8, 0x8e); + +#undef INTERFACE +#define INTERFACE ID3D12ShaderReflection + +DECLARE_INTERFACE_(ID3D12ShaderReflection, IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ _In_ REFIID iid, + _Out_ LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_SHADER_DESC *pDesc) PURE; + + STDMETHOD_(ID3D12ShaderReflectionConstantBuffer*, GetConstantBufferByIndex)(THIS_ _In_ UINT Index) PURE; + STDMETHOD_(ID3D12ShaderReflectionConstantBuffer*, GetConstantBufferByName)(THIS_ _In_ LPCSTR Name) PURE; + + STDMETHOD(GetResourceBindingDesc)(THIS_ _In_ UINT ResourceIndex, + _Out_ D3D12_SHADER_INPUT_BIND_DESC *pDesc) PURE; + + STDMETHOD(GetInputParameterDesc)(THIS_ _In_ UINT ParameterIndex, + _Out_ D3D12_SIGNATURE_PARAMETER_DESC *pDesc) PURE; + STDMETHOD(GetOutputParameterDesc)(THIS_ _In_ UINT ParameterIndex, + _Out_ D3D12_SIGNATURE_PARAMETER_DESC *pDesc) PURE; + STDMETHOD(GetPatchConstantParameterDesc)(THIS_ _In_ UINT ParameterIndex, + _Out_ D3D12_SIGNATURE_PARAMETER_DESC *pDesc) PURE; + + STDMETHOD_(ID3D12ShaderReflectionVariable*, GetVariableByName)(THIS_ _In_ LPCSTR Name) PURE; + + STDMETHOD(GetResourceBindingDescByName)(THIS_ _In_ LPCSTR Name, + _Out_ D3D12_SHADER_INPUT_BIND_DESC *pDesc) PURE; + + STDMETHOD_(UINT, GetMovInstructionCount)(THIS) PURE; + STDMETHOD_(UINT, GetMovcInstructionCount)(THIS) PURE; + STDMETHOD_(UINT, GetConversionInstructionCount)(THIS) PURE; + STDMETHOD_(UINT, GetBitwiseInstructionCount)(THIS) PURE; + + STDMETHOD_(D3D_PRIMITIVE, GetGSInputPrimitive)(THIS) PURE; + STDMETHOD_(BOOL, IsSampleFrequencyShader)(THIS) PURE; + + STDMETHOD_(UINT, GetNumInterfaceSlots)(THIS) PURE; + STDMETHOD(GetMinFeatureLevel)(THIS_ _Out_ enum D3D_FEATURE_LEVEL* pLevel) PURE; + + STDMETHOD_(UINT, GetThreadGroupSize)(THIS_ + _Out_opt_ UINT* pSizeX, + _Out_opt_ UINT* pSizeY, + _Out_opt_ UINT* pSizeZ) PURE; + + STDMETHOD_(UINT64, GetRequiresFlags)(THIS) PURE; +}; + +// {8E349D19-54DB-4A56-9DC9-119D87BDB804} +interface DECLSPEC_UUID("8E349D19-54DB-4A56-9DC9-119D87BDB804") ID3D12LibraryReflection; +DEFINE_GUID(IID_ID3D12LibraryReflection, +0x8e349d19, 0x54db, 0x4a56, 0x9d, 0xc9, 0x11, 0x9d, 0x87, 0xbd, 0xb8, 0x4); + +#undef INTERFACE +#define INTERFACE ID3D12LibraryReflection + +DECLARE_INTERFACE_(ID3D12LibraryReflection, IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ _In_ REFIID iid, _Out_ LPVOID * ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_LIBRARY_DESC * pDesc) PURE; + + STDMETHOD_(ID3D12FunctionReflection *, GetFunctionByIndex)(THIS_ _In_ INT FunctionIndex) PURE; +}; + +// {1108795C-2772-4BA9-B2A8-D464DC7E2799} +interface DECLSPEC_UUID("1108795C-2772-4BA9-B2A8-D464DC7E2799") ID3D12FunctionReflection; +DEFINE_GUID(IID_ID3D12FunctionReflection, +0x1108795c, 0x2772, 0x4ba9, 0xb2, 0xa8, 0xd4, 0x64, 0xdc, 0x7e, 0x27, 0x99); + +#undef INTERFACE +#define INTERFACE ID3D12FunctionReflection + +DECLARE_INTERFACE(ID3D12FunctionReflection) +{ + STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_FUNCTION_DESC * pDesc) PURE; + + STDMETHOD_(ID3D12ShaderReflectionConstantBuffer *, GetConstantBufferByIndex)(THIS_ _In_ UINT BufferIndex) PURE; + STDMETHOD_(ID3D12ShaderReflectionConstantBuffer *, GetConstantBufferByName)(THIS_ _In_ LPCSTR Name) PURE; + + STDMETHOD(GetResourceBindingDesc)(THIS_ _In_ UINT ResourceIndex, + _Out_ D3D12_SHADER_INPUT_BIND_DESC * pDesc) PURE; + + STDMETHOD_(ID3D12ShaderReflectionVariable *, GetVariableByName)(THIS_ _In_ LPCSTR Name) PURE; + + STDMETHOD(GetResourceBindingDescByName)(THIS_ _In_ LPCSTR Name, + _Out_ D3D12_SHADER_INPUT_BIND_DESC * pDesc) PURE; + + // Use D3D_RETURN_PARAMETER_INDEX to get description of the return value. + STDMETHOD_(ID3D12FunctionParameterReflection *, GetFunctionParameter)(THIS_ _In_ INT ParameterIndex) PURE; +}; + +// {EC25F42D-7006-4F2B-B33E-02CC3375733F} +interface DECLSPEC_UUID("EC25F42D-7006-4F2B-B33E-02CC3375733F") ID3D12FunctionParameterReflection; +DEFINE_GUID(IID_ID3D12FunctionParameterReflection, +0xec25f42d, 0x7006, 0x4f2b, 0xb3, 0x3e, 0x2, 0xcc, 0x33, 0x75, 0x73, 0x3f); + +#undef INTERFACE +#define INTERFACE ID3D12FunctionParameterReflection + +DECLARE_INTERFACE(ID3D12FunctionParameterReflection) +{ + STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_PARAMETER_DESC * pDesc) PURE; +}; + + +////////////////////////////////////////////////////////////////////////////// +// APIs ////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + +#ifdef __cplusplus +} +#endif //__cplusplus + +#endif //__D3D12SHADER_H__ + diff --git a/gfx/include/dxsdk/d3d12video.h b/gfx/include/dxsdk/d3d12video.h new file mode 100644 index 0000000000..daa4bdd1f7 --- /dev/null +++ b/gfx/include/dxsdk/d3d12video.h @@ -0,0 +1,1842 @@ +/*------------------------------------------------------------------------------------- + * + * Copyright (c) Microsoft Corporation + * + *-------------------------------------------------------------------------------------*/ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __d3d12video_h__ +#define __d3d12video_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __ID3D12VideoDecoderHeap_FWD_DEFINED__ +#define __ID3D12VideoDecoderHeap_FWD_DEFINED__ +typedef interface ID3D12VideoDecoderHeap ID3D12VideoDecoderHeap; + +#endif /* __ID3D12VideoDecoderHeap_FWD_DEFINED__ */ + + +#ifndef __ID3D12VideoDevice_FWD_DEFINED__ +#define __ID3D12VideoDevice_FWD_DEFINED__ +typedef interface ID3D12VideoDevice ID3D12VideoDevice; + +#endif /* __ID3D12VideoDevice_FWD_DEFINED__ */ + + +#ifndef __ID3D12VideoDecoder_FWD_DEFINED__ +#define __ID3D12VideoDecoder_FWD_DEFINED__ +typedef interface ID3D12VideoDecoder ID3D12VideoDecoder; + +#endif /* __ID3D12VideoDecoder_FWD_DEFINED__ */ + + +#ifndef __ID3D12VideoProcessor_FWD_DEFINED__ +#define __ID3D12VideoProcessor_FWD_DEFINED__ +typedef interface ID3D12VideoProcessor ID3D12VideoProcessor; + +#endif /* __ID3D12VideoProcessor_FWD_DEFINED__ */ + + +#ifndef __ID3D12VideoDecodeCommandList_FWD_DEFINED__ +#define __ID3D12VideoDecodeCommandList_FWD_DEFINED__ +typedef interface ID3D12VideoDecodeCommandList ID3D12VideoDecodeCommandList; + +#endif /* __ID3D12VideoDecodeCommandList_FWD_DEFINED__ */ + + +#ifndef __ID3D12VideoProcessCommandList_FWD_DEFINED__ +#define __ID3D12VideoProcessCommandList_FWD_DEFINED__ +typedef interface ID3D12VideoProcessCommandList ID3D12VideoProcessCommandList; + +#endif /* __ID3D12VideoProcessCommandList_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "dxgicommon.h" +#include "d3d12.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_d3d12video_0000_0000 */ +/* [local] */ + +/*#include */ +/*#pragma region App Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ +typedef +enum D3D12_VIDEO_FIELD_TYPE + { + D3D12_VIDEO_FIELD_TYPE_NONE = 0, + D3D12_VIDEO_FIELD_TYPE_INTERLACED_TOP_FIELD_FIRST = 1, + D3D12_VIDEO_FIELD_TYPE_INTERLACED_BOTTOM_FIELD_FIRST = 2 + } D3D12_VIDEO_FIELD_TYPE; + +typedef +enum D3D12_VIDEO_FRAME_STEREO_FORMAT + { + D3D12_VIDEO_FRAME_STEREO_FORMAT_NONE = 0, + D3D12_VIDEO_FRAME_STEREO_FORMAT_MONO = 1, + D3D12_VIDEO_FRAME_STEREO_FORMAT_HORIZONTAL = 2, + D3D12_VIDEO_FRAME_STEREO_FORMAT_VERTICAL = 3, + D3D12_VIDEO_FRAME_STEREO_FORMAT_SEPARATE = 4 + } D3D12_VIDEO_FRAME_STEREO_FORMAT; + +typedef struct D3D12_VIDEO_FORMAT + { + DXGI_FORMAT Format; + DXGI_COLOR_SPACE_TYPE ColorSpace; + } D3D12_VIDEO_FORMAT; + +typedef struct D3D12_VIDEO_SAMPLE + { + UINT Width; + UINT Height; + D3D12_VIDEO_FORMAT Format; + } D3D12_VIDEO_SAMPLE; + +typedef +enum D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE + { + D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE_NONE = 0, + D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE_FIELD_BASED = 1 + } D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE; + +typedef +enum D3D12_FEATURE_VIDEO + { + D3D12_FEATURE_VIDEO_DECODE_SUPPORT = 0, + D3D12_FEATURE_VIDEO_DECODE_PROFILES = 1, + D3D12_FEATURE_VIDEO_DECODE_FORMATS = 2, + D3D12_FEATURE_VIDEO_DECODE_CONVERSION_SUPPORT = 3, + D3D12_FEATURE_VIDEO_PROCESS_SUPPORT = 5, + D3D12_FEATURE_VIDEO_PROCESS_MAX_INPUT_STREAMS = 6, + D3D12_FEATURE_VIDEO_PROCESS_REFERENCE_INFO = 7, + D3D12_FEATURE_VIDEO_DECODER_HEAP_SIZE = 8, + D3D12_FEATURE_VIDEO_PROCESSOR_SIZE = 9, + D3D12_FEATURE_VIDEO_DECODE_PROFILE_COUNT = 10, + D3D12_FEATURE_VIDEO_DECODE_FORMAT_COUNT = 11, + D3D12_FEATURE_VIDEO_ARCHITECTURE = 17 + } D3D12_FEATURE_VIDEO; + +typedef +enum D3D12_BITSTREAM_ENCRYPTION_TYPE + { + D3D12_BITSTREAM_ENCRYPTION_TYPE_NONE = 0 + } D3D12_BITSTREAM_ENCRYPTION_TYPE; + +typedef struct D3D12_VIDEO_DECODE_CONFIGURATION + { + GUID DecodeProfile; + D3D12_BITSTREAM_ENCRYPTION_TYPE BitstreamEncryption; + D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE InterlaceType; + } D3D12_VIDEO_DECODE_CONFIGURATION; + +typedef struct D3D12_VIDEO_DECODER_DESC + { + UINT NodeMask; + D3D12_VIDEO_DECODE_CONFIGURATION Configuration; + } D3D12_VIDEO_DECODER_DESC; + +typedef struct D3D12_VIDEO_DECODER_HEAP_DESC + { + UINT NodeMask; + D3D12_VIDEO_DECODE_CONFIGURATION Configuration; + UINT DecodeWidth; + UINT DecodeHeight; + DXGI_FORMAT Format; + DXGI_RATIONAL FrameRate; + UINT BitRate; + UINT MaxDecodePictureBufferCount; + } D3D12_VIDEO_DECODER_HEAP_DESC; + +typedef struct D3D12_VIDEO_SIZE_RANGE + { + UINT MaxWidth; + UINT MaxHeight; + UINT MinWidth; + UINT MinHeight; + } D3D12_VIDEO_SIZE_RANGE; + +typedef +enum D3D12_VIDEO_PROCESS_FILTER + { + D3D12_VIDEO_PROCESS_FILTER_BRIGHTNESS = 0, + D3D12_VIDEO_PROCESS_FILTER_CONTRAST = 1, + D3D12_VIDEO_PROCESS_FILTER_HUE = 2, + D3D12_VIDEO_PROCESS_FILTER_SATURATION = 3, + D3D12_VIDEO_PROCESS_FILTER_NOISE_REDUCTION = 4, + D3D12_VIDEO_PROCESS_FILTER_EDGE_ENHANCEMENT = 5, + D3D12_VIDEO_PROCESS_FILTER_ANAMORPHIC_SCALING = 6, + D3D12_VIDEO_PROCESS_FILTER_STEREO_ADJUSTMENT = 7 + } D3D12_VIDEO_PROCESS_FILTER; + +typedef +enum D3D12_VIDEO_PROCESS_FILTER_FLAGS + { + D3D12_VIDEO_PROCESS_FILTER_FLAG_NONE = 0, + D3D12_VIDEO_PROCESS_FILTER_FLAG_BRIGHTNESS = ( 1 << D3D12_VIDEO_PROCESS_FILTER_BRIGHTNESS ) , + D3D12_VIDEO_PROCESS_FILTER_FLAG_CONTRAST = ( 1 << D3D12_VIDEO_PROCESS_FILTER_CONTRAST ) , + D3D12_VIDEO_PROCESS_FILTER_FLAG_HUE = ( 1 << D3D12_VIDEO_PROCESS_FILTER_HUE ) , + D3D12_VIDEO_PROCESS_FILTER_FLAG_SATURATION = ( 1 << D3D12_VIDEO_PROCESS_FILTER_SATURATION ) , + D3D12_VIDEO_PROCESS_FILTER_FLAG_NOISE_REDUCTION = ( 1 << D3D12_VIDEO_PROCESS_FILTER_NOISE_REDUCTION ) , + D3D12_VIDEO_PROCESS_FILTER_FLAG_EDGE_ENHANCEMENT = ( 1 << D3D12_VIDEO_PROCESS_FILTER_EDGE_ENHANCEMENT ) , + D3D12_VIDEO_PROCESS_FILTER_FLAG_ANAMORPHIC_SCALING = ( 1 << D3D12_VIDEO_PROCESS_FILTER_ANAMORPHIC_SCALING ) , + D3D12_VIDEO_PROCESS_FILTER_FLAG_STEREO_ADJUSTMENT = ( 1 << D3D12_VIDEO_PROCESS_FILTER_STEREO_ADJUSTMENT ) + } D3D12_VIDEO_PROCESS_FILTER_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_PROCESS_FILTER_FLAGS ); +typedef +enum D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS + { + D3D12_VIDEO_PROCESS_DEINTERLACE_FLAG_NONE = 0, + D3D12_VIDEO_PROCESS_DEINTERLACE_FLAG_BOB = 0x1, + D3D12_VIDEO_PROCESS_DEINTERLACE_FLAG_CUSTOM = 0x80000000 + } D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS ); +typedef struct D3D12_VIDEO_PROCESS_ALPHA_BLENDING + { + BOOL Enable; + FLOAT Alpha; + } D3D12_VIDEO_PROCESS_ALPHA_BLENDING; + +typedef struct D3D12_VIDEO_PROCESS_LUMA_KEY + { + BOOL Enable; + FLOAT Lower; + FLOAT Upper; + } D3D12_VIDEO_PROCESS_LUMA_KEY; + +typedef struct D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC + { + DXGI_FORMAT Format; + DXGI_COLOR_SPACE_TYPE ColorSpace; + DXGI_RATIONAL SourceAspectRatio; + DXGI_RATIONAL DestinationAspectRatio; + DXGI_RATIONAL FrameRate; + D3D12_VIDEO_SIZE_RANGE SourceSizeRange; + D3D12_VIDEO_SIZE_RANGE DestinationSizeRange; + BOOL EnableOrientation; + D3D12_VIDEO_PROCESS_FILTER_FLAGS FilterFlags; + D3D12_VIDEO_FRAME_STEREO_FORMAT StereoFormat; + D3D12_VIDEO_FIELD_TYPE FieldType; + D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS DeinterlaceMode; + BOOL EnableAlphaBlending; + D3D12_VIDEO_PROCESS_LUMA_KEY LumaKey; + UINT NumPastFrames; + UINT NumFutureFrames; + BOOL EnableAutoProcessing; + } D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC; + +typedef +enum D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE + { + D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE_OPAQUE = 0, + D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE_BACKGROUND = 1, + D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE_DESTINATION = 2, + D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE_SOURCE_STREAM = 3 + } D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE; + +typedef struct D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC + { + DXGI_FORMAT Format; + DXGI_COLOR_SPACE_TYPE ColorSpace; + D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE AlphaFillMode; + UINT AlphaFillModeSourceStreamIndex; + FLOAT BackgroundColor[ 4 ]; + DXGI_RATIONAL FrameRate; + BOOL EnableStereo; + } D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0000_v0_0_s_ifspec; + +#ifndef __ID3D12VideoDecoderHeap_INTERFACE_DEFINED__ +#define __ID3D12VideoDecoderHeap_INTERFACE_DEFINED__ + +/* interface ID3D12VideoDecoderHeap */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12VideoDecoderHeap; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("0946B7C9-EBF6-4047-BB73-8683E27DBB1F") + ID3D12VideoDecoderHeap : public ID3D12Pageable + { + public: + virtual D3D12_VIDEO_DECODER_HEAP_DESC STDMETHODCALLTYPE GetDesc( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12VideoDecoderHeapVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12VideoDecoderHeap * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12VideoDecoderHeap * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12VideoDecoderHeap * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12VideoDecoderHeap * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12VideoDecoderHeap * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12VideoDecoderHeap * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12VideoDecoderHeap * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12VideoDecoderHeap * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + D3D12_VIDEO_DECODER_HEAP_DESC ( STDMETHODCALLTYPE *GetDesc )( + ID3D12VideoDecoderHeap * This); + + END_INTERFACE + } ID3D12VideoDecoderHeapVtbl; + + interface ID3D12VideoDecoderHeap + { + CONST_VTBL struct ID3D12VideoDecoderHeapVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12VideoDecoderHeap_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12VideoDecoderHeap_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12VideoDecoderHeap_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12VideoDecoderHeap_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12VideoDecoderHeap_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12VideoDecoderHeap_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12VideoDecoderHeap_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12VideoDecoderHeap_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + + +#define ID3D12VideoDecoderHeap_GetDesc(This) \ + ( (This)->lpVtbl -> GetDesc(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + + + + + +#endif /* __ID3D12VideoDecoderHeap_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12VideoDevice_INTERFACE_DEFINED__ +#define __ID3D12VideoDevice_INTERFACE_DEFINED__ + +/* interface ID3D12VideoDevice */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12VideoDevice; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1F052807-0B46-4ACC-8A89-364F793718A4") + ID3D12VideoDevice : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE CheckFeatureSupport( + D3D12_FEATURE_VIDEO FeatureVideo, + _Inout_updates_bytes_(FeatureSupportDataSize) void *pFeatureSupportData, + UINT FeatureSupportDataSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateVideoDecoder( + _In_ const D3D12_VIDEO_DECODER_DESC *pDesc, + _In_ REFIID riid, + _COM_Outptr_ void **ppVideoDecoder) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateVideoDecoderHeap( + _In_ const D3D12_VIDEO_DECODER_HEAP_DESC *pVideoDecoderHeapDesc, + _In_ REFIID riid, + _COM_Outptr_ void **ppVideoDecoderHeap) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateVideoProcessor( + UINT NodeMask, + _In_ const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC *pOutputStreamDesc, + UINT NumInputStreamDescs, + _In_reads_(NumInputStreamDescs) const D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC *pInputStreamDescs, + _In_ REFIID riid, + _COM_Outptr_ void **ppVideoProcessor) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12VideoDeviceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12VideoDevice * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12VideoDevice * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12VideoDevice * This); + + HRESULT ( STDMETHODCALLTYPE *CheckFeatureSupport )( + ID3D12VideoDevice * This, + D3D12_FEATURE_VIDEO FeatureVideo, + _Inout_updates_bytes_(FeatureSupportDataSize) void *pFeatureSupportData, + UINT FeatureSupportDataSize); + + HRESULT ( STDMETHODCALLTYPE *CreateVideoDecoder )( + ID3D12VideoDevice * This, + _In_ const D3D12_VIDEO_DECODER_DESC *pDesc, + _In_ REFIID riid, + _COM_Outptr_ void **ppVideoDecoder); + + HRESULT ( STDMETHODCALLTYPE *CreateVideoDecoderHeap )( + ID3D12VideoDevice * This, + _In_ const D3D12_VIDEO_DECODER_HEAP_DESC *pVideoDecoderHeapDesc, + _In_ REFIID riid, + _COM_Outptr_ void **ppVideoDecoderHeap); + + HRESULT ( STDMETHODCALLTYPE *CreateVideoProcessor )( + ID3D12VideoDevice * This, + UINT NodeMask, + _In_ const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC *pOutputStreamDesc, + UINT NumInputStreamDescs, + _In_reads_(NumInputStreamDescs) const D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC *pInputStreamDescs, + _In_ REFIID riid, + _COM_Outptr_ void **ppVideoProcessor); + + END_INTERFACE + } ID3D12VideoDeviceVtbl; + + interface ID3D12VideoDevice + { + CONST_VTBL struct ID3D12VideoDeviceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12VideoDevice_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12VideoDevice_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12VideoDevice_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12VideoDevice_CheckFeatureSupport(This,FeatureVideo,pFeatureSupportData,FeatureSupportDataSize) \ + ( (This)->lpVtbl -> CheckFeatureSupport(This,FeatureVideo,pFeatureSupportData,FeatureSupportDataSize) ) + +#define ID3D12VideoDevice_CreateVideoDecoder(This,pDesc,riid,ppVideoDecoder) \ + ( (This)->lpVtbl -> CreateVideoDecoder(This,pDesc,riid,ppVideoDecoder) ) + +#define ID3D12VideoDevice_CreateVideoDecoderHeap(This,pVideoDecoderHeapDesc,riid,ppVideoDecoderHeap) \ + ( (This)->lpVtbl -> CreateVideoDecoderHeap(This,pVideoDecoderHeapDesc,riid,ppVideoDecoderHeap) ) + +#define ID3D12VideoDevice_CreateVideoProcessor(This,NodeMask,pOutputStreamDesc,NumInputStreamDescs,pInputStreamDescs,riid,ppVideoProcessor) \ + ( (This)->lpVtbl -> CreateVideoProcessor(This,NodeMask,pOutputStreamDesc,NumInputStreamDescs,pInputStreamDescs,riid,ppVideoProcessor) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12VideoDevice_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12VideoDecoder_INTERFACE_DEFINED__ +#define __ID3D12VideoDecoder_INTERFACE_DEFINED__ + +/* interface ID3D12VideoDecoder */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12VideoDecoder; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C59B6BDC-7720-4074-A136-17A156037470") + ID3D12VideoDecoder : public ID3D12Pageable + { + public: + virtual D3D12_VIDEO_DECODER_DESC STDMETHODCALLTYPE GetDesc( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12VideoDecoderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12VideoDecoder * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12VideoDecoder * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12VideoDecoder * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12VideoDecoder * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12VideoDecoder * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12VideoDecoder * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12VideoDecoder * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12VideoDecoder * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + D3D12_VIDEO_DECODER_DESC ( STDMETHODCALLTYPE *GetDesc )( + ID3D12VideoDecoder * This); + + END_INTERFACE + } ID3D12VideoDecoderVtbl; + + interface ID3D12VideoDecoder + { + CONST_VTBL struct ID3D12VideoDecoderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12VideoDecoder_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12VideoDecoder_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12VideoDecoder_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12VideoDecoder_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12VideoDecoder_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12VideoDecoder_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12VideoDecoder_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12VideoDecoder_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + + +#define ID3D12VideoDecoder_GetDesc(This) \ + ( (This)->lpVtbl -> GetDesc(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + + + + + +#endif /* __ID3D12VideoDecoder_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12video_0000_0003 */ +/* [local] */ + +typedef +enum D3D12_VIDEO_DECODE_TIER + { + D3D12_VIDEO_DECODE_TIER_NOT_SUPPORTED = 0, + D3D12_VIDEO_DECODE_TIER_1 = 1, + D3D12_VIDEO_DECODE_TIER_2 = 2, + D3D12_VIDEO_DECODE_TIER_3 = 3 + } D3D12_VIDEO_DECODE_TIER; + +typedef +enum D3D12_VIDEO_DECODE_SUPPORT_FLAGS + { + D3D12_VIDEO_DECODE_SUPPORT_FLAG_NONE = 0, + D3D12_VIDEO_DECODE_SUPPORT_FLAG_SUPPORTED = 0x1 + } D3D12_VIDEO_DECODE_SUPPORT_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_DECODE_SUPPORT_FLAGS ); +typedef +enum D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS + { + D3D12_VIDEO_DECODE_CONFIGURATION_FLAG_NONE = 0, + D3D12_VIDEO_DECODE_CONFIGURATION_FLAG_HEIGHT_ALIGNMENT_MULTIPLE_32_REQUIRED = 0x1, + D3D12_VIDEO_DECODE_CONFIGURATION_FLAG_POST_PROCESSING_SUPPORTED = 0x2, + D3D12_VIDEO_DECODE_CONFIGURATION_FLAG_REFERENCE_ONLY_ALLOCATIONS_REQUIRED = 0x4, + D3D12_VIDEO_DECODE_CONFIGURATION_FLAG_ALLOW_RESOLUTION_CHANGE_ON_NON_KEY_FRAME = 0x8 + } D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS ); +typedef +enum D3D12_VIDEO_DECODE_STATUS + { + D3D12_VIDEO_DECODE_STATUS_OK = 0, + D3D12_VIDEO_DECODE_STATUS_CONTINUE = 1, + D3D12_VIDEO_DECODE_STATUS_CONTINUE_SKIP_DISPLAY = 2, + D3D12_VIDEO_DECODE_STATUS_RESTART = 3 + } D3D12_VIDEO_DECODE_STATUS; + +typedef +enum D3D12_VIDEO_DECODE_ARGUMENT_TYPE + { + D3D12_VIDEO_DECODE_ARGUMENT_TYPE_PICTURE_PARAMETERS = 0, + D3D12_VIDEO_DECODE_ARGUMENT_TYPE_INVERSE_QUANTIZATION_MATRIX = 1, + D3D12_VIDEO_DECODE_ARGUMENT_TYPE_SLICE_CONTROL = 2, + D3D12_VIDEO_DECODE_ARGUMENT_TYPE_MAX_VALID = 3 + } D3D12_VIDEO_DECODE_ARGUMENT_TYPE; + +typedef struct D3D12_FEATURE_DATA_VIDEO_DECODE_SUPPORT + { + UINT NodeIndex; + D3D12_VIDEO_DECODE_CONFIGURATION Configuration; + UINT Width; + UINT Height; + DXGI_FORMAT DecodeFormat; + DXGI_RATIONAL FrameRate; + UINT BitRate; + D3D12_VIDEO_DECODE_SUPPORT_FLAGS SupportFlags; + D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS ConfigurationFlags; + D3D12_VIDEO_DECODE_TIER DecodeTier; + } D3D12_FEATURE_DATA_VIDEO_DECODE_SUPPORT; + +typedef struct D3D12_FEATURE_DATA_VIDEO_DECODE_PROFILE_COUNT + { + UINT NodeIndex; + UINT ProfileCount; + } D3D12_FEATURE_DATA_VIDEO_DECODE_PROFILE_COUNT; + +typedef struct D3D12_FEATURE_DATA_VIDEO_DECODE_PROFILES + { + UINT NodeIndex; + UINT ProfileCount; + _Field_size_full_(ProfileCount) GUID *pProfiles; + } D3D12_FEATURE_DATA_VIDEO_DECODE_PROFILES; + +typedef struct D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT + { + UINT NodeIndex; + D3D12_VIDEO_DECODE_CONFIGURATION Configuration; + UINT FormatCount; + } D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT; + +typedef struct D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS + { + UINT NodeIndex; + D3D12_VIDEO_DECODE_CONFIGURATION Configuration; + UINT FormatCount; + _Field_size_full_(FormatCount) DXGI_FORMAT *pOutputFormats; + } D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS; + +typedef struct D3D12_FEATURE_DATA_VIDEO_ARCHITECTURE + { + BOOL IOCoherent; + } D3D12_FEATURE_DATA_VIDEO_ARCHITECTURE; + +typedef +enum D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS + { + D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAG_NONE = 0, + D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAG_SUPPORTED = 0x1 + } D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS ); +typedef +enum D3D12_VIDEO_SCALE_SUPPORT_FLAGS + { + D3D12_VIDEO_SCALE_SUPPORT_FLAG_NONE = 0, + D3D12_VIDEO_SCALE_SUPPORT_FLAG_POW2_ONLY = 0x1, + D3D12_VIDEO_SCALE_SUPPORT_FLAG_EVEN_DIMENSIONS_ONLY = 0x2 + } D3D12_VIDEO_SCALE_SUPPORT_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_SCALE_SUPPORT_FLAGS ); +typedef struct D3D12_VIDEO_SCALE_SUPPORT + { + D3D12_VIDEO_SIZE_RANGE OutputSizeRange; + D3D12_VIDEO_SCALE_SUPPORT_FLAGS Flags; + } D3D12_VIDEO_SCALE_SUPPORT; + +typedef struct D3D12_FEATURE_DATA_VIDEO_DECODE_CONVERSION_SUPPORT + { + UINT NodeIndex; + D3D12_VIDEO_DECODE_CONFIGURATION Configuration; + D3D12_VIDEO_SAMPLE DecodeSample; + D3D12_VIDEO_FORMAT OutputFormat; + DXGI_RATIONAL FrameRate; + UINT BitRate; + D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS SupportFlags; + D3D12_VIDEO_SCALE_SUPPORT ScaleSupport; + } D3D12_FEATURE_DATA_VIDEO_DECODE_CONVERSION_SUPPORT; + +typedef struct D3D12_FEATURE_DATA_VIDEO_DECODER_HEAP_SIZE + { + D3D12_VIDEO_DECODER_HEAP_DESC VideoDecoderHeapDesc; + UINT64 MemoryPoolL0Size; + UINT64 MemoryPoolL1Size; + } D3D12_FEATURE_DATA_VIDEO_DECODER_HEAP_SIZE; + +typedef struct D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE + { + UINT NodeMask; + const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC *pOutputStreamDesc; + UINT NumInputStreamDescs; + const D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC *pInputStreamDescs; + UINT64 MemoryPoolL0Size; + UINT64 MemoryPoolL1Size; + } D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE; + +typedef struct D3D12_QUERY_DATA_VIDEO_DECODE_STATISTICS + { + UINT64 Status; + UINT64 NumMacroblocksAffected; + DXGI_RATIONAL FrameRate; + UINT BitRate; + } D3D12_QUERY_DATA_VIDEO_DECODE_STATISTICS; + +typedef struct D3D12_VIDEO_DECODE_SUB_SAMPLE_MAPPING_BLOCK + { + UINT ClearSize; + UINT EncryptedSize; + } D3D12_VIDEO_DECODE_SUB_SAMPLE_MAPPING_BLOCK; + +typedef struct D3D12_VIDEO_DECODE_FRAME_ARGUMENT + { + D3D12_VIDEO_DECODE_ARGUMENT_TYPE Type; + UINT Size; + _Field_size_bytes_full_(Size) void *pData; + } D3D12_VIDEO_DECODE_FRAME_ARGUMENT; + +typedef struct D3D12_VIDEO_DECODE_REFERENCE_FRAMES + { + UINT NumTexture2Ds; + _Field_size_full_(NumTexture2Ds) ID3D12Resource **ppTexture2Ds; + _Field_size_full_(NumTexture2Ds) UINT *pSubresources; + _Field_size_full_opt_(NumTexture2Ds) ID3D12VideoDecoderHeap **ppHeaps; + } D3D12_VIDEO_DECODE_REFERENCE_FRAMES; + +typedef struct D3D12_VIDEO_DECODE_COMPRESSED_BITSTREAM + { + ID3D12Resource *pBuffer; + UINT64 Offset; + UINT64 Size; + } D3D12_VIDEO_DECODE_COMPRESSED_BITSTREAM; + +typedef struct D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS + { + BOOL Enable; + ID3D12Resource *pReferenceTexture2D; + UINT ReferenceSubresource; + DXGI_COLOR_SPACE_TYPE OutputColorSpace; + DXGI_COLOR_SPACE_TYPE DecodeColorSpace; + } D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS; + +typedef struct D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS + { + UINT NumFrameArguments; + D3D12_VIDEO_DECODE_FRAME_ARGUMENT FrameArguments[ 10 ]; + D3D12_VIDEO_DECODE_REFERENCE_FRAMES ReferenceFrames; + D3D12_VIDEO_DECODE_COMPRESSED_BITSTREAM CompressedBitstream; + ID3D12VideoDecoderHeap *pHeap; + } D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS; + +typedef struct D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS + { + ID3D12Resource *pOutputTexture2D; + UINT OutputSubresource; + D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS ConversionArguments; + } D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0003_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0003_v0_0_s_ifspec; + +#ifndef __ID3D12VideoProcessor_INTERFACE_DEFINED__ +#define __ID3D12VideoProcessor_INTERFACE_DEFINED__ + +/* interface ID3D12VideoProcessor */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12VideoProcessor; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("304FDB32-BEDE-410A-8545-943AC6A46138") + ID3D12VideoProcessor : public ID3D12Pageable + { + public: + virtual UINT STDMETHODCALLTYPE GetNodeMask( void) = 0; + + virtual UINT STDMETHODCALLTYPE GetNumInputStreamDescs( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetInputStreamDescs( + UINT NumInputStreamDescs, + _Out_writes_(NumInputStreamDescs) D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC *pInputStreamDescs) = 0; + + virtual D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC STDMETHODCALLTYPE GetOutputStreamDesc( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12VideoProcessorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12VideoProcessor * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12VideoProcessor * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12VideoProcessor * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12VideoProcessor * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12VideoProcessor * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12VideoProcessor * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12VideoProcessor * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12VideoProcessor * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + UINT ( STDMETHODCALLTYPE *GetNodeMask )( + ID3D12VideoProcessor * This); + + UINT ( STDMETHODCALLTYPE *GetNumInputStreamDescs )( + ID3D12VideoProcessor * This); + + HRESULT ( STDMETHODCALLTYPE *GetInputStreamDescs )( + ID3D12VideoProcessor * This, + UINT NumInputStreamDescs, + _Out_writes_(NumInputStreamDescs) D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC *pInputStreamDescs); + + D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC ( STDMETHODCALLTYPE *GetOutputStreamDesc )( + ID3D12VideoProcessor * This); + + END_INTERFACE + } ID3D12VideoProcessorVtbl; + + interface ID3D12VideoProcessor + { + CONST_VTBL struct ID3D12VideoProcessorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12VideoProcessor_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12VideoProcessor_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12VideoProcessor_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12VideoProcessor_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12VideoProcessor_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12VideoProcessor_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12VideoProcessor_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12VideoProcessor_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + + +#define ID3D12VideoProcessor_GetNodeMask(This) \ + ( (This)->lpVtbl -> GetNodeMask(This) ) + +#define ID3D12VideoProcessor_GetNumInputStreamDescs(This) \ + ( (This)->lpVtbl -> GetNumInputStreamDescs(This) ) + +#define ID3D12VideoProcessor_GetInputStreamDescs(This,NumInputStreamDescs,pInputStreamDescs) \ + ( (This)->lpVtbl -> GetInputStreamDescs(This,NumInputStreamDescs,pInputStreamDescs) ) + +#define ID3D12VideoProcessor_GetOutputStreamDesc(This) \ + ( (This)->lpVtbl -> GetOutputStreamDesc(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + + + + + +#endif /* __ID3D12VideoProcessor_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12video_0000_0004 */ +/* [local] */ + +typedef +enum D3D12_VIDEO_PROCESS_FEATURE_FLAGS + { + D3D12_VIDEO_PROCESS_FEATURE_FLAG_NONE = 0, + D3D12_VIDEO_PROCESS_FEATURE_FLAG_ALPHA_FILL = 0x1, + D3D12_VIDEO_PROCESS_FEATURE_FLAG_LUMA_KEY = 0x2, + D3D12_VIDEO_PROCESS_FEATURE_FLAG_STEREO = 0x4, + D3D12_VIDEO_PROCESS_FEATURE_FLAG_ROTATION = 0x8, + D3D12_VIDEO_PROCESS_FEATURE_FLAG_FLIP = 0x10, + D3D12_VIDEO_PROCESS_FEATURE_FLAG_ALPHA_BLENDING = 0x20, + D3D12_VIDEO_PROCESS_FEATURE_FLAG_PIXEL_ASPECT_RATIO = 0x40 + } D3D12_VIDEO_PROCESS_FEATURE_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_PROCESS_FEATURE_FLAGS ); +typedef +enum D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS + { + D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_NONE = 0, + D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_DENOISE = 0x1, + D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_DERINGING = 0x2, + D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_EDGE_ENHANCEMENT = 0x4, + D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_COLOR_CORRECTION = 0x8, + D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_FLESH_TONE_MAPPING = 0x10, + D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_IMAGE_STABILIZATION = 0x20, + D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_SUPER_RESOLUTION = 0x40, + D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_ANAMORPHIC_SCALING = 0x80, + D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_CUSTOM = 0x80000000 + } D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS ); +typedef +enum D3D12_VIDEO_PROCESS_ORIENTATION + { + D3D12_VIDEO_PROCESS_ORIENTATION_DEFAULT = 0, + D3D12_VIDEO_PROCESS_ORIENTATION_FLIP_HORIZONTAL = 1, + D3D12_VIDEO_PROCESS_ORIENTATION_CLOCKWISE_90 = 2, + D3D12_VIDEO_PROCESS_ORIENTATION_CLOCKWISE_90_FLIP_HORIZONTAL = 3, + D3D12_VIDEO_PROCESS_ORIENTATION_CLOCKWISE_180 = 4, + D3D12_VIDEO_PROCESS_ORIENTATION_FLIP_VERTICAL = 5, + D3D12_VIDEO_PROCESS_ORIENTATION_CLOCKWISE_270 = 6, + D3D12_VIDEO_PROCESS_ORIENTATION_CLOCKWISE_270_FLIP_HORIZONTAL = 7 + } D3D12_VIDEO_PROCESS_ORIENTATION; + +typedef +enum D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS + { + D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAG_NONE = 0, + D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAG_FRAME_DISCONTINUITY = 0x1, + D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAG_FRAME_REPEAT = 0x2 + } D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS ); +typedef struct D3D12_VIDEO_PROCESS_FILTER_RANGE + { + INT Minimum; + INT Maximum; + INT Default; + FLOAT Multiplier; + } D3D12_VIDEO_PROCESS_FILTER_RANGE; + +typedef +enum D3D12_VIDEO_PROCESS_SUPPORT_FLAGS + { + D3D12_VIDEO_PROCESS_SUPPORT_FLAG_NONE = 0, + D3D12_VIDEO_PROCESS_SUPPORT_FLAG_SUPPORTED = 0x1 + } D3D12_VIDEO_PROCESS_SUPPORT_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_PROCESS_SUPPORT_FLAGS ); +typedef struct D3D12_FEATURE_DATA_VIDEO_PROCESS_SUPPORT + { + UINT NodeIndex; + D3D12_VIDEO_SAMPLE InputSample; + D3D12_VIDEO_FIELD_TYPE InputFieldType; + D3D12_VIDEO_FRAME_STEREO_FORMAT InputStereoFormat; + DXGI_RATIONAL InputFrameRate; + D3D12_VIDEO_FORMAT OutputFormat; + D3D12_VIDEO_FRAME_STEREO_FORMAT OutputStereoFormat; + DXGI_RATIONAL OutputFrameRate; + D3D12_VIDEO_PROCESS_SUPPORT_FLAGS SupportFlags; + D3D12_VIDEO_SCALE_SUPPORT ScaleSupport; + D3D12_VIDEO_PROCESS_FEATURE_FLAGS FeatureSupport; + D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS DeinterlaceSupport; + D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS AutoProcessingSupport; + D3D12_VIDEO_PROCESS_FILTER_FLAGS FilterSupport; + D3D12_VIDEO_PROCESS_FILTER_RANGE FilterRangeSupport[ 32 ]; + } D3D12_FEATURE_DATA_VIDEO_PROCESS_SUPPORT; + +typedef struct D3D12_FEATURE_DATA_VIDEO_PROCESS_MAX_INPUT_STREAMS + { + UINT NodeIndex; + UINT MaxInputStreams; + } D3D12_FEATURE_DATA_VIDEO_PROCESS_MAX_INPUT_STREAMS; + +typedef struct D3D12_FEATURE_DATA_VIDEO_PROCESS_REFERENCE_INFO + { + UINT NodeIndex; + D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS DeinterlaceMode; + D3D12_VIDEO_PROCESS_FILTER_FLAGS Filters; + D3D12_VIDEO_PROCESS_FEATURE_FLAGS FeatureSupport; + DXGI_RATIONAL InputFrameRate; + DXGI_RATIONAL OutputFrameRate; + BOOL EnableAutoProcessing; + UINT PastFrames; + UINT FutureFrames; + } D3D12_FEATURE_DATA_VIDEO_PROCESS_REFERENCE_INFO; + +typedef struct D3D12_VIDEO_PROCESS_REFERENCE_SET + { + UINT NumPastFrames; + ID3D12Resource **ppPastFrames; + UINT *pPastSubresources; + UINT NumFutureFrames; + ID3D12Resource **ppFutureFrames; + UINT *pFutureSubresources; + } D3D12_VIDEO_PROCESS_REFERENCE_SET; + +typedef struct D3D12_VIDEO_PROCESS_TRANSFORM + { + D3D12_RECT SourceRectangle; + D3D12_RECT DestinationRectangle; + D3D12_VIDEO_PROCESS_ORIENTATION Orientation; + } D3D12_VIDEO_PROCESS_TRANSFORM; + +typedef struct D3D12_VIDEO_PROCESS_INPUT_STREAM_RATE + { + UINT OutputIndex; + UINT InputFrameOrField; + } D3D12_VIDEO_PROCESS_INPUT_STREAM_RATE; + +typedef struct D3D12_VIDEO_PROCESS_INPUT_STREAM + { + ID3D12Resource *pTexture2D; + UINT Subresource; + D3D12_VIDEO_PROCESS_REFERENCE_SET ReferenceSet; + } D3D12_VIDEO_PROCESS_INPUT_STREAM; + +typedef struct D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS + { + D3D12_VIDEO_PROCESS_INPUT_STREAM InputStream[ 2 ]; + D3D12_VIDEO_PROCESS_TRANSFORM Transform; + D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS Flags; + D3D12_VIDEO_PROCESS_INPUT_STREAM_RATE RateInfo; + INT FilterLevels[ 32 ]; + D3D12_VIDEO_PROCESS_ALPHA_BLENDING AlphaBlending; + } D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS; + +typedef struct D3D12_VIDEO_PROCESS_OUTPUT_STREAM + { + ID3D12Resource *pTexture2D; + UINT Subresource; + } D3D12_VIDEO_PROCESS_OUTPUT_STREAM; + +typedef struct D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS + { + D3D12_VIDEO_PROCESS_OUTPUT_STREAM OutputStream[ 2 ]; + D3D12_RECT TargetRectangle; + } D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0004_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0004_v0_0_s_ifspec; + +#ifndef __ID3D12VideoDecodeCommandList_INTERFACE_DEFINED__ +#define __ID3D12VideoDecodeCommandList_INTERFACE_DEFINED__ + +/* interface ID3D12VideoDecodeCommandList */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12VideoDecodeCommandList; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3B60536E-AD29-4E64-A269-F853837E5E53") + ID3D12VideoDecodeCommandList : public ID3D12CommandList + { + public: + virtual HRESULT STDMETHODCALLTYPE Close( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( + _In_ ID3D12CommandAllocator *pAllocator) = 0; + + virtual void STDMETHODCALLTYPE ClearState( void) = 0; + + virtual void STDMETHODCALLTYPE ResourceBarrier( + _In_ UINT NumBarriers, + _In_reads_(NumBarriers) const D3D12_RESOURCE_BARRIER *pBarriers) = 0; + + virtual void STDMETHODCALLTYPE DiscardResource( + _In_ ID3D12Resource *pResource, + _In_opt_ const D3D12_DISCARD_REGION *pRegion) = 0; + + virtual void STDMETHODCALLTYPE BeginQuery( + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT Index) = 0; + + virtual void STDMETHODCALLTYPE EndQuery( + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT Index) = 0; + + virtual void STDMETHODCALLTYPE ResolveQueryData( + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT StartIndex, + _In_ UINT NumQueries, + _In_ ID3D12Resource *pDestinationBuffer, + _In_ UINT64 AlignedDestinationBufferOffset) = 0; + + virtual void STDMETHODCALLTYPE SetPredication( + _In_opt_ ID3D12Resource *pBuffer, + _In_ UINT64 AlignedBufferOffset, + _In_ D3D12_PREDICATION_OP Operation) = 0; + + virtual void STDMETHODCALLTYPE SetMarker( + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size) = 0; + + virtual void STDMETHODCALLTYPE BeginEvent( + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size) = 0; + + virtual void STDMETHODCALLTYPE EndEvent( void) = 0; + + virtual void STDMETHODCALLTYPE DecodeFrame( + _In_ ID3D12VideoDecoder *pDecoder, + _In_ const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS *pOutputArguments, + _In_ const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *pInputArguments) = 0; + + virtual void STDMETHODCALLTYPE WriteBufferImmediate( + UINT Count, + _In_reads_(Count) const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *pParams, + _In_reads_opt_(Count) const D3D12_WRITEBUFFERIMMEDIATE_MODE *pModes) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12VideoDecodeCommandListVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12VideoDecodeCommandList * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12VideoDecodeCommandList * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12VideoDecodeCommandList * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12VideoDecodeCommandList * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12VideoDecodeCommandList * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12VideoDecodeCommandList * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12VideoDecodeCommandList * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12VideoDecodeCommandList * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + D3D12_COMMAND_LIST_TYPE ( STDMETHODCALLTYPE *GetType )( + ID3D12VideoDecodeCommandList * This); + + HRESULT ( STDMETHODCALLTYPE *Close )( + ID3D12VideoDecodeCommandList * This); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + ID3D12VideoDecodeCommandList * This, + _In_ ID3D12CommandAllocator *pAllocator); + + void ( STDMETHODCALLTYPE *ClearState )( + ID3D12VideoDecodeCommandList * This); + + void ( STDMETHODCALLTYPE *ResourceBarrier )( + ID3D12VideoDecodeCommandList * This, + _In_ UINT NumBarriers, + _In_reads_(NumBarriers) const D3D12_RESOURCE_BARRIER *pBarriers); + + void ( STDMETHODCALLTYPE *DiscardResource )( + ID3D12VideoDecodeCommandList * This, + _In_ ID3D12Resource *pResource, + _In_opt_ const D3D12_DISCARD_REGION *pRegion); + + void ( STDMETHODCALLTYPE *BeginQuery )( + ID3D12VideoDecodeCommandList * This, + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT Index); + + void ( STDMETHODCALLTYPE *EndQuery )( + ID3D12VideoDecodeCommandList * This, + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT Index); + + void ( STDMETHODCALLTYPE *ResolveQueryData )( + ID3D12VideoDecodeCommandList * This, + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT StartIndex, + _In_ UINT NumQueries, + _In_ ID3D12Resource *pDestinationBuffer, + _In_ UINT64 AlignedDestinationBufferOffset); + + void ( STDMETHODCALLTYPE *SetPredication )( + ID3D12VideoDecodeCommandList * This, + _In_opt_ ID3D12Resource *pBuffer, + _In_ UINT64 AlignedBufferOffset, + _In_ D3D12_PREDICATION_OP Operation); + + void ( STDMETHODCALLTYPE *SetMarker )( + ID3D12VideoDecodeCommandList * This, + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size); + + void ( STDMETHODCALLTYPE *BeginEvent )( + ID3D12VideoDecodeCommandList * This, + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size); + + void ( STDMETHODCALLTYPE *EndEvent )( + ID3D12VideoDecodeCommandList * This); + + void ( STDMETHODCALLTYPE *DecodeFrame )( + ID3D12VideoDecodeCommandList * This, + _In_ ID3D12VideoDecoder *pDecoder, + _In_ const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS *pOutputArguments, + _In_ const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *pInputArguments); + + void ( STDMETHODCALLTYPE *WriteBufferImmediate )( + ID3D12VideoDecodeCommandList * This, + UINT Count, + _In_reads_(Count) const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *pParams, + _In_reads_opt_(Count) const D3D12_WRITEBUFFERIMMEDIATE_MODE *pModes); + + END_INTERFACE + } ID3D12VideoDecodeCommandListVtbl; + + interface ID3D12VideoDecodeCommandList + { + CONST_VTBL struct ID3D12VideoDecodeCommandListVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12VideoDecodeCommandList_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12VideoDecodeCommandList_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12VideoDecodeCommandList_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12VideoDecodeCommandList_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12VideoDecodeCommandList_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12VideoDecodeCommandList_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12VideoDecodeCommandList_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12VideoDecodeCommandList_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + +#define ID3D12VideoDecodeCommandList_GetType(This) \ + ( (This)->lpVtbl -> GetType(This) ) + + +#define ID3D12VideoDecodeCommandList_Close(This) \ + ( (This)->lpVtbl -> Close(This) ) + +#define ID3D12VideoDecodeCommandList_Reset(This,pAllocator) \ + ( (This)->lpVtbl -> Reset(This,pAllocator) ) + +#define ID3D12VideoDecodeCommandList_ClearState(This) \ + ( (This)->lpVtbl -> ClearState(This) ) + +#define ID3D12VideoDecodeCommandList_ResourceBarrier(This,NumBarriers,pBarriers) \ + ( (This)->lpVtbl -> ResourceBarrier(This,NumBarriers,pBarriers) ) + +#define ID3D12VideoDecodeCommandList_DiscardResource(This,pResource,pRegion) \ + ( (This)->lpVtbl -> DiscardResource(This,pResource,pRegion) ) + +#define ID3D12VideoDecodeCommandList_BeginQuery(This,pQueryHeap,Type,Index) \ + ( (This)->lpVtbl -> BeginQuery(This,pQueryHeap,Type,Index) ) + +#define ID3D12VideoDecodeCommandList_EndQuery(This,pQueryHeap,Type,Index) \ + ( (This)->lpVtbl -> EndQuery(This,pQueryHeap,Type,Index) ) + +#define ID3D12VideoDecodeCommandList_ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset) \ + ( (This)->lpVtbl -> ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset) ) + +#define ID3D12VideoDecodeCommandList_SetPredication(This,pBuffer,AlignedBufferOffset,Operation) \ + ( (This)->lpVtbl -> SetPredication(This,pBuffer,AlignedBufferOffset,Operation) ) + +#define ID3D12VideoDecodeCommandList_SetMarker(This,Metadata,pData,Size) \ + ( (This)->lpVtbl -> SetMarker(This,Metadata,pData,Size) ) + +#define ID3D12VideoDecodeCommandList_BeginEvent(This,Metadata,pData,Size) \ + ( (This)->lpVtbl -> BeginEvent(This,Metadata,pData,Size) ) + +#define ID3D12VideoDecodeCommandList_EndEvent(This) \ + ( (This)->lpVtbl -> EndEvent(This) ) + +#define ID3D12VideoDecodeCommandList_DecodeFrame(This,pDecoder,pOutputArguments,pInputArguments) \ + ( (This)->lpVtbl -> DecodeFrame(This,pDecoder,pOutputArguments,pInputArguments) ) + +#define ID3D12VideoDecodeCommandList_WriteBufferImmediate(This,Count,pParams,pModes) \ + ( (This)->lpVtbl -> WriteBufferImmediate(This,Count,pParams,pModes) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12VideoDecodeCommandList_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12VideoProcessCommandList_INTERFACE_DEFINED__ +#define __ID3D12VideoProcessCommandList_INTERFACE_DEFINED__ + +/* interface ID3D12VideoProcessCommandList */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12VideoProcessCommandList; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("AEB2543A-167F-4682-ACC8-D159ED4A6209") + ID3D12VideoProcessCommandList : public ID3D12CommandList + { + public: + virtual HRESULT STDMETHODCALLTYPE Close( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( + _In_ ID3D12CommandAllocator *pAllocator) = 0; + + virtual void STDMETHODCALLTYPE ClearState( void) = 0; + + virtual void STDMETHODCALLTYPE ResourceBarrier( + _In_ UINT NumBarriers, + _In_reads_(NumBarriers) const D3D12_RESOURCE_BARRIER *pBarriers) = 0; + + virtual void STDMETHODCALLTYPE DiscardResource( + _In_ ID3D12Resource *pResource, + _In_opt_ const D3D12_DISCARD_REGION *pRegion) = 0; + + virtual void STDMETHODCALLTYPE BeginQuery( + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT Index) = 0; + + virtual void STDMETHODCALLTYPE EndQuery( + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT Index) = 0; + + virtual void STDMETHODCALLTYPE ResolveQueryData( + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT StartIndex, + _In_ UINT NumQueries, + _In_ ID3D12Resource *pDestinationBuffer, + _In_ UINT64 AlignedDestinationBufferOffset) = 0; + + virtual void STDMETHODCALLTYPE SetPredication( + _In_opt_ ID3D12Resource *pBuffer, + _In_ UINT64 AlignedBufferOffset, + _In_ D3D12_PREDICATION_OP Operation) = 0; + + virtual void STDMETHODCALLTYPE SetMarker( + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size) = 0; + + virtual void STDMETHODCALLTYPE BeginEvent( + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size) = 0; + + virtual void STDMETHODCALLTYPE EndEvent( void) = 0; + + virtual void STDMETHODCALLTYPE ProcessFrames( + _In_ ID3D12VideoProcessor *pVideoProcessor, + _In_ const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS *pOutputArguments, + UINT NumInputStreams, + _In_reads_(NumInputStreams) const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS *pInputArguments) = 0; + + virtual void STDMETHODCALLTYPE WriteBufferImmediate( + UINT Count, + _In_reads_(Count) const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *pParams, + _In_reads_opt_(Count) const D3D12_WRITEBUFFERIMMEDIATE_MODE *pModes) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12VideoProcessCommandListVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12VideoProcessCommandList * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12VideoProcessCommandList * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12VideoProcessCommandList * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12VideoProcessCommandList * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12VideoProcessCommandList * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12VideoProcessCommandList * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12VideoProcessCommandList * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12VideoProcessCommandList * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + D3D12_COMMAND_LIST_TYPE ( STDMETHODCALLTYPE *GetType )( + ID3D12VideoProcessCommandList * This); + + HRESULT ( STDMETHODCALLTYPE *Close )( + ID3D12VideoProcessCommandList * This); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + ID3D12VideoProcessCommandList * This, + _In_ ID3D12CommandAllocator *pAllocator); + + void ( STDMETHODCALLTYPE *ClearState )( + ID3D12VideoProcessCommandList * This); + + void ( STDMETHODCALLTYPE *ResourceBarrier )( + ID3D12VideoProcessCommandList * This, + _In_ UINT NumBarriers, + _In_reads_(NumBarriers) const D3D12_RESOURCE_BARRIER *pBarriers); + + void ( STDMETHODCALLTYPE *DiscardResource )( + ID3D12VideoProcessCommandList * This, + _In_ ID3D12Resource *pResource, + _In_opt_ const D3D12_DISCARD_REGION *pRegion); + + void ( STDMETHODCALLTYPE *BeginQuery )( + ID3D12VideoProcessCommandList * This, + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT Index); + + void ( STDMETHODCALLTYPE *EndQuery )( + ID3D12VideoProcessCommandList * This, + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT Index); + + void ( STDMETHODCALLTYPE *ResolveQueryData )( + ID3D12VideoProcessCommandList * This, + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT StartIndex, + _In_ UINT NumQueries, + _In_ ID3D12Resource *pDestinationBuffer, + _In_ UINT64 AlignedDestinationBufferOffset); + + void ( STDMETHODCALLTYPE *SetPredication )( + ID3D12VideoProcessCommandList * This, + _In_opt_ ID3D12Resource *pBuffer, + _In_ UINT64 AlignedBufferOffset, + _In_ D3D12_PREDICATION_OP Operation); + + void ( STDMETHODCALLTYPE *SetMarker )( + ID3D12VideoProcessCommandList * This, + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size); + + void ( STDMETHODCALLTYPE *BeginEvent )( + ID3D12VideoProcessCommandList * This, + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size); + + void ( STDMETHODCALLTYPE *EndEvent )( + ID3D12VideoProcessCommandList * This); + + void ( STDMETHODCALLTYPE *ProcessFrames )( + ID3D12VideoProcessCommandList * This, + _In_ ID3D12VideoProcessor *pVideoProcessor, + _In_ const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS *pOutputArguments, + UINT NumInputStreams, + _In_reads_(NumInputStreams) const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS *pInputArguments); + + void ( STDMETHODCALLTYPE *WriteBufferImmediate )( + ID3D12VideoProcessCommandList * This, + UINT Count, + _In_reads_(Count) const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *pParams, + _In_reads_opt_(Count) const D3D12_WRITEBUFFERIMMEDIATE_MODE *pModes); + + END_INTERFACE + } ID3D12VideoProcessCommandListVtbl; + + interface ID3D12VideoProcessCommandList + { + CONST_VTBL struct ID3D12VideoProcessCommandListVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12VideoProcessCommandList_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12VideoProcessCommandList_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12VideoProcessCommandList_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12VideoProcessCommandList_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12VideoProcessCommandList_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12VideoProcessCommandList_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12VideoProcessCommandList_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12VideoProcessCommandList_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + +#define ID3D12VideoProcessCommandList_GetType(This) \ + ( (This)->lpVtbl -> GetType(This) ) + + +#define ID3D12VideoProcessCommandList_Close(This) \ + ( (This)->lpVtbl -> Close(This) ) + +#define ID3D12VideoProcessCommandList_Reset(This,pAllocator) \ + ( (This)->lpVtbl -> Reset(This,pAllocator) ) + +#define ID3D12VideoProcessCommandList_ClearState(This) \ + ( (This)->lpVtbl -> ClearState(This) ) + +#define ID3D12VideoProcessCommandList_ResourceBarrier(This,NumBarriers,pBarriers) \ + ( (This)->lpVtbl -> ResourceBarrier(This,NumBarriers,pBarriers) ) + +#define ID3D12VideoProcessCommandList_DiscardResource(This,pResource,pRegion) \ + ( (This)->lpVtbl -> DiscardResource(This,pResource,pRegion) ) + +#define ID3D12VideoProcessCommandList_BeginQuery(This,pQueryHeap,Type,Index) \ + ( (This)->lpVtbl -> BeginQuery(This,pQueryHeap,Type,Index) ) + +#define ID3D12VideoProcessCommandList_EndQuery(This,pQueryHeap,Type,Index) \ + ( (This)->lpVtbl -> EndQuery(This,pQueryHeap,Type,Index) ) + +#define ID3D12VideoProcessCommandList_ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset) \ + ( (This)->lpVtbl -> ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset) ) + +#define ID3D12VideoProcessCommandList_SetPredication(This,pBuffer,AlignedBufferOffset,Operation) \ + ( (This)->lpVtbl -> SetPredication(This,pBuffer,AlignedBufferOffset,Operation) ) + +#define ID3D12VideoProcessCommandList_SetMarker(This,Metadata,pData,Size) \ + ( (This)->lpVtbl -> SetMarker(This,Metadata,pData,Size) ) + +#define ID3D12VideoProcessCommandList_BeginEvent(This,Metadata,pData,Size) \ + ( (This)->lpVtbl -> BeginEvent(This,Metadata,pData,Size) ) + +#define ID3D12VideoProcessCommandList_EndEvent(This) \ + ( (This)->lpVtbl -> EndEvent(This) ) + +#define ID3D12VideoProcessCommandList_ProcessFrames(This,pVideoProcessor,pOutputArguments,NumInputStreams,pInputArguments) \ + ( (This)->lpVtbl -> ProcessFrames(This,pVideoProcessor,pOutputArguments,NumInputStreams,pInputArguments) ) + +#define ID3D12VideoProcessCommandList_WriteBufferImmediate(This,Count,pParams,pModes) \ + ( (This)->lpVtbl -> WriteBufferImmediate(This,Count,pParams,pModes) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12VideoProcessCommandList_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12video_0000_0006 */ +/* [local] */ + +DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_MPEG2, 0xee27417f, 0x5e28, 0x4e65, 0xbe, 0xea, 0x1d, 0x26, 0xb5, 0x08, 0xad, 0xc9); +DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_MPEG1_AND_MPEG2, 0x86695f12, 0x340e, 0x4f04, 0x9f, 0xd3, 0x92, 0x53, 0xdd, 0x32, 0x74, 0x60); +DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_H264, 0x1b81be68, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5); +DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_H264_STEREO_PROGRESSIVE, 0xd79be8da, 0x0cf1, 0x4c81, 0xb8, 0x2a, 0x69, 0xa4, 0xe2, 0x36, 0xf4, 0x3d); +DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_H264_STEREO, 0xf9aaccbb, 0xc2b6, 0x4cfc, 0x87, 0x79, 0x57, 0x07, 0xb1, 0x76, 0x05, 0x52); +DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_H264_MULTIVIEW, 0x705b9d82, 0x76cf, 0x49d6, 0xb7, 0xe6, 0xac, 0x88, 0x72, 0xdb, 0x01, 0x3c); +DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_VC1, 0x1b81beA3, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5); +DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_VC1_D2010, 0x1b81beA4, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5); +DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_MPEG4PT2_SIMPLE, 0xefd64d74, 0xc9e8,0x41d7,0xa5,0xe9,0xe9,0xb0,0xe3,0x9f,0xa3,0x19); +DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_MPEG4PT2_ADVSIMPLE_NOGMC, 0xed418a9f, 0x010d, 0x4eda, 0x9a, 0xe3, 0x9a, 0x65, 0x35, 0x8d, 0x8d, 0x2e); +DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_HEVC_MAIN, 0x5b11d51b, 0x2f4c, 0x4452, 0xbc, 0xc3, 0x09, 0xf2, 0xa1, 0x16, 0x0c, 0xc0); +DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_HEVC_MAIN10, 0x107af0e0, 0xef1a, 0x4d19, 0xab, 0xa8, 0x67, 0xa1, 0x63, 0x07, 0x3d, 0x13); +DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_VP9, 0x463707f8, 0xa1d0, 0x4585, 0x87, 0x6d, 0x83, 0xaa, 0x6d, 0x60, 0xb8, 0x9e); +DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_VP9_10BIT_PROFILE2, 0xa4c749ef, 0x6ecf, 0x48aa, 0x84, 0x48, 0x50, 0xa7, 0xa1, 0x16, 0x5f, 0xf7); +DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_VP8, 0x90b899ea, 0x3a62, 0x4705, 0x88, 0xb3, 0x8d, 0xf0, 0x4b, 0x27, 0x44, 0xe7); +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ +DEFINE_GUID(IID_ID3D12VideoDecoderHeap,0x0946B7C9,0xEBF6,0x4047,0xBB,0x73,0x86,0x83,0xE2,0x7D,0xBB,0x1F); +DEFINE_GUID(IID_ID3D12VideoDevice,0x1F052807,0x0B46,0x4ACC,0x8A,0x89,0x36,0x4F,0x79,0x37,0x18,0xA4); +DEFINE_GUID(IID_ID3D12VideoDecoder,0xC59B6BDC,0x7720,0x4074,0xA1,0x36,0x17,0xA1,0x56,0x03,0x74,0x70); +DEFINE_GUID(IID_ID3D12VideoProcessor,0x304FDB32,0xBEDE,0x410A,0x85,0x45,0x94,0x3A,0xC6,0xA4,0x61,0x38); +DEFINE_GUID(IID_ID3D12VideoDecodeCommandList,0x3B60536E,0xAD29,0x4E64,0xA2,0x69,0xF8,0x53,0x83,0x7E,0x5E,0x53); +DEFINE_GUID(IID_ID3D12VideoProcessCommandList,0xAEB2543A,0x167F,0x4682,0xAC,0xC8,0xD1,0x59,0xED,0x4A,0x62,0x09); + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0006_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0006_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/d3dcommon.h b/gfx/include/dxsdk/d3dcommon.h new file mode 100644 index 0000000000..02630c9b02 --- /dev/null +++ b/gfx/include/dxsdk/d3dcommon.h @@ -0,0 +1,1004 @@ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ +/* @@MIDL_FILE_HEADING( ) */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __d3dcommon_h__ +#define __d3dcommon_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __ID3D10Blob_FWD_DEFINED__ +#define __ID3D10Blob_FWD_DEFINED__ +typedef interface ID3D10Blob ID3D10Blob; + +#endif /* __ID3D10Blob_FWD_DEFINED__ */ + + +#ifndef __ID3DDestructionNotifier_FWD_DEFINED__ +#define __ID3DDestructionNotifier_FWD_DEFINED__ +typedef interface ID3DDestructionNotifier ID3DDestructionNotifier; + +#endif /* __ID3DDestructionNotifier_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_d3dcommon_0000_0000 */ +/* [local] */ + +typedef +enum D3D_DRIVER_TYPE + { + D3D_DRIVER_TYPE_UNKNOWN = 0, + D3D_DRIVER_TYPE_HARDWARE = ( D3D_DRIVER_TYPE_UNKNOWN + 1 ) , + D3D_DRIVER_TYPE_REFERENCE = ( D3D_DRIVER_TYPE_HARDWARE + 1 ) , + D3D_DRIVER_TYPE_NULL = ( D3D_DRIVER_TYPE_REFERENCE + 1 ) , + D3D_DRIVER_TYPE_SOFTWARE = ( D3D_DRIVER_TYPE_NULL + 1 ) , + D3D_DRIVER_TYPE_WARP = ( D3D_DRIVER_TYPE_SOFTWARE + 1 ) + } D3D_DRIVER_TYPE; + +typedef +enum D3D_FEATURE_LEVEL + { + D3D_FEATURE_LEVEL_9_1 = 0x9100, + D3D_FEATURE_LEVEL_9_2 = 0x9200, + D3D_FEATURE_LEVEL_9_3 = 0x9300, + D3D_FEATURE_LEVEL_10_0 = 0xa000, + D3D_FEATURE_LEVEL_10_1 = 0xa100, + D3D_FEATURE_LEVEL_11_0 = 0xb000, + D3D_FEATURE_LEVEL_11_1 = 0xb100, + D3D_FEATURE_LEVEL_12_0 = 0xc000, + D3D_FEATURE_LEVEL_12_1 = 0xc100 + } D3D_FEATURE_LEVEL; + +#define D3D_FL9_1_REQ_TEXTURE1D_U_DIMENSION 2048 +#define D3D_FL9_3_REQ_TEXTURE1D_U_DIMENSION 4096 +#define D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION 2048 +#define D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION 4096 +#define D3D_FL9_1_REQ_TEXTURECUBE_DIMENSION 512 +#define D3D_FL9_3_REQ_TEXTURECUBE_DIMENSION 4096 +#define D3D_FL9_1_REQ_TEXTURE3D_U_V_OR_W_DIMENSION 256 +#define D3D_FL9_1_DEFAULT_MAX_ANISOTROPY 2 +#define D3D_FL9_1_IA_PRIMITIVE_MAX_COUNT 65535 +#define D3D_FL9_2_IA_PRIMITIVE_MAX_COUNT 1048575 +#define D3D_FL9_1_SIMULTANEOUS_RENDER_TARGET_COUNT 1 +#define D3D_FL9_3_SIMULTANEOUS_RENDER_TARGET_COUNT 4 +#define D3D_FL9_1_MAX_TEXTURE_REPEAT 128 +#define D3D_FL9_2_MAX_TEXTURE_REPEAT 2048 +#define D3D_FL9_3_MAX_TEXTURE_REPEAT 8192 +typedef +enum D3D_PRIMITIVE_TOPOLOGY + { + D3D_PRIMITIVE_TOPOLOGY_UNDEFINED = 0, + D3D_PRIMITIVE_TOPOLOGY_POINTLIST = 1, + D3D_PRIMITIVE_TOPOLOGY_LINELIST = 2, + D3D_PRIMITIVE_TOPOLOGY_LINESTRIP = 3, + D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST = 4, + D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP = 5, + D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ = 10, + D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ = 11, + D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ = 12, + D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ = 13, + D3D_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST = 33, + D3D_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST = 34, + D3D_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST = 35, + D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST = 36, + D3D_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST = 37, + D3D_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST = 38, + D3D_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST = 39, + D3D_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST = 40, + D3D_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST = 41, + D3D_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST = 42, + D3D_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST = 43, + D3D_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST = 44, + D3D_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST = 45, + D3D_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST = 46, + D3D_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST = 47, + D3D_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST = 48, + D3D_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST = 49, + D3D_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST = 50, + D3D_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST = 51, + D3D_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST = 52, + D3D_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST = 53, + D3D_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST = 54, + D3D_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST = 55, + D3D_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST = 56, + D3D_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST = 57, + D3D_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST = 58, + D3D_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST = 59, + D3D_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST = 60, + D3D_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST = 61, + D3D_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST = 62, + D3D_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST = 63, + D3D_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST = 64, + D3D10_PRIMITIVE_TOPOLOGY_UNDEFINED = D3D_PRIMITIVE_TOPOLOGY_UNDEFINED, + D3D10_PRIMITIVE_TOPOLOGY_POINTLIST = D3D_PRIMITIVE_TOPOLOGY_POINTLIST, + D3D10_PRIMITIVE_TOPOLOGY_LINELIST = D3D_PRIMITIVE_TOPOLOGY_LINELIST, + D3D10_PRIMITIVE_TOPOLOGY_LINESTRIP = D3D_PRIMITIVE_TOPOLOGY_LINESTRIP, + D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST, + D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP = D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP, + D3D10_PRIMITIVE_TOPOLOGY_LINELIST_ADJ = D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ, + D3D10_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ = D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ, + D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ, + D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ = D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ, + D3D11_PRIMITIVE_TOPOLOGY_UNDEFINED = D3D_PRIMITIVE_TOPOLOGY_UNDEFINED, + D3D11_PRIMITIVE_TOPOLOGY_POINTLIST = D3D_PRIMITIVE_TOPOLOGY_POINTLIST, + D3D11_PRIMITIVE_TOPOLOGY_LINELIST = D3D_PRIMITIVE_TOPOLOGY_LINELIST, + D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP = D3D_PRIMITIVE_TOPOLOGY_LINESTRIP, + D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST, + D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP = D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP, + D3D11_PRIMITIVE_TOPOLOGY_LINELIST_ADJ = D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ, + D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ = D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ, + D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ, + D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ = D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ, + D3D11_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST, + D3D11_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST + } D3D_PRIMITIVE_TOPOLOGY; + +typedef +enum D3D_PRIMITIVE + { + D3D_PRIMITIVE_UNDEFINED = 0, + D3D_PRIMITIVE_POINT = 1, + D3D_PRIMITIVE_LINE = 2, + D3D_PRIMITIVE_TRIANGLE = 3, + D3D_PRIMITIVE_LINE_ADJ = 6, + D3D_PRIMITIVE_TRIANGLE_ADJ = 7, + D3D_PRIMITIVE_1_CONTROL_POINT_PATCH = 8, + D3D_PRIMITIVE_2_CONTROL_POINT_PATCH = 9, + D3D_PRIMITIVE_3_CONTROL_POINT_PATCH = 10, + D3D_PRIMITIVE_4_CONTROL_POINT_PATCH = 11, + D3D_PRIMITIVE_5_CONTROL_POINT_PATCH = 12, + D3D_PRIMITIVE_6_CONTROL_POINT_PATCH = 13, + D3D_PRIMITIVE_7_CONTROL_POINT_PATCH = 14, + D3D_PRIMITIVE_8_CONTROL_POINT_PATCH = 15, + D3D_PRIMITIVE_9_CONTROL_POINT_PATCH = 16, + D3D_PRIMITIVE_10_CONTROL_POINT_PATCH = 17, + D3D_PRIMITIVE_11_CONTROL_POINT_PATCH = 18, + D3D_PRIMITIVE_12_CONTROL_POINT_PATCH = 19, + D3D_PRIMITIVE_13_CONTROL_POINT_PATCH = 20, + D3D_PRIMITIVE_14_CONTROL_POINT_PATCH = 21, + D3D_PRIMITIVE_15_CONTROL_POINT_PATCH = 22, + D3D_PRIMITIVE_16_CONTROL_POINT_PATCH = 23, + D3D_PRIMITIVE_17_CONTROL_POINT_PATCH = 24, + D3D_PRIMITIVE_18_CONTROL_POINT_PATCH = 25, + D3D_PRIMITIVE_19_CONTROL_POINT_PATCH = 26, + D3D_PRIMITIVE_20_CONTROL_POINT_PATCH = 27, + D3D_PRIMITIVE_21_CONTROL_POINT_PATCH = 28, + D3D_PRIMITIVE_22_CONTROL_POINT_PATCH = 29, + D3D_PRIMITIVE_23_CONTROL_POINT_PATCH = 30, + D3D_PRIMITIVE_24_CONTROL_POINT_PATCH = 31, + D3D_PRIMITIVE_25_CONTROL_POINT_PATCH = 32, + D3D_PRIMITIVE_26_CONTROL_POINT_PATCH = 33, + D3D_PRIMITIVE_27_CONTROL_POINT_PATCH = 34, + D3D_PRIMITIVE_28_CONTROL_POINT_PATCH = 35, + D3D_PRIMITIVE_29_CONTROL_POINT_PATCH = 36, + D3D_PRIMITIVE_30_CONTROL_POINT_PATCH = 37, + D3D_PRIMITIVE_31_CONTROL_POINT_PATCH = 38, + D3D_PRIMITIVE_32_CONTROL_POINT_PATCH = 39, + D3D10_PRIMITIVE_UNDEFINED = D3D_PRIMITIVE_UNDEFINED, + D3D10_PRIMITIVE_POINT = D3D_PRIMITIVE_POINT, + D3D10_PRIMITIVE_LINE = D3D_PRIMITIVE_LINE, + D3D10_PRIMITIVE_TRIANGLE = D3D_PRIMITIVE_TRIANGLE, + D3D10_PRIMITIVE_LINE_ADJ = D3D_PRIMITIVE_LINE_ADJ, + D3D10_PRIMITIVE_TRIANGLE_ADJ = D3D_PRIMITIVE_TRIANGLE_ADJ, + D3D11_PRIMITIVE_UNDEFINED = D3D_PRIMITIVE_UNDEFINED, + D3D11_PRIMITIVE_POINT = D3D_PRIMITIVE_POINT, + D3D11_PRIMITIVE_LINE = D3D_PRIMITIVE_LINE, + D3D11_PRIMITIVE_TRIANGLE = D3D_PRIMITIVE_TRIANGLE, + D3D11_PRIMITIVE_LINE_ADJ = D3D_PRIMITIVE_LINE_ADJ, + D3D11_PRIMITIVE_TRIANGLE_ADJ = D3D_PRIMITIVE_TRIANGLE_ADJ, + D3D11_PRIMITIVE_1_CONTROL_POINT_PATCH = D3D_PRIMITIVE_1_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_2_CONTROL_POINT_PATCH = D3D_PRIMITIVE_2_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_3_CONTROL_POINT_PATCH = D3D_PRIMITIVE_3_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_4_CONTROL_POINT_PATCH = D3D_PRIMITIVE_4_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_5_CONTROL_POINT_PATCH = D3D_PRIMITIVE_5_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_6_CONTROL_POINT_PATCH = D3D_PRIMITIVE_6_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_7_CONTROL_POINT_PATCH = D3D_PRIMITIVE_7_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_8_CONTROL_POINT_PATCH = D3D_PRIMITIVE_8_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_9_CONTROL_POINT_PATCH = D3D_PRIMITIVE_9_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_10_CONTROL_POINT_PATCH = D3D_PRIMITIVE_10_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_11_CONTROL_POINT_PATCH = D3D_PRIMITIVE_11_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_12_CONTROL_POINT_PATCH = D3D_PRIMITIVE_12_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_13_CONTROL_POINT_PATCH = D3D_PRIMITIVE_13_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_14_CONTROL_POINT_PATCH = D3D_PRIMITIVE_14_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_15_CONTROL_POINT_PATCH = D3D_PRIMITIVE_15_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_16_CONTROL_POINT_PATCH = D3D_PRIMITIVE_16_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_17_CONTROL_POINT_PATCH = D3D_PRIMITIVE_17_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_18_CONTROL_POINT_PATCH = D3D_PRIMITIVE_18_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_19_CONTROL_POINT_PATCH = D3D_PRIMITIVE_19_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_20_CONTROL_POINT_PATCH = D3D_PRIMITIVE_20_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_21_CONTROL_POINT_PATCH = D3D_PRIMITIVE_21_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_22_CONTROL_POINT_PATCH = D3D_PRIMITIVE_22_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_23_CONTROL_POINT_PATCH = D3D_PRIMITIVE_23_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_24_CONTROL_POINT_PATCH = D3D_PRIMITIVE_24_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_25_CONTROL_POINT_PATCH = D3D_PRIMITIVE_25_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_26_CONTROL_POINT_PATCH = D3D_PRIMITIVE_26_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_27_CONTROL_POINT_PATCH = D3D_PRIMITIVE_27_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_28_CONTROL_POINT_PATCH = D3D_PRIMITIVE_28_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_29_CONTROL_POINT_PATCH = D3D_PRIMITIVE_29_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_30_CONTROL_POINT_PATCH = D3D_PRIMITIVE_30_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_31_CONTROL_POINT_PATCH = D3D_PRIMITIVE_31_CONTROL_POINT_PATCH, + D3D11_PRIMITIVE_32_CONTROL_POINT_PATCH = D3D_PRIMITIVE_32_CONTROL_POINT_PATCH + } D3D_PRIMITIVE; + +typedef +enum D3D_SRV_DIMENSION + { + D3D_SRV_DIMENSION_UNKNOWN = 0, + D3D_SRV_DIMENSION_BUFFER = 1, + D3D_SRV_DIMENSION_TEXTURE1D = 2, + D3D_SRV_DIMENSION_TEXTURE1DARRAY = 3, + D3D_SRV_DIMENSION_TEXTURE2D = 4, + D3D_SRV_DIMENSION_TEXTURE2DARRAY = 5, + D3D_SRV_DIMENSION_TEXTURE2DMS = 6, + D3D_SRV_DIMENSION_TEXTURE2DMSARRAY = 7, + D3D_SRV_DIMENSION_TEXTURE3D = 8, + D3D_SRV_DIMENSION_TEXTURECUBE = 9, + D3D_SRV_DIMENSION_TEXTURECUBEARRAY = 10, + D3D_SRV_DIMENSION_BUFFEREX = 11, + D3D10_SRV_DIMENSION_UNKNOWN = D3D_SRV_DIMENSION_UNKNOWN, + D3D10_SRV_DIMENSION_BUFFER = D3D_SRV_DIMENSION_BUFFER, + D3D10_SRV_DIMENSION_TEXTURE1D = D3D_SRV_DIMENSION_TEXTURE1D, + D3D10_SRV_DIMENSION_TEXTURE1DARRAY = D3D_SRV_DIMENSION_TEXTURE1DARRAY, + D3D10_SRV_DIMENSION_TEXTURE2D = D3D_SRV_DIMENSION_TEXTURE2D, + D3D10_SRV_DIMENSION_TEXTURE2DARRAY = D3D_SRV_DIMENSION_TEXTURE2DARRAY, + D3D10_SRV_DIMENSION_TEXTURE2DMS = D3D_SRV_DIMENSION_TEXTURE2DMS, + D3D10_SRV_DIMENSION_TEXTURE2DMSARRAY = D3D_SRV_DIMENSION_TEXTURE2DMSARRAY, + D3D10_SRV_DIMENSION_TEXTURE3D = D3D_SRV_DIMENSION_TEXTURE3D, + D3D10_SRV_DIMENSION_TEXTURECUBE = D3D_SRV_DIMENSION_TEXTURECUBE, + D3D10_1_SRV_DIMENSION_UNKNOWN = D3D_SRV_DIMENSION_UNKNOWN, + D3D10_1_SRV_DIMENSION_BUFFER = D3D_SRV_DIMENSION_BUFFER, + D3D10_1_SRV_DIMENSION_TEXTURE1D = D3D_SRV_DIMENSION_TEXTURE1D, + D3D10_1_SRV_DIMENSION_TEXTURE1DARRAY = D3D_SRV_DIMENSION_TEXTURE1DARRAY, + D3D10_1_SRV_DIMENSION_TEXTURE2D = D3D_SRV_DIMENSION_TEXTURE2D, + D3D10_1_SRV_DIMENSION_TEXTURE2DARRAY = D3D_SRV_DIMENSION_TEXTURE2DARRAY, + D3D10_1_SRV_DIMENSION_TEXTURE2DMS = D3D_SRV_DIMENSION_TEXTURE2DMS, + D3D10_1_SRV_DIMENSION_TEXTURE2DMSARRAY = D3D_SRV_DIMENSION_TEXTURE2DMSARRAY, + D3D10_1_SRV_DIMENSION_TEXTURE3D = D3D_SRV_DIMENSION_TEXTURE3D, + D3D10_1_SRV_DIMENSION_TEXTURECUBE = D3D_SRV_DIMENSION_TEXTURECUBE, + D3D10_1_SRV_DIMENSION_TEXTURECUBEARRAY = D3D_SRV_DIMENSION_TEXTURECUBEARRAY, + D3D11_SRV_DIMENSION_UNKNOWN = D3D_SRV_DIMENSION_UNKNOWN, + D3D11_SRV_DIMENSION_BUFFER = D3D_SRV_DIMENSION_BUFFER, + D3D11_SRV_DIMENSION_TEXTURE1D = D3D_SRV_DIMENSION_TEXTURE1D, + D3D11_SRV_DIMENSION_TEXTURE1DARRAY = D3D_SRV_DIMENSION_TEXTURE1DARRAY, + D3D11_SRV_DIMENSION_TEXTURE2D = D3D_SRV_DIMENSION_TEXTURE2D, + D3D11_SRV_DIMENSION_TEXTURE2DARRAY = D3D_SRV_DIMENSION_TEXTURE2DARRAY, + D3D11_SRV_DIMENSION_TEXTURE2DMS = D3D_SRV_DIMENSION_TEXTURE2DMS, + D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY = D3D_SRV_DIMENSION_TEXTURE2DMSARRAY, + D3D11_SRV_DIMENSION_TEXTURE3D = D3D_SRV_DIMENSION_TEXTURE3D, + D3D11_SRV_DIMENSION_TEXTURECUBE = D3D_SRV_DIMENSION_TEXTURECUBE, + D3D11_SRV_DIMENSION_TEXTURECUBEARRAY = D3D_SRV_DIMENSION_TEXTURECUBEARRAY, + D3D11_SRV_DIMENSION_BUFFEREX = D3D_SRV_DIMENSION_BUFFEREX + } D3D_SRV_DIMENSION; + +typedef struct _D3D_SHADER_MACRO + { + LPCSTR Name; + LPCSTR Definition; + } D3D_SHADER_MACRO; + +typedef struct _D3D_SHADER_MACRO *LPD3D_SHADER_MACRO; + +DEFINE_GUID(IID_ID3D10Blob, 0x8ba5fb08, 0x5195, 0x40e2, 0xac, 0x58, 0xd, 0x98, 0x9c, 0x3a, 0x1, 0x2); + + +extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0000_v0_0_s_ifspec; + +#ifndef __ID3D10Blob_INTERFACE_DEFINED__ +#define __ID3D10Blob_INTERFACE_DEFINED__ + +/* interface ID3D10Blob */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D10Blob; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("8BA5FB08-5195-40e2-AC58-0D989C3A0102") + ID3D10Blob : public IUnknown + { + public: + virtual LPVOID STDMETHODCALLTYPE GetBufferPointer( void) = 0; + + virtual SIZE_T STDMETHODCALLTYPE GetBufferSize( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D10BlobVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D10Blob * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D10Blob * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D10Blob * This); + + LPVOID ( STDMETHODCALLTYPE *GetBufferPointer )( + ID3D10Blob * This); + + SIZE_T ( STDMETHODCALLTYPE *GetBufferSize )( + ID3D10Blob * This); + + END_INTERFACE + } ID3D10BlobVtbl; + + interface ID3D10Blob + { + CONST_VTBL struct ID3D10BlobVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D10Blob_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D10Blob_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D10Blob_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D10Blob_GetBufferPointer(This) \ + ( (This)->lpVtbl -> GetBufferPointer(This) ) + +#define ID3D10Blob_GetBufferSize(This) \ + ( (This)->lpVtbl -> GetBufferSize(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D10Blob_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3dcommon_0000_0001 */ +/* [local] */ + +typedef interface ID3D10Blob* LPD3D10BLOB; +typedef ID3D10Blob ID3DBlob; + +typedef ID3DBlob* LPD3DBLOB; +#define IID_ID3DBlob IID_ID3D10Blob +typedef void ( __stdcall *PFN_DESTRUCTION_CALLBACK )( + void *pData); + + + +extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0001_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0001_v0_0_s_ifspec; + +#ifndef __ID3DDestructionNotifier_INTERFACE_DEFINED__ +#define __ID3DDestructionNotifier_INTERFACE_DEFINED__ + +/* interface ID3DDestructionNotifier */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3DDestructionNotifier; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("a06eb39a-50da-425b-8c31-4eecd6c270f3") + ID3DDestructionNotifier : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE RegisterDestructionCallback( + /* [annotation] */ + _In_ PFN_DESTRUCTION_CALLBACK callbackFn, + /* [annotation] */ + _In_ void *pData, + /* [annotation] */ + _Out_ UINT *pCallbackID) = 0; + + virtual HRESULT STDMETHODCALLTYPE UnregisterDestructionCallback( + /* [annotation] */ + _In_ UINT callbackID) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3DDestructionNotifierVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3DDestructionNotifier * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3DDestructionNotifier * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3DDestructionNotifier * This); + + HRESULT ( STDMETHODCALLTYPE *RegisterDestructionCallback )( + ID3DDestructionNotifier * This, + /* [annotation] */ + _In_ PFN_DESTRUCTION_CALLBACK callbackFn, + /* [annotation] */ + _In_ void *pData, + /* [annotation] */ + _Out_ UINT *pCallbackID); + + HRESULT ( STDMETHODCALLTYPE *UnregisterDestructionCallback )( + ID3DDestructionNotifier * This, + /* [annotation] */ + _In_ UINT callbackID); + + END_INTERFACE + } ID3DDestructionNotifierVtbl; + + interface ID3DDestructionNotifier + { + CONST_VTBL struct ID3DDestructionNotifierVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3DDestructionNotifier_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3DDestructionNotifier_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3DDestructionNotifier_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3DDestructionNotifier_RegisterDestructionCallback(This,callbackFn,pData,pCallbackID) \ + ( (This)->lpVtbl -> RegisterDestructionCallback(This,callbackFn,pData,pCallbackID) ) + +#define ID3DDestructionNotifier_UnregisterDestructionCallback(This,callbackID) \ + ( (This)->lpVtbl -> UnregisterDestructionCallback(This,callbackID) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3DDestructionNotifier_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3dcommon_0000_0002 */ +/* [local] */ + +typedef +enum _D3D_INCLUDE_TYPE + { + D3D_INCLUDE_LOCAL = 0, + D3D_INCLUDE_SYSTEM = ( D3D_INCLUDE_LOCAL + 1 ) , + D3D10_INCLUDE_LOCAL = D3D_INCLUDE_LOCAL, + D3D10_INCLUDE_SYSTEM = D3D_INCLUDE_SYSTEM, + D3D_INCLUDE_FORCE_DWORD = 0x7fffffff + } D3D_INCLUDE_TYPE; + +typedef interface ID3DInclude ID3DInclude; +#undef INTERFACE +#define INTERFACE ID3DInclude +DECLARE_INTERFACE(ID3DInclude) +{ + STDMETHOD(Open)(THIS_ D3D_INCLUDE_TYPE IncludeType, LPCSTR pFileName, LPCVOID pParentData, LPCVOID *ppData, UINT *pBytes) PURE; + STDMETHOD(Close)(THIS_ LPCVOID pData) PURE; +}; +typedef ID3DInclude* LPD3DINCLUDE; +typedef +enum _D3D_SHADER_VARIABLE_CLASS + { + D3D_SVC_SCALAR = 0, + D3D_SVC_VECTOR = ( D3D_SVC_SCALAR + 1 ) , + D3D_SVC_MATRIX_ROWS = ( D3D_SVC_VECTOR + 1 ) , + D3D_SVC_MATRIX_COLUMNS = ( D3D_SVC_MATRIX_ROWS + 1 ) , + D3D_SVC_OBJECT = ( D3D_SVC_MATRIX_COLUMNS + 1 ) , + D3D_SVC_STRUCT = ( D3D_SVC_OBJECT + 1 ) , + D3D_SVC_INTERFACE_CLASS = ( D3D_SVC_STRUCT + 1 ) , + D3D_SVC_INTERFACE_POINTER = ( D3D_SVC_INTERFACE_CLASS + 1 ) , + D3D10_SVC_SCALAR = D3D_SVC_SCALAR, + D3D10_SVC_VECTOR = D3D_SVC_VECTOR, + D3D10_SVC_MATRIX_ROWS = D3D_SVC_MATRIX_ROWS, + D3D10_SVC_MATRIX_COLUMNS = D3D_SVC_MATRIX_COLUMNS, + D3D10_SVC_OBJECT = D3D_SVC_OBJECT, + D3D10_SVC_STRUCT = D3D_SVC_STRUCT, + D3D11_SVC_INTERFACE_CLASS = D3D_SVC_INTERFACE_CLASS, + D3D11_SVC_INTERFACE_POINTER = D3D_SVC_INTERFACE_POINTER, + D3D_SVC_FORCE_DWORD = 0x7fffffff + } D3D_SHADER_VARIABLE_CLASS; + +typedef +enum _D3D_SHADER_VARIABLE_FLAGS + { + D3D_SVF_USERPACKED = 1, + D3D_SVF_USED = 2, + D3D_SVF_INTERFACE_POINTER = 4, + D3D_SVF_INTERFACE_PARAMETER = 8, + D3D10_SVF_USERPACKED = D3D_SVF_USERPACKED, + D3D10_SVF_USED = D3D_SVF_USED, + D3D11_SVF_INTERFACE_POINTER = D3D_SVF_INTERFACE_POINTER, + D3D11_SVF_INTERFACE_PARAMETER = D3D_SVF_INTERFACE_PARAMETER, + D3D_SVF_FORCE_DWORD = 0x7fffffff + } D3D_SHADER_VARIABLE_FLAGS; + +typedef +enum _D3D_SHADER_VARIABLE_TYPE + { + D3D_SVT_VOID = 0, + D3D_SVT_BOOL = 1, + D3D_SVT_INT = 2, + D3D_SVT_FLOAT = 3, + D3D_SVT_STRING = 4, + D3D_SVT_TEXTURE = 5, + D3D_SVT_TEXTURE1D = 6, + D3D_SVT_TEXTURE2D = 7, + D3D_SVT_TEXTURE3D = 8, + D3D_SVT_TEXTURECUBE = 9, + D3D_SVT_SAMPLER = 10, + D3D_SVT_SAMPLER1D = 11, + D3D_SVT_SAMPLER2D = 12, + D3D_SVT_SAMPLER3D = 13, + D3D_SVT_SAMPLERCUBE = 14, + D3D_SVT_PIXELSHADER = 15, + D3D_SVT_VERTEXSHADER = 16, + D3D_SVT_PIXELFRAGMENT = 17, + D3D_SVT_VERTEXFRAGMENT = 18, + D3D_SVT_UINT = 19, + D3D_SVT_UINT8 = 20, + D3D_SVT_GEOMETRYSHADER = 21, + D3D_SVT_RASTERIZER = 22, + D3D_SVT_DEPTHSTENCIL = 23, + D3D_SVT_BLEND = 24, + D3D_SVT_BUFFER = 25, + D3D_SVT_CBUFFER = 26, + D3D_SVT_TBUFFER = 27, + D3D_SVT_TEXTURE1DARRAY = 28, + D3D_SVT_TEXTURE2DARRAY = 29, + D3D_SVT_RENDERTARGETVIEW = 30, + D3D_SVT_DEPTHSTENCILVIEW = 31, + D3D_SVT_TEXTURE2DMS = 32, + D3D_SVT_TEXTURE2DMSARRAY = 33, + D3D_SVT_TEXTURECUBEARRAY = 34, + D3D_SVT_HULLSHADER = 35, + D3D_SVT_DOMAINSHADER = 36, + D3D_SVT_INTERFACE_POINTER = 37, + D3D_SVT_COMPUTESHADER = 38, + D3D_SVT_DOUBLE = 39, + D3D_SVT_RWTEXTURE1D = 40, + D3D_SVT_RWTEXTURE1DARRAY = 41, + D3D_SVT_RWTEXTURE2D = 42, + D3D_SVT_RWTEXTURE2DARRAY = 43, + D3D_SVT_RWTEXTURE3D = 44, + D3D_SVT_RWBUFFER = 45, + D3D_SVT_BYTEADDRESS_BUFFER = 46, + D3D_SVT_RWBYTEADDRESS_BUFFER = 47, + D3D_SVT_STRUCTURED_BUFFER = 48, + D3D_SVT_RWSTRUCTURED_BUFFER = 49, + D3D_SVT_APPEND_STRUCTURED_BUFFER = 50, + D3D_SVT_CONSUME_STRUCTURED_BUFFER = 51, + D3D_SVT_MIN8FLOAT = 52, + D3D_SVT_MIN10FLOAT = 53, + D3D_SVT_MIN16FLOAT = 54, + D3D_SVT_MIN12INT = 55, + D3D_SVT_MIN16INT = 56, + D3D_SVT_MIN16UINT = 57, + D3D10_SVT_VOID = D3D_SVT_VOID, + D3D10_SVT_BOOL = D3D_SVT_BOOL, + D3D10_SVT_INT = D3D_SVT_INT, + D3D10_SVT_FLOAT = D3D_SVT_FLOAT, + D3D10_SVT_STRING = D3D_SVT_STRING, + D3D10_SVT_TEXTURE = D3D_SVT_TEXTURE, + D3D10_SVT_TEXTURE1D = D3D_SVT_TEXTURE1D, + D3D10_SVT_TEXTURE2D = D3D_SVT_TEXTURE2D, + D3D10_SVT_TEXTURE3D = D3D_SVT_TEXTURE3D, + D3D10_SVT_TEXTURECUBE = D3D_SVT_TEXTURECUBE, + D3D10_SVT_SAMPLER = D3D_SVT_SAMPLER, + D3D10_SVT_SAMPLER1D = D3D_SVT_SAMPLER1D, + D3D10_SVT_SAMPLER2D = D3D_SVT_SAMPLER2D, + D3D10_SVT_SAMPLER3D = D3D_SVT_SAMPLER3D, + D3D10_SVT_SAMPLERCUBE = D3D_SVT_SAMPLERCUBE, + D3D10_SVT_PIXELSHADER = D3D_SVT_PIXELSHADER, + D3D10_SVT_VERTEXSHADER = D3D_SVT_VERTEXSHADER, + D3D10_SVT_PIXELFRAGMENT = D3D_SVT_PIXELFRAGMENT, + D3D10_SVT_VERTEXFRAGMENT = D3D_SVT_VERTEXFRAGMENT, + D3D10_SVT_UINT = D3D_SVT_UINT, + D3D10_SVT_UINT8 = D3D_SVT_UINT8, + D3D10_SVT_GEOMETRYSHADER = D3D_SVT_GEOMETRYSHADER, + D3D10_SVT_RASTERIZER = D3D_SVT_RASTERIZER, + D3D10_SVT_DEPTHSTENCIL = D3D_SVT_DEPTHSTENCIL, + D3D10_SVT_BLEND = D3D_SVT_BLEND, + D3D10_SVT_BUFFER = D3D_SVT_BUFFER, + D3D10_SVT_CBUFFER = D3D_SVT_CBUFFER, + D3D10_SVT_TBUFFER = D3D_SVT_TBUFFER, + D3D10_SVT_TEXTURE1DARRAY = D3D_SVT_TEXTURE1DARRAY, + D3D10_SVT_TEXTURE2DARRAY = D3D_SVT_TEXTURE2DARRAY, + D3D10_SVT_RENDERTARGETVIEW = D3D_SVT_RENDERTARGETVIEW, + D3D10_SVT_DEPTHSTENCILVIEW = D3D_SVT_DEPTHSTENCILVIEW, + D3D10_SVT_TEXTURE2DMS = D3D_SVT_TEXTURE2DMS, + D3D10_SVT_TEXTURE2DMSARRAY = D3D_SVT_TEXTURE2DMSARRAY, + D3D10_SVT_TEXTURECUBEARRAY = D3D_SVT_TEXTURECUBEARRAY, + D3D11_SVT_HULLSHADER = D3D_SVT_HULLSHADER, + D3D11_SVT_DOMAINSHADER = D3D_SVT_DOMAINSHADER, + D3D11_SVT_INTERFACE_POINTER = D3D_SVT_INTERFACE_POINTER, + D3D11_SVT_COMPUTESHADER = D3D_SVT_COMPUTESHADER, + D3D11_SVT_DOUBLE = D3D_SVT_DOUBLE, + D3D11_SVT_RWTEXTURE1D = D3D_SVT_RWTEXTURE1D, + D3D11_SVT_RWTEXTURE1DARRAY = D3D_SVT_RWTEXTURE1DARRAY, + D3D11_SVT_RWTEXTURE2D = D3D_SVT_RWTEXTURE2D, + D3D11_SVT_RWTEXTURE2DARRAY = D3D_SVT_RWTEXTURE2DARRAY, + D3D11_SVT_RWTEXTURE3D = D3D_SVT_RWTEXTURE3D, + D3D11_SVT_RWBUFFER = D3D_SVT_RWBUFFER, + D3D11_SVT_BYTEADDRESS_BUFFER = D3D_SVT_BYTEADDRESS_BUFFER, + D3D11_SVT_RWBYTEADDRESS_BUFFER = D3D_SVT_RWBYTEADDRESS_BUFFER, + D3D11_SVT_STRUCTURED_BUFFER = D3D_SVT_STRUCTURED_BUFFER, + D3D11_SVT_RWSTRUCTURED_BUFFER = D3D_SVT_RWSTRUCTURED_BUFFER, + D3D11_SVT_APPEND_STRUCTURED_BUFFER = D3D_SVT_APPEND_STRUCTURED_BUFFER, + D3D11_SVT_CONSUME_STRUCTURED_BUFFER = D3D_SVT_CONSUME_STRUCTURED_BUFFER, + D3D_SVT_FORCE_DWORD = 0x7fffffff + } D3D_SHADER_VARIABLE_TYPE; + +typedef +enum _D3D_SHADER_INPUT_FLAGS + { + D3D_SIF_USERPACKED = 0x1, + D3D_SIF_COMPARISON_SAMPLER = 0x2, + D3D_SIF_TEXTURE_COMPONENT_0 = 0x4, + D3D_SIF_TEXTURE_COMPONENT_1 = 0x8, + D3D_SIF_TEXTURE_COMPONENTS = 0xc, + D3D_SIF_UNUSED = 0x10, + D3D10_SIF_USERPACKED = D3D_SIF_USERPACKED, + D3D10_SIF_COMPARISON_SAMPLER = D3D_SIF_COMPARISON_SAMPLER, + D3D10_SIF_TEXTURE_COMPONENT_0 = D3D_SIF_TEXTURE_COMPONENT_0, + D3D10_SIF_TEXTURE_COMPONENT_1 = D3D_SIF_TEXTURE_COMPONENT_1, + D3D10_SIF_TEXTURE_COMPONENTS = D3D_SIF_TEXTURE_COMPONENTS, + D3D_SIF_FORCE_DWORD = 0x7fffffff + } D3D_SHADER_INPUT_FLAGS; + +typedef +enum _D3D_SHADER_INPUT_TYPE + { + D3D_SIT_CBUFFER = 0, + D3D_SIT_TBUFFER = ( D3D_SIT_CBUFFER + 1 ) , + D3D_SIT_TEXTURE = ( D3D_SIT_TBUFFER + 1 ) , + D3D_SIT_SAMPLER = ( D3D_SIT_TEXTURE + 1 ) , + D3D_SIT_UAV_RWTYPED = ( D3D_SIT_SAMPLER + 1 ) , + D3D_SIT_STRUCTURED = ( D3D_SIT_UAV_RWTYPED + 1 ) , + D3D_SIT_UAV_RWSTRUCTURED = ( D3D_SIT_STRUCTURED + 1 ) , + D3D_SIT_BYTEADDRESS = ( D3D_SIT_UAV_RWSTRUCTURED + 1 ) , + D3D_SIT_UAV_RWBYTEADDRESS = ( D3D_SIT_BYTEADDRESS + 1 ) , + D3D_SIT_UAV_APPEND_STRUCTURED = ( D3D_SIT_UAV_RWBYTEADDRESS + 1 ) , + D3D_SIT_UAV_CONSUME_STRUCTURED = ( D3D_SIT_UAV_APPEND_STRUCTURED + 1 ) , + D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER = ( D3D_SIT_UAV_CONSUME_STRUCTURED + 1 ) , + D3D10_SIT_CBUFFER = D3D_SIT_CBUFFER, + D3D10_SIT_TBUFFER = D3D_SIT_TBUFFER, + D3D10_SIT_TEXTURE = D3D_SIT_TEXTURE, + D3D10_SIT_SAMPLER = D3D_SIT_SAMPLER, + D3D11_SIT_UAV_RWTYPED = D3D_SIT_UAV_RWTYPED, + D3D11_SIT_STRUCTURED = D3D_SIT_STRUCTURED, + D3D11_SIT_UAV_RWSTRUCTURED = D3D_SIT_UAV_RWSTRUCTURED, + D3D11_SIT_BYTEADDRESS = D3D_SIT_BYTEADDRESS, + D3D11_SIT_UAV_RWBYTEADDRESS = D3D_SIT_UAV_RWBYTEADDRESS, + D3D11_SIT_UAV_APPEND_STRUCTURED = D3D_SIT_UAV_APPEND_STRUCTURED, + D3D11_SIT_UAV_CONSUME_STRUCTURED = D3D_SIT_UAV_CONSUME_STRUCTURED, + D3D11_SIT_UAV_RWSTRUCTURED_WITH_COUNTER = D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER + } D3D_SHADER_INPUT_TYPE; + +typedef +enum _D3D_SHADER_CBUFFER_FLAGS + { + D3D_CBF_USERPACKED = 1, + D3D10_CBF_USERPACKED = D3D_CBF_USERPACKED, + D3D_CBF_FORCE_DWORD = 0x7fffffff + } D3D_SHADER_CBUFFER_FLAGS; + +typedef +enum _D3D_CBUFFER_TYPE + { + D3D_CT_CBUFFER = 0, + D3D_CT_TBUFFER = ( D3D_CT_CBUFFER + 1 ) , + D3D_CT_INTERFACE_POINTERS = ( D3D_CT_TBUFFER + 1 ) , + D3D_CT_RESOURCE_BIND_INFO = ( D3D_CT_INTERFACE_POINTERS + 1 ) , + D3D10_CT_CBUFFER = D3D_CT_CBUFFER, + D3D10_CT_TBUFFER = D3D_CT_TBUFFER, + D3D11_CT_CBUFFER = D3D_CT_CBUFFER, + D3D11_CT_TBUFFER = D3D_CT_TBUFFER, + D3D11_CT_INTERFACE_POINTERS = D3D_CT_INTERFACE_POINTERS, + D3D11_CT_RESOURCE_BIND_INFO = D3D_CT_RESOURCE_BIND_INFO + } D3D_CBUFFER_TYPE; + +typedef +enum D3D_NAME + { + D3D_NAME_UNDEFINED = 0, + D3D_NAME_POSITION = 1, + D3D_NAME_CLIP_DISTANCE = 2, + D3D_NAME_CULL_DISTANCE = 3, + D3D_NAME_RENDER_TARGET_ARRAY_INDEX = 4, + D3D_NAME_VIEWPORT_ARRAY_INDEX = 5, + D3D_NAME_VERTEX_ID = 6, + D3D_NAME_PRIMITIVE_ID = 7, + D3D_NAME_INSTANCE_ID = 8, + D3D_NAME_IS_FRONT_FACE = 9, + D3D_NAME_SAMPLE_INDEX = 10, + D3D_NAME_FINAL_QUAD_EDGE_TESSFACTOR = 11, + D3D_NAME_FINAL_QUAD_INSIDE_TESSFACTOR = 12, + D3D_NAME_FINAL_TRI_EDGE_TESSFACTOR = 13, + D3D_NAME_FINAL_TRI_INSIDE_TESSFACTOR = 14, + D3D_NAME_FINAL_LINE_DETAIL_TESSFACTOR = 15, + D3D_NAME_FINAL_LINE_DENSITY_TESSFACTOR = 16, + D3D_NAME_BARYCENTRICS = 23, + D3D_NAME_TARGET = 64, + D3D_NAME_DEPTH = 65, + D3D_NAME_COVERAGE = 66, + D3D_NAME_DEPTH_GREATER_EQUAL = 67, + D3D_NAME_DEPTH_LESS_EQUAL = 68, + D3D_NAME_STENCIL_REF = 69, + D3D_NAME_INNER_COVERAGE = 70, + D3D10_NAME_UNDEFINED = D3D_NAME_UNDEFINED, + D3D10_NAME_POSITION = D3D_NAME_POSITION, + D3D10_NAME_CLIP_DISTANCE = D3D_NAME_CLIP_DISTANCE, + D3D10_NAME_CULL_DISTANCE = D3D_NAME_CULL_DISTANCE, + D3D10_NAME_RENDER_TARGET_ARRAY_INDEX = D3D_NAME_RENDER_TARGET_ARRAY_INDEX, + D3D10_NAME_VIEWPORT_ARRAY_INDEX = D3D_NAME_VIEWPORT_ARRAY_INDEX, + D3D10_NAME_VERTEX_ID = D3D_NAME_VERTEX_ID, + D3D10_NAME_PRIMITIVE_ID = D3D_NAME_PRIMITIVE_ID, + D3D10_NAME_INSTANCE_ID = D3D_NAME_INSTANCE_ID, + D3D10_NAME_IS_FRONT_FACE = D3D_NAME_IS_FRONT_FACE, + D3D10_NAME_SAMPLE_INDEX = D3D_NAME_SAMPLE_INDEX, + D3D10_NAME_TARGET = D3D_NAME_TARGET, + D3D10_NAME_DEPTH = D3D_NAME_DEPTH, + D3D10_NAME_COVERAGE = D3D_NAME_COVERAGE, + D3D11_NAME_FINAL_QUAD_EDGE_TESSFACTOR = D3D_NAME_FINAL_QUAD_EDGE_TESSFACTOR, + D3D11_NAME_FINAL_QUAD_INSIDE_TESSFACTOR = D3D_NAME_FINAL_QUAD_INSIDE_TESSFACTOR, + D3D11_NAME_FINAL_TRI_EDGE_TESSFACTOR = D3D_NAME_FINAL_TRI_EDGE_TESSFACTOR, + D3D11_NAME_FINAL_TRI_INSIDE_TESSFACTOR = D3D_NAME_FINAL_TRI_INSIDE_TESSFACTOR, + D3D11_NAME_FINAL_LINE_DETAIL_TESSFACTOR = D3D_NAME_FINAL_LINE_DETAIL_TESSFACTOR, + D3D11_NAME_FINAL_LINE_DENSITY_TESSFACTOR = D3D_NAME_FINAL_LINE_DENSITY_TESSFACTOR, + D3D11_NAME_DEPTH_GREATER_EQUAL = D3D_NAME_DEPTH_GREATER_EQUAL, + D3D11_NAME_DEPTH_LESS_EQUAL = D3D_NAME_DEPTH_LESS_EQUAL, + D3D11_NAME_STENCIL_REF = D3D_NAME_STENCIL_REF, + D3D11_NAME_INNER_COVERAGE = D3D_NAME_INNER_COVERAGE, + D3D12_NAME_BARYCENTRICS = D3D_NAME_BARYCENTRICS + } D3D_NAME; + +typedef +enum D3D_RESOURCE_RETURN_TYPE + { + D3D_RETURN_TYPE_UNORM = 1, + D3D_RETURN_TYPE_SNORM = 2, + D3D_RETURN_TYPE_SINT = 3, + D3D_RETURN_TYPE_UINT = 4, + D3D_RETURN_TYPE_FLOAT = 5, + D3D_RETURN_TYPE_MIXED = 6, + D3D_RETURN_TYPE_DOUBLE = 7, + D3D_RETURN_TYPE_CONTINUED = 8, + D3D10_RETURN_TYPE_UNORM = D3D_RETURN_TYPE_UNORM, + D3D10_RETURN_TYPE_SNORM = D3D_RETURN_TYPE_SNORM, + D3D10_RETURN_TYPE_SINT = D3D_RETURN_TYPE_SINT, + D3D10_RETURN_TYPE_UINT = D3D_RETURN_TYPE_UINT, + D3D10_RETURN_TYPE_FLOAT = D3D_RETURN_TYPE_FLOAT, + D3D10_RETURN_TYPE_MIXED = D3D_RETURN_TYPE_MIXED, + D3D11_RETURN_TYPE_UNORM = D3D_RETURN_TYPE_UNORM, + D3D11_RETURN_TYPE_SNORM = D3D_RETURN_TYPE_SNORM, + D3D11_RETURN_TYPE_SINT = D3D_RETURN_TYPE_SINT, + D3D11_RETURN_TYPE_UINT = D3D_RETURN_TYPE_UINT, + D3D11_RETURN_TYPE_FLOAT = D3D_RETURN_TYPE_FLOAT, + D3D11_RETURN_TYPE_MIXED = D3D_RETURN_TYPE_MIXED, + D3D11_RETURN_TYPE_DOUBLE = D3D_RETURN_TYPE_DOUBLE, + D3D11_RETURN_TYPE_CONTINUED = D3D_RETURN_TYPE_CONTINUED + } D3D_RESOURCE_RETURN_TYPE; + +typedef +enum D3D_REGISTER_COMPONENT_TYPE + { + D3D_REGISTER_COMPONENT_UNKNOWN = 0, + D3D_REGISTER_COMPONENT_UINT32 = 1, + D3D_REGISTER_COMPONENT_SINT32 = 2, + D3D_REGISTER_COMPONENT_FLOAT32 = 3, + D3D10_REGISTER_COMPONENT_UNKNOWN = D3D_REGISTER_COMPONENT_UNKNOWN, + D3D10_REGISTER_COMPONENT_UINT32 = D3D_REGISTER_COMPONENT_UINT32, + D3D10_REGISTER_COMPONENT_SINT32 = D3D_REGISTER_COMPONENT_SINT32, + D3D10_REGISTER_COMPONENT_FLOAT32 = D3D_REGISTER_COMPONENT_FLOAT32 + } D3D_REGISTER_COMPONENT_TYPE; + +typedef +enum D3D_TESSELLATOR_DOMAIN + { + D3D_TESSELLATOR_DOMAIN_UNDEFINED = 0, + D3D_TESSELLATOR_DOMAIN_ISOLINE = 1, + D3D_TESSELLATOR_DOMAIN_TRI = 2, + D3D_TESSELLATOR_DOMAIN_QUAD = 3, + D3D11_TESSELLATOR_DOMAIN_UNDEFINED = D3D_TESSELLATOR_DOMAIN_UNDEFINED, + D3D11_TESSELLATOR_DOMAIN_ISOLINE = D3D_TESSELLATOR_DOMAIN_ISOLINE, + D3D11_TESSELLATOR_DOMAIN_TRI = D3D_TESSELLATOR_DOMAIN_TRI, + D3D11_TESSELLATOR_DOMAIN_QUAD = D3D_TESSELLATOR_DOMAIN_QUAD + } D3D_TESSELLATOR_DOMAIN; + +typedef +enum D3D_TESSELLATOR_PARTITIONING + { + D3D_TESSELLATOR_PARTITIONING_UNDEFINED = 0, + D3D_TESSELLATOR_PARTITIONING_INTEGER = 1, + D3D_TESSELLATOR_PARTITIONING_POW2 = 2, + D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD = 3, + D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN = 4, + D3D11_TESSELLATOR_PARTITIONING_UNDEFINED = D3D_TESSELLATOR_PARTITIONING_UNDEFINED, + D3D11_TESSELLATOR_PARTITIONING_INTEGER = D3D_TESSELLATOR_PARTITIONING_INTEGER, + D3D11_TESSELLATOR_PARTITIONING_POW2 = D3D_TESSELLATOR_PARTITIONING_POW2, + D3D11_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD = D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD, + D3D11_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN = D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN + } D3D_TESSELLATOR_PARTITIONING; + +typedef +enum D3D_TESSELLATOR_OUTPUT_PRIMITIVE + { + D3D_TESSELLATOR_OUTPUT_UNDEFINED = 0, + D3D_TESSELLATOR_OUTPUT_POINT = 1, + D3D_TESSELLATOR_OUTPUT_LINE = 2, + D3D_TESSELLATOR_OUTPUT_TRIANGLE_CW = 3, + D3D_TESSELLATOR_OUTPUT_TRIANGLE_CCW = 4, + D3D11_TESSELLATOR_OUTPUT_UNDEFINED = D3D_TESSELLATOR_OUTPUT_UNDEFINED, + D3D11_TESSELLATOR_OUTPUT_POINT = D3D_TESSELLATOR_OUTPUT_POINT, + D3D11_TESSELLATOR_OUTPUT_LINE = D3D_TESSELLATOR_OUTPUT_LINE, + D3D11_TESSELLATOR_OUTPUT_TRIANGLE_CW = D3D_TESSELLATOR_OUTPUT_TRIANGLE_CW, + D3D11_TESSELLATOR_OUTPUT_TRIANGLE_CCW = D3D_TESSELLATOR_OUTPUT_TRIANGLE_CCW + } D3D_TESSELLATOR_OUTPUT_PRIMITIVE; + +typedef +enum D3D_MIN_PRECISION + { + D3D_MIN_PRECISION_DEFAULT = 0, + D3D_MIN_PRECISION_FLOAT_16 = 1, + D3D_MIN_PRECISION_FLOAT_2_8 = 2, + D3D_MIN_PRECISION_RESERVED = 3, + D3D_MIN_PRECISION_SINT_16 = 4, + D3D_MIN_PRECISION_UINT_16 = 5, + D3D_MIN_PRECISION_ANY_16 = 0xf0, + D3D_MIN_PRECISION_ANY_10 = 0xf1 + } D3D_MIN_PRECISION; + +typedef +enum D3D_INTERPOLATION_MODE + { + D3D_INTERPOLATION_UNDEFINED = 0, + D3D_INTERPOLATION_CONSTANT = 1, + D3D_INTERPOLATION_LINEAR = 2, + D3D_INTERPOLATION_LINEAR_CENTROID = 3, + D3D_INTERPOLATION_LINEAR_NOPERSPECTIVE = 4, + D3D_INTERPOLATION_LINEAR_NOPERSPECTIVE_CENTROID = 5, + D3D_INTERPOLATION_LINEAR_SAMPLE = 6, + D3D_INTERPOLATION_LINEAR_NOPERSPECTIVE_SAMPLE = 7 + } D3D_INTERPOLATION_MODE; + +typedef +enum _D3D_PARAMETER_FLAGS + { + D3D_PF_NONE = 0, + D3D_PF_IN = 0x1, + D3D_PF_OUT = 0x2, + D3D_PF_FORCE_DWORD = 0x7fffffff + } D3D_PARAMETER_FLAGS; + +DEFINE_GUID(WKPDID_D3DDebugObjectName,0x429b8c22,0x9188,0x4b0c,0x87,0x42,0xac,0xb0,0xbf,0x85,0xc2,0x00); +DEFINE_GUID(WKPDID_D3DDebugObjectNameW,0x4cca5fd8,0x921f,0x42c8,0x85,0x66,0x70,0xca,0xf2,0xa9,0xb7,0x41); +DEFINE_GUID(WKPDID_CommentStringW,0xd0149dc0,0x90e8,0x4ec8,0x81, 0x44, 0xe9, 0x00, 0xad, 0x26, 0x6b, 0xb2); +#define D3D_SET_OBJECT_NAME_N_A(pObject, Chars, pName) (pObject)->SetPrivateData(WKPDID_D3DDebugObjectName, Chars, pName) +#define D3D_SET_OBJECT_NAME_A(pObject, pName) D3D_SET_OBJECT_NAME_N_A(pObject, lstrlenA(pName), pName) +#define D3D_SET_OBJECT_NAME_N_W(pObject, Chars, pName) (pObject)->SetPrivateData(WKPDID_D3DDebugObjectNameW, Chars*2, pName) +#define D3D_SET_OBJECT_NAME_W(pObject, pName) D3D_SET_OBJECT_NAME_N_W(pObject, wcslen(pName), pName) +#define D3D_COMPONENT_MASK_X 1 +#define D3D_COMPONENT_MASK_Y 2 +#define D3D_COMPONENT_MASK_Z 4 +#define D3D_COMPONENT_MASK_W 8 + + +extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0002_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0002_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/d3dcompiler.h b/gfx/include/dxsdk/d3dcompiler.h new file mode 100644 index 0000000000..632c3da9cf --- /dev/null +++ b/gfx/include/dxsdk/d3dcompiler.h @@ -0,0 +1,586 @@ +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// File: D3DCompiler.h +// Content: D3D Compilation Types and APIs +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef __D3DCOMPILER_H__ +#define __D3DCOMPILER_H__ + +/*#include */ + +// Current name of the DLL shipped in the same SDK as this header. + + + +#define D3DCOMPILER_DLL_W L"d3dcompiler_47.dll" +#define D3DCOMPILER_DLL_A "d3dcompiler_47.dll" + +// Current HLSL compiler version. + +#define D3D_COMPILER_VERSION 47 + +#ifdef UNICODE + #define D3DCOMPILER_DLL D3DCOMPILER_DLL_W +#else + #define D3DCOMPILER_DLL D3DCOMPILER_DLL_A +#endif + +#include "d3d11shader.h" +#include "d3d12shader.h" + +////////////////////////////////////////////////////////////////////////////// +// APIs ////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + +//---------------------------------------------------------------------------- +// D3DReadFileToBlob: +// ----------------- +// Simple helper routine to read a file on disk into memory +// for passing to other routines in this API. +//---------------------------------------------------------------------------- + +HRESULT WINAPI +D3DReadFileToBlob(_In_ LPCWSTR pFileName, + _Out_ ID3DBlob** ppContents); + +//---------------------------------------------------------------------------- +// D3DWriteBlobToFile: +// ------------------ +// Simple helper routine to write a memory blob to a file on disk. +//---------------------------------------------------------------------------- + +HRESULT WINAPI +D3DWriteBlobToFile(_In_ ID3DBlob* pBlob, + _In_ LPCWSTR pFileName, + _In_ BOOL bOverwrite); + +//---------------------------------------------------------------------------- +// D3DCOMPILE flags: +// ----------------- +// D3DCOMPILE_DEBUG +// Insert debug file/line/type/symbol information. +// +// D3DCOMPILE_SKIP_VALIDATION +// Do not validate the generated code against known capabilities and +// constraints. This option is only recommended when compiling shaders +// you KNOW will work. (ie. have compiled before without this option.) +// Shaders are always validated by D3D before they are set to the device. +// +// D3DCOMPILE_SKIP_OPTIMIZATION +// Instructs the compiler to skip optimization steps during code generation. +// Unless you are trying to isolate a problem in your code using this option +// is not recommended. +// +// D3DCOMPILE_PACK_MATRIX_ROW_MAJOR +// Unless explicitly specified, matrices will be packed in row-major order +// on input and output from the shader. +// +// D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR +// Unless explicitly specified, matrices will be packed in column-major +// order on input and output from the shader. This is generally more +// efficient, since it allows vector-matrix multiplication to be performed +// using a series of dot-products. +// +// D3DCOMPILE_PARTIAL_PRECISION +// Force all computations in resulting shader to occur at partial precision. +// This may result in faster evaluation of shaders on some hardware. +// +// D3DCOMPILE_FORCE_VS_SOFTWARE_NO_OPT +// Force compiler to compile against the next highest available software +// target for vertex shaders. This flag also turns optimizations off, +// and debugging on. +// +// D3DCOMPILE_FORCE_PS_SOFTWARE_NO_OPT +// Force compiler to compile against the next highest available software +// target for pixel shaders. This flag also turns optimizations off, +// and debugging on. +// +// D3DCOMPILE_NO_PRESHADER +// Disables Preshaders. Using this flag will cause the compiler to not +// pull out static expression for evaluation on the host cpu +// +// D3DCOMPILE_AVOID_FLOW_CONTROL +// Hint compiler to avoid flow-control constructs where possible. +// +// D3DCOMPILE_PREFER_FLOW_CONTROL +// Hint compiler to prefer flow-control constructs where possible. +// +// D3DCOMPILE_ENABLE_STRICTNESS +// By default, the HLSL/Effect compilers are not strict on deprecated syntax. +// Specifying this flag enables the strict mode. Deprecated syntax may be +// removed in a future release, and enabling syntax is a good way to make +// sure your shaders comply to the latest spec. +// +// D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY +// This enables older shaders to compile to 4_0 targets. +// +// D3DCOMPILE_DEBUG_NAME_FOR_SOURCE +// This enables a debug name to be generated based on source information. +// It requires D3DCOMPILE_DEBUG to be set, and is exclusive with +// D3DCOMPILE_DEBUG_NAME_FOR_BINARY. +// +// D3DCOMPILE_DEBUG_NAME_FOR_BINARY +// This enables a debug name to be generated based on compiled information. +// It requires D3DCOMPILE_DEBUG to be set, and is exclusive with +// D3DCOMPILE_DEBUG_NAME_FOR_SOURCE. +// +//---------------------------------------------------------------------------- + +#define D3DCOMPILE_DEBUG (1 << 0) +#define D3DCOMPILE_SKIP_VALIDATION (1 << 1) +#define D3DCOMPILE_SKIP_OPTIMIZATION (1 << 2) +#define D3DCOMPILE_PACK_MATRIX_ROW_MAJOR (1 << 3) +#define D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR (1 << 4) +#define D3DCOMPILE_PARTIAL_PRECISION (1 << 5) +#define D3DCOMPILE_FORCE_VS_SOFTWARE_NO_OPT (1 << 6) +#define D3DCOMPILE_FORCE_PS_SOFTWARE_NO_OPT (1 << 7) +#define D3DCOMPILE_NO_PRESHADER (1 << 8) +#define D3DCOMPILE_AVOID_FLOW_CONTROL (1 << 9) +#define D3DCOMPILE_PREFER_FLOW_CONTROL (1 << 10) +#define D3DCOMPILE_ENABLE_STRICTNESS (1 << 11) +#define D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY (1 << 12) +#define D3DCOMPILE_IEEE_STRICTNESS (1 << 13) +#define D3DCOMPILE_OPTIMIZATION_LEVEL0 (1 << 14) +#define D3DCOMPILE_OPTIMIZATION_LEVEL1 0 +#define D3DCOMPILE_OPTIMIZATION_LEVEL2 ((1 << 14) | (1 << 15)) +#define D3DCOMPILE_OPTIMIZATION_LEVEL3 (1 << 15) +#define D3DCOMPILE_RESERVED16 (1 << 16) +#define D3DCOMPILE_RESERVED17 (1 << 17) +#define D3DCOMPILE_WARNINGS_ARE_ERRORS (1 << 18) +#define D3DCOMPILE_RESOURCES_MAY_ALIAS (1 << 19) +#define D3DCOMPILE_ENABLE_UNBOUNDED_DESCRIPTOR_TABLES (1 << 20) +#define D3DCOMPILE_ALL_RESOURCES_BOUND (1 << 21) +#define D3DCOMPILE_DEBUG_NAME_FOR_SOURCE (1 << 22) +#define D3DCOMPILE_DEBUG_NAME_FOR_BINARY (1 << 23) + +//---------------------------------------------------------------------------- +// D3DCOMPILE_EFFECT flags: +// ------------------------------------- +// These flags are passed in when creating an effect, and affect +// either compilation behavior or runtime effect behavior +// +// D3DCOMPILE_EFFECT_CHILD_EFFECT +// Compile this .fx file to a child effect. Child effects have no +// initializers for any shared values as these are initialied in the +// master effect (pool). +// +// D3DCOMPILE_EFFECT_ALLOW_SLOW_OPS +// By default, performance mode is enabled. Performance mode +// disallows mutable state objects by preventing non-literal +// expressions from appearing in state object definitions. +// Specifying this flag will disable the mode and allow for mutable +// state objects. +// +//---------------------------------------------------------------------------- + +#define D3DCOMPILE_EFFECT_CHILD_EFFECT (1 << 0) +#define D3DCOMPILE_EFFECT_ALLOW_SLOW_OPS (1 << 1) + +//---------------------------------------------------------------------------- +// D3DCOMPILE Flags2: +// ----------------- +// Root signature flags. (passed in Flags2) +#define D3DCOMPILE_FLAGS2_FORCE_ROOT_SIGNATURE_LATEST 0 +#define D3DCOMPILE_FLAGS2_FORCE_ROOT_SIGNATURE_1_0 (1 << 4) +#define D3DCOMPILE_FLAGS2_FORCE_ROOT_SIGNATURE_1_1 (1 << 5) + +//---------------------------------------------------------------------------- +// D3DCompile: +// ---------- +// Compile source text into bytecode appropriate for the given target. +//---------------------------------------------------------------------------- + +// D3D_COMPILE_STANDARD_FILE_INCLUDE can be passed for pInclude in any +// API and indicates that a simple default include handler should be +// used. The include handler will include files relative to the +// current directory and files relative to the directory of the initial source +// file. When used with APIs like D3DCompile pSourceName must be a +// file name and the initial relative directory will be derived from it. +#define D3D_COMPILE_STANDARD_FILE_INCLUDE ((ID3DInclude*)(UINT_PTR)1) + +HRESULT WINAPI +D3DCompile(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData, + _In_ SIZE_T SrcDataSize, + _In_opt_ LPCSTR pSourceName, + _In_reads_opt_(_Inexpressible_(pDefines->Name != NULL)) CONST D3D_SHADER_MACRO* pDefines, + _In_opt_ ID3DInclude* pInclude, + _In_opt_ LPCSTR pEntrypoint, + _In_ LPCSTR pTarget, + _In_ UINT Flags1, + _In_ UINT Flags2, + _Out_ ID3DBlob** ppCode, + _Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorMsgs); + +typedef HRESULT (WINAPI *pD3DCompile) + (LPCVOID pSrcData, + SIZE_T SrcDataSize, + LPCSTR pFileName, + CONST D3D_SHADER_MACRO* pDefines, + ID3DInclude* pInclude, + LPCSTR pEntrypoint, + LPCSTR pTarget, + UINT Flags1, + UINT Flags2, + ID3DBlob** ppCode, + ID3DBlob** ppErrorMsgs); + +#define D3DCOMPILE_SECDATA_MERGE_UAV_SLOTS 0x00000001 +#define D3DCOMPILE_SECDATA_PRESERVE_TEMPLATE_SLOTS 0x00000002 +#define D3DCOMPILE_SECDATA_REQUIRE_TEMPLATE_MATCH 0x00000004 + +HRESULT WINAPI +D3DCompile2(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData, + _In_ SIZE_T SrcDataSize, + _In_opt_ LPCSTR pSourceName, + _In_reads_opt_(_Inexpressible_(pDefines->Name != NULL)) CONST D3D_SHADER_MACRO* pDefines, + _In_opt_ ID3DInclude* pInclude, + _In_ LPCSTR pEntrypoint, + _In_ LPCSTR pTarget, + _In_ UINT Flags1, + _In_ UINT Flags2, + _In_ UINT SecondaryDataFlags, + _In_reads_bytes_opt_(SecondaryDataSize) LPCVOID pSecondaryData, + _In_ SIZE_T SecondaryDataSize, + _Out_ ID3DBlob** ppCode, + _Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorMsgs); + +HRESULT WINAPI +D3DCompileFromFile(_In_ LPCWSTR pFileName, + _In_reads_opt_(_Inexpressible_(pDefines->Name != NULL)) CONST D3D_SHADER_MACRO* pDefines, + _In_opt_ ID3DInclude* pInclude, + _In_ LPCSTR pEntrypoint, + _In_ LPCSTR pTarget, + _In_ UINT Flags1, + _In_ UINT Flags2, + _Out_ ID3DBlob** ppCode, + _Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorMsgs); + +//---------------------------------------------------------------------------- +// D3DPreprocess: +// ------------- +// Process source text with the compiler's preprocessor and return +// the resulting text. +//---------------------------------------------------------------------------- + +HRESULT WINAPI +D3DPreprocess(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData, + _In_ SIZE_T SrcDataSize, + _In_opt_ LPCSTR pSourceName, + _In_opt_ CONST D3D_SHADER_MACRO* pDefines, + _In_opt_ ID3DInclude* pInclude, + _Out_ ID3DBlob** ppCodeText, + _Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorMsgs); + +typedef HRESULT (WINAPI *pD3DPreprocess) + (LPCVOID pSrcData, + SIZE_T SrcDataSize, + LPCSTR pFileName, + CONST D3D_SHADER_MACRO* pDefines, + ID3DInclude* pInclude, + ID3DBlob** ppCodeText, + ID3DBlob** ppErrorMsgs); + +//---------------------------------------------------------------------------- +// D3DGetDebugInfo: +// ----------------------- +// Gets shader debug info. Debug info is generated by D3DCompile and is +// embedded in the body of the shader. +//---------------------------------------------------------------------------- + +HRESULT WINAPI +D3DGetDebugInfo(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData, + _In_ SIZE_T SrcDataSize, + _Out_ ID3DBlob** ppDebugInfo); + +//---------------------------------------------------------------------------- +// D3DReflect: +// ---------- +// Shader code contains metadata that can be inspected via the +// reflection APIs. +//---------------------------------------------------------------------------- + +HRESULT WINAPI +D3DReflect(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData, + _In_ SIZE_T SrcDataSize, + _In_ REFIID pInterface, + _Out_ void** ppReflector); + +//---------------------------------------------------------------------------- +// D3DReflectLibrary: +// ---------- +// Library code contains metadata that can be inspected via the library +// reflection APIs. +//---------------------------------------------------------------------------- + +HRESULT WINAPI +D3DReflectLibrary(__in_bcount(SrcDataSize) LPCVOID pSrcData, + __in SIZE_T SrcDataSize, + __in REFIID riid, + __out LPVOID * ppReflector); + +//---------------------------------------------------------------------------- +// D3DDisassemble: +// ---------------------- +// Takes a binary shader and returns a buffer containing text assembly. +//---------------------------------------------------------------------------- + +#define D3D_DISASM_ENABLE_COLOR_CODE 0x00000001 +#define D3D_DISASM_ENABLE_DEFAULT_VALUE_PRINTS 0x00000002 +#define D3D_DISASM_ENABLE_INSTRUCTION_NUMBERING 0x00000004 +#define D3D_DISASM_ENABLE_INSTRUCTION_CYCLE 0x00000008 +#define D3D_DISASM_DISABLE_DEBUG_INFO 0x00000010 +#define D3D_DISASM_ENABLE_INSTRUCTION_OFFSET 0x00000020 +#define D3D_DISASM_INSTRUCTION_ONLY 0x00000040 +#define D3D_DISASM_PRINT_HEX_LITERALS 0x00000080 + +HRESULT WINAPI +D3DDisassemble(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData, + _In_ SIZE_T SrcDataSize, + _In_ UINT Flags, + _In_opt_ LPCSTR szComments, + _Out_ ID3DBlob** ppDisassembly); + +typedef HRESULT (WINAPI *pD3DDisassemble) + (_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData, + _In_ SIZE_T SrcDataSize, + _In_ UINT Flags, + _In_opt_ LPCSTR szComments, + _Out_ ID3DBlob** ppDisassembly); + +HRESULT WINAPI +D3DDisassembleRegion(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData, + _In_ SIZE_T SrcDataSize, + _In_ UINT Flags, + _In_opt_ LPCSTR szComments, + _In_ SIZE_T StartByteOffset, + _In_ SIZE_T NumInsts, + _Out_opt_ SIZE_T* pFinishByteOffset, + _Out_ ID3DBlob** ppDisassembly); + +//---------------------------------------------------------------------------- +// Shader linking and Function Linking Graph (FLG) APIs +//---------------------------------------------------------------------------- +HRESULT WINAPI +D3DCreateLinker(__out interface ID3D11Linker ** ppLinker); + +HRESULT WINAPI +D3DLoadModule(_In_ LPCVOID pSrcData, + _In_ SIZE_T cbSrcDataSize, + _Out_ interface ID3D11Module ** ppModule); + +HRESULT WINAPI +D3DCreateFunctionLinkingGraph(_In_ UINT uFlags, + _Out_ interface ID3D11FunctionLinkingGraph ** ppFunctionLinkingGraph); + +//---------------------------------------------------------------------------- +// D3DGetTraceInstructionOffsets: +// ----------------------- +// Determines byte offsets for instructions within a shader blob. +// This information is useful for going between trace instruction +// indices and byte offsets that are used in debug information. +//---------------------------------------------------------------------------- + +#define D3D_GET_INST_OFFSETS_INCLUDE_NON_EXECUTABLE 0x00000001 + +HRESULT WINAPI +D3DGetTraceInstructionOffsets(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData, + _In_ SIZE_T SrcDataSize, + _In_ UINT Flags, + _In_ SIZE_T StartInstIndex, + _In_ SIZE_T NumInsts, + _Out_writes_to_opt_(NumInsts, min(NumInsts, *pTotalInsts)) SIZE_T* pOffsets, + _Out_opt_ SIZE_T* pTotalInsts); + +//---------------------------------------------------------------------------- +// D3DGetInputSignatureBlob: +// ----------------------- +// Retrieve the input signature from a compilation result. +//---------------------------------------------------------------------------- + +HRESULT WINAPI +D3DGetInputSignatureBlob(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData, + _In_ SIZE_T SrcDataSize, + _Out_ ID3DBlob** ppSignatureBlob); + +//---------------------------------------------------------------------------- +// D3DGetOutputSignatureBlob: +// ----------------------- +// Retrieve the output signature from a compilation result. +//---------------------------------------------------------------------------- + +HRESULT WINAPI +D3DGetOutputSignatureBlob(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData, + _In_ SIZE_T SrcDataSize, + _Out_ ID3DBlob** ppSignatureBlob); + +//---------------------------------------------------------------------------- +// D3DGetInputAndOutputSignatureBlob: +// ----------------------- +// Retrieve the input and output signatures from a compilation result. +//---------------------------------------------------------------------------- + +HRESULT WINAPI +D3DGetInputAndOutputSignatureBlob(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData, + _In_ SIZE_T SrcDataSize, + _Out_ ID3DBlob** ppSignatureBlob); + +//---------------------------------------------------------------------------- +// D3DStripShader: +// ----------------------- +// Removes unwanted blobs from a compilation result +//---------------------------------------------------------------------------- + +typedef enum D3DCOMPILER_STRIP_FLAGS +{ + D3DCOMPILER_STRIP_REFLECTION_DATA = 0x00000001, + D3DCOMPILER_STRIP_DEBUG_INFO = 0x00000002, + D3DCOMPILER_STRIP_TEST_BLOBS = 0x00000004, + D3DCOMPILER_STRIP_PRIVATE_DATA = 0x00000008, + D3DCOMPILER_STRIP_ROOT_SIGNATURE = 0x00000010, + D3DCOMPILER_STRIP_FORCE_DWORD = 0x7fffffff, +} D3DCOMPILER_STRIP_FLAGS; + +HRESULT WINAPI +D3DStripShader(_In_reads_bytes_(BytecodeLength) LPCVOID pShaderBytecode, + _In_ SIZE_T BytecodeLength, + _In_ UINT uStripFlags, + _Out_ ID3DBlob** ppStrippedBlob); + +//---------------------------------------------------------------------------- +// D3DGetBlobPart: +// ----------------------- +// Extracts information from a compilation result. +//---------------------------------------------------------------------------- + +typedef enum D3D_BLOB_PART +{ + D3D_BLOB_INPUT_SIGNATURE_BLOB, + D3D_BLOB_OUTPUT_SIGNATURE_BLOB, + D3D_BLOB_INPUT_AND_OUTPUT_SIGNATURE_BLOB, + D3D_BLOB_PATCH_CONSTANT_SIGNATURE_BLOB, + D3D_BLOB_ALL_SIGNATURE_BLOB, + D3D_BLOB_DEBUG_INFO, + D3D_BLOB_LEGACY_SHADER, + D3D_BLOB_XNA_PREPASS_SHADER, + D3D_BLOB_XNA_SHADER, + D3D_BLOB_PDB, + D3D_BLOB_PRIVATE_DATA, + D3D_BLOB_ROOT_SIGNATURE, + D3D_BLOB_DEBUG_NAME, + + // Test parts are only produced by special compiler versions and so + // are usually not present in shaders. + D3D_BLOB_TEST_ALTERNATE_SHADER = 0x8000, + D3D_BLOB_TEST_COMPILE_DETAILS, + D3D_BLOB_TEST_COMPILE_PERF, + D3D_BLOB_TEST_COMPILE_REPORT, +} D3D_BLOB_PART; + +HRESULT WINAPI +D3DGetBlobPart(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData, + _In_ SIZE_T SrcDataSize, + _In_ D3D_BLOB_PART Part, + _In_ UINT Flags, + _Out_ ID3DBlob** ppPart); + +//---------------------------------------------------------------------------- +// D3DSetBlobPart: +// ----------------------- +// Update information in a compilation result. +//---------------------------------------------------------------------------- + +HRESULT WINAPI +D3DSetBlobPart(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData, + _In_ SIZE_T SrcDataSize, + _In_ D3D_BLOB_PART Part, + _In_ UINT Flags, + _In_reads_bytes_(PartSize) LPCVOID pPart, + _In_ SIZE_T PartSize, + _Out_ ID3DBlob** ppNewShader); + +//---------------------------------------------------------------------------- +// D3DCreateBlob: +// ----------------------- +// Create an ID3DBlob instance. +//---------------------------------------------------------------------------- + +HRESULT WINAPI +D3DCreateBlob(_In_ SIZE_T Size, + _Out_ ID3DBlob** ppBlob); + +//---------------------------------------------------------------------------- +// D3DCompressShaders: +// ----------------------- +// Compresses a set of shaders into a more compact form. +//---------------------------------------------------------------------------- + +typedef struct _D3D_SHADER_DATA +{ + LPCVOID pBytecode; + SIZE_T BytecodeLength; +} D3D_SHADER_DATA; + +#define D3D_COMPRESS_SHADER_KEEP_ALL_PARTS 0x00000001 + +HRESULT WINAPI +D3DCompressShaders(_In_ UINT uNumShaders, + _In_reads_(uNumShaders) D3D_SHADER_DATA* pShaderData, + _In_ UINT uFlags, + _Out_ ID3DBlob** ppCompressedData); + +//---------------------------------------------------------------------------- +// D3DDecompressShaders: +// ----------------------- +// Decompresses one or more shaders from a compressed set. +//---------------------------------------------------------------------------- + +HRESULT WINAPI +D3DDecompressShaders(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData, + _In_ SIZE_T SrcDataSize, + _In_ UINT uNumShaders, + _In_ UINT uStartIndex, + _In_reads_opt_(uNumShaders) UINT* pIndices, + _In_ UINT uFlags, + _Out_writes_(uNumShaders) ID3DBlob** ppShaders, + _Out_opt_ UINT* pTotalShaders); + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ + + +/*#pragma region Desktop Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ + +//---------------------------------------------------------------------------- +// D3DDisassemble10Effect: +// ----------------------- +// Takes a D3D10 effect interface and returns a +// buffer containing text assembly. +//---------------------------------------------------------------------------- + +HRESULT WINAPI +D3DDisassemble10Effect(_In_ interface ID3D10Effect *pEffect, + _In_ UINT Flags, + _Out_ ID3DBlob** ppDisassembly); + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ + + +#ifdef __cplusplus +} +#endif //__cplusplus + +#endif // #ifndef __D3DCOMPILER_H__ diff --git a/gfx/include/dxsdk/d3dcsx.h b/gfx/include/dxsdk/d3dcsx.h new file mode 100644 index 0000000000..bab5bbca30 --- /dev/null +++ b/gfx/include/dxsdk/d3dcsx.h @@ -0,0 +1,416 @@ + +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// File: D3DX11GPGPU.h +// Content: D3DX11 General Purpose GPU computing algorithms +// +////////////////////////////////////////////////////////////////////////////// + +/*#include */ + +/*#pragma region Desktop Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ + +#include "d3d11.h" + +#ifndef __D3DX11GPGPU_H__ +#define __D3DX11GPGPU_H__ + +// Current name of the DLL shipped in the same SDK as this header. + + +#define D3DCSX_DLL_W L"d3dcsx_47.dll" +#define D3DCSX_DLL_A "d3dcsx_47.dll" + +#ifdef UNICODE + #define D3DCSX_DLL D3DCSX_DLL_W +#else + #define D3DCSX_DLL D3DCSX_DLL_A +#endif + + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + + + + + + +////////////////////////////////////////////////////////////////////////////// + +typedef enum D3DX11_SCAN_DATA_TYPE +{ + D3DX11_SCAN_DATA_TYPE_FLOAT = 1, + D3DX11_SCAN_DATA_TYPE_INT, + D3DX11_SCAN_DATA_TYPE_UINT, +} D3DX11_SCAN_DATA_TYPE; + +typedef enum D3DX11_SCAN_OPCODE +{ + D3DX11_SCAN_OPCODE_ADD = 1, + D3DX11_SCAN_OPCODE_MIN, + D3DX11_SCAN_OPCODE_MAX, + D3DX11_SCAN_OPCODE_MUL, + D3DX11_SCAN_OPCODE_AND, + D3DX11_SCAN_OPCODE_OR, + D3DX11_SCAN_OPCODE_XOR, +} D3DX11_SCAN_OPCODE; + +typedef enum D3DX11_SCAN_DIRECTION +{ + D3DX11_SCAN_DIRECTION_FORWARD = 1, + D3DX11_SCAN_DIRECTION_BACKWARD, +} D3DX11_SCAN_DIRECTION; + + +////////////////////////////////////////////////////////////////////////////// +// ID3DX11Scan: +////////////////////////////////////////////////////////////////////////////// + +// {5089b68f-e71d-4d38-be8e-f363b95a9405} +DEFINE_GUID(IID_ID3DX11Scan, 0x5089b68f, 0xe71d, 0x4d38, 0xbe, 0x8e, 0xf3, 0x63, 0xb9, 0x5a, 0x94, 0x05); + +#undef INTERFACE +#define INTERFACE ID3DX11Scan + +DECLARE_INTERFACE_(ID3DX11Scan, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // ID3DX11Scan + + STDMETHOD(SetScanDirection)(THIS_ D3DX11_SCAN_DIRECTION Direction) PURE; + + //============================================================================= + // Performs an unsegmented scan of a sequence in-place or out-of-place + // ElementType element type + // OpCode binary operation + // Direction scan direction + // ElementScanSize size of scan, in elements + // pSrc input sequence on the device. pSrc==pDst for in-place scans + // pDst output sequence on the device + //============================================================================= + STDMETHOD(Scan)( THIS_ + D3DX11_SCAN_DATA_TYPE ElementType, + D3DX11_SCAN_OPCODE OpCode, + UINT ElementScanSize, + _In_ ID3D11UnorderedAccessView* pSrc, + _In_ ID3D11UnorderedAccessView* pDst + ) PURE; + + //============================================================================= + // Performs a multiscan of a sequence in-place or out-of-place + // ElementType element type + // OpCode binary operation + // Direction scan direction + // ElementScanSize size of scan, in elements + // ElementScanPitch pitch of the next scan, in elements + // ScanCount number of scans in a multiscan + // pSrc input sequence on the device. pSrc==pDst for in-place scans + // pDst output sequence on the device + //============================================================================= + STDMETHOD(Multiscan)( THIS_ + D3DX11_SCAN_DATA_TYPE ElementType, + D3DX11_SCAN_OPCODE OpCode, + UINT ElementScanSize, + UINT ElementScanPitch, + UINT ScanCount, + _In_ ID3D11UnorderedAccessView* pSrc, + _In_ ID3D11UnorderedAccessView* pDst + ) PURE; +}; + + +//============================================================================= +// Creates a scan context +// pDevice the device context +// MaxElementScanSize maximum single scan size, in elements (FLOAT, UINT, or INT) +// MaxScanCount maximum number of scans in multiscan +// ppScanContext new scan context +//============================================================================= +HRESULT WINAPI D3DX11CreateScan( + _In_ ID3D11DeviceContext* pDeviceContext, + UINT MaxElementScanSize, + UINT MaxScanCount, + _Out_ ID3DX11Scan** ppScan ); + + + +////////////////////////////////////////////////////////////////////////////// +// ID3DX11SegmentedScan: +////////////////////////////////////////////////////////////////////////////// + +// {a915128c-d954-4c79-bfe1-64db923194d6} +DEFINE_GUID(IID_ID3DX11SegmentedScan, 0xa915128c, 0xd954, 0x4c79, 0xbf, 0xe1, 0x64, 0xdb, 0x92, 0x31, 0x94, 0xd6); + +#undef INTERFACE +#define INTERFACE ID3DX11SegmentedScan + +DECLARE_INTERFACE_(ID3DX11SegmentedScan, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // ID3DX11SegmentedScan + + STDMETHOD(SetScanDirection)(THIS_ D3DX11_SCAN_DIRECTION Direction) PURE; + + //============================================================================= + // Performs a segscan of a sequence in-place or out-of-place + // ElementType element type + // OpCode binary operation + // Direction scan direction + // pSrcElementFlags compact array of bits, one per element of pSrc. A set value + // indicates the start of a new segment. + // ElementScanSize size of scan, in elements + // pSrc input sequence on the device. pSrc==pDst for in-place scans + // pDst output sequence on the device + //============================================================================= + STDMETHOD(SegScan)( THIS_ + D3DX11_SCAN_DATA_TYPE ElementType, + D3DX11_SCAN_OPCODE OpCode, + UINT ElementScanSize, + _In_opt_ ID3D11UnorderedAccessView* pSrc, + _In_ ID3D11UnorderedAccessView* pSrcElementFlags, + _In_ ID3D11UnorderedAccessView* pDst + ) PURE; +}; + + +//============================================================================= +// Creates a segmented scan context +// pDevice the device context +// MaxElementScanSize maximum single scan size, in elements (FLOAT, UINT, or INT) +// ppScanContext new scan context +//============================================================================= +HRESULT WINAPI D3DX11CreateSegmentedScan( + _In_ ID3D11DeviceContext* pDeviceContext, + UINT MaxElementScanSize, + _Out_ ID3DX11SegmentedScan** ppScan ); + + + +////////////////////////////////////////////////////////////////////////////// + +#define D3DX11_FFT_MAX_PRECOMPUTE_BUFFERS 4 +#define D3DX11_FFT_MAX_TEMP_BUFFERS 4 +#define D3DX11_FFT_MAX_DIMENSIONS 32 + + + +////////////////////////////////////////////////////////////////////////////// +// ID3DX11FFT: +////////////////////////////////////////////////////////////////////////////// + +// {b3f7a938-4c93-4310-a675-b30d6de50553} +DEFINE_GUID(IID_ID3DX11FFT, 0xb3f7a938, 0x4c93, 0x4310, 0xa6, 0x75, 0xb3, 0x0d, 0x6d, 0xe5, 0x05, 0x53); + +#undef INTERFACE +#define INTERFACE ID3DX11FFT + +DECLARE_INTERFACE_(ID3DX11FFT, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // ID3DX11FFT + + // scale for forward transform (defaults to 1 if set to 0) + STDMETHOD(SetForwardScale)(THIS_ FLOAT ForwardScale) PURE; + STDMETHOD_(FLOAT, GetForwardScale)(THIS) PURE; + + // scale for inverse transform (defaults to 1/N if set to 0, where N is + // the product of the transformed dimension lengths + STDMETHOD(SetInverseScale)(THIS_ FLOAT InverseScale) PURE; + STDMETHOD_(FLOAT, GetInverseScale)(THIS) PURE; + + //------------------------------------------------------------------------------ + // Attaches buffers to the context and performs any required precomputation. + // The buffers must be no smaller than the corresponding buffer sizes returned + // by D3DX11CreateFFT*(). Temp buffers may beshared between multiple contexts, + // though care should be taken to concurrently execute multiple FFTs which share + // temp buffers. + // + // NumTempBuffers number of buffers in ppTempBuffers + // ppTempBuffers temp buffers to attach + // NumPrecomputeBuffers number of buffers in ppPrecomputeBufferSizes + // ppPrecomputeBufferSizes buffers to hold precomputed data + STDMETHOD(AttachBuffersAndPrecompute)( THIS_ + _In_range_(0,D3DX11_FFT_MAX_TEMP_BUFFERS) UINT NumTempBuffers, + _In_reads_(NumTempBuffers) ID3D11UnorderedAccessView* const* ppTempBuffers, + _In_range_(0,D3DX11_FFT_MAX_PRECOMPUTE_BUFFERS) UINT NumPrecomputeBuffers, + _In_reads_(NumPrecomputeBuffers) ID3D11UnorderedAccessView* const* ppPrecomputeBufferSizes ) PURE; + + //------------------------------------------------------------------------------ + // Call after buffers have been attached to the context, pInput and *ppOuput can + // be one of the temp buffers. If *ppOutput == NULL, then the computation will ping-pong + // between temp buffers and the last buffer written to is stored at *ppOutput. + // Otherwise, *ppOutput is used as the output buffer (which may incur an extra copy). + // + // The format of complex data is interleaved components, e.g. (Real0, Imag0), + // (Real1, Imag1) ... etc. Data is stored in row major order + // + // pInputBuffer view onto input buffer + // ppOutpuBuffert pointer to view of output buffer + STDMETHOD(ForwardTransform)( THIS_ + _In_ const ID3D11UnorderedAccessView* pInputBuffer, + _Inout_ ID3D11UnorderedAccessView** ppOutputBuffer ) PURE; + + STDMETHOD(InverseTransform)( THIS_ + _In_ const ID3D11UnorderedAccessView* pInputBuffer, + _Inout_ ID3D11UnorderedAccessView** ppOutputBuffer ) PURE; +}; + + +////////////////////////////////////////////////////////////////////////////// +// ID3DX11FFT Creation Routines +////////////////////////////////////////////////////////////////////////////// + +typedef enum D3DX11_FFT_DATA_TYPE +{ + D3DX11_FFT_DATA_TYPE_REAL, + D3DX11_FFT_DATA_TYPE_COMPLEX, +} D3DX11_FFT_DATA_TYPE; + +typedef enum D3DX11_FFT_DIM_MASK +{ + D3DX11_FFT_DIM_MASK_1D = 0x1, + D3DX11_FFT_DIM_MASK_2D = 0x3, + D3DX11_FFT_DIM_MASK_3D = 0x7, +} D3DX11_FFT_DIM_MASK; + +typedef struct D3DX11_FFT_DESC +{ + UINT NumDimensions; // number of dimensions + UINT ElementLengths[D3DX11_FFT_MAX_DIMENSIONS]; // length of each dimension + UINT DimensionMask; // a bit set for each dimensions to transform + // (see D3DX11_FFT_DIM_MASK for common masks) + D3DX11_FFT_DATA_TYPE Type; // type of the elements in spatial domain +} D3DX11_FFT_DESC; + + +//------------------------------------------------------------------------------ +// NumTempBufferSizes Number of temporary buffers needed +// pTempBufferSizes Minimum sizes (in FLOATs) of temporary buffers +// NumPrecomputeBufferSizes Number of precompute buffers needed +// pPrecomputeBufferSizes minimum sizes (in FLOATs) for precompute buffers +//------------------------------------------------------------------------------ + +typedef struct D3DX11_FFT_BUFFER_INFO +{ + _Field_range_(0,D3DX11_FFT_MAX_TEMP_BUFFERS) UINT NumTempBufferSizes; + UINT TempBufferFloatSizes[D3DX11_FFT_MAX_TEMP_BUFFERS]; + _Field_range_(0,D3DX11_FFT_MAX_PRECOMPUTE_BUFFERS) UINT NumPrecomputeBufferSizes; + UINT PrecomputeBufferFloatSizes[D3DX11_FFT_MAX_PRECOMPUTE_BUFFERS]; +} D3DX11_FFT_BUFFER_INFO; + + +typedef enum D3DX11_FFT_CREATE_FLAG +{ + D3DX11_FFT_CREATE_FLAG_NO_PRECOMPUTE_BUFFERS = 0x01L, // do not precompute values and store into buffers +} D3DX11_FFT_CREATE_FLAG; + + +//------------------------------------------------------------------------------ +// Creates an ID3DX11FFT COM interface object and returns a pointer to it at *ppFFT. +// The descriptor describes the shape of the data as well as the scaling factors +// that should be used for forward and inverse transforms. +// The FFT computation may require temporaries that act as ping-pong buffers +// and for other purposes. aTempSizes is a list of the sizes required for +// temporaries. Likewise, some data may need to be precomputed and the sizes +// of those sizes are returned in aPrecomputedBufferSizes. +// +// To perform a computation, follow these steps: +// 1) Create the FFT context object +// 2) Precompute (and Attach temp working buffers of at least the required size) +// 3) Call Compute() on some input data +// +// Compute() may be called repeatedly with different inputs and transform +// directions. When finished with the FFT work, release the FFT interface() +// +// Device Direct3DDeviceContext to use in +// pDesc Descriptor for FFT transform in +// Count the number of 1D FFTs to perform in +// Flags See D3DX11_FFT_CREATE_FLAG in +// pBufferInfo Pointer to BUFFER_INFO struct, filled by funciton out +// ppFFT Pointer to returned context pointer out +//------------------------------------------------------------------------------ + +HRESULT WINAPI D3DX11CreateFFT( + ID3D11DeviceContext* pDeviceContext, + _In_ const D3DX11_FFT_DESC* pDesc, + UINT Flags, + _Out_ D3DX11_FFT_BUFFER_INFO* pBufferInfo, + _Out_ ID3DX11FFT** ppFFT + ); + +HRESULT WINAPI D3DX11CreateFFT1DReal( + ID3D11DeviceContext* pDeviceContext, + UINT X, + UINT Flags, + _Out_ D3DX11_FFT_BUFFER_INFO* pBufferInfo, + _Out_ ID3DX11FFT** ppFFT + ); +HRESULT WINAPI D3DX11CreateFFT1DComplex( + ID3D11DeviceContext* pDeviceContext, + UINT X, + UINT Flags, + _Out_ D3DX11_FFT_BUFFER_INFO* pBufferInfo, + _Out_ ID3DX11FFT** ppFFT + ); +HRESULT WINAPI D3DX11CreateFFT2DReal( + ID3D11DeviceContext* pDeviceContext, + UINT X, + UINT Y, + UINT Flags, + _Out_ D3DX11_FFT_BUFFER_INFO* pBufferInfo, + _Out_ ID3DX11FFT** ppFFT + ); +HRESULT WINAPI D3DX11CreateFFT2DComplex( + ID3D11DeviceContext* pDeviceContext, + UINT X, + UINT Y, + UINT Flags, + _Out_ D3DX11_FFT_BUFFER_INFO* pBufferInfo, + _Out_ ID3DX11FFT** ppFFT + ); +HRESULT WINAPI D3DX11CreateFFT3DReal( + ID3D11DeviceContext* pDeviceContext, + UINT X, + UINT Y, + UINT Z, + UINT Flags, + _Out_ D3DX11_FFT_BUFFER_INFO* pBufferInfo, + _Out_ ID3DX11FFT** ppFFT + ); +HRESULT WINAPI D3DX11CreateFFT3DComplex( + ID3D11DeviceContext* pDeviceContext, + UINT X, + UINT Y, + UINT Z, + UINT Flags, + _Out_ D3DX11_FFT_BUFFER_INFO* pBufferInfo, + _Out_ ID3DX11FFT** ppFFT + ); + + +#ifdef __cplusplus +} +#endif //__cplusplus + +#endif //__D3DX11GPGPU_H__ + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ + diff --git a/gfx/include/dxsdk/d3dx10.h b/gfx/include/dxsdk/d3dx10.h new file mode 100644 index 0000000000..5cdcd51d96 --- /dev/null +++ b/gfx/include/dxsdk/d3dx10.h @@ -0,0 +1,72 @@ +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) Microsoft Corporation. All Rights Reserved. +// +// File: d3dx10.h +// Content: D3DX10 utility library +// +////////////////////////////////////////////////////////////////////////////// + +#ifdef __D3DX10_INTERNAL__ +#error Incorrect D3DX10 header used +#endif + +#ifndef __D3DX10_H__ +#define __D3DX10_H__ + + +// Defines +#include +#include + +#define D3DX10_DEFAULT ((UINT) -1) +#define D3DX10_FROM_FILE ((UINT) -3) +#define DXGI_FORMAT_FROM_FILE ((DXGI_FORMAT) -3) + +#ifndef D3DX10INLINE +#ifdef _MSC_VER + #if (_MSC_VER >= 1200) + #define D3DX10INLINE __forceinline + #else + #define D3DX10INLINE __inline + #endif +#else + #ifdef __cplusplus + #define D3DX10INLINE inline + #else + #define D3DX10INLINE + #endif +#endif +#endif + + + +// Includes +#include "d3d10.h" +#include "d3dx10.h" +#include "d3dx10math.h" +#include "d3dx10core.h" +#include "d3dx10tex.h" +#include "d3dx10mesh.h" +#include "d3dx10async.h" + + +// Errors +#define _FACDD 0x876 +#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) + +enum _D3DX10_ERR { + D3DX10_ERR_CANNOT_MODIFY_INDEX_BUFFER = MAKE_DDHRESULT(2900), + D3DX10_ERR_INVALID_MESH = MAKE_DDHRESULT(2901), + D3DX10_ERR_CANNOT_ATTR_SORT = MAKE_DDHRESULT(2902), + D3DX10_ERR_SKINNING_NOT_SUPPORTED = MAKE_DDHRESULT(2903), + D3DX10_ERR_TOO_MANY_INFLUENCES = MAKE_DDHRESULT(2904), + D3DX10_ERR_INVALID_DATA = MAKE_DDHRESULT(2905), + D3DX10_ERR_LOADED_MESH_HAS_NO_DATA = MAKE_DDHRESULT(2906), + D3DX10_ERR_DUPLICATE_NAMED_FRAGMENT = MAKE_DDHRESULT(2907), + D3DX10_ERR_CANNOT_REMOVE_LAST_ITEM = MAKE_DDHRESULT(2908), +}; + + +#endif //__D3DX10_H__ + diff --git a/gfx/include/dxsdk/d3dx10async.h b/gfx/include/dxsdk/d3dx10async.h new file mode 100644 index 0000000000..d1b1fc53b5 --- /dev/null +++ b/gfx/include/dxsdk/d3dx10async.h @@ -0,0 +1,290 @@ + +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// File: D3DX10Async.h +// Content: D3DX10 Asynchronous Effect / Shader loaders / compilers +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef __D3DX10ASYNC_H__ +#define __D3DX10ASYNC_H__ + +#include "d3dx10.h" + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + + +//---------------------------------------------------------------------------- +// D3DX10Compile: +// ------------------ +// Compiles an effect or shader. +// +// Parameters: +// pSrcFile +// Source file name. +// hSrcModule +// Module handle. if NULL, current module will be used. +// pSrcResource +// Resource name in module. +// pSrcData +// Pointer to source code. +// SrcDataLen +// Size of source code, in bytes. +// pDefines +// Optional NULL-terminated array of preprocessor macro definitions. +// pInclude +// Optional interface pointer to use for handling #include directives. +// If this parameter is NULL, #includes will be honored when compiling +// from file, and will error when compiling from resource or memory. +// pFunctionName +// Name of the entrypoint function where execution should begin. +// pProfile +// Instruction set to be used when generating code. Currently supported +// profiles are "vs_1_1", "vs_2_0", "vs_2_a", "vs_2_sw", "vs_3_0", +// "vs_3_sw", "vs_4_0", "vs_4_1", +// "ps_2_0", "ps_2_a", "ps_2_b", "ps_2_sw", "ps_3_0", +// "ps_3_sw", "ps_4_0", "ps_4_1", +// "gs_4_0", "gs_4_1", +// "tx_1_0", +// "fx_4_0", "fx_4_1" +// Note that this entrypoint does not compile fx_2_0 targets, for that +// you need to use the D3DX9 function. +// Flags1 +// See D3D10_SHADER_xxx flags. +// Flags2 +// See D3D10_EFFECT_xxx flags. +// ppShader +// Returns a buffer containing the created shader. This buffer contains +// the compiled shader code, as well as any embedded debug and symbol +// table info. (See D3D10GetShaderConstantTable) +// ppErrorMsgs +// Returns a buffer containing a listing of errors and warnings that were +// encountered during the compile. If you are running in a debugger, +// these are the same messages you will see in your debug output. +// pHResult +// Pointer to a memory location to receive the return value upon completion. +// Maybe NULL if not needed. +// If pPump != NULL, pHResult must be a valid memory location until the +// the asynchronous execution completes. +//---------------------------------------------------------------------------- + +HRESULT WINAPI D3DX10CompileFromFileA(LPCSTR pSrcFile,CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, + LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, ID3DX10ThreadPump* pPump, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); + +HRESULT WINAPI D3DX10CompileFromFileW(LPCWSTR pSrcFile, CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, + LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, ID3DX10ThreadPump* pPump, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); + +#ifdef UNICODE +#define D3DX10CompileFromFile D3DX10CompileFromFileW +#else +#define D3DX10CompileFromFile D3DX10CompileFromFileA +#endif + +HRESULT WINAPI D3DX10CompileFromResourceA(HMODULE hSrcModule, LPCSTR pSrcResource, LPCSTR pSrcFileName, CONST D3D10_SHADER_MACRO* pDefines, + LPD3D10INCLUDE pInclude, LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, ID3DX10ThreadPump* pPump, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); + +HRESULT WINAPI D3DX10CompileFromResourceW(HMODULE hSrcModule, LPCWSTR pSrcResource, LPCWSTR pSrcFileName, CONST D3D10_SHADER_MACRO* pDefines, + LPD3D10INCLUDE pInclude, LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, ID3DX10ThreadPump* pPump, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); + +#ifdef UNICODE +#define D3DX10CompileFromResource D3DX10CompileFromResourceW +#else +#define D3DX10CompileFromResource D3DX10CompileFromResourceA +#endif + +HRESULT WINAPI D3DX10CompileFromMemory(LPCSTR pSrcData, SIZE_T SrcDataLen, LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, + LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, ID3DX10ThreadPump* pPump, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); + +//---------------------------------------------------------------------------- +// D3DX10CreateEffectFromXXXX: +// -------------------------- +// Creates an effect from a binary effect or file +// +// Parameters: +// +// [in] +// +// +// pFileName +// Name of the ASCII (uncompiled) or binary (compiled) Effect file to load +// +// hModule +// Handle to the module containing the resource to compile from +// pResourceName +// Name of the resource within hModule to compile from +// +// pData +// Blob of effect data, either ASCII (uncompiled) or binary (compiled) +// DataLength +// Length of the data blob +// +// pDefines +// Optional NULL-terminated array of preprocessor macro definitions. +// pInclude +// Optional interface pointer to use for handling #include directives. +// If this parameter is NULL, #includes will be honored when compiling +// from file, and will error when compiling from resource or memory. +// pProfile +// Profile to use when compiling the effect. +// HLSLFlags +// Compilation flags pertaining to shaders and data types, honored by +// the HLSL compiler +// FXFlags +// Compilation flags pertaining to Effect compilation, honored +// by the Effect compiler +// pDevice +// Pointer to the D3D10 device on which to create Effect resources +// pEffectPool +// Pointer to an Effect pool to share variables with or NULL +// +// [out] +// +// ppEffect +// Address of the newly created Effect interface +// ppEffectPool +// Address of the newly created Effect pool interface +// ppErrors +// If non-NULL, address of a buffer with error messages that occurred +// during parsing or compilation +// pHResult +// Pointer to a memory location to receive the return value upon completion. +// Maybe NULL if not needed. +// If pPump != NULL, pHResult must be a valid memory location until the +// the asynchronous execution completes. +//---------------------------------------------------------------------------- + + +HRESULT WINAPI D3DX10CreateEffectFromFileA(LPCSTR pFileName, CONST D3D10_SHADER_MACRO *pDefines, + ID3D10Include *pInclude, LPCSTR pProfile, UINT HLSLFlags, UINT FXFlags, ID3D10Device *pDevice, + ID3D10EffectPool *pEffectPool, ID3DX10ThreadPump* pPump, ID3D10Effect **ppEffect, ID3D10Blob **ppErrors, HRESULT* pHResult); + +HRESULT WINAPI D3DX10CreateEffectFromFileW(LPCWSTR pFileName, CONST D3D10_SHADER_MACRO *pDefines, + ID3D10Include *pInclude, LPCSTR pProfile, UINT HLSLFlags, UINT FXFlags, ID3D10Device *pDevice, + ID3D10EffectPool *pEffectPool, ID3DX10ThreadPump* pPump, ID3D10Effect **ppEffect, ID3D10Blob **ppErrors, HRESULT* pHResult); + +HRESULT WINAPI D3DX10CreateEffectFromMemory(LPCVOID pData, SIZE_T DataLength, LPCSTR pSrcFileName, CONST D3D10_SHADER_MACRO *pDefines, + ID3D10Include *pInclude, LPCSTR pProfile, UINT HLSLFlags, UINT FXFlags, ID3D10Device *pDevice, + ID3D10EffectPool *pEffectPool, ID3DX10ThreadPump* pPump, ID3D10Effect **ppEffect, ID3D10Blob **ppErrors, HRESULT* pHResult); + +HRESULT WINAPI D3DX10CreateEffectFromResourceA(HMODULE hModule, LPCSTR pResourceName, LPCSTR pSrcFileName, CONST D3D10_SHADER_MACRO *pDefines, + ID3D10Include *pInclude, LPCSTR pProfile, UINT HLSLFlags, UINT FXFlags, ID3D10Device *pDevice, + ID3D10EffectPool *pEffectPool, ID3DX10ThreadPump* pPump, ID3D10Effect **ppEffect, ID3D10Blob **ppErrors, HRESULT* pHResult); + +HRESULT WINAPI D3DX10CreateEffectFromResourceW(HMODULE hModule, LPCWSTR pResourceName, LPCWSTR pSrcFileName, CONST D3D10_SHADER_MACRO *pDefines, + ID3D10Include *pInclude, LPCSTR pProfile, UINT HLSLFlags, UINT FXFlags, ID3D10Device *pDevice, + ID3D10EffectPool *pEffectPool, ID3DX10ThreadPump* pPump, ID3D10Effect **ppEffect, ID3D10Blob **ppErrors, HRESULT* pHResult); + + +#ifdef UNICODE +#define D3DX10CreateEffectFromFile D3DX10CreateEffectFromFileW +#define D3DX10CreateEffectFromResource D3DX10CreateEffectFromResourceW +#else +#define D3DX10CreateEffectFromFile D3DX10CreateEffectFromFileA +#define D3DX10CreateEffectFromResource D3DX10CreateEffectFromResourceA +#endif + +HRESULT WINAPI D3DX10CreateEffectPoolFromFileA(LPCSTR pFileName, CONST D3D10_SHADER_MACRO *pDefines, + ID3D10Include *pInclude, LPCSTR pProfile, UINT HLSLFlags, UINT FXFlags, ID3D10Device *pDevice, ID3DX10ThreadPump* pPump, + ID3D10EffectPool **ppEffectPool, ID3D10Blob **ppErrors, HRESULT* pHResult); + +HRESULT WINAPI D3DX10CreateEffectPoolFromFileW(LPCWSTR pFileName, CONST D3D10_SHADER_MACRO *pDefines, + ID3D10Include *pInclude, LPCSTR pProfile, UINT HLSLFlags, UINT FXFlags, ID3D10Device *pDevice, ID3DX10ThreadPump* pPump, + ID3D10EffectPool **ppEffectPool, ID3D10Blob **ppErrors, HRESULT* pHResult); + +HRESULT WINAPI D3DX10CreateEffectPoolFromMemory(LPCVOID pData, SIZE_T DataLength, LPCSTR pSrcFileName, CONST D3D10_SHADER_MACRO *pDefines, + ID3D10Include *pInclude, LPCSTR pProfile, UINT HLSLFlags, UINT FXFlags, ID3D10Device *pDevice, + ID3DX10ThreadPump* pPump, ID3D10EffectPool **ppEffectPool, ID3D10Blob **ppErrors, HRESULT* pHResult); + +HRESULT WINAPI D3DX10CreateEffectPoolFromResourceA(HMODULE hModule, LPCSTR pResourceName, LPCSTR pSrcFileName, CONST D3D10_SHADER_MACRO *pDefines, + ID3D10Include *pInclude, LPCSTR pProfile, UINT HLSLFlags, UINT FXFlags, ID3D10Device *pDevice, + ID3DX10ThreadPump* pPump, ID3D10EffectPool **ppEffectPool, ID3D10Blob **ppErrors, HRESULT* pHResult); + +HRESULT WINAPI D3DX10CreateEffectPoolFromResourceW(HMODULE hModule, LPCWSTR pResourceName, LPCWSTR pSrcFileName, CONST D3D10_SHADER_MACRO *pDefines, + ID3D10Include *pInclude, LPCSTR pProfile, UINT HLSLFlags, UINT FXFlags, ID3D10Device *pDevice, + ID3DX10ThreadPump* pPump, ID3D10EffectPool **ppEffectPool, ID3D10Blob **ppErrors, HRESULT* pHResult); + +#ifdef UNICODE +#define D3DX10CreateEffectPoolFromFile D3DX10CreateEffectPoolFromFileW +#define D3DX10CreateEffectPoolFromResource D3DX10CreateEffectPoolFromResourceW +#else +#define D3DX10CreateEffectPoolFromFile D3DX10CreateEffectPoolFromFileA +#define D3DX10CreateEffectPoolFromResource D3DX10CreateEffectPoolFromResourceA +#endif + +HRESULT WINAPI D3DX10PreprocessShaderFromFileA(LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, + LPD3D10INCLUDE pInclude, ID3DX10ThreadPump *pPump, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); + +HRESULT WINAPI D3DX10PreprocessShaderFromFileW(LPCWSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, + LPD3D10INCLUDE pInclude, ID3DX10ThreadPump *pPump, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); + +HRESULT WINAPI D3DX10PreprocessShaderFromMemory(LPCSTR pSrcData, SIZE_T SrcDataSize, LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, + LPD3D10INCLUDE pInclude, ID3DX10ThreadPump *pPump, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); + +HRESULT WINAPI D3DX10PreprocessShaderFromResourceA(HMODULE hModule, LPCSTR pResourceName, LPCSTR pSrcFileName, CONST D3D10_SHADER_MACRO* pDefines, + LPD3D10INCLUDE pInclude, ID3DX10ThreadPump *pPump, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); + +HRESULT WINAPI D3DX10PreprocessShaderFromResourceW(HMODULE hModule, LPCWSTR pResourceName, LPCWSTR pSrcFileName, CONST D3D10_SHADER_MACRO* pDefines, + LPD3D10INCLUDE pInclude, ID3DX10ThreadPump *pPump, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); + +#ifdef UNICODE +#define D3DX10PreprocessShaderFromFile D3DX10PreprocessShaderFromFileW +#define D3DX10PreprocessShaderFromResource D3DX10PreprocessShaderFromResourceW +#else +#define D3DX10PreprocessShaderFromFile D3DX10PreprocessShaderFromFileA +#define D3DX10PreprocessShaderFromResource D3DX10PreprocessShaderFromResourceA +#endif + +//---------------------------------------------------------------------------- +// Async processors +//---------------------------------------------------------------------------- + +HRESULT WINAPI D3DX10CreateAsyncCompilerProcessor(LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, + LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, + ID3D10Blob **ppCompiledShader, ID3D10Blob **ppErrorBuffer, ID3DX10DataProcessor **ppProcessor); + +HRESULT WINAPI D3DX10CreateAsyncEffectCreateProcessor(LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, + LPCSTR pProfile, UINT Flags, UINT FXFlags, ID3D10Device *pDevice, + ID3D10EffectPool *pPool, ID3D10Blob **ppErrorBuffer, ID3DX10DataProcessor **ppProcessor); + +HRESULT WINAPI D3DX10CreateAsyncEffectPoolCreateProcessor(LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, + LPCSTR pProfile, UINT Flags, UINT FXFlags, ID3D10Device *pDevice, + ID3D10Blob **ppErrorBuffer, ID3DX10DataProcessor **ppProcessor); + +HRESULT WINAPI D3DX10CreateAsyncShaderPreprocessProcessor(LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, + ID3D10Blob** ppShaderText, ID3D10Blob **ppErrorBuffer, ID3DX10DataProcessor **ppProcessor); + + + +//---------------------------------------------------------------------------- +// D3DX10 Asynchronous texture I/O (advanced mode) +//---------------------------------------------------------------------------- + +HRESULT WINAPI D3DX10CreateAsyncFileLoaderW(LPCWSTR pFileName, ID3DX10DataLoader **ppDataLoader); +HRESULT WINAPI D3DX10CreateAsyncFileLoaderA(LPCSTR pFileName, ID3DX10DataLoader **ppDataLoader); +HRESULT WINAPI D3DX10CreateAsyncMemoryLoader(LPCVOID pData, SIZE_T cbData, ID3DX10DataLoader **ppDataLoader); +HRESULT WINAPI D3DX10CreateAsyncResourceLoaderW(HMODULE hSrcModule, LPCWSTR pSrcResource, ID3DX10DataLoader **ppDataLoader); +HRESULT WINAPI D3DX10CreateAsyncResourceLoaderA(HMODULE hSrcModule, LPCSTR pSrcResource, ID3DX10DataLoader **ppDataLoader); + +#ifdef UNICODE +#define D3DX10CreateAsyncFileLoader D3DX10CreateAsyncFileLoaderW +#define D3DX10CreateAsyncResourceLoader D3DX10CreateAsyncResourceLoaderW +#else +#define D3DX10CreateAsyncFileLoader D3DX10CreateAsyncFileLoaderA +#define D3DX10CreateAsyncResourceLoader D3DX10CreateAsyncResourceLoaderA +#endif + +HRESULT WINAPI D3DX10CreateAsyncTextureProcessor(ID3D10Device *pDevice, D3DX10_IMAGE_LOAD_INFO *pLoadInfo, ID3DX10DataProcessor **ppDataProcessor); +HRESULT WINAPI D3DX10CreateAsyncTextureInfoProcessor(D3DX10_IMAGE_INFO *pImageInfo, ID3DX10DataProcessor **ppDataProcessor); +HRESULT WINAPI D3DX10CreateAsyncShaderResourceViewProcessor(ID3D10Device *pDevice, D3DX10_IMAGE_LOAD_INFO *pLoadInfo, ID3DX10DataProcessor **ppDataProcessor); + +#ifdef __cplusplus +} +#endif //__cplusplus + +#endif //__D3DX10ASYNC_H__ + + diff --git a/gfx/include/dxsdk/d3dx10core.h b/gfx/include/dxsdk/d3dx10core.h new file mode 100644 index 0000000000..290a00421e --- /dev/null +++ b/gfx/include/dxsdk/d3dx10core.h @@ -0,0 +1,444 @@ +/////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) Microsoft Corporation. All Rights Reserved. +// +// File: d3dx10core.h +// Content: D3DX10 core types and functions +// +/////////////////////////////////////////////////////////////////////////// + +#include "d3dx10.h" + +#ifndef __D3DX10CORE_H__ +#define __D3DX10CORE_H__ + +// Current name of the DLL shipped in the same SDK as this header. + + +#define D3DX10_DLL_W L"d3dx10_43.dll" +#define D3DX10_DLL_A "d3dx10_43.dll" + +#ifdef UNICODE + #define D3DX10_DLL D3DX10_DLL_W +#else + #define D3DX10_DLL D3DX10_DLL_A +#endif + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + +/////////////////////////////////////////////////////////////////////////// +// D3DX10_SDK_VERSION: +// ----------------- +// This identifier is passed to D3DX10CheckVersion in order to ensure that an +// application was built against the correct header files and lib files. +// This number is incremented whenever a header (or other) change would +// require applications to be rebuilt. If the version doesn't match, +// D3DX10CreateVersion will return FALSE. (The number itself has no meaning.) +/////////////////////////////////////////////////////////////////////////// + + +#define D3DX10_SDK_VERSION 43 + + +/////////////////////////////////////////////////////////////////////////// +// D3DX10CreateDevice +// D3DX10CreateDeviceAndSwapChain +// D3DX10GetFeatureLevel1 +/////////////////////////////////////////////////////////////////////////// +HRESULT WINAPI D3DX10CreateDevice(IDXGIAdapter *pAdapter, + D3D10_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + ID3D10Device **ppDevice); + +HRESULT WINAPI D3DX10CreateDeviceAndSwapChain(IDXGIAdapter *pAdapter, + D3D10_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + DXGI_SWAP_CHAIN_DESC *pSwapChainDesc, + IDXGISwapChain **ppSwapChain, + ID3D10Device **ppDevice); + +typedef interface ID3D10Device1 ID3D10Device1; +HRESULT WINAPI D3DX10GetFeatureLevel1(ID3D10Device *pDevice, ID3D10Device1 **ppDevice1); + + +#ifdef D3D_DIAG_DLL +BOOL WINAPI D3DX10DebugMute(BOOL Mute); +#endif +HRESULT WINAPI D3DX10CheckVersion(UINT D3DSdkVersion, UINT D3DX10SdkVersion); + +#ifdef __cplusplus +} +#endif //__cplusplus + + +////////////////////////////////////////////////////////////////////////////// +// D3DX10_SPRITE flags: +// ----------------- +// D3DX10_SPRITE_SAVE_STATE +// Specifies device state should be saved and restored in Begin/End. +// D3DX10SPRITE_SORT_TEXTURE +// Sprites are sorted by texture prior to drawing. This is recommended when +// drawing non-overlapping sprites of uniform depth. For example, drawing +// screen-aligned text with ID3DX10Font. +// D3DX10SPRITE_SORT_DEPTH_FRONT_TO_BACK +// Sprites are sorted by depth front-to-back prior to drawing. This is +// recommended when drawing opaque sprites of varying depths. +// D3DX10SPRITE_SORT_DEPTH_BACK_TO_FRONT +// Sprites are sorted by depth back-to-front prior to drawing. This is +// recommended when drawing transparent sprites of varying depths. +// D3DX10SPRITE_ADDREF_TEXTURES +// AddRef/Release all textures passed in to DrawSpritesBuffered +////////////////////////////////////////////////////////////////////////////// + +typedef enum _D3DX10_SPRITE_FLAG +{ + D3DX10_SPRITE_SORT_TEXTURE = 0x01, + D3DX10_SPRITE_SORT_DEPTH_BACK_TO_FRONT = 0x02, + D3DX10_SPRITE_SORT_DEPTH_FRONT_TO_BACK = 0x04, + D3DX10_SPRITE_SAVE_STATE = 0x08, + D3DX10_SPRITE_ADDREF_TEXTURES = 0x10, +} D3DX10_SPRITE_FLAG; + +typedef struct _D3DX10_SPRITE +{ + D3DXMATRIX matWorld; + + D3DXVECTOR2 TexCoord; + D3DXVECTOR2 TexSize; + + D3DXCOLOR ColorModulate; + + ID3D10ShaderResourceView *pTexture; + UINT TextureIndex; +} D3DX10_SPRITE; + + +////////////////////////////////////////////////////////////////////////////// +// ID3DX10Sprite: +// ------------ +// This object intends to provide an easy way to drawing sprites using D3D. +// +// Begin - +// Prepares device for drawing sprites. +// +// Draw - +// Draws a sprite +// +// Flush - +// Forces all batched sprites to submitted to the device. +// +// End - +// Restores device state to how it was when Begin was called. +// +////////////////////////////////////////////////////////////////////////////// + +typedef interface ID3DX10Sprite ID3DX10Sprite; +typedef interface ID3DX10Sprite *LPD3DX10SPRITE; + + +// {BA0B762D-8D28-43ec-B9DC-2F84443B0614} +DEFINE_GUID(IID_ID3DX10Sprite, +0xba0b762d, 0x8d28, 0x43ec, 0xb9, 0xdc, 0x2f, 0x84, 0x44, 0x3b, 0x6, 0x14); + + +#undef INTERFACE +#define INTERFACE ID3DX10Sprite + +DECLARE_INTERFACE_(ID3DX10Sprite, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // ID3DX10Sprite + STDMETHOD(Begin)(THIS_ UINT flags) PURE; + + STDMETHOD(DrawSpritesBuffered)(THIS_ D3DX10_SPRITE *pSprites, UINT cSprites) PURE; + STDMETHOD(Flush)(THIS) PURE; + + STDMETHOD(DrawSpritesImmediate)(THIS_ D3DX10_SPRITE *pSprites, UINT cSprites, UINT cbSprite, UINT flags) PURE; + STDMETHOD(End)(THIS) PURE; + + STDMETHOD(GetViewTransform)(THIS_ D3DXMATRIX *pViewTransform) PURE; + STDMETHOD(SetViewTransform)(THIS_ D3DXMATRIX *pViewTransform) PURE; + STDMETHOD(GetProjectionTransform)(THIS_ D3DXMATRIX *pProjectionTransform) PURE; + STDMETHOD(SetProjectionTransform)(THIS_ D3DXMATRIX *pProjectionTransform) PURE; + + STDMETHOD(GetDevice)(THIS_ ID3D10Device** ppDevice) PURE; +}; + + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + +HRESULT WINAPI + D3DX10CreateSprite( + ID3D10Device* pDevice, + UINT cDeviceBufferSize, + LPD3DX10SPRITE* ppSprite); + +#ifdef __cplusplus +} +#endif //__cplusplus + + +////////////////////////////////////////////////////////////////////////////// +// ID3DX10ThreadPump: +////////////////////////////////////////////////////////////////////////////// + +#undef INTERFACE +#define INTERFACE ID3DX10DataLoader + +DECLARE_INTERFACE(ID3DX10DataLoader) +{ + STDMETHOD(Load)(THIS) PURE; + STDMETHOD(Decompress)(THIS_ void **ppData, SIZE_T *pcBytes) PURE; + STDMETHOD(Destroy)(THIS) PURE; +}; + +#undef INTERFACE +#define INTERFACE ID3DX10DataProcessor + +DECLARE_INTERFACE(ID3DX10DataProcessor) +{ + STDMETHOD(Process)(THIS_ void *pData, SIZE_T cBytes) PURE; + STDMETHOD(CreateDeviceObject)(THIS_ void **ppDataObject) PURE; + STDMETHOD(Destroy)(THIS) PURE; +}; + +// {C93FECFA-6967-478a-ABBC-402D90621FCB} +DEFINE_GUID(IID_ID3DX10ThreadPump, +0xc93fecfa, 0x6967, 0x478a, 0xab, 0xbc, 0x40, 0x2d, 0x90, 0x62, 0x1f, 0xcb); + +#undef INTERFACE +#define INTERFACE ID3DX10ThreadPump + +DECLARE_INTERFACE_(ID3DX10ThreadPump, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // ID3DX10ThreadPump + STDMETHOD(AddWorkItem)(THIS_ ID3DX10DataLoader *pDataLoader, ID3DX10DataProcessor *pDataProcessor, HRESULT *pHResult, void **ppDeviceObject) PURE; + STDMETHOD_(UINT, GetWorkItemCount)(THIS) PURE; + + STDMETHOD(WaitForAllItems)(THIS) PURE; + STDMETHOD(ProcessDeviceWorkItems)(THIS_ UINT iWorkItemCount); + + STDMETHOD(PurgeAllItems)(THIS) PURE; + STDMETHOD(GetQueueStatus)(THIS_ UINT *pIoQueue, UINT *pProcessQueue, UINT *pDeviceQueue) PURE; + +}; + +HRESULT WINAPI D3DX10CreateThreadPump(UINT cIoThreads, UINT cProcThreads, ID3DX10ThreadPump **ppThreadPump); + + +////////////////////////////////////////////////////////////////////////////// +// ID3DX10Font: +// ---------- +// Font objects contain the textures and resources needed to render a specific +// font on a specific device. +// +// GetGlyphData - +// Returns glyph cache data, for a given glyph. +// +// PreloadCharacters/PreloadGlyphs/PreloadText - +// Preloads glyphs into the glyph cache textures. +// +// DrawText - +// Draws formatted text on a D3D device. Some parameters are +// surprisingly similar to those of GDI's DrawText function. See GDI +// documentation for a detailed description of these parameters. +// If pSprite is NULL, an internal sprite object will be used. +// +////////////////////////////////////////////////////////////////////////////// + +typedef struct _D3DX10_FONT_DESCA +{ + INT Height; + UINT Width; + UINT Weight; + UINT MipLevels; + BOOL Italic; + BYTE CharSet; + BYTE OutputPrecision; + BYTE Quality; + BYTE PitchAndFamily; + CHAR FaceName[LF_FACESIZE]; + +} D3DX10_FONT_DESCA, *LPD3DX10_FONT_DESCA; + +typedef struct _D3DX10_FONT_DESCW +{ + INT Height; + UINT Width; + UINT Weight; + UINT MipLevels; + BOOL Italic; + BYTE CharSet; + BYTE OutputPrecision; + BYTE Quality; + BYTE PitchAndFamily; + WCHAR FaceName[LF_FACESIZE]; + +} D3DX10_FONT_DESCW, *LPD3DX10_FONT_DESCW; + +#ifdef UNICODE +typedef D3DX10_FONT_DESCW D3DX10_FONT_DESC; +typedef LPD3DX10_FONT_DESCW LPD3DX10_FONT_DESC; +#else +typedef D3DX10_FONT_DESCA D3DX10_FONT_DESC; +typedef LPD3DX10_FONT_DESCA LPD3DX10_FONT_DESC; +#endif + + +typedef interface ID3DX10Font ID3DX10Font; +typedef interface ID3DX10Font *LPD3DX10FONT; + + +// {D79DBB70-5F21-4d36-BBC2-FF525C213CDC} +DEFINE_GUID(IID_ID3DX10Font, +0xd79dbb70, 0x5f21, 0x4d36, 0xbb, 0xc2, 0xff, 0x52, 0x5c, 0x21, 0x3c, 0xdc); + + +#undef INTERFACE +#define INTERFACE ID3DX10Font + +DECLARE_INTERFACE_(ID3DX10Font, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // ID3DX10Font + STDMETHOD(GetDevice)(THIS_ ID3D10Device** ppDevice) PURE; + STDMETHOD(GetDescA)(THIS_ D3DX10_FONT_DESCA *pDesc) PURE; + STDMETHOD(GetDescW)(THIS_ D3DX10_FONT_DESCW *pDesc) PURE; + STDMETHOD_(BOOL, GetTextMetricsA)(THIS_ TEXTMETRICA *pTextMetrics) PURE; + STDMETHOD_(BOOL, GetTextMetricsW)(THIS_ TEXTMETRICW *pTextMetrics) PURE; + + STDMETHOD_(HDC, GetDC)(THIS) PURE; + STDMETHOD(GetGlyphData)(THIS_ UINT Glyph, ID3D10ShaderResourceView** ppTexture, RECT *pBlackBox, POINT *pCellInc) PURE; + + STDMETHOD(PreloadCharacters)(THIS_ UINT First, UINT Last) PURE; + STDMETHOD(PreloadGlyphs)(THIS_ UINT First, UINT Last) PURE; + STDMETHOD(PreloadTextA)(THIS_ LPCSTR pString, INT Count) PURE; + STDMETHOD(PreloadTextW)(THIS_ LPCWSTR pString, INT Count) PURE; + + STDMETHOD_(INT, DrawTextA)(THIS_ LPD3DX10SPRITE pSprite, LPCSTR pString, INT Count, LPRECT pRect, UINT Format, D3DXCOLOR Color) PURE; + STDMETHOD_(INT, DrawTextW)(THIS_ LPD3DX10SPRITE pSprite, LPCWSTR pString, INT Count, LPRECT pRect, UINT Format, D3DXCOLOR Color) PURE; + +#ifdef __cplusplus +#ifdef UNICODE + HRESULT WINAPI_INLINE GetDesc(D3DX10_FONT_DESCW *pDesc) { return GetDescW(pDesc); } + HRESULT WINAPI_INLINE PreloadText(LPCWSTR pString, INT Count) { return PreloadTextW(pString, Count); } +#else + HRESULT WINAPI_INLINE GetDesc(D3DX10_FONT_DESCA *pDesc) { return GetDescA(pDesc); } + HRESULT WINAPI_INLINE PreloadText(LPCSTR pString, INT Count) { return PreloadTextA(pString, Count); } +#endif +#endif //__cplusplus +}; + +#ifndef GetTextMetrics +#ifdef UNICODE +#define GetTextMetrics GetTextMetricsW +#else +#define GetTextMetrics GetTextMetricsA +#endif +#endif + +#ifndef DrawText +#ifdef UNICODE +#define DrawText DrawTextW +#else +#define DrawText DrawTextA +#endif +#endif + + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + + +HRESULT WINAPI + D3DX10CreateFontA( + ID3D10Device* pDevice, + INT Height, + UINT Width, + UINT Weight, + UINT MipLevels, + BOOL Italic, + UINT CharSet, + UINT OutputPrecision, + UINT Quality, + UINT PitchAndFamily, + LPCSTR pFaceName, + LPD3DX10FONT* ppFont); + +HRESULT WINAPI + D3DX10CreateFontW( + ID3D10Device* pDevice, + INT Height, + UINT Width, + UINT Weight, + UINT MipLevels, + BOOL Italic, + UINT CharSet, + UINT OutputPrecision, + UINT Quality, + UINT PitchAndFamily, + LPCWSTR pFaceName, + LPD3DX10FONT* ppFont); + +#ifdef UNICODE +#define D3DX10CreateFont D3DX10CreateFontW +#else +#define D3DX10CreateFont D3DX10CreateFontA +#endif + + +HRESULT WINAPI + D3DX10CreateFontIndirectA( + ID3D10Device* pDevice, + CONST D3DX10_FONT_DESCA* pDesc, + LPD3DX10FONT* ppFont); + +HRESULT WINAPI + D3DX10CreateFontIndirectW( + ID3D10Device* pDevice, + CONST D3DX10_FONT_DESCW* pDesc, + LPD3DX10FONT* ppFont); + +#ifdef UNICODE +#define D3DX10CreateFontIndirect D3DX10CreateFontIndirectW +#else +#define D3DX10CreateFontIndirect D3DX10CreateFontIndirectA +#endif + +HRESULT WINAPI D3DX10UnsetAllDeviceObjects(ID3D10Device *pDevice); + +#ifdef __cplusplus +} +#endif //__cplusplus + +/////////////////////////////////////////////////////////////////////////// + +#define _FACD3D 0x876 +#define MAKE_D3DHRESULT( code ) MAKE_HRESULT( 1, _FACD3D, code ) +#define MAKE_D3DSTATUS( code ) MAKE_HRESULT( 0, _FACD3D, code ) + +#define D3DERR_INVALIDCALL MAKE_D3DHRESULT(2156) +#define D3DERR_WASSTILLDRAWING MAKE_D3DHRESULT(540) + +#endif //__D3DX10CORE_H__ + diff --git a/gfx/include/dxsdk/d3dx10math.h b/gfx/include/dxsdk/d3dx10math.h new file mode 100644 index 0000000000..84e0141006 --- /dev/null +++ b/gfx/include/dxsdk/d3dx10math.h @@ -0,0 +1,1866 @@ +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) Microsoft Corporation. All Rights Reserved. +// +// File: D3DX10math.h +// Content: D3DX10 math types and functions +// +////////////////////////////////////////////////////////////////////////////// + +#include "d3dx10.h" + +// D3DX10 and D3DX9 math look the same. You can include either one into your project. +// We are intentionally using the header define from D3DX9 math to prevent double-inclusion. +#ifndef __D3DX9MATH_H__ +#define __D3DX9MATH_H__ + +#include +#if _MSC_VER >= 1200 +#pragma warning(push) +#endif +#pragma warning(disable:4201) // anonymous unions warning + +//=========================================================================== +// +// Type definitions from D3D9 +// +//=========================================================================== + +#ifndef D3DVECTOR_DEFINED +typedef struct _D3DVECTOR { + float x; + float y; + float z; +} D3DVECTOR; +#define D3DVECTOR_DEFINED +#endif + +#ifndef D3DMATRIX_DEFINED +typedef struct _D3DMATRIX { + union { + struct { + float _11, _12, _13, _14; + float _21, _22, _23, _24; + float _31, _32, _33, _34; + float _41, _42, _43, _44; + + }; + float m[4][4]; + }; +} D3DMATRIX; +#define D3DMATRIX_DEFINED +#endif + +//=========================================================================== +// +// General purpose utilities +// +//=========================================================================== +#define D3DX_PI (3.14159265358979323846) +#define D3DX_1BYPI ( 1.0 / D3DX_PI ) + +#define D3DXToRadian( degree ) ((degree) * (D3DX_PI / 180.0)) +#define D3DXToDegree( radian ) ((radian) * (180.0 / D3DX_PI)) + + + +//=========================================================================== +// +// 16 bit floating point numbers +// +//=========================================================================== + +#define D3DX_16F_DIG 3 // # of decimal digits of precision +#define D3DX_16F_EPSILON 4.8875809e-4f // smallest such that 1.0 + epsilon != 1.0 +#define D3DX_16F_MANT_DIG 11 // # of bits in mantissa +#define D3DX_16F_MAX 6.550400e+004 // max value +#define D3DX_16F_MAX_10_EXP 4 // max decimal exponent +#define D3DX_16F_MAX_EXP 15 // max binary exponent +#define D3DX_16F_MIN 6.1035156e-5f // min positive value +#define D3DX_16F_MIN_10_EXP (-4) // min decimal exponent +#define D3DX_16F_MIN_EXP (-14) // min binary exponent +#define D3DX_16F_RADIX 2 // exponent radix +#define D3DX_16F_ROUNDS 1 // addition rounding: near +#define D3DX_16F_SIGN_MASK 0x8000 +#define D3DX_16F_EXP_MASK 0x7C00 +#define D3DX_16F_FRAC_MASK 0x03FF + +typedef struct D3DXFLOAT16 +{ +#ifdef __cplusplus +public: + D3DXFLOAT16() {}; + D3DXFLOAT16( FLOAT ); + D3DXFLOAT16( CONST D3DXFLOAT16& ); + + // casting + operator FLOAT (); + + // binary operators + BOOL operator == ( CONST D3DXFLOAT16& ) const; + BOOL operator != ( CONST D3DXFLOAT16& ) const; + +protected: +#endif //__cplusplus + WORD value; +} D3DXFLOAT16, *LPD3DXFLOAT16; + + + +//=========================================================================== +// +// Vectors +// +//=========================================================================== + + +//-------------------------- +// 2D Vector +//-------------------------- +typedef struct D3DXVECTOR2 +{ +#ifdef __cplusplus +public: + D3DXVECTOR2() {}; + D3DXVECTOR2( CONST FLOAT * ); + D3DXVECTOR2( CONST D3DXFLOAT16 * ); + D3DXVECTOR2( FLOAT x, FLOAT y ); + + // casting + operator FLOAT* (); + operator CONST FLOAT* () const; + + // assignment operators + D3DXVECTOR2& operator += ( CONST D3DXVECTOR2& ); + D3DXVECTOR2& operator -= ( CONST D3DXVECTOR2& ); + D3DXVECTOR2& operator *= ( FLOAT ); + D3DXVECTOR2& operator /= ( FLOAT ); + + // unary operators + D3DXVECTOR2 operator + () const; + D3DXVECTOR2 operator - () const; + + // binary operators + D3DXVECTOR2 operator + ( CONST D3DXVECTOR2& ) const; + D3DXVECTOR2 operator - ( CONST D3DXVECTOR2& ) const; + D3DXVECTOR2 operator * ( FLOAT ) const; + D3DXVECTOR2 operator / ( FLOAT ) const; + + friend D3DXVECTOR2 operator * ( FLOAT, CONST D3DXVECTOR2& ); + + BOOL operator == ( CONST D3DXVECTOR2& ) const; + BOOL operator != ( CONST D3DXVECTOR2& ) const; + + +public: +#endif //__cplusplus + FLOAT x, y; +} D3DXVECTOR2, *LPD3DXVECTOR2; + + + +//-------------------------- +// 2D Vector (16 bit) +//-------------------------- + +typedef struct D3DXVECTOR2_16F +{ +#ifdef __cplusplus +public: + D3DXVECTOR2_16F() {}; + D3DXVECTOR2_16F( CONST FLOAT * ); + D3DXVECTOR2_16F( CONST D3DXFLOAT16 * ); + D3DXVECTOR2_16F( CONST D3DXFLOAT16 &x, CONST D3DXFLOAT16 &y ); + + // casting + operator D3DXFLOAT16* (); + operator CONST D3DXFLOAT16* () const; + + // binary operators + BOOL operator == ( CONST D3DXVECTOR2_16F& ) const; + BOOL operator != ( CONST D3DXVECTOR2_16F& ) const; + +public: +#endif //__cplusplus + D3DXFLOAT16 x, y; + +} D3DXVECTOR2_16F, *LPD3DXVECTOR2_16F; + + + +//-------------------------- +// 3D Vector +//-------------------------- +#ifdef __cplusplus +typedef struct D3DXVECTOR3 : public D3DVECTOR +{ +public: + D3DXVECTOR3() {}; + D3DXVECTOR3( CONST FLOAT * ); + D3DXVECTOR3( CONST D3DVECTOR& ); + D3DXVECTOR3( CONST D3DXFLOAT16 * ); + D3DXVECTOR3( FLOAT x, FLOAT y, FLOAT z ); + + // casting + operator FLOAT* (); + operator CONST FLOAT* () const; + + // assignment operators + D3DXVECTOR3& operator += ( CONST D3DXVECTOR3& ); + D3DXVECTOR3& operator -= ( CONST D3DXVECTOR3& ); + D3DXVECTOR3& operator *= ( FLOAT ); + D3DXVECTOR3& operator /= ( FLOAT ); + + // unary operators + D3DXVECTOR3 operator + () const; + D3DXVECTOR3 operator - () const; + + // binary operators + D3DXVECTOR3 operator + ( CONST D3DXVECTOR3& ) const; + D3DXVECTOR3 operator - ( CONST D3DXVECTOR3& ) const; + D3DXVECTOR3 operator * ( FLOAT ) const; + D3DXVECTOR3 operator / ( FLOAT ) const; + + friend D3DXVECTOR3 operator * ( FLOAT, CONST struct D3DXVECTOR3& ); + + BOOL operator == ( CONST D3DXVECTOR3& ) const; + BOOL operator != ( CONST D3DXVECTOR3& ) const; + +} D3DXVECTOR3, *LPD3DXVECTOR3; + +#else //!__cplusplus +typedef struct _D3DVECTOR D3DXVECTOR3, *LPD3DXVECTOR3; +#endif //!__cplusplus + + + +//-------------------------- +// 3D Vector (16 bit) +//-------------------------- +typedef struct D3DXVECTOR3_16F +{ +#ifdef __cplusplus +public: + D3DXVECTOR3_16F() {}; + D3DXVECTOR3_16F( CONST FLOAT * ); + D3DXVECTOR3_16F( CONST D3DVECTOR& ); + D3DXVECTOR3_16F( CONST D3DXFLOAT16 * ); + D3DXVECTOR3_16F( CONST D3DXFLOAT16 &x, CONST D3DXFLOAT16 &y, CONST D3DXFLOAT16 &z ); + + // casting + operator D3DXFLOAT16* (); + operator CONST D3DXFLOAT16* () const; + + // binary operators + BOOL operator == ( CONST D3DXVECTOR3_16F& ) const; + BOOL operator != ( CONST D3DXVECTOR3_16F& ) const; + +public: +#endif //__cplusplus + D3DXFLOAT16 x, y, z; + +} D3DXVECTOR3_16F, *LPD3DXVECTOR3_16F; + + + +//-------------------------- +// 4D Vector +//-------------------------- +typedef struct D3DXVECTOR4 +{ +#ifdef __cplusplus +public: + D3DXVECTOR4() {}; + D3DXVECTOR4( CONST FLOAT* ); + D3DXVECTOR4( CONST D3DXFLOAT16* ); + D3DXVECTOR4( CONST D3DVECTOR& xyz, FLOAT w ); + D3DXVECTOR4( FLOAT x, FLOAT y, FLOAT z, FLOAT w ); + + // casting + operator FLOAT* (); + operator CONST FLOAT* () const; + + // assignment operators + D3DXVECTOR4& operator += ( CONST D3DXVECTOR4& ); + D3DXVECTOR4& operator -= ( CONST D3DXVECTOR4& ); + D3DXVECTOR4& operator *= ( FLOAT ); + D3DXVECTOR4& operator /= ( FLOAT ); + + // unary operators + D3DXVECTOR4 operator + () const; + D3DXVECTOR4 operator - () const; + + // binary operators + D3DXVECTOR4 operator + ( CONST D3DXVECTOR4& ) const; + D3DXVECTOR4 operator - ( CONST D3DXVECTOR4& ) const; + D3DXVECTOR4 operator * ( FLOAT ) const; + D3DXVECTOR4 operator / ( FLOAT ) const; + + friend D3DXVECTOR4 operator * ( FLOAT, CONST D3DXVECTOR4& ); + + BOOL operator == ( CONST D3DXVECTOR4& ) const; + BOOL operator != ( CONST D3DXVECTOR4& ) const; + +public: +#endif //__cplusplus + FLOAT x, y, z, w; +} D3DXVECTOR4, *LPD3DXVECTOR4; + + +//-------------------------- +// 4D Vector (16 bit) +//-------------------------- +typedef struct D3DXVECTOR4_16F +{ +#ifdef __cplusplus +public: + D3DXVECTOR4_16F() {}; + D3DXVECTOR4_16F( CONST FLOAT * ); + D3DXVECTOR4_16F( CONST D3DXFLOAT16* ); + D3DXVECTOR4_16F( CONST D3DXVECTOR3_16F& xyz, CONST D3DXFLOAT16& w ); + D3DXVECTOR4_16F( CONST D3DXFLOAT16& x, CONST D3DXFLOAT16& y, CONST D3DXFLOAT16& z, CONST D3DXFLOAT16& w ); + + // casting + operator D3DXFLOAT16* (); + operator CONST D3DXFLOAT16* () const; + + // binary operators + BOOL operator == ( CONST D3DXVECTOR4_16F& ) const; + BOOL operator != ( CONST D3DXVECTOR4_16F& ) const; + +public: +#endif //__cplusplus + D3DXFLOAT16 x, y, z, w; + +} D3DXVECTOR4_16F, *LPD3DXVECTOR4_16F; + + + +//=========================================================================== +// +// Matrices +// +//=========================================================================== +#ifdef __cplusplus +typedef struct D3DXMATRIX : public D3DMATRIX +{ +public: + D3DXMATRIX() {}; + D3DXMATRIX( CONST FLOAT * ); + D3DXMATRIX( CONST D3DMATRIX& ); + D3DXMATRIX( CONST D3DXFLOAT16 * ); + D3DXMATRIX( FLOAT _11, FLOAT _12, FLOAT _13, FLOAT _14, + FLOAT _21, FLOAT _22, FLOAT _23, FLOAT _24, + FLOAT _31, FLOAT _32, FLOAT _33, FLOAT _34, + FLOAT _41, FLOAT _42, FLOAT _43, FLOAT _44 ); + + + // access grants + FLOAT& operator () ( UINT Row, UINT Col ); + FLOAT operator () ( UINT Row, UINT Col ) const; + + // casting operators + operator FLOAT* (); + operator CONST FLOAT* () const; + + // assignment operators + D3DXMATRIX& operator *= ( CONST D3DXMATRIX& ); + D3DXMATRIX& operator += ( CONST D3DXMATRIX& ); + D3DXMATRIX& operator -= ( CONST D3DXMATRIX& ); + D3DXMATRIX& operator *= ( FLOAT ); + D3DXMATRIX& operator /= ( FLOAT ); + + // unary operators + D3DXMATRIX operator + () const; + D3DXMATRIX operator - () const; + + // binary operators + D3DXMATRIX operator * ( CONST D3DXMATRIX& ) const; + D3DXMATRIX operator + ( CONST D3DXMATRIX& ) const; + D3DXMATRIX operator - ( CONST D3DXMATRIX& ) const; + D3DXMATRIX operator * ( FLOAT ) const; + D3DXMATRIX operator / ( FLOAT ) const; + + friend D3DXMATRIX operator * ( FLOAT, CONST D3DXMATRIX& ); + + BOOL operator == ( CONST D3DXMATRIX& ) const; + BOOL operator != ( CONST D3DXMATRIX& ) const; + +} D3DXMATRIX, *LPD3DXMATRIX; + +#else //!__cplusplus +typedef struct _D3DMATRIX D3DXMATRIX, *LPD3DXMATRIX; +#endif //!__cplusplus + + +//--------------------------------------------------------------------------- +// Aligned Matrices +// +// This class helps keep matrices 16-byte aligned as preferred by P4 cpus. +// It aligns matrices on the stack and on the heap or in global scope. +// It does this using __declspec(align(16)) which works on VC7 and on VC 6 +// with the processor pack. Unfortunately there is no way to detect the +// latter so this is turned on only on VC7. On other compilers this is the +// the same as D3DXMATRIX. +// +// Using this class on a compiler that does not actually do the alignment +// can be dangerous since it will not expose bugs that ignore alignment. +// E.g if an object of this class in inside a struct or class, and some code +// memcopys data in it assuming tight packing. This could break on a compiler +// that eventually start aligning the matrix. +//--------------------------------------------------------------------------- +#ifdef __cplusplus +typedef struct _D3DXMATRIXA16 : public D3DXMATRIX +{ + _D3DXMATRIXA16() {}; + _D3DXMATRIXA16( CONST FLOAT * ); + _D3DXMATRIXA16( CONST D3DMATRIX& ); + _D3DXMATRIXA16( CONST D3DXFLOAT16 * ); + _D3DXMATRIXA16( FLOAT _11, FLOAT _12, FLOAT _13, FLOAT _14, + FLOAT _21, FLOAT _22, FLOAT _23, FLOAT _24, + FLOAT _31, FLOAT _32, FLOAT _33, FLOAT _34, + FLOAT _41, FLOAT _42, FLOAT _43, FLOAT _44 ); + + // new operators + void* operator new ( size_t ); + void* operator new[] ( size_t ); + + // delete operators + void operator delete ( void* ); // These are NOT virtual; Do not + void operator delete[] ( void* ); // cast to D3DXMATRIX and delete. + + // assignment operators + _D3DXMATRIXA16& operator = ( CONST D3DXMATRIX& ); + +} _D3DXMATRIXA16; + +#else //!__cplusplus +typedef D3DXMATRIX _D3DXMATRIXA16; +#endif //!__cplusplus + + + +#if _MSC_VER >= 1300 // VC7 +#define D3DX_ALIGN16 __declspec(align(16)) +#else +#define D3DX_ALIGN16 // Earlier compiler may not understand this, do nothing. +#endif + +typedef D3DX_ALIGN16 _D3DXMATRIXA16 D3DXMATRIXA16, *LPD3DXMATRIXA16; + + + +//=========================================================================== +// +// Quaternions +// +//=========================================================================== +typedef struct D3DXQUATERNION +{ +#ifdef __cplusplus +public: + D3DXQUATERNION() {}; + D3DXQUATERNION( CONST FLOAT * ); + D3DXQUATERNION( CONST D3DXFLOAT16 * ); + D3DXQUATERNION( FLOAT x, FLOAT y, FLOAT z, FLOAT w ); + + // casting + operator FLOAT* (); + operator CONST FLOAT* () const; + + // assignment operators + D3DXQUATERNION& operator += ( CONST D3DXQUATERNION& ); + D3DXQUATERNION& operator -= ( CONST D3DXQUATERNION& ); + D3DXQUATERNION& operator *= ( CONST D3DXQUATERNION& ); + D3DXQUATERNION& operator *= ( FLOAT ); + D3DXQUATERNION& operator /= ( FLOAT ); + + // unary operators + D3DXQUATERNION operator + () const; + D3DXQUATERNION operator - () const; + + // binary operators + D3DXQUATERNION operator + ( CONST D3DXQUATERNION& ) const; + D3DXQUATERNION operator - ( CONST D3DXQUATERNION& ) const; + D3DXQUATERNION operator * ( CONST D3DXQUATERNION& ) const; + D3DXQUATERNION operator * ( FLOAT ) const; + D3DXQUATERNION operator / ( FLOAT ) const; + + friend D3DXQUATERNION operator * (FLOAT, CONST D3DXQUATERNION& ); + + BOOL operator == ( CONST D3DXQUATERNION& ) const; + BOOL operator != ( CONST D3DXQUATERNION& ) const; + +#endif //__cplusplus + FLOAT x, y, z, w; +} D3DXQUATERNION, *LPD3DXQUATERNION; + + +//=========================================================================== +// +// Planes +// +//=========================================================================== +typedef struct D3DXPLANE +{ +#ifdef __cplusplus +public: + D3DXPLANE() {}; + D3DXPLANE( CONST FLOAT* ); + D3DXPLANE( CONST D3DXFLOAT16* ); + D3DXPLANE( FLOAT a, FLOAT b, FLOAT c, FLOAT d ); + + // casting + operator FLOAT* (); + operator CONST FLOAT* () const; + + // assignment operators + D3DXPLANE& operator *= ( FLOAT ); + D3DXPLANE& operator /= ( FLOAT ); + + // unary operators + D3DXPLANE operator + () const; + D3DXPLANE operator - () const; + + // binary operators + D3DXPLANE operator * ( FLOAT ) const; + D3DXPLANE operator / ( FLOAT ) const; + + friend D3DXPLANE operator * ( FLOAT, CONST D3DXPLANE& ); + + BOOL operator == ( CONST D3DXPLANE& ) const; + BOOL operator != ( CONST D3DXPLANE& ) const; + +#endif //__cplusplus + FLOAT a, b, c, d; +} D3DXPLANE, *LPD3DXPLANE; + + +//=========================================================================== +// +// Colors +// +//=========================================================================== + +typedef struct D3DXCOLOR +{ +#ifdef __cplusplus +public: + D3DXCOLOR() {}; + D3DXCOLOR( UINT argb ); + D3DXCOLOR( CONST FLOAT * ); + D3DXCOLOR( CONST D3DXFLOAT16 * ); + D3DXCOLOR( FLOAT r, FLOAT g, FLOAT b, FLOAT a ); + + // casting + operator UINT () const; + + operator FLOAT* (); + operator CONST FLOAT* () const; + + // assignment operators + D3DXCOLOR& operator += ( CONST D3DXCOLOR& ); + D3DXCOLOR& operator -= ( CONST D3DXCOLOR& ); + D3DXCOLOR& operator *= ( FLOAT ); + D3DXCOLOR& operator /= ( FLOAT ); + + // unary operators + D3DXCOLOR operator + () const; + D3DXCOLOR operator - () const; + + // binary operators + D3DXCOLOR operator + ( CONST D3DXCOLOR& ) const; + D3DXCOLOR operator - ( CONST D3DXCOLOR& ) const; + D3DXCOLOR operator * ( FLOAT ) const; + D3DXCOLOR operator / ( FLOAT ) const; + + friend D3DXCOLOR operator * ( FLOAT, CONST D3DXCOLOR& ); + + BOOL operator == ( CONST D3DXCOLOR& ) const; + BOOL operator != ( CONST D3DXCOLOR& ) const; + +#endif //__cplusplus + FLOAT r, g, b, a; +} D3DXCOLOR, *LPD3DXCOLOR; + + + +//=========================================================================== +// +// D3DX math functions: +// +// NOTE: +// * All these functions can take the same object as in and out parameters. +// +// * Out parameters are typically also returned as return values, so that +// the output of one function may be used as a parameter to another. +// +//=========================================================================== + +//-------------------------- +// Float16 +//-------------------------- + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +// Converts an array 32-bit floats to 16-bit floats +D3DXFLOAT16* WINAPI D3DXFloat32To16Array + ( D3DXFLOAT16 *pOut, CONST FLOAT *pIn, UINT n ); + +// Converts an array 16-bit floats to 32-bit floats +FLOAT* WINAPI D3DXFloat16To32Array + ( __out_ecount(n) FLOAT *pOut, __in_ecount(n) CONST D3DXFLOAT16 *pIn, UINT n ); + +#ifdef __cplusplus +} +#endif + + +//-------------------------- +// 2D Vector +//-------------------------- + +// inline + +FLOAT D3DXVec2Length + ( CONST D3DXVECTOR2 *pV ); + +FLOAT D3DXVec2LengthSq + ( CONST D3DXVECTOR2 *pV ); + +FLOAT D3DXVec2Dot + ( CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ); + +// Z component of ((x1,y1,0) cross (x2,y2,0)) +FLOAT D3DXVec2CCW + ( CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ); + +D3DXVECTOR2* D3DXVec2Add + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ); + +D3DXVECTOR2* D3DXVec2Subtract + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ); + +// Minimize each component. x = min(x1, x2), y = min(y1, y2) +D3DXVECTOR2* D3DXVec2Minimize + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ); + +// Maximize each component. x = max(x1, x2), y = max(y1, y2) +D3DXVECTOR2* D3DXVec2Maximize + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ); + +D3DXVECTOR2* D3DXVec2Scale + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV, FLOAT s ); + +// Linear interpolation. V1 + s(V2-V1) +D3DXVECTOR2* D3DXVec2Lerp + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2, + FLOAT s ); + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +D3DXVECTOR2* WINAPI D3DXVec2Normalize + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV ); + +// Hermite interpolation between position V1, tangent T1 (when s == 0) +// and position V2, tangent T2 (when s == 1). +D3DXVECTOR2* WINAPI D3DXVec2Hermite + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pT1, + CONST D3DXVECTOR2 *pV2, CONST D3DXVECTOR2 *pT2, FLOAT s ); + +// CatmullRom interpolation between V1 (when s == 0) and V2 (when s == 1) +D3DXVECTOR2* WINAPI D3DXVec2CatmullRom + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV0, CONST D3DXVECTOR2 *pV1, + CONST D3DXVECTOR2 *pV2, CONST D3DXVECTOR2 *pV3, FLOAT s ); + +// Barycentric coordinates. V1 + f(V2-V1) + g(V3-V1) +D3DXVECTOR2* WINAPI D3DXVec2BaryCentric + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2, + CONST D3DXVECTOR2 *pV3, FLOAT f, FLOAT g); + +// Transform (x, y, 0, 1) by matrix. +D3DXVECTOR4* WINAPI D3DXVec2Transform + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR2 *pV, CONST D3DXMATRIX *pM ); + +// Transform (x, y, 0, 1) by matrix, project result back into w=1. +D3DXVECTOR2* WINAPI D3DXVec2TransformCoord + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV, CONST D3DXMATRIX *pM ); + +// Transform (x, y, 0, 0) by matrix. +D3DXVECTOR2* WINAPI D3DXVec2TransformNormal + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV, CONST D3DXMATRIX *pM ); + +// Transform Array (x, y, 0, 1) by matrix. +D3DXVECTOR4* WINAPI D3DXVec2TransformArray + ( D3DXVECTOR4 *pOut, UINT OutStride, CONST D3DXVECTOR2 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n); + +// Transform Array (x, y, 0, 1) by matrix, project result back into w=1. +D3DXVECTOR2* WINAPI D3DXVec2TransformCoordArray + ( D3DXVECTOR2 *pOut, UINT OutStride, CONST D3DXVECTOR2 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n ); + +// Transform Array (x, y, 0, 0) by matrix. +D3DXVECTOR2* WINAPI D3DXVec2TransformNormalArray + ( D3DXVECTOR2 *pOut, UINT OutStride, CONST D3DXVECTOR2 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n ); + + + +#ifdef __cplusplus +} +#endif + + +//-------------------------- +// 3D Vector +//-------------------------- + +// inline + +FLOAT D3DXVec3Length + ( CONST D3DXVECTOR3 *pV ); + +FLOAT D3DXVec3LengthSq + ( CONST D3DXVECTOR3 *pV ); + +FLOAT D3DXVec3Dot + ( CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ); + +D3DXVECTOR3* D3DXVec3Cross + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ); + +D3DXVECTOR3* D3DXVec3Add + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ); + +D3DXVECTOR3* D3DXVec3Subtract + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ); + +// Minimize each component. x = min(x1, x2), y = min(y1, y2), ... +D3DXVECTOR3* D3DXVec3Minimize + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ); + +// Maximize each component. x = max(x1, x2), y = max(y1, y2), ... +D3DXVECTOR3* D3DXVec3Maximize + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ); + +D3DXVECTOR3* D3DXVec3Scale + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, FLOAT s); + +// Linear interpolation. V1 + s(V2-V1) +D3DXVECTOR3* D3DXVec3Lerp + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2, + FLOAT s ); + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +D3DXVECTOR3* WINAPI D3DXVec3Normalize + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV ); + +// Hermite interpolation between position V1, tangent T1 (when s == 0) +// and position V2, tangent T2 (when s == 1). +D3DXVECTOR3* WINAPI D3DXVec3Hermite + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pT1, + CONST D3DXVECTOR3 *pV2, CONST D3DXVECTOR3 *pT2, FLOAT s ); + +// CatmullRom interpolation between V1 (when s == 0) and V2 (when s == 1) +D3DXVECTOR3* WINAPI D3DXVec3CatmullRom + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV0, CONST D3DXVECTOR3 *pV1, + CONST D3DXVECTOR3 *pV2, CONST D3DXVECTOR3 *pV3, FLOAT s ); + +// Barycentric coordinates. V1 + f(V2-V1) + g(V3-V1) +D3DXVECTOR3* WINAPI D3DXVec3BaryCentric + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2, + CONST D3DXVECTOR3 *pV3, FLOAT f, FLOAT g); + +// Transform (x, y, z, 1) by matrix. +D3DXVECTOR4* WINAPI D3DXVec3Transform + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR3 *pV, CONST D3DXMATRIX *pM ); + +// Transform (x, y, z, 1) by matrix, project result back into w=1. +D3DXVECTOR3* WINAPI D3DXVec3TransformCoord + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3DXMATRIX *pM ); + +// Transform (x, y, z, 0) by matrix. If you transforming a normal by a +// non-affine matrix, the matrix you pass to this function should be the +// transpose of the inverse of the matrix you would use to transform a coord. +D3DXVECTOR3* WINAPI D3DXVec3TransformNormal + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3DXMATRIX *pM ); + + +// Transform Array (x, y, z, 1) by matrix. +D3DXVECTOR4* WINAPI D3DXVec3TransformArray + ( D3DXVECTOR4 *pOut, UINT OutStride, CONST D3DXVECTOR3 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n ); + +// Transform Array (x, y, z, 1) by matrix, project result back into w=1. +D3DXVECTOR3* WINAPI D3DXVec3TransformCoordArray + ( D3DXVECTOR3 *pOut, UINT OutStride, CONST D3DXVECTOR3 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n ); + +// Transform (x, y, z, 0) by matrix. If you transforming a normal by a +// non-affine matrix, the matrix you pass to this function should be the +// transpose of the inverse of the matrix you would use to transform a coord. +D3DXVECTOR3* WINAPI D3DXVec3TransformNormalArray + ( D3DXVECTOR3 *pOut, UINT OutStride, CONST D3DXVECTOR3 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n ); + +// Project vector from object space into screen space +D3DXVECTOR3* WINAPI D3DXVec3Project + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3D10_VIEWPORT *pViewport, + CONST D3DXMATRIX *pProjection, CONST D3DXMATRIX *pView, CONST D3DXMATRIX *pWorld); + +// Project vector from screen space into object space +D3DXVECTOR3* WINAPI D3DXVec3Unproject + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3D10_VIEWPORT *pViewport, + CONST D3DXMATRIX *pProjection, CONST D3DXMATRIX *pView, CONST D3DXMATRIX *pWorld); + +// Project vector Array from object space into screen space +D3DXVECTOR3* WINAPI D3DXVec3ProjectArray + ( D3DXVECTOR3 *pOut, UINT OutStride,CONST D3DXVECTOR3 *pV, UINT VStride,CONST D3D10_VIEWPORT *pViewport, + CONST D3DXMATRIX *pProjection, CONST D3DXMATRIX *pView, CONST D3DXMATRIX *pWorld, UINT n); + +// Project vector Array from screen space into object space +D3DXVECTOR3* WINAPI D3DXVec3UnprojectArray + ( D3DXVECTOR3 *pOut, UINT OutStride, CONST D3DXVECTOR3 *pV, UINT VStride, CONST D3D10_VIEWPORT *pViewport, + CONST D3DXMATRIX *pProjection, CONST D3DXMATRIX *pView, CONST D3DXMATRIX *pWorld, UINT n); + + +#ifdef __cplusplus +} +#endif + + + +//-------------------------- +// 4D Vector +//-------------------------- + +// inline + +FLOAT D3DXVec4Length + ( CONST D3DXVECTOR4 *pV ); + +FLOAT D3DXVec4LengthSq + ( CONST D3DXVECTOR4 *pV ); + +FLOAT D3DXVec4Dot + ( CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2 ); + +D3DXVECTOR4* D3DXVec4Add + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2); + +D3DXVECTOR4* D3DXVec4Subtract + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2); + +// Minimize each component. x = min(x1, x2), y = min(y1, y2), ... +D3DXVECTOR4* D3DXVec4Minimize + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2); + +// Maximize each component. x = max(x1, x2), y = max(y1, y2), ... +D3DXVECTOR4* D3DXVec4Maximize + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2); + +D3DXVECTOR4* D3DXVec4Scale + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV, FLOAT s); + +// Linear interpolation. V1 + s(V2-V1) +D3DXVECTOR4* D3DXVec4Lerp + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2, + FLOAT s ); + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +// Cross-product in 4 dimensions. +D3DXVECTOR4* WINAPI D3DXVec4Cross + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2, + CONST D3DXVECTOR4 *pV3); + +D3DXVECTOR4* WINAPI D3DXVec4Normalize + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV ); + +// Hermite interpolation between position V1, tangent T1 (when s == 0) +// and position V2, tangent T2 (when s == 1). +D3DXVECTOR4* WINAPI D3DXVec4Hermite + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pT1, + CONST D3DXVECTOR4 *pV2, CONST D3DXVECTOR4 *pT2, FLOAT s ); + +// CatmullRom interpolation between V1 (when s == 0) and V2 (when s == 1) +D3DXVECTOR4* WINAPI D3DXVec4CatmullRom + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV0, CONST D3DXVECTOR4 *pV1, + CONST D3DXVECTOR4 *pV2, CONST D3DXVECTOR4 *pV3, FLOAT s ); + +// Barycentric coordinates. V1 + f(V2-V1) + g(V3-V1) +D3DXVECTOR4* WINAPI D3DXVec4BaryCentric + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2, + CONST D3DXVECTOR4 *pV3, FLOAT f, FLOAT g); + +// Transform vector by matrix. +D3DXVECTOR4* WINAPI D3DXVec4Transform + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV, CONST D3DXMATRIX *pM ); + +// Transform vector array by matrix. +D3DXVECTOR4* WINAPI D3DXVec4TransformArray + ( D3DXVECTOR4 *pOut, UINT OutStride, CONST D3DXVECTOR4 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n ); + +#ifdef __cplusplus +} +#endif + + +//-------------------------- +// 4D Matrix +//-------------------------- + +// inline + +D3DXMATRIX* D3DXMatrixIdentity + ( D3DXMATRIX *pOut ); + +BOOL D3DXMatrixIsIdentity + ( CONST D3DXMATRIX *pM ); + + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +FLOAT WINAPI D3DXMatrixDeterminant + ( CONST D3DXMATRIX *pM ); + +HRESULT WINAPI D3DXMatrixDecompose + ( D3DXVECTOR3 *pOutScale, D3DXQUATERNION *pOutRotation, + D3DXVECTOR3 *pOutTranslation, CONST D3DXMATRIX *pM ); + +D3DXMATRIX* WINAPI D3DXMatrixTranspose + ( D3DXMATRIX *pOut, CONST D3DXMATRIX *pM ); + +// Matrix multiplication. The result represents the transformation M2 +// followed by the transformation M1. (Out = M1 * M2) +D3DXMATRIX* WINAPI D3DXMatrixMultiply + ( D3DXMATRIX *pOut, CONST D3DXMATRIX *pM1, CONST D3DXMATRIX *pM2 ); + +// Matrix multiplication, followed by a transpose. (Out = T(M1 * M2)) +D3DXMATRIX* WINAPI D3DXMatrixMultiplyTranspose + ( D3DXMATRIX *pOut, CONST D3DXMATRIX *pM1, CONST D3DXMATRIX *pM2 ); + +// Calculate inverse of matrix. Inversion my fail, in which case NULL will +// be returned. The determinant of pM is also returned it pfDeterminant +// is non-NULL. +D3DXMATRIX* WINAPI D3DXMatrixInverse + ( D3DXMATRIX *pOut, FLOAT *pDeterminant, CONST D3DXMATRIX *pM ); + +// Build a matrix which scales by (sx, sy, sz) +D3DXMATRIX* WINAPI D3DXMatrixScaling + ( D3DXMATRIX *pOut, FLOAT sx, FLOAT sy, FLOAT sz ); + +// Build a matrix which translates by (x, y, z) +D3DXMATRIX* WINAPI D3DXMatrixTranslation + ( D3DXMATRIX *pOut, FLOAT x, FLOAT y, FLOAT z ); + +// Build a matrix which rotates around the X axis +D3DXMATRIX* WINAPI D3DXMatrixRotationX + ( D3DXMATRIX *pOut, FLOAT Angle ); + +// Build a matrix which rotates around the Y axis +D3DXMATRIX* WINAPI D3DXMatrixRotationY + ( D3DXMATRIX *pOut, FLOAT Angle ); + +// Build a matrix which rotates around the Z axis +D3DXMATRIX* WINAPI D3DXMatrixRotationZ + ( D3DXMATRIX *pOut, FLOAT Angle ); + +// Build a matrix which rotates around an arbitrary axis +D3DXMATRIX* WINAPI D3DXMatrixRotationAxis + ( D3DXMATRIX *pOut, CONST D3DXVECTOR3 *pV, FLOAT Angle ); + +// Build a matrix from a quaternion +D3DXMATRIX* WINAPI D3DXMatrixRotationQuaternion + ( D3DXMATRIX *pOut, CONST D3DXQUATERNION *pQ); + +// Yaw around the Y axis, a pitch around the X axis, +// and a roll around the Z axis. +D3DXMATRIX* WINAPI D3DXMatrixRotationYawPitchRoll + ( D3DXMATRIX *pOut, FLOAT Yaw, FLOAT Pitch, FLOAT Roll ); + +// Build transformation matrix. NULL arguments are treated as identity. +// Mout = Msc-1 * Msr-1 * Ms * Msr * Msc * Mrc-1 * Mr * Mrc * Mt +D3DXMATRIX* WINAPI D3DXMatrixTransformation + ( D3DXMATRIX *pOut, CONST D3DXVECTOR3 *pScalingCenter, + CONST D3DXQUATERNION *pScalingRotation, CONST D3DXVECTOR3 *pScaling, + CONST D3DXVECTOR3 *pRotationCenter, CONST D3DXQUATERNION *pRotation, + CONST D3DXVECTOR3 *pTranslation); + +// Build 2D transformation matrix in XY plane. NULL arguments are treated as identity. +// Mout = Msc-1 * Msr-1 * Ms * Msr * Msc * Mrc-1 * Mr * Mrc * Mt +D3DXMATRIX* WINAPI D3DXMatrixTransformation2D + ( D3DXMATRIX *pOut, CONST D3DXVECTOR2* pScalingCenter, + FLOAT ScalingRotation, CONST D3DXVECTOR2* pScaling, + CONST D3DXVECTOR2* pRotationCenter, FLOAT Rotation, + CONST D3DXVECTOR2* pTranslation); + +// Build affine transformation matrix. NULL arguments are treated as identity. +// Mout = Ms * Mrc-1 * Mr * Mrc * Mt +D3DXMATRIX* WINAPI D3DXMatrixAffineTransformation + ( D3DXMATRIX *pOut, FLOAT Scaling, CONST D3DXVECTOR3 *pRotationCenter, + CONST D3DXQUATERNION *pRotation, CONST D3DXVECTOR3 *pTranslation); + +// Build 2D affine transformation matrix in XY plane. NULL arguments are treated as identity. +// Mout = Ms * Mrc-1 * Mr * Mrc * Mt +D3DXMATRIX* WINAPI D3DXMatrixAffineTransformation2D + ( D3DXMATRIX *pOut, FLOAT Scaling, CONST D3DXVECTOR2* pRotationCenter, + FLOAT Rotation, CONST D3DXVECTOR2* pTranslation); + +// Build a lookat matrix. (right-handed) +D3DXMATRIX* WINAPI D3DXMatrixLookAtRH + ( D3DXMATRIX *pOut, CONST D3DXVECTOR3 *pEye, CONST D3DXVECTOR3 *pAt, + CONST D3DXVECTOR3 *pUp ); + +// Build a lookat matrix. (left-handed) +D3DXMATRIX* WINAPI D3DXMatrixLookAtLH + ( D3DXMATRIX *pOut, CONST D3DXVECTOR3 *pEye, CONST D3DXVECTOR3 *pAt, + CONST D3DXVECTOR3 *pUp ); + +// Build a perspective projection matrix. (right-handed) +D3DXMATRIX* WINAPI D3DXMatrixPerspectiveRH + ( D3DXMATRIX *pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf ); + +// Build a perspective projection matrix. (left-handed) +D3DXMATRIX* WINAPI D3DXMatrixPerspectiveLH + ( D3DXMATRIX *pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf ); + +// Build a perspective projection matrix. (right-handed) +D3DXMATRIX* WINAPI D3DXMatrixPerspectiveFovRH + ( D3DXMATRIX *pOut, FLOAT fovy, FLOAT Aspect, FLOAT zn, FLOAT zf ); + +// Build a perspective projection matrix. (left-handed) +D3DXMATRIX* WINAPI D3DXMatrixPerspectiveFovLH + ( D3DXMATRIX *pOut, FLOAT fovy, FLOAT Aspect, FLOAT zn, FLOAT zf ); + +// Build a perspective projection matrix. (right-handed) +D3DXMATRIX* WINAPI D3DXMatrixPerspectiveOffCenterRH + ( D3DXMATRIX *pOut, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, + FLOAT zf ); + +// Build a perspective projection matrix. (left-handed) +D3DXMATRIX* WINAPI D3DXMatrixPerspectiveOffCenterLH + ( D3DXMATRIX *pOut, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, + FLOAT zf ); + +// Build an ortho projection matrix. (right-handed) +D3DXMATRIX* WINAPI D3DXMatrixOrthoRH + ( D3DXMATRIX *pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf ); + +// Build an ortho projection matrix. (left-handed) +D3DXMATRIX* WINAPI D3DXMatrixOrthoLH + ( D3DXMATRIX *pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf ); + +// Build an ortho projection matrix. (right-handed) +D3DXMATRIX* WINAPI D3DXMatrixOrthoOffCenterRH + ( D3DXMATRIX *pOut, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, + FLOAT zf ); + +// Build an ortho projection matrix. (left-handed) +D3DXMATRIX* WINAPI D3DXMatrixOrthoOffCenterLH + ( D3DXMATRIX *pOut, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, + FLOAT zf ); + +// Build a matrix which flattens geometry into a plane, as if casting +// a shadow from a light. +D3DXMATRIX* WINAPI D3DXMatrixShadow + ( D3DXMATRIX *pOut, CONST D3DXVECTOR4 *pLight, + CONST D3DXPLANE *pPlane ); + +// Build a matrix which reflects the coordinate system about a plane +D3DXMATRIX* WINAPI D3DXMatrixReflect + ( D3DXMATRIX *pOut, CONST D3DXPLANE *pPlane ); + +#ifdef __cplusplus +} +#endif + + +//-------------------------- +// Quaternion +//-------------------------- + +// inline + +FLOAT D3DXQuaternionLength + ( CONST D3DXQUATERNION *pQ ); + +// Length squared, or "norm" +FLOAT D3DXQuaternionLengthSq + ( CONST D3DXQUATERNION *pQ ); + +FLOAT D3DXQuaternionDot + ( CONST D3DXQUATERNION *pQ1, CONST D3DXQUATERNION *pQ2 ); + +// (0, 0, 0, 1) +D3DXQUATERNION* D3DXQuaternionIdentity + ( D3DXQUATERNION *pOut ); + +BOOL D3DXQuaternionIsIdentity + ( CONST D3DXQUATERNION *pQ ); + +// (-x, -y, -z, w) +D3DXQUATERNION* D3DXQuaternionConjugate + ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ ); + + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +// Compute a quaternin's axis and angle of rotation. Expects unit quaternions. +void WINAPI D3DXQuaternionToAxisAngle + ( CONST D3DXQUATERNION *pQ, D3DXVECTOR3 *pAxis, FLOAT *pAngle ); + +// Build a quaternion from a rotation matrix. +D3DXQUATERNION* WINAPI D3DXQuaternionRotationMatrix + ( D3DXQUATERNION *pOut, CONST D3DXMATRIX *pM); + +// Rotation about arbitrary axis. +D3DXQUATERNION* WINAPI D3DXQuaternionRotationAxis + ( D3DXQUATERNION *pOut, CONST D3DXVECTOR3 *pV, FLOAT Angle ); + +// Yaw around the Y axis, a pitch around the X axis, +// and a roll around the Z axis. +D3DXQUATERNION* WINAPI D3DXQuaternionRotationYawPitchRoll + ( D3DXQUATERNION *pOut, FLOAT Yaw, FLOAT Pitch, FLOAT Roll ); + +// Quaternion multiplication. The result represents the rotation Q2 +// followed by the rotation Q1. (Out = Q2 * Q1) +D3DXQUATERNION* WINAPI D3DXQuaternionMultiply + ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ1, + CONST D3DXQUATERNION *pQ2 ); + +D3DXQUATERNION* WINAPI D3DXQuaternionNormalize + ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ ); + +// Conjugate and re-norm +D3DXQUATERNION* WINAPI D3DXQuaternionInverse + ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ ); + +// Expects unit quaternions. +// if q = (cos(theta), sin(theta) * v); ln(q) = (0, theta * v) +D3DXQUATERNION* WINAPI D3DXQuaternionLn + ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ ); + +// Expects pure quaternions. (w == 0) w is ignored in calculation. +// if q = (0, theta * v); exp(q) = (cos(theta), sin(theta) * v) +D3DXQUATERNION* WINAPI D3DXQuaternionExp + ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ ); + +// Spherical linear interpolation between Q1 (t == 0) and Q2 (t == 1). +// Expects unit quaternions. +D3DXQUATERNION* WINAPI D3DXQuaternionSlerp + ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ1, + CONST D3DXQUATERNION *pQ2, FLOAT t ); + +// Spherical quadrangle interpolation. +// Slerp(Slerp(Q1, C, t), Slerp(A, B, t), 2t(1-t)) +D3DXQUATERNION* WINAPI D3DXQuaternionSquad + ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ1, + CONST D3DXQUATERNION *pA, CONST D3DXQUATERNION *pB, + CONST D3DXQUATERNION *pC, FLOAT t ); + +// Setup control points for spherical quadrangle interpolation +// from Q1 to Q2. The control points are chosen in such a way +// to ensure the continuity of tangents with adjacent segments. +void WINAPI D3DXQuaternionSquadSetup + ( D3DXQUATERNION *pAOut, D3DXQUATERNION *pBOut, D3DXQUATERNION *pCOut, + CONST D3DXQUATERNION *pQ0, CONST D3DXQUATERNION *pQ1, + CONST D3DXQUATERNION *pQ2, CONST D3DXQUATERNION *pQ3 ); + +// Barycentric interpolation. +// Slerp(Slerp(Q1, Q2, f+g), Slerp(Q1, Q3, f+g), g/(f+g)) +D3DXQUATERNION* WINAPI D3DXQuaternionBaryCentric + ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ1, + CONST D3DXQUATERNION *pQ2, CONST D3DXQUATERNION *pQ3, + FLOAT f, FLOAT g ); + +#ifdef __cplusplus +} +#endif + + +//-------------------------- +// Plane +//-------------------------- + +// inline + +// ax + by + cz + dw +FLOAT D3DXPlaneDot + ( CONST D3DXPLANE *pP, CONST D3DXVECTOR4 *pV); + +// ax + by + cz + d +FLOAT D3DXPlaneDotCoord + ( CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV); + +// ax + by + cz +FLOAT D3DXPlaneDotNormal + ( CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV); + +D3DXPLANE* D3DXPlaneScale + (D3DXPLANE *pOut, CONST D3DXPLANE *pP, FLOAT s); + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +// Normalize plane (so that |a,b,c| == 1) +D3DXPLANE* WINAPI D3DXPlaneNormalize + ( D3DXPLANE *pOut, CONST D3DXPLANE *pP); + +// Find the intersection between a plane and a line. If the line is +// parallel to the plane, NULL is returned. +D3DXVECTOR3* WINAPI D3DXPlaneIntersectLine + ( D3DXVECTOR3 *pOut, CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV1, + CONST D3DXVECTOR3 *pV2); + +// Construct a plane from a point and a normal +D3DXPLANE* WINAPI D3DXPlaneFromPointNormal + ( D3DXPLANE *pOut, CONST D3DXVECTOR3 *pPoint, CONST D3DXVECTOR3 *pNormal); + +// Construct a plane from 3 points +D3DXPLANE* WINAPI D3DXPlaneFromPoints + ( D3DXPLANE *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2, + CONST D3DXVECTOR3 *pV3); + +// Transform a plane by a matrix. The vector (a,b,c) must be normal. +// M should be the inverse transpose of the transformation desired. +D3DXPLANE* WINAPI D3DXPlaneTransform + ( D3DXPLANE *pOut, CONST D3DXPLANE *pP, CONST D3DXMATRIX *pM ); + +// Transform an array of planes by a matrix. The vectors (a,b,c) must be normal. +// M should be the inverse transpose of the transformation desired. +D3DXPLANE* WINAPI D3DXPlaneTransformArray + ( D3DXPLANE *pOut, UINT OutStride, CONST D3DXPLANE *pP, UINT PStride, CONST D3DXMATRIX *pM, UINT n ); + +#ifdef __cplusplus +} +#endif + + +//-------------------------- +// Color +//-------------------------- + +// inline + +// (1-r, 1-g, 1-b, a) +D3DXCOLOR* D3DXColorNegative + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC); + +D3DXCOLOR* D3DXColorAdd + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2); + +D3DXCOLOR* D3DXColorSubtract + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2); + +D3DXCOLOR* D3DXColorScale + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC, FLOAT s); + +// (r1*r2, g1*g2, b1*b2, a1*a2) +D3DXCOLOR* D3DXColorModulate + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2); + +// Linear interpolation of r,g,b, and a. C1 + s(C2-C1) +D3DXCOLOR* D3DXColorLerp + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2, FLOAT s); + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +// Interpolate r,g,b between desaturated color and color. +// DesaturatedColor + s(Color - DesaturatedColor) +D3DXCOLOR* WINAPI D3DXColorAdjustSaturation + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC, FLOAT s); + +// Interpolate r,g,b between 50% grey and color. Grey + s(Color - Grey) +D3DXCOLOR* WINAPI D3DXColorAdjustContrast + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC, FLOAT c); + +#ifdef __cplusplus +} +#endif + + + + +//-------------------------- +// Misc +//-------------------------- + +#ifdef __cplusplus +extern "C" { +#endif + +// Calculate Fresnel term given the cosine of theta (likely obtained by +// taking the dot of two normals), and the refraction index of the material. +FLOAT WINAPI D3DXFresnelTerm + (FLOAT CosTheta, FLOAT RefractionIndex); + +#ifdef __cplusplus +} +#endif + + + +//=========================================================================== +// +// Matrix Stack +// +//=========================================================================== + +typedef interface ID3DXMatrixStack ID3DXMatrixStack; +typedef interface ID3DXMatrixStack *LPD3DXMATRIXSTACK; + +// {C7885BA7-F990-4fe7-922D-8515E477DD85} +DEFINE_GUID(IID_ID3DXMatrixStack, +0xc7885ba7, 0xf990, 0x4fe7, 0x92, 0x2d, 0x85, 0x15, 0xe4, 0x77, 0xdd, 0x85); + + +#undef INTERFACE +#define INTERFACE ID3DXMatrixStack + +DECLARE_INTERFACE_(ID3DXMatrixStack, IUnknown) +{ + // + // IUnknown methods + // + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + // + // ID3DXMatrixStack methods + // + + // Pops the top of the stack, returns the current top + // *after* popping the top. + STDMETHOD(Pop)(THIS) PURE; + + // Pushes the stack by one, duplicating the current matrix. + STDMETHOD(Push)(THIS) PURE; + + // Loads identity in the current matrix. + STDMETHOD(LoadIdentity)(THIS) PURE; + + // Loads the given matrix into the current matrix + STDMETHOD(LoadMatrix)(THIS_ CONST D3DXMATRIX* pM ) PURE; + + // Right-Multiplies the given matrix to the current matrix. + // (transformation is about the current world origin) + STDMETHOD(MultMatrix)(THIS_ CONST D3DXMATRIX* pM ) PURE; + + // Left-Multiplies the given matrix to the current matrix + // (transformation is about the local origin of the object) + STDMETHOD(MultMatrixLocal)(THIS_ CONST D3DXMATRIX* pM ) PURE; + + // Right multiply the current matrix with the computed rotation + // matrix, counterclockwise about the given axis with the given angle. + // (rotation is about the current world origin) + STDMETHOD(RotateAxis) + (THIS_ CONST D3DXVECTOR3* pV, FLOAT Angle) PURE; + + // Left multiply the current matrix with the computed rotation + // matrix, counterclockwise about the given axis with the given angle. + // (rotation is about the local origin of the object) + STDMETHOD(RotateAxisLocal) + (THIS_ CONST D3DXVECTOR3* pV, FLOAT Angle) PURE; + + // Right multiply the current matrix with the computed rotation + // matrix. All angles are counterclockwise. (rotation is about the + // current world origin) + + // The rotation is composed of a yaw around the Y axis, a pitch around + // the X axis, and a roll around the Z axis. + STDMETHOD(RotateYawPitchRoll) + (THIS_ FLOAT Yaw, FLOAT Pitch, FLOAT Roll) PURE; + + // Left multiply the current matrix with the computed rotation + // matrix. All angles are counterclockwise. (rotation is about the + // local origin of the object) + + // The rotation is composed of a yaw around the Y axis, a pitch around + // the X axis, and a roll around the Z axis. + STDMETHOD(RotateYawPitchRollLocal) + (THIS_ FLOAT Yaw, FLOAT Pitch, FLOAT Roll) PURE; + + // Right multiply the current matrix with the computed scale + // matrix. (transformation is about the current world origin) + STDMETHOD(Scale)(THIS_ FLOAT x, FLOAT y, FLOAT z) PURE; + + // Left multiply the current matrix with the computed scale + // matrix. (transformation is about the local origin of the object) + STDMETHOD(ScaleLocal)(THIS_ FLOAT x, FLOAT y, FLOAT z) PURE; + + // Right multiply the current matrix with the computed translation + // matrix. (transformation is about the current world origin) + STDMETHOD(Translate)(THIS_ FLOAT x, FLOAT y, FLOAT z ) PURE; + + // Left multiply the current matrix with the computed translation + // matrix. (transformation is about the local origin of the object) + STDMETHOD(TranslateLocal)(THIS_ FLOAT x, FLOAT y, FLOAT z) PURE; + + // Obtain the current matrix at the top of the stack + STDMETHOD_(D3DXMATRIX*, GetTop)(THIS) PURE; +}; + +#ifdef __cplusplus +extern "C" { +#endif + +HRESULT WINAPI + D3DXCreateMatrixStack( + UINT Flags, + LPD3DXMATRIXSTACK* ppStack); + +#ifdef __cplusplus +} +#endif + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +//============================================================================ +// +// Basic Spherical Harmonic math routines +// +//============================================================================ + +#define D3DXSH_MINORDER 2 +#define D3DXSH_MAXORDER 6 + +//============================================================================ +// +// D3DXSHEvalDirection: +// -------------------- +// Evaluates the Spherical Harmonic basis functions +// +// Parameters: +// pOut +// Output SH coefficients - basis function Ylm is stored at l*l + m+l +// This is the pointer that is returned. +// Order +// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 +// pDir +// Direction to evaluate in - assumed to be normalized +// +//============================================================================ + +FLOAT* WINAPI D3DXSHEvalDirection + ( FLOAT *pOut, UINT Order, CONST D3DXVECTOR3 *pDir ); + +//============================================================================ +// +// D3DXSHRotate: +// -------------------- +// Rotates SH vector by a rotation matrix +// +// Parameters: +// pOut +// Output SH coefficients - basis function Ylm is stored at l*l + m+l +// This is the pointer that is returned (should not alias with pIn.) +// Order +// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 +// pMatrix +// Matrix used for rotation - rotation sub matrix should be orthogonal +// and have a unit determinant. +// pIn +// Input SH coeffs (rotated), incorect results if this is also output. +// +//============================================================================ + +FLOAT* WINAPI D3DXSHRotate + ( __out_ecount(Order*Order) FLOAT *pOut, UINT Order, CONST D3DXMATRIX *pMatrix, CONST FLOAT *pIn ); + +//============================================================================ +// +// D3DXSHRotateZ: +// -------------------- +// Rotates the SH vector in the Z axis by an angle +// +// Parameters: +// pOut +// Output SH coefficients - basis function Ylm is stored at l*l + m+l +// This is the pointer that is returned (should not alias with pIn.) +// Order +// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 +// Angle +// Angle in radians to rotate around the Z axis. +// pIn +// Input SH coeffs (rotated), incorect results if this is also output. +// +//============================================================================ + + +FLOAT* WINAPI D3DXSHRotateZ + ( FLOAT *pOut, UINT Order, FLOAT Angle, CONST FLOAT *pIn ); + +//============================================================================ +// +// D3DXSHAdd: +// -------------------- +// Adds two SH vectors, pOut[i] = pA[i] + pB[i]; +// +// Parameters: +// pOut +// Output SH coefficients - basis function Ylm is stored at l*l + m+l +// This is the pointer that is returned. +// Order +// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 +// pA +// Input SH coeffs. +// pB +// Input SH coeffs (second vector.) +// +//============================================================================ + +FLOAT* WINAPI D3DXSHAdd + ( __out_ecount(Order*Order) FLOAT *pOut, UINT Order, CONST FLOAT *pA, CONST FLOAT *pB ); + +//============================================================================ +// +// D3DXSHScale: +// -------------------- +// Adds two SH vectors, pOut[i] = pA[i]*Scale; +// +// Parameters: +// pOut +// Output SH coefficients - basis function Ylm is stored at l*l + m+l +// This is the pointer that is returned. +// Order +// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 +// pIn +// Input SH coeffs. +// Scale +// Scale factor. +// +//============================================================================ + +FLOAT* WINAPI D3DXSHScale + ( __out_ecount(Order*Order) FLOAT *pOut, UINT Order, CONST FLOAT *pIn, CONST FLOAT Scale ); + +//============================================================================ +// +// D3DXSHDot: +// -------------------- +// Computes the dot product of two SH vectors +// +// Parameters: +// Order +// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 +// pA +// Input SH coeffs. +// pB +// Second set of input SH coeffs. +// +//============================================================================ + +FLOAT WINAPI D3DXSHDot + ( UINT Order, CONST FLOAT *pA, CONST FLOAT *pB ); + +//============================================================================ +// +// D3DXSHMultiply[O]: +// -------------------- +// Computes the product of two functions represented using SH (f and g), where: +// pOut[i] = int(y_i(s) * f(s) * g(s)), where y_i(s) is the ith SH basis +// function, f(s) and g(s) are SH functions (sum_i(y_i(s)*c_i)). The order O +// determines the lengths of the arrays, where there should always be O^2 +// coefficients. In general the product of two SH functions of order O generates +// and SH function of order 2*O - 1, but we truncate the result. This means +// that the product commutes (f*g == g*f) but doesn't associate +// (f*(g*h) != (f*g)*h. +// +// Parameters: +// pOut +// Output SH coefficients - basis function Ylm is stored at l*l + m+l +// This is the pointer that is returned. +// pF +// Input SH coeffs for first function. +// pG +// Second set of input SH coeffs. +// +//============================================================================ + +__out_ecount(4) FLOAT* WINAPI D3DXSHMultiply2(__out_ecount(4) FLOAT *pOut,__in_ecount(4) CONST FLOAT *pF,__in_ecount(4) CONST FLOAT *pG); +__out_ecount(9) FLOAT* WINAPI D3DXSHMultiply3(__out_ecount(9) FLOAT *pOut,__in_ecount(9) CONST FLOAT *pF,__in_ecount(9) CONST FLOAT *pG); +__out_ecount(16) FLOAT* WINAPI D3DXSHMultiply4(__out_ecount(16) FLOAT *pOut,__in_ecount(16) CONST FLOAT *pF,__in_ecount(16) CONST FLOAT *pG); +__out_ecount(25) FLOAT* WINAPI D3DXSHMultiply5(__out_ecount(25) FLOAT *pOut,__in_ecount(25) CONST FLOAT *pF,__in_ecount(25) CONST FLOAT *pG); +__out_ecount(36) FLOAT* WINAPI D3DXSHMultiply6(__out_ecount(36) FLOAT *pOut,__in_ecount(36) CONST FLOAT *pF,__in_ecount(36) CONST FLOAT *pG); + + +//============================================================================ +// +// Basic Spherical Harmonic lighting routines +// +//============================================================================ + +//============================================================================ +// +// D3DXSHEvalDirectionalLight: +// -------------------- +// Evaluates a directional light and returns spectral SH data. The output +// vector is computed so that if the intensity of R/G/B is unit the resulting +// exit radiance of a point directly under the light on a diffuse object with +// an albedo of 1 would be 1.0. This will compute 3 spectral samples, pROut +// has to be specified, while pGout and pBout are optional. +// +// Parameters: +// Order +// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 +// pDir +// Direction light is coming from (assumed to be normalized.) +// RIntensity +// Red intensity of light. +// GIntensity +// Green intensity of light. +// BIntensity +// Blue intensity of light. +// pROut +// Output SH vector for Red. +// pGOut +// Output SH vector for Green (optional.) +// pBOut +// Output SH vector for Blue (optional.) +// +//============================================================================ + +HRESULT WINAPI D3DXSHEvalDirectionalLight + ( UINT Order, CONST D3DXVECTOR3 *pDir, + FLOAT RIntensity, FLOAT GIntensity, FLOAT BIntensity, + __out_ecount_opt(Order*Order) FLOAT *pROut, + __out_ecount_opt(Order*Order) FLOAT *pGOut, + __out_ecount_opt(Order*Order) FLOAT *pBOut ); + +//============================================================================ +// +// D3DXSHEvalSphericalLight: +// -------------------- +// Evaluates a spherical light and returns spectral SH data. There is no +// normalization of the intensity of the light like there is for directional +// lights, care has to be taken when specifiying the intensities. This will +// compute 3 spectral samples, pROut has to be specified, while pGout and +// pBout are optional. +// +// Parameters: +// Order +// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 +// pPos +// Position of light - reciever is assumed to be at the origin. +// Radius +// Radius of the spherical light source. +// RIntensity +// Red intensity of light. +// GIntensity +// Green intensity of light. +// BIntensity +// Blue intensity of light. +// pROut +// Output SH vector for Red. +// pGOut +// Output SH vector for Green (optional.) +// pBOut +// Output SH vector for Blue (optional.) +// +//============================================================================ + +HRESULT WINAPI D3DXSHEvalSphericalLight + ( UINT Order, CONST D3DXVECTOR3 *pPos, FLOAT Radius, + FLOAT RIntensity, FLOAT GIntensity, FLOAT BIntensity, + __out_ecount_opt(Order*Order) FLOAT *pROut, + __out_ecount_opt(Order*Order) FLOAT *pGOut, + __out_ecount_opt(Order*Order) FLOAT *pBOut ); + +//============================================================================ +// +// D3DXSHEvalConeLight: +// -------------------- +// Evaluates a light that is a cone of constant intensity and returns spectral +// SH data. The output vector is computed so that if the intensity of R/G/B is +// unit the resulting exit radiance of a point directly under the light oriented +// in the cone direction on a diffuse object with an albedo of 1 would be 1.0. +// This will compute 3 spectral samples, pROut has to be specified, while pGout +// and pBout are optional. +// +// Parameters: +// Order +// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 +// pDir +// Direction light is coming from (assumed to be normalized.) +// Radius +// Radius of cone in radians. +// RIntensity +// Red intensity of light. +// GIntensity +// Green intensity of light. +// BIntensity +// Blue intensity of light. +// pROut +// Output SH vector for Red. +// pGOut +// Output SH vector for Green (optional.) +// pBOut +// Output SH vector for Blue (optional.) +// +//============================================================================ + +HRESULT WINAPI D3DXSHEvalConeLight + ( UINT Order, CONST D3DXVECTOR3 *pDir, FLOAT Radius, + FLOAT RIntensity, FLOAT GIntensity, FLOAT BIntensity, + __out_ecount_opt(Order*Order) FLOAT *pROut, + __out_ecount_opt(Order*Order) FLOAT *pGOut, + __out_ecount_opt(Order*Order) FLOAT *pBOut ); + +//============================================================================ +// +// D3DXSHEvalHemisphereLight: +// -------------------- +// Evaluates a light that is a linear interpolant between two colors over the +// sphere. The interpolant is linear along the axis of the two points, not +// over the surface of the sphere (ie: if the axis was (0,0,1) it is linear in +// Z, not in the azimuthal angle.) The resulting spherical lighting function +// is normalized so that a point on a perfectly diffuse surface with no +// shadowing and a normal pointed in the direction pDir would result in exit +// radiance with a value of 1 if the top color was white and the bottom color +// was black. This is a very simple model where Top represents the intensity +// of the "sky" and Bottom represents the intensity of the "ground". +// +// Parameters: +// Order +// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 +// pDir +// Axis of the hemisphere. +// Top +// Color of the upper hemisphere. +// Bottom +// Color of the lower hemisphere. +// pROut +// Output SH vector for Red. +// pGOut +// Output SH vector for Green +// pBOut +// Output SH vector for Blue +// +//============================================================================ + +HRESULT WINAPI D3DXSHEvalHemisphereLight + ( UINT Order, CONST D3DXVECTOR3 *pDir, D3DXCOLOR Top, D3DXCOLOR Bottom, + __out_ecount_opt(Order*Order) FLOAT *pROut, + __out_ecount_opt(Order*Order) FLOAT *pGOut, + __out_ecount_opt(Order*Order) FLOAT *pBOut ); + +// Math intersection functions + +BOOL WINAPI D3DXIntersectTri +( + CONST D3DXVECTOR3 *p0, // Triangle vertex 0 position + CONST D3DXVECTOR3 *p1, // Triangle vertex 1 position + CONST D3DXVECTOR3 *p2, // Triangle vertex 2 position + CONST D3DXVECTOR3 *pRayPos, // Ray origin + CONST D3DXVECTOR3 *pRayDir, // Ray direction + FLOAT *pU, // Barycentric Hit Coordinates + FLOAT *pV, // Barycentric Hit Coordinates + FLOAT *pDist); // Ray-Intersection Parameter Distance + +BOOL WINAPI + D3DXSphereBoundProbe( + CONST D3DXVECTOR3 *pCenter, + FLOAT Radius, + CONST D3DXVECTOR3 *pRayPosition, + CONST D3DXVECTOR3 *pRayDirection); + +BOOL WINAPI + D3DXBoxBoundProbe( + CONST D3DXVECTOR3 *pMin, + CONST D3DXVECTOR3 *pMax, + CONST D3DXVECTOR3 *pRayPosition, + CONST D3DXVECTOR3 *pRayDirection); + +HRESULT WINAPI + D3DXComputeBoundingSphere( + CONST D3DXVECTOR3 *pFirstPosition, // pointer to first position + DWORD NumVertices, + DWORD dwStride, // count in bytes to subsequent position vectors + D3DXVECTOR3 *pCenter, + FLOAT *pRadius); + +HRESULT WINAPI + D3DXComputeBoundingBox( + CONST D3DXVECTOR3 *pFirstPosition, // pointer to first position + DWORD NumVertices, + DWORD dwStride, // count in bytes to subsequent position vectors + D3DXVECTOR3 *pMin, + D3DXVECTOR3 *pMax); + + +/////////////////////////////////////////////////////////////////////////// +// CPU Optimization: +/////////////////////////////////////////////////////////////////////////// + +//------------------------------------------------------------------------- +// D3DX_CPU_OPTIMIZATION flags: +// ---------------------------- +// D3DX_NOT_OPTIMIZED Use Intel Pentium optimizations +// D3DX_3DNOW_OPTIMIZED Use AMD 3DNow optimizations +// D3DX_SSE_OPTIMIZED Use Intel Pentium III SSE optimizations +// D3DX_SSE2_OPTIMIZED Use Intel Pentium IV SSE2 optimizations +//------------------------------------------------------------------------- + + +typedef enum _D3DX_CPU_OPTIMIZATION +{ + D3DX_NOT_OPTIMIZED = 0, + D3DX_3DNOW_OPTIMIZED, + D3DX_SSE2_OPTIMIZED, + D3DX_SSE_OPTIMIZED +} D3DX_CPU_OPTIMIZATION; + + +//------------------------------------------------------------------------- +// D3DXCpuOptimizations: +// --------------------- +// Enables or disables CPU optimizations. Returns the type of CPU, which +// was detected, and for which optimizations exist. +// +// Parameters: +// Enable +// TRUE to enable CPU optimizations. FALSE to disable. +//------------------------------------------------------------------------- + +D3DX_CPU_OPTIMIZATION WINAPI + D3DXCpuOptimizations(BOOL Enable); + +#ifdef __cplusplus +} +#endif + + +#include "d3dx10math.inl" + +#if _MSC_VER >= 1200 +#pragma warning(pop) +#else +#pragma warning(default:4201) +#endif + +#endif // __D3DX9MATH_H__ + diff --git a/gfx/include/dxsdk/d3dx10math.inl b/gfx/include/dxsdk/d3dx10math.inl new file mode 100644 index 0000000000..56f11638ef --- /dev/null +++ b/gfx/include/dxsdk/d3dx10math.inl @@ -0,0 +1,2228 @@ +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) Microsoft Corporation. All Rights Reserved. +// +// File: d3dx10math.inl +// Content: D3DX10 math inline functions +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef __D3DXMATH_INL__ +#define __D3DXMATH_INL__ + + +//=========================================================================== +// +// Inline Class Methods +// +//=========================================================================== + +#ifdef __cplusplus + +//-------------------------- +// Float16 +//-------------------------- + +D3DX10INLINE +D3DXFLOAT16::D3DXFLOAT16( FLOAT f ) +{ + D3DXFloat32To16Array(this, &f, 1); +} + +D3DX10INLINE +D3DXFLOAT16::D3DXFLOAT16( CONST D3DXFLOAT16& f ) +{ + value = f.value; +} + +// casting +D3DX10INLINE +D3DXFLOAT16::operator FLOAT () +{ + FLOAT f; + D3DXFloat16To32Array(&f, this, 1); + return f; +} + +// binary operators +D3DX10INLINE BOOL +D3DXFLOAT16::operator == ( CONST D3DXFLOAT16& f ) const +{ + // At least one is NaN + if(((value & D3DX_16F_EXP_MASK) == D3DX_16F_EXP_MASK && (value & D3DX_16F_FRAC_MASK)) + || ((f.value & D3DX_16F_EXP_MASK) == D3DX_16F_EXP_MASK && (f.value & D3DX_16F_FRAC_MASK))) + return false; + // +/- Zero + else if((value & ~D3DX_16F_SIGN_MASK) == 0 && (f.value & ~D3DX_16F_SIGN_MASK) == 0) + return true; + else + return value == f.value; +} + +D3DX10INLINE BOOL +D3DXFLOAT16::operator != ( CONST D3DXFLOAT16& f ) const +{ + // At least one is NaN + if(((value & D3DX_16F_EXP_MASK) == D3DX_16F_EXP_MASK && (value & D3DX_16F_FRAC_MASK)) + || ((f.value & D3DX_16F_EXP_MASK) == D3DX_16F_EXP_MASK && (f.value & D3DX_16F_FRAC_MASK))) + return true; + // +/- Zero + else if((value & ~D3DX_16F_SIGN_MASK) == 0 && (f.value & ~D3DX_16F_SIGN_MASK) == 0) + return false; + else + return value != f.value; +} + + +//-------------------------- +// 2D Vector +//-------------------------- + +D3DX10INLINE +D3DXVECTOR2::D3DXVECTOR2( CONST FLOAT *pf ) +{ +#ifdef D3DX10_DEBUG + if(!pf) + return; +#endif + + x = pf[0]; + y = pf[1]; +} + +D3DX10INLINE +D3DXVECTOR2::D3DXVECTOR2( CONST D3DXFLOAT16 *pf ) +{ +#ifdef D3DX10_DEBUG + if(!pf) + return; +#endif + + D3DXFloat16To32Array(&x, pf, 2); +} + +D3DX10INLINE +D3DXVECTOR2::D3DXVECTOR2( FLOAT fx, FLOAT fy ) +{ + x = fx; + y = fy; +} + + +// casting +D3DX10INLINE +D3DXVECTOR2::operator FLOAT* () +{ + return (FLOAT *) &x; +} + +D3DX10INLINE +D3DXVECTOR2::operator CONST FLOAT* () const +{ + return (CONST FLOAT *) &x; +} + + +// assignment operators +D3DX10INLINE D3DXVECTOR2& +D3DXVECTOR2::operator += ( CONST D3DXVECTOR2& v ) +{ + x += v.x; + y += v.y; + return *this; +} + +D3DX10INLINE D3DXVECTOR2& +D3DXVECTOR2::operator -= ( CONST D3DXVECTOR2& v ) +{ + x -= v.x; + y -= v.y; + return *this; +} + +D3DX10INLINE D3DXVECTOR2& +D3DXVECTOR2::operator *= ( FLOAT f ) +{ + x *= f; + y *= f; + return *this; +} + +D3DX10INLINE D3DXVECTOR2& +D3DXVECTOR2::operator /= ( FLOAT f ) +{ + FLOAT fInv = 1.0f / f; + x *= fInv; + y *= fInv; + return *this; +} + + +// unary operators +D3DX10INLINE D3DXVECTOR2 +D3DXVECTOR2::operator + () const +{ + return *this; +} + +D3DX10INLINE D3DXVECTOR2 +D3DXVECTOR2::operator - () const +{ + return D3DXVECTOR2(-x, -y); +} + + +// binary operators +D3DX10INLINE D3DXVECTOR2 +D3DXVECTOR2::operator + ( CONST D3DXVECTOR2& v ) const +{ + return D3DXVECTOR2(x + v.x, y + v.y); +} + +D3DX10INLINE D3DXVECTOR2 +D3DXVECTOR2::operator - ( CONST D3DXVECTOR2& v ) const +{ + return D3DXVECTOR2(x - v.x, y - v.y); +} + +D3DX10INLINE D3DXVECTOR2 +D3DXVECTOR2::operator * ( FLOAT f ) const +{ + return D3DXVECTOR2(x * f, y * f); +} + +D3DX10INLINE D3DXVECTOR2 +D3DXVECTOR2::operator / ( FLOAT f ) const +{ + FLOAT fInv = 1.0f / f; + return D3DXVECTOR2(x * fInv, y * fInv); +} + +D3DX10INLINE D3DXVECTOR2 +operator * ( FLOAT f, CONST D3DXVECTOR2& v ) +{ + return D3DXVECTOR2(f * v.x, f * v.y); +} + +D3DX10INLINE BOOL +D3DXVECTOR2::operator == ( CONST D3DXVECTOR2& v ) const +{ + return x == v.x && y == v.y; +} + +D3DX10INLINE BOOL +D3DXVECTOR2::operator != ( CONST D3DXVECTOR2& v ) const +{ + return x != v.x || y != v.y; +} + + + +//-------------------------- +// 2D Vector (16 bit) +//-------------------------- + +D3DX10INLINE +D3DXVECTOR2_16F::D3DXVECTOR2_16F( CONST FLOAT *pf ) +{ +#ifdef D3DX10_DEBUG + if(!pf) + return; +#endif + + D3DXFloat32To16Array(&x, pf, 2); +} + +D3DX10INLINE +D3DXVECTOR2_16F::D3DXVECTOR2_16F( CONST D3DXFLOAT16 *pf ) +{ +#ifdef D3DX10_DEBUG + if(!pf) + return; +#endif + + *((UINT *) &x) = *((UINT *) &pf[0]); +} + +D3DX10INLINE +D3DXVECTOR2_16F::D3DXVECTOR2_16F( CONST D3DXFLOAT16 &fx, CONST D3DXFLOAT16 &fy ) +{ + x = fx; + y = fy; +} + + +// casting +D3DX10INLINE +D3DXVECTOR2_16F::operator D3DXFLOAT16* () +{ + return (D3DXFLOAT16*) &x; +} + +D3DX10INLINE +D3DXVECTOR2_16F::operator CONST D3DXFLOAT16* () const +{ + return (CONST D3DXFLOAT16*) &x; +} + + +// binary operators +D3DX10INLINE BOOL +D3DXVECTOR2_16F::operator == ( CONST D3DXVECTOR2_16F &v ) const +{ + return x == v.x && y == v.y; +} + +D3DX10INLINE BOOL +D3DXVECTOR2_16F::operator != ( CONST D3DXVECTOR2_16F &v ) const +{ + return x != v.x || y != v.y; +} + + +//-------------------------- +// 3D Vector +//-------------------------- +D3DX10INLINE +D3DXVECTOR3::D3DXVECTOR3( CONST FLOAT *pf ) +{ +#ifdef D3DX10_DEBUG + if(!pf) + return; +#endif + + x = pf[0]; + y = pf[1]; + z = pf[2]; +} + +D3DX10INLINE +D3DXVECTOR3::D3DXVECTOR3( CONST D3DVECTOR& v ) +{ + x = v.x; + y = v.y; + z = v.z; +} + +D3DX10INLINE +D3DXVECTOR3::D3DXVECTOR3( CONST D3DXFLOAT16 *pf ) +{ +#ifdef D3DX10_DEBUG + if(!pf) + return; +#endif + + D3DXFloat16To32Array(&x, pf, 3); +} + +D3DX10INLINE +D3DXVECTOR3::D3DXVECTOR3( FLOAT fx, FLOAT fy, FLOAT fz ) +{ + x = fx; + y = fy; + z = fz; +} + + +// casting +D3DX10INLINE +D3DXVECTOR3::operator FLOAT* () +{ + return (FLOAT *) &x; +} + +D3DX10INLINE +D3DXVECTOR3::operator CONST FLOAT* () const +{ + return (CONST FLOAT *) &x; +} + + +// assignment operators +D3DX10INLINE D3DXVECTOR3& +D3DXVECTOR3::operator += ( CONST D3DXVECTOR3& v ) +{ + x += v.x; + y += v.y; + z += v.z; + return *this; +} + +D3DX10INLINE D3DXVECTOR3& +D3DXVECTOR3::operator -= ( CONST D3DXVECTOR3& v ) +{ + x -= v.x; + y -= v.y; + z -= v.z; + return *this; +} + +D3DX10INLINE D3DXVECTOR3& +D3DXVECTOR3::operator *= ( FLOAT f ) +{ + x *= f; + y *= f; + z *= f; + return *this; +} + +D3DX10INLINE D3DXVECTOR3& +D3DXVECTOR3::operator /= ( FLOAT f ) +{ + FLOAT fInv = 1.0f / f; + x *= fInv; + y *= fInv; + z *= fInv; + return *this; +} + + +// unary operators +D3DX10INLINE D3DXVECTOR3 +D3DXVECTOR3::operator + () const +{ + return *this; +} + +D3DX10INLINE D3DXVECTOR3 +D3DXVECTOR3::operator - () const +{ + return D3DXVECTOR3(-x, -y, -z); +} + + +// binary operators +D3DX10INLINE D3DXVECTOR3 +D3DXVECTOR3::operator + ( CONST D3DXVECTOR3& v ) const +{ + return D3DXVECTOR3(x + v.x, y + v.y, z + v.z); +} + +D3DX10INLINE D3DXVECTOR3 +D3DXVECTOR3::operator - ( CONST D3DXVECTOR3& v ) const +{ + return D3DXVECTOR3(x - v.x, y - v.y, z - v.z); +} + +D3DX10INLINE D3DXVECTOR3 +D3DXVECTOR3::operator * ( FLOAT f ) const +{ + return D3DXVECTOR3(x * f, y * f, z * f); +} + +D3DX10INLINE D3DXVECTOR3 +D3DXVECTOR3::operator / ( FLOAT f ) const +{ + FLOAT fInv = 1.0f / f; + return D3DXVECTOR3(x * fInv, y * fInv, z * fInv); +} + + +D3DX10INLINE D3DXVECTOR3 +operator * ( FLOAT f, CONST struct D3DXVECTOR3& v ) +{ + return D3DXVECTOR3(f * v.x, f * v.y, f * v.z); +} + + +D3DX10INLINE BOOL +D3DXVECTOR3::operator == ( CONST D3DXVECTOR3& v ) const +{ + return x == v.x && y == v.y && z == v.z; +} + +D3DX10INLINE BOOL +D3DXVECTOR3::operator != ( CONST D3DXVECTOR3& v ) const +{ + return x != v.x || y != v.y || z != v.z; +} + + + +//-------------------------- +// 3D Vector (16 bit) +//-------------------------- + +D3DX10INLINE +D3DXVECTOR3_16F::D3DXVECTOR3_16F( CONST FLOAT *pf ) +{ +#ifdef D3DX10_DEBUG + if(!pf) + return; +#endif + + D3DXFloat32To16Array(&x, pf, 3); +} + +D3DX10INLINE +D3DXVECTOR3_16F::D3DXVECTOR3_16F( CONST D3DVECTOR& v ) +{ + D3DXFloat32To16Array(&x, &v.x, 1); + D3DXFloat32To16Array(&y, &v.y, 1); + D3DXFloat32To16Array(&z, &v.z, 1); +} + +D3DX10INLINE +D3DXVECTOR3_16F::D3DXVECTOR3_16F( CONST D3DXFLOAT16 *pf ) +{ +#ifdef D3DX10_DEBUG + if(!pf) + return; +#endif + + *((UINT *) &x) = *((UINT *) &pf[0]); + *((WORD *) &z) = *((WORD *) &pf[2]); +} + +D3DX10INLINE +D3DXVECTOR3_16F::D3DXVECTOR3_16F( CONST D3DXFLOAT16 &fx, CONST D3DXFLOAT16 &fy, CONST D3DXFLOAT16 &fz ) +{ + x = fx; + y = fy; + z = fz; +} + + +// casting +D3DX10INLINE +D3DXVECTOR3_16F::operator D3DXFLOAT16* () +{ + return (D3DXFLOAT16*) &x; +} + +D3DX10INLINE +D3DXVECTOR3_16F::operator CONST D3DXFLOAT16* () const +{ + return (CONST D3DXFLOAT16*) &x; +} + + +// binary operators +D3DX10INLINE BOOL +D3DXVECTOR3_16F::operator == ( CONST D3DXVECTOR3_16F &v ) const +{ + return x == v.x && y == v.y && z == v.z; +} + +D3DX10INLINE BOOL +D3DXVECTOR3_16F::operator != ( CONST D3DXVECTOR3_16F &v ) const +{ + return x != v.x || y != v.y || z != v.z; +} + + +//-------------------------- +// 4D Vector +//-------------------------- +D3DX10INLINE +D3DXVECTOR4::D3DXVECTOR4( CONST FLOAT *pf ) +{ +#ifdef D3DX10_DEBUG + if(!pf) + return; +#endif + + x = pf[0]; + y = pf[1]; + z = pf[2]; + w = pf[3]; +} + +D3DX10INLINE +D3DXVECTOR4::D3DXVECTOR4( CONST D3DXFLOAT16 *pf ) +{ +#ifdef D3DX10_DEBUG + if(!pf) + return; +#endif + + D3DXFloat16To32Array(&x, pf, 4); +} + +D3DX10INLINE +D3DXVECTOR4::D3DXVECTOR4( CONST D3DVECTOR& v, FLOAT f ) +{ + x = v.x; + y = v.y; + z = v.z; + w = f; +} + +D3DX10INLINE +D3DXVECTOR4::D3DXVECTOR4( FLOAT fx, FLOAT fy, FLOAT fz, FLOAT fw ) +{ + x = fx; + y = fy; + z = fz; + w = fw; +} + + +// casting +D3DX10INLINE +D3DXVECTOR4::operator FLOAT* () +{ + return (FLOAT *) &x; +} + +D3DX10INLINE +D3DXVECTOR4::operator CONST FLOAT* () const +{ + return (CONST FLOAT *) &x; +} + + +// assignment operators +D3DX10INLINE D3DXVECTOR4& +D3DXVECTOR4::operator += ( CONST D3DXVECTOR4& v ) +{ + x += v.x; + y += v.y; + z += v.z; + w += v.w; + return *this; +} + +D3DX10INLINE D3DXVECTOR4& +D3DXVECTOR4::operator -= ( CONST D3DXVECTOR4& v ) +{ + x -= v.x; + y -= v.y; + z -= v.z; + w -= v.w; + return *this; +} + +D3DX10INLINE D3DXVECTOR4& +D3DXVECTOR4::operator *= ( FLOAT f ) +{ + x *= f; + y *= f; + z *= f; + w *= f; + return *this; +} + +D3DX10INLINE D3DXVECTOR4& +D3DXVECTOR4::operator /= ( FLOAT f ) +{ + FLOAT fInv = 1.0f / f; + x *= fInv; + y *= fInv; + z *= fInv; + w *= fInv; + return *this; +} + + +// unary operators +D3DX10INLINE D3DXVECTOR4 +D3DXVECTOR4::operator + () const +{ + return *this; +} + +D3DX10INLINE D3DXVECTOR4 +D3DXVECTOR4::operator - () const +{ + return D3DXVECTOR4(-x, -y, -z, -w); +} + + +// binary operators +D3DX10INLINE D3DXVECTOR4 +D3DXVECTOR4::operator + ( CONST D3DXVECTOR4& v ) const +{ + return D3DXVECTOR4(x + v.x, y + v.y, z + v.z, w + v.w); +} + +D3DX10INLINE D3DXVECTOR4 +D3DXVECTOR4::operator - ( CONST D3DXVECTOR4& v ) const +{ + return D3DXVECTOR4(x - v.x, y - v.y, z - v.z, w - v.w); +} + +D3DX10INLINE D3DXVECTOR4 +D3DXVECTOR4::operator * ( FLOAT f ) const +{ + return D3DXVECTOR4(x * f, y * f, z * f, w * f); +} + +D3DX10INLINE D3DXVECTOR4 +D3DXVECTOR4::operator / ( FLOAT f ) const +{ + FLOAT fInv = 1.0f / f; + return D3DXVECTOR4(x * fInv, y * fInv, z * fInv, w * fInv); +} + +D3DX10INLINE D3DXVECTOR4 +operator * ( FLOAT f, CONST D3DXVECTOR4& v ) +{ + return D3DXVECTOR4(f * v.x, f * v.y, f * v.z, f * v.w); +} + + +D3DX10INLINE BOOL +D3DXVECTOR4::operator == ( CONST D3DXVECTOR4& v ) const +{ + return x == v.x && y == v.y && z == v.z && w == v.w; +} + +D3DX10INLINE BOOL +D3DXVECTOR4::operator != ( CONST D3DXVECTOR4& v ) const +{ + return x != v.x || y != v.y || z != v.z || w != v.w; +} + + + +//-------------------------- +// 4D Vector (16 bit) +//-------------------------- + +D3DX10INLINE +D3DXVECTOR4_16F::D3DXVECTOR4_16F( CONST FLOAT *pf ) +{ +#ifdef D3DX10_DEBUG + if(!pf) + return; +#endif + + D3DXFloat32To16Array(&x, pf, 4); +} + +D3DX10INLINE +D3DXVECTOR4_16F::D3DXVECTOR4_16F( CONST D3DXFLOAT16 *pf ) +{ +#ifdef D3DX10_DEBUG + if(!pf) + return; +#endif + + *((UINT *) &x) = *((UINT *) &pf[0]); + *((UINT *) &z) = *((UINT *) &pf[2]); +} + +D3DX10INLINE +D3DXVECTOR4_16F::D3DXVECTOR4_16F( CONST D3DXVECTOR3_16F& v, CONST D3DXFLOAT16& f ) +{ + x = v.x; + y = v.y; + z = v.z; + w = f; +} + +D3DX10INLINE +D3DXVECTOR4_16F::D3DXVECTOR4_16F( CONST D3DXFLOAT16 &fx, CONST D3DXFLOAT16 &fy, CONST D3DXFLOAT16 &fz, CONST D3DXFLOAT16 &fw ) +{ + x = fx; + y = fy; + z = fz; + w = fw; +} + + +// casting +D3DX10INLINE +D3DXVECTOR4_16F::operator D3DXFLOAT16* () +{ + return (D3DXFLOAT16*) &x; +} + +D3DX10INLINE +D3DXVECTOR4_16F::operator CONST D3DXFLOAT16* () const +{ + return (CONST D3DXFLOAT16*) &x; +} + + +// binary operators +D3DX10INLINE BOOL +D3DXVECTOR4_16F::operator == ( CONST D3DXVECTOR4_16F &v ) const +{ + return x == v.x && y == v.y && z == v.z && w == v.w; +} + +D3DX10INLINE BOOL +D3DXVECTOR4_16F::operator != ( CONST D3DXVECTOR4_16F &v ) const +{ + return x != v.x || y != v.y || z != v.z || w != v.w; +} + + +//-------------------------- +// Matrix +//-------------------------- +D3DX10INLINE +D3DXMATRIX::D3DXMATRIX( CONST FLOAT* pf ) +{ +#ifdef D3DX10_DEBUG + if(!pf) + return; +#endif + + memcpy(&_11, pf, sizeof(D3DXMATRIX)); +} + +D3DX10INLINE +D3DXMATRIX::D3DXMATRIX( CONST D3DMATRIX& mat ) +{ + memcpy(&_11, &mat, sizeof(D3DXMATRIX)); +} + +D3DX10INLINE +D3DXMATRIX::D3DXMATRIX( CONST D3DXFLOAT16* pf ) +{ +#ifdef D3DX10_DEBUG + if(!pf) + return; +#endif + + D3DXFloat16To32Array(&_11, pf, 16); +} + +D3DX10INLINE +D3DXMATRIX::D3DXMATRIX( FLOAT f11, FLOAT f12, FLOAT f13, FLOAT f14, + FLOAT f21, FLOAT f22, FLOAT f23, FLOAT f24, + FLOAT f31, FLOAT f32, FLOAT f33, FLOAT f34, + FLOAT f41, FLOAT f42, FLOAT f43, FLOAT f44 ) +{ + _11 = f11; _12 = f12; _13 = f13; _14 = f14; + _21 = f21; _22 = f22; _23 = f23; _24 = f24; + _31 = f31; _32 = f32; _33 = f33; _34 = f34; + _41 = f41; _42 = f42; _43 = f43; _44 = f44; +} + + + +// access grants +D3DX10INLINE FLOAT& +D3DXMATRIX::operator () ( UINT iRow, UINT iCol ) +{ + return m[iRow][iCol]; +} + +D3DX10INLINE FLOAT +D3DXMATRIX::operator () ( UINT iRow, UINT iCol ) const +{ + return m[iRow][iCol]; +} + + +// casting operators +D3DX10INLINE +D3DXMATRIX::operator FLOAT* () +{ + return (FLOAT *) &_11; +} + +D3DX10INLINE +D3DXMATRIX::operator CONST FLOAT* () const +{ + return (CONST FLOAT *) &_11; +} + + +// assignment operators +D3DX10INLINE D3DXMATRIX& +D3DXMATRIX::operator *= ( CONST D3DXMATRIX& mat ) +{ + D3DXMatrixMultiply(this, this, &mat); + return *this; +} + +D3DX10INLINE D3DXMATRIX& +D3DXMATRIX::operator += ( CONST D3DXMATRIX& mat ) +{ + _11 += mat._11; _12 += mat._12; _13 += mat._13; _14 += mat._14; + _21 += mat._21; _22 += mat._22; _23 += mat._23; _24 += mat._24; + _31 += mat._31; _32 += mat._32; _33 += mat._33; _34 += mat._34; + _41 += mat._41; _42 += mat._42; _43 += mat._43; _44 += mat._44; + return *this; +} + +D3DX10INLINE D3DXMATRIX& +D3DXMATRIX::operator -= ( CONST D3DXMATRIX& mat ) +{ + _11 -= mat._11; _12 -= mat._12; _13 -= mat._13; _14 -= mat._14; + _21 -= mat._21; _22 -= mat._22; _23 -= mat._23; _24 -= mat._24; + _31 -= mat._31; _32 -= mat._32; _33 -= mat._33; _34 -= mat._34; + _41 -= mat._41; _42 -= mat._42; _43 -= mat._43; _44 -= mat._44; + return *this; +} + +D3DX10INLINE D3DXMATRIX& +D3DXMATRIX::operator *= ( FLOAT f ) +{ + _11 *= f; _12 *= f; _13 *= f; _14 *= f; + _21 *= f; _22 *= f; _23 *= f; _24 *= f; + _31 *= f; _32 *= f; _33 *= f; _34 *= f; + _41 *= f; _42 *= f; _43 *= f; _44 *= f; + return *this; +} + +D3DX10INLINE D3DXMATRIX& +D3DXMATRIX::operator /= ( FLOAT f ) +{ + FLOAT fInv = 1.0f / f; + _11 *= fInv; _12 *= fInv; _13 *= fInv; _14 *= fInv; + _21 *= fInv; _22 *= fInv; _23 *= fInv; _24 *= fInv; + _31 *= fInv; _32 *= fInv; _33 *= fInv; _34 *= fInv; + _41 *= fInv; _42 *= fInv; _43 *= fInv; _44 *= fInv; + return *this; +} + + +// unary operators +D3DX10INLINE D3DXMATRIX +D3DXMATRIX::operator + () const +{ + return *this; +} + +D3DX10INLINE D3DXMATRIX +D3DXMATRIX::operator - () const +{ + return D3DXMATRIX(-_11, -_12, -_13, -_14, + -_21, -_22, -_23, -_24, + -_31, -_32, -_33, -_34, + -_41, -_42, -_43, -_44); +} + + +// binary operators +D3DX10INLINE D3DXMATRIX +D3DXMATRIX::operator * ( CONST D3DXMATRIX& mat ) const +{ + D3DXMATRIX matT; + D3DXMatrixMultiply(&matT, this, &mat); + return matT; +} + +D3DX10INLINE D3DXMATRIX +D3DXMATRIX::operator + ( CONST D3DXMATRIX& mat ) const +{ + return D3DXMATRIX(_11 + mat._11, _12 + mat._12, _13 + mat._13, _14 + mat._14, + _21 + mat._21, _22 + mat._22, _23 + mat._23, _24 + mat._24, + _31 + mat._31, _32 + mat._32, _33 + mat._33, _34 + mat._34, + _41 + mat._41, _42 + mat._42, _43 + mat._43, _44 + mat._44); +} + +D3DX10INLINE D3DXMATRIX +D3DXMATRIX::operator - ( CONST D3DXMATRIX& mat ) const +{ + return D3DXMATRIX(_11 - mat._11, _12 - mat._12, _13 - mat._13, _14 - mat._14, + _21 - mat._21, _22 - mat._22, _23 - mat._23, _24 - mat._24, + _31 - mat._31, _32 - mat._32, _33 - mat._33, _34 - mat._34, + _41 - mat._41, _42 - mat._42, _43 - mat._43, _44 - mat._44); +} + +D3DX10INLINE D3DXMATRIX +D3DXMATRIX::operator * ( FLOAT f ) const +{ + return D3DXMATRIX(_11 * f, _12 * f, _13 * f, _14 * f, + _21 * f, _22 * f, _23 * f, _24 * f, + _31 * f, _32 * f, _33 * f, _34 * f, + _41 * f, _42 * f, _43 * f, _44 * f); +} + +D3DX10INLINE D3DXMATRIX +D3DXMATRIX::operator / ( FLOAT f ) const +{ + FLOAT fInv = 1.0f / f; + return D3DXMATRIX(_11 * fInv, _12 * fInv, _13 * fInv, _14 * fInv, + _21 * fInv, _22 * fInv, _23 * fInv, _24 * fInv, + _31 * fInv, _32 * fInv, _33 * fInv, _34 * fInv, + _41 * fInv, _42 * fInv, _43 * fInv, _44 * fInv); +} + + +D3DX10INLINE D3DXMATRIX +operator * ( FLOAT f, CONST D3DXMATRIX& mat ) +{ + return D3DXMATRIX(f * mat._11, f * mat._12, f * mat._13, f * mat._14, + f * mat._21, f * mat._22, f * mat._23, f * mat._24, + f * mat._31, f * mat._32, f * mat._33, f * mat._34, + f * mat._41, f * mat._42, f * mat._43, f * mat._44); +} + + +D3DX10INLINE BOOL +D3DXMATRIX::operator == ( CONST D3DXMATRIX& mat ) const +{ + return 0 == memcmp(this, &mat, sizeof(D3DXMATRIX)); +} + +D3DX10INLINE BOOL +D3DXMATRIX::operator != ( CONST D3DXMATRIX& mat ) const +{ + return 0 != memcmp(this, &mat, sizeof(D3DXMATRIX)); +} + + + +//-------------------------- +// Aligned Matrices +//-------------------------- + +D3DX10INLINE +_D3DXMATRIXA16::_D3DXMATRIXA16( CONST FLOAT* f ) : + D3DXMATRIX( f ) +{ +} + +D3DX10INLINE +_D3DXMATRIXA16::_D3DXMATRIXA16( CONST D3DMATRIX& m ) : + D3DXMATRIX( m ) +{ +} + +D3DX10INLINE +_D3DXMATRIXA16::_D3DXMATRIXA16( CONST D3DXFLOAT16* f ) : + D3DXMATRIX( f ) +{ +} + +D3DX10INLINE +_D3DXMATRIXA16::_D3DXMATRIXA16( FLOAT _11, FLOAT _12, FLOAT _13, FLOAT _14, + FLOAT _21, FLOAT _22, FLOAT _23, FLOAT _24, + FLOAT _31, FLOAT _32, FLOAT _33, FLOAT _34, + FLOAT _41, FLOAT _42, FLOAT _43, FLOAT _44 ) : + D3DXMATRIX(_11, _12, _13, _14, + _21, _22, _23, _24, + _31, _32, _33, _34, + _41, _42, _43, _44) +{ +} + +#ifndef SIZE_MAX +#define SIZE_MAX ((SIZE_T)-1) +#endif + +D3DX10INLINE void* +_D3DXMATRIXA16::operator new( size_t s ) +{ + if (s > (SIZE_MAX-16)) + return NULL; + LPBYTE p = ::new BYTE[s + 16]; + if (p) + { + BYTE offset = (BYTE)(16 - ((UINT_PTR)p & 15)); + p += offset; + p[-1] = offset; + } + return p; +} + +D3DX10INLINE void* +_D3DXMATRIXA16::operator new[]( size_t s ) +{ + if (s > (SIZE_MAX-16)) + return NULL; + LPBYTE p = ::new BYTE[s + 16]; + if (p) + { + BYTE offset = (BYTE)(16 - ((UINT_PTR)p & 15)); + p += offset; + p[-1] = offset; + } + return p; +} + +D3DX10INLINE void +_D3DXMATRIXA16::operator delete(void* p) +{ + if(p) + { + BYTE* pb = static_cast(p); + pb -= pb[-1]; + ::delete [] pb; + } +} + +D3DX10INLINE void +_D3DXMATRIXA16::operator delete[](void* p) +{ + if(p) + { + BYTE* pb = static_cast(p); + pb -= pb[-1]; + ::delete [] pb; + } +} + +D3DX10INLINE _D3DXMATRIXA16& +_D3DXMATRIXA16::operator=(CONST D3DXMATRIX& rhs) +{ + memcpy(&_11, &rhs, sizeof(D3DXMATRIX)); + return *this; +} + + +//-------------------------- +// Quaternion +//-------------------------- + +D3DX10INLINE +D3DXQUATERNION::D3DXQUATERNION( CONST FLOAT* pf ) +{ +#ifdef D3DX10_DEBUG + if(!pf) + return; +#endif + + x = pf[0]; + y = pf[1]; + z = pf[2]; + w = pf[3]; +} + +D3DX10INLINE +D3DXQUATERNION::D3DXQUATERNION( CONST D3DXFLOAT16* pf ) +{ +#ifdef D3DX10_DEBUG + if(!pf) + return; +#endif + + D3DXFloat16To32Array(&x, pf, 4); +} + +D3DX10INLINE +D3DXQUATERNION::D3DXQUATERNION( FLOAT fx, FLOAT fy, FLOAT fz, FLOAT fw ) +{ + x = fx; + y = fy; + z = fz; + w = fw; +} + + +// casting +D3DX10INLINE +D3DXQUATERNION::operator FLOAT* () +{ + return (FLOAT *) &x; +} + +D3DX10INLINE +D3DXQUATERNION::operator CONST FLOAT* () const +{ + return (CONST FLOAT *) &x; +} + + +// assignment operators +D3DX10INLINE D3DXQUATERNION& +D3DXQUATERNION::operator += ( CONST D3DXQUATERNION& q ) +{ + x += q.x; + y += q.y; + z += q.z; + w += q.w; + return *this; +} + +D3DX10INLINE D3DXQUATERNION& +D3DXQUATERNION::operator -= ( CONST D3DXQUATERNION& q ) +{ + x -= q.x; + y -= q.y; + z -= q.z; + w -= q.w; + return *this; +} + +D3DX10INLINE D3DXQUATERNION& +D3DXQUATERNION::operator *= ( CONST D3DXQUATERNION& q ) +{ + D3DXQuaternionMultiply(this, this, &q); + return *this; +} + +D3DX10INLINE D3DXQUATERNION& +D3DXQUATERNION::operator *= ( FLOAT f ) +{ + x *= f; + y *= f; + z *= f; + w *= f; + return *this; +} + +D3DX10INLINE D3DXQUATERNION& +D3DXQUATERNION::operator /= ( FLOAT f ) +{ + FLOAT fInv = 1.0f / f; + x *= fInv; + y *= fInv; + z *= fInv; + w *= fInv; + return *this; +} + + +// unary operators +D3DX10INLINE D3DXQUATERNION +D3DXQUATERNION::operator + () const +{ + return *this; +} + +D3DX10INLINE D3DXQUATERNION +D3DXQUATERNION::operator - () const +{ + return D3DXQUATERNION(-x, -y, -z, -w); +} + + +// binary operators +D3DX10INLINE D3DXQUATERNION +D3DXQUATERNION::operator + ( CONST D3DXQUATERNION& q ) const +{ + return D3DXQUATERNION(x + q.x, y + q.y, z + q.z, w + q.w); +} + +D3DX10INLINE D3DXQUATERNION +D3DXQUATERNION::operator - ( CONST D3DXQUATERNION& q ) const +{ + return D3DXQUATERNION(x - q.x, y - q.y, z - q.z, w - q.w); +} + +D3DX10INLINE D3DXQUATERNION +D3DXQUATERNION::operator * ( CONST D3DXQUATERNION& q ) const +{ + D3DXQUATERNION qT; + D3DXQuaternionMultiply(&qT, this, &q); + return qT; +} + +D3DX10INLINE D3DXQUATERNION +D3DXQUATERNION::operator * ( FLOAT f ) const +{ + return D3DXQUATERNION(x * f, y * f, z * f, w * f); +} + +D3DX10INLINE D3DXQUATERNION +D3DXQUATERNION::operator / ( FLOAT f ) const +{ + FLOAT fInv = 1.0f / f; + return D3DXQUATERNION(x * fInv, y * fInv, z * fInv, w * fInv); +} + + +D3DX10INLINE D3DXQUATERNION +operator * (FLOAT f, CONST D3DXQUATERNION& q ) +{ + return D3DXQUATERNION(f * q.x, f * q.y, f * q.z, f * q.w); +} + + +D3DX10INLINE BOOL +D3DXQUATERNION::operator == ( CONST D3DXQUATERNION& q ) const +{ + return x == q.x && y == q.y && z == q.z && w == q.w; +} + +D3DX10INLINE BOOL +D3DXQUATERNION::operator != ( CONST D3DXQUATERNION& q ) const +{ + return x != q.x || y != q.y || z != q.z || w != q.w; +} + + + +//-------------------------- +// Plane +//-------------------------- + +D3DX10INLINE +D3DXPLANE::D3DXPLANE( CONST FLOAT* pf ) +{ +#ifdef D3DX10_DEBUG + if(!pf) + return; +#endif + + a = pf[0]; + b = pf[1]; + c = pf[2]; + d = pf[3]; +} + +D3DX10INLINE +D3DXPLANE::D3DXPLANE( CONST D3DXFLOAT16* pf ) +{ +#ifdef D3DX10_DEBUG + if(!pf) + return; +#endif + + D3DXFloat16To32Array(&a, pf, 4); +} + +D3DX10INLINE +D3DXPLANE::D3DXPLANE( FLOAT fa, FLOAT fb, FLOAT fc, FLOAT fd ) +{ + a = fa; + b = fb; + c = fc; + d = fd; +} + + +// casting +D3DX10INLINE +D3DXPLANE::operator FLOAT* () +{ + return (FLOAT *) &a; +} + +D3DX10INLINE +D3DXPLANE::operator CONST FLOAT* () const +{ + return (CONST FLOAT *) &a; +} + + +// assignment operators +D3DX10INLINE D3DXPLANE& +D3DXPLANE::operator *= ( FLOAT f ) +{ + a *= f; + b *= f; + c *= f; + d *= f; + return *this; +} + +D3DX10INLINE D3DXPLANE& +D3DXPLANE::operator /= ( FLOAT f ) +{ + FLOAT fInv = 1.0f / f; + a *= fInv; + b *= fInv; + c *= fInv; + d *= fInv; + return *this; +} + + +// unary operators +D3DX10INLINE D3DXPLANE +D3DXPLANE::operator + () const +{ + return *this; +} + +D3DX10INLINE D3DXPLANE +D3DXPLANE::operator - () const +{ + return D3DXPLANE(-a, -b, -c, -d); +} + + +// binary operators +D3DX10INLINE D3DXPLANE +D3DXPLANE::operator * ( FLOAT f ) const +{ + return D3DXPLANE(a * f, b * f, c * f, d * f); +} + +D3DX10INLINE D3DXPLANE +D3DXPLANE::operator / ( FLOAT f ) const +{ + FLOAT fInv = 1.0f / f; + return D3DXPLANE(a * fInv, b * fInv, c * fInv, d * fInv); +} + +D3DX10INLINE D3DXPLANE +operator * (FLOAT f, CONST D3DXPLANE& p ) +{ + return D3DXPLANE(f * p.a, f * p.b, f * p.c, f * p.d); +} + +D3DX10INLINE BOOL +D3DXPLANE::operator == ( CONST D3DXPLANE& p ) const +{ + return a == p.a && b == p.b && c == p.c && d == p.d; +} + +D3DX10INLINE BOOL +D3DXPLANE::operator != ( CONST D3DXPLANE& p ) const +{ + return a != p.a || b != p.b || c != p.c || d != p.d; +} + + + + +//-------------------------- +// Color +//-------------------------- + +D3DX10INLINE +D3DXCOLOR::D3DXCOLOR( UINT dw ) +{ + CONST FLOAT f = 1.0f / 255.0f; + r = f * (FLOAT) (unsigned char) (dw >> 16); + g = f * (FLOAT) (unsigned char) (dw >> 8); + b = f * (FLOAT) (unsigned char) (dw >> 0); + a = f * (FLOAT) (unsigned char) (dw >> 24); +} + +D3DX10INLINE +D3DXCOLOR::D3DXCOLOR( CONST FLOAT* pf ) +{ +#ifdef D3DX10_DEBUG + if(!pf) + return; +#endif + + r = pf[0]; + g = pf[1]; + b = pf[2]; + a = pf[3]; +} + +D3DX10INLINE +D3DXCOLOR::D3DXCOLOR( CONST D3DXFLOAT16* pf ) +{ +#ifdef D3DX10_DEBUG + if(!pf) + return; +#endif + + D3DXFloat16To32Array(&r, pf, 4); +} + +D3DX10INLINE +D3DXCOLOR::D3DXCOLOR( FLOAT fr, FLOAT fg, FLOAT fb, FLOAT fa ) +{ + r = fr; + g = fg; + b = fb; + a = fa; +} + + +// casting +D3DX10INLINE +D3DXCOLOR::operator UINT () const +{ + UINT dwR = r >= 1.0f ? 0xff : r <= 0.0f ? 0x00 : (UINT) (r * 255.0f + 0.5f); + UINT dwG = g >= 1.0f ? 0xff : g <= 0.0f ? 0x00 : (UINT) (g * 255.0f + 0.5f); + UINT dwB = b >= 1.0f ? 0xff : b <= 0.0f ? 0x00 : (UINT) (b * 255.0f + 0.5f); + UINT dwA = a >= 1.0f ? 0xff : a <= 0.0f ? 0x00 : (UINT) (a * 255.0f + 0.5f); + + return (dwA << 24) | (dwR << 16) | (dwG << 8) | (dwB << 0); +} + + +D3DX10INLINE +D3DXCOLOR::operator FLOAT * () +{ + return (FLOAT *) &r; +} + +D3DX10INLINE +D3DXCOLOR::operator CONST FLOAT * () const +{ + return (CONST FLOAT *) &r; +} + +// assignment operators +D3DX10INLINE D3DXCOLOR& +D3DXCOLOR::operator += ( CONST D3DXCOLOR& c ) +{ + r += c.r; + g += c.g; + b += c.b; + a += c.a; + return *this; +} + +D3DX10INLINE D3DXCOLOR& +D3DXCOLOR::operator -= ( CONST D3DXCOLOR& c ) +{ + r -= c.r; + g -= c.g; + b -= c.b; + a -= c.a; + return *this; +} + +D3DX10INLINE D3DXCOLOR& +D3DXCOLOR::operator *= ( FLOAT f ) +{ + r *= f; + g *= f; + b *= f; + a *= f; + return *this; +} + +D3DX10INLINE D3DXCOLOR& +D3DXCOLOR::operator /= ( FLOAT f ) +{ + FLOAT fInv = 1.0f / f; + r *= fInv; + g *= fInv; + b *= fInv; + a *= fInv; + return *this; +} + + +// unary operators +D3DX10INLINE D3DXCOLOR +D3DXCOLOR::operator + () const +{ + return *this; +} + +D3DX10INLINE D3DXCOLOR +D3DXCOLOR::operator - () const +{ + return D3DXCOLOR(-r, -g, -b, -a); +} + + +// binary operators +D3DX10INLINE D3DXCOLOR +D3DXCOLOR::operator + ( CONST D3DXCOLOR& c ) const +{ + return D3DXCOLOR(r + c.r, g + c.g, b + c.b, a + c.a); +} + +D3DX10INLINE D3DXCOLOR +D3DXCOLOR::operator - ( CONST D3DXCOLOR& c ) const +{ + return D3DXCOLOR(r - c.r, g - c.g, b - c.b, a - c.a); +} + +D3DX10INLINE D3DXCOLOR +D3DXCOLOR::operator * ( FLOAT f ) const +{ + return D3DXCOLOR(r * f, g * f, b * f, a * f); +} + +D3DX10INLINE D3DXCOLOR +D3DXCOLOR::operator / ( FLOAT f ) const +{ + FLOAT fInv = 1.0f / f; + return D3DXCOLOR(r * fInv, g * fInv, b * fInv, a * fInv); +} + + +D3DX10INLINE D3DXCOLOR +operator * (FLOAT f, CONST D3DXCOLOR& c ) +{ + return D3DXCOLOR(f * c.r, f * c.g, f * c.b, f * c.a); +} + + +D3DX10INLINE BOOL +D3DXCOLOR::operator == ( CONST D3DXCOLOR& c ) const +{ + return r == c.r && g == c.g && b == c.b && a == c.a; +} + +D3DX10INLINE BOOL +D3DXCOLOR::operator != ( CONST D3DXCOLOR& c ) const +{ + return r != c.r || g != c.g || b != c.b || a != c.a; +} + + +#endif //__cplusplus + + + +//=========================================================================== +// +// Inline functions +// +//=========================================================================== + + +//-------------------------- +// 2D Vector +//-------------------------- + +D3DX10INLINE FLOAT D3DXVec2Length + ( CONST D3DXVECTOR2 *pV ) +{ +#ifdef D3DX10_DEBUG + if(!pV) + return 0.0f; +#endif + +#ifdef __cplusplus + return sqrtf(pV->x * pV->x + pV->y * pV->y); +#else + return (FLOAT) sqrt(pV->x * pV->x + pV->y * pV->y); +#endif +} + +D3DX10INLINE FLOAT D3DXVec2LengthSq + ( CONST D3DXVECTOR2 *pV ) +{ +#ifdef D3DX10_DEBUG + if(!pV) + return 0.0f; +#endif + + return pV->x * pV->x + pV->y * pV->y; +} + +D3DX10INLINE FLOAT D3DXVec2Dot + ( CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ) +{ +#ifdef D3DX10_DEBUG + if(!pV1 || !pV2) + return 0.0f; +#endif + + return pV1->x * pV2->x + pV1->y * pV2->y; +} + +D3DX10INLINE FLOAT D3DXVec2CCW + ( CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ) +{ +#ifdef D3DX10_DEBUG + if(!pV1 || !pV2) + return 0.0f; +#endif + + return pV1->x * pV2->y - pV1->y * pV2->x; +} + +D3DX10INLINE D3DXVECTOR2* D3DXVec2Add + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x + pV2->x; + pOut->y = pV1->y + pV2->y; + return pOut; +} + +D3DX10INLINE D3DXVECTOR2* D3DXVec2Subtract + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x - pV2->x; + pOut->y = pV1->y - pV2->y; + return pOut; +} + +D3DX10INLINE D3DXVECTOR2* D3DXVec2Minimize + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x < pV2->x ? pV1->x : pV2->x; + pOut->y = pV1->y < pV2->y ? pV1->y : pV2->y; + return pOut; +} + +D3DX10INLINE D3DXVECTOR2* D3DXVec2Maximize + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x > pV2->x ? pV1->x : pV2->x; + pOut->y = pV1->y > pV2->y ? pV1->y : pV2->y; + return pOut; +} + +D3DX10INLINE D3DXVECTOR2* D3DXVec2Scale + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV, FLOAT s ) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pV) + return NULL; +#endif + + pOut->x = pV->x * s; + pOut->y = pV->y * s; + return pOut; +} + +D3DX10INLINE D3DXVECTOR2* D3DXVec2Lerp + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2, + FLOAT s ) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x + s * (pV2->x - pV1->x); + pOut->y = pV1->y + s * (pV2->y - pV1->y); + return pOut; +} + + +//-------------------------- +// 3D Vector +//-------------------------- + +D3DX10INLINE FLOAT D3DXVec3Length + ( CONST D3DXVECTOR3 *pV ) +{ +#ifdef D3DX10_DEBUG + if(!pV) + return 0.0f; +#endif + +#ifdef __cplusplus + return sqrtf(pV->x * pV->x + pV->y * pV->y + pV->z * pV->z); +#else + return (FLOAT) sqrt(pV->x * pV->x + pV->y * pV->y + pV->z * pV->z); +#endif +} + +D3DX10INLINE FLOAT D3DXVec3LengthSq + ( CONST D3DXVECTOR3 *pV ) +{ +#ifdef D3DX10_DEBUG + if(!pV) + return 0.0f; +#endif + + return pV->x * pV->x + pV->y * pV->y + pV->z * pV->z; +} + +D3DX10INLINE FLOAT D3DXVec3Dot + ( CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ) +{ +#ifdef D3DX10_DEBUG + if(!pV1 || !pV2) + return 0.0f; +#endif + + return pV1->x * pV2->x + pV1->y * pV2->y + pV1->z * pV2->z; +} + +D3DX10INLINE D3DXVECTOR3* D3DXVec3Cross + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ) +{ + D3DXVECTOR3 v; + +#ifdef D3DX10_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + v.x = pV1->y * pV2->z - pV1->z * pV2->y; + v.y = pV1->z * pV2->x - pV1->x * pV2->z; + v.z = pV1->x * pV2->y - pV1->y * pV2->x; + + *pOut = v; + return pOut; +} + +D3DX10INLINE D3DXVECTOR3* D3DXVec3Add + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x + pV2->x; + pOut->y = pV1->y + pV2->y; + pOut->z = pV1->z + pV2->z; + return pOut; +} + +D3DX10INLINE D3DXVECTOR3* D3DXVec3Subtract + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x - pV2->x; + pOut->y = pV1->y - pV2->y; + pOut->z = pV1->z - pV2->z; + return pOut; +} + +D3DX10INLINE D3DXVECTOR3* D3DXVec3Minimize + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x < pV2->x ? pV1->x : pV2->x; + pOut->y = pV1->y < pV2->y ? pV1->y : pV2->y; + pOut->z = pV1->z < pV2->z ? pV1->z : pV2->z; + return pOut; +} + +D3DX10INLINE D3DXVECTOR3* D3DXVec3Maximize + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x > pV2->x ? pV1->x : pV2->x; + pOut->y = pV1->y > pV2->y ? pV1->y : pV2->y; + pOut->z = pV1->z > pV2->z ? pV1->z : pV2->z; + return pOut; +} + +D3DX10INLINE D3DXVECTOR3* D3DXVec3Scale + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, FLOAT s) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pV) + return NULL; +#endif + + pOut->x = pV->x * s; + pOut->y = pV->y * s; + pOut->z = pV->z * s; + return pOut; +} + +D3DX10INLINE D3DXVECTOR3* D3DXVec3Lerp + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2, + FLOAT s ) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x + s * (pV2->x - pV1->x); + pOut->y = pV1->y + s * (pV2->y - pV1->y); + pOut->z = pV1->z + s * (pV2->z - pV1->z); + return pOut; +} + + +//-------------------------- +// 4D Vector +//-------------------------- + +D3DX10INLINE FLOAT D3DXVec4Length + ( CONST D3DXVECTOR4 *pV ) +{ +#ifdef D3DX10_DEBUG + if(!pV) + return 0.0f; +#endif + +#ifdef __cplusplus + return sqrtf(pV->x * pV->x + pV->y * pV->y + pV->z * pV->z + pV->w * pV->w); +#else + return (FLOAT) sqrt(pV->x * pV->x + pV->y * pV->y + pV->z * pV->z + pV->w * pV->w); +#endif +} + +D3DX10INLINE FLOAT D3DXVec4LengthSq + ( CONST D3DXVECTOR4 *pV ) +{ +#ifdef D3DX10_DEBUG + if(!pV) + return 0.0f; +#endif + + return pV->x * pV->x + pV->y * pV->y + pV->z * pV->z + pV->w * pV->w; +} + +D3DX10INLINE FLOAT D3DXVec4Dot + ( CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2 ) +{ +#ifdef D3DX10_DEBUG + if(!pV1 || !pV2) + return 0.0f; +#endif + + return pV1->x * pV2->x + pV1->y * pV2->y + pV1->z * pV2->z + pV1->w * pV2->w; +} + +D3DX10INLINE D3DXVECTOR4* D3DXVec4Add + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x + pV2->x; + pOut->y = pV1->y + pV2->y; + pOut->z = pV1->z + pV2->z; + pOut->w = pV1->w + pV2->w; + return pOut; +} + +D3DX10INLINE D3DXVECTOR4* D3DXVec4Subtract + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x - pV2->x; + pOut->y = pV1->y - pV2->y; + pOut->z = pV1->z - pV2->z; + pOut->w = pV1->w - pV2->w; + return pOut; +} + +D3DX10INLINE D3DXVECTOR4* D3DXVec4Minimize + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x < pV2->x ? pV1->x : pV2->x; + pOut->y = pV1->y < pV2->y ? pV1->y : pV2->y; + pOut->z = pV1->z < pV2->z ? pV1->z : pV2->z; + pOut->w = pV1->w < pV2->w ? pV1->w : pV2->w; + return pOut; +} + +D3DX10INLINE D3DXVECTOR4* D3DXVec4Maximize + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x > pV2->x ? pV1->x : pV2->x; + pOut->y = pV1->y > pV2->y ? pV1->y : pV2->y; + pOut->z = pV1->z > pV2->z ? pV1->z : pV2->z; + pOut->w = pV1->w > pV2->w ? pV1->w : pV2->w; + return pOut; +} + +D3DX10INLINE D3DXVECTOR4* D3DXVec4Scale + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV, FLOAT s) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pV) + return NULL; +#endif + + pOut->x = pV->x * s; + pOut->y = pV->y * s; + pOut->z = pV->z * s; + pOut->w = pV->w * s; + return pOut; +} + +D3DX10INLINE D3DXVECTOR4* D3DXVec4Lerp + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2, + FLOAT s ) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x + s * (pV2->x - pV1->x); + pOut->y = pV1->y + s * (pV2->y - pV1->y); + pOut->z = pV1->z + s * (pV2->z - pV1->z); + pOut->w = pV1->w + s * (pV2->w - pV1->w); + return pOut; +} + + +//-------------------------- +// 4D Matrix +//-------------------------- + +D3DX10INLINE D3DXMATRIX* D3DXMatrixIdentity + ( D3DXMATRIX *pOut ) +{ +#ifdef D3DX10_DEBUG + if(!pOut) + return NULL; +#endif + + pOut->m[0][1] = pOut->m[0][2] = pOut->m[0][3] = + pOut->m[1][0] = pOut->m[1][2] = pOut->m[1][3] = + pOut->m[2][0] = pOut->m[2][1] = pOut->m[2][3] = + pOut->m[3][0] = pOut->m[3][1] = pOut->m[3][2] = 0.0f; + + pOut->m[0][0] = pOut->m[1][1] = pOut->m[2][2] = pOut->m[3][3] = 1.0f; + return pOut; +} + + +D3DX10INLINE BOOL D3DXMatrixIsIdentity + ( CONST D3DXMATRIX *pM ) +{ +#ifdef D3DX10_DEBUG + if(!pM) + return FALSE; +#endif + + return pM->m[0][0] == 1.0f && pM->m[0][1] == 0.0f && pM->m[0][2] == 0.0f && pM->m[0][3] == 0.0f && + pM->m[1][0] == 0.0f && pM->m[1][1] == 1.0f && pM->m[1][2] == 0.0f && pM->m[1][3] == 0.0f && + pM->m[2][0] == 0.0f && pM->m[2][1] == 0.0f && pM->m[2][2] == 1.0f && pM->m[2][3] == 0.0f && + pM->m[3][0] == 0.0f && pM->m[3][1] == 0.0f && pM->m[3][2] == 0.0f && pM->m[3][3] == 1.0f; +} + + +//-------------------------- +// Quaternion +//-------------------------- + +D3DX10INLINE FLOAT D3DXQuaternionLength + ( CONST D3DXQUATERNION *pQ ) +{ +#ifdef D3DX10_DEBUG + if(!pQ) + return 0.0f; +#endif + +#ifdef __cplusplus + return sqrtf(pQ->x * pQ->x + pQ->y * pQ->y + pQ->z * pQ->z + pQ->w * pQ->w); +#else + return (FLOAT) sqrt(pQ->x * pQ->x + pQ->y * pQ->y + pQ->z * pQ->z + pQ->w * pQ->w); +#endif +} + +D3DX10INLINE FLOAT D3DXQuaternionLengthSq + ( CONST D3DXQUATERNION *pQ ) +{ +#ifdef D3DX10_DEBUG + if(!pQ) + return 0.0f; +#endif + + return pQ->x * pQ->x + pQ->y * pQ->y + pQ->z * pQ->z + pQ->w * pQ->w; +} + +D3DX10INLINE FLOAT D3DXQuaternionDot + ( CONST D3DXQUATERNION *pQ1, CONST D3DXQUATERNION *pQ2 ) +{ +#ifdef D3DX10_DEBUG + if(!pQ1 || !pQ2) + return 0.0f; +#endif + + return pQ1->x * pQ2->x + pQ1->y * pQ2->y + pQ1->z * pQ2->z + pQ1->w * pQ2->w; +} + + +D3DX10INLINE D3DXQUATERNION* D3DXQuaternionIdentity + ( D3DXQUATERNION *pOut ) +{ +#ifdef D3DX10_DEBUG + if(!pOut) + return NULL; +#endif + + pOut->x = pOut->y = pOut->z = 0.0f; + pOut->w = 1.0f; + return pOut; +} + +D3DX10INLINE BOOL D3DXQuaternionIsIdentity + ( CONST D3DXQUATERNION *pQ ) +{ +#ifdef D3DX10_DEBUG + if(!pQ) + return FALSE; +#endif + + return pQ->x == 0.0f && pQ->y == 0.0f && pQ->z == 0.0f && pQ->w == 1.0f; +} + + +D3DX10INLINE D3DXQUATERNION* D3DXQuaternionConjugate + ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ ) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pQ) + return NULL; +#endif + + pOut->x = -pQ->x; + pOut->y = -pQ->y; + pOut->z = -pQ->z; + pOut->w = pQ->w; + return pOut; +} + + +//-------------------------- +// Plane +//-------------------------- + +D3DX10INLINE FLOAT D3DXPlaneDot + ( CONST D3DXPLANE *pP, CONST D3DXVECTOR4 *pV) +{ +#ifdef D3DX10_DEBUG + if(!pP || !pV) + return 0.0f; +#endif + + return pP->a * pV->x + pP->b * pV->y + pP->c * pV->z + pP->d * pV->w; +} + +D3DX10INLINE FLOAT D3DXPlaneDotCoord + ( CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV) +{ +#ifdef D3DX10_DEBUG + if(!pP || !pV) + return 0.0f; +#endif + + return pP->a * pV->x + pP->b * pV->y + pP->c * pV->z + pP->d; +} + +D3DX10INLINE FLOAT D3DXPlaneDotNormal + ( CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV) +{ +#ifdef D3DX10_DEBUG + if(!pP || !pV) + return 0.0f; +#endif + + return pP->a * pV->x + pP->b * pV->y + pP->c * pV->z; +} + +D3DX10INLINE D3DXPLANE* D3DXPlaneScale + (D3DXPLANE *pOut, CONST D3DXPLANE *pP, FLOAT s) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pP) + return NULL; +#endif + + pOut->a = pP->a * s; + pOut->b = pP->b * s; + pOut->c = pP->c * s; + pOut->d = pP->d * s; + return pOut; +} + + +//-------------------------- +// Color +//-------------------------- + +D3DX10INLINE D3DXCOLOR* D3DXColorNegative + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pC) + return NULL; +#endif + + pOut->r = 1.0f - pC->r; + pOut->g = 1.0f - pC->g; + pOut->b = 1.0f - pC->b; + pOut->a = pC->a; + return pOut; +} + +D3DX10INLINE D3DXCOLOR* D3DXColorAdd + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pC1 || !pC2) + return NULL; +#endif + + pOut->r = pC1->r + pC2->r; + pOut->g = pC1->g + pC2->g; + pOut->b = pC1->b + pC2->b; + pOut->a = pC1->a + pC2->a; + return pOut; +} + +D3DX10INLINE D3DXCOLOR* D3DXColorSubtract + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pC1 || !pC2) + return NULL; +#endif + + pOut->r = pC1->r - pC2->r; + pOut->g = pC1->g - pC2->g; + pOut->b = pC1->b - pC2->b; + pOut->a = pC1->a - pC2->a; + return pOut; +} + +D3DX10INLINE D3DXCOLOR* D3DXColorScale + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC, FLOAT s) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pC) + return NULL; +#endif + + pOut->r = pC->r * s; + pOut->g = pC->g * s; + pOut->b = pC->b * s; + pOut->a = pC->a * s; + return pOut; +} + +D3DX10INLINE D3DXCOLOR* D3DXColorModulate + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pC1 || !pC2) + return NULL; +#endif + + pOut->r = pC1->r * pC2->r; + pOut->g = pC1->g * pC2->g; + pOut->b = pC1->b * pC2->b; + pOut->a = pC1->a * pC2->a; + return pOut; +} + +D3DX10INLINE D3DXCOLOR* D3DXColorLerp + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2, FLOAT s) +{ +#ifdef D3DX10_DEBUG + if(!pOut || !pC1 || !pC2) + return NULL; +#endif + + pOut->r = pC1->r + s * (pC2->r - pC1->r); + pOut->g = pC1->g + s * (pC2->g - pC1->g); + pOut->b = pC1->b + s * (pC2->b - pC1->b); + pOut->a = pC1->a + s * (pC2->a - pC1->a); + return pOut; +} + + +#endif // __D3DXMATH_INL__ + diff --git a/gfx/include/dxsdk/d3dx10mesh.h b/gfx/include/dxsdk/d3dx10mesh.h new file mode 100644 index 0000000000..e5fed8fc93 --- /dev/null +++ b/gfx/include/dxsdk/d3dx10mesh.h @@ -0,0 +1,286 @@ +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) Microsoft Corporation. All Rights Reserved. +// +// File: d3dx10mesh.h +// Content: D3DX10 mesh types and functions +// +////////////////////////////////////////////////////////////////////////////// + +#include "d3dx10.h" + +#ifndef __D3DX10MESH_H__ +#define __D3DX10MESH_H__ + +// {7ED943DD-52E8-40b5-A8D8-76685C406330} +DEFINE_GUID(IID_ID3DX10BaseMesh, +0x7ed943dd, 0x52e8, 0x40b5, 0xa8, 0xd8, 0x76, 0x68, 0x5c, 0x40, 0x63, 0x30); + +// {04B0D117-1041-46b1-AA8A-3952848BA22E} +DEFINE_GUID(IID_ID3DX10MeshBuffer, +0x4b0d117, 0x1041, 0x46b1, 0xaa, 0x8a, 0x39, 0x52, 0x84, 0x8b, 0xa2, 0x2e); + +// {4020E5C2-1403-4929-883F-E2E849FAC195} +DEFINE_GUID(IID_ID3DX10Mesh, +0x4020e5c2, 0x1403, 0x4929, 0x88, 0x3f, 0xe2, 0xe8, 0x49, 0xfa, 0xc1, 0x95); + +// {8875769A-D579-4088-AAEB-534D1AD84E96} +DEFINE_GUID(IID_ID3DX10PMesh, +0x8875769a, 0xd579, 0x4088, 0xaa, 0xeb, 0x53, 0x4d, 0x1a, 0xd8, 0x4e, 0x96); + +// {667EA4C7-F1CD-4386-B523-7C0290B83CC5} +DEFINE_GUID(IID_ID3DX10SPMesh, +0x667ea4c7, 0xf1cd, 0x4386, 0xb5, 0x23, 0x7c, 0x2, 0x90, 0xb8, 0x3c, 0xc5); + +// {3CE6CC22-DBF2-44f4-894D-F9C34A337139} +DEFINE_GUID(IID_ID3DX10PatchMesh, +0x3ce6cc22, 0xdbf2, 0x44f4, 0x89, 0x4d, 0xf9, 0xc3, 0x4a, 0x33, 0x71, 0x39); + + +// Mesh options - lower 3 bytes only, upper byte used by _D3DX10MESHOPT option flags +enum _D3DX10_MESH { + D3DX10_MESH_32_BIT = 0x001, // If set, then use 32 bit indices, if not set use 16 bit indices. + D3DX10_MESH_GS_ADJACENCY = 0x004, // If set, mesh contains GS adjacency info. Not valid on input. + +}; + +typedef struct _D3DX10_ATTRIBUTE_RANGE +{ + UINT AttribId; + UINT FaceStart; + UINT FaceCount; + UINT VertexStart; + UINT VertexCount; +} D3DX10_ATTRIBUTE_RANGE; + +typedef D3DX10_ATTRIBUTE_RANGE* LPD3DX10_ATTRIBUTE_RANGE; + +typedef enum _D3DX10_MESH_DISCARD_FLAGS +{ + D3DX10_MESH_DISCARD_ATTRIBUTE_BUFFER = 0x01, + D3DX10_MESH_DISCARD_ATTRIBUTE_TABLE = 0x02, + D3DX10_MESH_DISCARD_POINTREPS = 0x04, + D3DX10_MESH_DISCARD_ADJACENCY = 0x08, + D3DX10_MESH_DISCARD_DEVICE_BUFFERS = 0x10, + +} D3DX10_MESH_DISCARD_FLAGS; + +typedef struct _D3DX10_WELD_EPSILONS +{ + FLOAT Position; // NOTE: This does NOT replace the epsilon in GenerateAdjacency + // in general, it should be the same value or greater than the one passed to GeneratedAdjacency + FLOAT BlendWeights; + FLOAT Normal; + FLOAT PSize; + FLOAT Specular; + FLOAT Diffuse; + FLOAT Texcoord[8]; + FLOAT Tangent; + FLOAT Binormal; + FLOAT TessFactor; +} D3DX10_WELD_EPSILONS; + +typedef D3DX10_WELD_EPSILONS* LPD3DX10_WELD_EPSILONS; + +typedef struct _D3DX10_INTERSECT_INFO +{ + UINT FaceIndex; // index of face intersected + FLOAT U; // Barycentric Hit Coordinates + FLOAT V; // Barycentric Hit Coordinates + FLOAT Dist; // Ray-Intersection Parameter Distance +} D3DX10_INTERSECT_INFO, *LPD3DX10_INTERSECT_INFO; + +// ID3DX10MeshBuffer is used by D3DX10Mesh vertex and index buffers +#undef INTERFACE +#define INTERFACE ID3DX10MeshBuffer + +DECLARE_INTERFACE_(ID3DX10MeshBuffer, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // ID3DX10MeshBuffer + STDMETHOD(Map)(THIS_ void **ppData, SIZE_T *pSize) PURE; + STDMETHOD(Unmap)(THIS) PURE; + STDMETHOD_(SIZE_T, GetSize)(THIS) PURE; +}; + +// D3DX10 Mesh interfaces +#undef INTERFACE +#define INTERFACE ID3DX10Mesh + +DECLARE_INTERFACE_(ID3DX10Mesh, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // ID3DX10Mesh + STDMETHOD_(UINT, GetFaceCount)(THIS) PURE; + STDMETHOD_(UINT, GetVertexCount)(THIS) PURE; + STDMETHOD_(UINT, GetVertexBufferCount)(THIS) PURE; + STDMETHOD_(UINT, GetFlags)(THIS) PURE; + STDMETHOD(GetVertexDescription)(THIS_ CONST D3D10_INPUT_ELEMENT_DESC **ppDesc, UINT *pDeclCount) PURE; + + STDMETHOD(SetVertexData)(THIS_ UINT iBuffer, CONST void *pData) PURE; + STDMETHOD(GetVertexBuffer)(THIS_ UINT iBuffer, ID3DX10MeshBuffer **ppVertexBuffer) PURE; + + STDMETHOD(SetIndexData)(THIS_ CONST void *pData, UINT cIndices) PURE; + STDMETHOD(GetIndexBuffer)(THIS_ ID3DX10MeshBuffer **ppIndexBuffer) PURE; + + STDMETHOD(SetAttributeData)(THIS_ CONST UINT *pData) PURE; + STDMETHOD(GetAttributeBuffer)(THIS_ ID3DX10MeshBuffer **ppAttributeBuffer) PURE; + + STDMETHOD(SetAttributeTable)(THIS_ CONST D3DX10_ATTRIBUTE_RANGE *pAttribTable, UINT cAttribTableSize) PURE; + STDMETHOD(GetAttributeTable)(THIS_ D3DX10_ATTRIBUTE_RANGE *pAttribTable, UINT *pAttribTableSize) PURE; + + STDMETHOD(GenerateAdjacencyAndPointReps)(THIS_ FLOAT Epsilon) PURE; + STDMETHOD(GenerateGSAdjacency)(THIS) PURE; + + STDMETHOD(SetAdjacencyData)(THIS_ CONST UINT *pAdjacency) PURE; + STDMETHOD(GetAdjacencyBuffer)(THIS_ ID3DX10MeshBuffer **ppAdjacency) PURE; + + STDMETHOD(SetPointRepData)(THIS_ CONST UINT *pPointReps) PURE; + STDMETHOD(GetPointRepBuffer)(THIS_ ID3DX10MeshBuffer **ppPointReps) PURE; + + STDMETHOD(Discard)(THIS_ D3DX10_MESH_DISCARD_FLAGS dwDiscard) PURE; + STDMETHOD(CloneMesh)(THIS_ UINT Flags, LPCSTR pPosSemantic, CONST D3D10_INPUT_ELEMENT_DESC *pDesc, UINT DeclCount, ID3DX10Mesh** ppCloneMesh) PURE; + + STDMETHOD(Optimize)(THIS_ UINT Flags, UINT * pFaceRemap, LPD3D10BLOB *ppVertexRemap) PURE; + STDMETHOD(GenerateAttributeBufferFromTable)(THIS) PURE; + + STDMETHOD(Intersect)(THIS_ D3DXVECTOR3 *pRayPos, D3DXVECTOR3 *pRayDir, + UINT *pHitCount, UINT *pFaceIndex, float *pU, float *pV, float *pDist, ID3D10Blob **ppAllHits); + STDMETHOD(IntersectSubset)(THIS_ UINT AttribId, D3DXVECTOR3 *pRayPos, D3DXVECTOR3 *pRayDir, + UINT *pHitCount, UINT *pFaceIndex, float *pU, float *pV, float *pDist, ID3D10Blob **ppAllHits); + + // ID3DX10Mesh - Device functions + STDMETHOD(CommitToDevice)(THIS) PURE; + STDMETHOD(DrawSubset)(THIS_ UINT AttribId) PURE; + STDMETHOD(DrawSubsetInstanced)(THIS_ UINT AttribId, UINT InstanceCount, UINT StartInstanceLocation) PURE; + + STDMETHOD(GetDeviceVertexBuffer)(THIS_ UINT iBuffer, ID3D10Buffer **ppVertexBuffer) PURE; + STDMETHOD(GetDeviceIndexBuffer)(THIS_ ID3D10Buffer **ppIndexBuffer) PURE; +}; + + +// Flat API +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + +HRESULT WINAPI + D3DX10CreateMesh( + ID3D10Device *pDevice, + CONST D3D10_INPUT_ELEMENT_DESC *pDeclaration, + UINT DeclCount, + LPCSTR pPositionSemantic, + UINT VertexCount, + UINT FaceCount, + UINT Options, + ID3DX10Mesh **ppMesh); + +#ifdef __cplusplus +} +#endif //__cplusplus + + +// ID3DX10Mesh::Optimize options - upper byte only, lower 3 bytes used from _D3DX10MESH option flags +enum _D3DX10_MESHOPT { + D3DX10_MESHOPT_COMPACT = 0x01000000, + D3DX10_MESHOPT_ATTR_SORT = 0x02000000, + D3DX10_MESHOPT_VERTEX_CACHE = 0x04000000, + D3DX10_MESHOPT_STRIP_REORDER = 0x08000000, + D3DX10_MESHOPT_IGNORE_VERTS = 0x10000000, // optimize faces only, don't touch vertices + D3DX10_MESHOPT_DO_NOT_SPLIT = 0x20000000, // do not split vertices shared between attribute groups when attribute sorting + D3DX10_MESHOPT_DEVICE_INDEPENDENT = 0x00400000, // Only affects VCache. uses a static known good cache size for all cards + + // D3DX10_MESHOPT_SHAREVB has been removed, please use D3DX10MESH_VB_SHARE instead + +}; + + +////////////////////////////////////////////////////////////////////////// +// ID3DXSkinInfo +////////////////////////////////////////////////////////////////////////// + +// {420BD604-1C76-4a34-A466-E45D0658A32C} +DEFINE_GUID(IID_ID3DX10SkinInfo, +0x420bd604, 0x1c76, 0x4a34, 0xa4, 0x66, 0xe4, 0x5d, 0x6, 0x58, 0xa3, 0x2c); + +// scaling modes for ID3DX10SkinInfo::Compact() & ID3DX10SkinInfo::UpdateMesh() +#define D3DX10_SKININFO_NO_SCALING 0 +#define D3DX10_SKININFO_SCALE_TO_1 1 +#define D3DX10_SKININFO_SCALE_TO_TOTAL 2 + +typedef struct _D3DX10_SKINNING_CHANNEL +{ + UINT SrcOffset; + UINT DestOffset; + BOOL IsNormal; +} D3DX10_SKINNING_CHANNEL; + +#undef INTERFACE +#define INTERFACE ID3DX10SkinInfo + +typedef struct ID3DX10SkinInfo *LPD3DX10SKININFO; + +DECLARE_INTERFACE_(ID3DX10SkinInfo, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + STDMETHOD_(UINT , GetNumVertices)(THIS) PURE; + STDMETHOD_(UINT , GetNumBones)(THIS) PURE; + STDMETHOD_(UINT , GetMaxBoneInfluences)(THIS) PURE; + + STDMETHOD(AddVertices)(THIS_ UINT Count) PURE; + STDMETHOD(RemapVertices)(THIS_ UINT NewVertexCount, UINT *pVertexRemap) PURE; + + STDMETHOD(AddBones)(THIS_ UINT Count) PURE; + STDMETHOD(RemoveBone)(THIS_ UINT Index) PURE; + STDMETHOD(RemapBones)(THIS_ UINT NewBoneCount, UINT *pBoneRemap) PURE; + + STDMETHOD(AddBoneInfluences)(THIS_ UINT BoneIndex, UINT InfluenceCount, UINT *pIndices, float *pWeights) PURE; + STDMETHOD(ClearBoneInfluences)(THIS_ UINT BoneIndex) PURE; + STDMETHOD_(UINT , GetBoneInfluenceCount)(THIS_ UINT BoneIndex) PURE; + STDMETHOD(GetBoneInfluences)(THIS_ UINT BoneIndex, UINT Offset, UINT Count, UINT *pDestIndices, float *pDestWeights) PURE; + STDMETHOD(FindBoneInfluenceIndex)(THIS_ UINT BoneIndex, UINT VertexIndex, UINT *pInfluenceIndex) PURE; + STDMETHOD(SetBoneInfluence)(THIS_ UINT BoneIndex, UINT InfluenceIndex, float Weight) PURE; + STDMETHOD(GetBoneInfluence)(THIS_ UINT BoneIndex, UINT InfluenceIndex, float *pWeight) PURE; + + STDMETHOD(Compact)(THIS_ UINT MaxPerVertexInfluences, UINT ScaleMode, float MinWeight) PURE; + STDMETHOD(DoSoftwareSkinning)(UINT StartVertex, UINT VertexCount, void *pSrcVertices, UINT SrcStride, void *pDestVertices, UINT DestStride, D3DXMATRIX *pBoneMatrices, D3DXMATRIX *pInverseTransposeBoneMatrices, D3DX10_SKINNING_CHANNEL *pChannelDescs, UINT NumChannels) PURE; +}; + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + +HRESULT WINAPI + D3DX10CreateSkinInfo(LPD3DX10SKININFO* ppSkinInfo); + +#ifdef __cplusplus +} +#endif //__cplusplus + +typedef struct _D3DX10_ATTRIBUTE_WEIGHTS +{ + FLOAT Position; + FLOAT Boundary; + FLOAT Normal; + FLOAT Diffuse; + FLOAT Specular; + FLOAT Texcoord[8]; + FLOAT Tangent; + FLOAT Binormal; +} D3DX10_ATTRIBUTE_WEIGHTS, *LPD3DX10_ATTRIBUTE_WEIGHTS; + +#endif //__D3DX10MESH_H__ + + diff --git a/gfx/include/dxsdk/d3dx10tex.h b/gfx/include/dxsdk/d3dx10tex.h new file mode 100644 index 0000000000..a6d8bb958b --- /dev/null +++ b/gfx/include/dxsdk/d3dx10tex.h @@ -0,0 +1,766 @@ +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) Microsoft Corporation. All Rights Reserved. +// +// File: d3dx10tex.h +// Content: D3DX10 texturing APIs +// +////////////////////////////////////////////////////////////////////////////// + +#include "d3dx10.h" + +#ifndef __D3DX10TEX_H__ +#define __D3DX10TEX_H__ + + +//---------------------------------------------------------------------------- +// D3DX10_FILTER flags: +// ------------------ +// +// A valid filter must contain one of these values: +// +// D3DX10_FILTER_NONE +// No scaling or filtering will take place. Pixels outside the bounds +// of the source image are assumed to be transparent black. +// D3DX10_FILTER_POINT +// Each destination pixel is computed by sampling the nearest pixel +// from the source image. +// D3DX10_FILTER_LINEAR +// Each destination pixel is computed by linearly interpolating between +// the nearest pixels in the source image. This filter works best +// when the scale on each axis is less than 2. +// D3DX10_FILTER_TRIANGLE +// Every pixel in the source image contributes equally to the +// destination image. This is the slowest of all the filters. +// D3DX10_FILTER_BOX +// Each pixel is computed by averaging a 2x2(x2) box pixels from +// the source image. Only works when the dimensions of the +// destination are half those of the source. (as with mip maps) +// +// And can be OR'd with any of these optional flags: +// +// D3DX10_FILTER_MIRROR_U +// Indicates that pixels off the edge of the texture on the U-axis +// should be mirrored, not wraped. +// D3DX10_FILTER_MIRROR_V +// Indicates that pixels off the edge of the texture on the V-axis +// should be mirrored, not wraped. +// D3DX10_FILTER_MIRROR_W +// Indicates that pixels off the edge of the texture on the W-axis +// should be mirrored, not wraped. +// D3DX10_FILTER_MIRROR +// Same as specifying D3DX10_FILTER_MIRROR_U | D3DX10_FILTER_MIRROR_V | +// D3DX10_FILTER_MIRROR_V +// D3DX10_FILTER_DITHER +// Dithers the resulting image using a 4x4 order dither pattern. +// D3DX10_FILTER_SRGB_IN +// Denotes that the input data is in sRGB (gamma 2.2) colorspace. +// D3DX10_FILTER_SRGB_OUT +// Denotes that the output data is in sRGB (gamma 2.2) colorspace. +// D3DX10_FILTER_SRGB +// Same as specifying D3DX10_FILTER_SRGB_IN | D3DX10_FILTER_SRGB_OUT +// +//---------------------------------------------------------------------------- + +typedef enum D3DX10_FILTER_FLAG +{ + D3DX10_FILTER_NONE = (1 << 0), + D3DX10_FILTER_POINT = (2 << 0), + D3DX10_FILTER_LINEAR = (3 << 0), + D3DX10_FILTER_TRIANGLE = (4 << 0), + D3DX10_FILTER_BOX = (5 << 0), + + D3DX10_FILTER_MIRROR_U = (1 << 16), + D3DX10_FILTER_MIRROR_V = (2 << 16), + D3DX10_FILTER_MIRROR_W = (4 << 16), + D3DX10_FILTER_MIRROR = (7 << 16), + + D3DX10_FILTER_DITHER = (1 << 19), + D3DX10_FILTER_DITHER_DIFFUSION= (2 << 19), + + D3DX10_FILTER_SRGB_IN = (1 << 21), + D3DX10_FILTER_SRGB_OUT = (2 << 21), + D3DX10_FILTER_SRGB = (3 << 21), +} D3DX10_FILTER_FLAG; + +//---------------------------------------------------------------------------- +// D3DX10_NORMALMAP flags: +// --------------------- +// These flags are used to control how D3DX10ComputeNormalMap generates normal +// maps. Any number of these flags may be OR'd together in any combination. +// +// D3DX10_NORMALMAP_MIRROR_U +// Indicates that pixels off the edge of the texture on the U-axis +// should be mirrored, not wraped. +// D3DX10_NORMALMAP_MIRROR_V +// Indicates that pixels off the edge of the texture on the V-axis +// should be mirrored, not wraped. +// D3DX10_NORMALMAP_MIRROR +// Same as specifying D3DX10_NORMALMAP_MIRROR_U | D3DX10_NORMALMAP_MIRROR_V +// D3DX10_NORMALMAP_INVERTSIGN +// Inverts the direction of each normal +// D3DX10_NORMALMAP_COMPUTE_OCCLUSION +// Compute the per pixel Occlusion term and encodes it into the alpha. +// An Alpha of 1 means that the pixel is not obscured in anyway, and +// an alpha of 0 would mean that the pixel is completly obscured. +// +//---------------------------------------------------------------------------- + +typedef enum D3DX10_NORMALMAP_FLAG +{ + D3DX10_NORMALMAP_MIRROR_U = (1 << 16), + D3DX10_NORMALMAP_MIRROR_V = (2 << 16), + D3DX10_NORMALMAP_MIRROR = (3 << 16), + D3DX10_NORMALMAP_INVERTSIGN = (8 << 16), + D3DX10_NORMALMAP_COMPUTE_OCCLUSION = (16 << 16), +} D3DX10_NORMALMAP_FLAG; + +//---------------------------------------------------------------------------- +// D3DX10_CHANNEL flags: +// ------------------- +// These flags are used by functions which operate on or more channels +// in a texture. +// +// D3DX10_CHANNEL_RED +// Indicates the red channel should be used +// D3DX10_CHANNEL_BLUE +// Indicates the blue channel should be used +// D3DX10_CHANNEL_GREEN +// Indicates the green channel should be used +// D3DX10_CHANNEL_ALPHA +// Indicates the alpha channel should be used +// D3DX10_CHANNEL_LUMINANCE +// Indicates the luminaces of the red green and blue channels should be +// used. +// +//---------------------------------------------------------------------------- + +typedef enum D3DX10_CHANNEL_FLAG +{ + D3DX10_CHANNEL_RED = (1 << 0), + D3DX10_CHANNEL_BLUE = (1 << 1), + D3DX10_CHANNEL_GREEN = (1 << 2), + D3DX10_CHANNEL_ALPHA = (1 << 3), + D3DX10_CHANNEL_LUMINANCE = (1 << 4), +} D3DX10_CHANNEL_FLAG; + + + +//---------------------------------------------------------------------------- +// D3DX10_IMAGE_FILE_FORMAT: +// --------------------- +// This enum is used to describe supported image file formats. +// +//---------------------------------------------------------------------------- + +typedef enum D3DX10_IMAGE_FILE_FORMAT +{ + D3DX10_IFF_BMP = 0, + D3DX10_IFF_JPG = 1, + D3DX10_IFF_PNG = 3, + D3DX10_IFF_DDS = 4, + D3DX10_IFF_TIFF = 10, + D3DX10_IFF_GIF = 11, + D3DX10_IFF_WMP = 12, + D3DX10_IFF_FORCE_DWORD = 0x7fffffff + +} D3DX10_IMAGE_FILE_FORMAT; + + +//---------------------------------------------------------------------------- +// D3DX10_SAVE_TEXTURE_FLAG: +// --------------------- +// This enum is used to support texture saving options. +// +//---------------------------------------------------------------------------- + +typedef enum D3DX10_SAVE_TEXTURE_FLAG +{ + D3DX10_STF_USEINPUTBLOB = 0x0001, +} D3DX10_SAVE_TEXTURE_FLAG; + + + +//---------------------------------------------------------------------------- +// D3DX10_IMAGE_INFO: +// --------------- +// This structure is used to return a rough description of what the +// the original contents of an image file looked like. +// +// Width +// Width of original image in pixels +// Height +// Height of original image in pixels +// Depth +// Depth of original image in pixels +// ArraySize +// Array size in textures +// MipLevels +// Number of mip levels in original image +// MiscFlags +// Miscellaneous flags +// Format +// D3D format which most closely describes the data in original image +// ResourceDimension +// D3D10_RESOURCE_DIMENSION representing the dimension of texture stored in the file. +// D3D10_RESOURCE_DIMENSION_TEXTURE1D, 2D, 3D +// ImageFileFormat +// D3DX10_IMAGE_FILE_FORMAT representing the format of the image file. +//---------------------------------------------------------------------------- + +typedef struct D3DX10_IMAGE_INFO +{ + UINT Width; + UINT Height; + UINT Depth; + UINT ArraySize; + UINT MipLevels; + UINT MiscFlags; + DXGI_FORMAT Format; + D3D10_RESOURCE_DIMENSION ResourceDimension; + D3DX10_IMAGE_FILE_FORMAT ImageFileFormat; +} D3DX10_IMAGE_INFO; + + + + + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + + + +////////////////////////////////////////////////////////////////////////////// +// Image File APIs /////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +//---------------------------------------------------------------------------- +// D3DX10_IMAGE_LOAD_INFO: +// --------------- +// This structure can be optionally passed in to texture loader APIs to +// control how textures get loaded. Pass in D3DX10_DEFAULT for any of these +// to have D3DX automatically pick defaults based on the source file. +// +// Width +// Rescale texture to Width texels wide +// Height +// Rescale texture to Height texels high +// Depth +// Rescale texture to Depth texels deep +// FirstMipLevel +// First mip level to load +// MipLevels +// Number of mip levels to load after the first level +// Usage +// D3D10_USAGE flag for the new texture +// BindFlags +// D3D10 Bind flags for the new texture +// CpuAccessFlags +// D3D10 CPU Access flags for the new texture +// MiscFlags +// Reserved. Must be 0 +// Format +// Resample texture to the specified format +// Filter +// Filter the texture using the specified filter (only when resampling) +// MipFilter +// Filter the texture mip levels using the specified filter (only if +// generating mips) +// pSrcInfo +// (optional) pointer to a D3DX10_IMAGE_INFO structure that will get +// populated with source image information +//---------------------------------------------------------------------------- + + +typedef struct D3DX10_IMAGE_LOAD_INFO +{ + UINT Width; + UINT Height; + UINT Depth; + UINT FirstMipLevel; + UINT MipLevels; + D3D10_USAGE Usage; + UINT BindFlags; + UINT CpuAccessFlags; + UINT MiscFlags; + DXGI_FORMAT Format; + UINT Filter; + UINT MipFilter; + D3DX10_IMAGE_INFO* pSrcInfo; + +#ifdef __cplusplus + D3DX10_IMAGE_LOAD_INFO() + { + Width = D3DX10_DEFAULT; + Height = D3DX10_DEFAULT; + Depth = D3DX10_DEFAULT; + FirstMipLevel = D3DX10_DEFAULT; + MipLevels = D3DX10_DEFAULT; + Usage = (D3D10_USAGE) D3DX10_DEFAULT; + BindFlags = D3DX10_DEFAULT; + CpuAccessFlags = D3DX10_DEFAULT; + MiscFlags = D3DX10_DEFAULT; + Format = DXGI_FORMAT_FROM_FILE; + Filter = D3DX10_DEFAULT; + MipFilter = D3DX10_DEFAULT; + pSrcInfo = NULL; + } +#endif + +} D3DX10_IMAGE_LOAD_INFO; + +//------------------------------------------------------------------------------- +// GetImageInfoFromFile/Resource/Memory: +// ------------------------------ +// Fills in a D3DX10_IMAGE_INFO struct with information about an image file. +// +// Parameters: +// pSrcFile +// File name of the source image. +// pSrcModule +// Module where resource is located, or NULL for module associated +// with image the os used to create the current process. +// pSrcResource +// Resource name. +// pSrcData +// Pointer to file in memory. +// SrcDataSize +// Size in bytes of file in memory. +// pPump +// Optional pointer to a thread pump object to use. +// pSrcInfo +// Pointer to a D3DX10_IMAGE_INFO structure to be filled in with the +// description of the data in the source image file. +// pHResult +// Pointer to a memory location to receive the return value upon completion. +// Maybe NULL if not needed. +// If pPump != NULL, pHResult must be a valid memory location until the +// the asynchronous execution completes. +//------------------------------------------------------------------------------- + +HRESULT WINAPI + D3DX10GetImageInfoFromFileA( + LPCSTR pSrcFile, + ID3DX10ThreadPump* pPump, + D3DX10_IMAGE_INFO* pSrcInfo, + HRESULT* pHResult); + +HRESULT WINAPI + D3DX10GetImageInfoFromFileW( + LPCWSTR pSrcFile, + ID3DX10ThreadPump* pPump, + D3DX10_IMAGE_INFO* pSrcInfo, + HRESULT* pHResult); + +#ifdef UNICODE +#define D3DX10GetImageInfoFromFile D3DX10GetImageInfoFromFileW +#else +#define D3DX10GetImageInfoFromFile D3DX10GetImageInfoFromFileA +#endif + + +HRESULT WINAPI + D3DX10GetImageInfoFromResourceA( + HMODULE hSrcModule, + LPCSTR pSrcResource, + ID3DX10ThreadPump* pPump, + D3DX10_IMAGE_INFO* pSrcInfo, + HRESULT* pHResult); + +HRESULT WINAPI + D3DX10GetImageInfoFromResourceW( + HMODULE hSrcModule, + LPCWSTR pSrcResource, + ID3DX10ThreadPump* pPump, + D3DX10_IMAGE_INFO* pSrcInfo, + HRESULT* pHResult); + +#ifdef UNICODE +#define D3DX10GetImageInfoFromResource D3DX10GetImageInfoFromResourceW +#else +#define D3DX10GetImageInfoFromResource D3DX10GetImageInfoFromResourceA +#endif + + +HRESULT WINAPI + D3DX10GetImageInfoFromMemory( + LPCVOID pSrcData, + SIZE_T SrcDataSize, + ID3DX10ThreadPump* pPump, + D3DX10_IMAGE_INFO* pSrcInfo, + HRESULT* pHResult); + + +////////////////////////////////////////////////////////////////////////////// +// Create/Save Texture APIs ////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +//---------------------------------------------------------------------------- +// D3DX10CreateTextureFromFile/Resource/Memory: +// D3DX10CreateShaderResourceViewFromFile/Resource/Memory: +// ----------------------------------- +// Create a texture object from a file or resource. +// +// Parameters: +// +// pDevice +// The D3D device with which the texture is going to be used. +// pSrcFile +// File name. +// hSrcModule +// Module handle. if NULL, current module will be used. +// pSrcResource +// Resource name in module +// pvSrcData +// Pointer to file in memory. +// SrcDataSize +// Size in bytes of file in memory. +// pLoadInfo +// Optional pointer to a D3DX10_IMAGE_LOAD_INFO structure that +// contains additional loader parameters. +// pPump +// Optional pointer to a thread pump object to use. +// ppTexture +// [out] Created texture object. +// ppShaderResourceView +// [out] Shader resource view object created. +// pHResult +// Pointer to a memory location to receive the return value upon completion. +// Maybe NULL if not needed. +// If pPump != NULL, pHResult must be a valid memory location until the +// the asynchronous execution completes. +// +//---------------------------------------------------------------------------- + + +// FromFile + +HRESULT WINAPI + D3DX10CreateShaderResourceViewFromFileA( + ID3D10Device* pDevice, + LPCSTR pSrcFile, + D3DX10_IMAGE_LOAD_INFO *pLoadInfo, + ID3DX10ThreadPump* pPump, + ID3D10ShaderResourceView** ppShaderResourceView, + HRESULT* pHResult); + +HRESULT WINAPI + D3DX10CreateShaderResourceViewFromFileW( + ID3D10Device* pDevice, + LPCWSTR pSrcFile, + D3DX10_IMAGE_LOAD_INFO *pLoadInfo, + ID3DX10ThreadPump* pPump, + ID3D10ShaderResourceView** ppShaderResourceView, + HRESULT* pHResult); + +#ifdef UNICODE +#define D3DX10CreateShaderResourceViewFromFile D3DX10CreateShaderResourceViewFromFileW +#else +#define D3DX10CreateShaderResourceViewFromFile D3DX10CreateShaderResourceViewFromFileA +#endif + +HRESULT WINAPI + D3DX10CreateTextureFromFileA( + ID3D10Device* pDevice, + LPCSTR pSrcFile, + D3DX10_IMAGE_LOAD_INFO *pLoadInfo, + ID3DX10ThreadPump* pPump, + ID3D10Resource** ppTexture, + HRESULT* pHResult); + +HRESULT WINAPI + D3DX10CreateTextureFromFileW( + ID3D10Device* pDevice, + LPCWSTR pSrcFile, + D3DX10_IMAGE_LOAD_INFO *pLoadInfo, + ID3DX10ThreadPump* pPump, + ID3D10Resource** ppTexture, + HRESULT* pHResult); + +#ifdef UNICODE +#define D3DX10CreateTextureFromFile D3DX10CreateTextureFromFileW +#else +#define D3DX10CreateTextureFromFile D3DX10CreateTextureFromFileA +#endif + + +// FromResource (resources in dll/exes) + +HRESULT WINAPI + D3DX10CreateShaderResourceViewFromResourceA( + ID3D10Device* pDevice, + HMODULE hSrcModule, + LPCSTR pSrcResource, + D3DX10_IMAGE_LOAD_INFO* pLoadInfo, + ID3DX10ThreadPump* pPump, + ID3D10ShaderResourceView** ppShaderResourceView, + HRESULT* pHResult); + +HRESULT WINAPI + D3DX10CreateShaderResourceViewFromResourceW( + ID3D10Device* pDevice, + HMODULE hSrcModule, + LPCWSTR pSrcResource, + D3DX10_IMAGE_LOAD_INFO* pLoadInfo, + ID3DX10ThreadPump* pPump, + ID3D10ShaderResourceView** ppShaderResourceView, + HRESULT* pHResult); + +#ifdef UNICODE +#define D3DX10CreateShaderResourceViewFromResource D3DX10CreateShaderResourceViewFromResourceW +#else +#define D3DX10CreateShaderResourceViewFromResource D3DX10CreateShaderResourceViewFromResourceA +#endif + +HRESULT WINAPI + D3DX10CreateTextureFromResourceA( + ID3D10Device* pDevice, + HMODULE hSrcModule, + LPCSTR pSrcResource, + D3DX10_IMAGE_LOAD_INFO *pLoadInfo, + ID3DX10ThreadPump* pPump, + ID3D10Resource** ppTexture, + HRESULT* pHResult); + +HRESULT WINAPI + D3DX10CreateTextureFromResourceW( + ID3D10Device* pDevice, + HMODULE hSrcModule, + LPCWSTR pSrcResource, + D3DX10_IMAGE_LOAD_INFO* pLoadInfo, + ID3DX10ThreadPump* pPump, + ID3D10Resource** ppTexture, + HRESULT* pHResult); + +#ifdef UNICODE +#define D3DX10CreateTextureFromResource D3DX10CreateTextureFromResourceW +#else +#define D3DX10CreateTextureFromResource D3DX10CreateTextureFromResourceA +#endif + + +// FromFileInMemory + +HRESULT WINAPI + D3DX10CreateShaderResourceViewFromMemory( + ID3D10Device* pDevice, + LPCVOID pSrcData, + SIZE_T SrcDataSize, + D3DX10_IMAGE_LOAD_INFO* pLoadInfo, + ID3DX10ThreadPump* pPump, + ID3D10ShaderResourceView** ppShaderResourceView, + HRESULT* pHResult); + +HRESULT WINAPI + D3DX10CreateTextureFromMemory( + ID3D10Device* pDevice, + LPCVOID pSrcData, + SIZE_T SrcDataSize, + D3DX10_IMAGE_LOAD_INFO* pLoadInfo, + ID3DX10ThreadPump* pPump, + ID3D10Resource** ppTexture, + HRESULT* pHResult); + + +////////////////////////////////////////////////////////////////////////////// +// Misc Texture APIs ///////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +//---------------------------------------------------------------------------- +// D3DX10_TEXTURE_LOAD_INFO: +// ------------------------ +// +//---------------------------------------------------------------------------- + +typedef struct _D3DX10_TEXTURE_LOAD_INFO +{ + D3D10_BOX *pSrcBox; + D3D10_BOX *pDstBox; + UINT SrcFirstMip; + UINT DstFirstMip; + UINT NumMips; + UINT SrcFirstElement; + UINT DstFirstElement; + UINT NumElements; + UINT Filter; + UINT MipFilter; + +#ifdef __cplusplus + _D3DX10_TEXTURE_LOAD_INFO() + { + pSrcBox = NULL; + pDstBox = NULL; + SrcFirstMip = 0; + DstFirstMip = 0; + NumMips = D3DX10_DEFAULT; + SrcFirstElement = 0; + DstFirstElement = 0; + NumElements = D3DX10_DEFAULT; + Filter = D3DX10_DEFAULT; + MipFilter = D3DX10_DEFAULT; + } +#endif + +} D3DX10_TEXTURE_LOAD_INFO; + + +//---------------------------------------------------------------------------- +// D3DX10LoadTextureFromTexture: +// ---------------------------- +// Load a texture from a texture. +// +// Parameters: +// +//---------------------------------------------------------------------------- + + +HRESULT WINAPI + D3DX10LoadTextureFromTexture( + ID3D10Resource *pSrcTexture, + D3DX10_TEXTURE_LOAD_INFO *pLoadInfo, + ID3D10Resource *pDstTexture); + + +//---------------------------------------------------------------------------- +// D3DX10FilterTexture: +// ------------------ +// Filters mipmaps levels of a texture. +// +// Parameters: +// pBaseTexture +// The texture object to be filtered +// SrcLevel +// The level whose image is used to generate the subsequent levels. +// MipFilter +// D3DX10_FILTER flags controlling how each miplevel is filtered. +// Or D3DX10_DEFAULT for D3DX10_FILTER_BOX, +// +//---------------------------------------------------------------------------- + +HRESULT WINAPI + D3DX10FilterTexture( + ID3D10Resource *pTexture, + UINT SrcLevel, + UINT MipFilter); + + +//---------------------------------------------------------------------------- +// D3DX10SaveTextureToFile: +// ---------------------- +// Save a texture to a file. +// +// Parameters: +// pDestFile +// File name of the destination file +// DestFormat +// D3DX10_IMAGE_FILE_FORMAT specifying file format to use when saving. +// pSrcTexture +// Source texture, containing the image to be saved +// +//---------------------------------------------------------------------------- + +HRESULT WINAPI + D3DX10SaveTextureToFileA( + ID3D10Resource *pSrcTexture, + D3DX10_IMAGE_FILE_FORMAT DestFormat, + LPCSTR pDestFile); + +HRESULT WINAPI + D3DX10SaveTextureToFileW( + ID3D10Resource *pSrcTexture, + D3DX10_IMAGE_FILE_FORMAT DestFormat, + LPCWSTR pDestFile); + +#ifdef UNICODE +#define D3DX10SaveTextureToFile D3DX10SaveTextureToFileW +#else +#define D3DX10SaveTextureToFile D3DX10SaveTextureToFileA +#endif + + +//---------------------------------------------------------------------------- +// D3DX10SaveTextureToMemory: +// ---------------------- +// Save a texture to a blob. +// +// Parameters: +// pSrcTexture +// Source texture, containing the image to be saved +// DestFormat +// D3DX10_IMAGE_FILE_FORMAT specifying file format to use when saving. +// ppDestBuf +// address of a d3dxbuffer pointer to return the image data +// Flags +// optional flags +//---------------------------------------------------------------------------- + +HRESULT WINAPI + D3DX10SaveTextureToMemory( + ID3D10Resource* pSrcTexture, + D3DX10_IMAGE_FILE_FORMAT DestFormat, + LPD3D10BLOB* ppDestBuf, + UINT Flags); + + +//---------------------------------------------------------------------------- +// D3DX10ComputeNormalMap: +// --------------------- +// Converts a height map into a normal map. The (x,y,z) components of each +// normal are mapped to the (r,g,b) channels of the output texture. +// +// Parameters +// pSrcTexture +// Pointer to the source heightmap texture +// Flags +// D3DX10_NORMALMAP flags +// Channel +// D3DX10_CHANNEL specifying source of height information +// Amplitude +// The constant value which the height information is multiplied by. +// pDestTexture +// Pointer to the destination texture +//--------------------------------------------------------------------------- + +HRESULT WINAPI + D3DX10ComputeNormalMap( + ID3D10Texture2D *pSrcTexture, + UINT Flags, + UINT Channel, + FLOAT Amplitude, + ID3D10Texture2D *pDestTexture); + + +//---------------------------------------------------------------------------- +// D3DX10SHProjectCubeMap: +// ---------------------- +// Projects a function represented in a cube map into spherical harmonics. +// +// Parameters: +// Order +// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 +// pCubeMap +// CubeMap that is going to be projected into spherical harmonics +// pROut +// Output SH vector for Red. +// pGOut +// Output SH vector for Green +// pBOut +// Output SH vector for Blue +// +//--------------------------------------------------------------------------- + +HRESULT WINAPI + D3DX10SHProjectCubeMap( + __in_range(2,6) UINT Order, + ID3D10Texture2D *pCubeMap, + __out_ecount(Order*Order) FLOAT *pROut, + __out_ecount_opt(Order*Order) FLOAT *pGOut, + __out_ecount_opt(Order*Order) FLOAT *pBOut); + +#ifdef __cplusplus +} +#endif //__cplusplus + +#endif //__D3DX10TEX_H__ + diff --git a/gfx/include/dxsdk/d3dx11.h b/gfx/include/dxsdk/d3dx11.h new file mode 100644 index 0000000000..103c782f17 --- /dev/null +++ b/gfx/include/dxsdk/d3dx11.h @@ -0,0 +1,74 @@ +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) Microsoft Corporation. All Rights Reserved. +// +// File: d3dx11.h +// Content: D3DX11 utility library +// +////////////////////////////////////////////////////////////////////////////// + +#ifdef __D3DX11_INTERNAL__ +#error Incorrect D3DX11 header used +#endif + +#ifndef __D3DX11_H__ +#define __D3DX11_H__ + + +// Defines +#include +#include + +#ifdef ALLOW_THROWING_NEW +#include +#endif + +#define D3DX11_DEFAULT ((UINT) -1) +#define D3DX11_FROM_FILE ((UINT) -3) +#define DXGI_FORMAT_FROM_FILE ((DXGI_FORMAT) -3) + +#ifndef D3DX11INLINE +#ifdef _MSC_VER + #if (_MSC_VER >= 1200) + #define D3DX11INLINE __forceinline + #else + #define D3DX11INLINE __inline + #endif +#else + #ifdef __cplusplus + #define D3DX11INLINE inline + #else + #define D3DX11INLINE + #endif +#endif +#endif + + + +// Includes +#include "d3d11.h" +#include "d3dx11.h" +#include "d3dx11core.h" +#include "d3dx11tex.h" +#include "d3dx11async.h" + + +// Errors +#define _FACDD 0x876 +#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) + +enum _D3DX11_ERR { + D3DX11_ERR_CANNOT_MODIFY_INDEX_BUFFER = MAKE_DDHRESULT(2900), + D3DX11_ERR_INVALID_MESH = MAKE_DDHRESULT(2901), + D3DX11_ERR_CANNOT_ATTR_SORT = MAKE_DDHRESULT(2902), + D3DX11_ERR_SKINNING_NOT_SUPPORTED = MAKE_DDHRESULT(2903), + D3DX11_ERR_TOO_MANY_INFLUENCES = MAKE_DDHRESULT(2904), + D3DX11_ERR_INVALID_DATA = MAKE_DDHRESULT(2905), + D3DX11_ERR_LOADED_MESH_HAS_NO_DATA = MAKE_DDHRESULT(2906), + D3DX11_ERR_DUPLICATE_NAMED_FRAGMENT = MAKE_DDHRESULT(2907), + D3DX11_ERR_CANNOT_REMOVE_LAST_ITEM = MAKE_DDHRESULT(2908), +}; + + +#endif //__D3DX11_H__ + diff --git a/gfx/include/dxsdk/d3dx11async.h b/gfx/include/dxsdk/d3dx11async.h new file mode 100644 index 0000000000..4586c55ecd --- /dev/null +++ b/gfx/include/dxsdk/d3dx11async.h @@ -0,0 +1,164 @@ + +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// File: D3DX11Async.h +// Content: D3DX11 Asynchronous Shader loaders / compilers +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef __D3DX11ASYNC_H__ +#define __D3DX11ASYNC_H__ + +#include "d3dx11.h" + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + + +//---------------------------------------------------------------------------- +// D3DX11Compile: +// ------------------ +// Compiles an effect or shader. +// +// Parameters: +// pSrcFile +// Source file name. +// hSrcModule +// Module handle. if NULL, current module will be used. +// pSrcResource +// Resource name in module. +// pSrcData +// Pointer to source code. +// SrcDataLen +// Size of source code, in bytes. +// pDefines +// Optional NULL-terminated array of preprocessor macro definitions. +// pInclude +// Optional interface pointer to use for handling #include directives. +// If this parameter is NULL, #includes will be honored when compiling +// from file, and will error when compiling from resource or memory. +// pFunctionName +// Name of the entrypoint function where execution should begin. +// pProfile +// Instruction set to be used when generating code. Currently supported +// profiles are "vs_1_1", "vs_2_0", "vs_2_a", "vs_2_sw", "vs_3_0", +// "vs_3_sw", "vs_4_0", "vs_4_1", +// "ps_2_0", "ps_2_a", "ps_2_b", "ps_2_sw", "ps_3_0", +// "ps_3_sw", "ps_4_0", "ps_4_1", +// "gs_4_0", "gs_4_1", +// "tx_1_0", +// "fx_4_0", "fx_4_1" +// Note that this entrypoint does not compile fx_2_0 targets, for that +// you need to use the D3DX9 function. +// Flags1 +// See D3D10_SHADER_xxx flags. +// Flags2 +// See D3D10_EFFECT_xxx flags. +// ppShader +// Returns a buffer containing the created shader. This buffer contains +// the compiled shader code, as well as any embedded debug and symbol +// table info. (See D3D10GetShaderConstantTable) +// ppErrorMsgs +// Returns a buffer containing a listing of errors and warnings that were +// encountered during the compile. If you are running in a debugger, +// these are the same messages you will see in your debug output. +// pHResult +// Pointer to a memory location to receive the return value upon completion. +// Maybe NULL if not needed. +// If pPump != NULL, pHResult must be a valid memory location until the +// the asynchronous execution completes. +//---------------------------------------------------------------------------- + +HRESULT WINAPI D3DX11CompileFromFileA(LPCSTR pSrcFile,CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, + LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, ID3DX11ThreadPump* pPump, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); + +HRESULT WINAPI D3DX11CompileFromFileW(LPCWSTR pSrcFile, CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, + LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, ID3DX11ThreadPump* pPump, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); + +#ifdef UNICODE +#define D3DX11CompileFromFile D3DX11CompileFromFileW +#else +#define D3DX11CompileFromFile D3DX11CompileFromFileA +#endif + +HRESULT WINAPI D3DX11CompileFromResourceA(HMODULE hSrcModule, LPCSTR pSrcResource, LPCSTR pSrcFileName, CONST D3D10_SHADER_MACRO* pDefines, + LPD3D10INCLUDE pInclude, LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, ID3DX11ThreadPump* pPump, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); + +HRESULT WINAPI D3DX11CompileFromResourceW(HMODULE hSrcModule, LPCWSTR pSrcResource, LPCWSTR pSrcFileName, CONST D3D10_SHADER_MACRO* pDefines, + LPD3D10INCLUDE pInclude, LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, ID3DX11ThreadPump* pPump, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); + +#ifdef UNICODE +#define D3DX11CompileFromResource D3DX11CompileFromResourceW +#else +#define D3DX11CompileFromResource D3DX11CompileFromResourceA +#endif + +HRESULT WINAPI D3DX11CompileFromMemory(LPCSTR pSrcData, SIZE_T SrcDataLen, LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, + LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, ID3DX11ThreadPump* pPump, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); + +HRESULT WINAPI D3DX11PreprocessShaderFromFileA(LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, + LPD3D10INCLUDE pInclude, ID3DX11ThreadPump *pPump, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); + +HRESULT WINAPI D3DX11PreprocessShaderFromFileW(LPCWSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, + LPD3D10INCLUDE pInclude, ID3DX11ThreadPump *pPump, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); + +HRESULT WINAPI D3DX11PreprocessShaderFromMemory(LPCSTR pSrcData, SIZE_T SrcDataSize, LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, + LPD3D10INCLUDE pInclude, ID3DX11ThreadPump *pPump, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); + +HRESULT WINAPI D3DX11PreprocessShaderFromResourceA(HMODULE hModule, LPCSTR pResourceName, LPCSTR pSrcFileName, CONST D3D10_SHADER_MACRO* pDefines, + LPD3D10INCLUDE pInclude, ID3DX11ThreadPump *pPump, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); + +HRESULT WINAPI D3DX11PreprocessShaderFromResourceW(HMODULE hModule, LPCWSTR pResourceName, LPCWSTR pSrcFileName, CONST D3D10_SHADER_MACRO* pDefines, + LPD3D10INCLUDE pInclude, ID3DX11ThreadPump *pPump, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); + +#ifdef UNICODE +#define D3DX11PreprocessShaderFromFile D3DX11PreprocessShaderFromFileW +#define D3DX11PreprocessShaderFromResource D3DX11PreprocessShaderFromResourceW +#else +#define D3DX11PreprocessShaderFromFile D3DX11PreprocessShaderFromFileA +#define D3DX11PreprocessShaderFromResource D3DX11PreprocessShaderFromResourceA +#endif + +//---------------------------------------------------------------------------- +// Async processors +//---------------------------------------------------------------------------- + +HRESULT WINAPI D3DX11CreateAsyncCompilerProcessor(LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, + LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, + ID3D10Blob **ppCompiledShader, ID3D10Blob **ppErrorBuffer, ID3DX11DataProcessor **ppProcessor); + +HRESULT WINAPI D3DX11CreateAsyncShaderPreprocessProcessor(LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, + ID3D10Blob** ppShaderText, ID3D10Blob **ppErrorBuffer, ID3DX11DataProcessor **ppProcessor); + +//---------------------------------------------------------------------------- +// D3DX11 Asynchronous texture I/O (advanced mode) +//---------------------------------------------------------------------------- + +HRESULT WINAPI D3DX11CreateAsyncFileLoaderW(LPCWSTR pFileName, ID3DX11DataLoader **ppDataLoader); +HRESULT WINAPI D3DX11CreateAsyncFileLoaderA(LPCSTR pFileName, ID3DX11DataLoader **ppDataLoader); +HRESULT WINAPI D3DX11CreateAsyncMemoryLoader(LPCVOID pData, SIZE_T cbData, ID3DX11DataLoader **ppDataLoader); +HRESULT WINAPI D3DX11CreateAsyncResourceLoaderW(HMODULE hSrcModule, LPCWSTR pSrcResource, ID3DX11DataLoader **ppDataLoader); +HRESULT WINAPI D3DX11CreateAsyncResourceLoaderA(HMODULE hSrcModule, LPCSTR pSrcResource, ID3DX11DataLoader **ppDataLoader); + +#ifdef UNICODE +#define D3DX11CreateAsyncFileLoader D3DX11CreateAsyncFileLoaderW +#define D3DX11CreateAsyncResourceLoader D3DX11CreateAsyncResourceLoaderW +#else +#define D3DX11CreateAsyncFileLoader D3DX11CreateAsyncFileLoaderA +#define D3DX11CreateAsyncResourceLoader D3DX11CreateAsyncResourceLoaderA +#endif + +HRESULT WINAPI D3DX11CreateAsyncTextureProcessor(ID3D11Device *pDevice, D3DX11_IMAGE_LOAD_INFO *pLoadInfo, ID3DX11DataProcessor **ppDataProcessor); +HRESULT WINAPI D3DX11CreateAsyncTextureInfoProcessor(D3DX11_IMAGE_INFO *pImageInfo, ID3DX11DataProcessor **ppDataProcessor); +HRESULT WINAPI D3DX11CreateAsyncShaderResourceViewProcessor(ID3D11Device *pDevice, D3DX11_IMAGE_LOAD_INFO *pLoadInfo, ID3DX11DataProcessor **ppDataProcessor); + +#ifdef __cplusplus +} +#endif //__cplusplus + +#endif //__D3DX11ASYNC_H__ + + diff --git a/gfx/include/dxsdk/d3dx11core.h b/gfx/include/dxsdk/d3dx11core.h new file mode 100644 index 0000000000..18e99351e0 --- /dev/null +++ b/gfx/include/dxsdk/d3dx11core.h @@ -0,0 +1,128 @@ +/////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) Microsoft Corporation. All Rights Reserved. +// +// File: d3dx11core.h +// Content: D3DX11 core types and functions +// +/////////////////////////////////////////////////////////////////////////// + +#include "d3dx11.h" + +#ifndef __D3DX11CORE_H__ +#define __D3DX11CORE_H__ + +// Current name of the DLL shipped in the same SDK as this header. + + +#define D3DX11_DLL_W L"d3dx11_43.dll" +#define D3DX11_DLL_A "d3dx11_43.dll" + +#ifdef UNICODE + #define D3DX11_DLL D3DX11_DLL_W +#else + #define D3DX11_DLL D3DX11_DLL_A +#endif + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + +/////////////////////////////////////////////////////////////////////////// +// D3DX11_SDK_VERSION: +// ----------------- +// This identifier is passed to D3DX11CheckVersion in order to ensure that an +// application was built against the correct header files and lib files. +// This number is incremented whenever a header (or other) change would +// require applications to be rebuilt. If the version doesn't match, +// D3DX11CreateVersion will return FALSE. (The number itself has no meaning.) +/////////////////////////////////////////////////////////////////////////// + + +#define D3DX11_SDK_VERSION 43 + + +#ifdef D3D_DIAG_DLL +BOOL WINAPI D3DX11DebugMute(BOOL Mute); +#endif +HRESULT WINAPI D3DX11CheckVersion(UINT D3DSdkVersion, UINT D3DX11SdkVersion); + +#ifdef __cplusplus +} +#endif //__cplusplus + + + +////////////////////////////////////////////////////////////////////////////// +// ID3DX11ThreadPump: +////////////////////////////////////////////////////////////////////////////// + +#undef INTERFACE +#define INTERFACE ID3DX11DataLoader + +DECLARE_INTERFACE(ID3DX11DataLoader) +{ + STDMETHOD(Load)(THIS) PURE; + STDMETHOD(Decompress)(THIS_ void **ppData, SIZE_T *pcBytes) PURE; + STDMETHOD(Destroy)(THIS) PURE; +}; + +#undef INTERFACE +#define INTERFACE ID3DX11DataProcessor + +DECLARE_INTERFACE(ID3DX11DataProcessor) +{ + STDMETHOD(Process)(THIS_ void *pData, SIZE_T cBytes) PURE; + STDMETHOD(CreateDeviceObject)(THIS_ void **ppDataObject) PURE; + STDMETHOD(Destroy)(THIS) PURE; +}; + +// {C93FECFA-6967-478a-ABBC-402D90621FCB} +DEFINE_GUID(IID_ID3DX11ThreadPump, +0xc93fecfa, 0x6967, 0x478a, 0xab, 0xbc, 0x40, 0x2d, 0x90, 0x62, 0x1f, 0xcb); + +#undef INTERFACE +#define INTERFACE ID3DX11ThreadPump + +DECLARE_INTERFACE_(ID3DX11ThreadPump, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // ID3DX11ThreadPump + STDMETHOD(AddWorkItem)(THIS_ ID3DX11DataLoader *pDataLoader, ID3DX11DataProcessor *pDataProcessor, HRESULT *pHResult, void **ppDeviceObject) PURE; + STDMETHOD_(UINT, GetWorkItemCount)(THIS) PURE; + + STDMETHOD(WaitForAllItems)(THIS) PURE; + STDMETHOD(ProcessDeviceWorkItems)(THIS_ UINT iWorkItemCount); + + STDMETHOD(PurgeAllItems)(THIS) PURE; + STDMETHOD(GetQueueStatus)(THIS_ UINT *pIoQueue, UINT *pProcessQueue, UINT *pDeviceQueue) PURE; + +}; + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + +HRESULT WINAPI D3DX11CreateThreadPump(UINT cIoThreads, UINT cProcThreads, ID3DX11ThreadPump **ppThreadPump); + +HRESULT WINAPI D3DX11UnsetAllDeviceObjects(ID3D11DeviceContext *pContext); + +#ifdef __cplusplus +} +#endif //__cplusplus + +/////////////////////////////////////////////////////////////////////////// + +#define _FACD3D 0x876 +#define MAKE_D3DHRESULT( code ) MAKE_HRESULT( 1, _FACD3D, code ) +#define MAKE_D3DSTATUS( code ) MAKE_HRESULT( 0, _FACD3D, code ) + +#define D3DERR_INVALIDCALL MAKE_D3DHRESULT(2156) +#define D3DERR_WASSTILLDRAWING MAKE_D3DHRESULT(540) + +#endif //__D3DX11CORE_H__ + diff --git a/gfx/include/dxsdk/d3dx11tex.h b/gfx/include/dxsdk/d3dx11tex.h new file mode 100644 index 0000000000..16c0409136 --- /dev/null +++ b/gfx/include/dxsdk/d3dx11tex.h @@ -0,0 +1,772 @@ +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) Microsoft Corporation. All Rights Reserved. +// +// File: d3dx11tex.h +// Content: D3DX11 texturing APIs +// +////////////////////////////////////////////////////////////////////////////// + +#include "d3dx11.h" + +#ifndef __D3DX11TEX_H__ +#define __D3DX11TEX_H__ + + +//---------------------------------------------------------------------------- +// D3DX11_FILTER flags: +// ------------------ +// +// A valid filter must contain one of these values: +// +// D3DX11_FILTER_NONE +// No scaling or filtering will take place. Pixels outside the bounds +// of the source image are assumed to be transparent black. +// D3DX11_FILTER_POINT +// Each destination pixel is computed by sampling the nearest pixel +// from the source image. +// D3DX11_FILTER_LINEAR +// Each destination pixel is computed by linearly interpolating between +// the nearest pixels in the source image. This filter works best +// when the scale on each axis is less than 2. +// D3DX11_FILTER_TRIANGLE +// Every pixel in the source image contributes equally to the +// destination image. This is the slowest of all the filters. +// D3DX11_FILTER_BOX +// Each pixel is computed by averaging a 2x2(x2) box pixels from +// the source image. Only works when the dimensions of the +// destination are half those of the source. (as with mip maps) +// +// And can be OR'd with any of these optional flags: +// +// D3DX11_FILTER_MIRROR_U +// Indicates that pixels off the edge of the texture on the U-axis +// should be mirrored, not wraped. +// D3DX11_FILTER_MIRROR_V +// Indicates that pixels off the edge of the texture on the V-axis +// should be mirrored, not wraped. +// D3DX11_FILTER_MIRROR_W +// Indicates that pixels off the edge of the texture on the W-axis +// should be mirrored, not wraped. +// D3DX11_FILTER_MIRROR +// Same as specifying D3DX11_FILTER_MIRROR_U | D3DX11_FILTER_MIRROR_V | +// D3DX11_FILTER_MIRROR_V +// D3DX11_FILTER_DITHER +// Dithers the resulting image using a 4x4 order dither pattern. +// D3DX11_FILTER_SRGB_IN +// Denotes that the input data is in sRGB (gamma 2.2) colorspace. +// D3DX11_FILTER_SRGB_OUT +// Denotes that the output data is in sRGB (gamma 2.2) colorspace. +// D3DX11_FILTER_SRGB +// Same as specifying D3DX11_FILTER_SRGB_IN | D3DX11_FILTER_SRGB_OUT +// +//---------------------------------------------------------------------------- + +typedef enum D3DX11_FILTER_FLAG +{ + D3DX11_FILTER_NONE = (1 << 0), + D3DX11_FILTER_POINT = (2 << 0), + D3DX11_FILTER_LINEAR = (3 << 0), + D3DX11_FILTER_TRIANGLE = (4 << 0), + D3DX11_FILTER_BOX = (5 << 0), + + D3DX11_FILTER_MIRROR_U = (1 << 16), + D3DX11_FILTER_MIRROR_V = (2 << 16), + D3DX11_FILTER_MIRROR_W = (4 << 16), + D3DX11_FILTER_MIRROR = (7 << 16), + + D3DX11_FILTER_DITHER = (1 << 19), + D3DX11_FILTER_DITHER_DIFFUSION= (2 << 19), + + D3DX11_FILTER_SRGB_IN = (1 << 21), + D3DX11_FILTER_SRGB_OUT = (2 << 21), + D3DX11_FILTER_SRGB = (3 << 21), +} D3DX11_FILTER_FLAG; + +//---------------------------------------------------------------------------- +// D3DX11_NORMALMAP flags: +// --------------------- +// These flags are used to control how D3DX11ComputeNormalMap generates normal +// maps. Any number of these flags may be OR'd together in any combination. +// +// D3DX11_NORMALMAP_MIRROR_U +// Indicates that pixels off the edge of the texture on the U-axis +// should be mirrored, not wraped. +// D3DX11_NORMALMAP_MIRROR_V +// Indicates that pixels off the edge of the texture on the V-axis +// should be mirrored, not wraped. +// D3DX11_NORMALMAP_MIRROR +// Same as specifying D3DX11_NORMALMAP_MIRROR_U | D3DX11_NORMALMAP_MIRROR_V +// D3DX11_NORMALMAP_INVERTSIGN +// Inverts the direction of each normal +// D3DX11_NORMALMAP_COMPUTE_OCCLUSION +// Compute the per pixel Occlusion term and encodes it into the alpha. +// An Alpha of 1 means that the pixel is not obscured in anyway, and +// an alpha of 0 would mean that the pixel is completly obscured. +// +//---------------------------------------------------------------------------- + +typedef enum D3DX11_NORMALMAP_FLAG +{ + D3DX11_NORMALMAP_MIRROR_U = (1 << 16), + D3DX11_NORMALMAP_MIRROR_V = (2 << 16), + D3DX11_NORMALMAP_MIRROR = (3 << 16), + D3DX11_NORMALMAP_INVERTSIGN = (8 << 16), + D3DX11_NORMALMAP_COMPUTE_OCCLUSION = (16 << 16), +} D3DX11_NORMALMAP_FLAG; + +//---------------------------------------------------------------------------- +// D3DX11_CHANNEL flags: +// ------------------- +// These flags are used by functions which operate on or more channels +// in a texture. +// +// D3DX11_CHANNEL_RED +// Indicates the red channel should be used +// D3DX11_CHANNEL_BLUE +// Indicates the blue channel should be used +// D3DX11_CHANNEL_GREEN +// Indicates the green channel should be used +// D3DX11_CHANNEL_ALPHA +// Indicates the alpha channel should be used +// D3DX11_CHANNEL_LUMINANCE +// Indicates the luminaces of the red green and blue channels should be +// used. +// +//---------------------------------------------------------------------------- + +typedef enum D3DX11_CHANNEL_FLAG +{ + D3DX11_CHANNEL_RED = (1 << 0), + D3DX11_CHANNEL_BLUE = (1 << 1), + D3DX11_CHANNEL_GREEN = (1 << 2), + D3DX11_CHANNEL_ALPHA = (1 << 3), + D3DX11_CHANNEL_LUMINANCE = (1 << 4), +} D3DX11_CHANNEL_FLAG; + + + +//---------------------------------------------------------------------------- +// D3DX11_IMAGE_FILE_FORMAT: +// --------------------- +// This enum is used to describe supported image file formats. +// +//---------------------------------------------------------------------------- + +typedef enum D3DX11_IMAGE_FILE_FORMAT +{ + D3DX11_IFF_BMP = 0, + D3DX11_IFF_JPG = 1, + D3DX11_IFF_PNG = 3, + D3DX11_IFF_DDS = 4, + D3DX11_IFF_TIFF = 10, + D3DX11_IFF_GIF = 11, + D3DX11_IFF_WMP = 12, + D3DX11_IFF_FORCE_DWORD = 0x7fffffff + +} D3DX11_IMAGE_FILE_FORMAT; + + +//---------------------------------------------------------------------------- +// D3DX11_SAVE_TEXTURE_FLAG: +// --------------------- +// This enum is used to support texture saving options. +// +//---------------------------------------------------------------------------- + +typedef enum D3DX11_SAVE_TEXTURE_FLAG +{ + D3DX11_STF_USEINPUTBLOB = 0x0001, +} D3DX11_SAVE_TEXTURE_FLAG; + + +//---------------------------------------------------------------------------- +// D3DX11_IMAGE_INFO: +// --------------- +// This structure is used to return a rough description of what the +// the original contents of an image file looked like. +// +// Width +// Width of original image in pixels +// Height +// Height of original image in pixels +// Depth +// Depth of original image in pixels +// ArraySize +// Array size in textures +// MipLevels +// Number of mip levels in original image +// MiscFlags +// Miscellaneous flags +// Format +// D3D format which most closely describes the data in original image +// ResourceDimension +// D3D11_RESOURCE_DIMENSION representing the dimension of texture stored in the file. +// D3D11_RESOURCE_DIMENSION_TEXTURE1D, 2D, 3D +// ImageFileFormat +// D3DX11_IMAGE_FILE_FORMAT representing the format of the image file. +//---------------------------------------------------------------------------- + +typedef struct D3DX11_IMAGE_INFO +{ + UINT Width; + UINT Height; + UINT Depth; + UINT ArraySize; + UINT MipLevels; + UINT MiscFlags; + DXGI_FORMAT Format; + D3D11_RESOURCE_DIMENSION ResourceDimension; + D3DX11_IMAGE_FILE_FORMAT ImageFileFormat; +} D3DX11_IMAGE_INFO; + + + + + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + + + +////////////////////////////////////////////////////////////////////////////// +// Image File APIs /////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +//---------------------------------------------------------------------------- +// D3DX11_IMAGE_LOAD_INFO: +// --------------- +// This structure can be optionally passed in to texture loader APIs to +// control how textures get loaded. Pass in D3DX11_DEFAULT for any of these +// to have D3DX automatically pick defaults based on the source file. +// +// Width +// Rescale texture to Width texels wide +// Height +// Rescale texture to Height texels high +// Depth +// Rescale texture to Depth texels deep +// FirstMipLevel +// First mip level to load +// MipLevels +// Number of mip levels to load after the first level +// Usage +// D3D11_USAGE flag for the new texture +// BindFlags +// D3D11 Bind flags for the new texture +// CpuAccessFlags +// D3D11 CPU Access flags for the new texture +// MiscFlags +// Reserved. Must be 0 +// Format +// Resample texture to the specified format +// Filter +// Filter the texture using the specified filter (only when resampling) +// MipFilter +// Filter the texture mip levels using the specified filter (only if +// generating mips) +// pSrcInfo +// (optional) pointer to a D3DX11_IMAGE_INFO structure that will get +// populated with source image information +//---------------------------------------------------------------------------- + + +typedef struct D3DX11_IMAGE_LOAD_INFO +{ + UINT Width; + UINT Height; + UINT Depth; + UINT FirstMipLevel; + UINT MipLevels; + D3D11_USAGE Usage; + UINT BindFlags; + UINT CpuAccessFlags; + UINT MiscFlags; + DXGI_FORMAT Format; + UINT Filter; + UINT MipFilter; + D3DX11_IMAGE_INFO* pSrcInfo; + +#ifdef __cplusplus + D3DX11_IMAGE_LOAD_INFO() + { + Width = D3DX11_DEFAULT; + Height = D3DX11_DEFAULT; + Depth = D3DX11_DEFAULT; + FirstMipLevel = D3DX11_DEFAULT; + MipLevels = D3DX11_DEFAULT; + Usage = (D3D11_USAGE) D3DX11_DEFAULT; + BindFlags = D3DX11_DEFAULT; + CpuAccessFlags = D3DX11_DEFAULT; + MiscFlags = D3DX11_DEFAULT; + Format = DXGI_FORMAT_FROM_FILE; + Filter = D3DX11_DEFAULT; + MipFilter = D3DX11_DEFAULT; + pSrcInfo = NULL; + } +#endif + +} D3DX11_IMAGE_LOAD_INFO; + +//------------------------------------------------------------------------------- +// GetImageInfoFromFile/Resource/Memory: +// ------------------------------ +// Fills in a D3DX11_IMAGE_INFO struct with information about an image file. +// +// Parameters: +// pSrcFile +// File name of the source image. +// pSrcModule +// Module where resource is located, or NULL for module associated +// with image the os used to create the current process. +// pSrcResource +// Resource name. +// pSrcData +// Pointer to file in memory. +// SrcDataSize +// Size in bytes of file in memory. +// pPump +// Optional pointer to a thread pump object to use. +// pSrcInfo +// Pointer to a D3DX11_IMAGE_INFO structure to be filled in with the +// description of the data in the source image file. +// pHResult +// Pointer to a memory location to receive the return value upon completion. +// Maybe NULL if not needed. +// If pPump != NULL, pHResult must be a valid memory location until the +// the asynchronous execution completes. +//------------------------------------------------------------------------------- + +HRESULT WINAPI + D3DX11GetImageInfoFromFileA( + LPCSTR pSrcFile, + ID3DX11ThreadPump* pPump, + D3DX11_IMAGE_INFO* pSrcInfo, + HRESULT* pHResult); + +HRESULT WINAPI + D3DX11GetImageInfoFromFileW( + LPCWSTR pSrcFile, + ID3DX11ThreadPump* pPump, + D3DX11_IMAGE_INFO* pSrcInfo, + HRESULT* pHResult); + +#ifdef UNICODE +#define D3DX11GetImageInfoFromFile D3DX11GetImageInfoFromFileW +#else +#define D3DX11GetImageInfoFromFile D3DX11GetImageInfoFromFileA +#endif + + +HRESULT WINAPI + D3DX11GetImageInfoFromResourceA( + HMODULE hSrcModule, + LPCSTR pSrcResource, + ID3DX11ThreadPump* pPump, + D3DX11_IMAGE_INFO* pSrcInfo, + HRESULT* pHResult); + +HRESULT WINAPI + D3DX11GetImageInfoFromResourceW( + HMODULE hSrcModule, + LPCWSTR pSrcResource, + ID3DX11ThreadPump* pPump, + D3DX11_IMAGE_INFO* pSrcInfo, + HRESULT* pHResult); + +#ifdef UNICODE +#define D3DX11GetImageInfoFromResource D3DX11GetImageInfoFromResourceW +#else +#define D3DX11GetImageInfoFromResource D3DX11GetImageInfoFromResourceA +#endif + + +HRESULT WINAPI + D3DX11GetImageInfoFromMemory( + LPCVOID pSrcData, + SIZE_T SrcDataSize, + ID3DX11ThreadPump* pPump, + D3DX11_IMAGE_INFO* pSrcInfo, + HRESULT* pHResult); + + +////////////////////////////////////////////////////////////////////////////// +// Create/Save Texture APIs ////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +//---------------------------------------------------------------------------- +// D3DX11CreateTextureFromFile/Resource/Memory: +// D3DX11CreateShaderResourceViewFromFile/Resource/Memory: +// ----------------------------------- +// Create a texture object from a file or resource. +// +// Parameters: +// +// pDevice +// The D3D device with which the texture is going to be used. +// pSrcFile +// File name. +// hSrcModule +// Module handle. if NULL, current module will be used. +// pSrcResource +// Resource name in module +// pvSrcData +// Pointer to file in memory. +// SrcDataSize +// Size in bytes of file in memory. +// pLoadInfo +// Optional pointer to a D3DX11_IMAGE_LOAD_INFO structure that +// contains additional loader parameters. +// pPump +// Optional pointer to a thread pump object to use. +// ppTexture +// [out] Created texture object. +// ppShaderResourceView +// [out] Shader resource view object created. +// pHResult +// Pointer to a memory location to receive the return value upon completion. +// Maybe NULL if not needed. +// If pPump != NULL, pHResult must be a valid memory location until the +// the asynchronous execution completes. +// +//---------------------------------------------------------------------------- + + +// FromFile + +HRESULT WINAPI + D3DX11CreateShaderResourceViewFromFileA( + ID3D11Device* pDevice, + LPCSTR pSrcFile, + D3DX11_IMAGE_LOAD_INFO *pLoadInfo, + ID3DX11ThreadPump* pPump, + ID3D11ShaderResourceView** ppShaderResourceView, + HRESULT* pHResult); + +HRESULT WINAPI + D3DX11CreateShaderResourceViewFromFileW( + ID3D11Device* pDevice, + LPCWSTR pSrcFile, + D3DX11_IMAGE_LOAD_INFO *pLoadInfo, + ID3DX11ThreadPump* pPump, + ID3D11ShaderResourceView** ppShaderResourceView, + HRESULT* pHResult); + +#ifdef UNICODE +#define D3DX11CreateShaderResourceViewFromFile D3DX11CreateShaderResourceViewFromFileW +#else +#define D3DX11CreateShaderResourceViewFromFile D3DX11CreateShaderResourceViewFromFileA +#endif + +HRESULT WINAPI + D3DX11CreateTextureFromFileA( + ID3D11Device* pDevice, + LPCSTR pSrcFile, + D3DX11_IMAGE_LOAD_INFO *pLoadInfo, + ID3DX11ThreadPump* pPump, + ID3D11Resource** ppTexture, + HRESULT* pHResult); + +HRESULT WINAPI + D3DX11CreateTextureFromFileW( + ID3D11Device* pDevice, + LPCWSTR pSrcFile, + D3DX11_IMAGE_LOAD_INFO *pLoadInfo, + ID3DX11ThreadPump* pPump, + ID3D11Resource** ppTexture, + HRESULT* pHResult); + +#ifdef UNICODE +#define D3DX11CreateTextureFromFile D3DX11CreateTextureFromFileW +#else +#define D3DX11CreateTextureFromFile D3DX11CreateTextureFromFileA +#endif + + +// FromResource (resources in dll/exes) + +HRESULT WINAPI + D3DX11CreateShaderResourceViewFromResourceA( + ID3D11Device* pDevice, + HMODULE hSrcModule, + LPCSTR pSrcResource, + D3DX11_IMAGE_LOAD_INFO* pLoadInfo, + ID3DX11ThreadPump* pPump, + ID3D11ShaderResourceView** ppShaderResourceView, + HRESULT* pHResult); + +HRESULT WINAPI + D3DX11CreateShaderResourceViewFromResourceW( + ID3D11Device* pDevice, + HMODULE hSrcModule, + LPCWSTR pSrcResource, + D3DX11_IMAGE_LOAD_INFO* pLoadInfo, + ID3DX11ThreadPump* pPump, + ID3D11ShaderResourceView** ppShaderResourceView, + HRESULT* pHResult); + +#ifdef UNICODE +#define D3DX11CreateShaderResourceViewFromResource D3DX11CreateShaderResourceViewFromResourceW +#else +#define D3DX11CreateShaderResourceViewFromResource D3DX11CreateShaderResourceViewFromResourceA +#endif + +HRESULT WINAPI + D3DX11CreateTextureFromResourceA( + ID3D11Device* pDevice, + HMODULE hSrcModule, + LPCSTR pSrcResource, + D3DX11_IMAGE_LOAD_INFO *pLoadInfo, + ID3DX11ThreadPump* pPump, + ID3D11Resource** ppTexture, + HRESULT* pHResult); + +HRESULT WINAPI + D3DX11CreateTextureFromResourceW( + ID3D11Device* pDevice, + HMODULE hSrcModule, + LPCWSTR pSrcResource, + D3DX11_IMAGE_LOAD_INFO* pLoadInfo, + ID3DX11ThreadPump* pPump, + ID3D11Resource** ppTexture, + HRESULT* pHResult); + +#ifdef UNICODE +#define D3DX11CreateTextureFromResource D3DX11CreateTextureFromResourceW +#else +#define D3DX11CreateTextureFromResource D3DX11CreateTextureFromResourceA +#endif + + +// FromFileInMemory + +HRESULT WINAPI + D3DX11CreateShaderResourceViewFromMemory( + ID3D11Device* pDevice, + LPCVOID pSrcData, + SIZE_T SrcDataSize, + D3DX11_IMAGE_LOAD_INFO* pLoadInfo, + ID3DX11ThreadPump* pPump, + ID3D11ShaderResourceView** ppShaderResourceView, + HRESULT* pHResult); + +HRESULT WINAPI + D3DX11CreateTextureFromMemory( + ID3D11Device* pDevice, + LPCVOID pSrcData, + SIZE_T SrcDataSize, + D3DX11_IMAGE_LOAD_INFO* pLoadInfo, + ID3DX11ThreadPump* pPump, + ID3D11Resource** ppTexture, + HRESULT* pHResult); + + +////////////////////////////////////////////////////////////////////////////// +// Misc Texture APIs ///////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +//---------------------------------------------------------------------------- +// D3DX11_TEXTURE_LOAD_INFO: +// ------------------------ +// +//---------------------------------------------------------------------------- + +typedef struct _D3DX11_TEXTURE_LOAD_INFO +{ + D3D11_BOX *pSrcBox; + D3D11_BOX *pDstBox; + UINT SrcFirstMip; + UINT DstFirstMip; + UINT NumMips; + UINT SrcFirstElement; + UINT DstFirstElement; + UINT NumElements; + UINT Filter; + UINT MipFilter; + +#ifdef __cplusplus + _D3DX11_TEXTURE_LOAD_INFO() + { + pSrcBox = NULL; + pDstBox = NULL; + SrcFirstMip = 0; + DstFirstMip = 0; + NumMips = D3DX11_DEFAULT; + SrcFirstElement = 0; + DstFirstElement = 0; + NumElements = D3DX11_DEFAULT; + Filter = D3DX11_DEFAULT; + MipFilter = D3DX11_DEFAULT; + } +#endif + +} D3DX11_TEXTURE_LOAD_INFO; + + +//---------------------------------------------------------------------------- +// D3DX11LoadTextureFromTexture: +// ---------------------------- +// Load a texture from a texture. +// +// Parameters: +// +//---------------------------------------------------------------------------- + + +HRESULT WINAPI + D3DX11LoadTextureFromTexture( + ID3D11DeviceContext *pContext, + ID3D11Resource *pSrcTexture, + D3DX11_TEXTURE_LOAD_INFO *pLoadInfo, + ID3D11Resource *pDstTexture); + + +//---------------------------------------------------------------------------- +// D3DX11FilterTexture: +// ------------------ +// Filters mipmaps levels of a texture. +// +// Parameters: +// pBaseTexture +// The texture object to be filtered +// SrcLevel +// The level whose image is used to generate the subsequent levels. +// MipFilter +// D3DX11_FILTER flags controlling how each miplevel is filtered. +// Or D3DX11_DEFAULT for D3DX11_FILTER_BOX, +// +//---------------------------------------------------------------------------- + +HRESULT WINAPI + D3DX11FilterTexture( + ID3D11DeviceContext *pContext, + ID3D11Resource *pTexture, + UINT SrcLevel, + UINT MipFilter); + + +//---------------------------------------------------------------------------- +// D3DX11SaveTextureToFile: +// ---------------------- +// Save a texture to a file. +// +// Parameters: +// pDestFile +// File name of the destination file +// DestFormat +// D3DX11_IMAGE_FILE_FORMAT specifying file format to use when saving. +// pSrcTexture +// Source texture, containing the image to be saved +// +//---------------------------------------------------------------------------- + +HRESULT WINAPI + D3DX11SaveTextureToFileA( + ID3D11DeviceContext *pContext, + ID3D11Resource *pSrcTexture, + D3DX11_IMAGE_FILE_FORMAT DestFormat, + LPCSTR pDestFile); + +HRESULT WINAPI + D3DX11SaveTextureToFileW( + ID3D11DeviceContext *pContext, + ID3D11Resource *pSrcTexture, + D3DX11_IMAGE_FILE_FORMAT DestFormat, + LPCWSTR pDestFile); + +#ifdef UNICODE +#define D3DX11SaveTextureToFile D3DX11SaveTextureToFileW +#else +#define D3DX11SaveTextureToFile D3DX11SaveTextureToFileA +#endif + + +//---------------------------------------------------------------------------- +// D3DX11SaveTextureToMemory: +// ---------------------- +// Save a texture to a blob. +// +// Parameters: +// pSrcTexture +// Source texture, containing the image to be saved +// DestFormat +// D3DX11_IMAGE_FILE_FORMAT specifying file format to use when saving. +// ppDestBuf +// address of a d3dxbuffer pointer to return the image data +// Flags +// optional flags +//---------------------------------------------------------------------------- + +HRESULT WINAPI + D3DX11SaveTextureToMemory( + ID3D11DeviceContext *pContext, + ID3D11Resource* pSrcTexture, + D3DX11_IMAGE_FILE_FORMAT DestFormat, + ID3D10Blob** ppDestBuf, + UINT Flags); + + +//---------------------------------------------------------------------------- +// D3DX11ComputeNormalMap: +// --------------------- +// Converts a height map into a normal map. The (x,y,z) components of each +// normal are mapped to the (r,g,b) channels of the output texture. +// +// Parameters +// pSrcTexture +// Pointer to the source heightmap texture +// Flags +// D3DX11_NORMALMAP flags +// Channel +// D3DX11_CHANNEL specifying source of height information +// Amplitude +// The constant value which the height information is multiplied by. +// pDestTexture +// Pointer to the destination texture +//--------------------------------------------------------------------------- + +HRESULT WINAPI + D3DX11ComputeNormalMap( + ID3D11DeviceContext *pContext, + ID3D11Texture2D *pSrcTexture, + UINT Flags, + UINT Channel, + FLOAT Amplitude, + ID3D11Texture2D *pDestTexture); + + +//---------------------------------------------------------------------------- +// D3DX11SHProjectCubeMap: +// ---------------------- +// Projects a function represented in a cube map into spherical harmonics. +// +// Parameters: +// Order +// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 +// pCubeMap +// CubeMap that is going to be projected into spherical harmonics +// pROut +// Output SH vector for Red. +// pGOut +// Output SH vector for Green +// pBOut +// Output SH vector for Blue +// +//--------------------------------------------------------------------------- + +HRESULT WINAPI + D3DX11SHProjectCubeMap( + ID3D11DeviceContext *pContext, + __in_range(2,6) UINT Order, + ID3D11Texture2D *pCubeMap, + __out_ecount(Order*Order) FLOAT *pROut, + __out_ecount_opt(Order*Order) FLOAT *pGOut, + __out_ecount_opt(Order*Order) FLOAT *pBOut); + +#ifdef __cplusplus +} +#endif //__cplusplus + +#endif //__D3DX11TEX_H__ + diff --git a/gfx/include/dxsdk/d3dx_dxgiformatconvert.inl b/gfx/include/dxsdk/d3dx_dxgiformatconvert.inl new file mode 100644 index 0000000000..1cfba72780 --- /dev/null +++ b/gfx/include/dxsdk/d3dx_dxgiformatconvert.inl @@ -0,0 +1,800 @@ +//============================================================================= +// D3D11 HLSL Routines for Manual Pack/Unpack of 32-bit DXGI_FORMAT_* +//============================================================================= +// +// This file contains format conversion routines for use in the +// Compute Shader or Pixel Shader on D3D11 Hardware. +// +// Skip to the end of this comment to see a summary of the routines +// provided. The rest of the text below explains why they are needed +// and how to use them. +// +// The scenario where these can be useful is if your application +// needs to simultaneously both read and write texture - i.e. in-place +// image editing. +// +// D3D11's Unordered Access View (UAV) of a Texture1D/2D/3D resource +// allows random access reads and writes to memory from a Compute Shader +// or Pixel Shader. However, the only texture format that supports this +// is DXGI_FORMAT_R32_UINT. e.g. Other more interesting formats like +// DXGI_FORMAT_R8G8B8A8_UNORM do not support simultaneous read and +// write. You can use such formats for random access writing only +// using a UAV, or reading only using a Shader Resource View (SRV). +// But for simultaneous read+write, the format conversion hardware is +// not available. +// +// There is a workaround to this limitation, involving casting the texture +// to R32_UINT when creating a UAV, as long as the original format of the +// resource supports it (most 32 bit per element formats). This allows +// simultaneous read+write as long as the shader does manual format +// unpacking on read and packing on write. +// +// The benefit is that later on, other views such as RenderTarget Views +// or ShaderResource Views on the same texture can be used with the +// proper format (e.g. DXGI_FORMAT_R16G16_FLOAT) so the hardware can +// do the usual automatic format unpack/pack and do texture filtering etc. +// where there are no hardware limitations. +// +// The sequence of actions for an application is the following: +// +// Suppose you want to make a texture than you can use a Pixel Shader +// or Compute Shader to perform in-place editing, and that the format +// you want the data to be stored in happens to be a descendent +// of of one of these formats: +// +// DXGI_FORMAT_R10G10B10A2_TYPELESS +// DXGI_FORMAT_R8G8B8A8_TYPELESS +// DXGI_FORMAT_B8G8R8A8_TYPELESS +// DXGI_FORMAT_B8G8R8X8_TYPELESS +// DXGI_FORMAT_R16G16_TYPELESS +// +// e.g. DXGI_FORMAT_R10G10B10A2_UNORM is a descendent of +// DXGI_FORMAT_R10G10B10A2_TYPELESS, so it supports the +// usage pattern described here. +// +// (Formats descending from DXGI_FORMAT_R32_TYPELESS, such as +// DXGI_FORMAT_R32_FLOAT, are trivially supported without +// needing any of the format conversion help provided here.) +// +// Steps: +// +// (1) Create a texture with the appropriate _TYPELESS format above +// along with the needed bind flags, such as +// D3D11_BIND_UNORDERED_ACCESS | D3D11_BIND_SHADER_RESOURCE. +// +// (2) For in-place image editing, create a UAV with the format +// DXGI_FORMAT_R32_UINT. D3D normally doesn't allow casting +// between different format "families", but the API makes +// an exception here. +// +// (3) In the Compute Shader or Pixel Shader, use the appropriate +// format pack/unpack routines provided in this file. +// For example if the DXGI_FORMAT_R32_UINT UAV really holds +// DXGI_FORMAT_R10G10B10A2_UNORM data, then, after reading a +// uint from the UAV into the shader, unpack by calling: +// +// XMFLOAT4 D3DX_R10G10B10A2_UNORM_to_FLOAT4(UINT packedInput) +// +// Then to write to the UAV in the same shader, call the following +// to pack shader data into a uint that can be written out: +// +// UINT D3DX_FLOAT4_to_R10G10B10A2_UNORM(hlsl_precise XMFLOAT4 unpackedInput) +// +// (4) Other views, such as SRVs, can be created with the desired format; +// e.g. DXGI_FORMAT_R10G10B10A2_UNORM if the resource was created as +// DXGI_FORMAT_R10G10B10A2_TYPELESS. When that view is accessed by a +// shader, the hardware can do automatic type conversion as usual. +// +// Note, again, that if the shader only needs to write to a UAV, or read +// as an SRV, then none of this is needed - fully typed UAV or SRVs can +// be used. Only if simultaneous reading and writing to a UAV of a texture +// is needed are the format conversion routines provided here potentially +// useful. +// +// The following is the list of format conversion routines included in this +// file, categorized by the DXGI_FORMAT they unpack/pack. Each of the +// formats supported descends from one of the TYPELESS formats listed +// above, and supports casting to DXGI_FORMAT_R32_UINT as a UAV. +// +// DXGI_FORMAT_R10G10B10A2_UNORM: +// +// XMFLOAT4 D3DX_R10G10B10A2_UNORM_to_FLOAT4(UINT packedInput) +// UINT D3DX_FLOAT4_to_R10G10B10A2_UNORM(hlsl_precise XMFLOAT4 unpackedInput) +// +// DXGI_FORMAT_R10G10B10A2_UINT: +// +// XMUINT4 D3DX_R10G10B10A2_UINT_to_UINT4(UINT packedInput) +// UINT D3DX_UINT4_to_R10G10B10A2_UINT(XMUINT4 unpackedInput) +// +// DXGI_FORMAT_R8G8B8A8_UNORM: +// +// XMFLOAT4 D3DX_R8G8B8A8_UNORM_to_FLOAT4(UINT packedInput) +// UINT D3DX_FLOAT4_to_R8G8B8A8_UNORM(hlsl_precise XMFLOAT4 unpackedInput) +// +// DXGI_FORMAT_R8G8B8A8_UNORM_SRGB: +// +// XMFLOAT4 D3DX_R8G8B8A8_UNORM_SRGB_to_FLOAT4_inexact(UINT packedInput) * +// XMFLOAT4 D3DX_R8G8B8A8_UNORM_SRGB_to_FLOAT4(UINT packedInput) +// UINT D3DX_FLOAT4_to_R8G8B8A8_UNORM_SRGB(hlsl_precise XMFLOAT4 unpackedInput) +// +// * The "_inexact" function above uses shader instructions that don't +// have high enough precision to give the exact answer, albeit close. +// The alternative function uses a lookup table stored in the shader +// to give an exact SRGB->float conversion. +// +// DXGI_FORMAT_R8G8B8A8_UINT: +// +// XMUINT4 D3DX_R8G8B8A8_UINT_to_UINT4(UINT packedInput) +// XMUINT D3DX_UINT4_to_R8G8B8A8_UINT(XMUINT4 unpackedInput) +// +// DXGI_FORMAT_R8G8B8A8_SNORM: +// +// XMFLOAT4 D3DX_R8G8B8A8_SNORM_to_FLOAT4(UINT packedInput) +// UINT D3DX_FLOAT4_to_R8G8B8A8_SNORM(hlsl_precise XMFLOAT4 unpackedInput) +// +// DXGI_FORMAT_R8G8B8A8_SINT: +// +// XMINT4 D3DX_R8G8B8A8_SINT_to_INT4(UINT packedInput) +// UINT D3DX_INT4_to_R8G8B8A8_SINT(XMINT4 unpackedInput) +// +// DXGI_FORMAT_B8G8R8A8_UNORM: +// +// XMFLOAT4 D3DX_B8G8R8A8_UNORM_to_FLOAT4(UINT packedInput) +// UINT D3DX_FLOAT4_to_B8G8R8A8_UNORM(hlsl_precise XMFLOAT4 unpackedInput) +// +// DXGI_FORMAT_B8G8R8A8_UNORM_SRGB: +// +// XMFLOAT4 D3DX_B8G8R8A8_UNORM_SRGB_to_FLOAT4_inexact(UINT packedInput) * +// XMFLOAT4 D3DX_B8G8R8A8_UNORM_SRGB_to_FLOAT4(UINT packedInput) +// UINT D3DX_FLOAT4_to_R8G8B8A8_UNORM_SRGB(hlsl_precise XMFLOAT4 unpackedInput) +// +// * The "_inexact" function above uses shader instructions that don't +// have high enough precision to give the exact answer, albeit close. +// The alternative function uses a lookup table stored in the shader +// to give an exact SRGB->float conversion. +// +// DXGI_FORMAT_B8G8R8X8_UNORM: +// +// XMFLOAT3 D3DX_B8G8R8X8_UNORM_to_FLOAT3(UINT packedInput) +// UINT D3DX_FLOAT3_to_B8G8R8X8_UNORM(hlsl_precise XMFLOAT3 unpackedInput) +// +// DXGI_FORMAT_B8G8R8X8_UNORM_SRGB: +// +// XMFLOAT3 D3DX_B8G8R8X8_UNORM_SRGB_to_FLOAT3_inexact(UINT packedInput) * +// XMFLOAT3 D3DX_B8G8R8X8_UNORM_SRGB_to_FLOAT3(UINT packedInput) +// UINT D3DX_FLOAT3_to_B8G8R8X8_UNORM_SRGB(hlsl_precise XMFLOAT3 unpackedInput) +// +// * The "_inexact" function above uses shader instructions that don't +// have high enough precision to give the exact answer, albeit close. +// The alternative function uses a lookup table stored in the shader +// to give an exact SRGB->float conversion. +// +// DXGI_FORMAT_R16G16_FLOAT: +// +// XMFLOAT2 D3DX_R16G16_FLOAT_to_FLOAT2(UINT packedInput) +// UINT D3DX_FLOAT2_to_R16G16_FLOAT(hlsl_precise XMFLOAT2 unpackedInput) +// +// DXGI_FORMAT_R16G16_UNORM: +// +// XMFLOAT2 D3DX_R16G16_UNORM_to_FLOAT2(UINT packedInput) +// UINT D3DX_FLOAT2_to_R16G16_UNORM(hlsl_precise FLOAT2 unpackedInput) +// +// DXGI_FORMAT_R16G16_UINT: +// +// XMUINT2 D3DX_R16G16_UINT_to_UINT2(UINT packedInput) +// UINT D3DX_UINT2_to_R16G16_UINT(XMUINT2 unpackedInput) +// +// DXGI_FORMAT_R16G16_SNORM: +// +// XMFLOAT2 D3DX_R16G16_SNORM_to_FLOAT2(UINT packedInput) +// UINT D3DX_FLOAT2_to_R16G16_SNORM(hlsl_precise XMFLOAT2 unpackedInput) +// +// DXGI_FORMAT_R16G16_SINT: +// +// XMINT2 D3DX_R16G16_SINT_to_INT2(UINT packedInput) +// UINT D3DX_INT2_to_R16G16_SINT(XMINT2 unpackedInput) +// +//============================================================================= + +#ifndef __D3DX_DXGI_FORMAT_CONVERT_INL___ +#define __D3DX_DXGI_FORMAT_CONVERT_INL___ + +#if HLSL_VERSION > 0 + +#define D3DX11INLINE + +typedef int INT; +typedef uint UINT; + +typedef float2 XMFLOAT2; +typedef float3 XMFLOAT3; +typedef float4 XMFLOAT4; +typedef int2 XMINT2; +typedef int4 XMINT4; +typedef uint2 XMUINT2; +typedef uint4 XMUINT4; + +#define hlsl_precise precise + +#define D3DX_Saturate_FLOAT(_V) saturate(_V) +#define D3DX_IsNan(_V) isnan(_V) +#define D3DX_Truncate_FLOAT(_V) trunc(_V) + +#else // HLSL_VERSION > 0 + +#ifndef __cplusplus +#error C++ compilation required +#endif + +#include +#include + +#define hlsl_precise + +D3DX11INLINE FLOAT D3DX_Saturate_FLOAT(FLOAT _V) +{ + return min(max(_V, 0), 1); +} +D3DX11INLINE bool D3DX_IsNan(FLOAT _V) +{ + return _V != _V; +} +D3DX11INLINE FLOAT D3DX_Truncate_FLOAT(FLOAT _V) +{ + return _V >= 0 ? floor(_V) : ceil(_V); +} + +// 2D Vector; 32 bit signed integer components +typedef struct _XMINT2 +{ + INT x; + INT y; +} XMINT2; + +// 2D Vector; 32 bit unsigned integer components +typedef struct _XMUINT2 +{ + UINT x; + UINT y; +} XMUINT2; + +// 4D Vector; 32 bit signed integer components +typedef struct _XMINT4 +{ + INT x; + INT y; + INT z; + INT w; +} XMINT4; + +// 4D Vector; 32 bit unsigned integer components +typedef struct _XMUINT4 +{ + UINT x; + UINT y; + UINT z; + UINT w; +} XMUINT4; + +#endif // HLSL_VERSION > 0 + +//============================================================================= +// SRGB Helper Functions Called By Conversions Further Below. +//============================================================================= +// SRGB_to_FLOAT_inexact is imprecise due to precision of pow implementations. +// If exact SRGB->float conversion is needed, a table lookup is provided +// further below. +D3DX11INLINE FLOAT D3DX_SRGB_to_FLOAT_inexact(hlsl_precise FLOAT val) +{ + if( val < 0.04045f ) + val /= 12.92f; + else + val = pow((val + 0.055f)/1.055f,2.4f); + return val; +} + +static const UINT D3DX_SRGBTable[] = +{ + 0x00000000,0x399f22b4,0x3a1f22b4,0x3a6eb40e,0x3a9f22b4,0x3ac6eb61,0x3aeeb40e,0x3b0b3e5d, + 0x3b1f22b4,0x3b33070b,0x3b46eb61,0x3b5b518d,0x3b70f18d,0x3b83e1c6,0x3b8fe616,0x3b9c87fd, + 0x3ba9c9b7,0x3bb7ad6f,0x3bc63549,0x3bd56361,0x3be539c1,0x3bf5ba70,0x3c0373b5,0x3c0c6152, + 0x3c15a703,0x3c1f45be,0x3c293e6b,0x3c3391f7,0x3c3e4149,0x3c494d43,0x3c54b6c7,0x3c607eb1, + 0x3c6ca5df,0x3c792d22,0x3c830aa8,0x3c89af9f,0x3c9085db,0x3c978dc5,0x3c9ec7c2,0x3ca63433, + 0x3cadd37d,0x3cb5a601,0x3cbdac20,0x3cc5e639,0x3cce54ab,0x3cd6f7d5,0x3cdfd010,0x3ce8ddb9, + 0x3cf2212c,0x3cfb9ac1,0x3d02a569,0x3d0798dc,0x3d0ca7e6,0x3d11d2af,0x3d171963,0x3d1c7c2e, + 0x3d21fb3c,0x3d2796b2,0x3d2d4ebb,0x3d332380,0x3d39152b,0x3d3f23e3,0x3d454fd1,0x3d4b991c, + 0x3d51ffef,0x3d58846a,0x3d5f26b7,0x3d65e6fe,0x3d6cc564,0x3d73c20f,0x3d7add29,0x3d810b67, + 0x3d84b795,0x3d887330,0x3d8c3e4a,0x3d9018f6,0x3d940345,0x3d97fd4a,0x3d9c0716,0x3da020bb, + 0x3da44a4b,0x3da883d7,0x3daccd70,0x3db12728,0x3db59112,0x3dba0b3b,0x3dbe95b5,0x3dc33092, + 0x3dc7dbe2,0x3dcc97b6,0x3dd1641f,0x3dd6412c,0x3ddb2eef,0x3de02d77,0x3de53cd5,0x3dea5d19, + 0x3def8e52,0x3df4d091,0x3dfa23e8,0x3dff8861,0x3e027f07,0x3e054280,0x3e080ea3,0x3e0ae378, + 0x3e0dc105,0x3e10a754,0x3e13966b,0x3e168e52,0x3e198f10,0x3e1c98ad,0x3e1fab30,0x3e22c6a3, + 0x3e25eb09,0x3e29186c,0x3e2c4ed0,0x3e2f8e41,0x3e32d6c4,0x3e362861,0x3e39831e,0x3e3ce703, + 0x3e405416,0x3e43ca5f,0x3e4749e4,0x3e4ad2ae,0x3e4e64c2,0x3e520027,0x3e55a4e6,0x3e595303, + 0x3e5d0a8b,0x3e60cb7c,0x3e6495e0,0x3e6869bf,0x3e6c4720,0x3e702e0c,0x3e741e84,0x3e781890, + 0x3e7c1c38,0x3e8014c2,0x3e82203c,0x3e84308d,0x3e8645ba,0x3e885fc5,0x3e8a7eb2,0x3e8ca283, + 0x3e8ecb3d,0x3e90f8e1,0x3e932b74,0x3e9562f8,0x3e979f71,0x3e99e0e2,0x3e9c274e,0x3e9e72b7, + 0x3ea0c322,0x3ea31892,0x3ea57308,0x3ea7d289,0x3eaa3718,0x3eaca0b7,0x3eaf0f69,0x3eb18333, + 0x3eb3fc18,0x3eb67a18,0x3eb8fd37,0x3ebb8579,0x3ebe12e1,0x3ec0a571,0x3ec33d2d,0x3ec5da17, + 0x3ec87c33,0x3ecb2383,0x3ecdd00b,0x3ed081cd,0x3ed338cc,0x3ed5f50b,0x3ed8b68d,0x3edb7d54, + 0x3ede4965,0x3ee11ac1,0x3ee3f16b,0x3ee6cd67,0x3ee9aeb6,0x3eec955d,0x3eef815d,0x3ef272ba, + 0x3ef56976,0x3ef86594,0x3efb6717,0x3efe6e02,0x3f00bd2d,0x3f02460e,0x3f03d1a7,0x3f055ff9, + 0x3f06f106,0x3f0884cf,0x3f0a1b56,0x3f0bb49b,0x3f0d50a0,0x3f0eef67,0x3f1090f1,0x3f12353e, + 0x3f13dc51,0x3f15862b,0x3f1732cd,0x3f18e239,0x3f1a946f,0x3f1c4971,0x3f1e0141,0x3f1fbbdf, + 0x3f21794e,0x3f23398e,0x3f24fca0,0x3f26c286,0x3f288b41,0x3f2a56d3,0x3f2c253d,0x3f2df680, + 0x3f2fca9e,0x3f31a197,0x3f337b6c,0x3f355820,0x3f3737b3,0x3f391a26,0x3f3aff7c,0x3f3ce7b5, + 0x3f3ed2d2,0x3f40c0d4,0x3f42b1be,0x3f44a590,0x3f469c4b,0x3f4895f1,0x3f4a9282,0x3f4c9201, + 0x3f4e946e,0x3f5099cb,0x3f52a218,0x3f54ad57,0x3f56bb8a,0x3f58ccb0,0x3f5ae0cd,0x3f5cf7e0, + 0x3f5f11ec,0x3f612eee,0x3f634eef,0x3f6571e9,0x3f6797e3,0x3f69c0d6,0x3f6beccd,0x3f6e1bbf, + 0x3f704db8,0x3f7282af,0x3f74baae,0x3f76f5ae,0x3f7933b9,0x3f7b74c6,0x3f7db8e0,0x3f800000 +}; + +D3DX11INLINE FLOAT D3DX_SRGB_to_FLOAT(UINT val) +{ +#if HLSL_VERSION > 0 + return asfloat(D3DX_SRGBTable[val]); +#else + return *(FLOAT*)&D3DX_SRGBTable[val]; +#endif +} + +D3DX11INLINE FLOAT D3DX_FLOAT_to_SRGB(hlsl_precise FLOAT val) +{ + if( val < 0.0031308f ) + val *= 12.92f; + else + val = 1.055f * pow(val,1.0f/2.4f) - 0.055f; + return val; +} + +D3DX11INLINE FLOAT D3DX_SaturateSigned_FLOAT(FLOAT _V) +{ + if (D3DX_IsNan(_V)) + { + return 0; + } + + return min(max(_V, -1), 1); +} + +D3DX11INLINE UINT D3DX_FLOAT_to_UINT(FLOAT _V, + FLOAT _Scale) +{ + return (UINT)floor(_V * _Scale + 0.5f); +} + +D3DX11INLINE FLOAT D3DX_INT_to_FLOAT(INT _V, + FLOAT _Scale) +{ + FLOAT Scaled = (FLOAT)_V / _Scale; + // The integer is a two's-complement signed + // number so the negative range is slightly + // larger than the positive range, meaning + // the scaled value can be slight less than -1. + // Clamp to keep the float range [-1, 1]. + return max(Scaled, -1.0f); +} + +D3DX11INLINE INT D3DX_FLOAT_to_INT(FLOAT _V, + FLOAT _Scale) +{ + return (INT)D3DX_Truncate_FLOAT(_V * _Scale + (_V >= 0 ? 0.5f : -0.5f)); +} + +//============================================================================= +// Conversion routines +//============================================================================= +//----------------------------------------------------------------------------- +// R10B10G10A2_UNORM <-> FLOAT4 +//----------------------------------------------------------------------------- +D3DX11INLINE XMFLOAT4 D3DX_R10G10B10A2_UNORM_to_FLOAT4(UINT packedInput) +{ + hlsl_precise XMFLOAT4 unpackedOutput; + unpackedOutput.x = (FLOAT) (packedInput & 0x000003ff) / 1023; + unpackedOutput.y = (FLOAT)(((packedInput>>10) & 0x000003ff)) / 1023; + unpackedOutput.z = (FLOAT)(((packedInput>>20) & 0x000003ff)) / 1023; + unpackedOutput.w = (FLOAT)(((packedInput>>30) & 0x00000003)) / 3; + return unpackedOutput; +} + +D3DX11INLINE UINT D3DX_FLOAT4_to_R10G10B10A2_UNORM(hlsl_precise XMFLOAT4 unpackedInput) +{ + UINT packedOutput; + packedOutput = ( (D3DX_FLOAT_to_UINT(D3DX_Saturate_FLOAT(unpackedInput.x), 1023)) | + (D3DX_FLOAT_to_UINT(D3DX_Saturate_FLOAT(unpackedInput.y), 1023)<<10) | + (D3DX_FLOAT_to_UINT(D3DX_Saturate_FLOAT(unpackedInput.z), 1023)<<20) | + (D3DX_FLOAT_to_UINT(D3DX_Saturate_FLOAT(unpackedInput.w), 3)<<30) ); + return packedOutput; +} + +//----------------------------------------------------------------------------- +// R10B10G10A2_UINT <-> UINT4 +//----------------------------------------------------------------------------- +D3DX11INLINE XMUINT4 D3DX_R10G10B10A2_UINT_to_UINT4(UINT packedInput) +{ + XMUINT4 unpackedOutput; + unpackedOutput.x = packedInput & 0x000003ff; + unpackedOutput.y = (packedInput>>10) & 0x000003ff; + unpackedOutput.z = (packedInput>>20) & 0x000003ff; + unpackedOutput.w = (packedInput>>30) & 0x00000003; + return unpackedOutput; +} + +D3DX11INLINE UINT D3DX_UINT4_to_R10G10B10A2_UINT(XMUINT4 unpackedInput) +{ + UINT packedOutput; + unpackedInput.x = min(unpackedInput.x, 0x000003ff); + unpackedInput.y = min(unpackedInput.y, 0x000003ff); + unpackedInput.z = min(unpackedInput.z, 0x000003ff); + unpackedInput.w = min(unpackedInput.w, 0x00000003); + packedOutput = ( (unpackedInput.x) | + ((unpackedInput.y)<<10) | + ((unpackedInput.z)<<20) | + ((unpackedInput.w)<<30) ); + return packedOutput; +} + +//----------------------------------------------------------------------------- +// R8G8B8A8_UNORM <-> FLOAT4 +//----------------------------------------------------------------------------- +D3DX11INLINE XMFLOAT4 D3DX_R8G8B8A8_UNORM_to_FLOAT4(UINT packedInput) +{ + hlsl_precise XMFLOAT4 unpackedOutput; + unpackedOutput.x = (FLOAT) (packedInput & 0x000000ff) / 255; + unpackedOutput.y = (FLOAT)(((packedInput>> 8) & 0x000000ff)) / 255; + unpackedOutput.z = (FLOAT)(((packedInput>>16) & 0x000000ff)) / 255; + unpackedOutput.w = (FLOAT) (packedInput>>24) / 255; + return unpackedOutput; +} + +D3DX11INLINE UINT D3DX_FLOAT4_to_R8G8B8A8_UNORM(hlsl_precise XMFLOAT4 unpackedInput) +{ + UINT packedOutput; + packedOutput = ( (D3DX_FLOAT_to_UINT(D3DX_Saturate_FLOAT(unpackedInput.x), 255)) | + (D3DX_FLOAT_to_UINT(D3DX_Saturate_FLOAT(unpackedInput.y), 255)<< 8) | + (D3DX_FLOAT_to_UINT(D3DX_Saturate_FLOAT(unpackedInput.z), 255)<<16) | + (D3DX_FLOAT_to_UINT(D3DX_Saturate_FLOAT(unpackedInput.w), 255)<<24) ); + return packedOutput; +} + +//----------------------------------------------------------------------------- +// R8G8B8A8_UNORM_SRGB <-> FLOAT4 +//----------------------------------------------------------------------------- +D3DX11INLINE XMFLOAT4 D3DX_R8G8B8A8_UNORM_SRGB_to_FLOAT4_inexact(UINT packedInput) +{ + hlsl_precise XMFLOAT4 unpackedOutput; + unpackedOutput.x = D3DX_SRGB_to_FLOAT_inexact(((FLOAT) (packedInput & 0x000000ff) )/255); + unpackedOutput.y = D3DX_SRGB_to_FLOAT_inexact(((FLOAT)(((packedInput>> 8) & 0x000000ff)))/255); + unpackedOutput.z = D3DX_SRGB_to_FLOAT_inexact(((FLOAT)(((packedInput>>16) & 0x000000ff)))/255); + unpackedOutput.w = (FLOAT)(packedInput>>24) / 255; + return unpackedOutput; +} + +D3DX11INLINE XMFLOAT4 D3DX_R8G8B8A8_UNORM_SRGB_to_FLOAT4(UINT packedInput) +{ + hlsl_precise XMFLOAT4 unpackedOutput; + unpackedOutput.x = D3DX_SRGB_to_FLOAT( (packedInput & 0x000000ff) ); + unpackedOutput.y = D3DX_SRGB_to_FLOAT((((packedInput>> 8) & 0x000000ff))); + unpackedOutput.z = D3DX_SRGB_to_FLOAT((((packedInput>>16) & 0x000000ff))); + unpackedOutput.w = (FLOAT)(packedInput>>24) / 255; + return unpackedOutput; +} + +D3DX11INLINE UINT D3DX_FLOAT4_to_R8G8B8A8_UNORM_SRGB(hlsl_precise XMFLOAT4 unpackedInput) +{ + UINT packedOutput; + unpackedInput.x = D3DX_FLOAT_to_SRGB(D3DX_Saturate_FLOAT(unpackedInput.x)); + unpackedInput.y = D3DX_FLOAT_to_SRGB(D3DX_Saturate_FLOAT(unpackedInput.y)); + unpackedInput.z = D3DX_FLOAT_to_SRGB(D3DX_Saturate_FLOAT(unpackedInput.z)); + unpackedInput.w = D3DX_Saturate_FLOAT(unpackedInput.w); + packedOutput = ( (D3DX_FLOAT_to_UINT(unpackedInput.x, 255)) | + (D3DX_FLOAT_to_UINT(unpackedInput.y, 255)<< 8) | + (D3DX_FLOAT_to_UINT(unpackedInput.z, 255)<<16) | + (D3DX_FLOAT_to_UINT(unpackedInput.w, 255)<<24) ); + return packedOutput; +} + +//----------------------------------------------------------------------------- +// R8G8B8A8_UINT <-> UINT4 +//----------------------------------------------------------------------------- +D3DX11INLINE XMUINT4 D3DX_R8G8B8A8_UINT_to_UINT4(UINT packedInput) +{ + XMUINT4 unpackedOutput; + unpackedOutput.x = packedInput & 0x000000ff; + unpackedOutput.y = (packedInput>> 8) & 0x000000ff; + unpackedOutput.z = (packedInput>>16) & 0x000000ff; + unpackedOutput.w = packedInput>>24; + return unpackedOutput; +} + +D3DX11INLINE UINT D3DX_UINT4_to_R8G8B8A8_UINT(XMUINT4 unpackedInput) +{ + UINT packedOutput; + unpackedInput.x = min(unpackedInput.x, 0x000000ff); + unpackedInput.y = min(unpackedInput.y, 0x000000ff); + unpackedInput.z = min(unpackedInput.z, 0x000000ff); + unpackedInput.w = min(unpackedInput.w, 0x000000ff); + packedOutput = ( unpackedInput.x | + (unpackedInput.y<< 8) | + (unpackedInput.z<<16) | + (unpackedInput.w<<24) ); + return packedOutput; +} + +//----------------------------------------------------------------------------- +// R8G8B8A8_SNORM <-> FLOAT4 +//----------------------------------------------------------------------------- +D3DX11INLINE XMFLOAT4 D3DX_R8G8B8A8_SNORM_to_FLOAT4(UINT packedInput) +{ + hlsl_precise XMFLOAT4 unpackedOutput; + XMINT4 signExtendedBits; + signExtendedBits.x = (INT)(packedInput << 24) >> 24; + signExtendedBits.y = (INT)((packedInput << 16) & 0xff000000) >> 24; + signExtendedBits.z = (INT)((packedInput << 8) & 0xff000000) >> 24; + signExtendedBits.w = (INT)(packedInput & 0xff000000) >> 24; + unpackedOutput.x = D3DX_INT_to_FLOAT(signExtendedBits.x, 127); + unpackedOutput.y = D3DX_INT_to_FLOAT(signExtendedBits.y, 127); + unpackedOutput.z = D3DX_INT_to_FLOAT(signExtendedBits.z, 127); + unpackedOutput.w = D3DX_INT_to_FLOAT(signExtendedBits.w, 127); + return unpackedOutput; +} + +D3DX11INLINE UINT D3DX_FLOAT4_to_R8G8B8A8_SNORM(hlsl_precise XMFLOAT4 unpackedInput) +{ + UINT packedOutput; + packedOutput = ( (D3DX_FLOAT_to_INT(D3DX_SaturateSigned_FLOAT(unpackedInput.x), 127) & 0x000000ff) | + ((D3DX_FLOAT_to_INT(D3DX_SaturateSigned_FLOAT(unpackedInput.y), 127) & 0x000000ff)<< 8) | + ((D3DX_FLOAT_to_INT(D3DX_SaturateSigned_FLOAT(unpackedInput.z), 127) & 0x000000ff)<<16) | + ((D3DX_FLOAT_to_INT(D3DX_SaturateSigned_FLOAT(unpackedInput.w), 127)) <<24) ); + return packedOutput; +} + +//----------------------------------------------------------------------------- +// R8G8B8A8_SINT <-> INT4 +//----------------------------------------------------------------------------- +D3DX11INLINE XMINT4 D3DX_R8G8B8A8_SINT_to_INT4(UINT packedInput) +{ + XMINT4 unpackedOutput; + unpackedOutput.x = (INT)(packedInput << 24) >> 24; + unpackedOutput.y = (INT)((packedInput << 16) & 0xff000000) >> 24; + unpackedOutput.z = (INT)((packedInput << 8) & 0xff000000) >> 24; + unpackedOutput.w = (INT)(packedInput & 0xff000000) >> 24; + return unpackedOutput; +} + +D3DX11INLINE UINT D3DX_INT4_to_R8G8B8A8_SINT(XMINT4 unpackedInput) +{ + UINT packedOutput; + unpackedInput.x = max(min(unpackedInput.x,127),-128); + unpackedInput.y = max(min(unpackedInput.y,127),-128); + unpackedInput.z = max(min(unpackedInput.z,127),-128); + unpackedInput.w = max(min(unpackedInput.w,127),-128); + packedOutput = ( (unpackedInput.x & 0x000000ff) | + ((unpackedInput.y & 0x000000ff)<< 8) | + ((unpackedInput.z & 0x000000ff)<<16) | + (unpackedInput.w <<24) ); + return packedOutput; +} + +//----------------------------------------------------------------------------- +// B8G8R8A8_UNORM <-> FLOAT4 +//----------------------------------------------------------------------------- +D3DX11INLINE XMFLOAT4 D3DX_B8G8R8A8_UNORM_to_FLOAT4(UINT packedInput) +{ + hlsl_precise XMFLOAT4 unpackedOutput; + unpackedOutput.z = (FLOAT) (packedInput & 0x000000ff) / 255; + unpackedOutput.y = (FLOAT)(((packedInput>> 8) & 0x000000ff)) / 255; + unpackedOutput.x = (FLOAT)(((packedInput>>16) & 0x000000ff)) / 255; + unpackedOutput.w = (FLOAT) (packedInput>>24) / 255; + return unpackedOutput; +} + +D3DX11INLINE UINT D3DX_FLOAT4_to_B8G8R8A8_UNORM(hlsl_precise XMFLOAT4 unpackedInput) +{ + UINT packedOutput; + packedOutput = ( (D3DX_FLOAT_to_UINT(D3DX_Saturate_FLOAT(unpackedInput.z), 255)) | + (D3DX_FLOAT_to_UINT(D3DX_Saturate_FLOAT(unpackedInput.y), 255)<< 8) | + (D3DX_FLOAT_to_UINT(D3DX_Saturate_FLOAT(unpackedInput.x), 255)<<16) | + (D3DX_FLOAT_to_UINT(D3DX_Saturate_FLOAT(unpackedInput.w), 255)<<24) ); + return packedOutput; +} + +//----------------------------------------------------------------------------- +// B8G8R8A8_UNORM_SRGB <-> FLOAT4 +//----------------------------------------------------------------------------- +D3DX11INLINE XMFLOAT4 D3DX_B8G8R8A8_UNORM_SRGB_to_FLOAT4_inexact(UINT packedInput) +{ + hlsl_precise XMFLOAT4 unpackedOutput; + unpackedOutput.z = D3DX_SRGB_to_FLOAT_inexact(((FLOAT) (packedInput & 0x000000ff) )/255); + unpackedOutput.y = D3DX_SRGB_to_FLOAT_inexact(((FLOAT)(((packedInput>> 8) & 0x000000ff)))/255); + unpackedOutput.x = D3DX_SRGB_to_FLOAT_inexact(((FLOAT)(((packedInput>>16) & 0x000000ff)))/255); + unpackedOutput.w = (FLOAT)(packedInput>>24) / 255; + return unpackedOutput; +} + +D3DX11INLINE XMFLOAT4 D3DX_B8G8R8A8_UNORM_SRGB_to_FLOAT4(UINT packedInput) +{ + hlsl_precise XMFLOAT4 unpackedOutput; + unpackedOutput.z = D3DX_SRGB_to_FLOAT( (packedInput & 0x000000ff) ); + unpackedOutput.y = D3DX_SRGB_to_FLOAT((((packedInput>> 8) & 0x000000ff))); + unpackedOutput.x = D3DX_SRGB_to_FLOAT((((packedInput>>16) & 0x000000ff))); + unpackedOutput.w = (FLOAT)(packedInput>>24) / 255; + return unpackedOutput; +} + +D3DX11INLINE UINT D3DX_FLOAT4_to_B8G8R8A8_UNORM_SRGB(hlsl_precise XMFLOAT4 unpackedInput) +{ + UINT packedOutput; + unpackedInput.z = D3DX_FLOAT_to_SRGB(D3DX_Saturate_FLOAT(unpackedInput.z)); + unpackedInput.y = D3DX_FLOAT_to_SRGB(D3DX_Saturate_FLOAT(unpackedInput.y)); + unpackedInput.x = D3DX_FLOAT_to_SRGB(D3DX_Saturate_FLOAT(unpackedInput.x)); + unpackedInput.w = D3DX_Saturate_FLOAT(unpackedInput.w); + packedOutput = ( (D3DX_FLOAT_to_UINT(unpackedInput.z, 255)) | + (D3DX_FLOAT_to_UINT(unpackedInput.y, 255)<< 8) | + (D3DX_FLOAT_to_UINT(unpackedInput.x, 255)<<16) | + (D3DX_FLOAT_to_UINT(unpackedInput.w, 255)<<24) ); + return packedOutput; +} + +//----------------------------------------------------------------------------- +// B8G8R8X8_UNORM <-> FLOAT3 +//----------------------------------------------------------------------------- +D3DX11INLINE XMFLOAT3 D3DX_B8G8R8X8_UNORM_to_FLOAT3(UINT packedInput) +{ + hlsl_precise XMFLOAT3 unpackedOutput; + unpackedOutput.z = (FLOAT) (packedInput & 0x000000ff) / 255; + unpackedOutput.y = (FLOAT)(((packedInput>> 8) & 0x000000ff)) / 255; + unpackedOutput.x = (FLOAT)(((packedInput>>16) & 0x000000ff)) / 255; + return unpackedOutput; +} + +D3DX11INLINE UINT D3DX_FLOAT3_to_B8G8R8X8_UNORM(hlsl_precise XMFLOAT3 unpackedInput) +{ + UINT packedOutput; + packedOutput = ( (D3DX_FLOAT_to_UINT(D3DX_Saturate_FLOAT(unpackedInput.z), 255)) | + (D3DX_FLOAT_to_UINT(D3DX_Saturate_FLOAT(unpackedInput.y), 255)<< 8) | + (D3DX_FLOAT_to_UINT(D3DX_Saturate_FLOAT(unpackedInput.x), 255)<<16) ); + return packedOutput; +} + +//----------------------------------------------------------------------------- +// B8G8R8X8_UNORM_SRGB <-> FLOAT3 +//----------------------------------------------------------------------------- +D3DX11INLINE XMFLOAT3 D3DX_B8G8R8X8_UNORM_SRGB_to_FLOAT3_inexact(UINT packedInput) +{ + hlsl_precise XMFLOAT3 unpackedOutput; + unpackedOutput.z = D3DX_SRGB_to_FLOAT_inexact(((FLOAT) (packedInput & 0x000000ff) )/255); + unpackedOutput.y = D3DX_SRGB_to_FLOAT_inexact(((FLOAT)(((packedInput>> 8) & 0x000000ff)))/255); + unpackedOutput.x = D3DX_SRGB_to_FLOAT_inexact(((FLOAT)(((packedInput>>16) & 0x000000ff)))/255); + return unpackedOutput; +} + +D3DX11INLINE XMFLOAT3 D3DX_B8G8R8X8_UNORM_SRGB_to_FLOAT3(UINT packedInput) +{ + hlsl_precise XMFLOAT3 unpackedOutput; + unpackedOutput.z = D3DX_SRGB_to_FLOAT( (packedInput & 0x000000ff) ); + unpackedOutput.y = D3DX_SRGB_to_FLOAT((((packedInput>> 8) & 0x000000ff))); + unpackedOutput.x = D3DX_SRGB_to_FLOAT((((packedInput>>16) & 0x000000ff))); + return unpackedOutput; +} + +D3DX11INLINE UINT D3DX_FLOAT3_to_B8G8R8X8_UNORM_SRGB(hlsl_precise XMFLOAT3 unpackedInput) +{ + UINT packedOutput; + unpackedInput.z = D3DX_FLOAT_to_SRGB(D3DX_Saturate_FLOAT(unpackedInput.z)); + unpackedInput.y = D3DX_FLOAT_to_SRGB(D3DX_Saturate_FLOAT(unpackedInput.y)); + unpackedInput.x = D3DX_FLOAT_to_SRGB(D3DX_Saturate_FLOAT(unpackedInput.x)); + packedOutput = ( (D3DX_FLOAT_to_UINT(unpackedInput.z, 255)) | + (D3DX_FLOAT_to_UINT(unpackedInput.y, 255)<< 8) | + (D3DX_FLOAT_to_UINT(unpackedInput.x, 255)<<16) ); + return packedOutput; +} + +//----------------------------------------------------------------------------- +// R16G16_FLOAT <-> FLOAT2 +//----------------------------------------------------------------------------- + +#if HLSL_VERSION > 0 + +D3DX11INLINE XMFLOAT2 D3DX_R16G16_FLOAT_to_FLOAT2(UINT packedInput) +{ + hlsl_precise XMFLOAT2 unpackedOutput; + unpackedOutput.x = f16tof32(packedInput&0x0000ffff); + unpackedOutput.y = f16tof32(packedInput>>16); + return unpackedOutput; +} + +D3DX11INLINE UINT D3DX_FLOAT2_to_R16G16_FLOAT(hlsl_precise XMFLOAT2 unpackedInput) +{ + UINT packedOutput; + packedOutput = asuint(f32tof16(unpackedInput.x)) | + (asuint(f32tof16(unpackedInput.y)) << 16); + return packedOutput; +} + +#endif // HLSL_VERSION > 0 + +//----------------------------------------------------------------------------- +// R16G16_UNORM <-> FLOAT2 +//----------------------------------------------------------------------------- +D3DX11INLINE XMFLOAT2 D3DX_R16G16_UNORM_to_FLOAT2(UINT packedInput) +{ + hlsl_precise XMFLOAT2 unpackedOutput; + unpackedOutput.x = (FLOAT) (packedInput & 0x0000ffff) / 65535; + unpackedOutput.y = (FLOAT) (packedInput>>16) / 65535; + return unpackedOutput; +} + +D3DX11INLINE UINT D3DX_FLOAT2_to_R16G16_UNORM(hlsl_precise XMFLOAT2 unpackedInput) +{ + UINT packedOutput; + packedOutput = ( (D3DX_FLOAT_to_UINT(D3DX_Saturate_FLOAT(unpackedInput.x), 65535)) | + (D3DX_FLOAT_to_UINT(D3DX_Saturate_FLOAT(unpackedInput.y), 65535)<< 16) ); + return packedOutput; +} + +//----------------------------------------------------------------------------- +// R16G16_UINT <-> UINT2 +//----------------------------------------------------------------------------- +D3DX11INLINE XMUINT2 D3DX_R16G16_UINT_to_UINT2(UINT packedInput) +{ + XMUINT2 unpackedOutput; + unpackedOutput.x = packedInput & 0x0000ffff; + unpackedOutput.y = packedInput>>16; + return unpackedOutput; +} + +D3DX11INLINE UINT D3DX_UINT2_to_R16G16_UINT(XMUINT2 unpackedInput) +{ + UINT packedOutput; + unpackedInput.x = min(unpackedInput.x,0x0000ffff); + unpackedInput.y = min(unpackedInput.y,0x0000ffff); + packedOutput = ( unpackedInput.x | + (unpackedInput.y<<16) ); + return packedOutput; +} + +//----------------------------------------------------------------------------- +// R16G16_SNORM <-> FLOAT2 +//----------------------------------------------------------------------------- +D3DX11INLINE XMFLOAT2 D3DX_R16G16_SNORM_to_FLOAT2(UINT packedInput) +{ + hlsl_precise XMFLOAT2 unpackedOutput; + XMINT2 signExtendedBits; + signExtendedBits.x = (INT)(packedInput << 16) >> 16; + signExtendedBits.y = (INT)(packedInput & 0xffff0000) >> 16; + unpackedOutput.x = D3DX_INT_to_FLOAT(signExtendedBits.x, 32767); + unpackedOutput.y = D3DX_INT_to_FLOAT(signExtendedBits.y, 32767); + return unpackedOutput; +} + +D3DX11INLINE UINT D3DX_FLOAT2_to_R16G16_SNORM(hlsl_precise XMFLOAT2 unpackedInput) +{ + UINT packedOutput; + packedOutput = ( (D3DX_FLOAT_to_INT(D3DX_SaturateSigned_FLOAT(unpackedInput.x), 32767) & 0x0000ffff) | + (D3DX_FLOAT_to_INT(D3DX_SaturateSigned_FLOAT(unpackedInput.y), 32767) <<16) ); + return packedOutput; +} + +//----------------------------------------------------------------------------- +// R16G16_SINT <-> INT2 +//----------------------------------------------------------------------------- +D3DX11INLINE XMINT2 D3DX_R16G16_SINT_to_INT2(UINT packedInput) +{ + XMINT2 unpackedOutput; + unpackedOutput.x = (INT)(packedInput << 16) >> 16; + unpackedOutput.y = (INT)(packedInput & 0xffff0000) >> 16; + return unpackedOutput; +} + +D3DX11INLINE UINT D3DX_INT2_to_R16G16_SINT(XMINT2 unpackedInput) +{ + UINT packedOutput; + unpackedInput.x = max(min(unpackedInput.x,32767),-32768); + unpackedInput.y = max(min(unpackedInput.y,32767),-32768); + packedOutput = ( (unpackedInput.x & 0x0000ffff) | + (unpackedInput.y <<16) ); + return packedOutput; +} + +#endif // __D3DX_DXGI_FORMAT_CONVERT_INL___ diff --git a/gfx/include/dxsdk/dcommon.h b/gfx/include/dxsdk/dcommon.h new file mode 100644 index 0000000000..543dab13f4 --- /dev/null +++ b/gfx/include/dxsdk/dcommon.h @@ -0,0 +1,403 @@ +//+-------------------------------------------------------------------------- +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Abstract: +// Public API definitions shared by DWrite, D2D, and DImage. +// +//---------------------------------------------------------------------------- +#pragma once + +#ifndef DCOMMON_H_INCLUDED +#define DCOMMON_H_INCLUDED + +#include + +#ifndef DX_DECLARE_INTERFACE +#define DX_DECLARE_INTERFACE(x) DECLSPEC_UUID(x) DECLSPEC_NOVTABLE +#endif + +#ifndef CHECKMETHOD +#define CHECKMETHOD(method) virtual DECLSPEC_NOTHROW _Must_inspect_result_ HRESULT STDMETHODCALLTYPE method +#endif + +#pragma warning(push) +#pragma warning(disable:4201) // anonymous unions warning + +// +// Forward declarations +// +struct IDXGISurface; + +/// +/// The measuring method used for text layout. +/// +typedef enum DWRITE_MEASURING_MODE +{ + /// + /// Text is measured using glyph ideal metrics whose values are independent to the current display resolution. + /// + DWRITE_MEASURING_MODE_NATURAL, + + /// + /// Text is measured using glyph display compatible metrics whose values tuned for the current display resolution. + /// + DWRITE_MEASURING_MODE_GDI_CLASSIC, + + /// + // Text is measured using the same glyph display metrics as text measured by GDI using a font + // created with CLEARTYPE_NATURAL_QUALITY. + /// + DWRITE_MEASURING_MODE_GDI_NATURAL + +} DWRITE_MEASURING_MODE; + +#if NTDDI_VERSION >= NTDDI_WIN10_RS1 + +/// +/// Fonts may contain multiple drawable data formats for glyphs. These flags specify which formats +/// are supported in the font, either at a font-wide level or per glyph, and the app may use them +/// to tell DWrite which formats to return when splitting a color glyph run. +/// +enum DWRITE_GLYPH_IMAGE_FORMATS +{ + /// + /// Indicates no data is available for this glyph. + /// + DWRITE_GLYPH_IMAGE_FORMATS_NONE = 0x00000000, + + /// + /// The glyph has TrueType outlines. + /// + DWRITE_GLYPH_IMAGE_FORMATS_TRUETYPE = 0x00000001, + + /// + /// The glyph has CFF outlines. + /// + DWRITE_GLYPH_IMAGE_FORMATS_CFF = 0x00000002, + + /// + /// The glyph has multilayered COLR data. + /// + DWRITE_GLYPH_IMAGE_FORMATS_COLR = 0x00000004, + + /// + /// The glyph has SVG outlines as standard XML. + /// + /// + /// Fonts may store the content gzip'd rather than plain text, + /// indicated by the first two bytes as gzip header {0x1F 0x8B}. + /// + DWRITE_GLYPH_IMAGE_FORMATS_SVG = 0x00000008, + + /// + /// The glyph has PNG image data, with standard PNG IHDR. + /// + DWRITE_GLYPH_IMAGE_FORMATS_PNG = 0x00000010, + + /// + /// The glyph has JPEG image data, with standard JIFF SOI header. + /// + DWRITE_GLYPH_IMAGE_FORMATS_JPEG = 0x00000020, + + /// + /// The glyph has TIFF image data. + /// + DWRITE_GLYPH_IMAGE_FORMATS_TIFF = 0x00000040, + + /// + /// The glyph has raw 32-bit premultiplied BGRA data. + /// + DWRITE_GLYPH_IMAGE_FORMATS_PREMULTIPLIED_B8G8R8A8 = 0x00000080, +}; + +#ifdef DEFINE_ENUM_FLAG_OPERATORS +DEFINE_ENUM_FLAG_OPERATORS(DWRITE_GLYPH_IMAGE_FORMATS); +#endif + +#endif + +/// +/// Qualifies how alpha is to be treated in a bitmap or render target containing +/// alpha. +/// +typedef enum D2D1_ALPHA_MODE +{ + + /// + /// Alpha mode should be determined implicitly. Some target surfaces do not supply + /// or imply this information in which case alpha must be specified. + /// + D2D1_ALPHA_MODE_UNKNOWN = 0, + + /// + /// Treat the alpha as premultipled. + /// + D2D1_ALPHA_MODE_PREMULTIPLIED = 1, + + /// + /// Opacity is in the 'A' component only. + /// + D2D1_ALPHA_MODE_STRAIGHT = 2, + + /// + /// Ignore any alpha channel information. + /// + D2D1_ALPHA_MODE_IGNORE = 3, + + D2D1_ALPHA_MODE_FORCE_DWORD = 0xffffffff + +} D2D1_ALPHA_MODE; + +/// +/// Description of a pixel format. +/// +typedef struct D2D1_PIXEL_FORMAT +{ + DXGI_FORMAT format; + D2D1_ALPHA_MODE alphaMode; + +} D2D1_PIXEL_FORMAT; + +/// +/// Represents an x-coordinate and y-coordinate pair in two-dimensional space. +/// +typedef struct D2D_POINT_2U +{ + UINT32 x; + UINT32 y; + +} D2D_POINT_2U; + +/// +/// Represents an x-coordinate and y-coordinate pair in two-dimensional space. +/// +typedef struct D2D_POINT_2F +{ + FLOAT x; + FLOAT y; + +} D2D_POINT_2F; + +typedef POINT D2D_POINT_2L; + +/// +/// A vector of 2 FLOAT values (x, y). +/// +typedef struct D2D_VECTOR_2F +{ + FLOAT x; + FLOAT y; + +} D2D_VECTOR_2F; + + +/// +/// A vector of 3 FLOAT values (x, y, z). +/// +typedef struct D2D_VECTOR_3F +{ + FLOAT x; + FLOAT y; + FLOAT z; + +} D2D_VECTOR_3F; + + +/// +/// A vector of 4 FLOAT values (x, y, z, w). +/// +typedef struct D2D_VECTOR_4F +{ + FLOAT x; + FLOAT y; + FLOAT z; + FLOAT w; + +} D2D_VECTOR_4F; + + +/// +/// Represents a rectangle defined by the coordinates of the upper-left corner +/// (left, top) and the coordinates of the lower-right corner (right, bottom). +/// +typedef struct D2D_RECT_F +{ + FLOAT left; + FLOAT top; + FLOAT right; + FLOAT bottom; + +} D2D_RECT_F; + + +/// +/// Represents a rectangle defined by the coordinates of the upper-left corner +/// (left, top) and the coordinates of the lower-right corner (right, bottom). +/// +typedef struct D2D_RECT_U +{ + UINT32 left; + UINT32 top; + UINT32 right; + UINT32 bottom; + +} D2D_RECT_U; + +typedef RECT D2D_RECT_L; + +/// +/// Stores an ordered pair of floats, typically the width and height of a rectangle. +/// +typedef struct D2D_SIZE_F +{ + FLOAT width; + FLOAT height; + +} D2D_SIZE_F; + + +/// +/// Stores an ordered pair of integers, typically the width and height of a +/// rectangle. +/// +typedef struct D2D_SIZE_U +{ + UINT32 width; + UINT32 height; + +} D2D_SIZE_U; + + +/// +/// Represents a 3-by-2 matrix. +/// +typedef struct D2D_MATRIX_3X2_F +{ + union + { + struct + { + /// + /// Horizontal scaling / cosine of rotation + /// + FLOAT m11; + + /// + /// Vertical shear / sine of rotation + /// + FLOAT m12; + + /// + /// Horizontal shear / negative sine of rotation + /// + FLOAT m21; + + /// + /// Vertical scaling / cosine of rotation + /// + FLOAT m22; + + /// + /// Horizontal shift (always orthogonal regardless of rotation) + /// + FLOAT dx; + + /// + /// Vertical shift (always orthogonal regardless of rotation) + /// + FLOAT dy; + }; + + struct + { + FLOAT _11, _12; + FLOAT _21, _22; + FLOAT _31, _32; + }; + + FLOAT m[3][2]; + }; + +} D2D_MATRIX_3X2_F; + + + +/// +/// Represents a 4-by-3 matrix. +/// +typedef struct D2D_MATRIX_4X3_F +{ + union + { + struct + { + FLOAT _11, _12, _13; + FLOAT _21, _22, _23; + FLOAT _31, _32, _33; + FLOAT _41, _42, _43; + }; + + FLOAT m[4][3]; + }; + +} D2D_MATRIX_4X3_F; + + +/// +/// Represents a 4-by-4 matrix. +/// +typedef struct D2D_MATRIX_4X4_F +{ + union + { + struct + { + FLOAT _11, _12, _13, _14; + FLOAT _21, _22, _23, _24; + FLOAT _31, _32, _33, _34; + FLOAT _41, _42, _43, _44; + }; + + FLOAT m[4][4]; + }; + +} D2D_MATRIX_4X4_F; + + +/// +/// Represents a 5-by-4 matrix. +/// +typedef struct D2D_MATRIX_5X4_F +{ + union + { + struct + { + FLOAT _11, _12, _13, _14; + FLOAT _21, _22, _23, _24; + FLOAT _31, _32, _33, _34; + FLOAT _41, _42, _43, _44; + FLOAT _51, _52, _53, _54; + }; + + FLOAT m[5][4]; + }; + +} D2D_MATRIX_5X4_F; + + +typedef D2D_POINT_2F D2D1_POINT_2F; +typedef D2D_POINT_2U D2D1_POINT_2U; +typedef D2D_POINT_2L D2D1_POINT_2L; +typedef D2D_RECT_F D2D1_RECT_F; +typedef D2D_RECT_U D2D1_RECT_U; +typedef D2D_RECT_L D2D1_RECT_L; +typedef D2D_SIZE_F D2D1_SIZE_F; +typedef D2D_SIZE_U D2D1_SIZE_U; +typedef D2D_MATRIX_3X2_F D2D1_MATRIX_3X2_F; + + +#pragma warning(pop) + +#endif /* DCOMMON_H_INCLUDED */ diff --git a/gfx/include/dxsdk/dsconf.h b/gfx/include/dxsdk/dsconf.h new file mode 100644 index 0000000000..25a321a9f7 --- /dev/null +++ b/gfx/include/dxsdk/dsconf.h @@ -0,0 +1,204 @@ +/*==========================================================================; + * + * Copyright (c) Microsoft Corporation. All rights reserved. + * + * File: dsconf.h + * Content: DirectSound configuration interface include file + * + **************************************************************************/ + +#ifndef __DSCONF_INCLUDED__ +#define __DSCONF_INCLUDED__ +/*#include */ + +/*#pragma region Desktop Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ + + +#ifndef __DSOUND_INCLUDED__ +#error dsound.h not included +#endif // __DSOUND_INCLUDED__ + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + + +// DirectSound Configuration Component GUID {11AB3EC0-25EC-11d1-A4D8-00C04FC28ACA} +DEFINE_GUID(CLSID_DirectSoundPrivate, 0x11ab3ec0, 0x25ec, 0x11d1, 0xa4, 0xd8, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca); + + +// +// DirectSound Device Properties {84624F82-25EC-11d1-A4D8-00C04FC28ACA} +// + +DEFINE_GUID(DSPROPSETID_DirectSoundDevice, 0x84624f82, 0x25ec, 0x11d1, 0xa4, 0xd8, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca); + +typedef enum +{ + DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A = 1, + DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1 = 2, + DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1 = 3, + DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W = 4, + DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A = 5, + DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W = 6, + DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A = 7, + DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W = 8, +} DSPROPERTY_DIRECTSOUNDDEVICE; + +#if DIRECTSOUND_VERSION >= 0x0700 +#ifdef UNICODE +#define DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W +#define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W +#define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W +#else // UNICODE +#define DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A +#define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A +#define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A +#endif // UNICODE +#else // DIRECTSOUND_VERSION >= 0x0700 +#define DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A +#define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1 +#define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1 +#endif // DIRECTSOUND_VERSION >= 0x0700 + +typedef enum +{ + DIRECTSOUNDDEVICE_TYPE_EMULATED, + DIRECTSOUNDDEVICE_TYPE_VXD, + DIRECTSOUNDDEVICE_TYPE_WDM +} DIRECTSOUNDDEVICE_TYPE; + +typedef enum +{ + DIRECTSOUNDDEVICE_DATAFLOW_RENDER, + DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE +} DIRECTSOUNDDEVICE_DATAFLOW; + + +typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA +{ + LPSTR DeviceName; // waveIn/waveOut device name + DIRECTSOUNDDEVICE_DATAFLOW DataFlow; // Data flow (i.e. waveIn or waveOut) + GUID DeviceId; // DirectSound device id +} DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA; + +typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA +{ + LPWSTR DeviceName; // waveIn/waveOut device name + DIRECTSOUNDDEVICE_DATAFLOW DataFlow; // Data flow (i.e. waveIn or waveOut) + GUID DeviceId; // DirectSound device id +} DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA; + +#ifdef UNICODE +#define DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_DATA DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA +#define PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA +#else // UNICODE +#define DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_DATA DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA +#define PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA +#endif // UNICODE + +typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA +{ + GUID DeviceId; // DirectSound device id + CHAR DescriptionA[0x100]; // Device description (ANSI) + WCHAR DescriptionW[0x100]; // Device description (Unicode) + CHAR ModuleA[MAX_PATH]; // Device driver module (ANSI) + WCHAR ModuleW[MAX_PATH]; // Device driver module (Unicode) + DIRECTSOUNDDEVICE_TYPE Type; // Device type + DIRECTSOUNDDEVICE_DATAFLOW DataFlow; // Device dataflow + ULONG WaveDeviceId; // Wave device id + ULONG Devnode; // Devnode (or DevInst) +} DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA; + +typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA +{ + DIRECTSOUNDDEVICE_TYPE Type; // Device type + DIRECTSOUNDDEVICE_DATAFLOW DataFlow; // Device dataflow + GUID DeviceId; // DirectSound device id + LPSTR Description; // Device description + LPSTR Module; // Device driver module + LPSTR Interface; // Device interface + ULONG WaveDeviceId; // Wave device id +} DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA; + +typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA +{ + DIRECTSOUNDDEVICE_TYPE Type; // Device type + DIRECTSOUNDDEVICE_DATAFLOW DataFlow; // Device dataflow + GUID DeviceId; // DirectSound device id + LPWSTR Description; // Device description + LPWSTR Module; // Device driver module + LPWSTR Interface; // Device interface + ULONG WaveDeviceId; // Wave device id +} DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA; + +#if DIRECTSOUND_VERSION >= 0x0700 +#ifdef UNICODE +#define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA +#define PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA +#else // UNICODE +#define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA +#define PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA +#endif // UNICODE +#else // DIRECTSOUND_VERSION >= 0x0700 +#define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA +#define PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA +#endif // DIRECTSOUND_VERSION >= 0x0700 + +typedef BOOL (CALLBACK *LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK1)(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA, LPVOID); +typedef BOOL (CALLBACK *LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKA)(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA, LPVOID); +typedef BOOL (CALLBACK *LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKW)(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA, LPVOID); + +#if DIRECTSOUND_VERSION >= 0x0700 +#ifdef UNICODE +#define LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKW +#else // UNICODE +#define LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKA +#endif // UNICODE +#else // DIRECTSOUND_VERSION >= 0x0700 +#define LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK1 +#endif // DIRECTSOUND_VERSION >= 0x0700 + +typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA +{ + LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK1 Callback; // Callback function pointer + LPVOID Context; // Callback function context argument +} DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA; + +typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA +{ + LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKA Callback; // Callback function pointer + LPVOID Context; // Callback function context argument +} DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA; + +typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA +{ + LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKW Callback; // Callback function pointer + LPVOID Context; // Callback function context argument +} DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA; + +#if DIRECTSOUND_VERSION >= 0x0700 +#ifdef UNICODE +#define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA +#define PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA +#else // UNICODE +#define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA +#define PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA +#endif // UNICODE +#else // DIRECTSOUND_VERSION >= 0x0700 +#define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA +#define PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA +#endif // DIRECTSOUND_VERSION >= 0x0700 + + +#ifdef __cplusplus +} +#endif // __cplusplus + + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ + +#endif // __DSCONF_INCLUDED__ + diff --git a/gfx/include/dxsdk/dsetup.h b/gfx/include/dxsdk/dsetup.h new file mode 100644 index 0000000000..ebada13fd3 --- /dev/null +++ b/gfx/include/dxsdk/dsetup.h @@ -0,0 +1,283 @@ +/*========================================================================== + * + * Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved. + * + * File: dsetup.h + * Content: DirectXSetup, error codes and flags + ***************************************************************************/ + +#ifndef __DSETUP_H__ +#define __DSETUP_H__ + +#include // windows stuff + +#ifdef __cplusplus +extern "C" { +#endif + +#define FOURCC_VERS mmioFOURCC('v','e','r','s') + +// DSETUP Error Codes, must remain compatible with previous setup. +#define DSETUPERR_SUCCESS_RESTART 1 +#define DSETUPERR_SUCCESS 0 +#define DSETUPERR_BADWINDOWSVERSION -1 +#define DSETUPERR_SOURCEFILENOTFOUND -2 +#define DSETUPERR_NOCOPY -5 +#define DSETUPERR_OUTOFDISKSPACE -6 +#define DSETUPERR_CANTFINDINF -7 +#define DSETUPERR_CANTFINDDIR -8 +#define DSETUPERR_INTERNAL -9 +#define DSETUPERR_UNKNOWNOS -11 +#define DSETUPERR_NEWERVERSION -14 +#define DSETUPERR_NOTADMIN -15 +#define DSETUPERR_UNSUPPORTEDPROCESSOR -16 +#define DSETUPERR_MISSINGCAB_MANAGEDDX -17 +#define DSETUPERR_NODOTNETFRAMEWORKINSTALLED -18 +#define DSETUPERR_CABDOWNLOADFAIL -19 +#define DSETUPERR_DXCOMPONENTFILEINUSE -20 +#define DSETUPERR_UNTRUSTEDCABINETFILE -21 + +// DSETUP flags. DirectX 5.0 apps should use these flags only. +#define DSETUP_DDRAWDRV 0x00000008 /* install DirectDraw Drivers */ +#define DSETUP_DSOUNDDRV 0x00000010 /* install DirectSound Drivers */ +#define DSETUP_DXCORE 0x00010000 /* install DirectX runtime */ +#define DSETUP_DIRECTX (DSETUP_DXCORE|DSETUP_DDRAWDRV|DSETUP_DSOUNDDRV) +#define DSETUP_MANAGEDDX 0x00004000 /* OBSOLETE. install managed DirectX */ +#define DSETUP_TESTINSTALL 0x00020000 /* just test install, don't do anything */ + +// These OBSOLETE flags are here for compatibility with pre-DX5 apps only. +// They are present to allow DX3 apps to be recompiled with DX5 and still work. +// DO NOT USE THEM for DX5. They will go away in future DX releases. +#define DSETUP_DDRAW 0x00000001 /* OBSOLETE. install DirectDraw */ +#define DSETUP_DSOUND 0x00000002 /* OBSOLETE. install DirectSound */ +#define DSETUP_DPLAY 0x00000004 /* OBSOLETE. install DirectPlay */ +#define DSETUP_DPLAYSP 0x00000020 /* OBSOLETE. install DirectPlay Providers */ +#define DSETUP_DVIDEO 0x00000040 /* OBSOLETE. install DirectVideo */ +#define DSETUP_D3D 0x00000200 /* OBSOLETE. install Direct3D */ +#define DSETUP_DINPUT 0x00000800 /* OBSOLETE. install DirectInput */ +#define DSETUP_DIRECTXSETUP 0x00001000 /* OBSOLETE. install DirectXSetup DLL's */ +#define DSETUP_NOUI 0x00002000 /* OBSOLETE. install DirectX with NO UI */ +#define DSETUP_PROMPTFORDRIVERS 0x10000000 /* OBSOLETE. prompt when replacing display/audio drivers */ +#define DSETUP_RESTOREDRIVERS 0x20000000 /* OBSOLETE. restore display/audio drivers */ + + + +//****************************************************************** +// DirectX Setup Callback mechanism +//****************************************************************** + +// DSETUP Message Info Codes, passed to callback as Reason parameter. +#define DSETUP_CB_MSG_NOMESSAGE 0 +#define DSETUP_CB_MSG_INTERNAL_ERROR 10 +#define DSETUP_CB_MSG_BEGIN_INSTALL 13 +#define DSETUP_CB_MSG_BEGIN_INSTALL_RUNTIME 14 +#define DSETUP_CB_MSG_PROGRESS 18 +#define DSETUP_CB_MSG_WARNING_DISABLED_COMPONENT 19 + + + + + + +typedef struct _DSETUP_CB_PROGRESS +{ + DWORD dwPhase; + DWORD dwInPhaseMaximum; + DWORD dwInPhaseProgress; + DWORD dwOverallMaximum; + DWORD dwOverallProgress; +} DSETUP_CB_PROGRESS; + + +enum _DSETUP_CB_PROGRESS_PHASE +{ + DSETUP_INITIALIZING, + DSETUP_EXTRACTING, + DSETUP_COPYING, + DSETUP_FINALIZING +}; + + +#ifdef _WIN32 +// +// Data Structures +// +#ifndef UNICODE_ONLY + +typedef struct _DIRECTXREGISTERAPPA { + DWORD dwSize; + DWORD dwFlags; + LPSTR lpszApplicationName; + LPGUID lpGUID; + LPSTR lpszFilename; + LPSTR lpszCommandLine; + LPSTR lpszPath; + LPSTR lpszCurrentDirectory; +} DIRECTXREGISTERAPPA, *PDIRECTXREGISTERAPPA, *LPDIRECTXREGISTERAPPA; + +typedef struct _DIRECTXREGISTERAPP2A { + DWORD dwSize; + DWORD dwFlags; + LPSTR lpszApplicationName; + LPGUID lpGUID; + LPSTR lpszFilename; + LPSTR lpszCommandLine; + LPSTR lpszPath; + LPSTR lpszCurrentDirectory; + LPSTR lpszLauncherName; +} DIRECTXREGISTERAPP2A, *PDIRECTXREGISTERAPP2A, *LPDIRECTXREGISTERAPP2A; + +#endif //!UNICODE_ONLY +#ifndef ANSI_ONLY + +typedef struct _DIRECTXREGISTERAPPW { + DWORD dwSize; + DWORD dwFlags; + LPWSTR lpszApplicationName; + LPGUID lpGUID; + LPWSTR lpszFilename; + LPWSTR lpszCommandLine; + LPWSTR lpszPath; + LPWSTR lpszCurrentDirectory; +} DIRECTXREGISTERAPPW, *PDIRECTXREGISTERAPPW, *LPDIRECTXREGISTERAPPW; + +typedef struct _DIRECTXREGISTERAPP2W { + DWORD dwSize; + DWORD dwFlags; + LPWSTR lpszApplicationName; + LPGUID lpGUID; + LPWSTR lpszFilename; + LPWSTR lpszCommandLine; + LPWSTR lpszPath; + LPWSTR lpszCurrentDirectory; + LPWSTR lpszLauncherName; +} DIRECTXREGISTERAPP2W, *PDIRECTXREGISTERAPP2W, *LPDIRECTXREGISTERAPP2W; +#endif //!ANSI_ONLY +#ifdef UNICODE +typedef DIRECTXREGISTERAPPW DIRECTXREGISTERAPP; +typedef PDIRECTXREGISTERAPPW PDIRECTXREGISTERAPP; +typedef LPDIRECTXREGISTERAPPW LPDIRECTXREGISTERAPP; +typedef DIRECTXREGISTERAPP2W DIRECTXREGISTERAPP2; +typedef PDIRECTXREGISTERAPP2W PDIRECTXREGISTERAPP2; +typedef LPDIRECTXREGISTERAPP2W LPDIRECTXREGISTERAPP2; +#else +typedef DIRECTXREGISTERAPPA DIRECTXREGISTERAPP; +typedef PDIRECTXREGISTERAPPA PDIRECTXREGISTERAPP; +typedef LPDIRECTXREGISTERAPPA LPDIRECTXREGISTERAPP; +typedef DIRECTXREGISTERAPP2A DIRECTXREGISTERAPP2; +typedef PDIRECTXREGISTERAPP2A PDIRECTXREGISTERAPP2; +typedef LPDIRECTXREGISTERAPP2A LPDIRECTXREGISTERAPP2; +#endif // UNICODE + + +// +// API +// + +#ifndef UNICODE_ONLY +INT +WINAPI +DirectXSetupA( + HWND hWnd, + __in_opt LPSTR lpszRootPath, + DWORD dwFlags + ); +#endif //!UNICODE_ONLY +#ifndef ANSI_ONLY +INT +WINAPI +DirectXSetupW( + HWND hWnd, + __in_opt LPWSTR lpszRootPath, + DWORD dwFlags + ); +#endif //!ANSI_ONLY +#ifdef UNICODE +#define DirectXSetup DirectXSetupW +#else +#define DirectXSetup DirectXSetupA +#endif // !UNICODE + +#ifndef UNICODE_ONLY +INT +WINAPI +DirectXRegisterApplicationA( + HWND hWnd, + LPVOID lpDXRegApp + ); +#endif //!UNICODE_ONLY +#ifndef ANSI_ONLY +INT +WINAPI +DirectXRegisterApplicationW( + HWND hWnd, + LPVOID lpDXRegApp + ); +#endif //!ANSI_ONLY +#ifdef UNICODE +#define DirectXRegisterApplication DirectXRegisterApplicationW +#else +#define DirectXRegisterApplication DirectXRegisterApplicationA +#endif // !UNICODE + +INT +WINAPI +DirectXUnRegisterApplication( + HWND hWnd, + LPGUID lpGUID + ); + +// +// Function Pointers +// +#ifdef UNICODE +typedef INT (WINAPI * LPDIRECTXSETUP)(HWND, LPWSTR, DWORD); +typedef INT (WINAPI * LPDIRECTXREGISTERAPPLICATION)(HWND, LPVOID); +#else +typedef INT (WINAPI * LPDIRECTXSETUP)(HWND, LPSTR, DWORD); +typedef INT (WINAPI * LPDIRECTXREGISTERAPPLICATION)(HWND, LPVOID); +#endif // UNICODE + +typedef DWORD (FAR PASCAL * DSETUP_CALLBACK)(DWORD Reason, + DWORD MsgType, /* Same as flags to MessageBox */ + LPSTR szMessage, + LPSTR szName, + void *pInfo); + +INT WINAPI DirectXSetupSetCallback(DSETUP_CALLBACK Callback); +INT WINAPI DirectXSetupGetVersion(DWORD *lpdwVersion, DWORD *lpdwMinorVersion); +INT WINAPI DirectXSetupShowEULA(HWND hWndParent); +#ifndef UNICODE_ONLY +UINT +WINAPI +DirectXSetupGetEULAA( + __out_ecount(cchEULA) LPSTR lpszEULA, + UINT cchEULA, + WORD LangID + ); +#endif //!UNICODE_ONLY +#ifndef ANSI_ONLY +UINT +WINAPI +DirectXSetupGetEULAW( + __out_ecount(cchEULA) LPWSTR lpszEULA, + UINT cchEULA, + WORD LangID + ); +#endif //!ANSI_ONLY +#ifdef UNICODE +#define DirectXSetupGetEULA DirectXSetupGetEULAW +typedef UINT (WINAPI * LPDIRECTXSETUPGETEULA)(LPWSTR, UINT, WORD); +#else +#define DirectXSetupGetEULA DirectXSetupGetEULAA +typedef UINT (WINAPI * LPDIRECTXSETUPGETEULA)(LPSTR, UINT, WORD); +#endif // !UNICODE + +#endif // WIN32 + + +#ifdef __cplusplus +}; +#endif + +#endif diff --git a/gfx/include/dxsdk/dwrite.h b/gfx/include/dxsdk/dwrite.h new file mode 100644 index 0000000000..22b18b9568 --- /dev/null +++ b/gfx/include/dxsdk/dwrite.h @@ -0,0 +1,5121 @@ +//+-------------------------------------------------------------------------- +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Abstract: +// DirectX Typography Services public API definitions. +// +//---------------------------------------------------------------------------- + +#ifndef DWRITE_H_INCLUDED +#define DWRITE_H_INCLUDED + +#pragma once + +#ifndef DWRITE_NO_WINDOWS_H + +#include +#include + +#endif // DWRITE_NO_WINDOWS_H + +#include + +#ifndef DWRITE_DECLARE_INTERFACE +#define DWRITE_DECLARE_INTERFACE(iid) DECLSPEC_UUID(iid) DECLSPEC_NOVTABLE +#endif + +#ifndef DWRITE_EXPORT +#define DWRITE_EXPORT __declspec(dllimport) WINAPI +#endif + +/// +/// The type of a font represented by a single font file. +/// Font formats that consist of multiple files, e.g. Type 1 .PFM and .PFB, have +/// separate enum values for each of the file type. +/// +enum DWRITE_FONT_FILE_TYPE +{ + /// + /// Font type is not recognized by the DirectWrite font system. + /// + DWRITE_FONT_FILE_TYPE_UNKNOWN, + + /// + /// OpenType font with CFF outlines. + /// + DWRITE_FONT_FILE_TYPE_CFF, + + /// + /// OpenType font with TrueType outlines. + /// + DWRITE_FONT_FILE_TYPE_TRUETYPE, + + /// + /// OpenType font that contains a TrueType collection. + /// + DWRITE_FONT_FILE_TYPE_OPENTYPE_COLLECTION, + + /// + /// Type 1 PFM font. + /// + DWRITE_FONT_FILE_TYPE_TYPE1_PFM, + + /// + /// Type 1 PFB font. + /// + DWRITE_FONT_FILE_TYPE_TYPE1_PFB, + + /// + /// Vector .FON font. + /// + DWRITE_FONT_FILE_TYPE_VECTOR, + + /// + /// Bitmap .FON font. + /// + DWRITE_FONT_FILE_TYPE_BITMAP, + + // The following name is obsolete, but kept as an alias to avoid breaking existing code. + DWRITE_FONT_FILE_TYPE_TRUETYPE_COLLECTION = DWRITE_FONT_FILE_TYPE_OPENTYPE_COLLECTION, +}; + +/// +/// The file format of a complete font face. +/// Font formats that consist of multiple files, e.g. Type 1 .PFM and .PFB, have +/// a single enum entry. +/// +enum DWRITE_FONT_FACE_TYPE +{ + /// + /// OpenType font face with CFF outlines. + /// + DWRITE_FONT_FACE_TYPE_CFF, + + /// + /// OpenType font face with TrueType outlines. + /// + DWRITE_FONT_FACE_TYPE_TRUETYPE, + + /// + /// OpenType font face that is a part of a TrueType or CFF collection. + /// + DWRITE_FONT_FACE_TYPE_OPENTYPE_COLLECTION, + + /// + /// A Type 1 font face. + /// + DWRITE_FONT_FACE_TYPE_TYPE1, + + /// + /// A vector .FON format font face. + /// + DWRITE_FONT_FACE_TYPE_VECTOR, + + /// + /// A bitmap .FON format font face. + /// + DWRITE_FONT_FACE_TYPE_BITMAP, + + /// + /// Font face type is not recognized by the DirectWrite font system. + /// + DWRITE_FONT_FACE_TYPE_UNKNOWN, + + /// + /// The font data includes only the CFF table from an OpenType CFF font. + /// This font face type can be used only for embedded fonts (i.e., custom + /// font file loaders) and the resulting font face object supports only the + /// minimum functionality necessary to render glyphs. + /// + DWRITE_FONT_FACE_TYPE_RAW_CFF, + + // The following name is obsolete, but kept as an alias to avoid breaking existing code. + DWRITE_FONT_FACE_TYPE_TRUETYPE_COLLECTION = DWRITE_FONT_FACE_TYPE_OPENTYPE_COLLECTION, +}; + +/// +/// Specifies algorithmic style simulations to be applied to the font face. +/// Bold and oblique simulations can be combined via bitwise OR operation. +/// +enum DWRITE_FONT_SIMULATIONS +{ + /// + /// No simulations are performed. + /// + DWRITE_FONT_SIMULATIONS_NONE = 0x0000, + + /// + /// Algorithmic emboldening is performed. + /// + DWRITE_FONT_SIMULATIONS_BOLD = 0x0001, + + /// + /// Algorithmic italicization is performed. + /// + DWRITE_FONT_SIMULATIONS_OBLIQUE = 0x0002 +}; + +#ifdef DEFINE_ENUM_FLAG_OPERATORS +DEFINE_ENUM_FLAG_OPERATORS(DWRITE_FONT_SIMULATIONS); +#endif + +/// +/// The font weight enumeration describes common values for degree of blackness or thickness of strokes of characters in a font. +/// Font weight values less than 1 or greater than 999 are considered to be invalid, and they are rejected by font API functions. +/// +enum DWRITE_FONT_WEIGHT +{ + /// + /// Predefined font weight : Thin (100). + /// + DWRITE_FONT_WEIGHT_THIN = 100, + + /// + /// Predefined font weight : Extra-light (200). + /// + DWRITE_FONT_WEIGHT_EXTRA_LIGHT = 200, + + /// + /// Predefined font weight : Ultra-light (200). + /// + DWRITE_FONT_WEIGHT_ULTRA_LIGHT = 200, + + /// + /// Predefined font weight : Light (300). + /// + DWRITE_FONT_WEIGHT_LIGHT = 300, + + /// + /// Predefined font weight : Semi-light (350). + /// + DWRITE_FONT_WEIGHT_SEMI_LIGHT = 350, + + /// + /// Predefined font weight : Normal (400). + /// + DWRITE_FONT_WEIGHT_NORMAL = 400, + + /// + /// Predefined font weight : Regular (400). + /// + DWRITE_FONT_WEIGHT_REGULAR = 400, + + /// + /// Predefined font weight : Medium (500). + /// + DWRITE_FONT_WEIGHT_MEDIUM = 500, + + /// + /// Predefined font weight : Demi-bold (600). + /// + DWRITE_FONT_WEIGHT_DEMI_BOLD = 600, + + /// + /// Predefined font weight : Semi-bold (600). + /// + DWRITE_FONT_WEIGHT_SEMI_BOLD = 600, + + /// + /// Predefined font weight : Bold (700). + /// + DWRITE_FONT_WEIGHT_BOLD = 700, + + /// + /// Predefined font weight : Extra-bold (800). + /// + DWRITE_FONT_WEIGHT_EXTRA_BOLD = 800, + + /// + /// Predefined font weight : Ultra-bold (800). + /// + DWRITE_FONT_WEIGHT_ULTRA_BOLD = 800, + + /// + /// Predefined font weight : Black (900). + /// + DWRITE_FONT_WEIGHT_BLACK = 900, + + /// + /// Predefined font weight : Heavy (900). + /// + DWRITE_FONT_WEIGHT_HEAVY = 900, + + /// + /// Predefined font weight : Extra-black (950). + /// + DWRITE_FONT_WEIGHT_EXTRA_BLACK = 950, + + /// + /// Predefined font weight : Ultra-black (950). + /// + DWRITE_FONT_WEIGHT_ULTRA_BLACK = 950 +}; + +/// +/// The font stretch enumeration describes relative change from the normal aspect ratio +/// as specified by a font designer for the glyphs in a font. +/// Values less than 1 or greater than 9 are considered to be invalid, and they are rejected by font API functions. +/// +enum DWRITE_FONT_STRETCH +{ + /// + /// Predefined font stretch : Not known (0). + /// + DWRITE_FONT_STRETCH_UNDEFINED = 0, + + /// + /// Predefined font stretch : Ultra-condensed (1). + /// + DWRITE_FONT_STRETCH_ULTRA_CONDENSED = 1, + + /// + /// Predefined font stretch : Extra-condensed (2). + /// + DWRITE_FONT_STRETCH_EXTRA_CONDENSED = 2, + + /// + /// Predefined font stretch : Condensed (3). + /// + DWRITE_FONT_STRETCH_CONDENSED = 3, + + /// + /// Predefined font stretch : Semi-condensed (4). + /// + DWRITE_FONT_STRETCH_SEMI_CONDENSED = 4, + + /// + /// Predefined font stretch : Normal (5). + /// + DWRITE_FONT_STRETCH_NORMAL = 5, + + /// + /// Predefined font stretch : Medium (5). + /// + DWRITE_FONT_STRETCH_MEDIUM = 5, + + /// + /// Predefined font stretch : Semi-expanded (6). + /// + DWRITE_FONT_STRETCH_SEMI_EXPANDED = 6, + + /// + /// Predefined font stretch : Expanded (7). + /// + DWRITE_FONT_STRETCH_EXPANDED = 7, + + /// + /// Predefined font stretch : Extra-expanded (8). + /// + DWRITE_FONT_STRETCH_EXTRA_EXPANDED = 8, + + /// + /// Predefined font stretch : Ultra-expanded (9). + /// + DWRITE_FONT_STRETCH_ULTRA_EXPANDED = 9 +}; + +/// +/// The font style enumeration describes the slope style of a font face, such as Normal, Italic or Oblique. +/// Values other than the ones defined in the enumeration are considered to be invalid, and they are rejected by font API functions. +/// +enum DWRITE_FONT_STYLE +{ + /// + /// Font slope style : Normal. + /// + DWRITE_FONT_STYLE_NORMAL, + + /// + /// Font slope style : Oblique. + /// + DWRITE_FONT_STYLE_OBLIQUE, + + /// + /// Font slope style : Italic. + /// + DWRITE_FONT_STYLE_ITALIC + +}; + +/// +/// The informational string enumeration identifies a string in a font. +/// +enum DWRITE_INFORMATIONAL_STRING_ID +{ + /// + /// Unspecified name ID. + /// + DWRITE_INFORMATIONAL_STRING_NONE, + + /// + /// Copyright notice provided by the font. + /// + DWRITE_INFORMATIONAL_STRING_COPYRIGHT_NOTICE, + + /// + /// String containing a version number. + /// + DWRITE_INFORMATIONAL_STRING_VERSION_STRINGS, + + /// + /// Trademark information provided by the font. + /// + DWRITE_INFORMATIONAL_STRING_TRADEMARK, + + /// + /// Name of the font manufacturer. + /// + DWRITE_INFORMATIONAL_STRING_MANUFACTURER, + + /// + /// Name of the font designer. + /// + DWRITE_INFORMATIONAL_STRING_DESIGNER, + + /// + /// URL of font designer (with protocol, e.g., http://, ftp://). + /// + DWRITE_INFORMATIONAL_STRING_DESIGNER_URL, + + /// + /// Description of the font. Can contain revision information, usage recommendations, history, features, etc. + /// + DWRITE_INFORMATIONAL_STRING_DESCRIPTION, + + /// + /// URL of font vendor (with protocol, e.g., http://, ftp://). If a unique serial number is embedded in the URL, it can be used to register the font. + /// + DWRITE_INFORMATIONAL_STRING_FONT_VENDOR_URL, + + /// + /// Description of how the font may be legally used, or different example scenarios for licensed use. This field should be written in plain language, not legalese. + /// + DWRITE_INFORMATIONAL_STRING_LICENSE_DESCRIPTION, + + /// + /// URL where additional licensing information can be found. + /// + DWRITE_INFORMATIONAL_STRING_LICENSE_INFO_URL, + + /// + /// GDI-compatible family name. Because GDI allows a maximum of four fonts per family, fonts in the same family may have different GDI-compatible family names + /// (e.g., "Arial", "Arial Narrow", "Arial Black"). + /// + DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES, + + /// + /// GDI-compatible subfamily name. + /// + DWRITE_INFORMATIONAL_STRING_WIN32_SUBFAMILY_NAMES, + + /// + /// Typographic family name preferred by the designer. This enables font designers to group more than four fonts in a single family without losing compatibility with + /// GDI. This name is typically only present if it differs from the GDI-compatible family name. + /// + DWRITE_INFORMATIONAL_STRING_TYPOGRAPHIC_FAMILY_NAMES, + + /// + /// Typographic subfamily name preferred by the designer. This name is typically only present if it differs from the GDI-compatible subfamily name. + /// + DWRITE_INFORMATIONAL_STRING_TYPOGRAPHIC_SUBFAMILY_NAMES, + + /// + /// Sample text. This can be the font name or any other text that the designer thinks is the best example to display the font in. + /// + DWRITE_INFORMATIONAL_STRING_SAMPLE_TEXT, + + /// + /// The full name of the font, e.g. "Arial Bold", from name id 4 in the name table. + /// + DWRITE_INFORMATIONAL_STRING_FULL_NAME, + + /// + /// The postscript name of the font, e.g. "GillSans-Bold" from name id 6 in the name table. + /// + DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_NAME, + + /// + /// The postscript CID findfont name, from name id 20 in the name table. + /// + DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_CID_NAME, + + /// + /// Family name for the weight-stretch-style model. + /// + DWRITE_INFORMATIONAL_STRING_WEIGHT_STRETCH_STYLE_FAMILY_NAME, + + /// + /// Script/language tag to identify the scripts or languages that the font was + /// primarily designed to support. See DWRITE_FONT_PROPERTY_ID_DESIGN_SCRIPT_LANGUAGE_TAG + /// for a longer description. + /// + DWRITE_INFORMATIONAL_STRING_DESIGN_SCRIPT_LANGUAGE_TAG, + + /// + /// Script/language tag to identify the scripts or languages that the font declares + /// it is able to support. + /// + DWRITE_INFORMATIONAL_STRING_SUPPORTED_SCRIPT_LANGUAGE_TAG, + + // Obsolete aliases kept to avoid breaking existing code. + DWRITE_INFORMATIONAL_STRING_PREFERRED_FAMILY_NAMES = DWRITE_INFORMATIONAL_STRING_TYPOGRAPHIC_FAMILY_NAMES, + DWRITE_INFORMATIONAL_STRING_PREFERRED_SUBFAMILY_NAMES = DWRITE_INFORMATIONAL_STRING_TYPOGRAPHIC_SUBFAMILY_NAMES, + DWRITE_INFORMATIONAL_STRING_WWS_FAMILY_NAME = DWRITE_INFORMATIONAL_STRING_WEIGHT_STRETCH_STYLE_FAMILY_NAME, +}; + + +/// +/// The DWRITE_FONT_METRICS structure specifies the metrics of a font face that +/// are applicable to all glyphs within the font face. +/// +struct DWRITE_FONT_METRICS +{ + /// + /// The number of font design units per em unit. + /// Font files use their own coordinate system of font design units. + /// A font design unit is the smallest measurable unit in the em square, + /// an imaginary square that is used to size and align glyphs. + /// The concept of em square is used as a reference scale factor when defining font size and device transformation semantics. + /// The size of one em square is also commonly used to compute the paragraph indentation value. + /// + UINT16 designUnitsPerEm; + + /// + /// Ascent value of the font face in font design units. + /// Ascent is the distance from the top of font character alignment box to English baseline. + /// + UINT16 ascent; + + /// + /// Descent value of the font face in font design units. + /// Descent is the distance from the bottom of font character alignment box to English baseline. + /// + UINT16 descent; + + /// + /// Line gap in font design units. + /// Recommended additional white space to add between lines to improve legibility. The recommended line spacing + /// (baseline-to-baseline distance) is thus the sum of ascent, descent, and lineGap. The line gap is usually + /// positive or zero but can be negative, in which case the recommended line spacing is less than the height + /// of the character alignment box. + /// + INT16 lineGap; + + /// + /// Cap height value of the font face in font design units. + /// Cap height is the distance from English baseline to the top of a typical English capital. + /// Capital "H" is often used as a reference character for the purpose of calculating the cap height value. + /// + UINT16 capHeight; + + /// + /// x-height value of the font face in font design units. + /// x-height is the distance from English baseline to the top of lowercase letter "x", or a similar lowercase character. + /// + UINT16 xHeight; + + /// + /// The underline position value of the font face in font design units. + /// Underline position is the position of underline relative to the English baseline. + /// The value is usually made negative in order to place the underline below the baseline. + /// + INT16 underlinePosition; + + /// + /// The suggested underline thickness value of the font face in font design units. + /// + UINT16 underlineThickness; + + /// + /// The strikethrough position value of the font face in font design units. + /// Strikethrough position is the position of strikethrough relative to the English baseline. + /// The value is usually made positive in order to place the strikethrough above the baseline. + /// + INT16 strikethroughPosition; + + /// + /// The suggested strikethrough thickness value of the font face in font design units. + /// + UINT16 strikethroughThickness; +}; + +/// +/// The DWRITE_GLYPH_METRICS structure specifies the metrics of an individual glyph. +/// The units depend on how the metrics are obtained. +/// +struct DWRITE_GLYPH_METRICS +{ + /// + /// Specifies the X offset from the glyph origin to the left edge of the black box. + /// The glyph origin is the current horizontal writing position. + /// A negative value means the black box extends to the left of the origin (often true for lowercase italic 'f'). + /// + INT32 leftSideBearing; + + /// + /// Specifies the X offset from the origin of the current glyph to the origin of the next glyph when writing horizontally. + /// + UINT32 advanceWidth; + + /// + /// Specifies the X offset from the right edge of the black box to the origin of the next glyph when writing horizontally. + /// The value is negative when the right edge of the black box overhangs the layout box. + /// + INT32 rightSideBearing; + + /// + /// Specifies the vertical offset from the vertical origin to the top of the black box. + /// Thus, a positive value adds whitespace whereas a negative value means the glyph overhangs the top of the layout box. + /// + INT32 topSideBearing; + + /// + /// Specifies the Y offset from the vertical origin of the current glyph to the vertical origin of the next glyph when writing vertically. + /// (Note that the term "origin" by itself denotes the horizontal origin. The vertical origin is different. + /// Its Y coordinate is specified by verticalOriginY value, + /// and its X coordinate is half the advanceWidth to the right of the horizontal origin). + /// + UINT32 advanceHeight; + + /// + /// Specifies the vertical distance from the black box's bottom edge to the advance height. + /// Positive when the bottom edge of the black box is within the layout box. + /// Negative when the bottom edge of black box overhangs the layout box. + /// + INT32 bottomSideBearing; + + /// + /// Specifies the Y coordinate of a glyph's vertical origin, in the font's design coordinate system. + /// The y coordinate of a glyph's vertical origin is the sum of the glyph's top side bearing + /// and the top (i.e. yMax) of the glyph's bounding box. + /// + INT32 verticalOriginY; +}; + +/// +/// Optional adjustment to a glyph's position. A glyph offset changes the position of a glyph without affecting +/// the pen position. Offsets are in logical, pre-transform units. +/// +struct DWRITE_GLYPH_OFFSET +{ + /// + /// Offset in the advance direction of the run. A positive advance offset moves the glyph to the right + /// (in pre-transform coordinates) if the run is left-to-right or to the left if the run is right-to-left. + /// + FLOAT advanceOffset; + + /// + /// Offset in the ascent direction, i.e., the direction ascenders point. A positive ascender offset moves + /// the glyph up (in pre-transform coordinates). + /// + FLOAT ascenderOffset; +}; + +/// +/// Specifies the type of DirectWrite factory object. +/// DirectWrite factory contains internal state such as font loader registration and cached font data. +/// In most cases it is recommended to use the shared factory object, because it allows multiple components +/// that use DirectWrite to share internal DirectWrite state and reduce memory usage. +/// However, there are cases when it is desirable to reduce the impact of a component, +/// such as a plug-in from an untrusted source, on the rest of the process by sandboxing and isolating it +/// from the rest of the process components. In such cases, it is recommended to use an isolated factory for the sandboxed +/// component. +/// +enum DWRITE_FACTORY_TYPE +{ + /// + /// Shared factory allow for re-use of cached font data across multiple in process components. + /// Such factories also take advantage of cross process font caching components for better performance. + /// + DWRITE_FACTORY_TYPE_SHARED, + + /// + /// Objects created from the isolated factory do not interact with internal DirectWrite state from other components. + /// + DWRITE_FACTORY_TYPE_ISOLATED +}; + +/// +/// Creates an OpenType tag as a 32bit integer such that +/// the first character in the tag is the lowest byte, +/// (least significant on little endian architectures) +/// which can be used to compare with tags in the font file. +/// This macro is compatible with DWRITE_FONT_FEATURE_TAG. +/// +/// Example: DWRITE_MAKE_OPENTYPE_TAG('c','c','m','p') +/// Dword: 0x706D6363 +/// +#define DWRITE_MAKE_OPENTYPE_TAG(a,b,c,d) ( \ + (static_cast(static_cast(d)) << 24) | \ + (static_cast(static_cast(c)) << 16) | \ + (static_cast(static_cast(b)) << 8) | \ + static_cast(static_cast(a))) + +/// +/// Creates an OpenType tag for glyph positioning and substitution font features. +/// +#define DWRITE_MAKE_FONT_FEATURE_TAG(a,b,c,d) (static_cast(DWRITE_MAKE_OPENTYPE_TAG(a,b,c,d))) + +interface IDWriteFontFileStream; + +/// +/// Font file loader interface handles loading font file resources of a particular type from a key. +/// The font file loader interface is recommended to be implemented by a singleton object. +/// IMPORTANT: font file loader implementations must not register themselves with DirectWrite factory +/// inside their constructors and must not unregister themselves in their destructors, because +/// registration and unregistration operations increment and decrement the object reference count respectively. +/// Instead, registration and unregistration of font file loaders with DirectWrite factory should be performed +/// outside of the font file loader implementation as a separate step. +/// +interface DWRITE_DECLARE_INTERFACE("727cad4e-d6af-4c9e-8a08-d695b11caa49") IDWriteFontFileLoader : public IUnknown +{ + /// + /// Creates a font file stream object that encapsulates an open file resource. + /// The resource is closed when the last reference to fontFileStream is released. + /// + /// Font file reference key that uniquely identifies the font file resource + /// within the scope of the font loader being used. + /// Size of font file reference key in bytes. + /// Pointer to the newly created font file stream. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateStreamFromKey)( + _In_reads_bytes_(fontFileReferenceKeySize) void const* fontFileReferenceKey, + UINT32 fontFileReferenceKeySize, + _COM_Outptr_ IDWriteFontFileStream** fontFileStream + ) PURE; +}; + +/// +/// A built-in implementation of IDWriteFontFileLoader interface that operates on local font files +/// and exposes local font file information from the font file reference key. +/// Font file references created using CreateFontFileReference use this font file loader. +/// +interface DWRITE_DECLARE_INTERFACE("b2d9f3ec-c9fe-4a11-a2ec-d86208f7c0a2") IDWriteLocalFontFileLoader : public IDWriteFontFileLoader +{ + /// + /// Obtains the length of the absolute file path from the font file reference key. + /// + /// Font file reference key that uniquely identifies the local font file + /// within the scope of the font loader being used. + /// Size of font file reference key in bytes. + /// Length of the file path string not including the terminated NULL character. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFilePathLengthFromKey)( + _In_reads_bytes_(fontFileReferenceKeySize) void const* fontFileReferenceKey, + UINT32 fontFileReferenceKeySize, + _Out_ UINT32* filePathLength + ) PURE; + + /// + /// Obtains the absolute font file path from the font file reference key. + /// + /// Font file reference key that uniquely identifies the local font file + /// within the scope of the font loader being used. + /// Size of font file reference key in bytes. + /// Character array that receives the local file path. + /// Size of the filePath array in character count including the terminated NULL character. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFilePathFromKey)( + _In_reads_bytes_(fontFileReferenceKeySize) void const* fontFileReferenceKey, + UINT32 fontFileReferenceKeySize, + _Out_writes_z_(filePathSize) WCHAR* filePath, + UINT32 filePathSize + ) PURE; + + /// + /// Obtains the last write time of the file from the font file reference key. + /// + /// Font file reference key that uniquely identifies the local font file + /// within the scope of the font loader being used. + /// Size of font file reference key in bytes. + /// Last modified time of the font file. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetLastWriteTimeFromKey)( + _In_reads_bytes_(fontFileReferenceKeySize) void const* fontFileReferenceKey, + UINT32 fontFileReferenceKeySize, + _Out_ FILETIME* lastWriteTime + ) PURE; +}; + +/// +/// The interface for loading font file data. +/// +interface DWRITE_DECLARE_INTERFACE("6d4865fe-0ab8-4d91-8f62-5dd6be34a3e0") IDWriteFontFileStream : public IUnknown +{ + /// + /// Reads a fragment from a file. + /// + /// Receives the pointer to the start of the font file fragment. + /// Offset of the fragment from the beginning of the font file. + /// Size of the fragment in bytes. + /// The client defined context to be passed to the ReleaseFileFragment. + /// + /// Standard HRESULT error code. + /// + /// + /// IMPORTANT: ReadFileFragment() implementations must check whether the requested file fragment + /// is within the file bounds. Otherwise, an error should be returned from ReadFileFragment. + /// + STDMETHOD(ReadFileFragment)( + _Outptr_result_bytebuffer_(fragmentSize) void const** fragmentStart, + UINT64 fileOffset, + UINT64 fragmentSize, + _Out_ void** fragmentContext + ) PURE; + + /// + /// Releases a fragment from a file. + /// + /// The client defined context of a font fragment returned from ReadFileFragment. + STDMETHOD_(void, ReleaseFileFragment)( + void* fragmentContext + ) PURE; + + /// + /// Obtains the total size of a file. + /// + /// Receives the total size of the file. + /// + /// Standard HRESULT error code. + /// + /// + /// Implementing GetFileSize() for asynchronously loaded font files may require + /// downloading the complete file contents, therefore this method should only be used for operations that + /// either require complete font file to be loaded (e.g., copying a font file) or need to make + /// decisions based on the value of the file size (e.g., validation against a persisted file size). + /// + STDMETHOD(GetFileSize)( + _Out_ UINT64* fileSize + ) PURE; + + /// + /// Obtains the last modified time of the file. The last modified time is used by DirectWrite font selection algorithms + /// to determine whether one font resource is more up to date than another one. + /// + /// Receives the last modified time of the file in the format that represents + /// the number of 100-nanosecond intervals since January 1, 1601 (UTC). + /// + /// Standard HRESULT error code. For resources that don't have a concept of the last modified time, the implementation of + /// GetLastWriteTime should return E_NOTIMPL. + /// + STDMETHOD(GetLastWriteTime)( + _Out_ UINT64* lastWriteTime + ) PURE; +}; + +/// +/// The interface that represents a reference to a font file. +/// +interface DWRITE_DECLARE_INTERFACE("739d886a-cef5-47dc-8769-1a8b41bebbb0") IDWriteFontFile : public IUnknown +{ + /// + /// This method obtains the pointer to the reference key of a font file. The pointer is only valid until the object that refers to it is released. + /// + /// Pointer to the font file reference key. + /// IMPORTANT: The pointer value is valid until the font file reference object it is obtained from is released. + /// Size of font file reference key in bytes. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetReferenceKey)( + _Outptr_result_bytebuffer_(*fontFileReferenceKeySize) void const** fontFileReferenceKey, + _Out_ UINT32* fontFileReferenceKeySize + ) PURE; + + /// + /// Obtains the file loader associated with a font file object. + /// + /// The font file loader associated with the font file object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetLoader)( + _COM_Outptr_ IDWriteFontFileLoader** fontFileLoader + ) PURE; + + /// + /// Analyzes a file and returns whether it represents a font, and whether the font type is supported by the font system. + /// + /// TRUE if the font type is supported by the font system, FALSE otherwise. + /// The type of the font file. Note that even if isSupportedFontType is FALSE, + /// the fontFileType value may be different from DWRITE_FONT_FILE_TYPE_UNKNOWN. + /// The type of the font face that can be constructed from the font file. + /// Note that even if isSupportedFontType is FALSE, the fontFaceType value may be different from + /// DWRITE_FONT_FACE_TYPE_UNKNOWN. + /// Number of font faces contained in the font file. + /// + /// Standard HRESULT error code if there was a processing error during analysis. + /// + /// + /// IMPORTANT: certain font file types are recognized, but not supported by the font system. + /// For example, the font system will recognize a file as a Type 1 font file, + /// but will not be able to construct a font face object from it. In such situations, Analyze will set + /// isSupportedFontType output parameter to FALSE. + /// + STDMETHOD(Analyze)( + _Out_ BOOL* isSupportedFontType, + _Out_ DWRITE_FONT_FILE_TYPE* fontFileType, + _Out_opt_ DWRITE_FONT_FACE_TYPE* fontFaceType, + _Out_ UINT32* numberOfFaces + ) PURE; +}; + +/// +/// Represents the internal structure of a device pixel (i.e., the physical arrangement of red, +/// green, and blue color components) that is assumed for purposes of rendering text. +/// +#ifndef DWRITE_PIXEL_GEOMETRY_DEFINED +enum DWRITE_PIXEL_GEOMETRY +{ + /// + /// The red, green, and blue color components of each pixel are assumed to occupy the same point. + /// + DWRITE_PIXEL_GEOMETRY_FLAT, + + /// + /// Each pixel comprises three vertical stripes, with red on the left, green in the center, and + /// blue on the right. This is the most common pixel geometry for LCD monitors. + /// + DWRITE_PIXEL_GEOMETRY_RGB, + + /// + /// Each pixel comprises three vertical stripes, with blue on the left, green in the center, and + /// red on the right. + /// + DWRITE_PIXEL_GEOMETRY_BGR +}; +#define DWRITE_PIXEL_GEOMETRY_DEFINED +#endif + +/// +/// Represents a method of rendering glyphs. +/// +enum DWRITE_RENDERING_MODE +{ + /// + /// Specifies that the rendering mode is determined automatically based on the font and size. + /// + DWRITE_RENDERING_MODE_DEFAULT, + + /// + /// Specifies that no antialiasing is performed. Each pixel is either set to the foreground + /// color of the text or retains the color of the background. + /// + DWRITE_RENDERING_MODE_ALIASED, + + /// + /// Specifies that antialiasing is performed in the horizontal direction and the appearance + /// of glyphs is layout-compatible with GDI using CLEARTYPE_QUALITY. Use DWRITE_MEASURING_MODE_GDI_CLASSIC + /// to get glyph advances. The antialiasing may be either ClearType or grayscale depending on + /// the text antialiasing mode. + /// + DWRITE_RENDERING_MODE_GDI_CLASSIC, + + /// + /// Specifies that antialiasing is performed in the horizontal direction and the appearance + /// of glyphs is layout-compatible with GDI using CLEARTYPE_NATURAL_QUALITY. Glyph advances + /// are close to the font design advances, but are still rounded to whole pixels. Use + /// DWRITE_MEASURING_MODE_GDI_NATURAL to get glyph advances. The antialiasing may be either + /// ClearType or grayscale depending on the text antialiasing mode. + /// + DWRITE_RENDERING_MODE_GDI_NATURAL, + + /// + /// Specifies that antialiasing is performed in the horizontal direction. This rendering + /// mode allows glyphs to be positioned with subpixel precision and is therefore suitable + /// for natural (i.e., resolution-independent) layout. The antialiasing may be either + /// ClearType or grayscale depending on the text antialiasing mode. + /// + DWRITE_RENDERING_MODE_NATURAL, + + /// + /// Similar to natural mode except that antialiasing is performed in both the horizontal + /// and vertical directions. This is typically used at larger sizes to make curves and + /// diagonal lines look smoother. The antialiasing may be either ClearType or grayscale + /// depending on the text antialiasing mode. + /// + DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC, + + /// + /// Specifies that rendering should bypass the rasterizer and use the outlines directly. + /// This is typically used at very large sizes. + /// + DWRITE_RENDERING_MODE_OUTLINE, + + // The following names are obsolete, but are kept as aliases to avoid breaking existing code. + // Each of these rendering modes may result in either ClearType or grayscale antialiasing + // depending on the DWRITE_TEXT_ANTIALIASING_MODE. + DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC = DWRITE_RENDERING_MODE_GDI_CLASSIC, + DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL = DWRITE_RENDERING_MODE_GDI_NATURAL, + DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL = DWRITE_RENDERING_MODE_NATURAL, + DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC = DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC +}; + +/// +/// The DWRITE_MATRIX structure specifies the graphics transform to be applied +/// to rendered glyphs. +/// +struct DWRITE_MATRIX +{ + /// + /// Horizontal scaling / cosine of rotation + /// + FLOAT m11; + + /// + /// Vertical shear / sine of rotation + /// + FLOAT m12; + + /// + /// Horizontal shear / negative sine of rotation + /// + FLOAT m21; + + /// + /// Vertical scaling / cosine of rotation + /// + FLOAT m22; + + /// + /// Horizontal shift (always orthogonal regardless of rotation) + /// + FLOAT dx; + + /// + /// Vertical shift (always orthogonal regardless of rotation) + /// + FLOAT dy; +}; + +/// +/// The interface that represents text rendering settings for glyph rasterization and filtering. +/// +interface DWRITE_DECLARE_INTERFACE("2f0da53a-2add-47cd-82ee-d9ec34688e75") IDWriteRenderingParams : public IUnknown +{ + /// + /// Gets the gamma value used for gamma correction. Valid values must be + /// greater than zero and cannot exceed 256. + /// + STDMETHOD_(FLOAT, GetGamma)() PURE; + + /// + /// Gets the amount of contrast enhancement. Valid values are greater than + /// or equal to zero. + /// + STDMETHOD_(FLOAT, GetEnhancedContrast)() PURE; + + /// + /// Gets the ClearType level. Valid values range from 0.0f (no ClearType) + /// to 1.0f (full ClearType). + /// + STDMETHOD_(FLOAT, GetClearTypeLevel)() PURE; + + /// + /// Gets the pixel geometry. + /// + STDMETHOD_(DWRITE_PIXEL_GEOMETRY, GetPixelGeometry)() PURE; + + /// + /// Gets the rendering mode. + /// + STDMETHOD_(DWRITE_RENDERING_MODE, GetRenderingMode)() PURE; +}; + +// Forward declarations of D2D types +interface ID2D1SimplifiedGeometrySink; + +typedef ID2D1SimplifiedGeometrySink IDWriteGeometrySink; + +/// +/// This interface exposes various font data such as metrics, names, and glyph outlines. +/// It contains font face type, appropriate file references and face identification data. +/// +interface DWRITE_DECLARE_INTERFACE("5f49804d-7024-4d43-bfa9-d25984f53849") IDWriteFontFace : public IUnknown +{ + /// + /// Obtains the file format type of a font face. + /// + STDMETHOD_(DWRITE_FONT_FACE_TYPE, GetType)() PURE; + + /// + /// Obtains the font files representing a font face. + /// + /// The number of files representing the font face. + /// User provided array that stores pointers to font files representing the font face. + /// This parameter can be NULL if the user is only interested in the number of files representing the font face. + /// This API increments reference count of the font file pointers returned according to COM conventions, and the client + /// should release them when finished. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFiles)( + _Inout_ UINT32* numberOfFiles, + _Out_writes_opt_(*numberOfFiles) IDWriteFontFile** fontFiles + ) PURE; + + /// + /// Obtains the zero-based index of the font face in its font file or files. If the font files contain a single face, + /// the return value is zero. + /// + STDMETHOD_(UINT32, GetIndex)() PURE; + + /// + /// Obtains the algorithmic style simulation flags of a font face. + /// + STDMETHOD_(DWRITE_FONT_SIMULATIONS, GetSimulations)() PURE; + + /// + /// Determines whether the font is a symbol font. + /// + STDMETHOD_(BOOL, IsSymbolFont)() PURE; + + /// + /// Obtains design units and common metrics for the font face. + /// These metrics are applicable to all the glyphs within a fontface and are used by applications for layout calculations. + /// + /// Points to a DWRITE_FONT_METRICS structure to fill in. + /// The metrics returned by this function are in font design units. + STDMETHOD_(void, GetMetrics)( + _Out_ DWRITE_FONT_METRICS* fontFaceMetrics + ) PURE; + + /// + /// Obtains the number of glyphs in the font face. + /// + STDMETHOD_(UINT16, GetGlyphCount)() PURE; + + /// + /// Obtains ideal glyph metrics in font design units. Design glyphs metrics are used for glyph positioning. + /// + /// An array of glyph indices to compute the metrics for. + /// The number of elements in the glyphIndices array. + /// Array of DWRITE_GLYPH_METRICS structures filled by this function. + /// The metrics returned by this function are in font design units. + /// Indicates whether the font is being used in a sideways run. + /// This can affect the glyph metrics if the font has oblique simulation + /// because sideways oblique simulation differs from non-sideways oblique simulation. + /// + /// Standard HRESULT error code. If any of the input glyph indices are outside of the valid glyph index range + /// for the current font face, E_INVALIDARG will be returned. + /// + STDMETHOD(GetDesignGlyphMetrics)( + _In_reads_(glyphCount) UINT16 const* glyphIndices, + UINT32 glyphCount, + _Out_writes_(glyphCount) DWRITE_GLYPH_METRICS* glyphMetrics, + BOOL isSideways = FALSE + ) PURE; + + /// + /// Returns the nominal mapping of UTF-32 Unicode code points to glyph indices as defined by the font 'cmap' table. + /// Note that this mapping is primarily provided for line layout engines built on top of the physical font API. + /// Because of OpenType glyph substitution and line layout character substitution, the nominal conversion does not always correspond + /// to how a Unicode string will map to glyph indices when rendering using a particular font face. + /// Also, note that Unicode Variation Selectors provide for alternate mappings for character to glyph. + /// This call will always return the default variant. + /// + /// An array of UTF-32 code points to obtain nominal glyph indices from. + /// The number of elements in the codePoints array. + /// Array of nominal glyph indices filled by this function. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetGlyphIndices)( + _In_reads_(codePointCount) UINT32 const* codePoints, + UINT32 codePointCount, + _Out_writes_(codePointCount) UINT16* glyphIndices + ) PURE; + + /// + /// Finds the specified OpenType font table if it exists and returns a pointer to it. + /// The function accesses the underlying font data via the IDWriteFontFileStream interface + /// implemented by the font file loader. + /// + /// Four character tag of table to find. + /// Use the DWRITE_MAKE_OPENTYPE_TAG() macro to create it. + /// Unlike GDI, it does not support the special TTCF and null tags to access the whole font. + /// + /// Pointer to base of table in memory. + /// The pointer is only valid so long as the FontFace used to get the font table still exists + /// (not any other FontFace, even if it actually refers to the same physical font). + /// + /// Byte size of table. + /// + /// Opaque context which must be freed by calling ReleaseFontTable. + /// The context actually comes from the lower level IDWriteFontFileStream, + /// which may be implemented by the application or DWrite itself. + /// It is possible for a NULL tableContext to be returned, especially if + /// the implementation directly memory maps the whole file. + /// Nevertheless, always release it later, and do not use it as a test for function success. + /// The same table can be queried multiple times, + /// but each returned context can be different, so release each separately. + /// + /// True if table exists. + /// + /// Standard HRESULT error code. + /// If a table can not be found, the function will not return an error, but the size will be 0, table NULL, and exists = FALSE. + /// The context does not need to be freed if the table was not found. + /// + /// + /// The context for the same tag may be different for each call, + /// so each one must be held and released separately. + /// + STDMETHOD(TryGetFontTable)( + _In_ UINT32 openTypeTableTag, + _Outptr_result_bytebuffer_(*tableSize) const void** tableData, + _Out_ UINT32* tableSize, + _Out_ void** tableContext, + _Out_ BOOL* exists + ) PURE; + + /// + /// Releases the table obtained earlier from TryGetFontTable. + /// + /// Opaque context from TryGetFontTable. + STDMETHOD_(void, ReleaseFontTable)( + _In_ void* tableContext + ) PURE; + + /// + /// Computes the outline of a run of glyphs by calling back to the outline sink interface. + /// + /// Logical size of the font in DIP units. A DIP ("device-independent pixel") equals 1/96 inch. + /// Array of glyph indices. + /// Optional array of glyph advances in DIPs. + /// Optional array of glyph offsets. + /// Number of glyphs. + /// If true, specifies that glyphs are rotated 90 degrees to the left and vertical metrics are used. + /// A client can render a vertical run by specifying isSideways = true and rotating the resulting geometry 90 degrees to the + /// right using a transform. + /// If true, specifies that the advance direction is right to left. By default, the advance direction + /// is left to right. + /// Interface the function calls back to draw each element of the geometry. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetGlyphRunOutline)( + FLOAT emSize, + _In_reads_(glyphCount) UINT16 const* glyphIndices, + _In_reads_opt_(glyphCount) FLOAT const* glyphAdvances, + _In_reads_opt_(glyphCount) DWRITE_GLYPH_OFFSET const* glyphOffsets, + UINT32 glyphCount, + BOOL isSideways, + BOOL isRightToLeft, + _In_ IDWriteGeometrySink* geometrySink + ) PURE; + + /// + /// Determines the recommended rendering mode for the font given the specified size and rendering parameters. + /// + /// Logical size of the font in DIP units. A DIP ("device-independent pixel") equals 1/96 inch. + /// Number of physical pixels per DIP. For example, if the DPI of the rendering surface is 96 this + /// value is 1.0f. If the DPI is 120, this value is 120.0f/96. + /// Specifies measuring mode that will be used for glyphs in the font. + /// Renderer implementations may choose different rendering modes for given measuring modes, but + /// best results are seen when the corresponding modes match: + /// DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL for DWRITE_MEASURING_MODE_NATURAL + /// DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC for DWRITE_MEASURING_MODE_GDI_CLASSIC + /// DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL for DWRITE_MEASURING_MODE_GDI_NATURAL + /// + /// Rendering parameters object. This parameter is necessary in case the rendering parameters + /// object overrides the rendering mode. + /// Receives the recommended rendering mode to use. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetRecommendedRenderingMode)( + FLOAT emSize, + FLOAT pixelsPerDip, + DWRITE_MEASURING_MODE measuringMode, + IDWriteRenderingParams* renderingParams, + _Out_ DWRITE_RENDERING_MODE* renderingMode + ) PURE; + + /// + /// Obtains design units and common metrics for the font face. + /// These metrics are applicable to all the glyphs within a fontface and are used by applications for layout calculations. + /// + /// Logical size of the font in DIP units. A DIP ("device-independent pixel") equals 1/96 inch. + /// Number of physical pixels per DIP. For example, if the DPI of the rendering surface is 96 this + /// value is 1.0f. If the DPI is 120, this value is 120.0f/96. + /// Optional transform applied to the glyphs and their positions. This transform is applied after the + /// scaling specified by the font size and pixelsPerDip. + /// Points to a DWRITE_FONT_METRICS structure to fill in. + /// The metrics returned by this function are in font design units. + STDMETHOD(GetGdiCompatibleMetrics)( + FLOAT emSize, + FLOAT pixelsPerDip, + _In_opt_ DWRITE_MATRIX const* transform, + _Out_ DWRITE_FONT_METRICS* fontFaceMetrics + ) PURE; + + /// + /// Obtains glyph metrics in font design units with the return values compatible with what GDI would produce. + /// Glyphs metrics are used for positioning of individual glyphs. + /// + /// Logical size of the font in DIP units. A DIP ("device-independent pixel") equals 1/96 inch. + /// Number of physical pixels per DIP. For example, if the DPI of the rendering surface is 96 this + /// value is 1.0f. If the DPI is 120, this value is 120.0f/96. + /// Optional transform applied to the glyphs and their positions. This transform is applied after the + /// scaling specified by the font size and pixelsPerDip. + /// + /// When set to FALSE, the metrics are the same as the metrics of GDI aliased text. + /// When set to TRUE, the metrics are the same as the metrics of text measured by GDI using a font + /// created with CLEARTYPE_NATURAL_QUALITY. + /// + /// An array of glyph indices to compute the metrics for. + /// The number of elements in the glyphIndices array. + /// Array of DWRITE_GLYPH_METRICS structures filled by this function. + /// The metrics returned by this function are in font design units. + /// Indicates whether the font is being used in a sideways run. + /// This can affect the glyph metrics if the font has oblique simulation + /// because sideways oblique simulation differs from non-sideways oblique simulation. + /// + /// Standard HRESULT error code. If any of the input glyph indices are outside of the valid glyph index range + /// for the current font face, E_INVALIDARG will be returned. + /// + STDMETHOD(GetGdiCompatibleGlyphMetrics)( + FLOAT emSize, + FLOAT pixelsPerDip, + _In_opt_ DWRITE_MATRIX const* transform, + BOOL useGdiNatural, + _In_reads_(glyphCount) UINT16 const* glyphIndices, + UINT32 glyphCount, + _Out_writes_(glyphCount) DWRITE_GLYPH_METRICS* glyphMetrics, + BOOL isSideways = FALSE + ) PURE; +}; + + +interface IDWriteFactory; +interface IDWriteFontFileEnumerator; + +/// +/// The font collection loader interface is used to construct a collection of fonts given a particular type of key. +/// The font collection loader interface is recommended to be implemented by a singleton object. +/// IMPORTANT: font collection loader implementations must not register themselves with a DirectWrite factory +/// inside their constructors and must not unregister themselves in their destructors, because +/// registration and unregistration operations increment and decrement the object reference count respectively. +/// Instead, registration and unregistration of font file loaders with DirectWrite factory should be performed +/// outside of the font file loader implementation as a separate step. +/// +interface DWRITE_DECLARE_INTERFACE("cca920e4-52f0-492b-bfa8-29c72ee0a468") IDWriteFontCollectionLoader : public IUnknown +{ + /// + /// Creates a font file enumerator object that encapsulates a collection of font files. + /// The font system calls back to this interface to create a font collection. + /// + /// Factory associated with the loader. + /// Font collection key that uniquely identifies the collection of font files within + /// the scope of the font collection loader being used. + /// Size of the font collection key in bytes. + /// Pointer to the newly created font file enumerator. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateEnumeratorFromKey)( + _In_ IDWriteFactory* factory, + _In_reads_bytes_(collectionKeySize) void const* collectionKey, + UINT32 collectionKeySize, + _COM_Outptr_ IDWriteFontFileEnumerator** fontFileEnumerator + ) PURE; +}; + +/// +/// The font file enumerator interface encapsulates a collection of font files. The font system uses this interface +/// to enumerate font files when building a font collection. +/// +interface DWRITE_DECLARE_INTERFACE("72755049-5ff7-435d-8348-4be97cfa6c7c") IDWriteFontFileEnumerator : public IUnknown +{ + /// + /// Advances to the next font file in the collection. When it is first created, the enumerator is positioned + /// before the first element of the collection and the first call to MoveNext advances to the first file. + /// + /// Receives the value TRUE if the enumerator advances to a file, or FALSE if + /// the enumerator advanced past the last file in the collection. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(MoveNext)( + _Out_ BOOL* hasCurrentFile + ) PURE; + + /// + /// Gets a reference to the current font file. + /// + /// Pointer to the newly created font file object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetCurrentFontFile)( + _COM_Outptr_ IDWriteFontFile** fontFile + ) PURE; +}; + +/// +/// Represents a collection of strings indexed by locale name. +/// +interface DWRITE_DECLARE_INTERFACE("08256209-099a-4b34-b86d-c22b110e7771") IDWriteLocalizedStrings : public IUnknown +{ + /// + /// Gets the number of language/string pairs. + /// + STDMETHOD_(UINT32, GetCount)() PURE; + + /// + /// Gets the index of the item with the specified locale name. + /// + /// Locale name to look for. + /// Receives the zero-based index of the locale name/string pair. + /// Receives TRUE if the locale name exists or FALSE if not. + /// + /// Standard HRESULT error code. If the specified locale name does not exist, the return value is S_OK, + /// but *index is UINT_MAX and *exists is FALSE. + /// + STDMETHOD(FindLocaleName)( + _In_z_ WCHAR const* localeName, + _Out_ UINT32* index, + _Out_ BOOL* exists + ) PURE; + + /// + /// Gets the length in characters (not including the null terminator) of the locale name with the specified index. + /// + /// Zero-based index of the locale name. + /// Receives the length in characters, not including the null terminator. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetLocaleNameLength)( + UINT32 index, + _Out_ UINT32* length + ) PURE; + + /// + /// Copies the locale name with the specified index to the specified array. + /// + /// Zero-based index of the locale name. + /// Character array that receives the locale name. + /// Size of the array in characters. The size must include space for the terminating + /// null character. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetLocaleName)( + UINT32 index, + _Out_writes_z_(size) WCHAR* localeName, + UINT32 size + ) PURE; + + /// + /// Gets the length in characters (not including the null terminator) of the string with the specified index. + /// + /// Zero-based index of the string. + /// Receives the length in characters, not including the null terminator. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetStringLength)( + UINT32 index, + _Out_ UINT32* length + ) PURE; + + /// + /// Copies the string with the specified index to the specified array. + /// + /// Zero-based index of the string. + /// Character array that receives the string. + /// Size of the array in characters. The size must include space for the terminating + /// null character. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetString)( + UINT32 index, + _Out_writes_z_(size) WCHAR* stringBuffer, + UINT32 size + ) PURE; +}; + +interface IDWriteFontFamily; +interface IDWriteFont; + +/// +/// The IDWriteFontCollection encapsulates a collection of font families. +/// +interface DWRITE_DECLARE_INTERFACE("a84cee02-3eea-4eee-a827-87c1a02a0fcc") IDWriteFontCollection : public IUnknown +{ + /// + /// Gets the number of font families in the collection. + /// + STDMETHOD_(UINT32, GetFontFamilyCount)() PURE; + + /// + /// Creates a font family object given a zero-based font family index. + /// + /// Zero-based index of the font family. + /// Receives a pointer the newly created font family object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontFamily)( + UINT32 index, + _COM_Outptr_ IDWriteFontFamily** fontFamily + ) PURE; + + /// + /// Finds the font family with the specified family name. + /// + /// Name of the font family. The name is not case-sensitive but must otherwise exactly match a family name in the collection. + /// Receives the zero-based index of the matching font family if the family name was found or UINT_MAX otherwise. + /// Receives TRUE if the family name exists or FALSE otherwise. + /// + /// Standard HRESULT error code. If the specified family name does not exist, the return value is S_OK, but *index is UINT_MAX and *exists is FALSE. + /// + STDMETHOD(FindFamilyName)( + _In_z_ WCHAR const* familyName, + _Out_ UINT32* index, + _Out_ BOOL* exists + ) PURE; + + /// + /// Gets the font object that corresponds to the same physical font as the specified font face object. The specified physical font must belong + /// to the font collection. + /// + /// Font face object that specifies the physical font. + /// Receives a pointer to the newly created font object if successful or NULL otherwise. + /// + /// Standard HRESULT error code. If the specified physical font is not part of the font collection the return value is DWRITE_E_NOFONT. + /// + STDMETHOD(GetFontFromFontFace)( + _In_ IDWriteFontFace* fontFace, + _COM_Outptr_ IDWriteFont** font + ) PURE; +}; + +/// +/// The IDWriteFontList interface represents an ordered set of fonts that are part of an IDWriteFontCollection. +/// +interface DWRITE_DECLARE_INTERFACE("1a0d8438-1d97-4ec1-aef9-a2fb86ed6acb") IDWriteFontList : public IUnknown +{ + /// + /// Gets the font collection that contains the fonts. + /// + /// Receives a pointer to the font collection object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontCollection)( + _COM_Outptr_ IDWriteFontCollection** fontCollection + ) PURE; + + /// + /// Gets the number of fonts in the font list. + /// + STDMETHOD_(UINT32, GetFontCount)() PURE; + + /// + /// Gets a font given its zero-based index. + /// + /// Zero-based index of the font in the font list. + /// Receives a pointer to the newly created font object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFont)( + UINT32 index, + _COM_Outptr_ IDWriteFont** font + ) PURE; +}; + +/// +/// The IDWriteFontFamily interface represents a set of fonts that share the same design but are differentiated +/// by weight, stretch, and style. +/// +interface DWRITE_DECLARE_INTERFACE("da20d8ef-812a-4c43-9802-62ec4abd7add") IDWriteFontFamily : public IDWriteFontList +{ + /// + /// Creates a localized strings object that contains the family names for the font family, indexed by locale name. + /// + /// Receives a pointer to the newly created localized strings object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFamilyNames)( + _COM_Outptr_ IDWriteLocalizedStrings** names + ) PURE; + + /// + /// Gets the font that best matches the specified properties. + /// + /// Requested font weight. + /// Requested font stretch. + /// Requested font style. + /// Receives a pointer to the newly created font object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFirstMatchingFont)( + DWRITE_FONT_WEIGHT weight, + DWRITE_FONT_STRETCH stretch, + DWRITE_FONT_STYLE style, + _COM_Outptr_ IDWriteFont** matchingFont + ) PURE; + + /// + /// Gets a list of fonts in the font family ranked in order of how well they match the specified properties. + /// + /// Requested font weight. + /// Requested font stretch. + /// Requested font style. + /// Receives a pointer to the newly created font list object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetMatchingFonts)( + DWRITE_FONT_WEIGHT weight, + DWRITE_FONT_STRETCH stretch, + DWRITE_FONT_STYLE style, + _COM_Outptr_ IDWriteFontList** matchingFonts + ) PURE; +}; + +/// +/// The IDWriteFont interface represents a physical font in a font collection. +/// +interface DWRITE_DECLARE_INTERFACE("acd16696-8c14-4f5d-877e-fe3fc1d32737") IDWriteFont : public IUnknown +{ + /// + /// Gets the font family to which the specified font belongs. + /// + /// Receives a pointer to the font family object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontFamily)( + _COM_Outptr_ IDWriteFontFamily** fontFamily + ) PURE; + + /// + /// Gets the weight of the specified font. + /// + STDMETHOD_(DWRITE_FONT_WEIGHT, GetWeight)() PURE; + + /// + /// Gets the stretch (aka. width) of the specified font. + /// + STDMETHOD_(DWRITE_FONT_STRETCH, GetStretch)() PURE; + + /// + /// Gets the style (aka. slope) of the specified font. + /// + STDMETHOD_(DWRITE_FONT_STYLE, GetStyle)() PURE; + + /// + /// Returns TRUE if the font is a symbol font or FALSE if not. + /// + STDMETHOD_(BOOL, IsSymbolFont)() PURE; + + /// + /// Gets a localized strings collection containing the face names for the font (e.g., Regular or Bold), indexed by locale name. + /// + /// Receives a pointer to the newly created localized strings object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFaceNames)( + _COM_Outptr_ IDWriteLocalizedStrings** names + ) PURE; + + /// + /// Gets a localized strings collection containing the specified informational strings, indexed by locale name. + /// + /// Identifies the string to get. + /// Receives a pointer to the newly created localized strings object. + /// Receives the value TRUE if the font contains the specified string ID or FALSE if not. + /// + /// Standard HRESULT error code. If the font does not contain the specified string, the return value is S_OK but + /// informationalStrings receives a NULL pointer and exists receives the value FALSE. + /// + STDMETHOD(GetInformationalStrings)( + DWRITE_INFORMATIONAL_STRING_ID informationalStringID, + _COM_Outptr_result_maybenull_ IDWriteLocalizedStrings** informationalStrings, + _Out_ BOOL* exists + ) PURE; + + /// + /// Gets a value that indicates what simulation are applied to the specified font. + /// + STDMETHOD_(DWRITE_FONT_SIMULATIONS, GetSimulations)() PURE; + + /// + /// Gets the metrics for the font. + /// + /// Receives the font metrics. + STDMETHOD_(void, GetMetrics)( + _Out_ DWRITE_FONT_METRICS* fontMetrics + ) PURE; + + /// + /// Determines whether the font supports the specified character. + /// + /// Unicode (UCS-4) character value. + /// Receives the value TRUE if the font supports the specified character or FALSE if not. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(HasCharacter)( + UINT32 unicodeValue, + _Out_ BOOL* exists + ) PURE; + + /// + /// Creates a font face object for the font. + /// + /// Receives a pointer to the newly created font face object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontFace)( + _COM_Outptr_ IDWriteFontFace** fontFace + ) PURE; +}; + +/// +/// Direction for how reading progresses. +/// +enum DWRITE_READING_DIRECTION +{ + /// + /// Reading progresses from left to right. + /// + DWRITE_READING_DIRECTION_LEFT_TO_RIGHT = 0, + + /// + /// Reading progresses from right to left. + /// + DWRITE_READING_DIRECTION_RIGHT_TO_LEFT = 1, + + /// + /// Reading progresses from top to bottom. + /// + DWRITE_READING_DIRECTION_TOP_TO_BOTTOM = 2, + + /// + /// Reading progresses from bottom to top. + /// + DWRITE_READING_DIRECTION_BOTTOM_TO_TOP = 3, +}; + +/// +/// Direction for how lines of text are placed relative to one another. +/// +enum DWRITE_FLOW_DIRECTION +{ + /// + /// Text lines are placed from top to bottom. + /// + DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM = 0, + + /// + /// Text lines are placed from bottom to top. + /// + DWRITE_FLOW_DIRECTION_BOTTOM_TO_TOP = 1, + + /// + /// Text lines are placed from left to right. + /// + DWRITE_FLOW_DIRECTION_LEFT_TO_RIGHT = 2, + + /// + /// Text lines are placed from right to left. + /// + DWRITE_FLOW_DIRECTION_RIGHT_TO_LEFT = 3, +}; + +/// +/// Alignment of paragraph text along the reading direction axis relative to +/// the leading and trailing edge of the layout box. +/// +enum DWRITE_TEXT_ALIGNMENT +{ + /// + /// The leading edge of the paragraph text is aligned to the layout box's leading edge. + /// + DWRITE_TEXT_ALIGNMENT_LEADING, + + /// + /// The trailing edge of the paragraph text is aligned to the layout box's trailing edge. + /// + DWRITE_TEXT_ALIGNMENT_TRAILING, + + /// + /// The center of the paragraph text is aligned to the center of the layout box. + /// + DWRITE_TEXT_ALIGNMENT_CENTER, + + /// + /// Align text to the leading side, and also justify text to fill the lines. + /// + DWRITE_TEXT_ALIGNMENT_JUSTIFIED +}; + +/// +/// Alignment of paragraph text along the flow direction axis relative to the +/// flow's beginning and ending edge of the layout box. +/// +enum DWRITE_PARAGRAPH_ALIGNMENT +{ + /// + /// The first line of paragraph is aligned to the flow's beginning edge of the layout box. + /// + DWRITE_PARAGRAPH_ALIGNMENT_NEAR, + + /// + /// The last line of paragraph is aligned to the flow's ending edge of the layout box. + /// + DWRITE_PARAGRAPH_ALIGNMENT_FAR, + + /// + /// The center of the paragraph is aligned to the center of the flow of the layout box. + /// + DWRITE_PARAGRAPH_ALIGNMENT_CENTER +}; + +/// +/// Word wrapping in multiline paragraph. +/// +enum DWRITE_WORD_WRAPPING +{ + /// + /// Words are broken across lines to avoid text overflowing the layout box. + /// + DWRITE_WORD_WRAPPING_WRAP = 0, + + /// + /// Words are kept within the same line even when it overflows the layout box. + /// This option is often used with scrolling to reveal overflow text. + /// + DWRITE_WORD_WRAPPING_NO_WRAP = 1, + + /// + /// Words are broken across lines to avoid text overflowing the layout box. + /// Emergency wrapping occurs if the word is larger than the maximum width. + /// + DWRITE_WORD_WRAPPING_EMERGENCY_BREAK = 2, + + /// + /// Only wrap whole words, never breaking words (emergency wrapping) when the + /// layout width is too small for even a single word. + /// + DWRITE_WORD_WRAPPING_WHOLE_WORD = 3, + + /// + /// Wrap between any valid characters clusters. + /// + DWRITE_WORD_WRAPPING_CHARACTER = 4, +}; + +/// +/// The method used for line spacing in layout. +/// +enum DWRITE_LINE_SPACING_METHOD +{ + /// + /// Line spacing depends solely on the content, growing to accommodate the size of fonts and inline objects. + /// + DWRITE_LINE_SPACING_METHOD_DEFAULT, + + /// + /// Lines are explicitly set to uniform spacing, regardless of contained font sizes. + /// This can be useful to avoid the uneven appearance that can occur from font fallback. + /// + DWRITE_LINE_SPACING_METHOD_UNIFORM, + + /// + /// Line spacing and baseline distances are proportional to the computed values based on the content, the size of the fonts and inline objects. + /// + DWRITE_LINE_SPACING_METHOD_PROPORTIONAL +}; + +/// +/// Text granularity used to trim text overflowing the layout box. +/// +enum DWRITE_TRIMMING_GRANULARITY +{ + /// + /// No trimming occurs. Text flows beyond the layout width. + /// + DWRITE_TRIMMING_GRANULARITY_NONE, + + /// + /// Trimming occurs at character cluster boundary. + /// + DWRITE_TRIMMING_GRANULARITY_CHARACTER, + + /// + /// Trimming occurs at word boundary. + /// + DWRITE_TRIMMING_GRANULARITY_WORD +}; + +/// +/// Typographic feature of text supplied by the font. +/// +/// +/// Use DWRITE_MAKE_FONT_FEATURE_TAG() to create a custom one. +/// +enum DWRITE_FONT_FEATURE_TAG +{ + DWRITE_FONT_FEATURE_TAG_ALTERNATIVE_FRACTIONS = DWRITE_MAKE_OPENTYPE_TAG('a','f','r','c'), + DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS_FROM_CAPITALS = DWRITE_MAKE_OPENTYPE_TAG('c','2','p','c'), + DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS_FROM_CAPITALS = DWRITE_MAKE_OPENTYPE_TAG('c','2','s','c'), + DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_ALTERNATES = DWRITE_MAKE_OPENTYPE_TAG('c','a','l','t'), + DWRITE_FONT_FEATURE_TAG_CASE_SENSITIVE_FORMS = DWRITE_MAKE_OPENTYPE_TAG('c','a','s','e'), + DWRITE_FONT_FEATURE_TAG_GLYPH_COMPOSITION_DECOMPOSITION = DWRITE_MAKE_OPENTYPE_TAG('c','c','m','p'), + DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_LIGATURES = DWRITE_MAKE_OPENTYPE_TAG('c','l','i','g'), + DWRITE_FONT_FEATURE_TAG_CAPITAL_SPACING = DWRITE_MAKE_OPENTYPE_TAG('c','p','s','p'), + DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_SWASH = DWRITE_MAKE_OPENTYPE_TAG('c','s','w','h'), + DWRITE_FONT_FEATURE_TAG_CURSIVE_POSITIONING = DWRITE_MAKE_OPENTYPE_TAG('c','u','r','s'), + DWRITE_FONT_FEATURE_TAG_DEFAULT = DWRITE_MAKE_OPENTYPE_TAG('d','f','l','t'), + DWRITE_FONT_FEATURE_TAG_DISCRETIONARY_LIGATURES = DWRITE_MAKE_OPENTYPE_TAG('d','l','i','g'), + DWRITE_FONT_FEATURE_TAG_EXPERT_FORMS = DWRITE_MAKE_OPENTYPE_TAG('e','x','p','t'), + DWRITE_FONT_FEATURE_TAG_FRACTIONS = DWRITE_MAKE_OPENTYPE_TAG('f','r','a','c'), + DWRITE_FONT_FEATURE_TAG_FULL_WIDTH = DWRITE_MAKE_OPENTYPE_TAG('f','w','i','d'), + DWRITE_FONT_FEATURE_TAG_HALF_FORMS = DWRITE_MAKE_OPENTYPE_TAG('h','a','l','f'), + DWRITE_FONT_FEATURE_TAG_HALANT_FORMS = DWRITE_MAKE_OPENTYPE_TAG('h','a','l','n'), + DWRITE_FONT_FEATURE_TAG_ALTERNATE_HALF_WIDTH = DWRITE_MAKE_OPENTYPE_TAG('h','a','l','t'), + DWRITE_FONT_FEATURE_TAG_HISTORICAL_FORMS = DWRITE_MAKE_OPENTYPE_TAG('h','i','s','t'), + DWRITE_FONT_FEATURE_TAG_HORIZONTAL_KANA_ALTERNATES = DWRITE_MAKE_OPENTYPE_TAG('h','k','n','a'), + DWRITE_FONT_FEATURE_TAG_HISTORICAL_LIGATURES = DWRITE_MAKE_OPENTYPE_TAG('h','l','i','g'), + DWRITE_FONT_FEATURE_TAG_HALF_WIDTH = DWRITE_MAKE_OPENTYPE_TAG('h','w','i','d'), + DWRITE_FONT_FEATURE_TAG_HOJO_KANJI_FORMS = DWRITE_MAKE_OPENTYPE_TAG('h','o','j','o'), + DWRITE_FONT_FEATURE_TAG_JIS04_FORMS = DWRITE_MAKE_OPENTYPE_TAG('j','p','0','4'), + DWRITE_FONT_FEATURE_TAG_JIS78_FORMS = DWRITE_MAKE_OPENTYPE_TAG('j','p','7','8'), + DWRITE_FONT_FEATURE_TAG_JIS83_FORMS = DWRITE_MAKE_OPENTYPE_TAG('j','p','8','3'), + DWRITE_FONT_FEATURE_TAG_JIS90_FORMS = DWRITE_MAKE_OPENTYPE_TAG('j','p','9','0'), + DWRITE_FONT_FEATURE_TAG_KERNING = DWRITE_MAKE_OPENTYPE_TAG('k','e','r','n'), + DWRITE_FONT_FEATURE_TAG_STANDARD_LIGATURES = DWRITE_MAKE_OPENTYPE_TAG('l','i','g','a'), + DWRITE_FONT_FEATURE_TAG_LINING_FIGURES = DWRITE_MAKE_OPENTYPE_TAG('l','n','u','m'), + DWRITE_FONT_FEATURE_TAG_LOCALIZED_FORMS = DWRITE_MAKE_OPENTYPE_TAG('l','o','c','l'), + DWRITE_FONT_FEATURE_TAG_MARK_POSITIONING = DWRITE_MAKE_OPENTYPE_TAG('m','a','r','k'), + DWRITE_FONT_FEATURE_TAG_MATHEMATICAL_GREEK = DWRITE_MAKE_OPENTYPE_TAG('m','g','r','k'), + DWRITE_FONT_FEATURE_TAG_MARK_TO_MARK_POSITIONING = DWRITE_MAKE_OPENTYPE_TAG('m','k','m','k'), + DWRITE_FONT_FEATURE_TAG_ALTERNATE_ANNOTATION_FORMS = DWRITE_MAKE_OPENTYPE_TAG('n','a','l','t'), + DWRITE_FONT_FEATURE_TAG_NLC_KANJI_FORMS = DWRITE_MAKE_OPENTYPE_TAG('n','l','c','k'), + DWRITE_FONT_FEATURE_TAG_OLD_STYLE_FIGURES = DWRITE_MAKE_OPENTYPE_TAG('o','n','u','m'), + DWRITE_FONT_FEATURE_TAG_ORDINALS = DWRITE_MAKE_OPENTYPE_TAG('o','r','d','n'), + DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_ALTERNATE_WIDTH = DWRITE_MAKE_OPENTYPE_TAG('p','a','l','t'), + DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS = DWRITE_MAKE_OPENTYPE_TAG('p','c','a','p'), + DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_FIGURES = DWRITE_MAKE_OPENTYPE_TAG('p','n','u','m'), + DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_WIDTHS = DWRITE_MAKE_OPENTYPE_TAG('p','w','i','d'), + DWRITE_FONT_FEATURE_TAG_QUARTER_WIDTHS = DWRITE_MAKE_OPENTYPE_TAG('q','w','i','d'), + DWRITE_FONT_FEATURE_TAG_REQUIRED_LIGATURES = DWRITE_MAKE_OPENTYPE_TAG('r','l','i','g'), + DWRITE_FONT_FEATURE_TAG_RUBY_NOTATION_FORMS = DWRITE_MAKE_OPENTYPE_TAG('r','u','b','y'), + DWRITE_FONT_FEATURE_TAG_STYLISTIC_ALTERNATES = DWRITE_MAKE_OPENTYPE_TAG('s','a','l','t'), + DWRITE_FONT_FEATURE_TAG_SCIENTIFIC_INFERIORS = DWRITE_MAKE_OPENTYPE_TAG('s','i','n','f'), + DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS = DWRITE_MAKE_OPENTYPE_TAG('s','m','c','p'), + DWRITE_FONT_FEATURE_TAG_SIMPLIFIED_FORMS = DWRITE_MAKE_OPENTYPE_TAG('s','m','p','l'), + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1 = DWRITE_MAKE_OPENTYPE_TAG('s','s','0','1'), + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_2 = DWRITE_MAKE_OPENTYPE_TAG('s','s','0','2'), + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_3 = DWRITE_MAKE_OPENTYPE_TAG('s','s','0','3'), + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_4 = DWRITE_MAKE_OPENTYPE_TAG('s','s','0','4'), + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_5 = DWRITE_MAKE_OPENTYPE_TAG('s','s','0','5'), + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_6 = DWRITE_MAKE_OPENTYPE_TAG('s','s','0','6'), + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_7 = DWRITE_MAKE_OPENTYPE_TAG('s','s','0','7'), + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_8 = DWRITE_MAKE_OPENTYPE_TAG('s','s','0','8'), + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_9 = DWRITE_MAKE_OPENTYPE_TAG('s','s','0','9'), + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_10 = DWRITE_MAKE_OPENTYPE_TAG('s','s','1','0'), + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_11 = DWRITE_MAKE_OPENTYPE_TAG('s','s','1','1'), + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_12 = DWRITE_MAKE_OPENTYPE_TAG('s','s','1','2'), + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_13 = DWRITE_MAKE_OPENTYPE_TAG('s','s','1','3'), + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_14 = DWRITE_MAKE_OPENTYPE_TAG('s','s','1','4'), + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_15 = DWRITE_MAKE_OPENTYPE_TAG('s','s','1','5'), + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_16 = DWRITE_MAKE_OPENTYPE_TAG('s','s','1','6'), + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_17 = DWRITE_MAKE_OPENTYPE_TAG('s','s','1','7'), + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_18 = DWRITE_MAKE_OPENTYPE_TAG('s','s','1','8'), + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_19 = DWRITE_MAKE_OPENTYPE_TAG('s','s','1','9'), + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_20 = DWRITE_MAKE_OPENTYPE_TAG('s','s','2','0'), + DWRITE_FONT_FEATURE_TAG_SUBSCRIPT = DWRITE_MAKE_OPENTYPE_TAG('s','u','b','s'), + DWRITE_FONT_FEATURE_TAG_SUPERSCRIPT = DWRITE_MAKE_OPENTYPE_TAG('s','u','p','s'), + DWRITE_FONT_FEATURE_TAG_SWASH = DWRITE_MAKE_OPENTYPE_TAG('s','w','s','h'), + DWRITE_FONT_FEATURE_TAG_TITLING = DWRITE_MAKE_OPENTYPE_TAG('t','i','t','l'), + DWRITE_FONT_FEATURE_TAG_TRADITIONAL_NAME_FORMS = DWRITE_MAKE_OPENTYPE_TAG('t','n','a','m'), + DWRITE_FONT_FEATURE_TAG_TABULAR_FIGURES = DWRITE_MAKE_OPENTYPE_TAG('t','n','u','m'), + DWRITE_FONT_FEATURE_TAG_TRADITIONAL_FORMS = DWRITE_MAKE_OPENTYPE_TAG('t','r','a','d'), + DWRITE_FONT_FEATURE_TAG_THIRD_WIDTHS = DWRITE_MAKE_OPENTYPE_TAG('t','w','i','d'), + DWRITE_FONT_FEATURE_TAG_UNICASE = DWRITE_MAKE_OPENTYPE_TAG('u','n','i','c'), + DWRITE_FONT_FEATURE_TAG_VERTICAL_WRITING = DWRITE_MAKE_OPENTYPE_TAG('v','e','r','t'), + DWRITE_FONT_FEATURE_TAG_VERTICAL_ALTERNATES_AND_ROTATION = DWRITE_MAKE_OPENTYPE_TAG('v','r','t','2'), + DWRITE_FONT_FEATURE_TAG_SLASHED_ZERO = DWRITE_MAKE_OPENTYPE_TAG('z','e','r','o'), +}; + +/// +/// The DWRITE_TEXT_RANGE structure specifies a range of text positions where format is applied. +/// +struct DWRITE_TEXT_RANGE +{ + /// + /// The start text position of the range. + /// + UINT32 startPosition; + + /// + /// The number of text positions in the range. + /// + UINT32 length; +}; + +/// +/// The DWRITE_FONT_FEATURE structure specifies properties used to identify and execute typographic feature in the font. +/// +struct DWRITE_FONT_FEATURE +{ + /// + /// The feature OpenType name identifier. + /// + DWRITE_FONT_FEATURE_TAG nameTag; + + /// + /// Execution parameter of the feature. + /// + /// + /// The parameter should be non-zero to enable the feature. Once enabled, a feature can't be disabled again within + /// the same range. Features requiring a selector use this value to indicate the selector index. + /// + UINT32 parameter; +}; + +/// +/// Defines a set of typographic features to be applied during shaping. +/// Notice the character range which this feature list spans is specified +/// as a separate parameter to GetGlyphs. +/// +struct DWRITE_TYPOGRAPHIC_FEATURES +{ + /// + /// Array of font features. + /// + _Field_size_(featureCount) DWRITE_FONT_FEATURE* features; + + /// + /// The number of features. + /// + UINT32 featureCount; +}; + +/// +/// The DWRITE_TRIMMING structure specifies the trimming option for text overflowing the layout box. +/// +struct DWRITE_TRIMMING +{ + /// + /// Text granularity of which trimming applies. + /// + DWRITE_TRIMMING_GRANULARITY granularity; + + /// + /// Character code used as the delimiter signaling the beginning of the portion of text to be preserved, + /// most useful for path ellipsis, where the delimiter would be a slash. Leave this zero if there is no + /// delimiter. + /// + UINT32 delimiter; + + /// + /// How many occurrences of the delimiter to step back. Leave this zero if there is no delimiter. + /// + UINT32 delimiterCount; +}; + + +interface IDWriteTypography; +interface IDWriteInlineObject; + +/// +/// The format of text used for text layout. +/// +/// +/// This object may not be thread-safe and it may carry the state of text format change. +/// +interface DWRITE_DECLARE_INTERFACE("9c906818-31d7-4fd3-a151-7c5e225db55a") IDWriteTextFormat : public IUnknown +{ + /// + /// Set alignment option of text relative to layout box's leading and trailing edge. + /// + /// Text alignment option + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetTextAlignment)( + DWRITE_TEXT_ALIGNMENT textAlignment + ) PURE; + + /// + /// Set alignment option of paragraph relative to layout box's top and bottom edge. + /// + /// Paragraph alignment option + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetParagraphAlignment)( + DWRITE_PARAGRAPH_ALIGNMENT paragraphAlignment + ) PURE; + + /// + /// Set word wrapping option. + /// + /// Word wrapping option + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetWordWrapping)( + DWRITE_WORD_WRAPPING wordWrapping + ) PURE; + + /// + /// Set paragraph reading direction. + /// + /// Text reading direction + /// + /// Standard HRESULT error code. + /// + /// + /// The flow direction must be perpendicular to the reading direction. + /// Setting both to a vertical direction or both to horizontal yields + /// DWRITE_E_FLOWDIRECTIONCONFLICTS when calling GetMetrics or Draw. + /// + STDMETHOD(SetReadingDirection)( + DWRITE_READING_DIRECTION readingDirection + ) PURE; + + /// + /// Set paragraph flow direction. + /// + /// Paragraph flow direction + /// + /// Standard HRESULT error code. + /// + /// + /// The flow direction must be perpendicular to the reading direction. + /// Setting both to a vertical direction or both to horizontal yields + /// DWRITE_E_FLOWDIRECTIONCONFLICTS when calling GetMetrics or Draw. + /// + STDMETHOD(SetFlowDirection)( + DWRITE_FLOW_DIRECTION flowDirection + ) PURE; + + /// + /// Set incremental tab stop position. + /// + /// The incremental tab stop value + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetIncrementalTabStop)( + FLOAT incrementalTabStop + ) PURE; + + /// + /// Set trimming options for any trailing text exceeding the layout width + /// or for any far text exceeding the layout height. + /// + /// Text trimming options. + /// Application-defined omission sign. This parameter may be NULL if no trimming sign is desired. + /// + /// Any inline object can be used for the trimming sign, but CreateEllipsisTrimmingSign + /// provides a typical ellipsis symbol. Trimming is also useful vertically for hiding + /// partial lines. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetTrimming)( + _In_ DWRITE_TRIMMING const* trimmingOptions, + _In_opt_ IDWriteInlineObject* trimmingSign + ) PURE; + + /// + /// Set line spacing. + /// + /// How to determine line height. + /// The line height, or rather distance between one baseline to another. + /// Distance from top of line to baseline. A reasonable ratio to lineSpacing is 80%. + /// + /// For the default method, spacing depends solely on the content. + /// For uniform spacing, the given line height will override the content. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetLineSpacing)( + DWRITE_LINE_SPACING_METHOD lineSpacingMethod, + FLOAT lineSpacing, + FLOAT baseline + ) PURE; + + /// + /// Get alignment option of text relative to layout box's leading and trailing edge. + /// + STDMETHOD_(DWRITE_TEXT_ALIGNMENT, GetTextAlignment)() PURE; + + /// + /// Get alignment option of paragraph relative to layout box's top and bottom edge. + /// + STDMETHOD_(DWRITE_PARAGRAPH_ALIGNMENT, GetParagraphAlignment)() PURE; + + /// + /// Get word wrapping option. + /// + STDMETHOD_(DWRITE_WORD_WRAPPING, GetWordWrapping)() PURE; + + /// + /// Get paragraph reading direction. + /// + STDMETHOD_(DWRITE_READING_DIRECTION, GetReadingDirection)() PURE; + + /// + /// Get paragraph flow direction. + /// + STDMETHOD_(DWRITE_FLOW_DIRECTION, GetFlowDirection)() PURE; + + /// + /// Get incremental tab stop position. + /// + STDMETHOD_(FLOAT, GetIncrementalTabStop)() PURE; + + /// + /// Get trimming options for text overflowing the layout width. + /// + /// Text trimming options. + /// Trimming omission sign. This parameter may be NULL. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetTrimming)( + _Out_ DWRITE_TRIMMING* trimmingOptions, + _COM_Outptr_ IDWriteInlineObject** trimmingSign + ) PURE; + + /// + /// Get line spacing. + /// + /// How line height is determined. + /// The line height, or rather distance between one baseline to another. + /// Distance from top of line to baseline. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetLineSpacing)( + _Out_ DWRITE_LINE_SPACING_METHOD* lineSpacingMethod, + _Out_ FLOAT* lineSpacing, + _Out_ FLOAT* baseline + ) PURE; + + /// + /// Get the font collection. + /// + /// The current font collection. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontCollection)( + _COM_Outptr_ IDWriteFontCollection** fontCollection + ) PURE; + + /// + /// Get the length of the font family name, in characters, not including the terminating NULL character. + /// + STDMETHOD_(UINT32, GetFontFamilyNameLength)() PURE; + + /// + /// Get a copy of the font family name. + /// + /// Character array that receives the current font family name + /// Size of the character array in character count including the terminated NULL character. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontFamilyName)( + _Out_writes_z_(nameSize) WCHAR* fontFamilyName, + UINT32 nameSize + ) PURE; + + /// + /// Get the font weight. + /// + STDMETHOD_(DWRITE_FONT_WEIGHT, GetFontWeight)() PURE; + + /// + /// Get the font style. + /// + STDMETHOD_(DWRITE_FONT_STYLE, GetFontStyle)() PURE; + + /// + /// Get the font stretch. + /// + STDMETHOD_(DWRITE_FONT_STRETCH, GetFontStretch)() PURE; + + /// + /// Get the font em height. + /// + STDMETHOD_(FLOAT, GetFontSize)() PURE; + + /// + /// Get the length of the locale name, in characters, not including the terminating NULL character. + /// + STDMETHOD_(UINT32, GetLocaleNameLength)() PURE; + + /// + /// Get a copy of the locale name. + /// + /// Character array that receives the current locale name + /// Size of the character array in character count including the terminated NULL character. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetLocaleName)( + _Out_writes_z_(nameSize) WCHAR* localeName, + UINT32 nameSize + ) PURE; +}; + + +/// +/// Font typography setting. +/// +interface DWRITE_DECLARE_INTERFACE("55f1112b-1dc2-4b3c-9541-f46894ed85b6") IDWriteTypography : public IUnknown +{ + /// + /// Add font feature. + /// + /// The font feature to add. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(AddFontFeature)( + DWRITE_FONT_FEATURE fontFeature + ) PURE; + + /// + /// Get the number of font features. + /// + STDMETHOD_(UINT32, GetFontFeatureCount)() PURE; + + /// + /// Get the font feature at the specified index. + /// + /// The zero-based index of the font feature to get. + /// The font feature. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontFeature)( + UINT32 fontFeatureIndex, + _Out_ DWRITE_FONT_FEATURE* fontFeature + ) PURE; +}; + +enum DWRITE_SCRIPT_SHAPES +{ + /// + /// No additional shaping requirement. Text is shaped with the writing system default behavior. + /// + DWRITE_SCRIPT_SHAPES_DEFAULT = 0, + + /// + /// Text should leave no visual on display i.e. control or format control characters. + /// + DWRITE_SCRIPT_SHAPES_NO_VISUAL = 1 +}; + +#ifdef DEFINE_ENUM_FLAG_OPERATORS +DEFINE_ENUM_FLAG_OPERATORS(DWRITE_SCRIPT_SHAPES); +#endif + +/// +/// Association of text and its writing system script as well as some display attributes. +/// +struct DWRITE_SCRIPT_ANALYSIS +{ + /// + /// Zero-based index representation of writing system script. + /// + UINT16 script; + + /// + /// Additional shaping requirement of text. + /// + DWRITE_SCRIPT_SHAPES shapes; +}; + +/// +/// Condition at the edges of inline object or text used to determine +/// line-breaking behavior. +/// +enum DWRITE_BREAK_CONDITION +{ + /// + /// Whether a break is allowed is determined by the condition of the + /// neighboring text span or inline object. + /// + DWRITE_BREAK_CONDITION_NEUTRAL, + + /// + /// A break is allowed, unless overruled by the condition of the + /// neighboring text span or inline object, either prohibited by a + /// May Not or forced by a Must. + /// + DWRITE_BREAK_CONDITION_CAN_BREAK, + + /// + /// There should be no break, unless overruled by a Must condition from + /// the neighboring text span or inline object. + /// + DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, + + /// + /// The break must happen, regardless of the condition of the adjacent + /// text span or inline object. + /// + DWRITE_BREAK_CONDITION_MUST_BREAK +}; + +/// +/// Line breakpoint characteristics of a character. +/// +struct DWRITE_LINE_BREAKPOINT +{ + /// + /// Breaking condition before the character. + /// + UINT8 breakConditionBefore : 2; + + /// + /// Breaking condition after the character. + /// + UINT8 breakConditionAfter : 2; + + /// + /// The character is some form of whitespace, which may be meaningful + /// for justification. + /// + UINT8 isWhitespace : 1; + + /// + /// The character is a soft hyphen, often used to indicate hyphenation + /// points inside words. + /// + UINT8 isSoftHyphen : 1; + + UINT8 padding : 2; +}; + +/// +/// How to apply number substitution on digits and related punctuation. +/// +enum DWRITE_NUMBER_SUBSTITUTION_METHOD +{ + /// + /// Specifies that the substitution method should be determined based + /// on LOCALE_IDIGITSUBSTITUTION value of the specified text culture. + /// + DWRITE_NUMBER_SUBSTITUTION_METHOD_FROM_CULTURE, + + /// + /// If the culture is Arabic or Farsi, specifies that the number shape + /// depend on the context. Either traditional or nominal number shape + /// are used depending on the nearest preceding strong character or (if + /// there is none) the reading direction of the paragraph. + /// + DWRITE_NUMBER_SUBSTITUTION_METHOD_CONTEXTUAL, + + /// + /// Specifies that code points 0x30-0x39 are always rendered as nominal numeral + /// shapes (ones of the European number), i.e., no substitution is performed. + /// + DWRITE_NUMBER_SUBSTITUTION_METHOD_NONE, + + /// + /// Specifies that number are rendered using the national number shape + /// as specified by the LOCALE_SNATIVEDIGITS value of the specified text culture. + /// + DWRITE_NUMBER_SUBSTITUTION_METHOD_NATIONAL, + + /// + /// Specifies that number are rendered using the traditional shape + /// for the specified culture. For most cultures, this is the same as + /// NativeNational. However, NativeNational results in Latin number + /// for some Arabic cultures, whereas this value results in Arabic + /// number for all Arabic cultures. + /// + DWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL +}; + +/// +/// Holds the appropriate digits and numeric punctuation for a given locale. +/// +interface DWRITE_DECLARE_INTERFACE("14885CC9-BAB0-4f90-B6ED-5C366A2CD03D") IDWriteNumberSubstitution : public IUnknown +{ +}; + +/// +/// Shaping output properties per input character. +/// +struct DWRITE_SHAPING_TEXT_PROPERTIES +{ + /// + /// This character can be shaped independently from the others + /// (usually set for the space character). + /// + UINT16 isShapedAlone : 1; + + /// + /// Reserved for use by shaping engine. + /// + UINT16 reserved : 15; +}; + +/// +/// Shaping output properties per output glyph. +/// +struct DWRITE_SHAPING_GLYPH_PROPERTIES +{ + /// + /// Justification class, whether to use spacing, kashidas, or + /// another method. This exists for backwards compatibility + /// with Uniscribe's SCRIPT_JUSTIFY enum. + /// + UINT16 justification : 4; + + /// + /// Indicates glyph is the first of a cluster. + /// + UINT16 isClusterStart : 1; + + /// + /// Glyph is a diacritic. + /// + UINT16 isDiacritic : 1; + + /// + /// Glyph has no width, blank, ZWJ, ZWNJ etc. + /// + UINT16 isZeroWidthSpace : 1; + + /// + /// Reserved for use by shaping engine. + /// + UINT16 reserved : 9; +}; + +/// +/// The interface implemented by the text analyzer's client to provide text to +/// the analyzer. It allows the separation between the logical view of text as +/// a continuous stream of characters identifiable by unique text positions, +/// and the actual memory layout of potentially discrete blocks of text in the +/// client's backing store. +/// +/// If any of these callbacks returns an error, the analysis functions will +/// stop prematurely and return a callback error. Rather than return E_NOTIMPL, +/// an application should stub the method and return a constant/null and S_OK. +/// +interface DWRITE_DECLARE_INTERFACE("688e1a58-5094-47c8-adc8-fbcea60ae92b") IDWriteTextAnalysisSource : public IUnknown +{ + /// + /// Get a block of text starting at the specified text position. + /// Returning NULL indicates the end of text - the position is after + /// the last character. This function is called iteratively for + /// each consecutive block, tying together several fragmented blocks + /// in the backing store into a virtual contiguous string. + /// + /// First position of the piece to obtain. All + /// positions are in UTF16 code-units, not whole characters, which + /// matters when supplementary characters are used. + /// Address that receives a pointer to the text block + /// at the specified position. + /// Number of UTF16 units of the retrieved chunk. + /// The returned length is not the length of the block, but the length + /// remaining in the block, from the given position until its end. + /// So querying for a position that is 75 positions into a 100 + /// position block would return 25. + /// Pointer to the first character at the given text position. + /// NULL indicates no chunk available at the specified position, either + /// because textPosition >= the entire text content length or because the + /// queried position is not mapped into the app's backing store. + /// + /// Although apps can implement sparse textual content that only maps part of + /// the backing store, the app must map any text that is in the range passed + /// to any analysis functions. + /// + STDMETHOD(GetTextAtPosition)( + UINT32 textPosition, + _Outptr_result_buffer_(*textLength) WCHAR const** textString, + _Out_ UINT32* textLength + ) PURE; + + /// + /// Get a block of text immediately preceding the specified position. + /// + /// Position immediately after the last position of the chunk to obtain. + /// Address that receives a pointer to the text block + /// at the specified position. + /// Number of UTF16 units of the retrieved block. + /// The length returned is from the given position to the front of + /// the block. + /// Pointer to the first character at (textPosition - textLength). + /// NULL indicates no chunk available at the specified position, either + /// because textPosition == 0,the textPosition > the entire text content + /// length, or the queried position is not mapped into the app's backing + /// store. + /// + /// Although apps can implement sparse textual content that only maps part of + /// the backing store, the app must map any text that is in the range passed + /// to any analysis functions. + /// + STDMETHOD(GetTextBeforePosition)( + UINT32 textPosition, + _Outptr_result_buffer_(*textLength) WCHAR const** textString, + _Out_ UINT32* textLength + ) PURE; + + /// + /// Get paragraph reading direction. + /// + STDMETHOD_(DWRITE_READING_DIRECTION, GetParagraphReadingDirection)() PURE; + + /// + /// Get locale name on the range affected by it. + /// + /// Position to get the locale name of. + /// Receives the length from the given position up to the + /// next differing locale. + /// Address that receives a pointer to the locale + /// at the specified position. + /// + /// The localeName pointer must remain valid until the next call or until + /// the analysis returns. + /// + STDMETHOD(GetLocaleName)( + UINT32 textPosition, + _Out_ UINT32* textLength, + _Outptr_result_z_ WCHAR const** localeName + ) PURE; + + /// + /// Get number substitution on the range affected by it. + /// + /// Position to get the number substitution of. + /// Receives the length from the given position up to the + /// next differing number substitution. + /// Address that receives a pointer to the number substitution + /// at the specified position. + /// + /// Any implementation should return the number substitution with an + /// incremented ref count, and the analysis will release when finished + /// with it (either before the next call or before it returns). However, + /// the sink callback may hold onto it after that. + /// + STDMETHOD(GetNumberSubstitution)( + UINT32 textPosition, + _Out_ UINT32* textLength, + _COM_Outptr_ IDWriteNumberSubstitution** numberSubstitution + ) PURE; +}; + +/// +/// The interface implemented by the text analyzer's client to receive the +/// output of a given text analysis. The Text analyzer disregards any current +/// state of the analysis sink, therefore a Set method call on a range +/// overwrites the previously set analysis result of the same range. +/// +interface DWRITE_DECLARE_INTERFACE("5810cd44-0ca0-4701-b3fa-bec5182ae4f6") IDWriteTextAnalysisSink : public IUnknown +{ + /// + /// Report script analysis for the text range. + /// + /// Starting position to report from. + /// Number of UTF16 units of the reported range. + /// Script analysis of characters in range. + /// + /// A successful code or error code to abort analysis. + /// + STDMETHOD(SetScriptAnalysis)( + UINT32 textPosition, + UINT32 textLength, + _In_ DWRITE_SCRIPT_ANALYSIS const* scriptAnalysis + ) PURE; + + /// + /// Report line-break opportunities for each character, starting from + /// the specified position. + /// + /// Starting position to report from. + /// Number of UTF16 units of the reported range. + /// Breaking conditions for each character. + /// + /// A successful code or error code to abort analysis. + /// + STDMETHOD(SetLineBreakpoints)( + UINT32 textPosition, + UINT32 textLength, + _In_reads_(textLength) DWRITE_LINE_BREAKPOINT const* lineBreakpoints + ) PURE; + + /// + /// Set bidirectional level on the range, called once per each + /// level run change (either explicit or resolved implicit). + /// + /// Starting position to report from. + /// Number of UTF16 units of the reported range. + /// Explicit level from embedded control codes + /// RLE/RLO/LRE/LRO/PDF, determined before any additional rules. + /// Final implicit level considering the + /// explicit level and characters' natural directionality, after all + /// Bidi rules have been applied. + /// + /// A successful code or error code to abort analysis. + /// + STDMETHOD(SetBidiLevel)( + UINT32 textPosition, + UINT32 textLength, + UINT8 explicitLevel, + UINT8 resolvedLevel + ) PURE; + + /// + /// Set number substitution on the range. + /// + /// Starting position to report from. + /// Number of UTF16 units of the reported range. + /// The number substitution applicable to + /// the returned range of text. The sink callback may hold onto it by + /// incrementing its ref count. + /// + /// A successful code or error code to abort analysis. + /// + /// + /// Unlike script and bidi analysis, where every character passed to the + /// analyzer has a result, this will only be called for those ranges where + /// substitution is applicable. For any other range, you will simply not + /// be called. + /// + STDMETHOD(SetNumberSubstitution)( + UINT32 textPosition, + UINT32 textLength, + _In_ IDWriteNumberSubstitution* numberSubstitution + ) PURE; +}; + +/// +/// Analyzes various text properties for complex script processing. +/// +interface DWRITE_DECLARE_INTERFACE("b7e6163e-7f46-43b4-84b3-e4e6249c365d") IDWriteTextAnalyzer : public IUnknown +{ + /// + /// Analyzes a text range for script boundaries, reading text attributes + /// from the source and reporting the Unicode script ID to the sink + /// callback SetScript. + /// + /// Source object to analyze. + /// Starting position within the source object. + /// Length to analyze. + /// Callback object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(AnalyzeScript)( + _In_ IDWriteTextAnalysisSource* analysisSource, + UINT32 textPosition, + UINT32 textLength, + _In_ IDWriteTextAnalysisSink* analysisSink + ) PURE; + + /// + /// Analyzes a text range for script directionality, reading attributes + /// from the source and reporting levels to the sink callback SetBidiLevel. + /// + /// Source object to analyze. + /// Starting position within the source object. + /// Length to analyze. + /// Callback object. + /// + /// Standard HRESULT error code. + /// + /// + /// While the function can handle multiple paragraphs, the text range + /// should not arbitrarily split the middle of paragraphs. Otherwise the + /// returned levels may be wrong, since the Bidi algorithm is meant to + /// apply to the paragraph as a whole. + /// + /// + /// Embedded control codes (LRE/LRO/RLE/RLO/PDF) are taken into account. + /// + STDMETHOD(AnalyzeBidi)( + _In_ IDWriteTextAnalysisSource* analysisSource, + UINT32 textPosition, + UINT32 textLength, + _In_ IDWriteTextAnalysisSink* analysisSink + ) PURE; + + /// + /// Analyzes a text range for spans where number substitution is applicable, + /// reading attributes from the source and reporting substitutable ranges + /// to the sink callback SetNumberSubstitution. + /// + /// Source object to analyze. + /// Starting position within the source object. + /// Length to analyze. + /// Callback object. + /// + /// Standard HRESULT error code. + /// + /// + /// While the function can handle multiple ranges of differing number + /// substitutions, the text ranges should not arbitrarily split the + /// middle of numbers. Otherwise it will treat the numbers separately + /// and will not translate any intervening punctuation. + /// + /// + /// Embedded control codes (LRE/LRO/RLE/RLO/PDF) are taken into account. + /// + STDMETHOD(AnalyzeNumberSubstitution)( + _In_ IDWriteTextAnalysisSource* analysisSource, + UINT32 textPosition, + UINT32 textLength, + _In_ IDWriteTextAnalysisSink* analysisSink + ) PURE; + + /// + /// Analyzes a text range for potential breakpoint opportunities, reading + /// attributes from the source and reporting breakpoint opportunities to + /// the sink callback SetLineBreakpoints. + /// + /// Source object to analyze. + /// Starting position within the source object. + /// Length to analyze. + /// Callback object. + /// + /// Standard HRESULT error code. + /// + /// + /// While the function can handle multiple paragraphs, the text range + /// should not arbitrarily split the middle of paragraphs, unless the + /// given text span is considered a whole unit. Otherwise the + /// returned properties for the first and last characters will + /// inappropriately allow breaks. + /// + /// + /// Special cases include the first, last, and surrogate characters. Any + /// text span is treated as if adjacent to inline objects on either side. + /// So the rules with contingent-break opportunities are used, where the + /// edge between text and inline objects is always treated as a potential + /// break opportunity, dependent on any overriding rules of the adjacent + /// objects to prohibit or force the break (see Unicode TR #14). + /// Surrogate pairs never break between. + /// + STDMETHOD(AnalyzeLineBreakpoints)( + _In_ IDWriteTextAnalysisSource* analysisSource, + UINT32 textPosition, + UINT32 textLength, + _In_ IDWriteTextAnalysisSink* analysisSink + ) PURE; + + /// + /// Parses the input text string and maps it to the set of glyphs and associated glyph data + /// according to the font and the writing system's rendering rules. + /// + /// The string to convert to glyphs. + /// The length of textString. + /// The font face to get glyphs from. + /// Set to true if the text is intended to be + /// drawn vertically. + /// Set to TRUE for right-to-left text. + /// Script analysis result from AnalyzeScript. + /// The locale to use when selecting glyphs. + /// e.g. the same character may map to different glyphs for ja-jp vs zh-chs. + /// If this is NULL then the default mapping based on the script is used. + /// Optional number substitution which + /// selects the appropriate glyphs for digits and related numeric characters, + /// depending on the results obtained from AnalyzeNumberSubstitution. Passing + /// null indicates that no substitution is needed and that the digits should + /// receive nominal glyphs. + /// An array of pointers to the sets of typographic + /// features to use in each feature range. + /// The length of each feature range, in characters. + /// The sum of all lengths should be equal to textLength. + /// The number of feature ranges. + /// The maximum number of glyphs that can be + /// returned. + /// The mapping from character ranges to glyph + /// ranges. + /// Per-character output properties. + /// Output glyph indices. + /// Per-glyph output properties. + /// The actual number of glyphs returned if + /// the call succeeds. + /// + /// Standard HRESULT error code. + /// + /// + /// Note that the mapping from characters to glyphs is, in general, many- + /// to-many. The recommended estimate for the per-glyph output buffers is + /// (3 * textLength / 2 + 16). This is not guaranteed to be sufficient. + /// + /// The value of the actualGlyphCount parameter is only valid if the call + /// succeeds. In the event that maxGlyphCount is not big enough + /// E_NOT_SUFFICIENT_BUFFER, which is equivalent to HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), + /// will be returned. The application should allocate a larger buffer and try again. + /// + STDMETHOD(GetGlyphs)( + _In_reads_(textLength) WCHAR const* textString, + UINT32 textLength, + _In_ IDWriteFontFace* fontFace, + BOOL isSideways, + BOOL isRightToLeft, + _In_ DWRITE_SCRIPT_ANALYSIS const* scriptAnalysis, + _In_opt_z_ WCHAR const* localeName, + _In_opt_ IDWriteNumberSubstitution* numberSubstitution, + _In_reads_opt_(featureRanges) DWRITE_TYPOGRAPHIC_FEATURES const** features, + _In_reads_opt_(featureRanges) UINT32 const* featureRangeLengths, + UINT32 featureRanges, + UINT32 maxGlyphCount, + _Out_writes_(textLength) UINT16* clusterMap, + _Out_writes_(textLength) DWRITE_SHAPING_TEXT_PROPERTIES* textProps, + _Out_writes_(maxGlyphCount) UINT16* glyphIndices, + _Out_writes_(maxGlyphCount) DWRITE_SHAPING_GLYPH_PROPERTIES* glyphProps, + _Out_ UINT32* actualGlyphCount + ) PURE; + + /// + /// Place glyphs output from the GetGlyphs method according to the font + /// and the writing system's rendering rules. + /// + /// The original string the glyphs came from. + /// The mapping from character ranges to glyph + /// ranges. Returned by GetGlyphs. + /// Per-character properties. Returned by + /// GetGlyphs. + /// The length of textString. + /// Glyph indices. See GetGlyphs + /// Per-glyph properties. See GetGlyphs + /// The number of glyphs. + /// The font face the glyphs came from. + /// Logical font size in DIP's. + /// Set to true if the text is intended to be + /// drawn vertically. + /// Set to TRUE for right-to-left text. + /// Script analysis result from AnalyzeScript. + /// The locale to use when selecting glyphs. + /// e.g. the same character may map to different glyphs for ja-jp vs zh-chs. + /// If this is NULL then the default mapping based on the script is used. + /// An array of pointers to the sets of typographic + /// features to use in each feature range. + /// The length of each feature range, in characters. + /// The sum of all lengths should be equal to textLength. + /// The number of feature ranges. + /// The advance width of each glyph. + /// The offset of the origin of each glyph. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetGlyphPlacements)( + _In_reads_(textLength) WCHAR const* textString, + _In_reads_(textLength) UINT16 const* clusterMap, + _In_reads_(textLength) DWRITE_SHAPING_TEXT_PROPERTIES* textProps, + UINT32 textLength, + _In_reads_(glyphCount) UINT16 const* glyphIndices, + _In_reads_(glyphCount) DWRITE_SHAPING_GLYPH_PROPERTIES const* glyphProps, + UINT32 glyphCount, + _In_ IDWriteFontFace* fontFace, + FLOAT fontEmSize, + BOOL isSideways, + BOOL isRightToLeft, + _In_ DWRITE_SCRIPT_ANALYSIS const* scriptAnalysis, + _In_opt_z_ WCHAR const* localeName, + _In_reads_opt_(featureRanges) DWRITE_TYPOGRAPHIC_FEATURES const** features, + _In_reads_opt_(featureRanges) UINT32 const* featureRangeLengths, + UINT32 featureRanges, + _Out_writes_(glyphCount) FLOAT* glyphAdvances, + _Out_writes_(glyphCount) DWRITE_GLYPH_OFFSET* glyphOffsets + ) PURE; + + /// + /// Place glyphs output from the GetGlyphs method according to the font + /// and the writing system's rendering rules. + /// + /// The original string the glyphs came from. + /// The mapping from character ranges to glyph + /// ranges. Returned by GetGlyphs. + /// Per-character properties. Returned by + /// GetGlyphs. + /// The length of textString. + /// Glyph indices. See GetGlyphs + /// Per-glyph properties. See GetGlyphs + /// The number of glyphs. + /// The font face the glyphs came from. + /// Logical font size in DIP's. + /// Number of physical pixels per DIP. For example, if the DPI of the rendering surface is 96 this + /// value is 1.0f. If the DPI is 120, this value is 120.0f/96. + /// Optional transform applied to the glyphs and their positions. This transform is applied after the + /// scaling specified by the font size and pixelsPerDip. + /// + /// When set to FALSE, the metrics are the same as the metrics of GDI aliased text. + /// When set to TRUE, the metrics are the same as the metrics of text measured by GDI using a font + /// created with CLEARTYPE_NATURAL_QUALITY. + /// + /// Set to true if the text is intended to be + /// drawn vertically. + /// Set to TRUE for right-to-left text. + /// Script analysis result from AnalyzeScript. + /// The locale to use when selecting glyphs. + /// e.g. the same character may map to different glyphs for ja-jp vs zh-chs. + /// If this is NULL then the default mapping based on the script is used. + /// An array of pointers to the sets of typographic + /// features to use in each feature range. + /// The length of each feature range, in characters. + /// The sum of all lengths should be equal to textLength. + /// The number of feature ranges. + /// The advance width of each glyph. + /// The offset of the origin of each glyph. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetGdiCompatibleGlyphPlacements)( + _In_reads_(textLength) WCHAR const* textString, + _In_reads_(textLength) UINT16 const* clusterMap, + _In_reads_(textLength) DWRITE_SHAPING_TEXT_PROPERTIES* textProps, + UINT32 textLength, + _In_reads_(glyphCount) UINT16 const* glyphIndices, + _In_reads_(glyphCount) DWRITE_SHAPING_GLYPH_PROPERTIES const* glyphProps, + UINT32 glyphCount, + _In_ IDWriteFontFace * fontFace, + FLOAT fontEmSize, + FLOAT pixelsPerDip, + _In_opt_ DWRITE_MATRIX const* transform, + BOOL useGdiNatural, + BOOL isSideways, + BOOL isRightToLeft, + _In_ DWRITE_SCRIPT_ANALYSIS const* scriptAnalysis, + _In_opt_z_ WCHAR const* localeName, + _In_reads_opt_(featureRanges) DWRITE_TYPOGRAPHIC_FEATURES const** features, + _In_reads_opt_(featureRanges) UINT32 const* featureRangeLengths, + UINT32 featureRanges, + _Out_writes_(glyphCount) FLOAT* glyphAdvances, + _Out_writes_(glyphCount) DWRITE_GLYPH_OFFSET* glyphOffsets + ) PURE; +}; + +/// +/// The DWRITE_GLYPH_RUN structure contains the information needed by renderers +/// to draw glyph runs. All coordinates are in device independent pixels (DIPs). +/// +struct DWRITE_GLYPH_RUN +{ + /// + /// The physical font face to draw with. + /// + _Notnull_ IDWriteFontFace* fontFace; + + /// + /// Logical size of the font in DIPs, not points (equals 1/96 inch). + /// + FLOAT fontEmSize; + + /// + /// The number of glyphs. + /// + UINT32 glyphCount; + + /// + /// The indices to render. + /// + _Field_size_(glyphCount) UINT16 const* glyphIndices; + + /// + /// Glyph advance widths. + /// + _Field_size_opt_(glyphCount) FLOAT const* glyphAdvances; + + /// + /// Glyph offsets. + /// + _Field_size_opt_(glyphCount) DWRITE_GLYPH_OFFSET const* glyphOffsets; + + /// + /// If true, specifies that glyphs are rotated 90 degrees to the left and + /// vertical metrics are used. Vertical writing is achieved by specifying + /// isSideways = true and rotating the entire run 90 degrees to the right + /// via a rotate transform. + /// + BOOL isSideways; + + /// + /// The implicit resolved bidi level of the run. Odd levels indicate + /// right-to-left languages like Hebrew and Arabic, while even levels + /// indicate left-to-right languages like English and Japanese (when + /// written horizontally). For right-to-left languages, the text origin + /// is on the right, and text should be drawn to the left. + /// + UINT32 bidiLevel; +}; + +/// +/// The DWRITE_GLYPH_RUN_DESCRIPTION structure contains additional properties +/// related to those in DWRITE_GLYPH_RUN. +/// +struct DWRITE_GLYPH_RUN_DESCRIPTION +{ + /// + /// The locale name associated with this run. + /// + _Field_z_ WCHAR const* localeName; + + /// + /// The text associated with the glyphs. + /// + _Field_size_(stringLength) WCHAR const* string; + + /// + /// The number of characters (UTF16 code-units). + /// Note that this may be different than the number of glyphs. + /// + UINT32 stringLength; + + /// + /// An array of indices to the glyph indices array, of the first glyphs of + /// all the glyph clusters of the glyphs to render. + /// + _Field_size_opt_(stringLength) UINT16 const* clusterMap; + + /// + /// Corresponding text position in the original string + /// this glyph run came from. + /// + UINT32 textPosition; +}; + +/// +/// The DWRITE_UNDERLINE structure contains information about the size and +/// placement of underlines. All coordinates are in device independent +/// pixels (DIPs). +/// +struct DWRITE_UNDERLINE +{ + /// + /// Width of the underline, measured parallel to the baseline. + /// + FLOAT width; + + /// + /// Thickness of the underline, measured perpendicular to the + /// baseline. + /// + FLOAT thickness; + + /// + /// Offset of the underline from the baseline. + /// A positive offset represents a position below the baseline and + /// a negative offset is above. + /// + FLOAT offset; + + /// + /// Height of the tallest run where the underline applies. + /// + FLOAT runHeight; + + /// + /// Reading direction of the text associated with the underline. This + /// value is used to interpret whether the width value runs horizontally + /// or vertically. + /// + DWRITE_READING_DIRECTION readingDirection; + + /// + /// Flow direction of the text associated with the underline. This value + /// is used to interpret whether the thickness value advances top to + /// bottom, left to right, or right to left. + /// + DWRITE_FLOW_DIRECTION flowDirection; + + /// + /// Locale of the text the underline is being drawn under. Can be + /// pertinent where the locale affects how the underline is drawn. + /// For example, in vertical text, the underline belongs on the + /// left for Chinese but on the right for Japanese. + /// This choice is completely left up to higher levels. + /// + _Field_z_ WCHAR const* localeName; + + /// + /// The measuring mode can be useful to the renderer to determine how + /// underlines are rendered, e.g. rounding the thickness to a whole pixel + /// in GDI-compatible modes. + /// + DWRITE_MEASURING_MODE measuringMode; +}; + +/// +/// The DWRITE_STRIKETHROUGH structure contains information about the size and +/// placement of strikethroughs. All coordinates are in device independent +/// pixels (DIPs). +/// +struct DWRITE_STRIKETHROUGH +{ + /// + /// Width of the strikethrough, measured parallel to the baseline. + /// + FLOAT width; + + /// + /// Thickness of the strikethrough, measured perpendicular to the + /// baseline. + /// + FLOAT thickness; + + /// + /// Offset of the strikethrough from the baseline. + /// A positive offset represents a position below the baseline and + /// a negative offset is above. + /// + FLOAT offset; + + /// + /// Reading direction of the text associated with the strikethrough. This + /// value is used to interpret whether the width value runs horizontally + /// or vertically. + /// + DWRITE_READING_DIRECTION readingDirection; + + /// + /// Flow direction of the text associated with the strikethrough. This + /// value is used to interpret whether the thickness value advances top to + /// bottom, left to right, or right to left. + /// + DWRITE_FLOW_DIRECTION flowDirection; + + /// + /// Locale of the range. Can be pertinent where the locale affects the style. + /// + _Field_z_ WCHAR const* localeName; + + /// + /// The measuring mode can be useful to the renderer to determine how + /// underlines are rendered, e.g. rounding the thickness to a whole pixel + /// in GDI-compatible modes. + /// + DWRITE_MEASURING_MODE measuringMode; +}; + +/// +/// The DWRITE_LINE_METRICS structure contains information about a formatted +/// line of text. +/// +struct DWRITE_LINE_METRICS +{ + /// + /// The number of total text positions in the line. + /// This includes any trailing whitespace and newline characters. + /// + UINT32 length; + + /// + /// The number of whitespace positions at the end of the line. Newline + /// sequences are considered whitespace. + /// + UINT32 trailingWhitespaceLength; + + /// + /// The number of characters in the newline sequence at the end of the line. + /// If the count is zero, then the line was either wrapped or it is the + /// end of the text. + /// + UINT32 newlineLength; + + /// + /// Height of the line as measured from top to bottom. + /// + FLOAT height; + + /// + /// Distance from the top of the line to its baseline. + /// + FLOAT baseline; + + /// + /// The line is trimmed. + /// + BOOL isTrimmed; +}; + + +/// +/// The DWRITE_CLUSTER_METRICS structure contains information about a glyph cluster. +/// +struct DWRITE_CLUSTER_METRICS +{ + /// + /// The total advance width of all glyphs in the cluster. + /// + FLOAT width; + + /// + /// The number of text positions in the cluster. + /// + UINT16 length; + + /// + /// Indicate whether line can be broken right after the cluster. + /// + UINT16 canWrapLineAfter : 1; + + /// + /// Indicate whether the cluster corresponds to whitespace character. + /// + UINT16 isWhitespace : 1; + + /// + /// Indicate whether the cluster corresponds to a newline character. + /// + UINT16 isNewline : 1; + + /// + /// Indicate whether the cluster corresponds to soft hyphen character. + /// + UINT16 isSoftHyphen : 1; + + /// + /// Indicate whether the cluster is read from right to left. + /// + UINT16 isRightToLeft : 1; + + UINT16 padding : 11; +}; + + +/// +/// Overall metrics associated with text after layout. +/// All coordinates are in device independent pixels (DIPs). +/// +struct DWRITE_TEXT_METRICS +{ + /// + /// Left-most point of formatted text relative to layout box + /// (excluding any glyph overhang). + /// + FLOAT left; + + /// + /// Top-most point of formatted text relative to layout box + /// (excluding any glyph overhang). + /// + FLOAT top; + + /// + /// The width of the formatted text ignoring trailing whitespace + /// at the end of each line. + /// + FLOAT width; + + /// + /// The width of the formatted text taking into account the + /// trailing whitespace at the end of each line. + /// + FLOAT widthIncludingTrailingWhitespace; + + /// + /// The height of the formatted text. The height of an empty string + /// is determined by the size of the default font's line height. + /// + FLOAT height; + + /// + /// Initial width given to the layout. Depending on whether the text + /// was wrapped or not, it can be either larger or smaller than the + /// text content width. + /// + FLOAT layoutWidth; + + /// + /// Initial height given to the layout. Depending on the length of the + /// text, it may be larger or smaller than the text content height. + /// + FLOAT layoutHeight; + + /// + /// The maximum reordering count of any line of text, used + /// to calculate the most number of hit-testing boxes needed. + /// If the layout has no bidirectional text or no text at all, + /// the minimum level is 1. + /// + UINT32 maxBidiReorderingDepth; + + /// + /// Total number of lines. + /// + UINT32 lineCount; +}; + + +/// +/// Properties describing the geometric measurement of an +/// application-defined inline object. +/// +struct DWRITE_INLINE_OBJECT_METRICS +{ + /// + /// Width of the inline object. + /// + FLOAT width; + + /// + /// Height of the inline object as measured from top to bottom. + /// + FLOAT height; + + /// + /// Distance from the top of the object to the baseline where it is lined up with the adjacent text. + /// If the baseline is at the bottom, baseline simply equals height. + /// + FLOAT baseline; + + /// + /// Flag indicating whether the object is to be placed upright or alongside the text baseline + /// for vertical text. + /// + BOOL supportsSideways; +}; + + +/// +/// The DWRITE_OVERHANG_METRICS structure holds how much any visible pixels +/// (in DIPs) overshoot each side of the layout or inline objects. +/// +/// +/// Positive overhangs indicate that the visible area extends outside the layout +/// box or inline object, while negative values mean there is whitespace inside. +/// The returned values are unaffected by rendering transforms or pixel snapping. +/// Additionally, they may not exactly match final target's pixel bounds after +/// applying grid fitting and hinting. +/// +struct DWRITE_OVERHANG_METRICS +{ + /// + /// The distance from the left-most visible DIP to its left alignment edge. + /// + FLOAT left; + + /// + /// The distance from the top-most visible DIP to its top alignment edge. + /// + FLOAT top; + + /// + /// The distance from the right-most visible DIP to its right alignment edge. + /// + FLOAT right; + + /// + /// The distance from the bottom-most visible DIP to its bottom alignment edge. + /// + FLOAT bottom; +}; + + +/// +/// Geometry enclosing of text positions. +/// +struct DWRITE_HIT_TEST_METRICS +{ + /// + /// First text position within the geometry. + /// + UINT32 textPosition; + + /// + /// Number of text positions within the geometry. + /// + UINT32 length; + + /// + /// Left position of the top-left coordinate of the geometry. + /// + FLOAT left; + + /// + /// Top position of the top-left coordinate of the geometry. + /// + FLOAT top; + + /// + /// Geometry's width. + /// + FLOAT width; + + /// + /// Geometry's height. + /// + FLOAT height; + + /// + /// Bidi level of text positions enclosed within the geometry. + /// + UINT32 bidiLevel; + + /// + /// Geometry encloses text? + /// + BOOL isText; + + /// + /// Range is trimmed. + /// + BOOL isTrimmed; +}; + + +interface IDWriteTextRenderer; + + +/// +/// The IDWriteInlineObject interface wraps an application defined inline graphic, +/// allowing DWrite to query metrics as if it was a glyph inline with the text. +/// +interface DWRITE_DECLARE_INTERFACE("8339FDE3-106F-47ab-8373-1C6295EB10B3") IDWriteInlineObject : public IUnknown +{ + /// + /// The application implemented rendering callback (IDWriteTextRenderer::DrawInlineObject) + /// can use this to draw the inline object without needing to cast or query the object + /// type. The text layout does not call this method directly. + /// + /// The context passed to IDWriteTextLayout::Draw. + /// The renderer passed to IDWriteTextLayout::Draw as the object's containing parent. + /// X-coordinate at the top-left corner of the inline object. + /// Y-coordinate at the top-left corner of the inline object. + /// The object should be drawn on its side. + /// The object is in an right-to-left context and should be drawn flipped. + /// The drawing effect set in IDWriteTextLayout::SetDrawingEffect. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(Draw)( + _In_opt_ void* clientDrawingContext, + _In_ IDWriteTextRenderer* renderer, + FLOAT originX, + FLOAT originY, + BOOL isSideways, + BOOL isRightToLeft, + _In_opt_ IUnknown* clientDrawingEffect + ) PURE; + + /// + /// TextLayout calls this callback function to get the measurement of the inline object. + /// + /// Returned metrics + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetMetrics)( + _Out_ DWRITE_INLINE_OBJECT_METRICS* metrics + ) PURE; + + /// + /// TextLayout calls this callback function to get the visible extents (in DIPs) of the inline object. + /// In the case of a simple bitmap, with no padding and no overhang, all the overhangs will + /// simply be zeroes. + /// + /// Overshoot of visible extents (in DIPs) outside the object. + /// + /// Standard HRESULT error code. + /// + /// + /// The overhangs should be returned relative to the reported size of the object + /// (DWRITE_INLINE_OBJECT_METRICS::width/height), and should not be baseline + /// adjusted. If you have an image that is actually 100x100 DIPs, but you want it + /// slightly inset (perhaps it has a glow) by 20 DIPs on each side, you would + /// return a width/height of 60x60 and four overhangs of 20 DIPs. + /// + STDMETHOD(GetOverhangMetrics)( + _Out_ DWRITE_OVERHANG_METRICS* overhangs + ) PURE; + + /// + /// Layout uses this to determine the line breaking behavior of the inline object + /// amidst the text. + /// + /// Line-breaking condition between the object and the content immediately preceding it. + /// Line-breaking condition between the object and the content immediately following it. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetBreakConditions)( + _Out_ DWRITE_BREAK_CONDITION* breakConditionBefore, + _Out_ DWRITE_BREAK_CONDITION* breakConditionAfter + ) PURE; +}; + +/// +/// The IDWritePixelSnapping interface defines the pixel snapping properties of a text renderer. +/// +interface DWRITE_DECLARE_INTERFACE("eaf3a2da-ecf4-4d24-b644-b34f6842024b") IDWritePixelSnapping : public IUnknown +{ + /// + /// Determines whether pixel snapping is disabled. The recommended default is FALSE, + /// unless doing animation that requires subpixel vertical placement. + /// + /// The context passed to IDWriteTextLayout::Draw. + /// Receives TRUE if pixel snapping is disabled or FALSE if it not. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(IsPixelSnappingDisabled)( + _In_opt_ void* clientDrawingContext, + _Out_ BOOL* isDisabled + ) PURE; + + /// + /// Gets the current transform that maps abstract coordinates to DIPs, + /// which may disable pixel snapping upon any rotation or shear. + /// + /// The context passed to IDWriteTextLayout::Draw. + /// Receives the transform. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetCurrentTransform)( + _In_opt_ void* clientDrawingContext, + _Out_ DWRITE_MATRIX* transform + ) PURE; + + /// + /// Gets the number of physical pixels per DIP. A DIP (device-independent pixel) is 1/96 inch, + /// so the pixelsPerDip value is the number of logical pixels per inch divided by 96 (yielding + /// a value of 1 for 96 DPI and 1.25 for 120). + /// + /// The context passed to IDWriteTextLayout::Draw. + /// Receives the number of physical pixels per DIP. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetPixelsPerDip)( + _In_opt_ void* clientDrawingContext, + _Out_ FLOAT* pixelsPerDip + ) PURE; +}; + +/// +/// The IDWriteTextRenderer interface represents a set of application-defined +/// callbacks that perform rendering of text, inline objects, and decorations +/// such as underlines. +/// +interface DWRITE_DECLARE_INTERFACE("ef8a8135-5cc6-45fe-8825-c5a0724eb819") IDWriteTextRenderer : public IDWritePixelSnapping +{ + /// + /// IDWriteTextLayout::Draw calls this function to instruct the client to + /// render a run of glyphs. + /// + /// The context passed to + /// IDWriteTextLayout::Draw. + /// X-coordinate of the baseline. + /// Y-coordinate of the baseline. + /// Specifies measuring mode for glyphs in the run. + /// Renderer implementations may choose different rendering modes for given measuring modes, + /// but best results are seen when the rendering mode matches the corresponding measuring mode: + /// DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL for DWRITE_MEASURING_MODE_NATURAL + /// DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC for DWRITE_MEASURING_MODE_GDI_CLASSIC + /// DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL for DWRITE_MEASURING_MODE_GDI_NATURAL + /// + /// The glyph run to draw. + /// Properties of the characters + /// associated with this run. + /// The drawing effect set in + /// IDWriteTextLayout::SetDrawingEffect. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(DrawGlyphRun)( + _In_opt_ void* clientDrawingContext, + FLOAT baselineOriginX, + FLOAT baselineOriginY, + DWRITE_MEASURING_MODE measuringMode, + _In_ DWRITE_GLYPH_RUN const* glyphRun, + _In_ DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription, + _In_opt_ IUnknown* clientDrawingEffect + ) PURE; + + /// + /// IDWriteTextLayout::Draw calls this function to instruct the client to draw + /// an underline. + /// + /// The context passed to + /// IDWriteTextLayout::Draw. + /// X-coordinate of the baseline. + /// Y-coordinate of the baseline. + /// Underline logical information. + /// The drawing effect set in + /// IDWriteTextLayout::SetDrawingEffect. + /// + /// Standard HRESULT error code. + /// + /// + /// A single underline can be broken into multiple calls, depending on + /// how the formatting changes attributes. If font sizes/styles change + /// within an underline, the thickness and offset will be averaged + /// weighted according to characters. + /// To get the correct top coordinate of the underline rect, add underline::offset + /// to the baseline's Y. Otherwise the underline will be immediately under the text. + /// The x coordinate will always be passed as the left side, regardless + /// of text directionality. This simplifies drawing and reduces the + /// problem of round-off that could potentially cause gaps or a double + /// stamped alpha blend. To avoid alpha overlap, round the end points + /// to the nearest device pixel. + /// + STDMETHOD(DrawUnderline)( + _In_opt_ void* clientDrawingContext, + FLOAT baselineOriginX, + FLOAT baselineOriginY, + _In_ DWRITE_UNDERLINE const* underline, + _In_opt_ IUnknown* clientDrawingEffect + ) PURE; + + /// + /// IDWriteTextLayout::Draw calls this function to instruct the client to draw + /// a strikethrough. + /// + /// The context passed to + /// IDWriteTextLayout::Draw. + /// X-coordinate of the baseline. + /// Y-coordinate of the baseline. + /// Strikethrough logical information. + /// The drawing effect set in + /// IDWriteTextLayout::SetDrawingEffect. + /// + /// Standard HRESULT error code. + /// + /// + /// A single strikethrough can be broken into multiple calls, depending on + /// how the formatting changes attributes. Strikethrough is not averaged + /// across font sizes/styles changes. + /// To get the correct top coordinate of the strikethrough rect, + /// add strikethrough::offset to the baseline's Y. + /// Like underlines, the x coordinate will always be passed as the left side, + /// regardless of text directionality. + /// + STDMETHOD(DrawStrikethrough)( + _In_opt_ void* clientDrawingContext, + FLOAT baselineOriginX, + FLOAT baselineOriginY, + _In_ DWRITE_STRIKETHROUGH const* strikethrough, + _In_opt_ IUnknown* clientDrawingEffect + ) PURE; + + /// + /// IDWriteTextLayout::Draw calls this application callback when it needs to + /// draw an inline object. + /// + /// The context passed to IDWriteTextLayout::Draw. + /// X-coordinate at the top-left corner of the inline object. + /// Y-coordinate at the top-left corner of the inline object. + /// The object set using IDWriteTextLayout::SetInlineObject. + /// The object should be drawn on its side. + /// The object is in an right-to-left context and should be drawn flipped. + /// The drawing effect set in + /// IDWriteTextLayout::SetDrawingEffect. + /// + /// Standard HRESULT error code. + /// + /// + /// The right-to-left flag is a hint for those cases where it would look + /// strange for the image to be shown normally (like an arrow pointing to + /// right to indicate a submenu). + /// + STDMETHOD(DrawInlineObject)( + _In_opt_ void* clientDrawingContext, + FLOAT originX, + FLOAT originY, + _In_ IDWriteInlineObject* inlineObject, + BOOL isSideways, + BOOL isRightToLeft, + _In_opt_ IUnknown* clientDrawingEffect + ) PURE; +}; + +/// +/// The IDWriteTextLayout interface represents a block of text after it has +/// been fully analyzed and formatted. +/// +/// All coordinates are in device independent pixels (DIPs). +/// +interface DWRITE_DECLARE_INTERFACE("53737037-6d14-410b-9bfe-0b182bb70961") IDWriteTextLayout : public IDWriteTextFormat +{ + /// + /// Set layout maximum width + /// + /// Layout maximum width + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetMaxWidth)( + FLOAT maxWidth + ) PURE; + + /// + /// Set layout maximum height + /// + /// Layout maximum height + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetMaxHeight)( + FLOAT maxHeight + ) PURE; + + /// + /// Set the font collection. + /// + /// The font collection to set + /// Text range to which this change applies. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetFontCollection)( + _In_ IDWriteFontCollection* fontCollection, + DWRITE_TEXT_RANGE textRange + ) PURE; + + /// + /// Set null-terminated font family name. + /// + /// Font family name + /// Text range to which this change applies. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetFontFamilyName)( + _In_z_ WCHAR const* fontFamilyName, + DWRITE_TEXT_RANGE textRange + ) PURE; + + /// + /// Set font weight. + /// + /// Font weight + /// Text range to which this change applies. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetFontWeight)( + DWRITE_FONT_WEIGHT fontWeight, + DWRITE_TEXT_RANGE textRange + ) PURE; + + /// + /// Set font style. + /// + /// Font style + /// Text range to which this change applies. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetFontStyle)( + DWRITE_FONT_STYLE fontStyle, + DWRITE_TEXT_RANGE textRange + ) PURE; + + /// + /// Set font stretch. + /// + /// font stretch + /// Text range to which this change applies. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetFontStretch)( + DWRITE_FONT_STRETCH fontStretch, + DWRITE_TEXT_RANGE textRange + ) PURE; + + /// + /// Set font em height. + /// + /// Font em height + /// Text range to which this change applies. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetFontSize)( + FLOAT fontSize, + DWRITE_TEXT_RANGE textRange + ) PURE; + + /// + /// Set underline. + /// + /// The Boolean flag indicates whether underline takes place + /// Text range to which this change applies. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetUnderline)( + BOOL hasUnderline, + DWRITE_TEXT_RANGE textRange + ) PURE; + + /// + /// Set strikethrough. + /// + /// The Boolean flag indicates whether strikethrough takes place + /// Text range to which this change applies. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetStrikethrough)( + BOOL hasStrikethrough, + DWRITE_TEXT_RANGE textRange + ) PURE; + + /// + /// Set application-defined drawing effect. + /// + /// Pointer to an application-defined drawing effect. + /// Text range to which this change applies. + /// + /// Standard HRESULT error code. + /// + /// + /// This drawing effect is associated with the specified range and will be passed back + /// to the application via the callback when the range is drawn at drawing time. + /// + STDMETHOD(SetDrawingEffect)( + IUnknown* drawingEffect, + DWRITE_TEXT_RANGE textRange + ) PURE; + + /// + /// Set inline object. + /// + /// Pointer to an application-implemented inline object. + /// Text range to which this change applies. + /// + /// Standard HRESULT error code. + /// + /// + /// This inline object applies to the specified range and will be passed back + /// to the application via the DrawInlineObject callback when the range is drawn. + /// Any text in that range will be suppressed. + /// + STDMETHOD(SetInlineObject)( + _In_ IDWriteInlineObject* inlineObject, + DWRITE_TEXT_RANGE textRange + ) PURE; + + /// + /// Set font typography features. + /// + /// Pointer to font typography setting. + /// Text range to which this change applies. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetTypography)( + _In_ IDWriteTypography* typography, + DWRITE_TEXT_RANGE textRange + ) PURE; + + /// + /// Set locale name. + /// + /// Locale name + /// Text range to which this change applies. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetLocaleName)( + _In_z_ WCHAR const* localeName, + DWRITE_TEXT_RANGE textRange + ) PURE; + + /// + /// Get layout maximum width + /// + STDMETHOD_(FLOAT, GetMaxWidth)() PURE; + + /// + /// Get layout maximum height + /// + STDMETHOD_(FLOAT, GetMaxHeight)() PURE; + + /// + /// Get the font collection where the current position is at. + /// + /// The current text position. + /// The current font collection + /// Text range to which this change applies. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontCollection)( + UINT32 currentPosition, + _COM_Outptr_ IDWriteFontCollection** fontCollection, + _Out_opt_ DWRITE_TEXT_RANGE* textRange = NULL + ) PURE; + + /// + /// Get the length of the font family name where the current position is at. + /// + /// The current text position. + /// Size of the character array in character count not including the terminated NULL character. + /// The position range of the current format. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontFamilyNameLength)( + UINT32 currentPosition, + _Out_ UINT32* nameLength, + _Out_opt_ DWRITE_TEXT_RANGE* textRange = NULL + ) PURE; + + /// + /// Copy the font family name where the current position is at. + /// + /// The current text position. + /// Character array that receives the current font family name + /// Size of the character array in character count including the terminated NULL character. + /// The position range of the current format. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontFamilyName)( + UINT32 currentPosition, + _Out_writes_z_(nameSize) WCHAR* fontFamilyName, + UINT32 nameSize, + _Out_opt_ DWRITE_TEXT_RANGE* textRange = NULL + ) PURE; + + /// + /// Get the font weight where the current position is at. + /// + /// The current text position. + /// The current font weight + /// The position range of the current format. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontWeight)( + UINT32 currentPosition, + _Out_ DWRITE_FONT_WEIGHT* fontWeight, + _Out_opt_ DWRITE_TEXT_RANGE* textRange = NULL + ) PURE; + + /// + /// Get the font style where the current position is at. + /// + /// The current text position. + /// The current font style + /// The position range of the current format. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontStyle)( + UINT32 currentPosition, + _Out_ DWRITE_FONT_STYLE* fontStyle, + _Out_opt_ DWRITE_TEXT_RANGE* textRange = NULL + ) PURE; + + /// + /// Get the font stretch where the current position is at. + /// + /// The current text position. + /// The current font stretch + /// The position range of the current format. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontStretch)( + UINT32 currentPosition, + _Out_ DWRITE_FONT_STRETCH* fontStretch, + _Out_opt_ DWRITE_TEXT_RANGE* textRange = NULL + ) PURE; + + /// + /// Get the font em height where the current position is at. + /// + /// The current text position. + /// The current font em height + /// The position range of the current format. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontSize)( + UINT32 currentPosition, + _Out_ FLOAT* fontSize, + _Out_opt_ DWRITE_TEXT_RANGE* textRange = NULL + ) PURE; + + /// + /// Get the underline presence where the current position is at. + /// + /// The current text position. + /// The Boolean flag indicates whether text is underlined. + /// The position range of the current format. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetUnderline)( + UINT32 currentPosition, + _Out_ BOOL* hasUnderline, + _Out_opt_ DWRITE_TEXT_RANGE* textRange = NULL + ) PURE; + + /// + /// Get the strikethrough presence where the current position is at. + /// + /// The current text position. + /// The Boolean flag indicates whether text has strikethrough. + /// The position range of the current format. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetStrikethrough)( + UINT32 currentPosition, + _Out_ BOOL* hasStrikethrough, + _Out_opt_ DWRITE_TEXT_RANGE* textRange = NULL + ) PURE; + + /// + /// Get the application-defined drawing effect where the current position is at. + /// + /// The current text position. + /// The current application-defined drawing effect. + /// The position range of the current format. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetDrawingEffect)( + UINT32 currentPosition, + _COM_Outptr_ IUnknown** drawingEffect, + _Out_opt_ DWRITE_TEXT_RANGE* textRange = NULL + ) PURE; + + /// + /// Get the inline object at the given position. + /// + /// The given text position. + /// The inline object. + /// The position range of the current format. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetInlineObject)( + UINT32 currentPosition, + _COM_Outptr_ IDWriteInlineObject** inlineObject, + _Out_opt_ DWRITE_TEXT_RANGE* textRange = NULL + ) PURE; + + /// + /// Get the typography setting where the current position is at. + /// + /// The current text position. + /// The current typography setting. + /// The position range of the current format. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetTypography)( + UINT32 currentPosition, + _COM_Outptr_ IDWriteTypography** typography, + _Out_opt_ DWRITE_TEXT_RANGE* textRange = NULL + ) PURE; + + /// + /// Get the length of the locale name where the current position is at. + /// + /// The current text position. + /// Size of the character array in character count not including the terminated NULL character. + /// The position range of the current format. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetLocaleNameLength)( + UINT32 currentPosition, + _Out_ UINT32* nameLength, + _Out_opt_ DWRITE_TEXT_RANGE* textRange = NULL + ) PURE; + + /// + /// Get the locale name where the current position is at. + /// + /// The current text position. + /// Character array that receives the current locale name + /// Size of the character array in character count including the terminated NULL character. + /// The position range of the current format. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetLocaleName)( + UINT32 currentPosition, + _Out_writes_z_(nameSize) WCHAR* localeName, + UINT32 nameSize, + _Out_opt_ DWRITE_TEXT_RANGE* textRange = NULL + ) PURE; + + /// + /// Initiate drawing of the text. + /// + /// An application defined value + /// included in rendering callbacks. + /// The set of application-defined callbacks that do + /// the actual rendering. + /// X-coordinate of the layout's left side. + /// Y-coordinate of the layout's top side. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(Draw)( + _In_opt_ void* clientDrawingContext, + _In_ IDWriteTextRenderer* renderer, + FLOAT originX, + FLOAT originY + ) PURE; + + /// + /// GetLineMetrics returns properties of each line. + /// + /// The array to fill with line information. + /// The maximum size of the lineMetrics array. + /// The actual size of the lineMetrics + /// array that is needed. + /// + /// Standard HRESULT error code. + /// + /// + /// If maxLineCount is not large enough E_NOT_SUFFICIENT_BUFFER, + /// which is equivalent to HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), + /// is returned and *actualLineCount is set to the number of lines + /// needed. + /// + STDMETHOD(GetLineMetrics)( + _Out_writes_opt_(maxLineCount) DWRITE_LINE_METRICS* lineMetrics, + UINT32 maxLineCount, + _Out_ UINT32* actualLineCount + ) PURE; + + /// + /// GetMetrics retrieves overall metrics for the formatted string. + /// + /// The returned metrics. + /// + /// Standard HRESULT error code. + /// + /// + /// Drawing effects like underline and strikethrough do not contribute + /// to the text size, which is essentially the sum of advance widths and + /// line heights. Additionally, visible swashes and other graphic + /// adornments may extend outside the returned width and height. + /// + STDMETHOD(GetMetrics)( + _Out_ DWRITE_TEXT_METRICS* textMetrics + ) PURE; + + /// + /// GetOverhangMetrics returns the overhangs (in DIPs) of the layout and all + /// objects contained in it, including text glyphs and inline objects. + /// + /// Overshoots of visible extents (in DIPs) outside the layout. + /// + /// Standard HRESULT error code. + /// + /// + /// Any underline and strikethrough do not contribute to the black box + /// determination, since these are actually drawn by the renderer, which + /// is allowed to draw them in any variety of styles. + /// + STDMETHOD(GetOverhangMetrics)( + _Out_ DWRITE_OVERHANG_METRICS* overhangs + ) PURE; + + /// + /// Retrieve logical properties and measurement of each cluster. + /// + /// The array to fill with cluster information. + /// The maximum size of the clusterMetrics array. + /// The actual size of the clusterMetrics array that is needed. + /// + /// Standard HRESULT error code. + /// + /// + /// If maxClusterCount is not large enough E_NOT_SUFFICIENT_BUFFER, + /// which is equivalent to HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), + /// is returned and *actualClusterCount is set to the number of clusters + /// needed. + /// + STDMETHOD(GetClusterMetrics)( + _Out_writes_opt_(maxClusterCount) DWRITE_CLUSTER_METRICS* clusterMetrics, + UINT32 maxClusterCount, + _Out_ UINT32* actualClusterCount + ) PURE; + + /// + /// Determines the minimum possible width the layout can be set to without + /// emergency breaking between the characters of whole words. + /// + /// Minimum width. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(DetermineMinWidth)( + _Out_ FLOAT* minWidth + ) PURE; + + /// + /// Given a coordinate (in DIPs) relative to the top-left of the layout box, + /// this returns the corresponding hit-test metrics of the text string where + /// the hit-test has occurred. This is useful for mapping mouse clicks to caret + /// positions. When the given coordinate is outside the text string, the function + /// sets the output value *isInside to false but returns the nearest character + /// position. + /// + /// X coordinate to hit-test, relative to the top-left location of the layout box. + /// Y coordinate to hit-test, relative to the top-left location of the layout box. + /// Output flag indicating whether the hit-test location is at the leading or the trailing + /// side of the character. When the output *isInside value is set to false, this value is set according to the output + /// *position value to represent the edge closest to the hit-test location. + /// Output flag indicating whether the hit-test location is inside the text string. + /// When false, the position nearest the text's edge is returned. + /// Output geometry fully enclosing the hit-test location. When the output *isInside value + /// is set to false, this structure represents the geometry enclosing the edge closest to the hit-test location. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(HitTestPoint)( + FLOAT pointX, + FLOAT pointY, + _Out_ BOOL* isTrailingHit, + _Out_ BOOL* isInside, + _Out_ DWRITE_HIT_TEST_METRICS* hitTestMetrics + ) PURE; + + /// + /// Given a text position and whether the caret is on the leading or trailing + /// edge of that position, this returns the corresponding coordinate (in DIPs) + /// relative to the top-left of the layout box. This is most useful for drawing + /// the caret's current position, but it could also be used to anchor an IME to the + /// typed text or attach a floating menu near the point of interest. It may also be + /// used to programmatically obtain the geometry of a particular text position + /// for UI automation. + /// + /// Text position to get the coordinate of. + /// Flag indicating whether the location is of the leading or the trailing side of the specified text position. + /// Output caret X, relative to the top-left of the layout box. + /// Output caret Y, relative to the top-left of the layout box. + /// Output geometry fully enclosing the specified text position. + /// + /// Standard HRESULT error code. + /// + /// + /// When drawing a caret at the returned X,Y, it should be centered on X + /// and drawn from the Y coordinate down. The height will be the size of the + /// hit-tested text (which can vary in size within a line). + /// Reading direction also affects which side of the character the caret is drawn. + /// However, the returned X coordinate will be correct for either case. + /// You can get a text length back that is larger than a single character. + /// This happens for complex scripts when multiple characters form a single cluster, + /// when diacritics join their base character, or when you test a surrogate pair. + /// + STDMETHOD(HitTestTextPosition)( + UINT32 textPosition, + BOOL isTrailingHit, + _Out_ FLOAT* pointX, + _Out_ FLOAT* pointY, + _Out_ DWRITE_HIT_TEST_METRICS* hitTestMetrics + ) PURE; + + /// + /// The application calls this function to get a set of hit-test metrics + /// corresponding to a range of text positions. The main usage for this + /// is to draw highlighted selection of the text string. + /// + /// The function returns E_NOT_SUFFICIENT_BUFFER, which is equivalent to + /// HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), when the buffer size of + /// hitTestMetrics is too small to hold all the regions calculated by the + /// function. In such situation, the function sets the output value + /// *actualHitTestMetricsCount to the number of geometries calculated. + /// The application is responsible to allocate a new buffer of greater + /// size and call the function again. + /// + /// A good value to use as an initial value for maxHitTestMetricsCount may + /// be calculated from the following equation: + /// maxHitTestMetricsCount = lineCount * maxBidiReorderingDepth + /// + /// where lineCount is obtained from the value of the output argument + /// *actualLineCount from the function IDWriteTextLayout::GetLineMetrics, + /// and the maxBidiReorderingDepth value from the DWRITE_TEXT_METRICS + /// structure of the output argument *textMetrics from the function + /// IDWriteFactory::CreateTextLayout. + /// + /// First text position of the specified range. + /// Number of positions of the specified range. + /// Offset of the X origin (left of the layout box) which is added to each of the hit-test metrics returned. + /// Offset of the Y origin (top of the layout box) which is added to each of the hit-test metrics returned. + /// Pointer to a buffer of the output geometry fully enclosing the specified position range. + /// Maximum number of distinct metrics it could hold in its buffer memory. + /// Actual number of metrics returned or needed. + /// + /// Standard HRESULT error code. + /// + /// + /// There are no gaps in the returned metrics. While there could be visual gaps, + /// depending on bidi ordering, each range is contiguous and reports all the text, + /// including any hidden characters and trimmed text. + /// The height of each returned range will be the same within each line, regardless + /// of how the font sizes vary. + /// + STDMETHOD(HitTestTextRange)( + UINT32 textPosition, + UINT32 textLength, + FLOAT originX, + FLOAT originY, + _Out_writes_opt_(maxHitTestMetricsCount) DWRITE_HIT_TEST_METRICS* hitTestMetrics, + UINT32 maxHitTestMetricsCount, + _Out_ UINT32* actualHitTestMetricsCount + ) PURE; + + using IDWriteTextFormat::GetFontCollection; + using IDWriteTextFormat::GetFontFamilyNameLength; + using IDWriteTextFormat::GetFontFamilyName; + using IDWriteTextFormat::GetFontWeight; + using IDWriteTextFormat::GetFontStyle; + using IDWriteTextFormat::GetFontStretch; + using IDWriteTextFormat::GetFontSize; + using IDWriteTextFormat::GetLocaleNameLength; + using IDWriteTextFormat::GetLocaleName; +}; + + +/// +/// Encapsulates a 32-bit device independent bitmap and device context, which can be used for rendering glyphs. +/// +interface DWRITE_DECLARE_INTERFACE("5e5a32a3-8dff-4773-9ff6-0696eab77267") IDWriteBitmapRenderTarget : public IUnknown +{ + /// + /// Draws a run of glyphs to the bitmap. + /// + /// Horizontal position of the baseline origin, in DIPs, relative to the upper-left corner of the DIB. + /// Vertical position of the baseline origin, in DIPs, relative to the upper-left corner of the DIB. + /// Specifies measuring mode for glyphs in the run. + /// Renderer implementations may choose different rendering modes for different measuring modes, for example + /// DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL for DWRITE_MEASURING_MODE_NATURAL, + /// DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC for DWRITE_MEASURING_MODE_GDI_CLASSIC, and + /// DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL for DWRITE_MEASURING_MODE_GDI_NATURAL. + /// + /// Structure containing the properties of the glyph run. + /// Object that controls rendering behavior. + /// Specifies the foreground color of the text. + /// Optional rectangle that receives the bounding box (in pixels not DIPs) of all the pixels affected by + /// drawing the glyph run. The black box rectangle may extend beyond the dimensions of the bitmap. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(DrawGlyphRun)( + FLOAT baselineOriginX, + FLOAT baselineOriginY, + DWRITE_MEASURING_MODE measuringMode, + _In_ DWRITE_GLYPH_RUN const* glyphRun, + _In_ IDWriteRenderingParams* renderingParams, + COLORREF textColor, + _Out_opt_ RECT* blackBoxRect = NULL + ) PURE; + + /// + /// Gets a handle to the memory device context. + /// + /// + /// Returns the device context handle. + /// + /// + /// An application can use the device context to draw using GDI functions. An application can obtain the bitmap handle + /// (HBITMAP) by calling GetCurrentObject. An application that wants information about the underlying bitmap, including + /// a pointer to the pixel data, can call GetObject to fill in a DIBSECTION structure. The bitmap is always a 32-bit + /// top-down DIB. + /// + STDMETHOD_(HDC, GetMemoryDC)() PURE; + + /// + /// Gets the number of bitmap pixels per DIP. A DIP (device-independent pixel) is 1/96 inch so this value is the number + /// if pixels per inch divided by 96. + /// + /// + /// Returns the number of bitmap pixels per DIP. + /// + STDMETHOD_(FLOAT, GetPixelsPerDip)() PURE; + + /// + /// Sets the number of bitmap pixels per DIP. A DIP (device-independent pixel) is 1/96 inch so this value is the number + /// if pixels per inch divided by 96. + /// + /// Specifies the number of pixels per DIP. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetPixelsPerDip)( + FLOAT pixelsPerDip + ) PURE; + + /// + /// Gets the transform that maps abstract coordinate to DIPs. By default this is the identity + /// transform. Note that this is unrelated to the world transform of the underlying device + /// context. + /// + /// Receives the transform. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetCurrentTransform)( + _Out_ DWRITE_MATRIX* transform + ) PURE; + + /// + /// Sets the transform that maps abstract coordinate to DIPs. This does not affect the world + /// transform of the underlying device context. + /// + /// Specifies the new transform. This parameter can be NULL, in which + /// case the identity transform is implied. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetCurrentTransform)( + _In_opt_ DWRITE_MATRIX const* transform + ) PURE; + + /// + /// Gets the dimensions of the bitmap. + /// + /// Receives the size of the bitmap in pixels. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetSize)( + _Out_ SIZE* size + ) PURE; + + /// + /// Resizes the bitmap. + /// + /// New bitmap width, in pixels. + /// New bitmap height, in pixels. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(Resize)( + UINT32 width, + UINT32 height + ) PURE; +}; + +/// +/// The GDI interop interface provides interoperability with GDI. +/// +interface DWRITE_DECLARE_INTERFACE("1edd9491-9853-4299-898f-6432983b6f3a") IDWriteGdiInterop : public IUnknown +{ + /// + /// Creates a font object that matches the properties specified by the LOGFONT structure + /// in the system font collection (GetSystemFontCollection). + /// + /// Structure containing a GDI-compatible font description. + /// Receives a newly created font object if successful, or NULL in case of error. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontFromLOGFONT)( + _In_ LOGFONTW const* logFont, + _COM_Outptr_ IDWriteFont** font + ) PURE; + + /// + /// Initializes a LOGFONT structure based on the GDI-compatible properties of the specified font. + /// + /// Specifies a font. + /// Structure that receives a GDI-compatible font description. + /// Contains TRUE if the specified font object is part of the system font collection + /// or FALSE otherwise. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(ConvertFontToLOGFONT)( + _In_ IDWriteFont* font, + _Out_ LOGFONTW* logFont, + _Out_ BOOL* isSystemFont + ) PURE; + + /// + /// Initializes a LOGFONT structure based on the GDI-compatible properties of the specified font. + /// + /// Specifies a font face. + /// Structure that receives a GDI-compatible font description. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(ConvertFontFaceToLOGFONT)( + _In_ IDWriteFontFace* font, + _Out_ LOGFONTW* logFont + ) PURE; + + /// + /// Creates a font face object that corresponds to the currently selected HFONT. + /// + /// Handle to a device context into which a font has been selected. It is assumed that the client + /// has already performed font mapping and that the font selected into the DC is the actual font that would be used + /// for rendering glyphs. + /// Contains the newly created font face object, or NULL in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontFaceFromHdc)( + HDC hdc, + _COM_Outptr_ IDWriteFontFace** fontFace + ) PURE; + + /// + /// Creates an object that encapsulates a bitmap and memory DC which can be used for rendering glyphs. + /// + /// Optional device context used to create a compatible memory DC. + /// Width of the bitmap. + /// Height of the bitmap. + /// Receives a pointer to the newly created render target. + STDMETHOD(CreateBitmapRenderTarget)( + _In_opt_ HDC hdc, + UINT32 width, + UINT32 height, + _COM_Outptr_ IDWriteBitmapRenderTarget** renderTarget + ) PURE; +}; + +/// +/// The DWRITE_TEXTURE_TYPE enumeration identifies a type of alpha texture. An alpha texture is a bitmap of alpha values, each +/// representing the darkness (i.e., opacity) of a pixel or subpixel. +/// +enum DWRITE_TEXTURE_TYPE +{ + /// + /// Specifies an alpha texture for aliased text rendering (i.e., bi-level, where each pixel is either fully opaque or fully transparent), + /// with one byte per pixel. + /// + DWRITE_TEXTURE_ALIASED_1x1, + + /// + /// Specifies an alpha texture for ClearType text rendering, with three bytes per pixel in the horizontal dimension and + /// one byte per pixel in the vertical dimension. + /// + DWRITE_TEXTURE_CLEARTYPE_3x1 +}; + +/// +/// Maximum alpha value in a texture returned by IDWriteGlyphRunAnalysis::CreateAlphaTexture. +/// +#define DWRITE_ALPHA_MAX 255 + +/// +/// Interface that encapsulates information used to render a glyph run. +/// +interface DWRITE_DECLARE_INTERFACE("7d97dbf7-e085-42d4-81e3-6a883bded118") IDWriteGlyphRunAnalysis : public IUnknown +{ + /// + /// Gets the bounding rectangle of the physical pixels affected by the glyph run. + /// + /// Specifies the type of texture requested. If a bi-level texture is requested, the + /// bounding rectangle includes only bi-level glyphs. Otherwise, the bounding rectangle includes only anti-aliased + /// glyphs. + /// Receives the bounding rectangle, or an empty rectangle if there are no glyphs + /// if the specified type. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetAlphaTextureBounds)( + DWRITE_TEXTURE_TYPE textureType, + _Out_ RECT* textureBounds + ) PURE; + + /// + /// Creates an alpha texture of the specified type. + /// + /// Specifies the type of texture requested. If a bi-level texture is requested, the + /// texture contains only bi-level glyphs. Otherwise, the texture contains only anti-aliased glyphs. + /// Specifies the bounding rectangle of the texture, which can be different than + /// the bounding rectangle returned by GetAlphaTextureBounds. + /// Receives the array of alpha values. + /// Size of the alphaValues array. The minimum size depends on the dimensions of the + /// rectangle and the type of texture requested. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateAlphaTexture)( + DWRITE_TEXTURE_TYPE textureType, + _In_ RECT const* textureBounds, + _Out_writes_bytes_(bufferSize) BYTE* alphaValues, + UINT32 bufferSize + ) PURE; + + /// + /// Gets properties required for ClearType blending. + /// + /// Rendering parameters object. In most cases, the values returned in the output + /// parameters are based on the properties of this object. The exception is if a GDI-compatible rendering mode + /// is specified. + /// Receives the gamma value to use for gamma correction. + /// Receives the enhanced contrast value. + /// Receives the ClearType level. + STDMETHOD(GetAlphaBlendParams)( + _In_ IDWriteRenderingParams* renderingParams, + _Out_ FLOAT* blendGamma, + _Out_ FLOAT* blendEnhancedContrast, + _Out_ FLOAT* blendClearTypeLevel + ) PURE; +}; + +/// +/// The root factory interface for all DWrite objects. +/// +interface DWRITE_DECLARE_INTERFACE("b859ee5a-d838-4b5b-a2e8-1adc7d93db48") IDWriteFactory : public IUnknown +{ + /// + /// Gets a font collection representing the set of installed fonts. + /// + /// Receives a pointer to the system font collection object, or NULL in case of failure. + /// If this parameter is nonzero, the function performs an immediate check for changes to the set of + /// installed fonts. If this parameter is FALSE, the function will still detect changes if the font cache service is running, but + /// there may be some latency. For example, an application might specify TRUE if it has itself just installed a font and wants to + /// be sure the font collection contains that font. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetSystemFontCollection)( + _COM_Outptr_ IDWriteFontCollection** fontCollection, + BOOL checkForUpdates = FALSE + ) PURE; + + /// + /// Creates a font collection using a custom font collection loader. + /// + /// Application-defined font collection loader, which must have been previously + /// registered using RegisterFontCollectionLoader. + /// Key used by the loader to identify a collection of font files. + /// Size in bytes of the collection key. + /// Receives a pointer to the system font collection object, or NULL in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateCustomFontCollection)( + _In_ IDWriteFontCollectionLoader* collectionLoader, + _In_reads_bytes_(collectionKeySize) void const* collectionKey, + UINT32 collectionKeySize, + _COM_Outptr_ IDWriteFontCollection** fontCollection + ) PURE; + + /// + /// Registers a custom font collection loader with the factory object. + /// + /// Application-defined font collection loader. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(RegisterFontCollectionLoader)( + _In_ IDWriteFontCollectionLoader* fontCollectionLoader + ) PURE; + + /// + /// Unregisters a custom font collection loader that was previously registered using RegisterFontCollectionLoader. + /// + /// Application-defined font collection loader. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(UnregisterFontCollectionLoader)( + _In_ IDWriteFontCollectionLoader* fontCollectionLoader + ) PURE; + + /// + /// CreateFontFileReference creates a font file reference object from a local font file. + /// + /// Absolute file path. Subsequent operations on the constructed object may fail + /// if the user provided filePath doesn't correspond to a valid file on the disk. + /// Last modified time of the input file path. If the parameter is omitted, + /// the function will access the font file to obtain its last write time, so the clients are encouraged to specify this value + /// to avoid extra disk access. Subsequent operations on the constructed object may fail + /// if the user provided lastWriteTime doesn't match the file on the disk. + /// Contains newly created font file reference object, or NULL in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontFileReference)( + _In_z_ WCHAR const* filePath, + _In_opt_ FILETIME const* lastWriteTime, + _COM_Outptr_ IDWriteFontFile** fontFile + ) PURE; + + /// + /// CreateCustomFontFileReference creates a reference to an application specific font file resource. + /// This function enables an application or a document to use a font without having to install it on the system. + /// The fontFileReferenceKey has to be unique only in the scope of the fontFileLoader used in this call. + /// + /// Font file reference key that uniquely identifies the font file resource + /// during the lifetime of fontFileLoader. + /// Size of font file reference key in bytes. + /// Font file loader that will be used by the font system to load data from the file identified by + /// fontFileReferenceKey. + /// Contains the newly created font file object, or NULL in case of failure. + /// + /// Standard HRESULT error code. + /// + /// + /// This function is provided for cases when an application or a document needs to use a font + /// without having to install it on the system. fontFileReferenceKey has to be unique only in the scope + /// of the fontFileLoader used in this call. + /// + STDMETHOD(CreateCustomFontFileReference)( + _In_reads_bytes_(fontFileReferenceKeySize) void const* fontFileReferenceKey, + UINT32 fontFileReferenceKeySize, + _In_ IDWriteFontFileLoader* fontFileLoader, + _COM_Outptr_ IDWriteFontFile** fontFile + ) PURE; + + /// + /// Creates a font face object. + /// + /// The file format of the font face. + /// The number of font files required to represent the font face. + /// Font files representing the font face. Since IDWriteFontFace maintains its own references + /// to the input font file objects, it's OK to release them after this call. + /// The zero based index of a font face in cases when the font files contain a collection of font faces. + /// If the font files contain a single face, this value should be zero. + /// Font face simulation flags for algorithmic emboldening and italicization. + /// Contains the newly created font face object, or NULL in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontFace)( + DWRITE_FONT_FACE_TYPE fontFaceType, + UINT32 numberOfFiles, + _In_reads_(numberOfFiles) IDWriteFontFile* const* fontFiles, + UINT32 faceIndex, + DWRITE_FONT_SIMULATIONS fontFaceSimulationFlags, + _COM_Outptr_ IDWriteFontFace** fontFace + ) PURE; + + /// + /// Creates a rendering parameters object with default settings for the primary monitor. + /// + /// Holds the newly created rendering parameters object, or NULL in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateRenderingParams)( + _COM_Outptr_ IDWriteRenderingParams** renderingParams + ) PURE; + + /// + /// Creates a rendering parameters object with default settings for the specified monitor. + /// + /// The monitor to read the default values from. + /// Holds the newly created rendering parameters object, or NULL in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateMonitorRenderingParams)( + HMONITOR monitor, + _COM_Outptr_ IDWriteRenderingParams** renderingParams + ) PURE; + + /// + /// Creates a rendering parameters object with the specified properties. + /// + /// The gamma value used for gamma correction, which must be greater than zero and cannot exceed 256. + /// The amount of contrast enhancement, zero or greater. + /// The degree of ClearType level, from 0.0f (no ClearType) to 1.0f (full ClearType). + /// The geometry of a device pixel. + /// Method of rendering glyphs. In most cases, this should be DWRITE_RENDERING_MODE_DEFAULT to automatically use an appropriate mode. + /// Holds the newly created rendering parameters object, or NULL in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateCustomRenderingParams)( + FLOAT gamma, + FLOAT enhancedContrast, + FLOAT clearTypeLevel, + DWRITE_PIXEL_GEOMETRY pixelGeometry, + DWRITE_RENDERING_MODE renderingMode, + _COM_Outptr_ IDWriteRenderingParams** renderingParams + ) PURE; + + /// + /// Registers a font file loader with DirectWrite. + /// + /// Pointer to the implementation of the IDWriteFontFileLoader for a particular file resource type. + /// + /// Standard HRESULT error code. + /// + /// + /// This function registers a font file loader with DirectWrite. + /// Font file loader interface handles loading font file resources of a particular type from a key. + /// The font file loader interface is recommended to be implemented by a singleton object. + /// A given instance can only be registered once. + /// Succeeding attempts will return an error that it has already been registered. + /// IMPORTANT: font file loader implementations must not register themselves with DirectWrite + /// inside their constructors and must not unregister themselves in their destructors, because + /// registration and unregistration operations increment and decrement the object reference count respectively. + /// Instead, registration and unregistration of font file loaders with DirectWrite should be performed + /// outside of the font file loader implementation as a separate step. + /// + STDMETHOD(RegisterFontFileLoader)( + _In_ IDWriteFontFileLoader* fontFileLoader + ) PURE; + + /// + /// Unregisters a font file loader that was previously registered with the DirectWrite font system using RegisterFontFileLoader. + /// + /// Pointer to the file loader that was previously registered with the DirectWrite font system using RegisterFontFileLoader. + /// + /// This function will succeed if the user loader is requested to be removed. + /// It will fail if the pointer to the file loader identifies a standard DirectWrite loader, + /// or a loader that is never registered or has already been unregistered. + /// + /// + /// This function unregisters font file loader callbacks with the DirectWrite font system. + /// The font file loader interface is recommended to be implemented by a singleton object. + /// IMPORTANT: font file loader implementations must not register themselves with DirectWrite + /// inside their constructors and must not unregister themselves in their destructors, because + /// registration and unregistration operations increment and decrement the object reference count respectively. + /// Instead, registration and unregistration of font file loaders with DirectWrite should be performed + /// outside of the font file loader implementation as a separate step. + /// + STDMETHOD(UnregisterFontFileLoader)( + _In_ IDWriteFontFileLoader* fontFileLoader + ) PURE; + + /// + /// Create a text format object used for text layout. + /// + /// Name of the font family + /// Font collection. NULL indicates the system font collection. + /// Font weight + /// Font style + /// Font stretch + /// Logical size of the font in DIP units. A DIP ("device-independent pixel") equals 1/96 inch. + /// Locale name + /// Contains newly created text format object, or NULL in case of failure. + /// + /// Standard HRESULT error code. + /// + /// + /// If fontCollection is nullptr, the system font collection is used, grouped by typographic family name + /// (DWRITE_FONT_FAMILY_MODEL_WEIGHT_STRETCH_STYLE) without downloadable fonts. + /// + STDMETHOD(CreateTextFormat)( + _In_z_ WCHAR const* fontFamilyName, + _In_opt_ IDWriteFontCollection* fontCollection, + DWRITE_FONT_WEIGHT fontWeight, + DWRITE_FONT_STYLE fontStyle, + DWRITE_FONT_STRETCH fontStretch, + FLOAT fontSize, + _In_z_ WCHAR const* localeName, + _COM_Outptr_ IDWriteTextFormat** textFormat + ) PURE; + + /// + /// Create a typography object used in conjunction with text format for text layout. + /// + /// Contains newly created typography object, or NULL in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateTypography)( + _COM_Outptr_ IDWriteTypography** typography + ) PURE; + + /// + /// Create an object used for interoperability with GDI. + /// + /// Receives the GDI interop object if successful, or NULL in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetGdiInterop)( + _COM_Outptr_ IDWriteGdiInterop** gdiInterop + ) PURE; + + /// + /// CreateTextLayout takes a string, format, and associated constraints + /// and produces an object representing the fully analyzed + /// and formatted result. + /// + /// The string to layout. + /// The length of the string. + /// The format to apply to the string. + /// Width of the layout box. + /// Height of the layout box. + /// The resultant object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateTextLayout)( + _In_reads_(stringLength) WCHAR const* string, + UINT32 stringLength, + _In_ IDWriteTextFormat* textFormat, + FLOAT maxWidth, + FLOAT maxHeight, + _COM_Outptr_ IDWriteTextLayout** textLayout + ) PURE; + + /// + /// CreateGdiCompatibleTextLayout takes a string, format, and associated constraints + /// and produces and object representing the result formatted for a particular display resolution + /// and measuring mode. The resulting text layout should only be used for the intended resolution, + /// and for cases where text scalability is desired, CreateTextLayout should be used instead. + /// + /// The string to layout. + /// The length of the string. + /// The format to apply to the string. + /// Width of the layout box. + /// Height of the layout box. + /// Number of physical pixels per DIP. For example, if rendering onto a 96 DPI device then pixelsPerDip + /// is 1. If rendering onto a 120 DPI device then pixelsPerDip is 120/96. + /// Optional transform applied to the glyphs and their positions. This transform is applied after the + /// scaling specified the font size and pixelsPerDip. + /// + /// When set to FALSE, instructs the text layout to use the same metrics as GDI aliased text. + /// When set to TRUE, instructs the text layout to use the same metrics as text measured by GDI using a font + /// created with CLEARTYPE_NATURAL_QUALITY. + /// + /// The resultant object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateGdiCompatibleTextLayout)( + _In_reads_(stringLength) WCHAR const* string, + UINT32 stringLength, + _In_ IDWriteTextFormat* textFormat, + FLOAT layoutWidth, + FLOAT layoutHeight, + FLOAT pixelsPerDip, + _In_opt_ DWRITE_MATRIX const* transform, + BOOL useGdiNatural, + _COM_Outptr_ IDWriteTextLayout** textLayout + ) PURE; + + /// + /// The application may call this function to create an inline object for trimming, using an ellipsis as the omission sign. + /// The ellipsis will be created using the current settings of the format, including base font, style, and any effects. + /// Alternate omission signs can be created by the application by implementing IDWriteInlineObject. + /// + /// Text format used as a template for the omission sign. + /// Created omission sign. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateEllipsisTrimmingSign)( + _In_ IDWriteTextFormat* textFormat, + _COM_Outptr_ IDWriteInlineObject** trimmingSign + ) PURE; + + /// + /// Return an interface to perform text analysis with. + /// + /// The resultant object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateTextAnalyzer)( + _COM_Outptr_ IDWriteTextAnalyzer** textAnalyzer + ) PURE; + + /// + /// Creates a number substitution object using a locale name, + /// substitution method, and whether to ignore user overrides (uses NLS + /// defaults for the given culture instead). + /// + /// Method of number substitution to use. + /// Which locale to obtain the digits from. + /// Ignore the user's settings and use the locale defaults + /// Receives a pointer to the newly created object. + STDMETHOD(CreateNumberSubstitution)( + _In_ DWRITE_NUMBER_SUBSTITUTION_METHOD substitutionMethod, + _In_z_ WCHAR const* localeName, + _In_ BOOL ignoreUserOverride, + _COM_Outptr_ IDWriteNumberSubstitution** numberSubstitution + ) PURE; + + /// + /// Creates a glyph run analysis object, which encapsulates information + /// used to render a glyph run. + /// + /// Structure specifying the properties of the glyph run. + /// Number of physical pixels per DIP. For example, if rendering onto a 96 DPI bitmap then pixelsPerDip + /// is 1. If rendering onto a 120 DPI bitmap then pixelsPerDip is 120/96. + /// Optional transform applied to the glyphs and their positions. This transform is applied after the + /// scaling specified by the emSize and pixelsPerDip. + /// Specifies the rendering mode, which must be one of the raster rendering modes (i.e., not default + /// and not outline). + /// Specifies the method to measure glyphs. + /// Horizontal position of the baseline origin, in DIPs. + /// Vertical position of the baseline origin, in DIPs. + /// Receives a pointer to the newly created object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateGlyphRunAnalysis)( + _In_ DWRITE_GLYPH_RUN const* glyphRun, + FLOAT pixelsPerDip, + _In_opt_ DWRITE_MATRIX const* transform, + DWRITE_RENDERING_MODE renderingMode, + DWRITE_MEASURING_MODE measuringMode, + FLOAT baselineOriginX, + FLOAT baselineOriginY, + _COM_Outptr_ IDWriteGlyphRunAnalysis** glyphRunAnalysis + ) PURE; + +}; // interface IDWriteFactory + + +/// +/// Creates a DirectWrite factory object that is used for subsequent creation of individual DirectWrite objects. +/// +/// Identifies whether the factory object will be shared or isolated. +/// Identifies the DirectWrite factory interface, such as __uuidof(IDWriteFactory). +/// Receives the DirectWrite factory object. +/// +/// Standard HRESULT error code. +/// +/// +/// Obtains DirectWrite factory object that is used for subsequent creation of individual DirectWrite classes. +/// DirectWrite factory contains internal state such as font loader registration and cached font data. +/// In most cases it is recommended to use the shared factory object, because it allows multiple components +/// that use DirectWrite to share internal DirectWrite state and reduce memory usage. +/// However, there are cases when it is desirable to reduce the impact of a component, +/// such as a plug-in from an untrusted source, on the rest of the process by sandboxing and isolating it +/// from the rest of the process components. In such cases, it is recommended to use an isolated factory for the sandboxed +/// component. +/// +EXTERN_C HRESULT DWRITE_EXPORT DWriteCreateFactory( + _In_ DWRITE_FACTORY_TYPE factoryType, + _In_ REFIID iid, + _COM_Outptr_ IUnknown **factory + ); + +// Macros used to define DirectWrite error codes. +#define FACILITY_DWRITE 0x898 +#define DWRITE_ERR_BASE 0x5000 +#define MAKE_DWRITE_HR(severity, code) MAKE_HRESULT(severity, FACILITY_DWRITE, (DWRITE_ERR_BASE + code)) +#define MAKE_DWRITE_HR_ERR(code) MAKE_DWRITE_HR(SEVERITY_ERROR, code) + +// DWrite errors have moved to winerror.h + + +#endif /* DWRITE_H_INCLUDED */ diff --git a/gfx/include/dxsdk/dwrite_1.h b/gfx/include/dxsdk/dwrite_1.h new file mode 100644 index 0000000000..301d30dce4 --- /dev/null +++ b/gfx/include/dxsdk/dwrite_1.h @@ -0,0 +1,1926 @@ +//+-------------------------------------------------------------------------- +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Abstract: +// DirectX Typography Services public API definitions. +// +//---------------------------------------------------------------------------- + +#ifndef DWRITE_1_H_INCLUDED +#define DWRITE_1_H_INCLUDED + +#pragma once + +#include + + + +/// +/// The overall kind of family. +/// +enum DWRITE_PANOSE_FAMILY +{ + DWRITE_PANOSE_FAMILY_ANY = 0, + DWRITE_PANOSE_FAMILY_NO_FIT = 1, + DWRITE_PANOSE_FAMILY_TEXT_DISPLAY = 2, + DWRITE_PANOSE_FAMILY_SCRIPT = 3, // or hand written + DWRITE_PANOSE_FAMILY_DECORATIVE = 4, + DWRITE_PANOSE_FAMILY_SYMBOL = 5, // or symbol + DWRITE_PANOSE_FAMILY_PICTORIAL = DWRITE_PANOSE_FAMILY_SYMBOL +}; + +/// +/// Appearance of the serifs. +/// Present for families: 2-text +/// +enum DWRITE_PANOSE_SERIF_STYLE +{ + DWRITE_PANOSE_SERIF_STYLE_ANY = 0, + DWRITE_PANOSE_SERIF_STYLE_NO_FIT = 1, + DWRITE_PANOSE_SERIF_STYLE_COVE = 2, + DWRITE_PANOSE_SERIF_STYLE_OBTUSE_COVE = 3, + DWRITE_PANOSE_SERIF_STYLE_SQUARE_COVE = 4, + DWRITE_PANOSE_SERIF_STYLE_OBTUSE_SQUARE_COVE = 5, + DWRITE_PANOSE_SERIF_STYLE_SQUARE = 6, + DWRITE_PANOSE_SERIF_STYLE_THIN = 7, + DWRITE_PANOSE_SERIF_STYLE_OVAL = 8, + DWRITE_PANOSE_SERIF_STYLE_EXAGGERATED = 9, + DWRITE_PANOSE_SERIF_STYLE_TRIANGLE = 10, + DWRITE_PANOSE_SERIF_STYLE_NORMAL_SANS = 11, + DWRITE_PANOSE_SERIF_STYLE_OBTUSE_SANS = 12, + DWRITE_PANOSE_SERIF_STYLE_PERPENDICULAR_SANS = 13, + DWRITE_PANOSE_SERIF_STYLE_FLARED = 14, + DWRITE_PANOSE_SERIF_STYLE_ROUNDED = 15, + DWRITE_PANOSE_SERIF_STYLE_SCRIPT = 16, + DWRITE_PANOSE_SERIF_STYLE_PERP_SANS = DWRITE_PANOSE_SERIF_STYLE_PERPENDICULAR_SANS, + DWRITE_PANOSE_SERIF_STYLE_BONE = DWRITE_PANOSE_SERIF_STYLE_OVAL +}; + +/// +/// PANOSE font weights. These roughly correspond to the DWRITE_FONT_WEIGHT's +/// using (panose_weight - 2) * 100. +/// Present for families: 2-text, 3-script, 4-decorative, 5-symbol +/// +enum DWRITE_PANOSE_WEIGHT +{ + DWRITE_PANOSE_WEIGHT_ANY = 0, + DWRITE_PANOSE_WEIGHT_NO_FIT = 1, + DWRITE_PANOSE_WEIGHT_VERY_LIGHT = 2, + DWRITE_PANOSE_WEIGHT_LIGHT = 3, + DWRITE_PANOSE_WEIGHT_THIN = 4, + DWRITE_PANOSE_WEIGHT_BOOK = 5, + DWRITE_PANOSE_WEIGHT_MEDIUM = 6, + DWRITE_PANOSE_WEIGHT_DEMI = 7, + DWRITE_PANOSE_WEIGHT_BOLD = 8, + DWRITE_PANOSE_WEIGHT_HEAVY = 9, + DWRITE_PANOSE_WEIGHT_BLACK = 10, + DWRITE_PANOSE_WEIGHT_EXTRA_BLACK = 11, + DWRITE_PANOSE_WEIGHT_NORD = DWRITE_PANOSE_WEIGHT_EXTRA_BLACK +}; + +/// +/// Proportion of the glyph shape considering additional detail to standard +/// characters. +/// Present for families: 2-text +/// +enum DWRITE_PANOSE_PROPORTION +{ + DWRITE_PANOSE_PROPORTION_ANY = 0, + DWRITE_PANOSE_PROPORTION_NO_FIT = 1, + DWRITE_PANOSE_PROPORTION_OLD_STYLE = 2, + DWRITE_PANOSE_PROPORTION_MODERN = 3, + DWRITE_PANOSE_PROPORTION_EVEN_WIDTH = 4, + DWRITE_PANOSE_PROPORTION_EXPANDED = 5, + DWRITE_PANOSE_PROPORTION_CONDENSED = 6, + DWRITE_PANOSE_PROPORTION_VERY_EXPANDED = 7, + DWRITE_PANOSE_PROPORTION_VERY_CONDENSED = 8, + DWRITE_PANOSE_PROPORTION_MONOSPACED = 9 +}; + +/// +/// Ratio between thickest and thinnest point of the stroke for a letter such +/// as uppercase 'O'. +/// Present for families: 2-text, 3-script, 4-decorative +/// +enum DWRITE_PANOSE_CONTRAST +{ + DWRITE_PANOSE_CONTRAST_ANY = 0, + DWRITE_PANOSE_CONTRAST_NO_FIT = 1, + DWRITE_PANOSE_CONTRAST_NONE = 2, + DWRITE_PANOSE_CONTRAST_VERY_LOW = 3, + DWRITE_PANOSE_CONTRAST_LOW = 4, + DWRITE_PANOSE_CONTRAST_MEDIUM_LOW = 5, + DWRITE_PANOSE_CONTRAST_MEDIUM = 6, + DWRITE_PANOSE_CONTRAST_MEDIUM_HIGH = 7, + DWRITE_PANOSE_CONTRAST_HIGH = 8, + DWRITE_PANOSE_CONTRAST_VERY_HIGH = 9, + DWRITE_PANOSE_CONTRAST_HORIZONTAL_LOW = 10, + DWRITE_PANOSE_CONTRAST_HORIZONTAL_MEDIUM = 11, + DWRITE_PANOSE_CONTRAST_HORIZONTAL_HIGH = 12, + DWRITE_PANOSE_CONTRAST_BROKEN = 13 +}; + +/// +/// Relationship between thin and thick stems. +/// Present for families: 2-text +/// +enum DWRITE_PANOSE_STROKE_VARIATION +{ + DWRITE_PANOSE_STROKE_VARIATION_ANY = 0, + DWRITE_PANOSE_STROKE_VARIATION_NO_FIT = 1, + DWRITE_PANOSE_STROKE_VARIATION_NO_VARIATION = 2, + DWRITE_PANOSE_STROKE_VARIATION_GRADUAL_DIAGONAL = 3, + DWRITE_PANOSE_STROKE_VARIATION_GRADUAL_TRANSITIONAL = 4, + DWRITE_PANOSE_STROKE_VARIATION_GRADUAL_VERTICAL = 5, + DWRITE_PANOSE_STROKE_VARIATION_GRADUAL_HORIZONTAL = 6, + DWRITE_PANOSE_STROKE_VARIATION_RAPID_VERTICAL = 7, + DWRITE_PANOSE_STROKE_VARIATION_RAPID_HORIZONTAL = 8, + DWRITE_PANOSE_STROKE_VARIATION_INSTANT_VERTICAL = 9, + DWRITE_PANOSE_STROKE_VARIATION_INSTANT_HORIZONTAL = 10 +}; + +/// +/// Style of termination of stems and rounded letterforms. +/// Present for families: 2-text +/// +enum DWRITE_PANOSE_ARM_STYLE +{ + DWRITE_PANOSE_ARM_STYLE_ANY = 0, + DWRITE_PANOSE_ARM_STYLE_NO_FIT = 1, + DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_HORIZONTAL = 2, + DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_WEDGE = 3, + DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_VERTICAL = 4, + DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_SINGLE_SERIF = 5, + DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_DOUBLE_SERIF = 6, + DWRITE_PANOSE_ARM_STYLE_NONSTRAIGHT_ARMS_HORIZONTAL = 7, + DWRITE_PANOSE_ARM_STYLE_NONSTRAIGHT_ARMS_WEDGE = 8, + DWRITE_PANOSE_ARM_STYLE_NONSTRAIGHT_ARMS_VERTICAL = 9, + DWRITE_PANOSE_ARM_STYLE_NONSTRAIGHT_ARMS_SINGLE_SERIF = 10, + DWRITE_PANOSE_ARM_STYLE_NONSTRAIGHT_ARMS_DOUBLE_SERIF = 11, + DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_HORZ = DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_HORIZONTAL, + DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_VERT = DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_VERTICAL, + DWRITE_PANOSE_ARM_STYLE_BENT_ARMS_HORZ = DWRITE_PANOSE_ARM_STYLE_NONSTRAIGHT_ARMS_HORIZONTAL, + DWRITE_PANOSE_ARM_STYLE_BENT_ARMS_WEDGE = DWRITE_PANOSE_ARM_STYLE_NONSTRAIGHT_ARMS_WEDGE, + DWRITE_PANOSE_ARM_STYLE_BENT_ARMS_VERT = DWRITE_PANOSE_ARM_STYLE_NONSTRAIGHT_ARMS_VERTICAL, + DWRITE_PANOSE_ARM_STYLE_BENT_ARMS_SINGLE_SERIF = DWRITE_PANOSE_ARM_STYLE_NONSTRAIGHT_ARMS_SINGLE_SERIF, + DWRITE_PANOSE_ARM_STYLE_BENT_ARMS_DOUBLE_SERIF = DWRITE_PANOSE_ARM_STYLE_NONSTRAIGHT_ARMS_DOUBLE_SERIF +}; + +/// +/// Roundness of letterform. +/// Present for families: 2-text +/// +enum DWRITE_PANOSE_LETTERFORM +{ + DWRITE_PANOSE_LETTERFORM_ANY = 0, + DWRITE_PANOSE_LETTERFORM_NO_FIT = 1, + DWRITE_PANOSE_LETTERFORM_NORMAL_CONTACT = 2, + DWRITE_PANOSE_LETTERFORM_NORMAL_WEIGHTED = 3, + DWRITE_PANOSE_LETTERFORM_NORMAL_BOXED = 4, + DWRITE_PANOSE_LETTERFORM_NORMAL_FLATTENED = 5, + DWRITE_PANOSE_LETTERFORM_NORMAL_ROUNDED = 6, + DWRITE_PANOSE_LETTERFORM_NORMAL_OFF_CENTER = 7, + DWRITE_PANOSE_LETTERFORM_NORMAL_SQUARE = 8, + DWRITE_PANOSE_LETTERFORM_OBLIQUE_CONTACT = 9, + DWRITE_PANOSE_LETTERFORM_OBLIQUE_WEIGHTED = 10, + DWRITE_PANOSE_LETTERFORM_OBLIQUE_BOXED = 11, + DWRITE_PANOSE_LETTERFORM_OBLIQUE_FLATTENED = 12, + DWRITE_PANOSE_LETTERFORM_OBLIQUE_ROUNDED = 13, + DWRITE_PANOSE_LETTERFORM_OBLIQUE_OFF_CENTER = 14, + DWRITE_PANOSE_LETTERFORM_OBLIQUE_SQUARE = 15 +}; + +/// +/// Placement of midline across uppercase characters and treatment of diagonal +/// stem apexes. +/// Present for families: 2-text +/// +enum DWRITE_PANOSE_MIDLINE +{ + DWRITE_PANOSE_MIDLINE_ANY = 0, + DWRITE_PANOSE_MIDLINE_NO_FIT = 1, + DWRITE_PANOSE_MIDLINE_STANDARD_TRIMMED = 2, + DWRITE_PANOSE_MIDLINE_STANDARD_POINTED = 3, + DWRITE_PANOSE_MIDLINE_STANDARD_SERIFED = 4, + DWRITE_PANOSE_MIDLINE_HIGH_TRIMMED = 5, + DWRITE_PANOSE_MIDLINE_HIGH_POINTED = 6, + DWRITE_PANOSE_MIDLINE_HIGH_SERIFED = 7, + DWRITE_PANOSE_MIDLINE_CONSTANT_TRIMMED = 8, + DWRITE_PANOSE_MIDLINE_CONSTANT_POINTED = 9, + DWRITE_PANOSE_MIDLINE_CONSTANT_SERIFED = 10, + DWRITE_PANOSE_MIDLINE_LOW_TRIMMED = 11, + DWRITE_PANOSE_MIDLINE_LOW_POINTED = 12, + DWRITE_PANOSE_MIDLINE_LOW_SERIFED = 13 +}; + +/// +/// Relative size of lowercase letters and treament of diacritic marks +/// and uppercase glyphs. +/// Present for families: 2-text +/// +enum DWRITE_PANOSE_XHEIGHT +{ + DWRITE_PANOSE_XHEIGHT_ANY = 0, + DWRITE_PANOSE_XHEIGHT_NO_FIT = 1, + DWRITE_PANOSE_XHEIGHT_CONSTANT_SMALL = 2, + DWRITE_PANOSE_XHEIGHT_CONSTANT_STANDARD = 3, + DWRITE_PANOSE_XHEIGHT_CONSTANT_LARGE = 4, + DWRITE_PANOSE_XHEIGHT_DUCKING_SMALL = 5, + DWRITE_PANOSE_XHEIGHT_DUCKING_STANDARD = 6, + DWRITE_PANOSE_XHEIGHT_DUCKING_LARGE = 7, + DWRITE_PANOSE_XHEIGHT_CONSTANT_STD = DWRITE_PANOSE_XHEIGHT_CONSTANT_STANDARD, + DWRITE_PANOSE_XHEIGHT_DUCKING_STD = DWRITE_PANOSE_XHEIGHT_DUCKING_STANDARD +}; + +/// +/// Kind of tool used to create character forms. +/// Present for families: 3-script +/// +enum DWRITE_PANOSE_TOOL_KIND +{ + DWRITE_PANOSE_TOOL_KIND_ANY = 0, + DWRITE_PANOSE_TOOL_KIND_NO_FIT = 1, + DWRITE_PANOSE_TOOL_KIND_FLAT_NIB = 2, + DWRITE_PANOSE_TOOL_KIND_PRESSURE_POINT = 3, + DWRITE_PANOSE_TOOL_KIND_ENGRAVED = 4, + DWRITE_PANOSE_TOOL_KIND_BALL = 5, + DWRITE_PANOSE_TOOL_KIND_BRUSH = 6, + DWRITE_PANOSE_TOOL_KIND_ROUGH = 7, + DWRITE_PANOSE_TOOL_KIND_FELT_PEN_BRUSH_TIP = 8, + DWRITE_PANOSE_TOOL_KIND_WILD_BRUSH = 9 +}; + +/// +/// Monospace vs proportional. +/// Present for families: 3-script, 5-symbol +/// +enum DWRITE_PANOSE_SPACING +{ + DWRITE_PANOSE_SPACING_ANY = 0, + DWRITE_PANOSE_SPACING_NO_FIT = 1, + DWRITE_PANOSE_SPACING_PROPORTIONAL_SPACED = 2, + DWRITE_PANOSE_SPACING_MONOSPACED = 3, +}; + +/// +/// Ratio between width and height of the face. +/// Present for families: 3-script +/// +enum DWRITE_PANOSE_ASPECT_RATIO +{ + DWRITE_PANOSE_ASPECT_RATIO_ANY = 0, + DWRITE_PANOSE_ASPECT_RATIO_NO_FIT = 1, + DWRITE_PANOSE_ASPECT_RATIO_VERY_CONDENSED = 2, + DWRITE_PANOSE_ASPECT_RATIO_CONDENSED = 3, + DWRITE_PANOSE_ASPECT_RATIO_NORMAL = 4, + DWRITE_PANOSE_ASPECT_RATIO_EXPANDED = 5, + DWRITE_PANOSE_ASPECT_RATIO_VERY_EXPANDED = 6 +}; + +/// +/// Topology of letterforms. +/// Present for families: 3-script +/// +enum DWRITE_PANOSE_SCRIPT_TOPOLOGY +{ + DWRITE_PANOSE_SCRIPT_TOPOLOGY_ANY = 0, + DWRITE_PANOSE_SCRIPT_TOPOLOGY_NO_FIT = 1, + DWRITE_PANOSE_SCRIPT_TOPOLOGY_ROMAN_DISCONNECTED = 2, + DWRITE_PANOSE_SCRIPT_TOPOLOGY_ROMAN_TRAILING = 3, + DWRITE_PANOSE_SCRIPT_TOPOLOGY_ROMAN_CONNECTED = 4, + DWRITE_PANOSE_SCRIPT_TOPOLOGY_CURSIVE_DISCONNECTED = 5, + DWRITE_PANOSE_SCRIPT_TOPOLOGY_CURSIVE_TRAILING = 6, + DWRITE_PANOSE_SCRIPT_TOPOLOGY_CURSIVE_CONNECTED = 7, + DWRITE_PANOSE_SCRIPT_TOPOLOGY_BLACKLETTER_DISCONNECTED = 8, + DWRITE_PANOSE_SCRIPT_TOPOLOGY_BLACKLETTER_TRAILING = 9, + DWRITE_PANOSE_SCRIPT_TOPOLOGY_BLACKLETTER_CONNECTED = 10 +}; + +/// +/// General look of the face, considering slope and tails. +/// Present for families: 3-script +/// +enum DWRITE_PANOSE_SCRIPT_FORM +{ + DWRITE_PANOSE_SCRIPT_FORM_ANY = 0, + DWRITE_PANOSE_SCRIPT_FORM_NO_FIT = 1, + DWRITE_PANOSE_SCRIPT_FORM_UPRIGHT_NO_WRAPPING = 2, + DWRITE_PANOSE_SCRIPT_FORM_UPRIGHT_SOME_WRAPPING = 3, + DWRITE_PANOSE_SCRIPT_FORM_UPRIGHT_MORE_WRAPPING = 4, + DWRITE_PANOSE_SCRIPT_FORM_UPRIGHT_EXTREME_WRAPPING = 5, + DWRITE_PANOSE_SCRIPT_FORM_OBLIQUE_NO_WRAPPING = 6, + DWRITE_PANOSE_SCRIPT_FORM_OBLIQUE_SOME_WRAPPING = 7, + DWRITE_PANOSE_SCRIPT_FORM_OBLIQUE_MORE_WRAPPING = 8, + DWRITE_PANOSE_SCRIPT_FORM_OBLIQUE_EXTREME_WRAPPING = 9, + DWRITE_PANOSE_SCRIPT_FORM_EXAGGERATED_NO_WRAPPING = 10, + DWRITE_PANOSE_SCRIPT_FORM_EXAGGERATED_SOME_WRAPPING = 11, + DWRITE_PANOSE_SCRIPT_FORM_EXAGGERATED_MORE_WRAPPING = 12, + DWRITE_PANOSE_SCRIPT_FORM_EXAGGERATED_EXTREME_WRAPPING = 13 +}; + +/// +/// How character ends and miniscule ascenders are treated. +/// Present for families: 3-script +/// +enum DWRITE_PANOSE_FINIALS +{ + DWRITE_PANOSE_FINIALS_ANY = 0, + DWRITE_PANOSE_FINIALS_NO_FIT = 1, + DWRITE_PANOSE_FINIALS_NONE_NO_LOOPS = 2, + DWRITE_PANOSE_FINIALS_NONE_CLOSED_LOOPS = 3, + DWRITE_PANOSE_FINIALS_NONE_OPEN_LOOPS = 4, + DWRITE_PANOSE_FINIALS_SHARP_NO_LOOPS = 5, + DWRITE_PANOSE_FINIALS_SHARP_CLOSED_LOOPS = 6, + DWRITE_PANOSE_FINIALS_SHARP_OPEN_LOOPS = 7, + DWRITE_PANOSE_FINIALS_TAPERED_NO_LOOPS = 8, + DWRITE_PANOSE_FINIALS_TAPERED_CLOSED_LOOPS = 9, + DWRITE_PANOSE_FINIALS_TAPERED_OPEN_LOOPS = 10, + DWRITE_PANOSE_FINIALS_ROUND_NO_LOOPS = 11, + DWRITE_PANOSE_FINIALS_ROUND_CLOSED_LOOPS = 12, + DWRITE_PANOSE_FINIALS_ROUND_OPEN_LOOPS = 13 +}; + +/// +/// Relative size of the lowercase letters. +/// Present for families: 3-script +/// +enum DWRITE_PANOSE_XASCENT +{ + DWRITE_PANOSE_XASCENT_ANY = 0, + DWRITE_PANOSE_XASCENT_NO_FIT = 1, + DWRITE_PANOSE_XASCENT_VERY_LOW = 2, + DWRITE_PANOSE_XASCENT_LOW = 3, + DWRITE_PANOSE_XASCENT_MEDIUM = 4, + DWRITE_PANOSE_XASCENT_HIGH = 5, + DWRITE_PANOSE_XASCENT_VERY_HIGH = 6 +}; + +/// +/// General look of the face. +/// Present for families: 4-decorative +/// +enum DWRITE_PANOSE_DECORATIVE_CLASS +{ + DWRITE_PANOSE_DECORATIVE_CLASS_ANY = 0, + DWRITE_PANOSE_DECORATIVE_CLASS_NO_FIT = 1, + DWRITE_PANOSE_DECORATIVE_CLASS_DERIVATIVE = 2, + DWRITE_PANOSE_DECORATIVE_CLASS_NONSTANDARD_TOPOLOGY = 3, + DWRITE_PANOSE_DECORATIVE_CLASS_NONSTANDARD_ELEMENTS = 4, + DWRITE_PANOSE_DECORATIVE_CLASS_NONSTANDARD_ASPECT = 5, + DWRITE_PANOSE_DECORATIVE_CLASS_INITIALS = 6, + DWRITE_PANOSE_DECORATIVE_CLASS_CARTOON = 7, + DWRITE_PANOSE_DECORATIVE_CLASS_PICTURE_STEMS = 8, + DWRITE_PANOSE_DECORATIVE_CLASS_ORNAMENTED = 9, + DWRITE_PANOSE_DECORATIVE_CLASS_TEXT_AND_BACKGROUND = 10, + DWRITE_PANOSE_DECORATIVE_CLASS_COLLAGE = 11, + DWRITE_PANOSE_DECORATIVE_CLASS_MONTAGE = 12 +}; + +/// +/// Ratio between the width and height of the face. +/// Present for families: 4-decorative +/// +enum DWRITE_PANOSE_ASPECT +{ + DWRITE_PANOSE_ASPECT_ANY = 0, + DWRITE_PANOSE_ASPECT_NO_FIT = 1, + DWRITE_PANOSE_ASPECT_SUPER_CONDENSED = 2, + DWRITE_PANOSE_ASPECT_VERY_CONDENSED = 3, + DWRITE_PANOSE_ASPECT_CONDENSED = 4, + DWRITE_PANOSE_ASPECT_NORMAL = 5, + DWRITE_PANOSE_ASPECT_EXTENDED = 6, + DWRITE_PANOSE_ASPECT_VERY_EXTENDED = 7, + DWRITE_PANOSE_ASPECT_SUPER_EXTENDED = 8, + DWRITE_PANOSE_ASPECT_MONOSPACED = 9 +}; + +/// +/// Type of fill/line (treatment). +/// Present for families: 4-decorative +/// +enum DWRITE_PANOSE_FILL +{ + DWRITE_PANOSE_FILL_ANY = 0, + DWRITE_PANOSE_FILL_NO_FIT = 1, + DWRITE_PANOSE_FILL_STANDARD_SOLID_FILL = 2, + DWRITE_PANOSE_FILL_NO_FILL = 3, + DWRITE_PANOSE_FILL_PATTERNED_FILL = 4, + DWRITE_PANOSE_FILL_COMPLEX_FILL = 5, + DWRITE_PANOSE_FILL_SHAPED_FILL = 6, + DWRITE_PANOSE_FILL_DRAWN_DISTRESSED = 7, +}; + +/// +/// Outline handling. +/// Present for families: 4-decorative +/// +enum DWRITE_PANOSE_LINING +{ + DWRITE_PANOSE_LINING_ANY = 0, + DWRITE_PANOSE_LINING_NO_FIT = 1, + DWRITE_PANOSE_LINING_NONE = 2, + DWRITE_PANOSE_LINING_INLINE = 3, + DWRITE_PANOSE_LINING_OUTLINE = 4, + DWRITE_PANOSE_LINING_ENGRAVED = 5, + DWRITE_PANOSE_LINING_SHADOW = 6, + DWRITE_PANOSE_LINING_RELIEF = 7, + DWRITE_PANOSE_LINING_BACKDROP = 8 +}; + +/// +/// Overall shape characteristics of the font. +/// Present for families: 4-decorative +/// +enum DWRITE_PANOSE_DECORATIVE_TOPOLOGY +{ + DWRITE_PANOSE_DECORATIVE_TOPOLOGY_ANY = 0, + DWRITE_PANOSE_DECORATIVE_TOPOLOGY_NO_FIT = 1, + DWRITE_PANOSE_DECORATIVE_TOPOLOGY_STANDARD = 2, + DWRITE_PANOSE_DECORATIVE_TOPOLOGY_SQUARE = 3, + DWRITE_PANOSE_DECORATIVE_TOPOLOGY_MULTIPLE_SEGMENT = 4, + DWRITE_PANOSE_DECORATIVE_TOPOLOGY_ART_DECO = 5, + DWRITE_PANOSE_DECORATIVE_TOPOLOGY_UNEVEN_WEIGHTING = 6, + DWRITE_PANOSE_DECORATIVE_TOPOLOGY_DIVERSE_ARMS = 7, + DWRITE_PANOSE_DECORATIVE_TOPOLOGY_DIVERSE_FORMS = 8, + DWRITE_PANOSE_DECORATIVE_TOPOLOGY_LOMBARDIC_FORMS = 9, + DWRITE_PANOSE_DECORATIVE_TOPOLOGY_UPPER_CASE_IN_LOWER_CASE = 10, + DWRITE_PANOSE_DECORATIVE_TOPOLOGY_IMPLIED_TOPOLOGY = 11, + DWRITE_PANOSE_DECORATIVE_TOPOLOGY_HORSESHOE_E_AND_A = 12, + DWRITE_PANOSE_DECORATIVE_TOPOLOGY_CURSIVE = 13, + DWRITE_PANOSE_DECORATIVE_TOPOLOGY_BLACKLETTER = 14, + DWRITE_PANOSE_DECORATIVE_TOPOLOGY_SWASH_VARIANCE = 15 +}; + +/// +/// Type of characters available in the font. +/// Present for families: 4-decorative +/// +enum DWRITE_PANOSE_CHARACTER_RANGES +{ + DWRITE_PANOSE_CHARACTER_RANGES_ANY = 0, + DWRITE_PANOSE_CHARACTER_RANGES_NO_FIT = 1, + DWRITE_PANOSE_CHARACTER_RANGES_EXTENDED_COLLECTION = 2, + DWRITE_PANOSE_CHARACTER_RANGES_LITERALS = 3, + DWRITE_PANOSE_CHARACTER_RANGES_NO_LOWER_CASE = 4, + DWRITE_PANOSE_CHARACTER_RANGES_SMALL_CAPS = 5 +}; + +/// +/// Kind of symbol set. +/// Present for families: 5-symbol +/// +enum DWRITE_PANOSE_SYMBOL_KIND +{ + DWRITE_PANOSE_SYMBOL_KIND_ANY = 0, + DWRITE_PANOSE_SYMBOL_KIND_NO_FIT = 1, + DWRITE_PANOSE_SYMBOL_KIND_MONTAGES = 2, + DWRITE_PANOSE_SYMBOL_KIND_PICTURES = 3, + DWRITE_PANOSE_SYMBOL_KIND_SHAPES = 4, + DWRITE_PANOSE_SYMBOL_KIND_SCIENTIFIC = 5, + DWRITE_PANOSE_SYMBOL_KIND_MUSIC = 6, + DWRITE_PANOSE_SYMBOL_KIND_EXPERT = 7, + DWRITE_PANOSE_SYMBOL_KIND_PATTERNS = 8, + DWRITE_PANOSE_SYMBOL_KIND_BOARDERS = 9, + DWRITE_PANOSE_SYMBOL_KIND_ICONS = 10, + DWRITE_PANOSE_SYMBOL_KIND_LOGOS = 11, + DWRITE_PANOSE_SYMBOL_KIND_INDUSTRY_SPECIFIC = 12 +}; + +/// +/// Aspect ratio of symbolic characters. +/// Present for families: 5-symbol +/// +enum DWRITE_PANOSE_SYMBOL_ASPECT_RATIO +{ + DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_ANY = 0, + DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_NO_FIT = 1, + DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_NO_WIDTH = 2, + DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_EXCEPTIONALLY_WIDE = 3, + DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_SUPER_WIDE = 4, + DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_VERY_WIDE = 5, + DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_WIDE = 6, + DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_NORMAL = 7, + DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_NARROW = 8, + DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_VERY_NARROW = 9 +}; + +/// +/// Specifies the policy used by GetRecommendedRenderingMode to determine whether to +/// render glyphs in outline mode. Glyphs are rendered in outline mode by default at +/// large sizes for performance reasons, but how large (i.e., the outline threshold) +/// depends on the quality of outline rendering. If the graphics system renders anti- +/// aliased outlines then a relatively low threshold is used, but if the graphics +/// system renders aliased outlines then a much higher threshold is used. +/// +enum DWRITE_OUTLINE_THRESHOLD +{ + DWRITE_OUTLINE_THRESHOLD_ANTIALIASED, + DWRITE_OUTLINE_THRESHOLD_ALIASED +}; + +/// +/// Baseline for text alignment. +/// +enum DWRITE_BASELINE +{ + /// + /// The Roman baseline for horizontal, Central baseline for vertical. + /// + DWRITE_BASELINE_DEFAULT, + + /// + /// The baseline used by alphabetic scripts such as Latin, Greek, Cyrillic. + /// + DWRITE_BASELINE_ROMAN, + + /// + /// Central baseline, generally used for vertical text. + /// + DWRITE_BASELINE_CENTRAL, + + /// + /// Mathematical baseline which math characters are centered on. + /// + DWRITE_BASELINE_MATH, + + /// + /// Hanging baseline, used in scripts like Devanagari. + /// + DWRITE_BASELINE_HANGING, + + /// + /// Ideographic bottom baseline for CJK, left in vertical. + /// + DWRITE_BASELINE_IDEOGRAPHIC_BOTTOM, + + /// + /// Ideographic top baseline for CJK, right in vertical. + /// + DWRITE_BASELINE_IDEOGRAPHIC_TOP, + + /// + /// The bottom-most extent in horizontal, left-most in vertical. + /// + DWRITE_BASELINE_MINIMUM, + + /// + /// The top-most extent in horizontal, right-most in vertical. + /// + DWRITE_BASELINE_MAXIMUM, +}; + +/// +/// The desired kind of glyph orientation for the text. The client specifies +/// this to the analyzer as the desired orientation, but note this is the +/// client preference, and the constraints of the script will determine the +/// final presentation. +/// +enum DWRITE_VERTICAL_GLYPH_ORIENTATION +{ + /// + /// In vertical layout, naturally horizontal scripts (Latin, Thai, Arabic, + /// Devanagari) rotate 90 degrees clockwise, while ideographic scripts + /// (Chinese, Japanese, Korean) remain upright, 0 degrees. + /// + DWRITE_VERTICAL_GLYPH_ORIENTATION_DEFAULT, + + /// + /// Ideographic scripts and scripts that permit stacking + /// (Latin, Hebrew) are stacked in vertical reading layout. + /// Connected scripts (Arabic, Syriac, 'Phags-pa, Ogham), + /// which would otherwise look broken if glyphs were kept + /// at 0 degrees, remain connected and rotate. + /// + DWRITE_VERTICAL_GLYPH_ORIENTATION_STACKED, +}; + +/// +/// How the glyph is oriented to the x-axis. This is an output from the text +/// analyzer, dependent on the desired orientation, bidi level, and character +/// properties. +/// +enum DWRITE_GLYPH_ORIENTATION_ANGLE +{ + /// + /// Glyph orientation is upright. + /// + DWRITE_GLYPH_ORIENTATION_ANGLE_0_DEGREES, + + /// + /// Glyph orientation is rotated 90 clockwise. + /// + DWRITE_GLYPH_ORIENTATION_ANGLE_90_DEGREES, + + /// + /// Glyph orientation is upside-down. + /// + DWRITE_GLYPH_ORIENTATION_ANGLE_180_DEGREES, + + /// + /// Glyph orientation is rotated 270 clockwise. + /// + DWRITE_GLYPH_ORIENTATION_ANGLE_270_DEGREES, +}; + + +struct DWRITE_FONT_METRICS1 : public DWRITE_FONT_METRICS +{ + /// + /// Left edge of accumulated bounding blackbox of all glyphs in the font. + /// + INT16 glyphBoxLeft; + + /// + /// Top edge of accumulated bounding blackbox of all glyphs in the font. + /// + INT16 glyphBoxTop; + + /// + /// Right edge of accumulated bounding blackbox of all glyphs in the font. + /// + INT16 glyphBoxRight; + + /// + /// Bottom edge of accumulated bounding blackbox of all glyphs in the font. + /// + INT16 glyphBoxBottom; + + /// + /// Horizontal position of the subscript relative to the baseline origin. + /// This is typically negative (to the left) in italic/oblique fonts, and + /// zero in regular fonts. + /// + INT16 subscriptPositionX; + + /// + /// Vertical position of the subscript relative to the baseline. + /// This is typically negative. + /// + INT16 subscriptPositionY; + + /// + /// Horizontal size of the subscript em box in design units, used to + /// scale the simulated subscript relative to the full em box size. + /// This the numerator of the scaling ratio where denominator is the + /// design units per em. If this member is zero, the font does not specify + /// a scale factor, and the client should use its own policy. + /// + INT16 subscriptSizeX; + + /// + /// Vertical size of the subscript em box in design units, used to + /// scale the simulated subscript relative to the full em box size. + /// This the numerator of the scaling ratio where denominator is the + /// design units per em. If this member is zero, the font does not specify + /// a scale factor, and the client should use its own policy. + /// + INT16 subscriptSizeY; + + /// + /// Horizontal position of the superscript relative to the baseline origin. + /// This is typically positive (to the right) in italic/oblique fonts, and + /// zero in regular fonts. + /// + INT16 superscriptPositionX; + + /// + /// Vertical position of the superscript relative to the baseline. + /// This is typically positive. + /// + INT16 superscriptPositionY; + + /// + /// Horizontal size of the superscript em box in design units, used to + /// scale the simulated superscript relative to the full em box size. + /// This the numerator of the scaling ratio where denominator is the + /// design units per em. If this member is zero, the font does not specify + /// a scale factor, and the client should use its own policy. + /// + INT16 superscriptSizeX; + + /// + /// Vertical size of the superscript em box in design units, used to + /// scale the simulated superscript relative to the full em box size. + /// This the numerator of the scaling ratio where denominator is the + /// design units per em. If this member is zero, the font does not specify + /// a scale factor, and the client should use its own policy. + /// + INT16 superscriptSizeY; + + /// + /// Indicates that the ascent, descent, and lineGap are based on newer + /// 'typographic' values in the font, rather than legacy values. + /// + BOOL hasTypographicMetrics; +}; + + +/// +/// Metrics for caret placement in a font. +/// +struct DWRITE_CARET_METRICS +{ + /// + /// Vertical rise of the caret. Rise / Run yields the caret angle. + /// Rise = 1 for perfectly upright fonts (non-italic). + /// + INT16 slopeRise; + + /// + /// Horizontal run of th caret. Rise / Run yields the caret angle. + /// Run = 0 for perfectly upright fonts (non-italic). + /// + INT16 slopeRun; + + /// + /// Horizontal offset of the caret along the baseline for good appearance. + /// Offset = 0 for perfectly upright fonts (non-italic). + /// + INT16 offset; +}; + + +/// +/// Typeface classification values, used for font selection and matching. +/// +/// +/// Note the family type (index 0) is the only stable entry in the 10-byte +/// array, as all the following entries can change dynamically depending on +/// context of the first field. +/// +union DWRITE_PANOSE +{ + UINT8 values[10]; + + UINT8 familyKind; // this is the only field that never changes meaning + + struct + { + UINT8 familyKind; // = 2 for text + UINT8 serifStyle; + UINT8 weight; + UINT8 proportion; + UINT8 contrast; + UINT8 strokeVariation; + UINT8 armStyle; + UINT8 letterform; + UINT8 midline; + UINT8 xHeight; + } text; + + struct + { + UINT8 familyKind; // = 3 for script + UINT8 toolKind; + UINT8 weight; + UINT8 spacing; + UINT8 aspectRatio; + UINT8 contrast; + UINT8 scriptTopology; + UINT8 scriptForm; + UINT8 finials; + UINT8 xAscent; + } script; + + struct + { + UINT8 familyKind; // = 4 for decorative + UINT8 decorativeClass; + UINT8 weight; + UINT8 aspect; + UINT8 contrast; + UINT8 serifVariant; + UINT8 fill; // treatment + UINT8 lining; + UINT8 decorativeTopology; + UINT8 characterRange; + } decorative; + + struct + { + UINT8 familyKind; // = 5 for symbol + UINT8 symbolKind; + UINT8 weight; + UINT8 spacing; + UINT8 aspectRatioAndContrast; // hard coded to no-fit (1) + UINT8 aspectRatio94; + UINT8 aspectRatio119; + UINT8 aspectRatio157; + UINT8 aspectRatio163; + UINT8 aspectRatio211; + } symbol; +}; + + +/// +/// Range of Unicode codepoints. +/// +struct DWRITE_UNICODE_RANGE +{ + /// + /// The first codepoint in the Unicode range. + /// + UINT32 first; + + /// + /// The last codepoint in the Unicode range. + /// + UINT32 last; +}; + + +/// +/// Script-specific properties for caret navigation and justification. +/// +struct DWRITE_SCRIPT_PROPERTIES +{ + /// + /// The standardized four character code for the given script. + /// Note these only include the general Unicode scripts, not any + /// additional ISO 15924 scripts for bibliographic distinction + /// (for example, Fraktur Latin vs Gaelic Latin). + /// http://unicode.org/iso15924/iso15924-codes.html + /// + UINT32 isoScriptCode; + + /// + /// The standardized numeric code, ranging 0-999. + /// http://unicode.org/iso15924/iso15924-codes.html + /// + UINT32 isoScriptNumber; + + /// + /// Number of characters to estimate look-ahead for complex scripts. + /// Latin and all Kana are generally 1. Indic scripts are up to 15, + /// and most others are 8. Note that combining marks and variation + /// selectors can produce clusters longer than these look-aheads, + /// so this estimate is considered typical language use. Diacritics + /// must be tested explicitly separately. + /// + UINT32 clusterLookahead; + + /// + /// Appropriate character to elongate the given script for justification. + /// + /// Examples: + /// Arabic - U+0640 Tatweel + /// Ogham - U+1680 Ogham Space Mark + /// + UINT32 justificationCharacter; + + /// + /// Restrict the caret to whole clusters, like Thai and Devanagari. Scripts + /// such as Arabic by default allow navigation between clusters. Others + /// like Thai always navigate across whole clusters. + /// + UINT32 restrictCaretToClusters : 1; + + /// + /// The language uses dividers between words, such as spaces between Latin + /// or the Ethiopic wordspace. + /// + /// Examples: Latin, Greek, Devanagari, Ethiopic + /// Excludes: Chinese, Korean, Thai. + /// + UINT32 usesWordDividers : 1; + + /// + /// The characters are discrete units from each other. This includes both + /// block scripts and clustered scripts. + /// + /// Examples: Latin, Greek, Cyrillic, Hebrew, Chinese, Thai + /// + UINT32 isDiscreteWriting : 1; + + /// + /// The language is a block script, expanding between characters. + /// + /// Examples: Chinese, Japanese, Korean, Bopomofo. + /// + UINT32 isBlockWriting : 1; + + /// + /// The language is justified within glyph clusters, not just between glyph + /// clusters. One such as the character sequence is Thai Lu and Sara Am + /// (U+E026, U+E033) which form a single cluster but still expand between + /// them. + /// + /// Examples: Thai, Lao, Khmer + /// + UINT32 isDistributedWithinCluster : 1; + + /// + /// The script's clusters are connected to each other (such as the + /// baseline-linked Devanagari), and no separation should be added + /// between characters. Note that cursively linked scripts like Arabic + /// are also connected (but not all connected scripts are + /// cursive). + /// + /// Examples: Devanagari, Arabic, Syriac, Bengali, Gurmukhi, Ogham + /// Excludes: Latin, Chinese, Thaana + /// + UINT32 isConnectedWriting : 1; + + /// + /// The script is naturally cursive (Arabic/Syriac), meaning it uses other + /// justification methods like kashida extension rather than intercharacter + /// spacing. Note that although other scripts like Latin and Japanese may + /// actually support handwritten cursive forms, they are not considered + /// cursive scripts. + /// + /// Examples: Arabic, Syriac, Mongolian + /// Excludes: Thaana, Devanagari, Latin, Chinese + /// + UINT32 isCursiveWriting : 1; + + UINT32 reserved : 25; +}; + + +/// +/// Justification information per glyph. +/// +struct DWRITE_JUSTIFICATION_OPPORTUNITY +{ + /// + /// Minimum amount of expansion to apply to the side of the glyph. + /// This may vary from 0 to infinity, typically being zero except + /// for kashida. + /// + FLOAT expansionMinimum; + + /// + /// Maximum amount of expansion to apply to the side of the glyph. + /// This may vary from 0 to infinity, being zero for fixed-size characters + /// and connected scripts, and non-zero for discrete scripts, and non-zero + /// for cursive scripts at expansion points. + /// + FLOAT expansionMaximum; + + /// + /// Maximum amount of compression to apply to the side of the glyph. + /// This may vary from 0 up to the glyph cluster size. + /// + FLOAT compressionMaximum; + + /// + /// Priority of this expansion point. Larger priorities are applied later, + /// while priority zero does nothing. + /// + UINT32 expansionPriority : 8; + + /// + /// Priority of this compression point. Larger priorities are applied later, + /// while priority zero does nothing. + /// + UINT32 compressionPriority : 8; + + /// + /// Allow this expansion point to use up any remaining slack space even + /// after all expansion priorities have been used up. + /// + UINT32 allowResidualExpansion : 1; + + /// + /// Allow this compression point to use up any remaining space even after + /// all compression priorities have been used up. + /// + UINT32 allowResidualCompression : 1; + + /// + /// Apply expansion/compression to the leading edge of the glyph. This will + /// be false for connected scripts, fixed-size characters, and diacritics. + /// It is generally false within a multi-glyph cluster, unless the script + /// allows expansion of glyphs within a cluster, like Thai. + /// + UINT32 applyToLeadingEdge : 1; + + /// + /// Apply expansion/compression to the trailing edge of the glyph. This will + /// be false for connected scripts, fixed-size characters, and diacritics. + /// It is generally false within a multi-glyph cluster, unless the script + /// allows expansion of glyphs within a cluster, like Thai. + /// + UINT32 applyToTrailingEdge : 1; + + UINT32 reserved : 12; +}; + + +interface IDWriteTextAnalysisSource1; +interface IDWriteTextAnalysisSink1; +interface IDWriteRenderingParams1; + +/// +/// The root factory interface for all DWrite objects. +/// +interface DWRITE_DECLARE_INTERFACE("30572f99-dac6-41db-a16e-0486307e606a") IDWriteFactory1 : public IDWriteFactory +{ + /// + /// Gets a font collection representing the set of end-user defined + /// custom fonts. + /// + /// Receives a pointer to the EUDC font + /// collection object, or NULL in case of failure. + /// If this parameter is nonzero, the + /// function performs an immediate check for changes to the set of + /// EUDC fonts. If this parameter is FALSE, the function will still + /// detect changes, but there may be some latency. For example, an + /// application might specify TRUE if it has itself just modified a + /// font and wants to be sure the font collection contains that font. + /// + /// + /// Standard HRESULT error code. Note that if no EUDC is set on the system, + /// the returned collection will be empty, meaning it will return success + /// but GetFontFamilyCount will be zero. + /// + /// + /// Querying via IDWriteFontCollection::FindFamilyName for a specific + /// family (like MS Gothic) will return the matching family-specific EUDC + /// font if one exists. Querying for "" will return the global EUDC font. + /// For example, if you were matching an EUDC character within a run of + /// the base font PMingLiu, you would retrieve the corresponding EUDC font + /// face using GetEudcFontCollection, then FindFamilyName with "PMingLiu", + /// followed by GetFontFamily and CreateFontFace. + /// + /// Be aware that eudcedit.exe can create placeholder empty glyphs that + /// have zero advance width and no glyph outline. Although they are present + /// in the font (HasCharacter returns true), you are best to ignore + /// these and continue on with font fallback in your layout if the metrics + /// for the glyph are zero. + /// + STDMETHOD(GetEudcFontCollection)( + _COM_Outptr_ IDWriteFontCollection** fontCollection, + BOOL checkForUpdates = FALSE + ) PURE; + + /// + /// Creates a rendering parameters object with the specified properties. + /// + /// The gamma value used for gamma correction, which must be greater than zero and cannot exceed 256. + /// The amount of contrast enhancement, zero or greater. + /// The amount of contrast enhancement to use for grayscale antialiasing, zero or greater. + /// The degree of ClearType level, from 0.0f (no ClearType) to 1.0f (full ClearType). + /// The geometry of a device pixel. + /// Method of rendering glyphs. In most cases, this should be DWRITE_RENDERING_MODE_DEFAULT to automatically use an appropriate mode. + /// Holds the newly created rendering parameters object, or NULL in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateCustomRenderingParams)( + FLOAT gamma, + FLOAT enhancedContrast, + FLOAT enhancedContrastGrayscale, + FLOAT clearTypeLevel, + DWRITE_PIXEL_GEOMETRY pixelGeometry, + DWRITE_RENDERING_MODE renderingMode, + _COM_Outptr_ IDWriteRenderingParams1** renderingParams + ) PURE; + + using IDWriteFactory::CreateCustomRenderingParams; +}; + + +/// +/// The interface that represents an absolute reference to a font face. +/// It contains font face type, appropriate file references and face identification data. +/// Various font data such as metrics, names and glyph outlines is obtained from IDWriteFontFace. +/// +interface DWRITE_DECLARE_INTERFACE("a71efdb4-9fdb-4838-ad90-cfc3be8c3daf") IDWriteFontFace1 : public IDWriteFontFace +{ + /// + /// Gets common metrics for the font in design units. + /// These metrics are applicable to all the glyphs within a font, + /// and are used by applications for layout calculations. + /// + /// Metrics structure to fill in. + STDMETHOD_(void, GetMetrics)( + _Out_ DWRITE_FONT_METRICS1* fontMetrics + ) PURE; + + /// + /// Gets common metrics for the font in design units. + /// These metrics are applicable to all the glyphs within a font, + /// and are used by applications for layout calculations. + /// + /// Logical size of the font in DIP units. A DIP + /// ("device-independent pixel") equals 1/96 inch. + /// Number of physical pixels per DIP. For + /// example, if the DPI of the rendering surface is 96 this value is + /// 1.0f. If the DPI is 120, this value is 120.0f/96. + /// Optional transform applied to the glyphs and + /// their positions. This transform is applied after the scaling + /// specified by the font size and pixelsPerDip. + /// Font metrics structure to fill in. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetGdiCompatibleMetrics)( + FLOAT emSize, + FLOAT pixelsPerDip, + _In_opt_ DWRITE_MATRIX const* transform, + _Out_ DWRITE_FONT_METRICS1* fontMetrics + ) PURE; + + /// + /// Gets caret metrics for the font in design units. These are used by + /// text editors for drawing the correct caret placement/slant. + /// + /// Metrics structure to fill in. + STDMETHOD_(void, GetCaretMetrics)( + _Out_ DWRITE_CARET_METRICS* caretMetrics + ) PURE; + + /// + /// Returns the list of character ranges supported by the font, which is + /// useful for scenarios like character picking, glyph display, and + /// efficient font selection lookup. This is similar to GDI's + /// GetFontUnicodeRanges, except that it returns the full Unicode range, + /// not just 16-bit UCS-2. + /// + /// Maximum number of character ranges passed + /// in from the client. + /// Array of character ranges. + /// Actual number of character ranges, + /// regardless of the maximum count. + /// + /// These ranges are from the cmap, not the OS/2::ulCodePageRange1. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetUnicodeRanges)( + UINT32 maxRangeCount, + _Out_writes_to_opt_(maxRangeCount, *actualRangeCount) DWRITE_UNICODE_RANGE* unicodeRanges, + _Out_ UINT32* actualRangeCount + ) PURE; + + /// + /// Returns true if the font is monospaced, meaning its characters are the + /// same fixed-pitch width (non-proportional). + /// + STDMETHOD_(BOOL, IsMonospacedFont)() PURE; + + /// + /// Returns the advances in design units for a sequences of glyphs. + /// + /// Number of glyphs to retrieve advances for. + /// Array of glyph id's to retrieve advances for. + /// Returned advances in font design units for + /// each glyph. + /// Retrieve the glyph's vertical advance height + /// rather than horizontal advance widths. + /// + /// This is equivalent to calling GetGlyphMetrics and using only the + /// advance width/height. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetDesignGlyphAdvances)( + UINT32 glyphCount, + _In_reads_(glyphCount) UINT16 const* glyphIndices, + _Out_writes_(glyphCount) INT32* glyphAdvances, + BOOL isSideways = FALSE + ) PURE; + + /// + /// Returns the pixel-aligned advances for a sequences of glyphs, the same + /// as GetGdiCompatibleGlyphMetrics would return. + /// + /// Logical size of the font in DIP units. A DIP + /// ("device-independent pixel") equals 1/96 inch. + /// Number of physical pixels per DIP. For + /// example, if the DPI of the rendering surface is 96 this value is + /// 1.0f. If the DPI is 120, this value is 120.0f/96. + /// Optional transform applied to the glyphs and + /// their positions. This transform is applied after the scaling + /// specified by the font size and pixelsPerDip. + /// When FALSE, the metrics are the same as + /// GDI aliased text (DWRITE_MEASURING_MODE_GDI_CLASSIC). When TRUE, + /// the metrics are the same as those measured by GDI using a font + /// using CLEARTYPE_NATURAL_QUALITY (DWRITE_MEASURING_MODE_GDI_NATURAL). + /// Retrieve the glyph's vertical advances rather + /// than horizontal advances. + /// Total glyphs to retrieve adjustments for. + /// Array of glyph id's to retrieve advances. + /// Returned advances in font design units for + /// each glyph. + /// + /// This is equivalent to calling GetGdiCompatibleGlyphMetrics and using only + /// the advance width/height. Like GetGdiCompatibleGlyphMetrics, these are in + /// design units, meaning they must be scaled down by + /// DWRITE_FONT_METRICS::designUnitsPerEm. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetGdiCompatibleGlyphAdvances)( + FLOAT emSize, + FLOAT pixelsPerDip, + _In_opt_ DWRITE_MATRIX const* transform, + BOOL useGdiNatural, + BOOL isSideways, + UINT32 glyphCount, + _In_reads_(glyphCount) UINT16 const* glyphIndices, + _Out_writes_(glyphCount) INT32* glyphAdvances + ) PURE; + + /// + /// Retrieves the kerning pair adjustments from the font's kern table. + /// + /// Number of glyphs to retrieve adjustments for. + /// Array of glyph id's to retrieve adjustments + /// for. + /// Returned advances in font design units for + /// each glyph. The last glyph adjustment is zero. + /// + /// This is not a direct replacement for GDI's character based + /// GetKerningPairs, but it serves the same role, without the client + /// needing to cache them locally. It also uses glyph id's directly + /// rather than UCS-2 characters (how the kern table actually stores + /// them) which avoids glyph collapse and ambiguity, such as the dash + /// and hyphen, or space and non-breaking space. + /// + /// + /// Newer fonts may have only GPOS kerning instead of the legacy pair + /// table kerning. Such fonts, like Gabriola, will only return 0's for + /// adjustments. This function does not virtualize and flatten these + /// GPOS entries into kerning pairs. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetKerningPairAdjustments)( + UINT32 glyphCount, + _In_reads_(glyphCount) UINT16 const* glyphIndices, + _Out_writes_(glyphCount) INT32* glyphAdvanceAdjustments + ) PURE; + + /// + /// Returns whether or not the font supports pair-kerning. + /// + /// + /// If the font does not support pair table kerning, there is no need to + /// call GetKerningPairAdjustments (it would be all zeroes). + /// + /// + /// Whether the font supports kerning pairs. + /// + STDMETHOD_(BOOL, HasKerningPairs)() PURE; + + /// + /// Determines the recommended text rendering mode to be used based on the + /// font, size, world transform, and measuring mode. + /// + /// Logical font size in DIPs. + /// Number of pixels per logical inch in the horizontal direction. + /// Number of pixels per logical inch in the vertical direction. + /// Specifies the world transform. + /// Specifies the quality of the graphics system's outline rendering, + /// affects the size threshold above which outline rendering is used. + /// Specifies the method used to measure during text layout. For proper + /// glyph spacing, the function returns a rendering mode that is compatible with the specified + /// measuring mode. + /// Receives the recommended rendering mode. + /// + /// This method should be used to determine the actual rendering mode in cases where the rendering + /// mode of the rendering params object is DWRITE_RENDERING_MODE_DEFAULT. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetRecommendedRenderingMode)( + FLOAT fontEmSize, + FLOAT dpiX, + FLOAT dpiY, + _In_opt_ DWRITE_MATRIX const* transform, + BOOL isSideways, + DWRITE_OUTLINE_THRESHOLD outlineThreshold, + DWRITE_MEASURING_MODE measuringMode, + _Out_ DWRITE_RENDERING_MODE* renderingMode + ) PURE; + + /// + /// Retrieves the vertical forms of the nominal glyphs retrieved from + /// GetGlyphIndices, using the font's 'vert' table. This is used in + /// CJK vertical layout so the correct characters are shown. + /// + /// Number of glyphs to retrieve. + /// Original glyph indices from cmap. + /// The vertical form of glyph indices. + /// + /// Call GetGlyphIndices to get the nominal glyph indices, followed by + /// calling this to remap the to the substituted forms, when the run + /// is sideways, and the font has vertical glyph variants. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetVerticalGlyphVariants)( + UINT32 glyphCount, + _In_reads_(glyphCount) UINT16 const* nominalGlyphIndices, + _Out_writes_(glyphCount) UINT16* verticalGlyphIndices + ) PURE; + + /// + /// Returns whether or not the font has any vertical glyph variants. + /// + /// + /// For OpenType fonts, this will return true if the font contains a 'vert' + /// feature. + /// + /// + /// True if the font contains vertical glyph variants. + /// + STDMETHOD_(BOOL, HasVerticalGlyphVariants)() PURE; + + using IDWriteFontFace::GetMetrics; + using IDWriteFontFace::GetGdiCompatibleMetrics; + using IDWriteFontFace::GetRecommendedRenderingMode; +}; + + +/// +/// The IDWriteFont interface represents a physical font in a font collection. +/// +interface DWRITE_DECLARE_INTERFACE("acd16696-8c14-4f5d-877e-fe3fc1d32738") IDWriteFont1 : public IDWriteFont +{ + /// + /// Gets common metrics for the font in design units. + /// These metrics are applicable to all the glyphs within a font, + /// and are used by applications for layout calculations. + /// + /// Metrics structure to fill in. + STDMETHOD_(void, GetMetrics)( + _Out_ DWRITE_FONT_METRICS1* fontMetrics + ) PURE; + + using IDWriteFont::GetMetrics; + + /// + /// Gets the PANOSE values from the font, used for font selection and + /// matching. + /// + /// PANOSE structure to fill in. + /// + /// The function does not simulate these, such as substituting a weight or + /// proportion inferred on other values. If the font does not specify them, + /// they are all set to 'any' (0). + /// + STDMETHOD_(void, GetPanose)( + _Out_ DWRITE_PANOSE* panose + ) PURE; + + /// + /// Returns the list of character ranges supported by the font, which is + /// useful for scenarios like character picking, glyph display, and + /// efficient font selection lookup. This is similar to GDI's + /// GetFontUnicodeRanges, except that it returns the full Unicode range, + /// not just 16-bit UCS-2. + /// + /// Maximum number of character ranges passed + /// in from the client. + /// Array of character ranges. + /// Actual number of character ranges, + /// regardless of the maximum count. + /// + /// These ranges are from the cmap, not the OS/2::ulCodePageRange1. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetUnicodeRanges)( + UINT32 maxRangeCount, + _Out_writes_to_opt_(maxRangeCount, *actualRangeCount) DWRITE_UNICODE_RANGE* unicodeRanges, + _Out_ UINT32* actualRangeCount + ) PURE; + + /// + /// Returns true if the font is monospaced, meaning its characters are the + /// same fixed-pitch width (non-proportional). + /// + STDMETHOD_(BOOL, IsMonospacedFont)() PURE; +}; + +/// +/// The interface that represents text rendering settings for glyph rasterization and filtering. +/// +interface DWRITE_DECLARE_INTERFACE("94413cf4-a6fc-4248-8b50-6674348fcad3") IDWriteRenderingParams1 : public IDWriteRenderingParams +{ + /// + /// Gets the amount of contrast enhancement to use for grayscale antialiasing. + /// Valid values are greater than or equal to zero. + /// + STDMETHOD_(FLOAT, GetGrayscaleEnhancedContrast)() PURE; +}; + +/// +/// Analyzes various text properties for complex script processing. +/// +interface DWRITE_DECLARE_INTERFACE("80DAD800-E21F-4E83-96CE-BFCCE500DB7C") IDWriteTextAnalyzer1 : public IDWriteTextAnalyzer +{ + /// + /// Applies spacing between characters, properly adjusting glyph clusters + /// and diacritics. + /// + /// The spacing before each character, in reading order. + /// The spacing after each character, in reading order. + /// The minimum advance of each character, + /// to prevent characters from becoming too thin or zero-width. This + /// must be zero or greater. + /// The length of the clustermap and original text. + /// The number of glyphs. + /// Mapping from character ranges to glyph ranges. + /// The advance width of each glyph. + /// The offset of the origin of each glyph. + /// Properties of each glyph, from GetGlyphs. + /// The new advance width of each glyph. + /// The new offset of the origin of each glyph. + /// + /// The input and output advances/offsets are allowed to alias the same array. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(ApplyCharacterSpacing)( + FLOAT leadingSpacing, + FLOAT trailingSpacing, + FLOAT minimumAdvanceWidth, + UINT32 textLength, + UINT32 glyphCount, + _In_reads_(textLength) UINT16 const* clusterMap, + _In_reads_(glyphCount) FLOAT const* glyphAdvances, + _In_reads_(glyphCount) DWRITE_GLYPH_OFFSET const* glyphOffsets, + _In_reads_(glyphCount) DWRITE_SHAPING_GLYPH_PROPERTIES const* glyphProperties, + _Out_writes_(glyphCount) FLOAT* modifiedGlyphAdvances, + _Out_writes_(glyphCount) DWRITE_GLYPH_OFFSET* modifiedGlyphOffsets + ) PURE; + + /// + /// Retrieves the given baseline from the font. + /// + /// The font face to read. + /// The baseline of interest. + /// Whether the baseline is vertical or horizontal. + /// Simulate the baseline if it is missing in the font. + /// Script analysis result from AnalyzeScript. + /// The language of the run. + /// The baseline coordinate value in design units. + /// Whether the returned baseline exists in the font. + /// + /// If the baseline does not exist in the font, it is not considered an + /// error, but the function will return exists = false. You may then use + /// heuristics to calculate the missing base, or, if the flag + /// simulationAllowed is true, the function will compute a reasonable + /// approximation for you. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetBaseline)( + _In_ IDWriteFontFace* fontFace, + DWRITE_BASELINE baseline, + BOOL isVertical, + BOOL isSimulationAllowed, + DWRITE_SCRIPT_ANALYSIS scriptAnalysis, + _In_opt_z_ WCHAR const* localeName, + _Out_ INT32* baselineCoordinate, + _Out_ BOOL* exists + ) PURE; + + /// + /// Analyzes a text range for script orientation, reading text and + /// attributes from the source and reporting results to the sink. + /// + /// Source object to analyze. + /// Starting position within the source object. + /// Length to analyze. + /// Callback object. + /// + /// Standard HRESULT error code. + /// + /// + /// All bidi analysis should be resolved before calling this. + /// + STDMETHOD(AnalyzeVerticalGlyphOrientation)( + _In_ IDWriteTextAnalysisSource1* analysisSource, + UINT32 textPosition, + UINT32 textLength, + _In_ IDWriteTextAnalysisSink1* analysisSink + ) PURE; + + /// + /// Returns 2x3 transform matrix for the respective angle to draw the + /// glyph run. + /// + /// The angle reported into + /// SetGlyphOrientation. + /// Whether the run's glyphs are sideways or not. + /// Returned transform. + /// + /// + /// Standard HRESULT error code. + /// + /// + /// The returned displacement is zero. + /// + STDMETHOD(GetGlyphOrientationTransform)( + DWRITE_GLYPH_ORIENTATION_ANGLE glyphOrientationAngle, + BOOL isSideways, + _Out_ DWRITE_MATRIX* transform + ) PURE; + + /// + /// Returns the properties for a given script. + /// + /// The script for a run of text returned + /// from IDWriteTextAnalyzer::AnalyzeScript. + /// Information for the script. + /// + /// Returns properties for the given script. If the script is invalid, + /// it returns generic properties for the unknown script and E_INVALIDARG. + /// + STDMETHOD(GetScriptProperties)( + DWRITE_SCRIPT_ANALYSIS scriptAnalysis, + _Out_ DWRITE_SCRIPT_PROPERTIES* scriptProperties + ) PURE; + + /// + /// Determines the complexity of text, and whether or not full script + /// shaping needs to be called (GetGlyphs). + /// + /// The font face to read. + /// Length of the text to check. + /// The text to check for complexity. This string + /// may be UTF-16, but any supplementary characters will be considered + /// complex. + /// If true, the text is simple, and the + /// glyphIndices array will already have the nominal glyphs for you. + /// Otherwise you need to call GetGlyphs to properly shape complex + /// scripts and OpenType features. + /// + /// The length read of the text run with the + /// same complexity, simple or complex. You may call again from that + /// point onward. + /// Optional glyph indices for the text. If the + /// function returned that the text was simple, you already have the + /// glyphs you need. Otherwise the glyph indices are not meaningful, + /// and you should call shaping instead. + /// + /// Text is not simple if the characters are part of a script that has + /// complex shaping requirements, require bidi analysis, combine with + /// other characters, reside in the supplementary planes, or have glyphs + /// which participate in standard OpenType features. The length returned + /// will not split combining marks from their base characters. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetTextComplexity)( + _In_reads_(textLength) WCHAR const* textString, + UINT32 textLength, + _In_ IDWriteFontFace* fontFace, + _Out_ BOOL* isTextSimple, + _Out_range_(0, textLength) UINT32* textLengthRead, + _Out_writes_to_opt_(textLength, *textLengthRead) UINT16* glyphIndices + ) PURE; + + /// + /// Retrieves justification opportunity information for each of the glyphs + /// given the text and shaping glyph properties. + /// + /// Font face that was used for shaping. This is + /// mainly important for returning correct results of the kashida + /// width. + /// Font em size used for the glyph run. + /// Script of the text from the itemizer. + /// Length of the text. + /// Number of glyphs. + /// Characters used to produce the glyphs. + /// Clustermap produced from shaping. + /// Glyph properties produced from shaping. + /// Receives information for the + /// allowed justification expansion/compression for each glyph. + /// + /// This function is called per-run, after shaping is done via GetGlyphs(). + /// Note this function only supports natural metrics (DWRITE_MEASURING_MODE_NATURAL). + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetJustificationOpportunities)( + _In_opt_ IDWriteFontFace* fontFace, + FLOAT fontEmSize, + DWRITE_SCRIPT_ANALYSIS scriptAnalysis, + UINT32 textLength, + UINT32 glyphCount, + _In_reads_(textLength) WCHAR const* textString, + _In_reads_(textLength) UINT16 const* clusterMap, + _In_reads_(glyphCount) DWRITE_SHAPING_GLYPH_PROPERTIES const* glyphProperties, + _Out_writes_(glyphCount) DWRITE_JUSTIFICATION_OPPORTUNITY* justificationOpportunities + ) PURE; + + /// + /// Justifies an array of glyph advances to fit the line width. + /// + /// Width of the line. + /// Number of glyphs. + /// Opportunities per glyph. Call + /// GetJustificationOpportunities() to get suitable opportunities + /// according to script. + /// Original glyph advances from shaping. + /// Original glyph offsets from shaping. + /// Justified glyph advances. + /// Justified glyph offsets. + /// + /// This is called after all the opportunities have been collected, and it + /// spans across the entire line. The input and output arrays are allowed + /// to alias each other, permitting in-place update. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(JustifyGlyphAdvances)( + FLOAT lineWidth, + UINT32 glyphCount, + _In_reads_(glyphCount) DWRITE_JUSTIFICATION_OPPORTUNITY const* justificationOpportunities, + _In_reads_(glyphCount) FLOAT const* glyphAdvances, + _In_reads_(glyphCount) DWRITE_GLYPH_OFFSET const* glyphOffsets, + _Out_writes_(glyphCount) FLOAT* justifiedGlyphAdvances, + _Out_writes_opt_(glyphCount) DWRITE_GLYPH_OFFSET* justifiedGlyphOffsets + ) PURE; + + /// + /// Fills in new glyphs for complex scripts where justification increased + /// the advances of glyphs, such as Arabic with kashida. + /// + /// Font face used for shaping. + /// Font em size used for the glyph run. + /// Script of the text from the itemizer. + /// Length of the text. + /// Number of glyphs. + /// Maximum number of output glyphs allocated + /// by caller. + /// Clustermap produced from shaping. + /// Original glyphs produced from shaping. + /// Original glyph advances produced from shaping. + /// Justified glyph advances from + /// JustifyGlyphAdvances(). + /// Justified glyph offsets from + /// JustifyGlyphAdvances(). + /// Properties of each glyph, from GetGlyphs. + /// The new glyph count written to the + /// modified arrays, or the needed glyph count if the size is not + /// large enough. + /// Updated clustermap. + /// Updated glyphs with new glyphs + /// inserted where needed. + /// Updated glyph advances. + /// Updated glyph offsets. + /// + /// This is called after the line has been justified, and it is per-run. + /// It only needs to be called if the script has a specific justification + /// character via GetScriptProperties, and it is mainly for cursive scripts + /// like Arabic. If maxGlyphCount is not large enough, the error + /// E_NOT_SUFFICIENT_BUFFER will be returned, with actualGlyphCount holding + /// the final/needed glyph count. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetJustifiedGlyphs)( + _In_opt_ IDWriteFontFace* fontFace, + FLOAT fontEmSize, + DWRITE_SCRIPT_ANALYSIS scriptAnalysis, + UINT32 textLength, + UINT32 glyphCount, + UINT32 maxGlyphCount, + _In_reads_opt_(textLength) UINT16 const* clusterMap, + _In_reads_(glyphCount) UINT16 const* glyphIndices, + _In_reads_(glyphCount) FLOAT const* glyphAdvances, + _In_reads_(glyphCount) FLOAT const* justifiedGlyphAdvances, + _In_reads_(glyphCount) DWRITE_GLYPH_OFFSET const* justifiedGlyphOffsets, + _In_reads_(glyphCount) DWRITE_SHAPING_GLYPH_PROPERTIES const* glyphProperties, + _Out_range_(glyphCount, maxGlyphCount) UINT32* actualGlyphCount, + _Out_writes_opt_(textLength) UINT16* modifiedClusterMap, + _Out_writes_to_(maxGlyphCount, *actualGlyphCount) UINT16* modifiedGlyphIndices, + _Out_writes_to_(maxGlyphCount, *actualGlyphCount) FLOAT* modifiedGlyphAdvances, + _Out_writes_to_(maxGlyphCount, *actualGlyphCount) DWRITE_GLYPH_OFFSET* modifiedGlyphOffsets + ) PURE; +}; + + +/// +/// The interface implemented by the client to provide needed information to +/// the text analyzer, such as the text and associated text properties. +/// If any of these callbacks returns an error, the analysis functions will +/// stop prematurely and return a callback error. +/// +interface DWRITE_DECLARE_INTERFACE("639CFAD8-0FB4-4B21-A58A-067920120009") IDWriteTextAnalysisSource1 : public IDWriteTextAnalysisSource +{ + /// + /// The text analyzer calls back to this to get the desired glyph + /// orientation and resolved bidi level, which it uses along with the + /// script properties of the text to determine the actual orientation of + /// each character, which it reports back to the client via the sink + /// SetGlyphOrientation method. + /// + /// First position of the piece to obtain. All + /// positions are in UTF-16 code-units, not whole characters, which + /// matters when supplementary characters are used. + /// Number of UTF-16 units of the retrieved chunk. + /// The returned length is not the length of the block, but the length + /// remaining in the block, from the given position until its end. + /// So querying for a position that is 75 positions into a 100 + /// postition block would return 25. + /// The type of glyph orientation the + /// client wants for this range, up to the returned text length. + /// The bidi level for this range up to + /// the returned text length, which comes from an earlier + /// bidirectional analysis. + /// + /// Standard HRESULT error code. Returning an error will abort the + /// analysis. + /// + STDMETHOD(GetVerticalGlyphOrientation)( + UINT32 textPosition, + _Out_ UINT32* textLength, + _Out_ DWRITE_VERTICAL_GLYPH_ORIENTATION* glyphOrientation, + _Out_ UINT8* bidiLevel + ) PURE; +}; + + +/// +/// The interface implemented by the client to receive the +/// output of the text analyzers. +/// +interface DWRITE_DECLARE_INTERFACE("B0D941A0-85E7-4D8B-9FD3-5CED9934482A") IDWriteTextAnalysisSink1 : public IDWriteTextAnalysisSink +{ + /// + /// The text analyzer calls back to this to report the actual orientation + /// of each character for shaping and drawing. + /// + /// Starting position to report from. + /// Number of UTF-16 units of the reported range. + /// Angle of the glyphs within the text + /// range (pass to GetGlyphOrientationTransform to get the world + /// relative transform). + /// The adjusted bidi level to be used by + /// the client layout for reordering runs. This will differ from the + /// resolved bidi level retrieved from the source for cases such as + /// Arabic stacked top-to-bottom, where the glyphs are still shaped + /// as RTL, but the runs are TTB along with any CJK or Latin. + /// Whether the glyphs are rotated on their side, + /// which is the default case for CJK and the case stacked Latin + /// Whether the script should be shaped as + /// right-to-left. For Arabic stacked top-to-bottom, even when the + /// adjusted bidi level is coerced to an even level, this will still + /// be true. + /// + /// A successful code or error code to abort analysis. + /// + STDMETHOD(SetGlyphOrientation)( + UINT32 textPosition, + UINT32 textLength, + DWRITE_GLYPH_ORIENTATION_ANGLE glyphOrientationAngle, + UINT8 adjustedBidiLevel, + BOOL isSideways, + BOOL isRightToLeft + ) PURE; +}; + + +/// +/// The IDWriteTextLayout1 interface represents a block of text after it has +/// been fully analyzed and formatted. +/// +/// All coordinates are in device independent pixels (DIPs). +/// +interface DWRITE_DECLARE_INTERFACE("9064D822-80A7-465C-A986-DF65F78B8FEB") IDWriteTextLayout1 : public IDWriteTextLayout +{ + /// + /// Enables/disables pair-kerning on the given range. + /// + /// The Boolean flag indicates whether text is pair-kerned. + /// Text range to which this change applies. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetPairKerning)( + BOOL isPairKerningEnabled, + DWRITE_TEXT_RANGE textRange + ) PURE; + + /// + /// Get whether or not pair-kerning is enabled at given position. + /// + /// The current text position. + /// The Boolean flag indicates whether text is pair-kerned. + /// The position range of the current format. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetPairKerning)( + UINT32 currentPosition, + _Out_ BOOL* isPairKerningEnabled, + _Out_opt_ DWRITE_TEXT_RANGE* textRange = NULL + ) PURE; + + /// + /// Sets the spacing between characters. + /// + /// The spacing before each character, in reading order. + /// The spacing after each character, in reading order. + /// The minimum advance of each character, + /// to prevent characters from becoming too thin or zero-width. This + /// must be zero or greater. + /// Text range to which this change applies. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetCharacterSpacing)( + FLOAT leadingSpacing, + FLOAT trailingSpacing, + FLOAT minimumAdvanceWidth, + DWRITE_TEXT_RANGE textRange + ) PURE; + + /// + /// Gets the spacing between characters. + /// + /// The current text position. + /// The spacing before each character, in reading order. + /// The spacing after each character, in reading order. + /// The minimum advance of each character, + /// to prevent characters from becoming too thin or zero-width. This + /// must be zero or greater. + /// The position range of the current format. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetCharacterSpacing)( + UINT32 currentPosition, + _Out_ FLOAT* leadingSpacing, + _Out_ FLOAT* trailingSpacing, + _Out_ FLOAT* minimumAdvanceWidth, + _Out_opt_ DWRITE_TEXT_RANGE* textRange = NULL + ) PURE; +}; + +/// +/// Represents the type of antialiasing to use for text when the rendering mode calls for +/// antialiasing. +/// +enum DWRITE_TEXT_ANTIALIAS_MODE +{ + /// + /// ClearType antialiasing computes coverage independently for the red, green, and blue + /// color elements of each pixel. This allows for more detail than conventional antialiasing. + /// However, because there is no one alpha value for each pixel, ClearType is not suitable + /// rendering text onto a transparent intermediate bitmap. + /// + DWRITE_TEXT_ANTIALIAS_MODE_CLEARTYPE, + + /// + /// Grayscale antialiasing computes one coverage value for each pixel. Because the alpha + /// value of each pixel is well-defined, text can be rendered onto a transparent bitmap, + /// which can then be composited with other content. Note that grayscale rendering with + /// IDWriteBitmapRenderTarget1 uses premultiplied alpha. + /// + DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE +}; + +/// +/// Encapsulates a 32-bit device independent bitmap and device context, which can be used for rendering glyphs. +/// +interface DWRITE_DECLARE_INTERFACE("791e8298-3ef3-4230-9880-c9bdecc42064") IDWriteBitmapRenderTarget1 : public IDWriteBitmapRenderTarget +{ + /// + /// Gets the current text antialiasing mode of the bitmap render target. + /// + /// + /// Returns the antialiasing mode. + /// + STDMETHOD_(DWRITE_TEXT_ANTIALIAS_MODE, GetTextAntialiasMode)() PURE; + + /// + /// Sets the current text antialiasing mode of the bitmap render target. + /// + /// + /// Returns S_OK if successful, or E_INVALIDARG if the argument is not valid. + /// + /// + /// The antialiasing mode of a newly-created bitmap render target defaults to + /// DWRITE_TEXT_ANTIALIAS_MODE_CLEARTYPE. An application can change the antialiasing + /// mode by calling SetTextAntialiasMode. For example, an application might specify + /// grayscale antialiasing when rendering text onto a transparent bitmap. + /// + STDMETHOD(SetTextAntialiasMode)( + DWRITE_TEXT_ANTIALIAS_MODE antialiasMode + ) PURE; +}; + +#endif /* DWRITE_1_H_INCLUDED */ diff --git a/gfx/include/dxsdk/dwrite_2.h b/gfx/include/dxsdk/dwrite_2.h new file mode 100644 index 0000000000..10a5dd4d57 --- /dev/null +++ b/gfx/include/dxsdk/dwrite_2.h @@ -0,0 +1,975 @@ +//+-------------------------------------------------------------------------- +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Abstract: +// DirectX Typography Services public API definitions. +// +//---------------------------------------------------------------------------- + +#ifndef DWRITE_2_H_INCLUDED +#define DWRITE_2_H_INCLUDED + +#pragma once + +#include + + +interface IDWriteFontFallback; + + +/// +/// How to align glyphs to the margin. +/// +enum DWRITE_OPTICAL_ALIGNMENT +{ + /// + /// Align to the default metrics of the glyph. + /// + DWRITE_OPTICAL_ALIGNMENT_NONE, + + /// + /// Align glyphs to the margins. Without this, some small whitespace + /// may be present between the text and the margin from the glyph's side + /// bearing values. Note that glyphs may still overhang outside the + /// margin, such as flourishes or italic slants. + /// + DWRITE_OPTICAL_ALIGNMENT_NO_SIDE_BEARINGS, +}; + + +/// +/// Whether to enable grid-fitting of glyph outlines (a.k.a. hinting). +/// +enum DWRITE_GRID_FIT_MODE +{ + /// + /// Choose grid fitting base on the font's gasp table information. + /// + DWRITE_GRID_FIT_MODE_DEFAULT, + + /// + /// Always disable grid fitting, using the ideal glyph outlines. + /// + DWRITE_GRID_FIT_MODE_DISABLED, + + /// + /// Enable grid fitting, adjusting glyph outlines for device pixel display. + /// + DWRITE_GRID_FIT_MODE_ENABLED +}; + + +/// +/// Overall metrics associated with text after layout. +/// All coordinates are in device independent pixels (DIPs). +/// +struct DWRITE_TEXT_METRICS1 : DWRITE_TEXT_METRICS +{ + /// + /// The height of the formatted text taking into account the + /// trailing whitespace at the end of each line, which will + /// matter for vertical reading directions. + /// + FLOAT heightIncludingTrailingWhitespace; +}; + + +/// +/// The text renderer interface represents a set of application-defined +/// callbacks that perform rendering of text, inline objects, and decorations +/// such as underlines. +/// +interface DWRITE_DECLARE_INTERFACE("D3E0E934-22A0-427E-AAE4-7D9574B59DB1") IDWriteTextRenderer1 : public IDWriteTextRenderer +{ + /// + /// IDWriteTextLayout::Draw calls this function to instruct the client to + /// render a run of glyphs. + /// + /// The context passed to + /// IDWriteTextLayout::Draw. + /// X-coordinate of the baseline. + /// Y-coordinate of the baseline. + /// Orientation of the glyph run. + /// Specifies measuring method for glyphs in + /// the run. Renderer implementations may choose different rendering + /// modes for given measuring methods, but best results are seen when + /// the rendering mode matches the corresponding measuring mode: + /// DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL for DWRITE_MEASURING_MODE_NATURAL + /// DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC for DWRITE_MEASURING_MODE_GDI_CLASSIC + /// DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL for DWRITE_MEASURING_MODE_GDI_NATURAL + /// + /// The glyph run to draw. + /// Properties of the characters + /// associated with this run. + /// The drawing effect set in + /// IDWriteTextLayout::SetDrawingEffect. + /// + /// Standard HRESULT error code. + /// + /// + /// If a non-identity orientation is passed, the glyph run should be + /// rotated around the given baseline x and y coordinates. The function + /// IDWriteAnalyzer2::GetGlyphOrientationTransform will return the + /// necessary transform for you, which can be combined with any existing + /// world transform on the drawing context. + /// + STDMETHOD(DrawGlyphRun)( + _In_opt_ void* clientDrawingContext, + FLOAT baselineOriginX, + FLOAT baselineOriginY, + DWRITE_GLYPH_ORIENTATION_ANGLE orientationAngle, + DWRITE_MEASURING_MODE measuringMode, + _In_ DWRITE_GLYPH_RUN const* glyphRun, + _In_ DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription, + _In_opt_ IUnknown* clientDrawingEffect + ) PURE; + + /// + /// IDWriteTextLayout::Draw calls this function to instruct the client to draw + /// an underline. + /// + /// The context passed to + /// IDWriteTextLayout::Draw. + /// X-coordinate of the baseline. + /// Y-coordinate of the baseline. + /// Orientation of the underline. + /// Underline logical information. + /// The drawing effect set in + /// IDWriteTextLayout::SetDrawingEffect. + /// + /// Standard HRESULT error code. + /// + /// + /// A single underline can be broken into multiple calls, depending on + /// how the formatting changes attributes. If font sizes/styles change + /// within an underline, the thickness and offset will be averaged + /// weighted according to characters. + /// + /// To get the correct top coordinate of the underline rect, add + /// underline::offset to the baseline's Y. Otherwise the underline will + /// be immediately under the text. The x coordinate will always be passed + /// as the left side, regardless of text directionality. This simplifies + /// drawing and reduces the problem of round-off that could potentially + /// cause gaps or a double stamped alpha blend. To avoid alpha overlap, + /// round the end points to the nearest device pixel. + /// + STDMETHOD(DrawUnderline)( + _In_opt_ void* clientDrawingContext, + FLOAT baselineOriginX, + FLOAT baselineOriginY, + DWRITE_GLYPH_ORIENTATION_ANGLE orientationAngle, + _In_ DWRITE_UNDERLINE const* underline, + _In_opt_ IUnknown* clientDrawingEffect + ) PURE; + + /// + /// IDWriteTextLayout::Draw calls this function to instruct the client to draw + /// a strikethrough. + /// + /// The context passed to + /// IDWriteTextLayout::Draw. + /// X-coordinate of the baseline. + /// Y-coordinate of the baseline. + /// Orientation of the strikethrough. + /// Strikethrough logical information. + /// The drawing effect set in + /// IDWriteTextLayout::SetDrawingEffect. + /// + /// Standard HRESULT error code. + /// + /// + /// A single strikethrough can be broken into multiple calls, depending on + /// how the formatting changes attributes. Strikethrough is not averaged + /// across font sizes/styles changes. + /// To get the correct top coordinate of the strikethrough rect, + /// add strikethrough::offset to the baseline's Y. + /// Like underlines, the x coordinate will always be passed as the left side, + /// regardless of text directionality. + /// + STDMETHOD(DrawStrikethrough)( + _In_opt_ void* clientDrawingContext, + FLOAT baselineOriginX, + FLOAT baselineOriginY, + DWRITE_GLYPH_ORIENTATION_ANGLE orientationAngle, + _In_ DWRITE_STRIKETHROUGH const* strikethrough, + _In_opt_ IUnknown* clientDrawingEffect + ) PURE; + + /// + /// IDWriteTextLayout::Draw calls this application callback when it needs to + /// draw an inline object. + /// + /// The context passed to + /// IDWriteTextLayout::Draw. + /// X-coordinate at the top-left corner of the + /// inline object. + /// Y-coordinate at the top-left corner of the + /// inline object. + /// Orientation of the inline object. + /// The object set using IDWriteTextLayout::SetInlineObject. + /// The object should be drawn on its side. + /// The object is in an right-to-left context + /// and should be drawn flipped. + /// The drawing effect set in + /// IDWriteTextLayout::SetDrawingEffect. + /// + /// Standard HRESULT error code. + /// + /// + /// The right-to-left flag is a hint to draw the appropriate visual for + /// that reading direction. For example, it would look strange to draw an + /// arrow pointing to the right to indicate a submenu. The sideways flag + /// similarly hints that the object is drawn in a different orientation. + /// If a non-identity orientation is passed, the top left of the inline + /// object should be rotated around the given x and y coordinates. + /// IDWriteAnalyzer2::GetGlyphOrientationTransform returns the necessary + /// transform for this. + /// + STDMETHOD(DrawInlineObject)( + _In_opt_ void* clientDrawingContext, + FLOAT originX, + FLOAT originY, + DWRITE_GLYPH_ORIENTATION_ANGLE orientationAngle, + _In_ IDWriteInlineObject* inlineObject, + BOOL isSideways, + BOOL isRightToLeft, + _In_opt_ IUnknown* clientDrawingEffect + ) PURE; + + using IDWriteTextRenderer::DrawGlyphRun; + using IDWriteTextRenderer::DrawUnderline; + using IDWriteTextRenderer::DrawStrikethrough; + using IDWriteTextRenderer::DrawInlineObject; +}; + + +/// +/// The format of text used for text layout. +/// +/// +/// This object may not be thread-safe and it may carry the state of text format change. +/// +interface DWRITE_DECLARE_INTERFACE("5F174B49-0D8B-4CFB-8BCA-F1CCE9D06C67") IDWriteTextFormat1 : public IDWriteTextFormat +{ + /// + /// Set the preferred orientation of glyphs when using a vertical reading direction. + /// + /// Preferred glyph orientation. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetVerticalGlyphOrientation)( + DWRITE_VERTICAL_GLYPH_ORIENTATION glyphOrientation + ) PURE; + + /// + /// Get the preferred orientation of glyphs when using a vertical reading + /// direction. + /// + STDMETHOD_(DWRITE_VERTICAL_GLYPH_ORIENTATION, GetVerticalGlyphOrientation)() PURE; + + /// + /// Set whether or not the last word on the last line is wrapped. + /// + /// Line wrapping option. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetLastLineWrapping)( + BOOL isLastLineWrappingEnabled + ) PURE; + + /// + /// Get whether or not the last word on the last line is wrapped. + /// + STDMETHOD_(BOOL, GetLastLineWrapping)() PURE; + + /// + /// Set how the glyphs align to the edges the margin. Default behavior is + /// to align glyphs using their default glyphs metrics which include side + /// bearings. + /// + /// Optical alignment option. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetOpticalAlignment)( + DWRITE_OPTICAL_ALIGNMENT opticalAlignment + ) PURE; + + /// + /// Get how the glyphs align to the edges the margin. + /// + STDMETHOD_(DWRITE_OPTICAL_ALIGNMENT, GetOpticalAlignment)() PURE; + + /// + /// Apply a custom font fallback onto layout. If none is specified, + /// layout uses the system fallback list. + /// + /// Custom font fallback created from + /// IDWriteFontFallbackBuilder::CreateFontFallback or from + /// IDWriteFactory2::GetSystemFontFallback. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetFontFallback)( + IDWriteFontFallback* fontFallback + ) PURE; + + /// + /// Get the current font fallback object. + /// + STDMETHOD(GetFontFallback)( + __out IDWriteFontFallback** fontFallback + ) PURE; +}; + + +/// +/// The text layout interface represents a block of text after it has +/// been fully analyzed and formatted. +/// +/// All coordinates are in device independent pixels (DIPs). +/// +interface DWRITE_DECLARE_INTERFACE("1093C18F-8D5E-43F0-B064-0917311B525E") IDWriteTextLayout2 : public IDWriteTextLayout1 +{ + /// + /// GetMetrics retrieves overall metrics for the formatted string. + /// + /// The returned metrics. + /// + /// Standard HRESULT error code. + /// + /// + /// Drawing effects like underline and strikethrough do not contribute + /// to the text size, which is essentially the sum of advance widths and + /// line heights. Additionally, visible swashes and other graphic + /// adornments may extend outside the returned width and height. + /// + STDMETHOD(GetMetrics)( + _Out_ DWRITE_TEXT_METRICS1* textMetrics + ) PURE; + + using IDWriteTextLayout::GetMetrics; + + /// + /// Set the preferred orientation of glyphs when using a vertical reading direction. + /// + /// Preferred glyph orientation. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetVerticalGlyphOrientation)( + DWRITE_VERTICAL_GLYPH_ORIENTATION glyphOrientation + ) PURE; + + /// + /// Get the preferred orientation of glyphs when using a vertical reading + /// direction. + /// + STDMETHOD_(DWRITE_VERTICAL_GLYPH_ORIENTATION, GetVerticalGlyphOrientation)() PURE; + + /// + /// Set whether or not the last word on the last line is wrapped. + /// + /// Line wrapping option. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetLastLineWrapping)( + BOOL isLastLineWrappingEnabled + ) PURE; + + /// + /// Get whether or not the last word on the last line is wrapped. + /// + STDMETHOD_(BOOL, GetLastLineWrapping)() PURE; + + /// + /// Set how the glyphs align to the edges the margin. Default behavior is + /// to align glyphs using their default glyphs metrics which include side + /// bearings. + /// + /// Optical alignment option. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetOpticalAlignment)( + DWRITE_OPTICAL_ALIGNMENT opticalAlignment + ) PURE; + + /// + /// Get how the glyphs align to the edges the margin. + /// + STDMETHOD_(DWRITE_OPTICAL_ALIGNMENT, GetOpticalAlignment)() PURE; + + /// + /// Apply a custom font fallback onto layout. If none is specified, + /// layout uses the system fallback list. + /// + /// Custom font fallback created from + /// IDWriteFontFallbackBuilder::CreateFontFallback or + /// IDWriteFactory2::GetSystemFontFallback. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetFontFallback)( + IDWriteFontFallback* fontFallback + ) PURE; + + /// + /// Get the current font fallback object. + /// + STDMETHOD(GetFontFallback)( + __out IDWriteFontFallback** fontFallback + ) PURE; +}; + + +/// +/// The text analyzer interface represents a set of application-defined +/// callbacks that perform rendering of text, inline objects, and decorations +/// such as underlines. +/// +interface DWRITE_DECLARE_INTERFACE("553A9FF3-5693-4DF7-B52B-74806F7F2EB9") IDWriteTextAnalyzer2 : public IDWriteTextAnalyzer1 +{ + /// + /// Returns 2x3 transform matrix for the respective angle to draw the + /// glyph run or other object. + /// + /// The angle reported to one of the application callbacks, + /// including IDWriteTextAnalysisSink1::SetGlyphOrientation and IDWriteTextRenderer1::Draw*. + /// Whether the run's glyphs are sideways or not. + /// X origin of the element, be it a glyph run or underline or other. + /// Y origin of the element, be it a glyph run or underline or other. + /// Returned transform. + /// + /// Standard HRESULT error code. + /// + /// + /// This rotates around the given origin x and y, returning a translation component + /// such that the glyph run, text decoration, or inline object is drawn with the + /// right orientation at the expected coordinate. + /// + STDMETHOD(GetGlyphOrientationTransform)( + DWRITE_GLYPH_ORIENTATION_ANGLE glyphOrientationAngle, + BOOL isSideways, + FLOAT originX, + FLOAT originY, + _Out_ DWRITE_MATRIX* transform + ) PURE; + + /// + /// Returns a list of typographic feature tags for the given script and language. + /// + /// The font face to get features from. + /// Script analysis result from AnalyzeScript. + /// The locale to use when selecting the feature, + /// such en-us or ja-jp. + /// Maximum tag count. + /// Actual tag count. If greater than + /// maxTagCount, E_NOT_SUFFICIENT_BUFFER is returned, and the call + /// should be retried with a larger buffer. + /// Feature tag list. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetTypographicFeatures)( + IDWriteFontFace* fontFace, + DWRITE_SCRIPT_ANALYSIS scriptAnalysis, + _In_opt_z_ WCHAR const* localeName, + UINT32 maxTagCount, + _Out_ UINT32* actualTagCount, + _Out_writes_(maxTagCount) DWRITE_FONT_FEATURE_TAG* tags + ) PURE; + + /// + /// Returns an array of which glyphs are affected by a given feature. + /// + /// The font face to read glyph information from. + /// Script analysis result from AnalyzeScript. + /// The locale to use when selecting the feature, + /// such en-us or ja-jp. + /// OpenType feature name to use, which may be one + /// of the DWRITE_FONT_FEATURE_TAG values or a custom feature using + /// DWRITE_MAKE_OPENTYPE_TAG. + /// Number of glyph indices to check. + /// Glyph indices to check for feature application. + /// Output of which glyphs are affected by the + /// feature, where for each glyph affected, the respective array index + /// will be 1. The result is returned per-glyph without regard to + /// neighboring context of adjacent glyphs. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CheckTypographicFeature)( + IDWriteFontFace* fontFace, + DWRITE_SCRIPT_ANALYSIS scriptAnalysis, + _In_opt_z_ WCHAR const* localeName, + DWRITE_FONT_FEATURE_TAG featureTag, + UINT32 glyphCount, + _In_reads_(glyphCount) UINT16 const* glyphIndices, + _Out_writes_(glyphCount) UINT8* featureApplies + ) PURE; + + using IDWriteTextAnalyzer1::GetGlyphOrientationTransform; +}; + + +/// +/// A font fallback definition used for mapping characters to fonts capable of +/// supporting them. +/// +interface DWRITE_DECLARE_INTERFACE("EFA008F9-F7A1-48BF-B05C-F224713CC0FF") IDWriteFontFallback : public IUnknown +{ + /// + /// Determines an appropriate font to use to render the range of text. + /// + /// The text source implementation holds the text and + /// locale. + /// Length of the text to analyze. + /// Default font collection to use. + /// Family name of the base font. If you pass + /// null, no matching will be done against the family. + /// Desired weight. + /// Desired style. + /// Desired stretch. + /// Length of text mapped to the mapped font. + /// This will always be less or equal to the input text length and + /// greater than zero (if the text length is non-zero) so that the + /// caller advances at least one character each call. + /// The font that should be used to render the + /// first mappedLength characters of the text. If it returns NULL, + /// then no known font can render the text, and mappedLength is the + /// number of unsupported characters to skip. + /// Scale factor to multiply the em size of the + /// returned font by. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(MapCharacters)( + IDWriteTextAnalysisSource* analysisSource, + UINT32 textPosition, + UINT32 textLength, + _In_opt_ IDWriteFontCollection* baseFontCollection, + _In_opt_z_ wchar_t const* baseFamilyName, + DWRITE_FONT_WEIGHT baseWeight, + DWRITE_FONT_STYLE baseStyle, + DWRITE_FONT_STRETCH baseStretch, + _Out_range_(0, textLength) UINT32* mappedLength, + _COM_Outptr_result_maybenull_ IDWriteFont** mappedFont, + _Out_ FLOAT* scale + ) PURE; +}; + + +/// +/// Builder used to create a font fallback definition by appending a series of +/// fallback mappings, followed by a creation call. +/// +/// +/// This object may not be thread-safe. +/// +interface DWRITE_DECLARE_INTERFACE("FD882D06-8ABA-4FB8-B849-8BE8B73E14DE") IDWriteFontFallbackBuilder : public IUnknown +{ + /// + /// Appends a single mapping to the list. Call this once for each additional mapping. + /// + /// Unicode ranges that apply to this mapping. + /// Number of Unicode ranges. + /// Locale of the context (e.g. document locale). + /// Base family name to match against, if applicable. + /// Explicit font collection for this mapping (optional). + /// List of target family name strings. + /// Number of target family names. + /// Scale factor to multiply the result target font by. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(AddMapping)( + _In_reads_(rangesCount) DWRITE_UNICODE_RANGE const* ranges, + UINT32 rangesCount, + _In_reads_(targetFamilyNamesCount) WCHAR const** targetFamilyNames, + UINT32 targetFamilyNamesCount, + _In_opt_ IDWriteFontCollection* fontCollection = NULL, + _In_opt_z_ WCHAR const* localeName = NULL, + _In_opt_z_ WCHAR const* baseFamilyName = NULL, + FLOAT scale = 1.0f + ) PURE; + + /// + /// Appends all the mappings from an existing font fallback object. + /// + /// Font fallback to read mappings from. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(AddMappings)( + IDWriteFontFallback* fontFallback + ) PURE; + + /// + /// Creates the finalized fallback object from the mappings added. + /// + /// Created fallback list. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontFallback)( + _COM_Outptr_ IDWriteFontFallback** fontFallback + ) PURE; +}; + +/// +/// DWRITE_COLOR_F +/// +#ifndef D3DCOLORVALUE_DEFINED + +typedef struct _D3DCOLORVALUE { + union { + FLOAT r; + FLOAT dvR; + }; + union { + FLOAT g; + FLOAT dvG; + }; + union { + FLOAT b; + FLOAT dvB; + }; + union { + FLOAT a; + FLOAT dvA; + }; +} D3DCOLORVALUE; + +#define D3DCOLORVALUE_DEFINED +#endif // D3DCOLORVALUE_DEFINED + +typedef D3DCOLORVALUE DWRITE_COLOR_F; + +/// +/// The IDWriteFont interface represents a physical font in a font collection. +/// +interface DWRITE_DECLARE_INTERFACE("29748ed6-8c9c-4a6a-be0b-d912e8538944") IDWriteFont2 : public IDWriteFont1 +{ + /// + /// Returns TRUE if the font contains tables that can provide color information + /// (including COLR, CPAL, SVG, CBDT, sbix tables), or FALSE if not. Note that + /// TRUE is returned even in the case when the font tables contain only grayscale + /// images. + /// + STDMETHOD_(BOOL, IsColorFont)() PURE; +}; + +/// +/// The interface that represents an absolute reference to a font face. +/// It contains font face type, appropriate file references and face identification data. +/// Various font data such as metrics, names and glyph outlines is obtained from IDWriteFontFace. +/// +interface DWRITE_DECLARE_INTERFACE("d8b768ff-64bc-4e66-982b-ec8e87f693f7") IDWriteFontFace2 : public IDWriteFontFace1 +{ + /// + /// Returns TRUE if the font contains tables that can provide color information + /// (including COLR, CPAL, SVG, CBDT, sbix tables), or FALSE if not. Note that + /// TRUE is returned even in the case when the font tables contain only grayscale + /// images. + /// + STDMETHOD_(BOOL, IsColorFont)() PURE; + + /// + /// Returns the number of color palettes defined by the font. The return + /// value is zero if the font has no color information. Color fonts must + /// have at least one palette, with palette index zero being the default. + /// + STDMETHOD_(UINT32, GetColorPaletteCount)() PURE; + + /// + /// Returns the number of entries in each color palette. All color palettes + /// in a font have the same number of palette entries. The return value is + /// zero if the font has no color information. + /// + STDMETHOD_(UINT32, GetPaletteEntryCount)() PURE; + + /// + /// Reads color values from the font's color palette. + /// + /// Zero-based index of the color palette. If the + /// font does not have a palette with the specified index, the method returns + /// DWRITE_E_NOCOLOR. + /// Zero-based index of the first palette entry + /// to read. + /// Number of palette entries to read. + /// Array that receives the color values. + /// + /// Standard HRESULT error code. + /// The return value is E_INVALIDARG if firstEntryIndex + entryCount is greater + /// than the actual number of palette entries as returned by GetPaletteEntryCount. + /// The return value is DWRITE_E_NOCOLOR if the font does not have a palette + /// with the specified palette index. + /// + STDMETHOD(GetPaletteEntries)( + UINT32 colorPaletteIndex, + UINT32 firstEntryIndex, + UINT32 entryCount, + _Out_writes_(entryCount) DWRITE_COLOR_F* paletteEntries + ) PURE; + + /// + /// Determines the recommended text rendering and grid-fit mode to be used based on the + /// font, size, world transform, and measuring mode. + /// + /// Logical font size in DIPs. + /// Number of pixels per logical inch in the horizontal direction. + /// Number of pixels per logical inch in the vertical direction. + /// Specifies the world transform. + /// Specifies the quality of the graphics system's outline rendering, + /// affects the size threshold above which outline rendering is used. + /// Specifies the method used to measure during text layout. For proper + /// glyph spacing, the function returns a rendering mode that is compatible with the specified + /// measuring mode. + /// Rendering parameters object. This parameter is necessary in case the rendering parameters + /// object overrides the rendering mode. + /// Receives the recommended rendering mode. + /// Receives the recommended grid-fit mode. + /// + /// This method should be used to determine the actual rendering mode in cases where the rendering + /// mode of the rendering params object is DWRITE_RENDERING_MODE_DEFAULT, and the actual grid-fit + /// mode when the rendering params object is DWRITE_GRID_FIT_MODE_DEFAULT. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetRecommendedRenderingMode)( + FLOAT fontEmSize, + FLOAT dpiX, + FLOAT dpiY, + _In_opt_ DWRITE_MATRIX const* transform, + BOOL isSideways, + DWRITE_OUTLINE_THRESHOLD outlineThreshold, + DWRITE_MEASURING_MODE measuringMode, + _In_opt_ IDWriteRenderingParams* renderingParams, + _Out_ DWRITE_RENDERING_MODE* renderingMode, + _Out_ DWRITE_GRID_FIT_MODE* gridFitMode + ) PURE; + + using IDWriteFontFace1::GetRecommendedRenderingMode; +}; + +/// +/// Represents a color glyph run. The IDWriteFactory2::TranslateColorGlyphRun +/// method returns an ordered collection of color glyph runs, which can be +/// layered on top of each other to produce a color representation of the +/// given base glyph run. +/// +struct DWRITE_COLOR_GLYPH_RUN +{ + /// + /// Glyph run to render. + /// + DWRITE_GLYPH_RUN glyphRun; + + /// + /// Optional glyph run description. + /// + _Maybenull_ DWRITE_GLYPH_RUN_DESCRIPTION* glyphRunDescription; + + /// + /// Location at which to draw this glyph run. + /// + FLOAT baselineOriginX; + FLOAT baselineOriginY; + + /// + /// Color to use for this layer, if any. This is the same color that + /// IDWriteFontFace2::GetPaletteEntries would return for the current + /// palette index if the paletteIndex member is less than 0xFFFF. If + /// the paletteIndex member is 0xFFFF then there is no associated + /// palette entry, this member is set to { 0, 0, 0, 0 }, and the client + /// should use the current foreground brush. + /// + DWRITE_COLOR_F runColor; + + /// + /// Zero-based index of this layer's color entry in the current color + /// palette, or 0xFFFF if this layer is to be rendered using + /// the current foreground brush. + /// + UINT16 paletteIndex; +}; + +/// +/// Enumerator for an ordered collection of color glyph runs. +/// +interface DWRITE_DECLARE_INTERFACE("d31fbe17-f157-41a2-8d24-cb779e0560e8") IDWriteColorGlyphRunEnumerator : public IUnknown +{ + /// + /// Advances to the first or next color run. The runs are enumerated + /// in order from back to front. + /// + /// Receives TRUE if there is a current run or + /// FALSE if the end of the sequence has been reached. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(MoveNext)( + _Out_ BOOL* hasRun + ) PURE; + + /// + /// Gets the current color glyph run. + /// + /// Receives a pointer to the color + /// glyph run. The pointer remains valid until the next call to + /// MoveNext or until the interface is released. + /// + /// Standard HRESULT error code. An error is returned if there is + /// no current glyph run, i.e., if MoveNext has not yet been called + /// or if the end of the sequence has been reached. + /// + STDMETHOD(GetCurrentRun)( + _Outptr_ DWRITE_COLOR_GLYPH_RUN const** colorGlyphRun + ) PURE; +}; + +/// +/// The interface that represents text rendering settings for glyph rasterization and filtering. +/// +interface DWRITE_DECLARE_INTERFACE("F9D711C3-9777-40AE-87E8-3E5AF9BF0948") IDWriteRenderingParams2 : public IDWriteRenderingParams1 +{ + /// + /// Gets the grid fitting mode. + /// + STDMETHOD_(DWRITE_GRID_FIT_MODE, GetGridFitMode)() PURE; +}; + +/// +/// The root factory interface for all DWrite objects. +/// +interface DWRITE_DECLARE_INTERFACE("0439fc60-ca44-4994-8dee-3a9af7b732ec") IDWriteFactory2 : public IDWriteFactory1 +{ + /// + /// Get the system-appropriate font fallback mapping list. + /// + /// The system fallback list. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetSystemFontFallback)( + _COM_Outptr_ IDWriteFontFallback** fontFallback + ) PURE; + + /// + /// Create a custom font fallback builder. + /// + /// Empty font fallback builder. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontFallbackBuilder)( + _COM_Outptr_ IDWriteFontFallbackBuilder** fontFallbackBuilder + ) PURE; + + /// + /// Translates a glyph run to a sequence of color glyph runs, which can be + /// rendered to produce a color representation of the original "base" run. + /// + /// Horizontal origin of the base glyph run in + /// pre-transform coordinates. + /// Vertical origin of the base glyph run in + /// pre-transform coordinates. + /// Pointer to the original "base" glyph run. + /// Optional glyph run description. + /// Measuring mode, needed to compute the origins + /// of each glyph. + /// Matrix converting from the client's + /// coordinate space to device coordinates (pixels), i.e., the world transform + /// multiplied by any DPI scaling. + /// Zero-based index of the color palette to use. + /// Valid indices are less than the number of palettes in the font, as returned + /// by IDWriteFontFace2::GetColorPaletteCount. + /// If the function succeeds, receives a pointer + /// to an enumerator object that can be used to obtain the color glyph runs. + /// If the base run has no color glyphs, then the output pointer is NULL + /// and the method returns DWRITE_E_NOCOLOR. + /// + /// Returns DWRITE_E_NOCOLOR if the font has no color information, the base + /// glyph run does not contain any color glyphs, or the specified color palette + /// index is out of range. In this case, the client should render the base glyph + /// run. Otherwise, returns a standard HRESULT error code. + /// + STDMETHOD(TranslateColorGlyphRun)( + FLOAT baselineOriginX, + FLOAT baselineOriginY, + _In_ DWRITE_GLYPH_RUN const* glyphRun, + _In_opt_ DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription, + DWRITE_MEASURING_MODE measuringMode, + _In_opt_ DWRITE_MATRIX const* worldToDeviceTransform, + UINT32 colorPaletteIndex, + _COM_Outptr_ IDWriteColorGlyphRunEnumerator** colorLayers + ) PURE; + + /// + /// Creates a rendering parameters object with the specified properties. + /// + /// The gamma value used for gamma correction, which must be greater than zero and cannot exceed 256. + /// The amount of contrast enhancement, zero or greater. + /// The degree of ClearType level, from 0.0f (no ClearType) to 1.0f (full ClearType). + /// The geometry of a device pixel. + /// Method of rendering glyphs. In most cases, this should be DWRITE_RENDERING_MODE_DEFAULT to automatically use an appropriate mode. + /// How to grid fit glyph outlines. In most cases, this should be DWRITE_GRID_FIT_DEFAULT to automatically choose an appropriate mode. + /// Holds the newly created rendering parameters object, or NULL in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateCustomRenderingParams)( + FLOAT gamma, + FLOAT enhancedContrast, + FLOAT grayscaleEnhancedContrast, + FLOAT clearTypeLevel, + DWRITE_PIXEL_GEOMETRY pixelGeometry, + DWRITE_RENDERING_MODE renderingMode, + DWRITE_GRID_FIT_MODE gridFitMode, + _COM_Outptr_ IDWriteRenderingParams2** renderingParams + ) PURE; + + using IDWriteFactory::CreateCustomRenderingParams; + using IDWriteFactory1::CreateCustomRenderingParams; + + /// + /// Creates a glyph run analysis object, which encapsulates information + /// used to render a glyph run. + /// + /// Structure specifying the properties of the glyph run. + /// Optional transform applied to the glyphs and their positions. This transform is applied after the + /// scaling specified by the emSize and pixelsPerDip. + /// Specifies the rendering mode, which must be one of the raster rendering modes (i.e., not default + /// and not outline). + /// Specifies the method to measure glyphs. + /// How to grid-fit glyph outlines. This must be non-default. + /// Horizontal position of the baseline origin, in DIPs. + /// Vertical position of the baseline origin, in DIPs. + /// Receives a pointer to the newly created object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateGlyphRunAnalysis)( + _In_ DWRITE_GLYPH_RUN const* glyphRun, + _In_opt_ DWRITE_MATRIX const* transform, + DWRITE_RENDERING_MODE renderingMode, + DWRITE_MEASURING_MODE measuringMode, + DWRITE_GRID_FIT_MODE gridFitMode, + DWRITE_TEXT_ANTIALIAS_MODE antialiasMode, + FLOAT baselineOriginX, + FLOAT baselineOriginY, + _COM_Outptr_ IDWriteGlyphRunAnalysis** glyphRunAnalysis + ) PURE; + + using IDWriteFactory::CreateGlyphRunAnalysis; +}; + + +#endif /* DWRITE_2_H_INCLUDED */ diff --git a/gfx/include/dxsdk/dwrite_3.h b/gfx/include/dxsdk/dwrite_3.h new file mode 100644 index 0000000000..45eb6203cb --- /dev/null +++ b/gfx/include/dxsdk/dwrite_3.h @@ -0,0 +1,3489 @@ +//+-------------------------------------------------------------------------- +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Abstract: +// DirectX Typography Services public API definitions. +// +//---------------------------------------------------------------------------- + +#ifndef DWRITE_3_H_INCLUDED +#define DWRITE_3_H_INCLUDED + +#pragma once + +#include + +interface IDWriteFontFaceReference; +interface IDWriteFont3; +interface IDWriteFontFace3; +interface IDWriteFontSet; +interface IDWriteFontSetBuilder; +interface IDWriteFontCollection1; +interface IDWriteFontFamily1; +interface IDWriteStringList; +interface IDWriteFontDownloadQueue; + + +/// +/// A font resource could not be accessed because it was remote. This can happen +/// when calling CreateFontFace on a non-local font or trying to measure/draw +/// glyphs that are not downloaded yet. +/// +#ifndef DWRITE_E_REMOTEFONT +#define DWRITE_E_REMOTEFONT _HRESULT_TYPEDEF_(0x8898500DL) +#endif + +/// +/// The download was canceled, which happens if the application calls +/// IDWriteFontDownloadQueue::CancelDownload before they finish. +/// +#ifndef DWRITE_E_DOWNLOADCANCELLED +#define DWRITE_E_DOWNLOADCANCELLED _HRESULT_TYPEDEF_(0x8898500EL) +#endif + +/// +/// The download failed to complete because the remote resource is missing +/// or the network is down. +/// +#ifndef DWRITE_E_DOWNLOADFAILED +#define DWRITE_E_DOWNLOADFAILED _HRESULT_TYPEDEF_(0x8898500FL) +#endif + +/// +/// A download request was not added or a download failed because there +/// are too many active downloads. +/// +#ifndef DWRITE_E_TOOMANYDOWNLOADS +#define DWRITE_E_TOOMANYDOWNLOADS _HRESULT_TYPEDEF_(0x88985010L) +#endif + +/// +/// The font property enumeration identifies a string in a font. +/// +enum DWRITE_FONT_PROPERTY_ID +{ + /// + /// Unspecified font property identifier. + /// + DWRITE_FONT_PROPERTY_ID_NONE, + + /// + /// Family name for the weight-stretch-style model. + /// + DWRITE_FONT_PROPERTY_ID_WEIGHT_STRETCH_STYLE_FAMILY_NAME, + + /// + /// Family name preferred by the designer. This enables font designers to group more than four fonts in a single family without losing compatibility with + /// GDI. This name is typically only present if it differs from the GDI-compatible family name. + /// + DWRITE_FONT_PROPERTY_ID_TYPOGRAPHIC_FAMILY_NAME, + + /// + /// Face name of the for the weight-stretch-style (e.g., Regular or Bold). + /// + DWRITE_FONT_PROPERTY_ID_WEIGHT_STRETCH_STYLE_FACE_NAME, + + /// + /// The full name of the font, e.g. "Arial Bold", from name id 4 in the name table. + /// + DWRITE_FONT_PROPERTY_ID_FULL_NAME, + + /// + /// GDI-compatible family name. Because GDI allows a maximum of four fonts per family, fonts in the same family may have different GDI-compatible family names + /// (e.g., "Arial", "Arial Narrow", "Arial Black"). + /// + DWRITE_FONT_PROPERTY_ID_WIN32_FAMILY_NAME, + + /// + /// The postscript name of the font, e.g. "GillSans-Bold" from name id 6 in the name table. + /// + DWRITE_FONT_PROPERTY_ID_POSTSCRIPT_NAME, + + /// + /// Script/language tag to identify the scripts or languages that the font was + /// primarily designed to support. + /// + /// + /// The design script/language tag is meant to be understood from the perspective of + /// users. For example, a font is considered designed for English if it is considered + /// useful for English users. Note that this is different from what a font might be + /// capable of supporting. For example, the Meiryo font was primarily designed for + /// Japanese users. While it is capable of displaying English well, it was not + /// meant to be offered for the benefit of non-Japanese-speaking English users. + /// + /// As another example, a font designed for Chinese may be capable of displaying + /// Japanese text, but would likely look incorrect to Japanese users. + /// + /// The valid values for this property are "ScriptLangTag" values. These are adapted + /// from the IETF BCP 47 specification, "Tags for Identifying Languages" (see + /// http://tools.ietf.org/html/bcp47). In a BCP 47 language tag, a language subtag + /// element is mandatory and other subtags are optional. In a ScriptLangTag, a + /// script subtag is mandatory and other subtags are option. The following + /// augmented BNF syntax, adapted from BCP 47, is used: + /// + /// ScriptLangTag = [language "-"] + /// script + /// ["-" region] + /// *("-" variant) + /// *("-" extension) + /// ["-" privateuse] + /// + /// The expansion of the elements and the intended semantics associated with each + /// are as defined in BCP 47. Script subtags are taken from ISO 15924. At present, + /// no extensions are defined, and any extension should be ignored. Private use + /// subtags are defined by private agreement between the source and recipient and + /// may be ignored. + /// + /// Subtags must be valid for use in BCP 47 and contained in the Language Subtag + /// Registry maintained by IANA. (See + /// http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry + /// and section 3 of BCP 47 for details. + /// + /// Any ScriptLangTag value not conforming to these specifications is ignored. + /// + /// Examples: + /// "Latn" denotes Latin script (and any language or writing system using Latin) + /// "Cyrl" denotes Cyrillic script + /// "sr-Cyrl" denotes Cyrillic script as used for writing the Serbian language; + /// a font that has this property value may not be suitable for displaying + /// text in Russian or other languages written using Cyrillic script + /// "Jpan" denotes Japanese writing (Han + Hiragana + Katakana) + /// + /// When passing this property to GetPropertyValues, use the overload which does + /// not take a language parameter, since this property has no specific language. + /// + DWRITE_FONT_PROPERTY_ID_DESIGN_SCRIPT_LANGUAGE_TAG, + + /// + /// Script/language tag to identify the scripts or languages that the font declares + /// it is able to support. + /// + DWRITE_FONT_PROPERTY_ID_SUPPORTED_SCRIPT_LANGUAGE_TAG, + + /// + /// Semantic tag to describe the font (e.g. Fancy, Decorative, Handmade, Sans-serif, Swiss, Pixel, Futuristic). + /// + DWRITE_FONT_PROPERTY_ID_SEMANTIC_TAG, + + /// + /// Weight of the font represented as a decimal string in the range 1-999. + /// + /// + /// This enum is discouraged for use with IDWriteFontSetBuilder2 in favor of the more generic font axis + /// DWRITE_FONT_AXIS_TAG_WEIGHT which supports higher precision and range. + /// + DWRITE_FONT_PROPERTY_ID_WEIGHT, + + /// + /// Stretch of the font represented as a decimal string in the range 1-9. + /// + /// + /// This enum is discouraged for use with IDWriteFontSetBuilder2 in favor of the more generic font axis + /// DWRITE_FONT_AXIS_TAG_WIDTH which supports higher precision and range. + /// + DWRITE_FONT_PROPERTY_ID_STRETCH, + + /// + /// Style of the font represented as a decimal string in the range 0-2. + /// + /// + /// This enum is discouraged for use with IDWriteFontSetBuilder2 in favor of the more generic font axes + /// DWRITE_FONT_AXIS_TAG_SLANT and DWRITE_FONT_AXIS_TAG_ITAL. + /// + DWRITE_FONT_PROPERTY_ID_STYLE, + + /// + /// Face name preferred by the designer. This enables font designers to group more than four fonts in a single + /// family without losing compatibility with GDI. + /// + DWRITE_FONT_PROPERTY_ID_TYPOGRAPHIC_FACE_NAME, + + /// + /// Total number of properties for NTDDI_WIN10 (IDWriteFontSet). + /// + /// + /// DWRITE_FONT_PROPERTY_ID_TOTAL cannot be used as a property ID. + /// + DWRITE_FONT_PROPERTY_ID_TOTAL = DWRITE_FONT_PROPERTY_ID_STYLE + 1, + + /// + /// Total number of properties for NTDDI_WIN10_RS3 (IDWriteFontSet1). + /// + DWRITE_FONT_PROPERTY_ID_TOTAL_RS3 = DWRITE_FONT_PROPERTY_ID_TYPOGRAPHIC_FACE_NAME + 1, + + // Obsolete aliases kept to avoid breaking existing code. + DWRITE_FONT_PROPERTY_ID_PREFERRED_FAMILY_NAME = DWRITE_FONT_PROPERTY_ID_TYPOGRAPHIC_FAMILY_NAME, + DWRITE_FONT_PROPERTY_ID_FAMILY_NAME = DWRITE_FONT_PROPERTY_ID_WEIGHT_STRETCH_STYLE_FAMILY_NAME, + DWRITE_FONT_PROPERTY_ID_FACE_NAME = DWRITE_FONT_PROPERTY_ID_WEIGHT_STRETCH_STYLE_FACE_NAME, +}; + + +/// +/// Font property used for filtering font sets and +/// building a font set with explicit properties. +/// +struct DWRITE_FONT_PROPERTY +{ + /// + /// Specifies the requested font property, such as DWRITE_FONT_PROPERTY_ID_FAMILY_NAME. + /// + DWRITE_FONT_PROPERTY_ID propertyId; + + /// + /// Specifies the property value, such as "Segoe UI". + /// + _Field_z_ WCHAR const* propertyValue; + + /// + /// Specifies the language / locale to use, such as "en-US". + /// + /// + /// When passing property information to AddFontFaceReference, localeName indicates + /// the language of the property value. BCP 47 language tags should be used. If a + /// property value is inherently non-linguistic, this can be left empty. + /// + /// When used for font set filtering, leave this empty: a match will be found + /// regardless of language associated with property values. + /// + _Field_z_ _Maybenull_ WCHAR const* localeName; +}; + + +/// +/// Specifies the locality of a resource. +/// +enum DWRITE_LOCALITY +{ + /// + /// The resource is remote, and information is unknown yet, including the file size and date. + /// Attempting to create a font or file stream will fail until locality becomes at least partial. + /// + DWRITE_LOCALITY_REMOTE, + + /// + /// The resource is partially local, meaning you can query the size and date of the file + /// stream, and you may be able to create a font face and retrieve the particular glyphs + /// for metrics and drawing, but not all the glyphs will be present. + /// + DWRITE_LOCALITY_PARTIAL, + + /// + /// The resource is completely local, and all font functions can be called + /// without concern of missing data or errors related to network connectivity. + /// + DWRITE_LOCALITY_LOCAL, +}; + + +/// +/// Represents a method of rendering glyphs. +/// +enum DWRITE_RENDERING_MODE1 +{ + /// + /// Specifies that the rendering mode is determined automatically based on the font and size. + /// + DWRITE_RENDERING_MODE1_DEFAULT = DWRITE_RENDERING_MODE_DEFAULT, + + /// + /// Specifies that no antialiasing is performed. Each pixel is either set to the foreground + /// color of the text or retains the color of the background. + /// + DWRITE_RENDERING_MODE1_ALIASED = DWRITE_RENDERING_MODE_ALIASED, + + /// + /// Specifies that antialiasing is performed in the horizontal direction and the appearance + /// of glyphs is layout-compatible with GDI using CLEARTYPE_QUALITY. Use DWRITE_MEASURING_MODE_GDI_CLASSIC + /// to get glyph advances. The antialiasing may be either ClearType or grayscale depending on + /// the text antialiasing mode. + /// + DWRITE_RENDERING_MODE1_GDI_CLASSIC = DWRITE_RENDERING_MODE_GDI_CLASSIC, + + /// + /// Specifies that antialiasing is performed in the horizontal direction and the appearance + /// of glyphs is layout-compatible with GDI using CLEARTYPE_NATURAL_QUALITY. Glyph advances + /// are close to the font design advances, but are still rounded to whole pixels. Use + /// DWRITE_MEASURING_MODE_GDI_NATURAL to get glyph advances. The antialiasing may be either + /// ClearType or grayscale depending on the text antialiasing mode. + /// + DWRITE_RENDERING_MODE1_GDI_NATURAL = DWRITE_RENDERING_MODE_GDI_NATURAL, + + /// + /// Specifies that antialiasing is performed in the horizontal direction. This rendering + /// mode allows glyphs to be positioned with subpixel precision and is therefore suitable + /// for natural (i.e., resolution-independent) layout. The antialiasing may be either + /// ClearType or grayscale depending on the text antialiasing mode. + /// + DWRITE_RENDERING_MODE1_NATURAL = DWRITE_RENDERING_MODE_NATURAL, + + /// + /// Similar to natural mode except that antialiasing is performed in both the horizontal + /// and vertical directions. This is typically used at larger sizes to make curves and + /// diagonal lines look smoother. The antialiasing may be either ClearType or grayscale + /// depending on the text antialiasing mode. + /// + DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC = DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC, + + /// + /// Specifies that rendering should bypass the rasterizer and use the outlines directly. + /// This is typically used at very large sizes. + /// + DWRITE_RENDERING_MODE1_OUTLINE = DWRITE_RENDERING_MODE_OUTLINE, + + /// + /// Similar to natural symmetric mode except that when possible, text should be rasterized + /// in a downsampled form. + /// + DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC_DOWNSAMPLED, +}; + + +/// +/// The interface that represents text rendering settings for glyph rasterization and filtering. +/// +interface DWRITE_DECLARE_INTERFACE("B7924BAA-391B-412A-8C5C-E44CC2D867DC") IDWriteRenderingParams3 : public IDWriteRenderingParams2 +{ + /// + /// Gets the rendering mode. + /// + STDMETHOD_(DWRITE_RENDERING_MODE1, GetRenderingMode1)() PURE; +}; + + +/// +/// The root factory interface for all DWrite objects. +/// +interface DWRITE_DECLARE_INTERFACE("9A1B41C3-D3BB-466A-87FC-FE67556A3B65") IDWriteFactory3 : public IDWriteFactory2 +{ + /// + /// Creates a glyph run analysis object, which encapsulates information + /// used to render a glyph run. + /// + /// Structure specifying the properties of the glyph run. + /// Optional transform applied to the glyphs and their positions. This transform is applied after the + /// scaling specified by the emSize. + /// Specifies the rendering mode, which must be one of the raster rendering modes (i.e., not default + /// and not outline). + /// Specifies the method to measure glyphs. + /// How to grid-fit glyph outlines. This must be non-default. + /// Horizontal position of the baseline origin, in DIPs. + /// Vertical position of the baseline origin, in DIPs. + /// Receives a pointer to the newly created object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateGlyphRunAnalysis)( + _In_ DWRITE_GLYPH_RUN const* glyphRun, + _In_opt_ DWRITE_MATRIX const* transform, + DWRITE_RENDERING_MODE1 renderingMode, + DWRITE_MEASURING_MODE measuringMode, + DWRITE_GRID_FIT_MODE gridFitMode, + DWRITE_TEXT_ANTIALIAS_MODE antialiasMode, + FLOAT baselineOriginX, + FLOAT baselineOriginY, + _COM_Outptr_ IDWriteGlyphRunAnalysis** glyphRunAnalysis + ) PURE; + + using IDWriteFactory::CreateGlyphRunAnalysis; + using IDWriteFactory2::CreateGlyphRunAnalysis; + + /// + /// Creates a rendering parameters object with the specified properties. + /// + /// The gamma value used for gamma correction, which must be greater than zero and cannot exceed 256. + /// The amount of contrast enhancement, zero or greater. + /// The amount of contrast enhancement to use for grayscale antialiasing, zero or greater. + /// The degree of ClearType level, from 0.0f (no ClearType) to 1.0f (full ClearType). + /// The geometry of a device pixel. + /// Method of rendering glyphs. In most cases, this should be DWRITE_RENDERING_MODE_DEFAULT to automatically use an appropriate mode. + /// How to grid fit glyph outlines. In most cases, this should be DWRITE_GRID_FIT_DEFAULT to automatically choose an appropriate mode. + /// Receives a pointer to the newly created rendering parameters object, or NULL in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateCustomRenderingParams)( + FLOAT gamma, + FLOAT enhancedContrast, + FLOAT grayscaleEnhancedContrast, + FLOAT clearTypeLevel, + DWRITE_PIXEL_GEOMETRY pixelGeometry, + DWRITE_RENDERING_MODE1 renderingMode, + DWRITE_GRID_FIT_MODE gridFitMode, + _COM_Outptr_ IDWriteRenderingParams3** renderingParams + ) PURE; + + using IDWriteFactory::CreateCustomRenderingParams; + using IDWriteFactory1::CreateCustomRenderingParams; + using IDWriteFactory2::CreateCustomRenderingParams; + + /// + /// Creates a reference to a font given a full path. + /// + /// Absolute file path. Subsequent operations on the constructed object may fail + /// if the user provided filePath doesn't correspond to a valid file on the disk. + /// Last modified time of the input file path. If the parameter is omitted, + /// the function will access the font file to obtain its last write time, so the clients are encouraged to specify this value + /// to avoid extra disk access. Subsequent operations on the constructed object may fail + /// if the user provided lastWriteTime doesn't match the file on the disk. + /// The zero based index of a font face in cases when the font files contain a collection of font faces. + /// If the font files contain a single face, this value should be zero. + /// Font face simulation flags for algorithmic emboldening and italicization. + /// Receives a pointer to the newly created font face reference object, or nullptr in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontFaceReference)( + _In_z_ WCHAR const* filePath, + _In_opt_ FILETIME const* lastWriteTime, + UINT32 faceIndex, + DWRITE_FONT_SIMULATIONS fontSimulations, + _COM_Outptr_ IDWriteFontFaceReference** fontFaceReference + ) PURE; + + /// + /// Creates a reference to a font given a file. + /// + /// User provided font file representing the font face. + /// The zero based index of a font face in cases when the font files contain a collection of font faces. + /// If the font files contain a single face, this value should be zero. + /// Font face simulation flags for algorithmic emboldening and italicization. + /// Receives a pointer to the newly created font face reference object, or nullptr in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontFaceReference)( + _In_ IDWriteFontFile* fontFile, + UINT32 faceIndex, + DWRITE_FONT_SIMULATIONS fontSimulations, + _COM_Outptr_ IDWriteFontFaceReference** fontFaceReference + ) PURE; + + /// + /// Retrieves the list of system fonts. + /// + /// Receives a pointer to the font set object, or nullptr in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetSystemFontSet)( + _COM_Outptr_ IDWriteFontSet** fontSet + ) PURE; + + /// + /// Creates an empty font set builder to add font face references + /// and create a custom font set. + /// + /// Receives a pointer to the newly created font set builder object, or nullptr in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontSetBuilder)( + _COM_Outptr_ IDWriteFontSetBuilder** fontSetBuilder + ) PURE; + + /// + /// Create a weight-stretch-style based collection of families (DWRITE_FONT_FAMILY_MODEL_WEIGHT_STRETCH_STYLE) + /// from a set of fonts. + /// + /// A set of fonts to use to build the collection. + /// Receives a pointer to the newly created font collection object, or nullptr in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontCollectionFromFontSet)( + IDWriteFontSet* fontSet, + _COM_Outptr_ IDWriteFontCollection1** fontCollection + ) PURE; + + /// + /// Retrieves a weight-stretch-style based collection of font families. + /// + /// Include cloud fonts or only locally installed ones. + /// Receives a pointer to the newly created font collection object, or nullptr in + /// case of failure. + /// If this parameter is nonzero, the function performs an immediate check for changes + /// to the set of system fonts. If this parameter is FALSE, the function will still detect changes if the font + /// cache service is running, but there may be some latency. For example, an application might specify TRUE if + /// it has itself just installed a font and wants to be sure the font collection contains that font. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetSystemFontCollection)( + BOOL includeDownloadableFonts, + _COM_Outptr_ IDWriteFontCollection1** fontCollection, + BOOL checkForUpdates = FALSE + ) PURE; + + using IDWriteFactory::GetSystemFontCollection; + + /// + /// Gets the font download queue associated with this factory object. + /// + /// Receives a pointer to the font download queue interface. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontDownloadQueue)( + _COM_Outptr_ IDWriteFontDownloadQueue** fontDownloadQueue + ) PURE; +}; + + +/// +/// Set of fonts used for creating font faces, selecting nearest matching fonts, and filtering. +/// Unlike IDWriteFontFamily and IDWriteFontList, which are part of the IDWriteFontCollection heirarchy, font sets +/// are unordered flat lists. +/// +interface DWRITE_DECLARE_INTERFACE("53585141-D9F8-4095-8321-D73CF6BD116B") IDWriteFontSet : public IUnknown +{ + /// + /// Get the number of total fonts in the set. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD_(UINT32, GetFontCount)() PURE; + + /// + /// Get a reference to the font at this index, which may be local or remote. + /// + /// Zero-based index of the font. + /// Receives a pointer the font face reference object, or nullptr on failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontFaceReference)( + UINT32 listIndex, + _COM_Outptr_ IDWriteFontFaceReference** fontFaceReference + ) PURE; + + /// + /// Gets the index of the matching font face reference in the font set, with the same file, face index, and simulations. + /// + /// Font face reference object that specifies the physical font. + /// Receives the zero-based index of the matching font if the font was found, or UINT_MAX otherwise. + /// Receives TRUE if the font exists or FALSE otherwise. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(FindFontFaceReference)( + IDWriteFontFaceReference* fontFaceReference, + _Out_ UINT32* listIndex, + _Out_ BOOL* exists + ) PURE; + + /// + /// Gets the index of the matching font face reference in the font set, with the same file, face index, and simulations. + /// + /// Font face object that specifies the physical font. + /// Receives the zero-based index of the matching font if the font was found, or UINT_MAX otherwise. + /// Receives TRUE if the font exists or FALSE otherwise. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(FindFontFace)( + IDWriteFontFace* fontFace, + _Out_ UINT32* listIndex, + _Out_ BOOL* exists + ) PURE; + + /// + /// Returns the property values of a specific font item index. + /// + /// Zero-based index of the font. + /// Font property of interest. + /// Receives the value TRUE if the font contains the specified property identifier or FALSE if not. + /// Receives a pointer to the newly created localized strings object, or nullptr on failure or non-existent property. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetPropertyValues)( + UINT32 listIndex, + DWRITE_FONT_PROPERTY_ID propertyId, + _Out_ BOOL* exists, + _COM_Outptr_result_maybenull_ IDWriteLocalizedStrings** values + ) PURE; + + /// + /// Returns all unique property values in the set, which can be used + /// for purposes such as displaying a family list or tag cloud. Values are + /// returned in priority order according to the language list, such that if + /// a font contains more than one localized name, the preferred one will be + /// returned. + /// + /// Font property of interest. + /// List of semicolon delimited language names in preferred + /// order. When a particular string like font family has more than one localized name, + /// the first match is returned. + /// Receives a pointer to the newly created strings list. + /// + /// Standard HRESULT error code. + /// + /// + /// For example, suppose the font set includes the Meiryo family, which has both Japanese and English family names. + /// The returned list of distinct family names would include either the Japanese name (if "ja-jp" was specified as + /// a preferred locale) or the English name (in all other cases). + /// + STDMETHOD(GetPropertyValues)( + DWRITE_FONT_PROPERTY_ID propertyID, + _In_z_ WCHAR const* preferredLocaleNames, + _COM_Outptr_ IDWriteStringList** values + ) PURE; + + /// + /// Returns all unique property values in the set, which can be used + /// for purposes such as displaying a family list or tag cloud. All values + /// are returned regardless of language, including all localized names. + /// + /// Font property of interest. + /// Receives a pointer to the newly created strings list. + /// + /// Standard HRESULT error code. + /// + /// + /// For example, suppose the font set includes the Meiryo family, which has both Japanese and English family names. + /// The returned list of distinct family names would include both the Japanese and English names. + /// + STDMETHOD(GetPropertyValues)( + DWRITE_FONT_PROPERTY_ID propertyID, + _COM_Outptr_ IDWriteStringList** values + ) PURE; + + /// + /// Returns how many times a given property value occurs in the set. + /// + /// Font property of interest. + /// How many times that property occurs. + /// + /// Standard HRESULT error code. + /// + /// + /// For example, the family name "Segoe UI" may return a count of 12, + /// whereas Harrington only has 1. + /// + STDMETHOD(GetPropertyOccurrenceCount)( + _In_ DWRITE_FONT_PROPERTY const* property, + _Out_ UINT32* propertyOccurrenceCount + ) PURE; + + /// + /// Returns a subset of fonts filtered by the given properties. + /// + /// List of properties to filter using. + /// How many properties to filter. + /// Subset of fonts that match the properties, + /// or nullptr on failure. + /// + /// Standard HRESULT error code. + /// + /// + /// If no fonts matched the filter, the subset will be empty (GetFontCount + /// returns 0), but the function does not return an error. The subset will + /// always be equal to or less than the original set. + /// + STDMETHOD(GetMatchingFonts)( + _In_reads_(propertyCount) DWRITE_FONT_PROPERTY const* properties, + UINT32 propertyCount, + _COM_Outptr_ IDWriteFontSet** filteredSet + ) PURE; + + /// + /// Returns a list of fonts within the given WWS family prioritized by + /// WWS distance. + /// + /// Neutral or localized family name of font. + /// Weight of font. + /// Stretch of font. + /// Slope of font. + /// Subset of fonts that match the properties, + /// or nullptr on failure. + /// + /// Standard HRESULT error code. + /// + /// + /// The returned list can include simulated bold and oblique variants, + /// which would be useful for font fallback selection. + /// + STDMETHOD(GetMatchingFonts)( + _In_z_ WCHAR const* familyName, + DWRITE_FONT_WEIGHT fontWeight, + DWRITE_FONT_STRETCH fontStretch, + DWRITE_FONT_STYLE fontStyle, + _COM_Outptr_ IDWriteFontSet** filteredSet + ) PURE; +}; + + +/// +/// Builder interface to add font face references and create a font set. +/// +interface DWRITE_DECLARE_INTERFACE("2F642AFE-9C68-4F40-B8BE-457401AFCB3D") IDWriteFontSetBuilder : public IUnknown +{ + /// + /// Adds a reference to a font to the set being built. The necessary + /// metadata will automatically be extracted from the font upon calling + /// CreateFontSet. + /// + /// Font face reference object to add to the set. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(AddFontFaceReference)( + _In_ IDWriteFontFaceReference* fontFaceReference + ) PURE; + + /// + /// Adds a reference to a font to the set being built. The caller + /// supplies enough information to search on, avoiding the need to open + /// the potentially non-local font. Any properties not supplied by the + /// caller will be missing, and those properties will not be available as + /// filters in GetMatchingFonts. GetPropertyValues for missing properties + /// will return an empty string list. The properties passed should generally + /// be consistent with the actual font contents, but they need not be. You + /// could, for example, alias a font using a different name or unique + /// identifier, or you could set custom tags not present in the actual + /// font. + /// + /// Reference to the font. + /// List of properties to associate with the reference. + /// How many properties are defined. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(AddFontFaceReference)( + _In_ IDWriteFontFaceReference* fontFaceReference, + _In_reads_(propertyCount) DWRITE_FONT_PROPERTY const* properties, + UINT32 propertyCount + ) PURE; + + /// + /// Appends an existing font set to the one being built, allowing + /// one to aggregate two sets or to essentially extend an existing one. + /// + /// Font set to append font face references from. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(AddFontSet)( + _In_ IDWriteFontSet* fontSet + ) PURE; + + /// + /// Creates a font set from all the font face references added so + /// far via AddFontFaceReference. + /// + /// Receives a pointer to the newly created font set object, or nullptr in case of failure. + /// + /// Standard HRESULT error code. + /// + /// + /// Creating a font set takes less time if the references were added + /// with metadata rather than needing to extract the metadata from the + /// font file. + /// + STDMETHOD(CreateFontSet)( + _COM_Outptr_ IDWriteFontSet** fontSet + ) PURE; +}; + + +interface DWRITE_DECLARE_INTERFACE("53585141-D9F8-4095-8321-D73CF6BD116C") IDWriteFontCollection1 : public IDWriteFontCollection +{ + /// + /// Get the underlying font set used by this collection. + /// + /// Contains font set used by the collection. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontSet)( + _COM_Outptr_ IDWriteFontSet** fontSet + ) PURE; + + /// + /// Creates a font family object given a zero-based font family index. + /// + /// Zero-based index of the font family. + /// Receives a pointer the newly created font family object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontFamily)( + UINT32 index, + _COM_Outptr_ IDWriteFontFamily1** fontFamily + ) PURE; + + using IDWriteFontCollection::GetFontFamily; +}; + + +/// +/// The IDWriteFontFamily interface represents a set of fonts that share the same design but are differentiated +/// by weight, stretch, and style. +/// +interface DWRITE_DECLARE_INTERFACE("DA20D8EF-812A-4C43-9802-62EC4ABD7ADF") IDWriteFontFamily1 : public IDWriteFontFamily +{ + /// + /// Gets the current locality of a font given its zero-based index. + /// + /// Zero-based index of the font in the font list. + /// + /// The locality enumeration. For fully local files, the result will always + /// be DWRITE_LOCALITY_LOCAL. For downloadable files, the result depends on how + /// much of the file has been downloaded, and GetFont() fails if the locality + /// is REMOTE and potentially fails if PARTIAL. The application can explicitly + /// ask for the font to be enqueued for download via EnqueueFontDownloadRequest + /// followed by BeginDownload(). + /// + /// + /// The locality enumeration. + /// + STDMETHOD_(DWRITE_LOCALITY, GetFontLocality)(UINT32 listIndex) PURE; + + /// + /// Gets a font given its zero-based index. + /// + /// Zero-based index of the font in the font list. + /// Receives a pointer to the newly created font object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFont)( + UINT32 listIndex, + _COM_Outptr_ IDWriteFont3** font + ) PURE; + + using IDWriteFontFamily::GetFont; + + /// + /// Gets a font face reference given its zero-based index. + /// + /// Zero-based index of the font in the font list. + /// Receives a pointer to the newly created font face reference object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontFaceReference)( + UINT32 listIndex, + _COM_Outptr_ IDWriteFontFaceReference** fontFaceReference + ) PURE; +}; + + +/// +/// The IDWriteFontList interface represents a list of fonts. +/// +interface DWRITE_DECLARE_INTERFACE("DA20D8EF-812A-4C43-9802-62EC4ABD7ADE") IDWriteFontList1 : public IDWriteFontList +{ + /// + /// Gets the current locality of a font given its zero-based index. + /// + /// Zero-based index of the font in the font list. + /// + /// The locality enumeration. For fully local files, the result will always + /// be DWRITE_LOCALITY_LOCAL. For downloadable files, the result depends on how + /// much of the file has been downloaded, and GetFont() fails if the locality + /// is REMOTE and potentially fails if PARTIAL. The application can explicitly + /// ask for the font to be enqueued for download via EnqueueFontDownloadRequest + /// followed by BeginDownload(). + /// + /// + /// The locality enumeration. + /// + STDMETHOD_(DWRITE_LOCALITY, GetFontLocality)(UINT32 listIndex) PURE; + + /// + /// Gets a font given its zero-based index. + /// + /// Zero-based index of the font in the font list. + /// Receives a pointer to the newly created font object. + /// + /// Standard HRESULT error code. The function returns DWRITE_E_REMOTEFONT if it could not construct a remote font. + /// + STDMETHOD(GetFont)( + UINT32 listIndex, + _COM_Outptr_ IDWriteFont3** font + ) PURE; + + using IDWriteFontList::GetFont; + + /// + /// Gets a font face reference given its zero-based index. + /// + /// Zero-based index of the font in the font list. + /// Receives a pointer to the newly created font face reference object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontFaceReference)( + UINT32 listIndex, + _COM_Outptr_ IDWriteFontFaceReference** fontFaceReference + ) PURE; +}; + + +/// +/// A uniquely identifying reference to a font, from which you can create a font +/// face to query font metrics and use for rendering. A font face reference +/// consists of a font file, font face index, and font face simulation. The file +/// data may or may not be physically present on the local machine yet. +/// +interface DWRITE_DECLARE_INTERFACE("5E7FA7CA-DDE3-424C-89F0-9FCD6FED58CD") IDWriteFontFaceReference : public IUnknown +{ + /// + /// Creates a font face from the reference for use with layout, + /// shaping, or rendering. + /// + /// Newly created font face object, or nullptr in the case of failure. + /// + /// Standard HRESULT error code. + /// + /// + /// This function can fail with DWRITE_E_REMOTEFONT if the font is not local. + /// + STDMETHOD(CreateFontFace)( + _COM_Outptr_ IDWriteFontFace3** fontFace + ) PURE; + + /// + /// Creates a font face with alternate font simulations, for example, to + /// explicitly simulate a bold font face out of a regular variant. + /// + /// Font face simulation flags for algorithmic emboldening and italicization. + /// Newly created font face object, or nullptr in the case of failure. + /// + /// Standard HRESULT error code. + /// + /// + /// This function can fail with DWRITE_E_REMOTEFONT if the font is not local. + /// + STDMETHOD(CreateFontFaceWithSimulations)( + DWRITE_FONT_SIMULATIONS fontFaceSimulationFlags, + _COM_Outptr_ IDWriteFontFace3** fontFace + ) PURE; + + /// + /// Compares two instances of a font face references for equality. + /// + STDMETHOD_(BOOL, Equals)(IDWriteFontFaceReference* fontFaceReference) PURE; + + /// + /// Obtains the zero-based index of the font face in its font file. If the font files contain a single face, + /// the return value is zero. + /// + STDMETHOD_(UINT32, GetFontFaceIndex)() PURE; + + /// + /// Obtains the algorithmic style simulation flags of a font face. + /// + STDMETHOD_(DWRITE_FONT_SIMULATIONS, GetSimulations)() PURE; + + /// + /// Obtains the font file representing a font face. + /// + STDMETHOD(GetFontFile)( + _COM_Outptr_ IDWriteFontFile** fontFile + ) PURE; + + /// + /// Get the local size of the font face in bytes. + /// + /// + /// The value returned by GetLocalFileSize will always be less than or + /// equal to the value returned by GetFullSize. If the locality is remote, + /// the GetLocalFileSize value is zero. If the locality is local, this + /// value will equal the value returned by GetFileSize. If the locality is + /// partial, this value will equal the size of the portions of the font + /// data that have been downloaded, which will be greater than zero and + /// less than or equal to the GetFileSize value. + /// + STDMETHOD_(UINT64, GetLocalFileSize)() PURE; + + /// + /// Get the total size of the font face in bytes. + /// + /// + /// If the locality is remote, this value is unknown and will be zero. + /// If the locality is partial or local, the value is the full size of + /// the font face. + /// + STDMETHOD_(UINT64, GetFileSize)() PURE; + + /// + /// Get the last modified date. + /// + /// + /// The time may be zero if the font file loader does not expose file time. + /// + STDMETHOD(GetFileTime)(_Out_ FILETIME* lastWriteTime) PURE; + + /// + /// Get the locality of this font face reference. You can always successfully + /// create a font face from a fully local font. Attempting to create a font + /// face on a remote or partially local font may fail with DWRITE_E_REMOTEFONT. + /// This function may change between calls depending on background downloads + /// and whether cached data expires. + /// + STDMETHOD_(DWRITE_LOCALITY, GetLocality)() PURE; + + /// + /// Adds a request to the font download queue (IDWriteFontDownloadQueue). + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(EnqueueFontDownloadRequest)() PURE; + + /// + /// Adds a request to the font download queue (IDWriteFontDownloadQueue). + /// + /// Array of characters to download. + /// The number of elements in the character array. + /// + /// Standard HRESULT error code. + /// + /// + /// Downloading a character involves downloading every glyph it depends on + /// directly or indirectly, via font tables (cmap, GSUB, COLR, glyf). + /// + STDMETHOD(EnqueueCharacterDownloadRequest)( + _In_reads_(characterCount) WCHAR const* characters, + UINT32 characterCount + ) PURE; + + /// + /// Adds a request to the font download queue (IDWriteFontDownloadQueue). + /// + /// Array of glyph indices to download. + /// The number of elements in the glyph index array. + /// + /// Standard HRESULT error code. + /// + /// + /// Downloading a glyph involves downloading any other glyphs it depends on + /// from the font tables (GSUB, COLR, glyf). + /// + STDMETHOD(EnqueueGlyphDownloadRequest)( + _In_reads_(glyphCount) UINT16 const* glyphIndices, + UINT32 glyphCount + ) PURE; + + /// + /// Adds a request to the font download queue (IDWriteFontDownloadQueue). + /// + /// Offset of the fragment from the beginning of the font file. + /// Size of the fragment in bytes. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(EnqueueFileFragmentDownloadRequest)( + UINT64 fileOffset, + UINT64 fragmentSize + ) PURE; +}; + + +/// +/// The IDWriteFont interface represents a font in a font collection. +/// +interface DWRITE_DECLARE_INTERFACE("29748ED6-8C9C-4A6A-BE0B-D912E8538944") IDWriteFont3 : public IDWriteFont2 +{ + /// + /// Creates a font face object for the font. + /// + /// Receives a pointer to the newly created font face object. + /// + /// Standard HRESULT error code. The function returns DWRITE_E_REMOTEFONT if it could not construct a remote font. + /// + STDMETHOD(CreateFontFace)( + _COM_Outptr_ IDWriteFontFace3** fontFace + ) PURE; + + using IDWriteFont::CreateFontFace; + + /// + /// Compares two instances of a font references for equality. + /// + STDMETHOD_(BOOL, Equals)(IDWriteFont* font) PURE; + + /// + /// Return a font face reference identifying this font. + /// + /// A uniquely identifying reference to a font face. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontFaceReference)( + _COM_Outptr_ IDWriteFontFaceReference** fontFaceReference + ) PURE; + + /// + /// Determines whether the font supports the specified character. + /// + /// Unicode (UCS-4) character value. + /// + /// Returns TRUE if the font has the specified character, FALSE if not. + /// + STDMETHOD_(BOOL, HasCharacter)( + UINT32 unicodeValue + ) PURE; + + using IDWriteFont::HasCharacter; + + /// + /// Gets the current locality of the font. + /// + /// + /// The locality enumeration. For fully local files, the result will always + /// be DWRITE_LOCALITY_LOCAL. A downloadable file may be any of the states, + /// and this function may change between calls. + /// + /// + /// The locality enumeration. + /// + STDMETHOD_(DWRITE_LOCALITY, GetLocality)() PURE; +}; + + +/// +/// The interface that represents an absolute reference to a font face. +/// It contains font face type, appropriate file references and face identification data. +/// Various font data such as metrics, names and glyph outlines is obtained from IDWriteFontFace. +/// +interface DWRITE_DECLARE_INTERFACE("D37D7598-09BE-4222-A236-2081341CC1F2") IDWriteFontFace3 : public IDWriteFontFace2 +{ + /// + /// Return a font face reference identifying this font. + /// + /// A uniquely identifying reference to a font face. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontFaceReference)( + _COM_Outptr_ IDWriteFontFaceReference** fontFaceReference + ) PURE; + + /// + /// Gets the PANOSE values from the font, used for font selection and + /// matching. + /// + /// PANOSE structure to fill in. + /// + /// The function does not simulate these, such as substituting a weight or + /// proportion inferred on other values. If the font does not specify them, + /// they are all set to 'any' (0). + /// + STDMETHOD_(void, GetPanose)( + _Out_ DWRITE_PANOSE* panose + ) PURE; + + /// + /// Gets the weight of the specified font. + /// + STDMETHOD_(DWRITE_FONT_WEIGHT, GetWeight)() PURE; + + /// + /// Gets the stretch (aka. width) of the specified font. + /// + STDMETHOD_(DWRITE_FONT_STRETCH, GetStretch)() PURE; + + /// + /// Gets the style (aka. slope) of the specified font. + /// + STDMETHOD_(DWRITE_FONT_STYLE, GetStyle)() PURE; + + /// + /// Creates an localized strings object that contains the weight-stretch-style family names for the font family, indexed by locale name. + /// + /// Receives a pointer to the newly created localized strings object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFamilyNames)( + _COM_Outptr_ IDWriteLocalizedStrings** names + ) PURE; + + /// + /// Gets a localized strings collection containing the weight-stretch-style face names for the font (e.g., Regular or Bold), indexed by locale name. + /// + /// Receives a pointer to the newly created localized strings object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFaceNames)( + _COM_Outptr_ IDWriteLocalizedStrings** names + ) PURE; + + /// + /// Gets a localized strings collection containing the specified informational strings, indexed by locale name. + /// + /// Identifies the string to get. + /// Receives a pointer to the newly created localized strings object. + /// Receives the value TRUE if the font contains the specified string ID or FALSE if not. + /// + /// Standard HRESULT error code. If the font does not contain the specified string, the return value is S_OK but + /// informationalStrings receives a NULL pointer and exists receives the value FALSE. + /// + STDMETHOD(GetInformationalStrings)( + DWRITE_INFORMATIONAL_STRING_ID informationalStringID, + _COM_Outptr_result_maybenull_ IDWriteLocalizedStrings** informationalStrings, + _Out_ BOOL* exists + ) PURE; + + /// + /// Determines whether the font supports the specified character. + /// + /// Unicode (UCS-4) character value. + /// + /// Returns TRUE if the font has the specified character, FALSE if not. + /// + STDMETHOD_(BOOL, HasCharacter)( + UINT32 unicodeValue + ) PURE; + + /// + /// Determines the recommended text rendering and grid-fit mode to be used based on the + /// font, size, world transform, and measuring mode. + /// + /// Logical font size in DIPs. + /// Number of pixels per logical inch in the horizontal direction. + /// Number of pixels per logical inch in the vertical direction. + /// Specifies the world transform. + /// Specifies the quality of the graphics system's outline rendering, + /// affects the size threshold above which outline rendering is used. + /// Specifies the method used to measure during text layout. For proper + /// glyph spacing, the function returns a rendering mode that is compatible with the specified + /// measuring mode. + /// Rendering parameters object. This parameter is necessary in case the rendering parameters + /// object overrides the rendering mode. + /// Receives the recommended rendering mode. + /// Receives the recommended grid-fit mode. + /// + /// This method should be used to determine the actual rendering mode in cases where the rendering + /// mode of the rendering params object is DWRITE_RENDERING_MODE_DEFAULT, and the actual grid-fit + /// mode when the rendering params object is DWRITE_GRID_FIT_MODE_DEFAULT. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetRecommendedRenderingMode)( + FLOAT fontEmSize, + FLOAT dpiX, + FLOAT dpiY, + _In_opt_ DWRITE_MATRIX const* transform, + BOOL isSideways, + DWRITE_OUTLINE_THRESHOLD outlineThreshold, + DWRITE_MEASURING_MODE measuringMode, + _In_opt_ IDWriteRenderingParams* renderingParams, + _Out_ DWRITE_RENDERING_MODE1* renderingMode, + _Out_ DWRITE_GRID_FIT_MODE* gridFitMode + ) PURE; + + using IDWriteFontFace2::GetRecommendedRenderingMode; + + /// + /// Determines whether the character is locally downloaded from the font. + /// + /// Unicode (UCS-4) character value. + /// + /// Returns TRUE if the font has the specified character locally available, + /// FALSE if not or if the font does not support that character. + /// + STDMETHOD_(BOOL, IsCharacterLocal)( + UINT32 unicodeValue + ) PURE; + + /// + /// Determines whether the glyph is locally downloaded from the font. + /// + /// Glyph identifier. + /// + /// Returns TRUE if the font has the specified glyph locally available. + /// + STDMETHOD_(BOOL, IsGlyphLocal)( + UINT16 glyphId + ) PURE; + + /// + /// Determines whether the specified characters are local. + /// + /// Array of characters. + /// The number of elements in the character array. + /// Specifies whether to enqueue a download request + /// if any of the specified characters are not local. + /// Receives TRUE if all of the specified characters are local, + /// FALSE if any of the specified characters are remote. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(AreCharactersLocal)( + _In_reads_(characterCount) WCHAR const* characters, + UINT32 characterCount, + BOOL enqueueIfNotLocal, + _Out_ BOOL* isLocal + ) PURE; + + /// + /// Determines whether the specified glyphs are local. + /// + /// Array of glyph indices. + /// The number of elements in the glyph index array. + /// Specifies whether to enqueue a download request + /// if any of the specified glyphs are not local. + /// Receives TRUE if all of the specified glyphs are local, + /// FALSE if any of the specified glyphs are remote. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(AreGlyphsLocal)( + _In_reads_(glyphCount) UINT16 const* glyphIndices, + UINT32 glyphCount, + BOOL enqueueIfNotLocal, + _Out_ BOOL* isLocal + ) PURE; +}; + + +/// +/// Represents a collection of strings indexed by number. +/// An IDWriteStringList is otherwise identical to IDWriteLocalizedStrings except +/// for the semantics, where localized strings are indexed on language (each +/// language has one string property) whereas a string list may contain multiple +/// strings of the same language, such as a string list of family names from a +/// font set. You can QueryInterface from an IDWriteLocalizedStrings to an +/// IDWriteStringList. +/// +interface DWRITE_DECLARE_INTERFACE("CFEE3140-1157-47CA-8B85-31BFCF3F2D0E") IDWriteStringList : public IUnknown +{ + /// + /// Gets the number of strings. + /// + STDMETHOD_(UINT32, GetCount)() PURE; + + /// + /// Gets the length in characters (not including the null terminator) of the locale name with the specified index. + /// + /// Zero-based index of the locale name. + /// Receives the length in characters, not including the null terminator. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetLocaleNameLength)( + UINT32 listIndex, + _Out_ UINT32* length + ) PURE; + + /// + /// Copies the locale name with the specified index to the specified array. + /// + /// Zero-based index of the locale name. + /// Character array that receives the locale name. + /// Size of the array in characters. The size must include space for the terminating + /// null character. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetLocaleName)( + UINT32 listIndex, + _Out_writes_z_(size) WCHAR* localeName, + UINT32 size + ) PURE; + + /// + /// Gets the length in characters (not including the null terminator) of the string with the specified index. + /// + /// Zero-based index of the string. + /// Receives the length in characters, not including the null terminator. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetStringLength)( + UINT32 listIndex, + _Out_ UINT32* length + ) PURE; + + /// + /// Copies the string with the specified index to the specified array. + /// + /// Zero-based index of the string. + /// Character array that receives the string. + /// Size of the array in characters. The size must include space for the terminating + /// null character. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetString)( + UINT32 listIndex, + _Out_writes_z_(stringBufferSize) WCHAR* stringBuffer, + UINT32 stringBufferSize + ) PURE; +}; + + +/// +/// Application-defined callback interface that receives notifications from the font +/// download queue (IDWriteFontDownloadQueue interface). Callbacks will occur on the +/// downloading thread, and objects must be prepared to handle calls on their methods +/// from other threads at any time. +/// +interface DWRITE_DECLARE_INTERFACE("B06FE5B9-43EC-4393-881B-DBE4DC72FDA7") IDWriteFontDownloadListener : public IUnknown +{ + /// + /// The DownloadCompleted method is called back on an arbitrary thread when a + /// download operation ends. + /// + /// Pointer to the download queue interface on which + /// the BeginDownload method was called. + /// Optional context object that was passed to BeginDownload. + /// AddRef is called on the context object by BeginDownload and Release is called + /// after the DownloadCompleted method returns. + /// Result of the download operation. + STDMETHOD_(void, DownloadCompleted)( + _In_ IDWriteFontDownloadQueue* downloadQueue, + _In_opt_ IUnknown* context, + HRESULT downloadResult + ) PURE; +}; + + +/// +/// Interface that enqueues download requests for remote fonts, characters, glyphs, and font fragments. +/// Provides methods to asynchronously execute a download, cancel pending downloads, and be notified of +/// download completion. Callbacks to listeners will occur on the downloading thread, and objects must +/// be must be able to handle calls on their methods from other threads at any time. +/// +interface DWRITE_DECLARE_INTERFACE("B71E6052-5AEA-4FA3-832E-F60D431F7E91") IDWriteFontDownloadQueue : public IUnknown +{ + /// + /// Registers a client-defined listener object that receives download notifications. + /// All registered listener's DownloadCompleted will be called after BeginDownload + /// completes. + /// + /// Listener object to add. + /// Receives a token value, which the caller must subsequently + /// pass to RemoveListener. + /// + /// Standard HRESULT error code. + /// + /// + /// An IDWriteFontDownloadListener can also be passed to BeginDownload via the + /// context parameter, rather than globally registered to the queue. + /// + STDMETHOD(AddListener)( + IDWriteFontDownloadListener* listener, + _Out_ UINT32* token + ) PURE; + + /// + /// Unregisters a notification handler that was previously registered using + /// AddListener. + /// + /// Token value previously returned by AddListener. + /// + /// Returns S_OK if successful or E_INVALIDARG if the specified token does not + /// correspond to a registered listener. + /// + STDMETHOD(RemoveListener)( + UINT32 token + ) PURE; + + /// + /// Determines whether the download queue is empty. Note that the queue does not + /// include requests that are already being downloaded. In other words, BeginDownload + /// clears the queue. + /// + /// + /// TRUE if the queue is empty, FALSE if there are requests pending for BeginDownload. + /// + STDMETHOD_(BOOL, IsEmpty)() PURE; + + /// + /// Begins an asynchronous download operation. The download operation executes + /// in the background until it completes or is cancelled by a CancelDownload call. + /// + /// Optional context object that is passed back to the + /// download notification handler's DownloadCompleted method. If the context object + /// implements IDWriteFontDownloadListener, its DownloadCompleted will be called + /// when done. + /// + /// Returns S_OK if a download was successfully begun, S_FALSE if the queue was + /// empty, or a standard HRESULT error code. + /// + /// + /// BeginDownload removes all download requests from the queue, transferring them + /// to a background download operation. If any previous downloads are still ongoing + /// when BeginDownload is called again, the new download does not complete until + /// the previous downloads have finished. If the queue is empty and no active + /// downloads are pending, the DownloadCompleted callback is called immediately with + /// DWRITE_DOWNLOAD_RESULT_NONE. + /// + STDMETHOD(BeginDownload)( + _In_opt_ IUnknown* context = nullptr + ) PURE; + + /// + /// Removes all download requests from the queue and cancels any active download + /// operations. This calls DownloadCompleted with DWRITE_E_DOWNLOADCANCELLED. + /// Applications should call this when shutting down if they started any + /// downloads that have not finished yet with a call to DownloadCompleted. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CancelDownload)() PURE; + + /// + /// Get the current generation number of the download queue, which is incremented + /// every time after a download completes, whether failed or successful. This cookie + /// comparison value may be used to compared against cached data to know when it is + /// stale. + /// + /// + /// The number of download queue generations. + /// + STDMETHOD_(UINT64, GetGenerationCount)() PURE; +}; + + +/// +/// The GDI interop interface provides interoperability with GDI. +/// +interface DWRITE_DECLARE_INTERFACE("4556BE70-3ABD-4F70-90BE-421780A6F515") IDWriteGdiInterop1 : public IDWriteGdiInterop +{ + /// + /// Creates a font object that matches the properties specified by the LOGFONT structure. + /// + /// Structure containing a GDI-compatible font description. + /// The font collection to search. If NULL, the local system font collection is used. + /// Receives a newly created font object if successful, or NULL in case of error. + /// + /// Standard HRESULT error code. + /// + /// + /// The only fields that matter include: lfFaceName, lfCharSet, lfWeight, lfItalic. + /// Font size and rendering mode are a rendering time property, not a font property, + /// and text decorations like underline are drawn separately from the text. If no + /// font matches the given weight, slope, and character set, the best match within + /// the given GDI family name will be returned. DWRITE_E_NOFONT is returned if there + /// is no matching font name using either the GDI family name (e.g. Arial) or the + /// full font name (e.g. Arial Bold Italic). + /// + STDMETHOD(CreateFontFromLOGFONT)( + _In_ LOGFONTW const* logFont, + _In_opt_ IDWriteFontCollection* fontCollection, + _COM_Outptr_ IDWriteFont** font + ) PURE; + + /// + /// Reads the font signature from the given font. + /// + /// Font to read font signature from. + /// Font signature from the OS/2 table, ulUnicodeRange and ulCodePageRange. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontSignature)( + _In_ IDWriteFont* font, + _Out_ FONTSIGNATURE* fontSignature + ) PURE; + + /// + /// Reads the font signature from the given font. + /// + /// Font to read font signature from. + /// Font signature from the OS/2 table, ulUnicodeRange and ulCodePageRange. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontSignature)( + _In_ IDWriteFontFace* fontFace, + _Out_ FONTSIGNATURE* fontSignature + ) PURE; + + /// + /// Get a list of matching fonts based on the LOGFONT values. Only fonts + /// of that family name will be returned. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetMatchingFontsByLOGFONT)( + _In_ LOGFONT const* logFont, + _In_ IDWriteFontSet* fontSet, + _COM_Outptr_ IDWriteFontSet** filteredSet + ) PURE; + + using IDWriteGdiInterop::CreateFontFromLOGFONT; +}; + +/// +/// Information about a formatted line of text. +/// +struct DWRITE_LINE_METRICS1 : DWRITE_LINE_METRICS +{ + /// + /// White space before the content of the line. This is included in the line height and baseline distances. + /// If the line is formatted horizontally either with a uniform line spacing or with proportional + /// line spacing, this value represents the extra space above the content. + /// + FLOAT leadingBefore; + + /// + /// White space after the content of the line. This is included in the height of the line. + /// If the line is formatted horizontally either with a uniform line spacing or with proportional + /// line spacing, this value represents the extra space below the content. + /// + FLOAT leadingAfter; +}; + +/// +/// Specify whether DWRITE_FONT_METRICS::lineGap value should be part of the line metrics. +/// +enum DWRITE_FONT_LINE_GAP_USAGE +{ + /// + /// The usage of the font line gap depends on the method used for text layout. + /// + DWRITE_FONT_LINE_GAP_USAGE_DEFAULT, + + /// + /// The font line gap is excluded from line spacing + /// + DWRITE_FONT_LINE_GAP_USAGE_DISABLED, + + /// + /// The font line gap is included in line spacing + /// + DWRITE_FONT_LINE_GAP_USAGE_ENABLED +}; + +/// +/// The DWRITE_LINE_SPACING structure specifies the parameters used to specify how to manage space between lines. +/// +struct DWRITE_LINE_SPACING +{ + /// + /// Method used to determine line spacing. + /// + DWRITE_LINE_SPACING_METHOD method; + + /// + /// Spacing between lines. + /// The interpretation of this parameter depends upon the line spacing method, as follows: + /// - default line spacing: ignored + /// - uniform line spacing: explicit distance in DIPs between lines + /// - proportional line spacing: a scaling factor to be applied to the computed line height; + /// for each line, the height of the line is computed as for default line spacing, and the scaling factor is applied to that value. + /// + FLOAT height; + + /// + /// Distance from top of line to baseline. + /// The interpretation of this parameter depends upon the line spacing method, as follows: + /// - default line spacing: ignored + /// - uniform line spacing: explicit distance in DIPs from the top of the line to the baseline + /// - proportional line spacing: a scaling factor applied to the computed baseline; for each line, + /// the baseline distance is computed as for default line spacing, and the scaling factor is applied to that value. + /// + FLOAT baseline; + + /// + /// Proportion of the entire leading distributed before the line. The allowed value is between 0 and 1.0. The remaining + /// leading is distributed after the line. It is ignored for the default and uniform line spacing methods. + /// The leading that is available to distribute before or after the line depends on the values of the height and + /// baseline parameters. + /// + FLOAT leadingBefore; + + /// + /// Specify whether DWRITE_FONT_METRICS::lineGap value should be part of the line metrics. + /// + DWRITE_FONT_LINE_GAP_USAGE fontLineGapUsage; +}; + +interface DWRITE_DECLARE_INTERFACE("F67E0EDD-9E3D-4ECC-8C32-4183253DFE70") IDWriteTextFormat2 : public IDWriteTextFormat1 +{ + /// + /// Set line spacing. + /// + /// How to manage space between lines. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetLineSpacing)(_In_ DWRITE_LINE_SPACING const* lineSpacingOptions) PURE; + + /// + /// Get line spacing. + /// + /// How to manage space between lines. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetLineSpacing)(_Out_ DWRITE_LINE_SPACING* lineSpacingOptions) PURE; + + using IDWriteTextFormat1::SetLineSpacing; + using IDWriteTextFormat1::GetLineSpacing; +}; + +interface DWRITE_DECLARE_INTERFACE("07DDCD52-020E-4DE8-AC33-6C953D83F92D") IDWriteTextLayout3 : public IDWriteTextLayout2 +{ + /// + /// Invalidates the layout, forcing layout to remeasure before calling the + /// metrics or drawing functions. This is useful if the locality of a font + /// changes, and layout should be redrawn, or if the size of a client + /// implemented IDWriteInlineObject changes. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(InvalidateLayout)() PURE; + + /// + /// Set line spacing. + /// + /// How to manage space between lines. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetLineSpacing)(_In_ DWRITE_LINE_SPACING const* lineSpacingOptions) PURE; + + /// + /// Get line spacing. + /// + /// How to manage space between lines. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetLineSpacing)(_Out_ DWRITE_LINE_SPACING* lineSpacingOptions) PURE; + + /// + /// GetLineMetrics returns properties of each line. + /// + /// The array to fill with line information. + /// The maximum size of the lineMetrics array. + /// The actual size of the lineMetrics + /// array that is needed. + /// + /// Standard HRESULT error code. + /// + /// + /// If maxLineCount is not large enough E_NOT_SUFFICIENT_BUFFER, + /// which is equivalent to HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), + /// is returned and *actualLineCount is set to the number of lines + /// needed. + /// + STDMETHOD(GetLineMetrics)( + _Out_writes_to_opt_(maxLineCount, *actualLineCount) DWRITE_LINE_METRICS1* lineMetrics, + UINT32 maxLineCount, + _Out_ UINT32* actualLineCount + ) PURE; + + using IDWriteTextLayout2::SetLineSpacing; + using IDWriteTextLayout2::GetLineSpacing; + using IDWriteTextLayout2::GetLineMetrics; +}; + + +//////////////////////////////////////////////////////////////////////////////////////////////////// + + +#if NTDDI_VERSION >= NTDDI_WIN10_RS1 + + +/// +/// Represents a color glyph run. The IDWriteFactory4::TranslateColorGlyphRun +/// method returns an ordered collection of color glyph runs of varying types +/// depending on what the font supports. +/// +/// +/// For runs without any specific color, such as PNG data, the runColor field will be zero. +/// +struct DWRITE_COLOR_GLYPH_RUN1 : DWRITE_COLOR_GLYPH_RUN +{ + /// + /// Type of glyph image format for this color run. Exactly one type will be set since + /// TranslateColorGlyphRun has already broken down the run into separate parts. + /// + DWRITE_GLYPH_IMAGE_FORMATS glyphImageFormat; + + /// + /// Measuring mode to use for this glyph run. + /// + DWRITE_MEASURING_MODE measuringMode; +}; + + +/// +/// Data for a single glyph from GetGlyphImageData. +/// +struct DWRITE_GLYPH_IMAGE_DATA +{ + /// + /// Pointer to the glyph data, be it SVG, PNG, JPEG, TIFF. + /// + _Field_size_bytes_(imageDataSize) void const* imageData; + + /// + /// Size of glyph data in bytes. + /// + UINT32 imageDataSize; + + /// + /// Unique identifier for the glyph data. Clients may use this to cache a parsed/decompressed + /// version and tell whether a repeated call to the same font returns the same data. + /// + UINT32 uniqueDataId; + + /// + /// Pixels per em of the returned data. For non-scalable raster data (PNG/TIFF/JPG), this can be larger + /// or smaller than requested from GetGlyphImageData when there isn't an exact match. + /// For scaling intermediate sizes, use: desired pixels per em * font em size / actual pixels per em. + /// + UINT32 pixelsPerEm; + + /// + /// Size of image when the format is pixel data. + /// + D2D1_SIZE_U pixelSize; + + /// + /// Left origin along the horizontal Roman baseline. + /// + D2D1_POINT_2L horizontalLeftOrigin; + + /// + /// Right origin along the horizontal Roman baseline. + /// + D2D1_POINT_2L horizontalRightOrigin; + + /// + /// Top origin along the vertical central baseline. + /// + D2D1_POINT_2L verticalTopOrigin; + + /// + /// Bottom origin along vertical central baseline. + /// + D2D1_POINT_2L verticalBottomOrigin; +}; + + +/// +/// Enumerator for an ordered collection of color glyph runs. +/// +interface DWRITE_DECLARE_INTERFACE("7C5F86DA-C7A1-4F05-B8E1-55A179FE5A35") IDWriteColorGlyphRunEnumerator1 : public IDWriteColorGlyphRunEnumerator +{ + /// + /// Gets the current color glyph run. + /// + /// Receives a pointer to the color + /// glyph run. The pointer remains valid until the next call to + /// MoveNext or until the interface is released. + /// + /// Standard HRESULT error code. An error is returned if there is + /// no current glyph run, i.e., if MoveNext has not yet been called + /// or if the end of the sequence has been reached. + /// + STDMETHOD(GetCurrentRun)( + _Outptr_ DWRITE_COLOR_GLYPH_RUN1 const** colorGlyphRun + ) PURE; + + using IDWriteColorGlyphRunEnumerator::GetCurrentRun; +}; + + +/// +/// The interface that represents an absolute reference to a font face. +/// It contains font face type, appropriate file references and face identification data. +/// Various font data such as metrics, names and glyph outlines is obtained from IDWriteFontFace. +/// +interface DWRITE_DECLARE_INTERFACE("27F2A904-4EB8-441D-9678-0563F53E3E2F") IDWriteFontFace4 : public IDWriteFontFace3 +{ + /// + /// Gets all the glyph image formats supported by the entire font (SVG, PNG, JPEG, ...). + /// + STDMETHOD_(DWRITE_GLYPH_IMAGE_FORMATS, GetGlyphImageFormats)() PURE; + + /// + /// Gets the available image formats of a specific glyph and ppem. Glyphs often have at least TrueType + /// or CFF outlines, but they may also have SVG outlines, or they may have only bitmaps + /// with no TrueType/CFF outlines. Some image formats, notably the PNG/JPEG ones, are size + /// specific and will return no match when there isn't an entry in that size range. + /// + /// + /// Glyph ids beyond the glyph count return DWRITE_GLYPH_IMAGE_FORMATS_NONE. + /// + STDMETHOD(GetGlyphImageFormats)( + UINT16 glyphId, + UINT32 pixelsPerEmFirst, + UINT32 pixelsPerEmLast, + _Out_ DWRITE_GLYPH_IMAGE_FORMATS* glyphImageFormats + ) PURE; + + /// + /// Gets a pointer to the glyph data based on the desired image format. + /// + /// + /// The glyphDataContext must be released via ReleaseGlyphImageData when done if the data is not empty, + /// similar to IDWriteFontFileStream::ReadFileFragment and IDWriteFontFileStream::ReleaseFileFragment. + /// The data pointer is valid so long as the IDWriteFontFace exists and ReleaseGlyphImageData has not + /// been called. + /// + /// + /// The DWRITE_GLYPH_IMAGE_DATA::uniqueDataId is valuable for caching purposes so that if the same + /// resource is returned more than once, an existing resource can be quickly retrieved rather than + /// needing to reparse or decompress the data. + /// + /// + /// The function only returns SVG or raster data - requesting TrueType/CFF/COLR data returns + /// DWRITE_E_INVALIDARG. Those must be drawn via DrawGlyphRun or queried using GetGlyphOutline instead. + /// Exactly one format may be requested or else the function returns DWRITE_E_INVALIDARG. + /// If the glyph does not have that format, the call is not an error, but the function returns empty data. + /// + STDMETHOD(GetGlyphImageData)( + _In_ UINT16 glyphId, + UINT32 pixelsPerEm, + DWRITE_GLYPH_IMAGE_FORMATS glyphImageFormat, + _Out_ DWRITE_GLYPH_IMAGE_DATA* glyphData, + _Outptr_result_maybenull_ void** glyphDataContext + ) PURE; + + /// + /// Releases the table data obtained earlier from ReadGlyphData. + /// + /// Opaque context from ReadGlyphData. + STDMETHOD_(void, ReleaseGlyphImageData)( + void* glyphDataContext + ) PURE; +}; + + +interface DWRITE_DECLARE_INTERFACE("4B0B5BD3-0797-4549-8AC5-FE915CC53856") IDWriteFactory4 : public IDWriteFactory3 +{ + /// + /// Translates a glyph run to a sequence of color glyph runs, which can be + /// rendered to produce a color representation of the original "base" run. + /// + /// Horizontal and vertical origin of the base glyph run in + /// pre-transform coordinates. + /// Pointer to the original "base" glyph run. + /// Optional glyph run description. + /// Which data formats TranslateColorGlyphRun + /// should split the runs into. + /// Measuring mode, needed to compute the origins + /// of each glyph. + /// Matrix converting from the client's + /// coordinate space to device coordinates (pixels), i.e., the world transform + /// multiplied by any DPI scaling. + /// Zero-based index of the color palette to use. + /// Valid indices are less than the number of palettes in the font, as returned + /// by IDWriteFontFace2::GetColorPaletteCount. + /// If the function succeeds, receives a pointer + /// to an enumerator object that can be used to obtain the color glyph runs. + /// If the base run has no color glyphs, then the output pointer is NULL + /// and the method returns DWRITE_E_NOCOLOR. + /// + /// Returns DWRITE_E_NOCOLOR if the font has no color information, the glyph run + /// does not contain any color glyphs, or the specified color palette index + /// is out of range. In this case, the client should render the original glyph + /// run. Otherwise, returns a standard HRESULT error code. + /// + /// + /// The old IDWriteFactory2::TranslateColorGlyphRun is equivalent to passing + /// DWRITE_GLYPH_IMAGE_FORMATS_TRUETYPE|CFF|COLR. + /// + STDMETHOD(TranslateColorGlyphRun)( + D2D1_POINT_2F baselineOrigin, + _In_ DWRITE_GLYPH_RUN const* glyphRun, + _In_opt_ DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription, + DWRITE_GLYPH_IMAGE_FORMATS desiredGlyphImageFormats, + DWRITE_MEASURING_MODE measuringMode, + _In_opt_ DWRITE_MATRIX const* worldAndDpiTransform, + UINT32 colorPaletteIndex, + _COM_Outptr_ IDWriteColorGlyphRunEnumerator1** colorLayers + ) PURE; + + using IDWriteFactory2::TranslateColorGlyphRun; + + /// + /// Converts glyph run placements to glyph origins. + /// + /// + /// Standard HRESULT error code. + /// + /// + /// The transform and DPI have no affect on the origin scaling. + /// They are solely used to compute glyph advances when not supplied + /// and align glyphs in pixel aligned measuring modes. + /// + STDMETHOD(ComputeGlyphOrigins)( + DWRITE_GLYPH_RUN const* glyphRun, + DWRITE_MEASURING_MODE measuringMode, + D2D1_POINT_2F baselineOrigin, + _In_opt_ DWRITE_MATRIX const* worldAndDpiTransform, + _Out_writes_(glyphRun->glyphCount) D2D1_POINT_2F* glyphOrigins + ) PURE; + + /// + /// Converts glyph run placements to glyph origins. This overload is for natural metrics, which + /// includes SVG, TrueType natural modes, and bitmap placement. + /// + STDMETHOD(ComputeGlyphOrigins)( + DWRITE_GLYPH_RUN const* glyphRun, + D2D1_POINT_2F baselineOrigin, + _Out_writes_(glyphRun->glyphCount) D2D1_POINT_2F* glyphOrigins + ) PURE; +}; + +#endif // NTDDI_VERSION >= NTDDI_WIN10_RS1 + + +//////////////////////////////////////////////////////////////////////////////////////////////////// + + +#if NTDDI_VERSION >= NTDDI_WIN10_RS2 + +interface DWRITE_DECLARE_INTERFACE("3FF7715F-3CDC-4DC6-9B72-EC5621DCCAFD") IDWriteFontSetBuilder1 : public IDWriteFontSetBuilder +{ + /// + /// Adds references to all the fonts in the specified font file. The method + /// parses the font file to determine the fonts and their properties. + /// + /// Font file reference object to add to the set. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(AddFontFile)( + _In_ IDWriteFontFile* fontFile + ) PURE; +}; + +/// +/// The IDWriteAsyncResult interface represents the result of an asynchronous +/// operation. A client can use the interface to wait for the operation to +/// complete and to get the result. +/// +interface DWRITE_DECLARE_INTERFACE("CE25F8FD-863B-4D13-9651-C1F88DC73FE2") IDWriteAsyncResult : public IUnknown +{ + /// + /// The GetWaitHandleMethod method returns a handle that can be used to wait + /// for the asynchronous operation to complete. The handle remains valid + /// until the interface is released. + /// + STDMETHOD_(HANDLE, GetWaitHandle)() PURE; + + /// + /// The GetResult method returns the result of the asynchronous operation. + /// The return value is E_PENDING if the operation has not yet completed. + /// + STDMETHOD(GetResult)() PURE; +}; + + +/// +/// DWRITE_FILE_FRAGMENT represents a range of bytes in a font file. +/// +struct DWRITE_FILE_FRAGMENT +{ + /// + /// Starting offset of the fragment from the beginning of the file. + /// + UINT64 fileOffset; + + /// + /// Size of the file fragment, in bytes. + /// + UINT64 fragmentSize; +}; + + +/// +/// IDWriteRemoteFontFileStream represents a font file stream parts of which may be +/// non-local. Non-local data must be downloaded before it can be accessed using +/// ReadFragment. The interface exposes methods to download font data and query the +/// locality of font data. +/// +/// +/// For more information, see the description of IDWriteRemoteFontFileLoader. +/// +interface DWRITE_DECLARE_INTERFACE("4DB3757A-2C72-4ED9-B2B6-1ABABE1AFF9C") IDWriteRemoteFontFileStream : public IDWriteFontFileStream +{ + /// + /// GetLocalFileSize returns the number of bytes of the font file that are + /// currently local, which should always be less than or equal to the full + /// file size returned by GetFileSize. If the locality is remote, the return + /// value is zero. If the file is fully local, the return value must be the + /// same as GetFileSize. + /// + /// Receives the local size of the file. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetLocalFileSize)( + _Out_ UINT64* localFileSize + ) PURE; + + /// + /// GetFileFragmentLocality returns information about the locality of a byte range (i.e., + /// font fragment) within the font file stream. + /// + /// Offset of the fragment from the beginning of the font file. + /// Size of the fragment in bytes. + /// Receives TRUE if the first byte of the fragment is local, FALSE if not. + /// Receives the number of contiguous bytes from the start of the + /// fragment that have the same locality as the first byte. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFileFragmentLocality)( + UINT64 fileOffset, + UINT64 fragmentSize, + _Out_ BOOL* isLocal, + _Out_range_(0, fragmentSize) UINT64* partialSize + ) PURE; + + /// + /// Gets the current locality of the file. + /// + /// + /// Returns the locality enumeration (i.e., remote, partial, or local). + /// + STDMETHOD_(DWRITE_LOCALITY, GetLocality)() PURE; + + /// + /// BeginDownload begins downloading all or part of the font file. + /// + /// Array of structures, each specifying a byte + /// range to download. + /// Number of elements in the fileFragments array. + /// This can be zero to just download file information, such as the size. + /// Receives an object that can be used to wait for + /// the asynchronous download to complete and to get the download result upon + /// completion. The result may be NULL if the download completes synchronously. + /// For example, this can happen if method determines that the requested data + /// is already local. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(BeginDownload)( + _In_ UUID const* downloadOperationID, + _In_reads_(fragmentCount) DWRITE_FILE_FRAGMENT const* fileFragments, + UINT32 fragmentCount, + _COM_Outptr_result_maybenull_ IDWriteAsyncResult** asyncResult + ) PURE; +}; + + +/// +/// Specifies the container format of a font resource. A container format is distinct from +/// a font file format (DWRITE_FONT_FILE_TYPE) because the container describes the container +/// in which the underlying font file is packaged. +/// +enum DWRITE_CONTAINER_TYPE +{ + DWRITE_CONTAINER_TYPE_UNKNOWN, + DWRITE_CONTAINER_TYPE_WOFF, + DWRITE_CONTAINER_TYPE_WOFF2 +}; + + +/// +/// The IDWriteRemoteFontFileLoader interface represents a font file loader that can access +/// remote (i.e., downloadable) fonts. The IDWriteFactory5::CreateHttpFontFileLoader method +/// returns an instance of this interface, or a client can create its own implementation. +/// +/// +/// Calls to a remote file loader or stream should never block waiting for network operations. +/// Any call that cannot succeeded immediately using local (e.g., cached) must should return +/// DWRITE_E_REMOTEFONT. This error signifies to DWrite that it should add requests to the +/// font download queue. +/// +interface DWRITE_DECLARE_INTERFACE("68648C83-6EDE-46C0-AB46-20083A887FDE") IDWriteRemoteFontFileLoader : public IDWriteFontFileLoader +{ + /// + /// Creates a remote font file stream object that encapsulates an open file resource + /// and can be used to download remote file data. + /// + /// Font file reference key that uniquely identifies the font file resource + /// within the scope of the font loader being used. + /// Size of font file reference key in bytes. + /// Pointer to the newly created font file stream. + /// + /// Standard HRESULT error code. + /// + /// + /// Unlike CreateStreamFromKey, this method can be used to create a stream for a remote file. If the file is + /// remote, the returned stream's BeginDownload method can be used to download all or part of the font file. + /// However, the stream cannot be used to get the file size or access font data unless the file is at least + /// partially local. + /// + STDMETHOD(CreateRemoteStreamFromKey)( + _In_reads_bytes_(fontFileReferenceKeySize) void const* fontFileReferenceKey, + UINT32 fontFileReferenceKeySize, + _COM_Outptr_ IDWriteRemoteFontFileStream** fontFileStream + ) PURE; + + /// + /// Gets the locality of the file resource identified by the unique key. + /// + /// Font file reference key that uniquely identifies the font file resource + /// within the scope of the font loader being used. + /// Size of font file reference key in bytes. + /// Locality of the file. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetLocalityFromKey)( + _In_reads_bytes_(fontFileReferenceKeySize) void const* fontFileReferenceKey, + UINT32 fontFileReferenceKeySize, + _Out_ DWRITE_LOCALITY* locality + ) PURE; + + /// + /// Creates a font file reference from a URL if the loader supports this capability. + /// + /// Factory used to create the font file reference. + /// Optional base URL. The base URL is used to resolve the fontFileUrl + /// if it is relative. For example, the baseUrl might be the URL of the referring document + /// that contained the fontFileUrl. + /// URL of the font resource. + /// Receives a pointer to the newly created font file reference. + /// + /// Standard HRESULT error code, or E_NOTIMPL if the loader does not implement this method. + /// + STDMETHOD(CreateFontFileReferenceFromUrl)( + IDWriteFactory* factory, + _In_opt_z_ WCHAR const* baseUrl, + _In_z_ WCHAR const* fontFileUrl, + _COM_Outptr_ IDWriteFontFile** fontFile + ) PURE; +}; + + +/// +/// The IDWriteInMemoryFontFileLoader interface enables clients to reference +/// in-memory fonts without having to implement a custom loader. The +/// IDWriteFactory5::CreateInMemoryFontFileLoader method returns an instance +/// of this interface, which the client is responsible for registering and +/// unregistering using IDWriteFactory::RegisterFontFileLoader and +/// IDWriteFactory::UnregisterFontFileLoader. +/// +interface DWRITE_DECLARE_INTERFACE("DC102F47-A12D-4B1C-822D-9E117E33043F") IDWriteInMemoryFontFileLoader : public IDWriteFontFileLoader +{ + /// + /// The CreateInMemoryFontFileReference method creates a font file reference + /// (IDWriteFontFile object) from an array of bytes. The font file reference + /// is bound to the IDWRiteInMemoryFontFileLoader instance with which it was + /// created and remains valid for as long as that loader is registered with + /// the factory. + /// + /// Factory object used to create the font file reference. + /// Pointer to a memory block containing the font data. + /// Size of the font data. + /// Optional object that owns the memory specified by + /// the fontData parameter. If this parameter is not NULL, the method stores a + /// pointer to the font data and adds a reference to the owner object. The + /// fontData pointer must remain valid until the owner object is released. If + /// this parameter is NULL, the method makes a copy of the font data. + /// Receives a pointer to the newly-created font file + /// reference. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateInMemoryFontFileReference)( + IDWriteFactory* factory, + _In_reads_bytes_(fontDataSize) void const* fontData, + UINT32 fontDataSize, + _In_opt_ IUnknown* ownerObject, + _COM_Outptr_ IDWriteFontFile** fontFile + ) PURE; + + /// + /// The GetFileCount method returns the number of font file references that + /// have been created using this loader instance. + /// + STDMETHOD_(UINT32, GetFileCount)() PURE; +}; + + +/// +/// The root factory interface for all DWrite objects. +/// +interface DWRITE_DECLARE_INTERFACE("958DB99A-BE2A-4F09-AF7D-65189803D1D3") IDWriteFactory5 : public IDWriteFactory4 +{ + /// + /// Creates an empty font set builder to add font face references + /// and create a custom font set. + /// + /// Receives a pointer to the newly created font set builder object, or nullptr in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontSetBuilder)( + _COM_Outptr_ IDWriteFontSetBuilder1** fontSetBuilder + ) PURE; + + using IDWriteFactory3::CreateFontSetBuilder; + + /// + /// The CreateInMemoryFontFileLoader method creates a loader object that can + /// be used to create font file references to in-memory fonts. The caller is + /// responsible for registering and unregistering the loader. + /// + /// Receives a pointer to the newly-created loader object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateInMemoryFontFileLoader)( + _COM_Outptr_ IDWriteInMemoryFontFileLoader** newLoader + ) PURE; + + /// + /// The CreateHttpFontFileLoader function creates a remote font file loader + /// that can create font file references from HTTP or HTTPS URLs. The caller + /// is responsible for registering and unregistering the loader. + /// + /// Optional referrer URL for HTTP requests. + /// Optional additional header fields to include + /// in HTTP requests. Each header field consists of a name followed by a colon + /// (":") and the field value, as specified by RFC 2616. Multiple header fields + /// may be separated by newlines. + /// Receives a pointer to the newly-created loader object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateHttpFontFileLoader)( + _In_opt_z_ wchar_t const* referrerUrl, + _In_opt_z_ wchar_t const* extraHeaders, + _COM_Outptr_ IDWriteRemoteFontFileLoader** newLoader + ) PURE; + + /// + /// The AnalyzeContainerType method analyzes the specified file data to determine + /// whether it is a known font container format (e.g., WOFF or WOFF2). + /// + /// + /// Returns the container type if recognized. DWRITE_CONTAINER_TYPE_UNKOWNN is + /// returned for all other files, including uncompressed font files. + /// + STDMETHOD_(DWRITE_CONTAINER_TYPE, AnalyzeContainerType)( + _In_reads_bytes_(fileDataSize) void const* fileData, + UINT32 fileDataSize + ) PURE; + + /// + /// The UnpackFontFile method unpacks font data from a container file (WOFF or + /// WOFF2) and returns the unpacked font data in the form of a font file stream. + /// + /// Container type returned by AnalyzeContainerType. + /// Pointer to the compressed data. + /// Size of the compressed data, in bytes. + /// Receives a pointer to a newly created font + /// file stream containing the uncompressed data. + /// + /// Standard HRESULT error code. The return value is E_INVALIDARG if the container + /// type is DWRITE_CONTAINER_TYPE_UNKNOWN. + /// + STDMETHOD(UnpackFontFile)( + DWRITE_CONTAINER_TYPE containerType, + _In_reads_bytes_(fileDataSize) void const* fileData, + UINT32 fileDataSize, + _COM_Outptr_ IDWriteFontFileStream** unpackedFontStream + ) PURE; +}; + +#endif // NTDDI_VERSION >= NTDDI_WIN10_RS2 + + +//////////////////////////////////////////////////////////////////////////////////////////////////// + + +#if NTDDI_VERSION >= NTDDI_WIN10_RS3 + + +interface IDWriteFontResource; +interface IDWriteFontFace5; +interface IDWriteFontFaceReference1; +interface IDWriteFontSet1; +interface IDWriteFontCollection2; +interface IDWriteTextFormat3; +interface IDWriteFontSetBuilder2; + + +/// +/// Creates an OpenType tag for a font axis. +/// +#define DWRITE_MAKE_FONT_AXIS_TAG(a,b,c,d) (static_cast(DWRITE_MAKE_OPENTYPE_TAG(a,b,c,d))) + + +/// +/// Four character identifier for a font axis. +/// +/// +/// Use DWRITE_MAKE_FONT_AXIS_TAG() to create a custom one. +/// +enum DWRITE_FONT_AXIS_TAG : UINT32 +{ + DWRITE_FONT_AXIS_TAG_WEIGHT = DWRITE_MAKE_FONT_AXIS_TAG('w','g','h','t'), + DWRITE_FONT_AXIS_TAG_WIDTH = DWRITE_MAKE_FONT_AXIS_TAG('w','d','t','h'), + DWRITE_FONT_AXIS_TAG_SLANT = DWRITE_MAKE_FONT_AXIS_TAG('s','l','n','t'), + DWRITE_FONT_AXIS_TAG_OPTICAL_SIZE = DWRITE_MAKE_FONT_AXIS_TAG('o','p','s','z'), + DWRITE_FONT_AXIS_TAG_ITALIC = DWRITE_MAKE_FONT_AXIS_TAG('i','t','a','l'), +}; + + +/// +/// Value for a font axis, used when querying and creating font instances. +/// +struct DWRITE_FONT_AXIS_VALUE +{ + /// + /// Four character identifier of the font axis (weight, width, slant, italic...). + /// + DWRITE_FONT_AXIS_TAG axisTag; + + /// + /// Value for the given axis, with the meaning and range depending on the axis semantics. + /// Certain well known axes have standard ranges and defaults, such as weight (1..1000, default=400), + /// width (>0, default=100), slant (-90..90, default=-20), and italic (0 or 1). + /// + FLOAT value; +}; + + +/// +/// Minimum and maximum range of a font axis. +/// +struct DWRITE_FONT_AXIS_RANGE +{ + /// + /// Four character identifier of the font axis (weight, width, slant, italic...). + /// + DWRITE_FONT_AXIS_TAG axisTag; + + /// + /// Minimum value supported by this axis. + /// + FLOAT minValue; + + /// + /// Maximum value supported by this axis. The maximum can equal the minimum. + /// + FLOAT maxValue; +}; + + +/// +/// How font families are grouped together, used by IDWriteFontCollection. +/// +enum DWRITE_FONT_FAMILY_MODEL +{ + /// + /// Families are grouped by the typographic family name preferred by the font author. The family can contain as + /// many face as the font author wants. + /// This corresponds to the DWRITE_FONT_PROPERTY_ID_TYPOGRAPHIC_FAMILY_NAME. + /// + DWRITE_FONT_FAMILY_MODEL_TYPOGRAPHIC, + + /// + /// Families are grouped by the weight-stretch-style family name, where all faces that differ only by those three + /// axes are grouped into the same family, but any other axes go into a distinct family. For example, the Sitka + /// family with six different optical sizes yields six separate families (Sitka Caption, Display, Text, Subheading, + /// Heading, Banner...). This corresponds to the DWRITE_FONT_PROPERTY_ID_WEIGHT_STRETCH_STYLE_FAMILY_NAME. + /// + DWRITE_FONT_FAMILY_MODEL_WEIGHT_STRETCH_STYLE, +}; + + +/// +/// Apply certain axes automatically in layout during font selection. +/// +enum DWRITE_AUTOMATIC_FONT_AXES +{ + /// + /// No axes are automatically applied. + /// + DWRITE_AUTOMATIC_FONT_AXES_NONE = 0x0000, + + /// + /// Automatically pick an appropriate optical value based on the font size (via SetFontSize) when no value is + /// specified via DWRITE_FONT_AXIS_TAG_OPTICAL_SIZE. Callers can still explicitly apply the 'opsz' value over + /// text ranges via SetFontAxisValues, which take priority. + /// + DWRITE_AUTOMATIC_FONT_AXES_OPTICAL_SIZE = 0x0001, +}; + +#ifdef DEFINE_ENUM_FLAG_OPERATORS +DEFINE_ENUM_FLAG_OPERATORS(DWRITE_AUTOMATIC_FONT_AXES); +#endif + + +/// +/// Attributes for a font axis. +/// +enum DWRITE_FONT_AXIS_ATTRIBUTES +{ + /// + /// No attributes. + /// + DWRITE_FONT_AXIS_ATTRIBUTES_NONE = 0x0000, + + /// + /// This axis is implemented as a variation axis in a variable font, with a continuous range of + /// values, such as a range of weights from 100..900. Otherwise it is either a static axis that + /// holds a single point, or it has a range but doesn't vary, such as optical size in the Skia + /// Heading font which covers a range of points but doesn't interpolate any new glyph outlines. + /// + DWRITE_FONT_AXIS_ATTRIBUTES_VARIABLE = 0x0001, + + /// + /// This axis is recommended to be remain hidden in user interfaces. The font developer may + /// recommend this if an axis is intended to be accessed only programmatically, or is meant for + /// font-internal or font-developer use only. The axis may be exposed in lower-level font + /// inspection utilities, but should not be exposed in common or even advanced-mode user + /// interfaces in content-authoring apps. + /// + DWRITE_FONT_AXIS_ATTRIBUTES_HIDDEN = 0x0002, +}; + +#ifdef DEFINE_ENUM_FLAG_OPERATORS +DEFINE_ENUM_FLAG_OPERATORS(DWRITE_FONT_AXIS_ATTRIBUTES); +#endif + + +interface DWRITE_DECLARE_INTERFACE("F3744D80-21F7-42EB-B35D-995BC72FC223") IDWriteFactory6 : public IDWriteFactory5 +{ + /// + /// Creates a reference to a specific font instance within a file. + /// + /// User provided font file representing the font face. + /// The zero based index of a font face in cases when the font files contain a collection of font faces. + /// If the font files contain a single face, this value should be zero. + /// Font face simulation flags for algorithmic emboldening and italicization. + /// List of font axis values. + /// Number of font axis values. + /// Receives a pointer to the newly created font face reference object, or nullptr in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontFaceReference)( + _In_ IDWriteFontFile* fontFile, + UINT32 faceIndex, + DWRITE_FONT_SIMULATIONS fontSimulations, + _In_reads_(fontAxisValueCount) DWRITE_FONT_AXIS_VALUE const* fontAxisValues, + UINT32 fontAxisValueCount, + _COM_Outptr_ IDWriteFontFaceReference1** fontFaceReference + ) PURE; + + using IDWriteFactory5::CreateFontFaceReference; + + /// + /// Creates a font resource given a font file and face index. + /// + /// User provided font file representing the font face. + /// The zero based index of a font face in cases when the font files contain a collection of font faces. + /// If the font files contain a single face, this value should be zero. + /// Receives a pointer to the newly created font resource object, or nullptr in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontResource)( + _In_ IDWriteFontFile* fontFile, + UINT32 faceIndex, + _COM_Outptr_ IDWriteFontResource** fontResource + ) PURE; + + /// + /// Retrieves the set of system fonts. + /// + /// Include cloud fonts or only locally installed ones. + /// Receives a pointer to the font set object, or nullptr in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetSystemFontSet)( + BOOL includeDownloadableFonts, + _COM_Outptr_ IDWriteFontSet1** fontSet + ) PURE; + + using IDWriteFactory3::GetSystemFontSet; + + /// + /// Retrieves a collection of fonts grouped into families. + /// + /// Include cloud fonts or only locally installed ones. + /// How to group families in the collection. + /// Receives a pointer to the font collection object, or nullptr in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetSystemFontCollection)( + BOOL includeDownloadableFonts, + DWRITE_FONT_FAMILY_MODEL fontFamilyModel, + _COM_Outptr_ IDWriteFontCollection2** fontCollection + ) PURE; + + using IDWriteFactory::GetSystemFontCollection; + using IDWriteFactory3::GetSystemFontCollection; + + /// + /// Create a collection of fonts grouped into families from a font set. + /// + /// A set of fonts to use to build the collection. + /// How to group families in the collection. + /// Receives a pointer to the newly created font collection object, or nullptr in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontCollectionFromFontSet)( + IDWriteFontSet* fontSet, + DWRITE_FONT_FAMILY_MODEL fontFamilyModel, + _COM_Outptr_ IDWriteFontCollection2** fontCollection + ) PURE; + + using IDWriteFactory5::CreateFontCollectionFromFontSet; + + /// + /// Creates an empty font set builder to add font instances and create a custom font set. + /// + /// Receives a pointer to the newly created font set builder object, or nullptr in case of failure. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontSetBuilder)( + _COM_Outptr_ IDWriteFontSetBuilder2** fontSetBuilder + ) PURE; + + using IDWriteFactory3::CreateFontSetBuilder; + using IDWriteFactory5::CreateFontSetBuilder; + + /// + /// Create a text format object used for text layout. + /// + /// Name of the font family from the collection. + /// Font collection, with nullptr indicating the system font collection. + /// List of font axis values. + /// Number of font axis values. + /// Logical size of the font in DIP units. + /// Locale name (e.g. "ja-JP", "en-US", "ar-EG"). + /// Receives a pointer to the newly created text format object, or nullptr in case of failure. + /// + /// Standard HRESULT error code. + /// + /// + /// If fontCollection is nullptr, the system font collection is used, grouped by typographic family name + /// (DWRITE_FONT_FAMILY_MODEL_TYPOGRAPHIC) without downloadable fonts. + /// + STDMETHOD(CreateTextFormat)( + _In_z_ WCHAR const* fontFamilyName, + _In_opt_ IDWriteFontCollection* fontCollection, + _In_reads_(fontAxisValueCount) DWRITE_FONT_AXIS_VALUE const* fontAxisValues, + UINT32 fontAxisValueCount, + FLOAT fontSize, + _In_z_ WCHAR const* localeName, + _COM_Outptr_ IDWriteTextFormat3** textFormat + ) PURE; + + using IDWriteFactory::CreateTextFormat; +}; + + +interface DWRITE_DECLARE_INTERFACE("98EFF3A5-B667-479A-B145-E2FA5B9FDC29") IDWriteFontFace5 : public IDWriteFontFace4 +{ + /// + /// Get the number of axes defined by the font. This includes both static and variable axes. + /// + STDMETHOD_(UINT32, GetFontAxisValueCount)() PURE; + + /// + /// Get the list of axis values used by the font. + /// + /// List of font axis values. + /// Maximum number of font axis values to write. + /// + /// Standard HRESULT error code, or E_INVALIDARG if fontAxisValueCount doesn't match GetFontAxisValueCount. + /// + /// + /// The values are returned in the canonical order defined by the font, clamped to the actual range supported, + /// not specifically the same axis value array passed to CreateFontFace. + /// + STDMETHOD(GetFontAxisValues)( + _Out_writes_(fontAxisValueCount) DWRITE_FONT_AXIS_VALUE* fontAxisValues, + UINT32 fontAxisValueCount + ) PURE; + + /// + /// Whether this font's resource supports any variable axes. When true, at least one DWRITE_FONT_AXIS_RANGE + /// in the font resource has a non-empty range (maximum > minimum). + /// + STDMETHOD_(BOOL, HasVariations)() PURE; + + /// + /// Get the underlying font resource for this font face. A caller can use that to query information on the resource + /// or recreate a new font face instance with different axis values. + /// + /// Newly created font resource object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontResource)( + _COM_Outptr_ IDWriteFontResource** fontResource + ) PURE; + + /// + /// Compares two instances of a font face for equality. + /// + STDMETHOD_(BOOL, Equals)(IDWriteFontFace* fontFace) PURE; +}; + + +/// +/// Interface to return axis information for a font resource and create specific font face instances. +/// +interface DWRITE_DECLARE_INTERFACE("1F803A76-6871-48E8-987F-B975551C50F2") IDWriteFontResource : public IUnknown +{ + /// + /// Get the font file of the resource. + /// + /// Receives a pointer to the font file. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontFile)( + _COM_Outptr_ IDWriteFontFile** fontFile + ) PURE; + + /// + /// Obtains the zero-based index of the font face in its font file. If the font files contain a single face, + /// the return value is zero. + /// + STDMETHOD_(UINT32, GetFontFaceIndex)() PURE; + + /// + /// Get the number of axes supported by the font resource. This includes both static and variable axes. + /// + STDMETHOD_(UINT32, GetFontAxisCount)() PURE; + + /// + /// Get the default values for all axes supported by the font resource. + /// + /// List of font axis values. + /// Maximum number of font axis values to write. + /// + /// Different font resources may have different defaults. + /// For OpenType 1.8 fonts, these values come from the STAT and fvar tables. + /// For older fonts without a STAT table, weight-width-slant-italic are read from the OS/2 table. + /// + /// + /// Standard HRESULT error code, or E_INVALIDARG if fontAxisValueCount doesn't match GetFontAxisCount. + /// + STDMETHOD(GetDefaultFontAxisValues)( + _Out_writes_(fontAxisValueCount) DWRITE_FONT_AXIS_VALUE* fontAxisValues, + UINT32 fontAxisValueCount + ) PURE; + + /// + /// Get ranges of each axis. + /// + /// + /// Total number of axis ranges + /// + /// Standard HRESULT error code, or E_INVALIDARG if fontAxisRangeCount doesn't match GetFontAxisCount. + /// + /// + /// Non-varying axes will have empty ranges (minimum==maximum). + /// + STDMETHOD(GetFontAxisRanges)( + _Out_writes_(fontAxisRangeCount) DWRITE_FONT_AXIS_RANGE* fontAxisRanges, + UINT32 fontAxisRangeCount + ) PURE; + + /// + /// Gets attributes about the given axis, such as whether the font author recommends to hide the axis + /// in user interfaces. + /// + /// Font axis, from 0 to GetFontAxisValueCount - 1. + /// Receives the attributes for the given axis. + /// + /// Attributes for a font axis, or NONE if axisIndex is beyond the font count. + /// + STDMETHOD_(DWRITE_FONT_AXIS_ATTRIBUTES, GetFontAxisAttributes)( + UINT32 axisIndex + ) PURE; + + /// + /// Gets the localized names of a font axis. + /// + /// Font axis, from 0 to GetFontAxisCount - 1. + /// Receives a pointer to the newly created localized strings object. + /// + /// The font author may not have supplied names for some font axes. The localized strings + /// will be empty in that case. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetAxisNames)( + UINT32 axisIndex, + _COM_Outptr_ IDWriteLocalizedStrings** names + ) PURE; + + /// + /// Get the number of named values for a specific axis. + /// + /// Font axis, from 0 to GetFontAxisCount - 1. + /// + /// Number of named values. + /// + STDMETHOD_(UINT32, GetAxisValueNameCount)( + UINT32 axisIndex + ) PURE; + + /// + /// Gets the localized names of specific values for a font axis. + /// + /// Font axis, from 0 to GetFontAxisCount - 1. + /// Value index, from 0 to GetAxisValueNameCount - 1. + /// Range of the named value. + /// Receives a pointer to the newly created localized strings object. + /// + /// The font author may not have supplied names for some font axis values. The localized strings + /// will be empty in that case. The range may be a single point, where minimum == maximum. + /// All ranges are in ascending order by axisValueIndex. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetAxisValueNames)( + UINT32 axisIndex, + UINT32 axisValueIndex, + _Out_ DWRITE_FONT_AXIS_RANGE* fontAxisRange, + _COM_Outptr_ IDWriteLocalizedStrings** names + ) PURE; + + /// + /// Whether this font's resource supports any variable axes. When true, at least one DWRITE_FONT_AXIS_RANGE + /// in the font resource has a non-empty range (maximum > minimum). + /// + STDMETHOD_(BOOL, HasVariations)() PURE; + + /// + /// Creates a font face instance with specific axis values. + /// + /// Font face simulation flags for algorithmic emboldening and italicization. + /// List of font axis values. + /// Number of font axis values. + /// Receives a pointer to the newly created font face object, or nullptr on failure. + /// + /// The passed input axis values are permitted to be a subset or superset of all the ones actually supported by + /// the font. Any unspecified axes use their default values, values beyond the ranges are clamped, and any + /// non-varying axes have no effect. + /// + /// + /// Standard HRESULT error code, or DWRITE_E_REMOTEFONT if the face is not local. + /// + STDMETHOD(CreateFontFace)( + DWRITE_FONT_SIMULATIONS fontSimulations, + _In_reads_(fontAxisValueCount) DWRITE_FONT_AXIS_VALUE const* fontAxisValues, + UINT32 fontAxisValueCount, + _COM_Outptr_ IDWriteFontFace5** fontFace + ) PURE; + + /// + /// Creates a font face reference with specific axis values. + /// + /// Font face simulation flags for algorithmic emboldening and italicization. + /// List of font axis values. + /// Number of font axis values. + /// Receives a pointer to the newly created font face reference object, or nullptr on failure. + /// + /// The passed input axis values are permitted to be a subset or superset of all the ones actually supported by + /// the font. Any unspecified axes use their default values, values beyond the ranges are clamped, and any + /// non-varying axes have no effect. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(CreateFontFaceReference)( + DWRITE_FONT_SIMULATIONS fontSimulations, + _In_reads_(fontAxisValueCount) DWRITE_FONT_AXIS_VALUE const* fontAxisValues, + UINT32 fontAxisValueCount, + _COM_Outptr_ IDWriteFontFaceReference1** fontFaceReference + ) PURE; +}; + + +interface DWRITE_DECLARE_INTERFACE("C081FE77-2FD1-41AC-A5A3-34983C4BA61A") IDWriteFontFaceReference1 : public IDWriteFontFaceReference +{ + /// + /// Creates a font face from the reference for use with layout, shaping, or rendering. + /// + /// Newly created font face object, or nullptr in the case of failure. + /// + /// Standard HRESULT error code. + /// + /// + /// This function can fail with DWRITE_E_REMOTEFONT if the font is not local. + /// + STDMETHOD(CreateFontFace)( + _COM_Outptr_ IDWriteFontFace5** fontFace + ) PURE; + + using IDWriteFontFaceReference::CreateFontFace; + + /// + /// Get the number of axes specified by the reference. + /// + STDMETHOD_(UINT32, GetFontAxisValueCount)() PURE; + + /// + /// Get the list of font axis values specified by the reference. + /// + /// List of font axis values. + /// Number of font axis values. + /// + /// Standard HRESULT error code, or E_INVALIDARG if fontAxisValueCount doesn't match GetFontAxisValueCount. + /// + STDMETHOD(GetFontAxisValues)( + _Out_writes_(fontAxisValueCount) DWRITE_FONT_AXIS_VALUE* fontAxisValues, + UINT32 fontAxisValueCount + ) PURE; +}; + + +interface DWRITE_DECLARE_INTERFACE("EE5BA612-B131-463C-8F4F-3189B9401E45") IDWriteFontSetBuilder2 : public IDWriteFontSetBuilder1 +{ + /// + /// Adds a font to the set being built, with the caller supplying enough information to search on + /// and determine axis ranges, avoiding the need to open the potentially non-local font. + /// + /// Font file reference object to add to the set. + /// The zero based index of a font face in a collection. + /// Font face simulation flags for algorithmic emboldening and italicization. + /// List of font axis values. + /// Number of font axis values. + /// List of axis ranges. + /// Number of axis ranges. + /// List of properties to associate with the reference. + /// How many properties are defined. + /// + /// Standard HRESULT error code. + /// + /// + /// The font properties should include at least a family (typographic or weight/style/stretch). + /// Otherwise the font would be accessible in the IDWriteFontSet only by index, not name. + /// + STDMETHOD(AddFont)( + _In_ IDWriteFontFile* fontFile, + UINT32 fontFaceIndex, + DWRITE_FONT_SIMULATIONS fontSimulations, + _In_reads_(fontAxisValueCount) DWRITE_FONT_AXIS_VALUE const* fontAxisValues, + UINT32 fontAxisValueCount, + _In_reads_(fontAxisRangeCount) DWRITE_FONT_AXIS_RANGE const* fontAxisRanges, + UINT32 fontAxisRangeCount, + _In_reads_(propertyCount) DWRITE_FONT_PROPERTY const* properties, + UINT32 propertyCount + ) PURE; + + /// + /// Adds references to all the fonts in the specified font file. The method + /// parses the font file to determine the fonts and their properties. + /// + /// Absolute file path to add to the font set. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(AddFontFile)( + _In_z_ WCHAR const* filePath + ) PURE; + + using IDWriteFontSetBuilder1::AddFontFile; +}; + + +interface DWRITE_DECLARE_INTERFACE("7E9FDA85-6C92-4053-BC47-7AE3530DB4D3") IDWriteFontSet1 : public IDWriteFontSet +{ + /// + /// Generates a matching font set based on the requested inputs, ordered so that nearer matches are earlier. + /// + /// Font property of interest, such as typographic family or weight/stretch/style family. + /// List of font axis values. + /// Number of font axis values. + /// Prioritized list of fonts that match the properties, or nullptr on failure. + /// + /// Standard HRESULT error code. + /// + /// + /// This can yield distinct items that were not in the original font set, including items with simulation flags + /// (if they would be a closer match to the request) and instances that were not named by the font author. + /// Items from the same font resources are collapsed into one, the closest possible match. + /// + STDMETHOD(GetMatchingFonts)( + _In_opt_ DWRITE_FONT_PROPERTY const* fontProperty, + _In_reads_(fontAxisValueCount) DWRITE_FONT_AXIS_VALUE const* fontAxisValues, + UINT32 fontAxisValueCount, + _COM_Outptr_ IDWriteFontSet1** matchingFonts + ) PURE; + + /// + /// Returns a font set that contains only the first occurrence of each font resource in the given set. + /// + /// New font set consisting of single default instances from font resources. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFirstFontResources)( + _COM_Outptr_ IDWriteFontSet1** filteredFontSet + ) PURE; + + /// + /// Returns a subset of fonts filtered by the given properties. + /// + /// List of properties to filter using. + /// How many properties to filter. + /// Select any property rather rather than the intersection of them all. + /// Subset of fonts that match the properties, or nullptr on failure. + /// + /// Standard HRESULT error code. + /// + /// + /// If no fonts matched the filter, the returned subset will be empty (GetFontCount returns 0). + /// The subset will always be equal to or less than the original set. + /// + STDMETHOD(GetFilteredFonts)( + _In_reads_opt_(propertyCount) DWRITE_FONT_PROPERTY const* properties, + UINT32 propertyCount, + BOOL selectAnyProperty, + _COM_Outptr_ IDWriteFontSet1** filteredFontSet + ) PURE; + + /// + /// Returns a subset of fonts filtered by the given ranges, endpoint-inclusive. + /// + /// List of axis ranges. + /// Number of axis ranges. + /// Select any range rather rather than the intersection of them all. + /// Subset of fonts that fall within the ranges, or nullptr on failure. + /// + /// Standard HRESULT error code. + /// + /// + /// If no fonts matched the filter, the subset will be empty (GetFontCount returns 0), but the function does not + /// return an error. The subset will always be equal to or less than the original set. + /// + STDMETHOD(GetFilteredFonts)( + _In_reads_(fontAxisRangeCount) DWRITE_FONT_AXIS_RANGE const* fontAxisRanges, + UINT32 fontAxisRangeCount, + BOOL selectAnyRange, + _COM_Outptr_ IDWriteFontSet1** filteredFontSet + ) PURE; + + /// + /// Returns a subset of fonts filtered by the given indices. + /// + /// Array of indices, each index from [0..GetFontCount() - 1]. + /// Number of indices. + /// Subset of fonts that come from the given indices, or nullptr on failure. + /// + /// Standard HRESULT error code. + /// + /// + /// The indices can come in any order, meaning this function can produce a new set with items removed, duplicated, + /// or reordered from the original. If zero indices were passed, an empty font set is returned. + /// + STDMETHOD(GetFilteredFonts)( + _In_reads_(indexCount) UINT32 const* indices, + UINT32 indexCount, + _COM_Outptr_ IDWriteFontSet1** filteredFontSet + ) PURE; + + /// + /// Get all the item indices filtered by the given properties. + /// + /// List of properties to filter using. + /// How many properties to filter. + /// Select any property rather rather than the intersection of them all. + /// Ascending array of indices [0..GetFontCount() - 1]. + /// Number of indices. + /// Actual number of indices written or needed [0..GetFontCount()-1]. + /// + /// E_NOT_SUFFICIENT_BUFFER if the buffer is too small, with actualIndexCount set to the needed size. + /// The actualIndexCount will always be <= IDwriteFontSet::GetFontCount. + /// + STDMETHOD(GetFilteredFontIndices)( + _In_reads_(propertyCount) DWRITE_FONT_PROPERTY const* properties, + UINT32 propertyCount, + BOOL selectAnyProperty, + _Out_writes_(maxIndexCount) UINT32* indices, + UINT32 maxIndexCount, + _Out_ UINT32* actualIndexCount + ) PURE; + + /// + /// Get all the item indices filtered by the given ranges. + /// + /// List of axis ranges. + /// Number of axis ranges. + /// Select any property rather rather than the intersection of them all. + /// Ascending array of indices [0..GetFontCount() - 1]. + /// Number of indices. + /// Actual number of indices written or needed [0..GetFontCount()-1]. + /// + /// E_NOT_SUFFICIENT_BUFFER if the buffer is too small, with actualIndexCount set to the needed size. + /// + STDMETHOD(GetFilteredFontIndices)( + _In_reads_(fontAxisRangeCount) DWRITE_FONT_AXIS_RANGE const* fontAxisRanges, + UINT32 fontAxisRangeCount, + BOOL selectAnyRange, + _Out_writes_(maxIndexCount) UINT32* indices, + UINT32 maxIndexCount, + _Out_ UINT32* actualIndexCount + ) PURE; + + /// + /// Gets all axis ranges in the font set, the union of all contained items. + /// + /// List of axis ranges. + /// Number of axis ranges. + /// Actual number of axis ranges written or needed. + /// + /// E_NOT_SUFFICIENT_BUFFER if the buffer is too small, with actualFontAxisRangeCount set to the needed size. + /// + STDMETHOD(GetFontAxisRanges)( + _Out_writes_(maxFontAxisRangeCount) DWRITE_FONT_AXIS_RANGE* fontAxisRanges, + UINT32 maxFontAxisRangeCount, + _Out_ UINT32* actualFontAxisRangeCount + ) PURE; + + /// + /// Get the axis ranges of a single item. + /// + /// Zero-based index of the font in the set. + /// List of axis ranges. + /// Number of axis ranges. + /// Actual number of axis ranges written or needed. + /// + /// E_NOT_SUFFICIENT_BUFFER if the buffer is too small, with actualFontAxisRangeCount set to the needed size. + /// + STDMETHOD(GetFontAxisRanges)( + UINT32 listIndex, + _Out_writes_(maxFontAxisRangeCount) DWRITE_FONT_AXIS_RANGE* fontAxisRanges, + UINT32 maxFontAxisRangeCount, + _Out_ UINT32* actualFontAxisRangeCount + ) PURE; + + /// + /// Get the font face reference of a single item. + /// + /// Zero-based index of the font item in the set. + /// Receives a pointer to the font face reference. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontFaceReference)( + UINT32 listIndex, + _COM_Outptr_ IDWriteFontFaceReference1** fontFaceReference + ) PURE; + + using IDWriteFontSet::GetFontFaceReference; + + /// + /// Create the font resource of a single item. + /// + /// Zero-based index of the font item in the set. + /// Receives a pointer to the font resource. + /// + /// Standard HRESULT error code, or DWRITE_E_REMOTEFONT if the file is not local. + /// + STDMETHOD(CreateFontResource)( + UINT32 listIndex, + _COM_Outptr_ IDWriteFontResource** fontResource + ) PURE; + + /// + /// Create a font face for a single item (rather than going through the font face reference). + /// + /// Zero-based index of the font item in the set. + /// Receives a pointer to the font face. + /// + /// Standard HRESULT error code, or DWRITE_E_REMOTEFONT if the file is not local. + /// + STDMETHOD(CreateFontFace)( + UINT32 listIndex, + _COM_Outptr_ IDWriteFontFace5** fontFace + ) PURE; + + /// + /// Return the locality of a single item. + /// + /// Zero-based index of the font item in the set. + /// + /// The locality enumeration. For fully local files, the result will always + /// be DWRITE_LOCALITY_LOCAL. For downloadable files, the result depends on how + /// much of the file has been downloaded. + /// + /// + /// The locality enumeration. + /// + STDMETHOD_(DWRITE_LOCALITY, GetFontLocality)(UINT32 listIndex) PURE; +}; + + +interface DWRITE_DECLARE_INTERFACE("C0763A34-77AF-445A-B735-08C37B0A5BF5") IDWriteFontList2 : public IDWriteFontList1 +{ + /// + /// Get the underlying font set used by this list. + /// + /// Contains font set used by the list. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontSet)( + _COM_Outptr_ IDWriteFontSet1** fontSet + ) PURE; +}; + + +interface DWRITE_DECLARE_INTERFACE("3ED49E77-A398-4261-B9CF-C126C2131EF3") IDWriteFontFamily2 : public IDWriteFontFamily1 +{ + /// + /// Gets a list of fonts in the font family ranked in order of how well they match the specified axis values. + /// + /// List of font axis values. + /// Number of font axis values. + /// Receives a pointer to the newly created font list object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetMatchingFonts)( + _In_reads_(fontAxisValueCount) DWRITE_FONT_AXIS_VALUE const* fontAxisValues, + UINT32 fontAxisValueCount, + _COM_Outptr_ IDWriteFontList2** matchingFonts + ) PURE; + + using IDWriteFontFamily::GetMatchingFonts; + + /// + /// Get the underlying font set used by this family. + /// + /// Contains font set used by the family. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontSet)( + _COM_Outptr_ IDWriteFontSet1** fontSet + ) PURE; +}; + + +interface DWRITE_DECLARE_INTERFACE("514039C6-4617-4064-BF8B-92EA83E506E0") IDWriteFontCollection2 : public IDWriteFontCollection1 +{ + /// + /// Creates a font family object given a zero-based font family index. + /// + /// Zero-based index of the font family. + /// Receives a pointer the newly created font family object. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontFamily)( + UINT32 index, + _COM_Outptr_ IDWriteFontFamily2** fontFamily + ) PURE; + + using IDWriteFontCollection::GetFontFamily; + using IDWriteFontCollection1::GetFontFamily; + + /// + /// Gets a list of fonts in the specified font family ranked in order of how well they match the specified axis values. + /// + /// Name of the font family. The name is not case-sensitive but must otherwise exactly match a family name in the collection. + /// List of font axis values. + /// Number of font axis values. + /// Receives a pointer to the newly created font list object. + /// + /// If no fonts matched, the list will be empty (GetFontCount returns 0), + /// but the function does not return an error. + /// + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetMatchingFonts)( + _In_z_ WCHAR const* familyName, + _In_reads_(fontAxisValueCount) DWRITE_FONT_AXIS_VALUE const* fontAxisValues, + UINT32 fontAxisValueCount, + _COM_Outptr_ IDWriteFontList2** fontList + ) PURE; + + /// + /// Get the font family model used by the font collection to group families. + /// + /// + /// Family model enumeration. + /// + STDMETHOD_(DWRITE_FONT_FAMILY_MODEL, GetFontFamilyModel)() PURE; + + /// + /// Get the underlying font set used by this collection. + /// + /// Contains font set used by the collection. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontSet)( + _COM_Outptr_ IDWriteFontSet1** fontSet + ) PURE; +}; + + +interface DWRITE_DECLARE_INTERFACE("05A9BF42-223F-4441-B5FB-8263685F55E9") IDWriteTextLayout4 : public IDWriteTextLayout3 +{ + /// + /// Set values for font axes over a range of text. + /// + /// List of font axis values. + /// Number of font axis values. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetFontAxisValues)( + _In_reads_(fontAxisValueCount) DWRITE_FONT_AXIS_VALUE const* fontAxisValues, + UINT32 fontAxisValueCount, + DWRITE_TEXT_RANGE textRange + ) PURE; + + /// + /// Get the number of axes set on the text position. + /// + STDMETHOD_(UINT32, GetFontAxisValueCount)( + UINT32 currentPosition + ) PURE; + + /// + /// Get the list of font axis values on the text position. + /// + /// List of font axis values. + /// Maximum number of font axis values to write. + /// + /// Standard HRESULT error code, or E_INVALIDARG if fontAxisValueCount doesn't match GetFontAxisValueCount. + /// + STDMETHOD(GetFontAxisValues)( + UINT32 currentPosition, + _Out_writes_(fontAxisValueCount) DWRITE_FONT_AXIS_VALUE* fontAxisValues, + UINT32 fontAxisValueCount, + _Out_opt_ DWRITE_TEXT_RANGE* textRange = nullptr + ) PURE; + + /// + /// Get the automatic axis options. + /// + /// + /// Automatic axis options. + /// + STDMETHOD_(DWRITE_AUTOMATIC_FONT_AXES, GetAutomaticFontAxes)() PURE; + + /// + /// Sets the automatic font axis options. + /// + /// Automatic font axis options. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetAutomaticFontAxes)(DWRITE_AUTOMATIC_FONT_AXES automaticFontAxes) PURE; +}; + + +interface DWRITE_DECLARE_INTERFACE("6D3B5641-E550-430D-A85B-B7BF48A93427") IDWriteTextFormat3 : public IDWriteTextFormat2 +{ + /// + /// Set values for font axes of the format. + /// + /// List of font axis values. + /// Number of font axis values. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetFontAxisValues)( + _In_reads_(fontAxisValueCount) DWRITE_FONT_AXIS_VALUE const* fontAxisValues, + UINT32 fontAxisValueCount + ) PURE; + + /// + /// Get the number of axes set on the format. + /// + STDMETHOD_(UINT32, GetFontAxisValueCount)() PURE; + + /// + /// Get the list of font axis values on the format. + /// + /// List of font axis values. + /// Maximum number of font axis values to write. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(GetFontAxisValues)( + _Out_writes_(fontAxisValueCount) DWRITE_FONT_AXIS_VALUE* fontAxisValues, + UINT32 fontAxisValueCount + ) PURE; + + /// + /// Get the automatic axis options. + /// + /// + /// Automatic axis options. + /// + STDMETHOD_(DWRITE_AUTOMATIC_FONT_AXES, GetAutomaticFontAxes)() PURE; + + /// + /// Sets the automatic font axis options. + /// + /// Automatic font axis options. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(SetAutomaticFontAxes)(DWRITE_AUTOMATIC_FONT_AXES automaticFontAxes) PURE; +}; + + +interface DWRITE_DECLARE_INTERFACE("2397599D-DD0D-4681-BD6A-F4F31EAADE77") IDWriteFontFallback1 : public IDWriteFontFallback +{ + /// + /// Determines an appropriate font to use to render the range of text. + /// + /// The text source implementation holds the text and locale. + /// Length of the text to analyze. + /// Default font collection to use. + /// Family name of the base font. If you pass nullptr, no matching will be done against + /// the base family. + /// List of font axis values. + /// Number of font axis values. + /// Length of text mapped to the mapped font. This will always be less or equal to the + /// input text length and greater than zero (if the text length is non-zero) so that the caller advances at + /// least one character each call. + /// The font face that should be used to render the first mappedLength characters of the text. + /// If it returns null, then no known font can render the text, and mappedLength is the number of unsupported + /// characters to skip. + /// Scale factor to multiply the em size of the returned font by. + /// + /// Standard HRESULT error code. + /// + STDMETHOD(MapCharacters)( + IDWriteTextAnalysisSource* analysisSource, + UINT32 textPosition, + UINT32 textLength, + _In_opt_ IDWriteFontCollection* baseFontCollection, + _In_opt_z_ WCHAR const* baseFamilyName, + _In_reads_(fontAxisValueCount) DWRITE_FONT_AXIS_VALUE const* fontAxisValues, + UINT32 fontAxisValueCount, + _Deref_out_range_(0, textLength) UINT32* mappedLength, + _Out_ FLOAT* scale, + _COM_Outptr_ IDWriteFontFace5** mappedFontFace + ) PURE; + + using IDWriteFontFallback::MapCharacters; +}; + +#endif // NTDDI_VERSION >= NTDDI_WIN10_RS3 + +#endif // DWRITE_3_H_INCLUDED diff --git a/gfx/include/dxsdk/dxdiag.h b/gfx/include/dxsdk/dxdiag.h new file mode 100644 index 0000000000..82b607c02a --- /dev/null +++ b/gfx/include/dxsdk/dxdiag.h @@ -0,0 +1,196 @@ +/*==========================================================================; + * + * Copyright (C) Microsoft Corporation. All Rights Reserved. + * + * File: dxdiag.h + * Content: DirectX Diagnostic Tool include file + * + ****************************************************************************/ + +#ifndef _DXDIAG_H_ +#define _DXDIAG_H_ +#include + +#pragma region Desktop Family +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) + + +#include // for DECLARE_INTERFACE_ and HRESULT + +// This identifier is passed to IDxDiagProvider::Initialize in order to ensure that an +// application was built against the correct header files. This number is +// incremented whenever a header (or other) change would require applications +// to be rebuilt. If the version doesn't match, IDxDiagProvider::Initialize will fail. +// (The number itself has no meaning.) +#define DXDIAG_DX9_SDK_VERSION 111 + +#ifdef __cplusplus +extern "C" { +#endif + + +/**************************************************************************** + * + * DxDiag Errors + * + ****************************************************************************/ +#define DXDIAG_E_INSUFFICIENT_BUFFER ((HRESULT)0x8007007AL) // HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) + + +/**************************************************************************** + * + * DxDiag CLSIDs + * + ****************************************************************************/ + +// {A65B8071-3BFE-4213-9A5B-491DA4461CA7} +DEFINE_GUID(CLSID_DxDiagProvider, +0xA65B8071, 0x3BFE, 0x4213, 0x9A, 0x5B, 0x49, 0x1D, 0xA4, 0x46, 0x1C, 0xA7); + + +/**************************************************************************** + * + * DxDiag Interface IIDs + * + ****************************************************************************/ + +// {9C6B4CB0-23F8-49CC-A3ED-45A55000A6D2} +DEFINE_GUID(IID_IDxDiagProvider, +0x9C6B4CB0, 0x23F8, 0x49CC, 0xA3, 0xED, 0x45, 0xA5, 0x50, 0x00, 0xA6, 0xD2); + +// {0x7D0F462F-0x4064-0x4862-BC7F-933E5058C10F} +DEFINE_GUID(IID_IDxDiagContainer, +0x7D0F462F, 0x4064, 0x4862, 0xBC, 0x7F, 0x93, 0x3E, 0x50, 0x58, 0xC1, 0x0F); + + +/**************************************************************************** + * + * DxDiag Interface Pointer definitions + * + ****************************************************************************/ + +typedef struct IDxDiagProvider *LPDXDIAGPROVIDER, *PDXDIAGPROVIDER; + +typedef struct IDxDiagContainer *LPDXDIAGCONTAINER, *PDXDIAGCONTAINER; + + +/**************************************************************************** + * + * DxDiag Structures + * + ****************************************************************************/ + +typedef struct _DXDIAG_INIT_PARAMS +{ + DWORD dwSize; // Size of this structure. + DWORD dwDxDiagHeaderVersion; // Pass in DXDIAG_DX9_SDK_VERSION. This verifies + // the header and dll are correctly matched. + BOOL bAllowWHQLChecks; // If true, allow dxdiag to check if drivers are + // digital signed as logo'd by WHQL which may + // connect via internet to update WHQL certificates. + VOID* pReserved; // Reserved. Must be NULL. +} DXDIAG_INIT_PARAMS; + + +/**************************************************************************** + * + * DxDiag Application Interfaces + * + ****************************************************************************/ + +// +// COM definition for IDxDiagProvider +// +#undef INTERFACE // External COM Implementation +#define INTERFACE IDxDiagProvider +DECLARE_INTERFACE_(IDxDiagProvider,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /*** IDxDiagProvider methods ***/ + STDMETHOD(Initialize) (THIS_ DXDIAG_INIT_PARAMS* pParams) PURE; + STDMETHOD(GetRootContainer) (THIS_ IDxDiagContainer **ppInstance) PURE; +}; + + +// +// COM definition for IDxDiagContainer +// +#undef INTERFACE // External COM Implementation +#define INTERFACE IDxDiagContainer +DECLARE_INTERFACE_(IDxDiagContainer,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /*** IDxDiagContainer methods ***/ + STDMETHOD(GetNumberOfChildContainers) (THIS_ DWORD *pdwCount) PURE; + STDMETHOD(EnumChildContainerNames) (THIS_ DWORD dwIndex, LPWSTR pwszContainer, DWORD cchContainer) PURE; + STDMETHOD(GetChildContainer) (THIS_ LPCWSTR pwszContainer, IDxDiagContainer **ppInstance) PURE; + STDMETHOD(GetNumberOfProps) (THIS_ DWORD *pdwCount) PURE; + STDMETHOD(EnumPropNames) (THIS_ DWORD dwIndex, LPWSTR pwszPropName, DWORD cchPropName) PURE; + STDMETHOD(GetProp) (THIS_ LPCWSTR pwszPropName, VARIANT *pvarProp) PURE; +}; + + +/**************************************************************************** + * + * DxDiag application interface macros + * + ****************************************************************************/ + +#if !defined(__cplusplus) || defined(CINTERFACE) + +#define IDxDiagProvider_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDxDiagProvider_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDxDiagProvider_Release(p) (p)->lpVtbl->Release(p) +#define IDxDiagProvider_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDxDiagProvider_GetRootContainer(p,a) (p)->lpVtbl->GetRootContainer(p,a) + +#define IDxDiagContainer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDxDiagContainer_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDxDiagContainer_Release(p) (p)->lpVtbl->Release(p) +#define IDxDiagContainer_GetNumberOfChildContainers(p,a) (p)->lpVtbl->GetNumberOfChildContainers(p,a) +#define IDxDiagContainer_EnumChildContainerNames(p,a,b,c) (p)->lpVtbl->EnumChildContainerNames(p,a,b,c) +#define IDxDiagContainer_GetChildContainer(p,a,b) (p)->lpVtbl->GetChildContainer(p,a,b) +#define IDxDiagContainer_GetNumberOfProps(p,a) (p)->lpVtbl->GetNumberOfProps(p,a) +#define IDxDiagContainer_EnumProps(p,a,b) (p)->lpVtbl->EnumProps(p,a,b,c) +#define IDxDiagContainer_GetProp(p,a,b) (p)->lpVtbl->GetProp(p,a,b) + +#else /* C++ */ + +#define IDxDiagProvider_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b) +#define IDxDiagProvider_AddRef(p) (p)->AddRef(p) +#define IDxDiagProvider_Release(p) (p)->Release(p) +#define IDxDiagProvider_Initialize(p,a,b) (p)->Initialize(p,a,b) +#define IDxDiagProvider_GetRootContainer(p,a) (p)->GetRootContainer(p,a) + +#define IDxDiagContainer_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b) +#define IDxDiagContainer_AddRef(p) (p)->AddRef(p) +#define IDxDiagContainer_Release(p) (p)->Release(p) +#define IDxDiagContainer_GetNumberOfChildContainers(p,a) (p)->GetNumberOfChildContainers(p,a) +#define IDxDiagContainer_EnumChildContainerNames(p,a,b,c) (p)->EnumChildContainerNames(p,a,b,c) +#define IDxDiagContainer_GetChildContainer(p,a,b) (p)->GetChildContainer(p,a,b) +#define IDxDiagContainer_GetNumberOfProps(p,a) (p)->GetNumberOfProps(p,a) +#define IDxDiagContainer_EnumProps(p,a,b) (p)->EnumProps(p,a,b,c) +#define IDxDiagContainer_GetProp(p,a,b) (p)->GetProp(p,a,b) + +#endif + + +#ifdef __cplusplus +} +#endif + + +#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +#pragma endregion + +#endif /* _DXDIAG_H_ */ + + diff --git a/gfx/include/dxsdk/dxerr.h b/gfx/include/dxsdk/dxerr.h new file mode 100644 index 0000000000..2bd7591197 --- /dev/null +++ b/gfx/include/dxsdk/dxerr.h @@ -0,0 +1,99 @@ +/*==========================================================================; + * + * + * File: dxerr.h + * Content: DirectX Error Library Include File + * + ****************************************************************************/ + +#ifndef _DXERR_H_ +#define _DXERR_H_ + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + +// +// DXGetErrorString +// +// Desc: Converts a DirectX HRESULT to a string +// +// Args: HRESULT hr Can be any error code from +// XACT XAUDIO2 XAPO XINPUT DXGI D3D10 D3DX10 D3D9 D3DX9 DDRAW DSOUND DINPUT DSHOW +// +// Return: Converted string +// +const char* WINAPI DXGetErrorStringA(__in HRESULT hr); +const WCHAR* WINAPI DXGetErrorStringW(__in HRESULT hr); + +#ifdef UNICODE +#define DXGetErrorString DXGetErrorStringW +#else +#define DXGetErrorString DXGetErrorStringA +#endif + + +// +// DXGetErrorDescription +// +// Desc: Returns a string description of a DirectX HRESULT +// +// Args: HRESULT hr Can be any error code from +// XACT XAUDIO2 XAPO XINPUT DXGI D3D10 D3DX10 D3D9 D3DX9 DDRAW DSOUND DINPUT DSHOW +// +// Return: String description +// +const char* WINAPI DXGetErrorDescriptionA(__in HRESULT hr); +const WCHAR* WINAPI DXGetErrorDescriptionW(__in HRESULT hr); + +#ifdef UNICODE + #define DXGetErrorDescription DXGetErrorDescriptionW +#else + #define DXGetErrorDescription DXGetErrorDescriptionA +#endif + + +// +// DXTrace +// +// Desc: Outputs a formatted error message to the debug stream +// +// Args: CHAR* strFile The current file, typically passed in using the +// __FILE__ macro. +// DWORD dwLine The current line number, typically passed in using the +// __LINE__ macro. +// HRESULT hr An HRESULT that will be traced to the debug stream. +// CHAR* strMsg A string that will be traced to the debug stream (may be NULL) +// BOOL bPopMsgBox If TRUE, then a message box will popup also containing the passed info. +// +// Return: The hr that was passed in. +// +HRESULT WINAPI DXTraceA( __in_z const char* strFile, __in DWORD dwLine, __in HRESULT hr, __in_z_opt const char* strMsg, __in BOOL bPopMsgBox ); +HRESULT WINAPI DXTraceW( __in_z const char* strFile, __in DWORD dwLine, __in HRESULT hr, __in_z_opt const WCHAR* strMsg, __in BOOL bPopMsgBox ); + +#ifdef UNICODE +#define DXTrace DXTraceW +#else +#define DXTrace DXTraceA +#endif + + +// +// Helper macros +// +#if defined(DEBUG) | defined(_DEBUG) +#define DXTRACE_MSG(str) DXTrace( __FILE__, (DWORD)__LINE__, 0, str, FALSE ) +#define DXTRACE_ERR(str,hr) DXTrace( __FILE__, (DWORD)__LINE__, hr, str, FALSE ) +#define DXTRACE_ERR_MSGBOX(str,hr) DXTrace( __FILE__, (DWORD)__LINE__, hr, str, TRUE ) +#else +#define DXTRACE_MSG(str) (0L) +#define DXTRACE_ERR(str,hr) (hr) +#define DXTRACE_ERR_MSGBOX(str,hr) (hr) +#endif + + +#ifdef __cplusplus +} +#endif //__cplusplus + +#endif // _DXERR_H_ diff --git a/gfx/include/dxsdk/dxfile.h b/gfx/include/dxsdk/dxfile.h new file mode 100644 index 0000000000..74e80e585b --- /dev/null +++ b/gfx/include/dxsdk/dxfile.h @@ -0,0 +1,239 @@ +/*************************************************************************** + * + * Copyright (C) 1998-1999 Microsoft Corporation. All Rights Reserved. + * + * File: dxfile.h + * + * Content: DirectX File public header file + * + ***************************************************************************/ + +#ifndef __DXFILE_H__ +#define __DXFILE_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef DWORD DXFILEFORMAT; + +#define DXFILEFORMAT_BINARY 0 +#define DXFILEFORMAT_TEXT 1 +#define DXFILEFORMAT_COMPRESSED 2 + +typedef DWORD DXFILELOADOPTIONS; + +#define DXFILELOAD_FROMFILE 0x00L +#define DXFILELOAD_FROMRESOURCE 0x01L +#define DXFILELOAD_FROMMEMORY 0x02L +#define DXFILELOAD_FROMSTREAM 0x04L +#define DXFILELOAD_FROMURL 0x08L + +typedef struct _DXFILELOADRESOURCE { + HMODULE hModule; + LPCTSTR lpName; + LPCTSTR lpType; +}DXFILELOADRESOURCE, *LPDXFILELOADRESOURCE; + +typedef struct _DXFILELOADMEMORY { + LPVOID lpMemory; + DWORD dSize; +}DXFILELOADMEMORY, *LPDXFILELOADMEMORY; + +/* + * DirectX File object types. + */ + +#ifndef WIN_TYPES +#define WIN_TYPES(itype, ptype) typedef interface itype *LP##ptype, **LPLP##ptype +#endif + +WIN_TYPES(IDirectXFile, DIRECTXFILE); +WIN_TYPES(IDirectXFileEnumObject, DIRECTXFILEENUMOBJECT); +WIN_TYPES(IDirectXFileSaveObject, DIRECTXFILESAVEOBJECT); +WIN_TYPES(IDirectXFileObject, DIRECTXFILEOBJECT); +WIN_TYPES(IDirectXFileData, DIRECTXFILEDATA); +WIN_TYPES(IDirectXFileDataReference, DIRECTXFILEDATAREFERENCE); +WIN_TYPES(IDirectXFileBinary, DIRECTXFILEBINARY); + +/* + * API for creating IDirectXFile interface. + */ + +STDAPI DirectXFileCreate(LPDIRECTXFILE *lplpDirectXFile); + +/* + * The methods for IUnknown + */ + +#define IUNKNOWN_METHODS(kind) \ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) kind; \ + STDMETHOD_(ULONG, AddRef) (THIS) kind; \ + STDMETHOD_(ULONG, Release) (THIS) kind + +/* + * The methods for IDirectXFileObject + */ + +#define IDIRECTXFILEOBJECT_METHODS(kind) \ + STDMETHOD(GetName) (THIS_ LPSTR, LPDWORD) kind; \ + STDMETHOD(GetId) (THIS_ LPGUID) kind + +/* + * DirectX File interfaces. + */ + +#undef INTERFACE +#define INTERFACE IDirectXFile + +DECLARE_INTERFACE_(IDirectXFile, IUnknown) +{ + IUNKNOWN_METHODS(PURE); + STDMETHOD(CreateEnumObject) (THIS_ LPVOID, DXFILELOADOPTIONS, + LPDIRECTXFILEENUMOBJECT *) PURE; + STDMETHOD(CreateSaveObject) (THIS_ LPCSTR, DXFILEFORMAT, + LPDIRECTXFILESAVEOBJECT *) PURE; + STDMETHOD(RegisterTemplates) (THIS_ LPVOID, DWORD) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirectXFileEnumObject + +DECLARE_INTERFACE_(IDirectXFileEnumObject, IUnknown) +{ + IUNKNOWN_METHODS(PURE); + STDMETHOD(GetNextDataObject) (THIS_ LPDIRECTXFILEDATA *) PURE; + STDMETHOD(GetDataObjectById) (THIS_ REFGUID, LPDIRECTXFILEDATA *) PURE; + STDMETHOD(GetDataObjectByName) (THIS_ LPCSTR, LPDIRECTXFILEDATA *) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirectXFileSaveObject + +DECLARE_INTERFACE_(IDirectXFileSaveObject, IUnknown) +{ + IUNKNOWN_METHODS(PURE); + STDMETHOD(SaveTemplates) (THIS_ DWORD, const GUID **) PURE; + STDMETHOD(CreateDataObject) (THIS_ REFGUID, LPCSTR, const GUID *, + DWORD, LPVOID, LPDIRECTXFILEDATA *) PURE; + STDMETHOD(SaveData) (THIS_ LPDIRECTXFILEDATA) PURE; +}; + + +#undef INTERFACE +#define INTERFACE IDirectXFileObject + +DECLARE_INTERFACE_(IDirectXFileObject, IUnknown) +{ + IUNKNOWN_METHODS(PURE); + IDIRECTXFILEOBJECT_METHODS(PURE); +}; + +#undef INTERFACE +#define INTERFACE IDirectXFileData + +DECLARE_INTERFACE_(IDirectXFileData, IDirectXFileObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECTXFILEOBJECT_METHODS(PURE); + + STDMETHOD(GetData) (THIS_ LPCSTR, DWORD *, void **) PURE; + STDMETHOD(GetType) (THIS_ const GUID **) PURE; + STDMETHOD(GetNextObject) (THIS_ LPDIRECTXFILEOBJECT *) PURE; + STDMETHOD(AddDataObject) (THIS_ LPDIRECTXFILEDATA) PURE; + STDMETHOD(AddDataReference) (THIS_ LPCSTR, const GUID *) PURE; + STDMETHOD(AddBinaryObject) (THIS_ LPCSTR, const GUID *, LPCSTR, LPVOID, DWORD) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirectXFileDataReference + +DECLARE_INTERFACE_(IDirectXFileDataReference, IDirectXFileObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECTXFILEOBJECT_METHODS(PURE); + + STDMETHOD(Resolve) (THIS_ LPDIRECTXFILEDATA *) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirectXFileBinary + +DECLARE_INTERFACE_(IDirectXFileBinary, IDirectXFileObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECTXFILEOBJECT_METHODS(PURE); + + STDMETHOD(GetSize) (THIS_ DWORD *) PURE; + STDMETHOD(GetMimeType) (THIS_ LPCSTR *) PURE; + STDMETHOD(Read) (THIS_ LPVOID, DWORD, LPDWORD) PURE; +}; + +/* + * DirectXFile Object Class Id (for CoCreateInstance()) + */ + +DEFINE_GUID(CLSID_CDirectXFile, 0x4516ec43, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3); + +/* + * DirectX File Interface GUIDs. + */ + +DEFINE_GUID(IID_IDirectXFile, 0x3d82ab40, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); +DEFINE_GUID(IID_IDirectXFileEnumObject, 0x3d82ab41, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); +DEFINE_GUID(IID_IDirectXFileSaveObject, 0x3d82ab42, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); +DEFINE_GUID(IID_IDirectXFileObject, 0x3d82ab43, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); +DEFINE_GUID(IID_IDirectXFileData, 0x3d82ab44, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); +DEFINE_GUID(IID_IDirectXFileDataReference, 0x3d82ab45, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); +DEFINE_GUID(IID_IDirectXFileBinary, 0x3d82ab46, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* + * DirectX File Header template's GUID. + */ + +DEFINE_GUID(TID_DXFILEHeader, 0x3d82ab43, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + + +/* + * DirectX File errors. + */ + +#define _FACDD 0x876 +#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) + +#define DXFILE_OK 0 + +#define DXFILEERR_BADOBJECT MAKE_DDHRESULT(850) +#define DXFILEERR_BADVALUE MAKE_DDHRESULT(851) +#define DXFILEERR_BADTYPE MAKE_DDHRESULT(852) +#define DXFILEERR_BADSTREAMHANDLE MAKE_DDHRESULT(853) +#define DXFILEERR_BADALLOC MAKE_DDHRESULT(854) +#define DXFILEERR_NOTFOUND MAKE_DDHRESULT(855) +#define DXFILEERR_NOTDONEYET MAKE_DDHRESULT(856) +#define DXFILEERR_FILENOTFOUND MAKE_DDHRESULT(857) +#define DXFILEERR_RESOURCENOTFOUND MAKE_DDHRESULT(858) +#define DXFILEERR_URLNOTFOUND MAKE_DDHRESULT(859) +#define DXFILEERR_BADRESOURCE MAKE_DDHRESULT(860) +#define DXFILEERR_BADFILETYPE MAKE_DDHRESULT(861) +#define DXFILEERR_BADFILEVERSION MAKE_DDHRESULT(862) +#define DXFILEERR_BADFILEFLOATSIZE MAKE_DDHRESULT(863) +#define DXFILEERR_BADFILECOMPRESSIONTYPE MAKE_DDHRESULT(864) +#define DXFILEERR_BADFILE MAKE_DDHRESULT(865) +#define DXFILEERR_PARSEERROR MAKE_DDHRESULT(866) +#define DXFILEERR_NOTEMPLATE MAKE_DDHRESULT(867) +#define DXFILEERR_BADARRAYSIZE MAKE_DDHRESULT(868) +#define DXFILEERR_BADDATAREFERENCE MAKE_DDHRESULT(869) +#define DXFILEERR_INTERNALERROR MAKE_DDHRESULT(870) +#define DXFILEERR_NOMOREOBJECTS MAKE_DDHRESULT(871) +#define DXFILEERR_BADINTRINSICS MAKE_DDHRESULT(872) +#define DXFILEERR_NOMORESTREAMHANDLES MAKE_DDHRESULT(873) +#define DXFILEERR_NOMOREDATA MAKE_DDHRESULT(874) +#define DXFILEERR_BADCACHEFILE MAKE_DDHRESULT(875) +#define DXFILEERR_NOINTERNET MAKE_DDHRESULT(876) + + +#ifdef __cplusplus +}; +#endif + +#endif /* _DXFILE_H_ */ diff --git a/gfx/include/dxsdk/dxgi.h b/gfx/include/dxsdk/dxgi.h new file mode 100644 index 0000000000..06bc6c64ef --- /dev/null +++ b/gfx/include/dxsdk/dxgi.h @@ -0,0 +1,2958 @@ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ +/* @@MIDL_FILE_HEADING( ) */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __dxgi_h__ +#define __dxgi_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IDXGIObject_FWD_DEFINED__ +#define __IDXGIObject_FWD_DEFINED__ +typedef interface IDXGIObject IDXGIObject; + +#endif /* __IDXGIObject_FWD_DEFINED__ */ + + +#ifndef __IDXGIDeviceSubObject_FWD_DEFINED__ +#define __IDXGIDeviceSubObject_FWD_DEFINED__ +typedef interface IDXGIDeviceSubObject IDXGIDeviceSubObject; + +#endif /* __IDXGIDeviceSubObject_FWD_DEFINED__ */ + + +#ifndef __IDXGIResource_FWD_DEFINED__ +#define __IDXGIResource_FWD_DEFINED__ +typedef interface IDXGIResource IDXGIResource; + +#endif /* __IDXGIResource_FWD_DEFINED__ */ + + +#ifndef __IDXGIKeyedMutex_FWD_DEFINED__ +#define __IDXGIKeyedMutex_FWD_DEFINED__ +typedef interface IDXGIKeyedMutex IDXGIKeyedMutex; + +#endif /* __IDXGIKeyedMutex_FWD_DEFINED__ */ + + +#ifndef __IDXGISurface_FWD_DEFINED__ +#define __IDXGISurface_FWD_DEFINED__ +typedef interface IDXGISurface IDXGISurface; + +#endif /* __IDXGISurface_FWD_DEFINED__ */ + + +#ifndef __IDXGISurface1_FWD_DEFINED__ +#define __IDXGISurface1_FWD_DEFINED__ +typedef interface IDXGISurface1 IDXGISurface1; + +#endif /* __IDXGISurface1_FWD_DEFINED__ */ + + +#ifndef __IDXGIAdapter_FWD_DEFINED__ +#define __IDXGIAdapter_FWD_DEFINED__ +typedef interface IDXGIAdapter IDXGIAdapter; + +#endif /* __IDXGIAdapter_FWD_DEFINED__ */ + + +#ifndef __IDXGIOutput_FWD_DEFINED__ +#define __IDXGIOutput_FWD_DEFINED__ +typedef interface IDXGIOutput IDXGIOutput; + +#endif /* __IDXGIOutput_FWD_DEFINED__ */ + + +#ifndef __IDXGISwapChain_FWD_DEFINED__ +#define __IDXGISwapChain_FWD_DEFINED__ +typedef interface IDXGISwapChain IDXGISwapChain; + +#endif /* __IDXGISwapChain_FWD_DEFINED__ */ + + +#ifndef __IDXGIFactory_FWD_DEFINED__ +#define __IDXGIFactory_FWD_DEFINED__ +typedef interface IDXGIFactory IDXGIFactory; + +#endif /* __IDXGIFactory_FWD_DEFINED__ */ + + +#ifndef __IDXGIDevice_FWD_DEFINED__ +#define __IDXGIDevice_FWD_DEFINED__ +typedef interface IDXGIDevice IDXGIDevice; + +#endif /* __IDXGIDevice_FWD_DEFINED__ */ + + +#ifndef __IDXGIFactory1_FWD_DEFINED__ +#define __IDXGIFactory1_FWD_DEFINED__ +typedef interface IDXGIFactory1 IDXGIFactory1; + +#endif /* __IDXGIFactory1_FWD_DEFINED__ */ + + +#ifndef __IDXGIAdapter1_FWD_DEFINED__ +#define __IDXGIAdapter1_FWD_DEFINED__ +typedef interface IDXGIAdapter1 IDXGIAdapter1; + +#endif /* __IDXGIAdapter1_FWD_DEFINED__ */ + + +#ifndef __IDXGIDevice1_FWD_DEFINED__ +#define __IDXGIDevice1_FWD_DEFINED__ +typedef interface IDXGIDevice1 IDXGIDevice1; + +#endif /* __IDXGIDevice1_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "dxgicommon.h" +#include "dxgitype.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_dxgi_0000_0000 */ +/* [local] */ + +/*#include */ +#define DXGI_CPU_ACCESS_NONE ( 0 ) +#define DXGI_CPU_ACCESS_DYNAMIC ( 1 ) +#define DXGI_CPU_ACCESS_READ_WRITE ( 2 ) +#define DXGI_CPU_ACCESS_SCRATCH ( 3 ) +#define DXGI_CPU_ACCESS_FIELD 15 +#define DXGI_USAGE_SHADER_INPUT 0x00000010UL +#define DXGI_USAGE_RENDER_TARGET_OUTPUT 0x00000020UL +#define DXGI_USAGE_BACK_BUFFER 0x00000040UL +#define DXGI_USAGE_SHARED 0x00000080UL +#define DXGI_USAGE_READ_ONLY 0x00000100UL +#define DXGI_USAGE_DISCARD_ON_PRESENT 0x00000200UL +#define DXGI_USAGE_UNORDERED_ACCESS 0x00000400UL +typedef UINT DXGI_USAGE; + +typedef struct DXGI_FRAME_STATISTICS + { + UINT PresentCount; + UINT PresentRefreshCount; + UINT SyncRefreshCount; + LARGE_INTEGER SyncQPCTime; + LARGE_INTEGER SyncGPUTime; + } DXGI_FRAME_STATISTICS; + +typedef struct DXGI_MAPPED_RECT + { + INT Pitch; + BYTE *pBits; + } DXGI_MAPPED_RECT; + +#ifdef __midl +#ifndef LUID_DEFINED +#define LUID_DEFINED 1 +typedef struct _LUID + { + DWORD LowPart; + LONG HighPart; + } LUID; + +typedef struct _LUID *PLUID; + +#endif +#endif +typedef struct DXGI_ADAPTER_DESC + { + WCHAR Description[ 128 ]; + UINT VendorId; + UINT DeviceId; + UINT SubSysId; + UINT Revision; + SIZE_T DedicatedVideoMemory; + SIZE_T DedicatedSystemMemory; + SIZE_T SharedSystemMemory; + LUID AdapterLuid; + } DXGI_ADAPTER_DESC; + +#if !defined(HMONITOR_DECLARED) && !defined(HMONITOR) && (WINVER < 0x0500) +#define HMONITOR_DECLARED +#if 0 +typedef HANDLE HMONITOR; + +#endif +DECLARE_HANDLE(HMONITOR); +#endif +typedef struct DXGI_OUTPUT_DESC + { + WCHAR DeviceName[ 32 ]; + RECT DesktopCoordinates; + BOOL AttachedToDesktop; + DXGI_MODE_ROTATION Rotation; + HMONITOR Monitor; + } DXGI_OUTPUT_DESC; + +typedef struct DXGI_SHARED_RESOURCE + { + HANDLE Handle; + } DXGI_SHARED_RESOURCE; + +#define DXGI_RESOURCE_PRIORITY_MINIMUM ( 0x28000000 ) + +#define DXGI_RESOURCE_PRIORITY_LOW ( 0x50000000 ) + +#define DXGI_RESOURCE_PRIORITY_NORMAL ( 0x78000000 ) + +#define DXGI_RESOURCE_PRIORITY_HIGH ( 0xa0000000 ) + +#define DXGI_RESOURCE_PRIORITY_MAXIMUM ( 0xc8000000 ) + +typedef +enum DXGI_RESIDENCY + { + DXGI_RESIDENCY_FULLY_RESIDENT = 1, + DXGI_RESIDENCY_RESIDENT_IN_SHARED_MEMORY = 2, + DXGI_RESIDENCY_EVICTED_TO_DISK = 3 + } DXGI_RESIDENCY; + +typedef struct DXGI_SURFACE_DESC + { + UINT Width; + UINT Height; + DXGI_FORMAT Format; + DXGI_SAMPLE_DESC SampleDesc; + } DXGI_SURFACE_DESC; + +typedef +enum DXGI_SWAP_EFFECT + { + DXGI_SWAP_EFFECT_DISCARD = 0, + DXGI_SWAP_EFFECT_SEQUENTIAL = 1, + DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL = 3, + DXGI_SWAP_EFFECT_FLIP_DISCARD = 4 + } DXGI_SWAP_EFFECT; + +typedef +enum DXGI_SWAP_CHAIN_FLAG + { + DXGI_SWAP_CHAIN_FLAG_NONPREROTATED = 1, + DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH = 2, + DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE = 4, + DXGI_SWAP_CHAIN_FLAG_RESTRICTED_CONTENT = 8, + DXGI_SWAP_CHAIN_FLAG_RESTRICT_SHARED_RESOURCE_DRIVER = 16, + DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY = 32, + DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT = 64, + DXGI_SWAP_CHAIN_FLAG_FOREGROUND_LAYER = 128, + DXGI_SWAP_CHAIN_FLAG_FULLSCREEN_VIDEO = 256, + DXGI_SWAP_CHAIN_FLAG_YUV_VIDEO = 512, + DXGI_SWAP_CHAIN_FLAG_HW_PROTECTED = 1024, + DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING = 2048, + DXGI_SWAP_CHAIN_FLAG_RESTRICTED_TO_ALL_HOLOGRAPHIC_DISPLAYS = 4096 + } DXGI_SWAP_CHAIN_FLAG; + +typedef struct DXGI_SWAP_CHAIN_DESC + { + DXGI_MODE_DESC BufferDesc; + DXGI_SAMPLE_DESC SampleDesc; + DXGI_USAGE BufferUsage; + UINT BufferCount; + HWND OutputWindow; + BOOL Windowed; + DXGI_SWAP_EFFECT SwapEffect; + UINT Flags; + } DXGI_SWAP_CHAIN_DESC; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0000_v0_0_s_ifspec; + +#ifndef __IDXGIObject_INTERFACE_DEFINED__ +#define __IDXGIObject_INTERFACE_DEFINED__ + +/* interface IDXGIObject */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIObject; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("aec22fb8-76f3-4639-9be0-28eb43a67a2e") + IDXGIObject : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetPrivateData( + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPrivateDataInterface( + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPrivateData( + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetParent( + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIObjectVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIObject * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIObject * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIObject * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIObject * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIObject * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIObject * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIObject * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + END_INTERFACE + } IDXGIObjectVtbl; + + interface IDXGIObject + { + CONST_VTBL struct IDXGIObjectVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIObject_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIObject_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIObject_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIObject_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIObject_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIObject_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIObject_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIObject_INTERFACE_DEFINED__ */ + + +#ifndef __IDXGIDeviceSubObject_INTERFACE_DEFINED__ +#define __IDXGIDeviceSubObject_INTERFACE_DEFINED__ + +/* interface IDXGIDeviceSubObject */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIDeviceSubObject; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3d3e0379-f9de-4d58-bb6c-18d62992f1a6") + IDXGIDeviceSubObject : public IDXGIObject + { + public: + virtual HRESULT STDMETHODCALLTYPE GetDevice( + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppDevice) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIDeviceSubObjectVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIDeviceSubObject * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIDeviceSubObject * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIDeviceSubObject * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIDeviceSubObject * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIDeviceSubObject * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIDeviceSubObject * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIDeviceSubObject * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + IDXGIDeviceSubObject * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppDevice); + + END_INTERFACE + } IDXGIDeviceSubObjectVtbl; + + interface IDXGIDeviceSubObject + { + CONST_VTBL struct IDXGIDeviceSubObjectVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIDeviceSubObject_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIDeviceSubObject_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIDeviceSubObject_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIDeviceSubObject_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIDeviceSubObject_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIDeviceSubObject_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIDeviceSubObject_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIDeviceSubObject_GetDevice(This,riid,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIDeviceSubObject_INTERFACE_DEFINED__ */ + + +#ifndef __IDXGIResource_INTERFACE_DEFINED__ +#define __IDXGIResource_INTERFACE_DEFINED__ + +/* interface IDXGIResource */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIResource; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("035f3ab4-482e-4e50-b41f-8a7f8bd8960b") + IDXGIResource : public IDXGIDeviceSubObject + { + public: + virtual HRESULT STDMETHODCALLTYPE GetSharedHandle( + /* [annotation][out] */ + _Out_ HANDLE *pSharedHandle) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetUsage( + /* [out] */ DXGI_USAGE *pUsage) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetEvictionPriority( + /* [in] */ UINT EvictionPriority) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetEvictionPriority( + /* [annotation][retval][out] */ + _Out_ UINT *pEvictionPriority) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIResourceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIResource * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIResource * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIResource * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIResource * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIResource * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIResource * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIResource * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + IDXGIResource * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetSharedHandle )( + IDXGIResource * This, + /* [annotation][out] */ + _Out_ HANDLE *pSharedHandle); + + HRESULT ( STDMETHODCALLTYPE *GetUsage )( + IDXGIResource * This, + /* [out] */ DXGI_USAGE *pUsage); + + HRESULT ( STDMETHODCALLTYPE *SetEvictionPriority )( + IDXGIResource * This, + /* [in] */ UINT EvictionPriority); + + HRESULT ( STDMETHODCALLTYPE *GetEvictionPriority )( + IDXGIResource * This, + /* [annotation][retval][out] */ + _Out_ UINT *pEvictionPriority); + + END_INTERFACE + } IDXGIResourceVtbl; + + interface IDXGIResource + { + CONST_VTBL struct IDXGIResourceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIResource_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIResource_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIResource_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIResource_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIResource_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIResource_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIResource_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIResource_GetDevice(This,riid,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) + + +#define IDXGIResource_GetSharedHandle(This,pSharedHandle) \ + ( (This)->lpVtbl -> GetSharedHandle(This,pSharedHandle) ) + +#define IDXGIResource_GetUsage(This,pUsage) \ + ( (This)->lpVtbl -> GetUsage(This,pUsage) ) + +#define IDXGIResource_SetEvictionPriority(This,EvictionPriority) \ + ( (This)->lpVtbl -> SetEvictionPriority(This,EvictionPriority) ) + +#define IDXGIResource_GetEvictionPriority(This,pEvictionPriority) \ + ( (This)->lpVtbl -> GetEvictionPriority(This,pEvictionPriority) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIResource_INTERFACE_DEFINED__ */ + + +#ifndef __IDXGIKeyedMutex_INTERFACE_DEFINED__ +#define __IDXGIKeyedMutex_INTERFACE_DEFINED__ + +/* interface IDXGIKeyedMutex */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIKeyedMutex; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9d8e1289-d7b3-465f-8126-250e349af85d") + IDXGIKeyedMutex : public IDXGIDeviceSubObject + { + public: + virtual HRESULT STDMETHODCALLTYPE AcquireSync( + /* [in] */ UINT64 Key, + /* [in] */ DWORD dwMilliseconds) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReleaseSync( + /* [in] */ UINT64 Key) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIKeyedMutexVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIKeyedMutex * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIKeyedMutex * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIKeyedMutex * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIKeyedMutex * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIKeyedMutex * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIKeyedMutex * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIKeyedMutex * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + IDXGIKeyedMutex * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *AcquireSync )( + IDXGIKeyedMutex * This, + /* [in] */ UINT64 Key, + /* [in] */ DWORD dwMilliseconds); + + HRESULT ( STDMETHODCALLTYPE *ReleaseSync )( + IDXGIKeyedMutex * This, + /* [in] */ UINT64 Key); + + END_INTERFACE + } IDXGIKeyedMutexVtbl; + + interface IDXGIKeyedMutex + { + CONST_VTBL struct IDXGIKeyedMutexVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIKeyedMutex_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIKeyedMutex_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIKeyedMutex_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIKeyedMutex_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIKeyedMutex_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIKeyedMutex_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIKeyedMutex_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIKeyedMutex_GetDevice(This,riid,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) + + +#define IDXGIKeyedMutex_AcquireSync(This,Key,dwMilliseconds) \ + ( (This)->lpVtbl -> AcquireSync(This,Key,dwMilliseconds) ) + +#define IDXGIKeyedMutex_ReleaseSync(This,Key) \ + ( (This)->lpVtbl -> ReleaseSync(This,Key) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIKeyedMutex_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi_0000_0004 */ +/* [local] */ + +#define DXGI_MAP_READ ( 1UL ) + +#define DXGI_MAP_WRITE ( 2UL ) + +#define DXGI_MAP_DISCARD ( 4UL ) + + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0004_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0004_v0_0_s_ifspec; + +#ifndef __IDXGISurface_INTERFACE_DEFINED__ +#define __IDXGISurface_INTERFACE_DEFINED__ + +/* interface IDXGISurface */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGISurface; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("cafcb56c-6ac3-4889-bf47-9e23bbd260ec") + IDXGISurface : public IDXGIDeviceSubObject + { + public: + virtual HRESULT STDMETHODCALLTYPE GetDesc( + /* [annotation][out] */ + _Out_ DXGI_SURFACE_DESC *pDesc) = 0; + + virtual HRESULT STDMETHODCALLTYPE Map( + /* [annotation][out] */ + _Out_ DXGI_MAPPED_RECT *pLockedRect, + /* [in] */ UINT MapFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE Unmap( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGISurfaceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGISurface * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGISurface * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGISurface * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGISurface * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGISurface * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGISurface * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGISurface * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + IDXGISurface * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetDesc )( + IDXGISurface * This, + /* [annotation][out] */ + _Out_ DXGI_SURFACE_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *Map )( + IDXGISurface * This, + /* [annotation][out] */ + _Out_ DXGI_MAPPED_RECT *pLockedRect, + /* [in] */ UINT MapFlags); + + HRESULT ( STDMETHODCALLTYPE *Unmap )( + IDXGISurface * This); + + END_INTERFACE + } IDXGISurfaceVtbl; + + interface IDXGISurface + { + CONST_VTBL struct IDXGISurfaceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGISurface_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGISurface_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGISurface_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGISurface_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGISurface_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGISurface_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGISurface_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGISurface_GetDevice(This,riid,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) + + +#define IDXGISurface_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define IDXGISurface_Map(This,pLockedRect,MapFlags) \ + ( (This)->lpVtbl -> Map(This,pLockedRect,MapFlags) ) + +#define IDXGISurface_Unmap(This) \ + ( (This)->lpVtbl -> Unmap(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGISurface_INTERFACE_DEFINED__ */ + + +#ifndef __IDXGISurface1_INTERFACE_DEFINED__ +#define __IDXGISurface1_INTERFACE_DEFINED__ + +/* interface IDXGISurface1 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGISurface1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("4AE63092-6327-4c1b-80AE-BFE12EA32B86") + IDXGISurface1 : public IDXGISurface + { + public: + virtual HRESULT STDMETHODCALLTYPE GetDC( + /* [in] */ BOOL Discard, + /* [annotation][out] */ + _Out_ HDC *phdc) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReleaseDC( + /* [annotation][in] */ + _In_opt_ RECT *pDirtyRect) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGISurface1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGISurface1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGISurface1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGISurface1 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGISurface1 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGISurface1 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGISurface1 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGISurface1 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + IDXGISurface1 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetDesc )( + IDXGISurface1 * This, + /* [annotation][out] */ + _Out_ DXGI_SURFACE_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *Map )( + IDXGISurface1 * This, + /* [annotation][out] */ + _Out_ DXGI_MAPPED_RECT *pLockedRect, + /* [in] */ UINT MapFlags); + + HRESULT ( STDMETHODCALLTYPE *Unmap )( + IDXGISurface1 * This); + + HRESULT ( STDMETHODCALLTYPE *GetDC )( + IDXGISurface1 * This, + /* [in] */ BOOL Discard, + /* [annotation][out] */ + _Out_ HDC *phdc); + + HRESULT ( STDMETHODCALLTYPE *ReleaseDC )( + IDXGISurface1 * This, + /* [annotation][in] */ + _In_opt_ RECT *pDirtyRect); + + END_INTERFACE + } IDXGISurface1Vtbl; + + interface IDXGISurface1 + { + CONST_VTBL struct IDXGISurface1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGISurface1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGISurface1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGISurface1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGISurface1_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGISurface1_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGISurface1_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGISurface1_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGISurface1_GetDevice(This,riid,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) + + +#define IDXGISurface1_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define IDXGISurface1_Map(This,pLockedRect,MapFlags) \ + ( (This)->lpVtbl -> Map(This,pLockedRect,MapFlags) ) + +#define IDXGISurface1_Unmap(This) \ + ( (This)->lpVtbl -> Unmap(This) ) + + +#define IDXGISurface1_GetDC(This,Discard,phdc) \ + ( (This)->lpVtbl -> GetDC(This,Discard,phdc) ) + +#define IDXGISurface1_ReleaseDC(This,pDirtyRect) \ + ( (This)->lpVtbl -> ReleaseDC(This,pDirtyRect) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGISurface1_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi_0000_0006 */ +/* [local] */ + + + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0006_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0006_v0_0_s_ifspec; + +#ifndef __IDXGIAdapter_INTERFACE_DEFINED__ +#define __IDXGIAdapter_INTERFACE_DEFINED__ + +/* interface IDXGIAdapter */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIAdapter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("2411e7e1-12ac-4ccf-bd14-9798e8534dc0") + IDXGIAdapter : public IDXGIObject + { + public: + virtual HRESULT STDMETHODCALLTYPE EnumOutputs( + /* [in] */ UINT Output, + /* [annotation][out][in] */ + _COM_Outptr_ IDXGIOutput **ppOutput) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDesc( + /* [annotation][out] */ + _Out_ DXGI_ADAPTER_DESC *pDesc) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckInterfaceSupport( + /* [annotation][in] */ + _In_ REFGUID InterfaceName, + /* [annotation][out] */ + _Out_ LARGE_INTEGER *pUMDVersion) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIAdapterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIAdapter * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIAdapter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIAdapter * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIAdapter * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIAdapter * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIAdapter * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIAdapter * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *EnumOutputs )( + IDXGIAdapter * This, + /* [in] */ UINT Output, + /* [annotation][out][in] */ + _COM_Outptr_ IDXGIOutput **ppOutput); + + HRESULT ( STDMETHODCALLTYPE *GetDesc )( + IDXGIAdapter * This, + /* [annotation][out] */ + _Out_ DXGI_ADAPTER_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *CheckInterfaceSupport )( + IDXGIAdapter * This, + /* [annotation][in] */ + _In_ REFGUID InterfaceName, + /* [annotation][out] */ + _Out_ LARGE_INTEGER *pUMDVersion); + + END_INTERFACE + } IDXGIAdapterVtbl; + + interface IDXGIAdapter + { + CONST_VTBL struct IDXGIAdapterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIAdapter_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIAdapter_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIAdapter_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIAdapter_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIAdapter_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIAdapter_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIAdapter_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIAdapter_EnumOutputs(This,Output,ppOutput) \ + ( (This)->lpVtbl -> EnumOutputs(This,Output,ppOutput) ) + +#define IDXGIAdapter_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define IDXGIAdapter_CheckInterfaceSupport(This,InterfaceName,pUMDVersion) \ + ( (This)->lpVtbl -> CheckInterfaceSupport(This,InterfaceName,pUMDVersion) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIAdapter_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi_0000_0007 */ +/* [local] */ + +#define DXGI_ENUM_MODES_INTERLACED ( 1UL ) + +#define DXGI_ENUM_MODES_SCALING ( 2UL ) + + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0007_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0007_v0_0_s_ifspec; + +#ifndef __IDXGIOutput_INTERFACE_DEFINED__ +#define __IDXGIOutput_INTERFACE_DEFINED__ + +/* interface IDXGIOutput */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIOutput; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("ae02eedb-c735-4690-8d52-5a8dc20213aa") + IDXGIOutput : public IDXGIObject + { + public: + virtual HRESULT STDMETHODCALLTYPE GetDesc( + /* [annotation][out] */ + _Out_ DXGI_OUTPUT_DESC *pDesc) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDisplayModeList( + /* [in] */ DXGI_FORMAT EnumFormat, + /* [in] */ UINT Flags, + /* [annotation][out][in] */ + _Inout_ UINT *pNumModes, + /* [annotation][out] */ + _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC *pDesc) = 0; + + virtual HRESULT STDMETHODCALLTYPE FindClosestMatchingMode( + /* [annotation][in] */ + _In_ const DXGI_MODE_DESC *pModeToMatch, + /* [annotation][out] */ + _Out_ DXGI_MODE_DESC *pClosestMatch, + /* [annotation][in] */ + _In_opt_ IUnknown *pConcernedDevice) = 0; + + virtual HRESULT STDMETHODCALLTYPE WaitForVBlank( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE TakeOwnership( + /* [annotation][in] */ + _In_ IUnknown *pDevice, + BOOL Exclusive) = 0; + + virtual void STDMETHODCALLTYPE ReleaseOwnership( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetGammaControlCapabilities( + /* [annotation][out] */ + _Out_ DXGI_GAMMA_CONTROL_CAPABILITIES *pGammaCaps) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetGammaControl( + /* [annotation][in] */ + _In_ const DXGI_GAMMA_CONTROL *pArray) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetGammaControl( + /* [annotation][out] */ + _Out_ DXGI_GAMMA_CONTROL *pArray) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDisplaySurface( + /* [annotation][in] */ + _In_ IDXGISurface *pScanoutSurface) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDisplaySurfaceData( + /* [annotation][in] */ + _In_ IDXGISurface *pDestination) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFrameStatistics( + /* [annotation][out] */ + _Out_ DXGI_FRAME_STATISTICS *pStats) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIOutputVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIOutput * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIOutput * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIOutput * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIOutput * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIOutput * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIOutput * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIOutput * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetDesc )( + IDXGIOutput * This, + /* [annotation][out] */ + _Out_ DXGI_OUTPUT_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList )( + IDXGIOutput * This, + /* [in] */ DXGI_FORMAT EnumFormat, + /* [in] */ UINT Flags, + /* [annotation][out][in] */ + _Inout_ UINT *pNumModes, + /* [annotation][out] */ + _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode )( + IDXGIOutput * This, + /* [annotation][in] */ + _In_ const DXGI_MODE_DESC *pModeToMatch, + /* [annotation][out] */ + _Out_ DXGI_MODE_DESC *pClosestMatch, + /* [annotation][in] */ + _In_opt_ IUnknown *pConcernedDevice); + + HRESULT ( STDMETHODCALLTYPE *WaitForVBlank )( + IDXGIOutput * This); + + HRESULT ( STDMETHODCALLTYPE *TakeOwnership )( + IDXGIOutput * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + BOOL Exclusive); + + void ( STDMETHODCALLTYPE *ReleaseOwnership )( + IDXGIOutput * This); + + HRESULT ( STDMETHODCALLTYPE *GetGammaControlCapabilities )( + IDXGIOutput * This, + /* [annotation][out] */ + _Out_ DXGI_GAMMA_CONTROL_CAPABILITIES *pGammaCaps); + + HRESULT ( STDMETHODCALLTYPE *SetGammaControl )( + IDXGIOutput * This, + /* [annotation][in] */ + _In_ const DXGI_GAMMA_CONTROL *pArray); + + HRESULT ( STDMETHODCALLTYPE *GetGammaControl )( + IDXGIOutput * This, + /* [annotation][out] */ + _Out_ DXGI_GAMMA_CONTROL *pArray); + + HRESULT ( STDMETHODCALLTYPE *SetDisplaySurface )( + IDXGIOutput * This, + /* [annotation][in] */ + _In_ IDXGISurface *pScanoutSurface); + + HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData )( + IDXGIOutput * This, + /* [annotation][in] */ + _In_ IDXGISurface *pDestination); + + HRESULT ( STDMETHODCALLTYPE *GetFrameStatistics )( + IDXGIOutput * This, + /* [annotation][out] */ + _Out_ DXGI_FRAME_STATISTICS *pStats); + + END_INTERFACE + } IDXGIOutputVtbl; + + interface IDXGIOutput + { + CONST_VTBL struct IDXGIOutputVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIOutput_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIOutput_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIOutput_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIOutput_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIOutput_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIOutput_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIOutput_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIOutput_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define IDXGIOutput_GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) \ + ( (This)->lpVtbl -> GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) ) + +#define IDXGIOutput_FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) \ + ( (This)->lpVtbl -> FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) ) + +#define IDXGIOutput_WaitForVBlank(This) \ + ( (This)->lpVtbl -> WaitForVBlank(This) ) + +#define IDXGIOutput_TakeOwnership(This,pDevice,Exclusive) \ + ( (This)->lpVtbl -> TakeOwnership(This,pDevice,Exclusive) ) + +#define IDXGIOutput_ReleaseOwnership(This) \ + ( (This)->lpVtbl -> ReleaseOwnership(This) ) + +#define IDXGIOutput_GetGammaControlCapabilities(This,pGammaCaps) \ + ( (This)->lpVtbl -> GetGammaControlCapabilities(This,pGammaCaps) ) + +#define IDXGIOutput_SetGammaControl(This,pArray) \ + ( (This)->lpVtbl -> SetGammaControl(This,pArray) ) + +#define IDXGIOutput_GetGammaControl(This,pArray) \ + ( (This)->lpVtbl -> GetGammaControl(This,pArray) ) + +#define IDXGIOutput_SetDisplaySurface(This,pScanoutSurface) \ + ( (This)->lpVtbl -> SetDisplaySurface(This,pScanoutSurface) ) + +#define IDXGIOutput_GetDisplaySurfaceData(This,pDestination) \ + ( (This)->lpVtbl -> GetDisplaySurfaceData(This,pDestination) ) + +#define IDXGIOutput_GetFrameStatistics(This,pStats) \ + ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIOutput_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi_0000_0008 */ +/* [local] */ + +#define DXGI_MAX_SWAP_CHAIN_BUFFERS ( 16 ) +#define DXGI_PRESENT_TEST 0x00000001UL +#define DXGI_PRESENT_DO_NOT_SEQUENCE 0x00000002UL +#define DXGI_PRESENT_RESTART 0x00000004UL +#define DXGI_PRESENT_DO_NOT_WAIT 0x00000008UL +#define DXGI_PRESENT_STEREO_PREFER_RIGHT 0x00000010UL +#define DXGI_PRESENT_STEREO_TEMPORARY_MONO 0x00000020UL +#define DXGI_PRESENT_RESTRICT_TO_OUTPUT 0x00000040UL +#define DXGI_PRESENT_USE_DURATION 0x00000100UL +#define DXGI_PRESENT_ALLOW_TEARING 0x00000200UL + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0008_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0008_v0_0_s_ifspec; + +#ifndef __IDXGISwapChain_INTERFACE_DEFINED__ +#define __IDXGISwapChain_INTERFACE_DEFINED__ + +/* interface IDXGISwapChain */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGISwapChain; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("310d36a0-d2e7-4c0a-aa04-6a9d23b8886a") + IDXGISwapChain : public IDXGIDeviceSubObject + { + public: + virtual HRESULT STDMETHODCALLTYPE Present( + /* [in] */ UINT SyncInterval, + /* [in] */ UINT Flags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetBuffer( + /* [in] */ UINT Buffer, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][out][in] */ + _COM_Outptr_ void **ppSurface) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetFullscreenState( + /* [in] */ BOOL Fullscreen, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pTarget) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFullscreenState( + /* [annotation][out] */ + _Out_opt_ BOOL *pFullscreen, + /* [annotation][out] */ + _COM_Outptr_opt_result_maybenull_ IDXGIOutput **ppTarget) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDesc( + /* [annotation][out] */ + _Out_ DXGI_SWAP_CHAIN_DESC *pDesc) = 0; + + virtual HRESULT STDMETHODCALLTYPE ResizeBuffers( + /* [in] */ UINT BufferCount, + /* [in] */ UINT Width, + /* [in] */ UINT Height, + /* [in] */ DXGI_FORMAT NewFormat, + /* [in] */ UINT SwapChainFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE ResizeTarget( + /* [annotation][in] */ + _In_ const DXGI_MODE_DESC *pNewTargetParameters) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetContainingOutput( + /* [annotation][out] */ + _COM_Outptr_ IDXGIOutput **ppOutput) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFrameStatistics( + /* [annotation][out] */ + _Out_ DXGI_FRAME_STATISTICS *pStats) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetLastPresentCount( + /* [annotation][out] */ + _Out_ UINT *pLastPresentCount) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGISwapChainVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGISwapChain * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGISwapChain * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGISwapChain * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGISwapChain * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGISwapChain * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGISwapChain * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGISwapChain * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + IDXGISwapChain * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *Present )( + IDXGISwapChain * This, + /* [in] */ UINT SyncInterval, + /* [in] */ UINT Flags); + + HRESULT ( STDMETHODCALLTYPE *GetBuffer )( + IDXGISwapChain * This, + /* [in] */ UINT Buffer, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][out][in] */ + _COM_Outptr_ void **ppSurface); + + HRESULT ( STDMETHODCALLTYPE *SetFullscreenState )( + IDXGISwapChain * This, + /* [in] */ BOOL Fullscreen, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pTarget); + + HRESULT ( STDMETHODCALLTYPE *GetFullscreenState )( + IDXGISwapChain * This, + /* [annotation][out] */ + _Out_opt_ BOOL *pFullscreen, + /* [annotation][out] */ + _COM_Outptr_opt_result_maybenull_ IDXGIOutput **ppTarget); + + HRESULT ( STDMETHODCALLTYPE *GetDesc )( + IDXGISwapChain * This, + /* [annotation][out] */ + _Out_ DXGI_SWAP_CHAIN_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *ResizeBuffers )( + IDXGISwapChain * This, + /* [in] */ UINT BufferCount, + /* [in] */ UINT Width, + /* [in] */ UINT Height, + /* [in] */ DXGI_FORMAT NewFormat, + /* [in] */ UINT SwapChainFlags); + + HRESULT ( STDMETHODCALLTYPE *ResizeTarget )( + IDXGISwapChain * This, + /* [annotation][in] */ + _In_ const DXGI_MODE_DESC *pNewTargetParameters); + + HRESULT ( STDMETHODCALLTYPE *GetContainingOutput )( + IDXGISwapChain * This, + /* [annotation][out] */ + _COM_Outptr_ IDXGIOutput **ppOutput); + + HRESULT ( STDMETHODCALLTYPE *GetFrameStatistics )( + IDXGISwapChain * This, + /* [annotation][out] */ + _Out_ DXGI_FRAME_STATISTICS *pStats); + + HRESULT ( STDMETHODCALLTYPE *GetLastPresentCount )( + IDXGISwapChain * This, + /* [annotation][out] */ + _Out_ UINT *pLastPresentCount); + + END_INTERFACE + } IDXGISwapChainVtbl; + + interface IDXGISwapChain + { + CONST_VTBL struct IDXGISwapChainVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGISwapChain_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGISwapChain_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGISwapChain_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGISwapChain_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGISwapChain_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGISwapChain_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGISwapChain_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGISwapChain_GetDevice(This,riid,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) + + +#define IDXGISwapChain_Present(This,SyncInterval,Flags) \ + ( (This)->lpVtbl -> Present(This,SyncInterval,Flags) ) + +#define IDXGISwapChain_GetBuffer(This,Buffer,riid,ppSurface) \ + ( (This)->lpVtbl -> GetBuffer(This,Buffer,riid,ppSurface) ) + +#define IDXGISwapChain_SetFullscreenState(This,Fullscreen,pTarget) \ + ( (This)->lpVtbl -> SetFullscreenState(This,Fullscreen,pTarget) ) + +#define IDXGISwapChain_GetFullscreenState(This,pFullscreen,ppTarget) \ + ( (This)->lpVtbl -> GetFullscreenState(This,pFullscreen,ppTarget) ) + +#define IDXGISwapChain_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define IDXGISwapChain_ResizeBuffers(This,BufferCount,Width,Height,NewFormat,SwapChainFlags) \ + ( (This)->lpVtbl -> ResizeBuffers(This,BufferCount,Width,Height,NewFormat,SwapChainFlags) ) + +#define IDXGISwapChain_ResizeTarget(This,pNewTargetParameters) \ + ( (This)->lpVtbl -> ResizeTarget(This,pNewTargetParameters) ) + +#define IDXGISwapChain_GetContainingOutput(This,ppOutput) \ + ( (This)->lpVtbl -> GetContainingOutput(This,ppOutput) ) + +#define IDXGISwapChain_GetFrameStatistics(This,pStats) \ + ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) ) + +#define IDXGISwapChain_GetLastPresentCount(This,pLastPresentCount) \ + ( (This)->lpVtbl -> GetLastPresentCount(This,pLastPresentCount) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGISwapChain_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi_0000_0009 */ +/* [local] */ + +#define DXGI_MWA_NO_WINDOW_CHANGES ( 1 << 0 ) +#define DXGI_MWA_NO_ALT_ENTER ( 1 << 1 ) +#define DXGI_MWA_NO_PRINT_SCREEN ( 1 << 2 ) +#define DXGI_MWA_VALID ( 0x7 ) + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0009_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0009_v0_0_s_ifspec; + +#ifndef __IDXGIFactory_INTERFACE_DEFINED__ +#define __IDXGIFactory_INTERFACE_DEFINED__ + +/* interface IDXGIFactory */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIFactory; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("7b7166ec-21c7-44ae-b21a-c9ae321ae369") + IDXGIFactory : public IDXGIObject + { + public: + virtual HRESULT STDMETHODCALLTYPE EnumAdapters( + /* [in] */ UINT Adapter, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **ppAdapter) = 0; + + virtual HRESULT STDMETHODCALLTYPE MakeWindowAssociation( + HWND WindowHandle, + UINT Flags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetWindowAssociation( + /* [annotation][out] */ + _Out_ HWND *pWindowHandle) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSwapChain( + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ DXGI_SWAP_CHAIN_DESC *pDesc, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain **ppSwapChain) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSoftwareAdapter( + /* [in] */ HMODULE Module, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **ppAdapter) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIFactoryVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIFactory * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIFactory * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIFactory * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIFactory * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIFactory * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIFactory * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIFactory * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *EnumAdapters )( + IDXGIFactory * This, + /* [in] */ UINT Adapter, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **ppAdapter); + + HRESULT ( STDMETHODCALLTYPE *MakeWindowAssociation )( + IDXGIFactory * This, + HWND WindowHandle, + UINT Flags); + + HRESULT ( STDMETHODCALLTYPE *GetWindowAssociation )( + IDXGIFactory * This, + /* [annotation][out] */ + _Out_ HWND *pWindowHandle); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChain )( + IDXGIFactory * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ DXGI_SWAP_CHAIN_DESC *pDesc, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *CreateSoftwareAdapter )( + IDXGIFactory * This, + /* [in] */ HMODULE Module, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **ppAdapter); + + END_INTERFACE + } IDXGIFactoryVtbl; + + interface IDXGIFactory + { + CONST_VTBL struct IDXGIFactoryVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIFactory_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIFactory_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIFactory_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIFactory_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIFactory_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIFactory_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIFactory_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIFactory_EnumAdapters(This,Adapter,ppAdapter) \ + ( (This)->lpVtbl -> EnumAdapters(This,Adapter,ppAdapter) ) + +#define IDXGIFactory_MakeWindowAssociation(This,WindowHandle,Flags) \ + ( (This)->lpVtbl -> MakeWindowAssociation(This,WindowHandle,Flags) ) + +#define IDXGIFactory_GetWindowAssociation(This,pWindowHandle) \ + ( (This)->lpVtbl -> GetWindowAssociation(This,pWindowHandle) ) + +#define IDXGIFactory_CreateSwapChain(This,pDevice,pDesc,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChain(This,pDevice,pDesc,ppSwapChain) ) + +#define IDXGIFactory_CreateSoftwareAdapter(This,Module,ppAdapter) \ + ( (This)->lpVtbl -> CreateSoftwareAdapter(This,Module,ppAdapter) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIFactory_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi_0000_0010 */ +/* [local] */ + +/*#pragma region Desktop Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ +HRESULT WINAPI CreateDXGIFactory(REFIID riid, _COM_Outptr_ void **ppFactory); +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ +HRESULT WINAPI CreateDXGIFactory1(REFIID riid, _COM_Outptr_ void **ppFactory); + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0010_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0010_v0_0_s_ifspec; + +#ifndef __IDXGIDevice_INTERFACE_DEFINED__ +#define __IDXGIDevice_INTERFACE_DEFINED__ + +/* interface IDXGIDevice */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIDevice; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("54ec77fa-1377-44e6-8c32-88fd5f44c84c") + IDXGIDevice : public IDXGIObject + { + public: + virtual HRESULT STDMETHODCALLTYPE GetAdapter( + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **pAdapter) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSurface( + /* [annotation][in] */ + _In_ const DXGI_SURFACE_DESC *pDesc, + /* [in] */ UINT NumSurfaces, + /* [in] */ DXGI_USAGE Usage, + /* [annotation][in] */ + _In_opt_ const DXGI_SHARED_RESOURCE *pSharedResource, + /* [annotation][out] */ + _COM_Outptr_ IDXGISurface **ppSurface) = 0; + + virtual HRESULT STDMETHODCALLTYPE QueryResourceResidency( + /* [annotation][size_is][in] */ + _In_reads_(NumResources) IUnknown *const *ppResources, + /* [annotation][size_is][out] */ + _Out_writes_(NumResources) DXGI_RESIDENCY *pResidencyStatus, + /* [in] */ UINT NumResources) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetGPUThreadPriority( + /* [in] */ INT Priority) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetGPUThreadPriority( + /* [annotation][retval][out] */ + _Out_ INT *pPriority) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIDeviceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIDevice * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIDevice * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIDevice * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIDevice * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIDevice * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIDevice * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIDevice * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetAdapter )( + IDXGIDevice * This, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **pAdapter); + + HRESULT ( STDMETHODCALLTYPE *CreateSurface )( + IDXGIDevice * This, + /* [annotation][in] */ + _In_ const DXGI_SURFACE_DESC *pDesc, + /* [in] */ UINT NumSurfaces, + /* [in] */ DXGI_USAGE Usage, + /* [annotation][in] */ + _In_opt_ const DXGI_SHARED_RESOURCE *pSharedResource, + /* [annotation][out] */ + _COM_Outptr_ IDXGISurface **ppSurface); + + HRESULT ( STDMETHODCALLTYPE *QueryResourceResidency )( + IDXGIDevice * This, + /* [annotation][size_is][in] */ + _In_reads_(NumResources) IUnknown *const *ppResources, + /* [annotation][size_is][out] */ + _Out_writes_(NumResources) DXGI_RESIDENCY *pResidencyStatus, + /* [in] */ UINT NumResources); + + HRESULT ( STDMETHODCALLTYPE *SetGPUThreadPriority )( + IDXGIDevice * This, + /* [in] */ INT Priority); + + HRESULT ( STDMETHODCALLTYPE *GetGPUThreadPriority )( + IDXGIDevice * This, + /* [annotation][retval][out] */ + _Out_ INT *pPriority); + + END_INTERFACE + } IDXGIDeviceVtbl; + + interface IDXGIDevice + { + CONST_VTBL struct IDXGIDeviceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIDevice_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIDevice_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIDevice_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIDevice_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIDevice_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIDevice_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIDevice_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIDevice_GetAdapter(This,pAdapter) \ + ( (This)->lpVtbl -> GetAdapter(This,pAdapter) ) + +#define IDXGIDevice_CreateSurface(This,pDesc,NumSurfaces,Usage,pSharedResource,ppSurface) \ + ( (This)->lpVtbl -> CreateSurface(This,pDesc,NumSurfaces,Usage,pSharedResource,ppSurface) ) + +#define IDXGIDevice_QueryResourceResidency(This,ppResources,pResidencyStatus,NumResources) \ + ( (This)->lpVtbl -> QueryResourceResidency(This,ppResources,pResidencyStatus,NumResources) ) + +#define IDXGIDevice_SetGPUThreadPriority(This,Priority) \ + ( (This)->lpVtbl -> SetGPUThreadPriority(This,Priority) ) + +#define IDXGIDevice_GetGPUThreadPriority(This,pPriority) \ + ( (This)->lpVtbl -> GetGPUThreadPriority(This,pPriority) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIDevice_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi_0000_0011 */ +/* [local] */ + +typedef +enum DXGI_ADAPTER_FLAG + { + DXGI_ADAPTER_FLAG_NONE = 0, + DXGI_ADAPTER_FLAG_REMOTE = 1, + DXGI_ADAPTER_FLAG_SOFTWARE = 2, + DXGI_ADAPTER_FLAG_FORCE_DWORD = 0xffffffff + } DXGI_ADAPTER_FLAG; + +typedef struct DXGI_ADAPTER_DESC1 + { + WCHAR Description[ 128 ]; + UINT VendorId; + UINT DeviceId; + UINT SubSysId; + UINT Revision; + SIZE_T DedicatedVideoMemory; + SIZE_T DedicatedSystemMemory; + SIZE_T SharedSystemMemory; + LUID AdapterLuid; + UINT Flags; + } DXGI_ADAPTER_DESC1; + +typedef struct DXGI_DISPLAY_COLOR_SPACE + { + FLOAT PrimaryCoordinates[ 8 ][ 2 ]; + FLOAT WhitePoints[ 16 ][ 2 ]; + } DXGI_DISPLAY_COLOR_SPACE; + + + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0011_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0011_v0_0_s_ifspec; + +#ifndef __IDXGIFactory1_INTERFACE_DEFINED__ +#define __IDXGIFactory1_INTERFACE_DEFINED__ + +/* interface IDXGIFactory1 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIFactory1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("770aae78-f26f-4dba-a829-253c83d1b387") + IDXGIFactory1 : public IDXGIFactory + { + public: + virtual HRESULT STDMETHODCALLTYPE EnumAdapters1( + /* [in] */ UINT Adapter, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter1 **ppAdapter) = 0; + + virtual BOOL STDMETHODCALLTYPE IsCurrent( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIFactory1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIFactory1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIFactory1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIFactory1 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIFactory1 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIFactory1 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIFactory1 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIFactory1 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *EnumAdapters )( + IDXGIFactory1 * This, + /* [in] */ UINT Adapter, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **ppAdapter); + + HRESULT ( STDMETHODCALLTYPE *MakeWindowAssociation )( + IDXGIFactory1 * This, + HWND WindowHandle, + UINT Flags); + + HRESULT ( STDMETHODCALLTYPE *GetWindowAssociation )( + IDXGIFactory1 * This, + /* [annotation][out] */ + _Out_ HWND *pWindowHandle); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChain )( + IDXGIFactory1 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ DXGI_SWAP_CHAIN_DESC *pDesc, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *CreateSoftwareAdapter )( + IDXGIFactory1 * This, + /* [in] */ HMODULE Module, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **ppAdapter); + + HRESULT ( STDMETHODCALLTYPE *EnumAdapters1 )( + IDXGIFactory1 * This, + /* [in] */ UINT Adapter, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter1 **ppAdapter); + + BOOL ( STDMETHODCALLTYPE *IsCurrent )( + IDXGIFactory1 * This); + + END_INTERFACE + } IDXGIFactory1Vtbl; + + interface IDXGIFactory1 + { + CONST_VTBL struct IDXGIFactory1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIFactory1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIFactory1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIFactory1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIFactory1_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIFactory1_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIFactory1_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIFactory1_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIFactory1_EnumAdapters(This,Adapter,ppAdapter) \ + ( (This)->lpVtbl -> EnumAdapters(This,Adapter,ppAdapter) ) + +#define IDXGIFactory1_MakeWindowAssociation(This,WindowHandle,Flags) \ + ( (This)->lpVtbl -> MakeWindowAssociation(This,WindowHandle,Flags) ) + +#define IDXGIFactory1_GetWindowAssociation(This,pWindowHandle) \ + ( (This)->lpVtbl -> GetWindowAssociation(This,pWindowHandle) ) + +#define IDXGIFactory1_CreateSwapChain(This,pDevice,pDesc,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChain(This,pDevice,pDesc,ppSwapChain) ) + +#define IDXGIFactory1_CreateSoftwareAdapter(This,Module,ppAdapter) \ + ( (This)->lpVtbl -> CreateSoftwareAdapter(This,Module,ppAdapter) ) + + +#define IDXGIFactory1_EnumAdapters1(This,Adapter,ppAdapter) \ + ( (This)->lpVtbl -> EnumAdapters1(This,Adapter,ppAdapter) ) + +#define IDXGIFactory1_IsCurrent(This) \ + ( (This)->lpVtbl -> IsCurrent(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIFactory1_INTERFACE_DEFINED__ */ + + +#ifndef __IDXGIAdapter1_INTERFACE_DEFINED__ +#define __IDXGIAdapter1_INTERFACE_DEFINED__ + +/* interface IDXGIAdapter1 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIAdapter1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("29038f61-3839-4626-91fd-086879011a05") + IDXGIAdapter1 : public IDXGIAdapter + { + public: + virtual HRESULT STDMETHODCALLTYPE GetDesc1( + /* [annotation][out] */ + _Out_ DXGI_ADAPTER_DESC1 *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIAdapter1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIAdapter1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIAdapter1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIAdapter1 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIAdapter1 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIAdapter1 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIAdapter1 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIAdapter1 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *EnumOutputs )( + IDXGIAdapter1 * This, + /* [in] */ UINT Output, + /* [annotation][out][in] */ + _COM_Outptr_ IDXGIOutput **ppOutput); + + HRESULT ( STDMETHODCALLTYPE *GetDesc )( + IDXGIAdapter1 * This, + /* [annotation][out] */ + _Out_ DXGI_ADAPTER_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *CheckInterfaceSupport )( + IDXGIAdapter1 * This, + /* [annotation][in] */ + _In_ REFGUID InterfaceName, + /* [annotation][out] */ + _Out_ LARGE_INTEGER *pUMDVersion); + + HRESULT ( STDMETHODCALLTYPE *GetDesc1 )( + IDXGIAdapter1 * This, + /* [annotation][out] */ + _Out_ DXGI_ADAPTER_DESC1 *pDesc); + + END_INTERFACE + } IDXGIAdapter1Vtbl; + + interface IDXGIAdapter1 + { + CONST_VTBL struct IDXGIAdapter1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIAdapter1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIAdapter1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIAdapter1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIAdapter1_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIAdapter1_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIAdapter1_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIAdapter1_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIAdapter1_EnumOutputs(This,Output,ppOutput) \ + ( (This)->lpVtbl -> EnumOutputs(This,Output,ppOutput) ) + +#define IDXGIAdapter1_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define IDXGIAdapter1_CheckInterfaceSupport(This,InterfaceName,pUMDVersion) \ + ( (This)->lpVtbl -> CheckInterfaceSupport(This,InterfaceName,pUMDVersion) ) + + +#define IDXGIAdapter1_GetDesc1(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIAdapter1_INTERFACE_DEFINED__ */ + + +#ifndef __IDXGIDevice1_INTERFACE_DEFINED__ +#define __IDXGIDevice1_INTERFACE_DEFINED__ + +/* interface IDXGIDevice1 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIDevice1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("77db970f-6276-48ba-ba28-070143b4392c") + IDXGIDevice1 : public IDXGIDevice + { + public: + virtual HRESULT STDMETHODCALLTYPE SetMaximumFrameLatency( + /* [in] */ UINT MaxLatency) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMaximumFrameLatency( + /* [annotation][out] */ + _Out_ UINT *pMaxLatency) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIDevice1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIDevice1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIDevice1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIDevice1 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIDevice1 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIDevice1 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIDevice1 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIDevice1 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetAdapter )( + IDXGIDevice1 * This, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **pAdapter); + + HRESULT ( STDMETHODCALLTYPE *CreateSurface )( + IDXGIDevice1 * This, + /* [annotation][in] */ + _In_ const DXGI_SURFACE_DESC *pDesc, + /* [in] */ UINT NumSurfaces, + /* [in] */ DXGI_USAGE Usage, + /* [annotation][in] */ + _In_opt_ const DXGI_SHARED_RESOURCE *pSharedResource, + /* [annotation][out] */ + _COM_Outptr_ IDXGISurface **ppSurface); + + HRESULT ( STDMETHODCALLTYPE *QueryResourceResidency )( + IDXGIDevice1 * This, + /* [annotation][size_is][in] */ + _In_reads_(NumResources) IUnknown *const *ppResources, + /* [annotation][size_is][out] */ + _Out_writes_(NumResources) DXGI_RESIDENCY *pResidencyStatus, + /* [in] */ UINT NumResources); + + HRESULT ( STDMETHODCALLTYPE *SetGPUThreadPriority )( + IDXGIDevice1 * This, + /* [in] */ INT Priority); + + HRESULT ( STDMETHODCALLTYPE *GetGPUThreadPriority )( + IDXGIDevice1 * This, + /* [annotation][retval][out] */ + _Out_ INT *pPriority); + + HRESULT ( STDMETHODCALLTYPE *SetMaximumFrameLatency )( + IDXGIDevice1 * This, + /* [in] */ UINT MaxLatency); + + HRESULT ( STDMETHODCALLTYPE *GetMaximumFrameLatency )( + IDXGIDevice1 * This, + /* [annotation][out] */ + _Out_ UINT *pMaxLatency); + + END_INTERFACE + } IDXGIDevice1Vtbl; + + interface IDXGIDevice1 + { + CONST_VTBL struct IDXGIDevice1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIDevice1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIDevice1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIDevice1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIDevice1_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIDevice1_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIDevice1_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIDevice1_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIDevice1_GetAdapter(This,pAdapter) \ + ( (This)->lpVtbl -> GetAdapter(This,pAdapter) ) + +#define IDXGIDevice1_CreateSurface(This,pDesc,NumSurfaces,Usage,pSharedResource,ppSurface) \ + ( (This)->lpVtbl -> CreateSurface(This,pDesc,NumSurfaces,Usage,pSharedResource,ppSurface) ) + +#define IDXGIDevice1_QueryResourceResidency(This,ppResources,pResidencyStatus,NumResources) \ + ( (This)->lpVtbl -> QueryResourceResidency(This,ppResources,pResidencyStatus,NumResources) ) + +#define IDXGIDevice1_SetGPUThreadPriority(This,Priority) \ + ( (This)->lpVtbl -> SetGPUThreadPriority(This,Priority) ) + +#define IDXGIDevice1_GetGPUThreadPriority(This,pPriority) \ + ( (This)->lpVtbl -> GetGPUThreadPriority(This,pPriority) ) + + +#define IDXGIDevice1_SetMaximumFrameLatency(This,MaxLatency) \ + ( (This)->lpVtbl -> SetMaximumFrameLatency(This,MaxLatency) ) + +#define IDXGIDevice1_GetMaximumFrameLatency(This,pMaxLatency) \ + ( (This)->lpVtbl -> GetMaximumFrameLatency(This,pMaxLatency) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIDevice1_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi_0000_0014 */ +/* [local] */ + +#ifdef __cplusplus +#endif /*__cplusplus*/ +DEFINE_GUID(IID_IDXGIObject,0xaec22fb8,0x76f3,0x4639,0x9b,0xe0,0x28,0xeb,0x43,0xa6,0x7a,0x2e); +DEFINE_GUID(IID_IDXGIDeviceSubObject,0x3d3e0379,0xf9de,0x4d58,0xbb,0x6c,0x18,0xd6,0x29,0x92,0xf1,0xa6); +DEFINE_GUID(IID_IDXGIResource,0x035f3ab4,0x482e,0x4e50,0xb4,0x1f,0x8a,0x7f,0x8b,0xd8,0x96,0x0b); +DEFINE_GUID(IID_IDXGIKeyedMutex,0x9d8e1289,0xd7b3,0x465f,0x81,0x26,0x25,0x0e,0x34,0x9a,0xf8,0x5d); +DEFINE_GUID(IID_IDXGISurface,0xcafcb56c,0x6ac3,0x4889,0xbf,0x47,0x9e,0x23,0xbb,0xd2,0x60,0xec); +DEFINE_GUID(IID_IDXGISurface1,0x4AE63092,0x6327,0x4c1b,0x80,0xAE,0xBF,0xE1,0x2E,0xA3,0x2B,0x86); +DEFINE_GUID(IID_IDXGIAdapter,0x2411e7e1,0x12ac,0x4ccf,0xbd,0x14,0x97,0x98,0xe8,0x53,0x4d,0xc0); +DEFINE_GUID(IID_IDXGIOutput,0xae02eedb,0xc735,0x4690,0x8d,0x52,0x5a,0x8d,0xc2,0x02,0x13,0xaa); +DEFINE_GUID(IID_IDXGISwapChain,0x310d36a0,0xd2e7,0x4c0a,0xaa,0x04,0x6a,0x9d,0x23,0xb8,0x88,0x6a); +DEFINE_GUID(IID_IDXGIFactory,0x7b7166ec,0x21c7,0x44ae,0xb2,0x1a,0xc9,0xae,0x32,0x1a,0xe3,0x69); +DEFINE_GUID(IID_IDXGIDevice,0x54ec77fa,0x1377,0x44e6,0x8c,0x32,0x88,0xfd,0x5f,0x44,0xc8,0x4c); +DEFINE_GUID(IID_IDXGIFactory1,0x770aae78,0xf26f,0x4dba,0xa8,0x29,0x25,0x3c,0x83,0xd1,0xb3,0x87); +DEFINE_GUID(IID_IDXGIAdapter1,0x29038f61,0x3839,0x4626,0x91,0xfd,0x08,0x68,0x79,0x01,0x1a,0x05); +DEFINE_GUID(IID_IDXGIDevice1,0x77db970f,0x6276,0x48ba,0xba,0x28,0x07,0x01,0x43,0xb4,0x39,0x2c); + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0014_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0014_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/dxgi1_2.h b/gfx/include/dxsdk/dxgi1_2.h new file mode 100644 index 0000000000..84e231bd82 --- /dev/null +++ b/gfx/include/dxsdk/dxgi1_2.h @@ -0,0 +1,2475 @@ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ +/* @@MIDL_FILE_HEADING( ) */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __dxgi1_2_h__ +#define __dxgi1_2_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IDXGIDisplayControl_FWD_DEFINED__ +#define __IDXGIDisplayControl_FWD_DEFINED__ +typedef interface IDXGIDisplayControl IDXGIDisplayControl; + +#endif /* __IDXGIDisplayControl_FWD_DEFINED__ */ + + +#ifndef __IDXGIOutputDuplication_FWD_DEFINED__ +#define __IDXGIOutputDuplication_FWD_DEFINED__ +typedef interface IDXGIOutputDuplication IDXGIOutputDuplication; + +#endif /* __IDXGIOutputDuplication_FWD_DEFINED__ */ + + +#ifndef __IDXGISurface2_FWD_DEFINED__ +#define __IDXGISurface2_FWD_DEFINED__ +typedef interface IDXGISurface2 IDXGISurface2; + +#endif /* __IDXGISurface2_FWD_DEFINED__ */ + + +#ifndef __IDXGIResource1_FWD_DEFINED__ +#define __IDXGIResource1_FWD_DEFINED__ +typedef interface IDXGIResource1 IDXGIResource1; + +#endif /* __IDXGIResource1_FWD_DEFINED__ */ + + +#ifndef __IDXGIDevice2_FWD_DEFINED__ +#define __IDXGIDevice2_FWD_DEFINED__ +typedef interface IDXGIDevice2 IDXGIDevice2; + +#endif /* __IDXGIDevice2_FWD_DEFINED__ */ + + +#ifndef __IDXGISwapChain1_FWD_DEFINED__ +#define __IDXGISwapChain1_FWD_DEFINED__ +typedef interface IDXGISwapChain1 IDXGISwapChain1; + +#endif /* __IDXGISwapChain1_FWD_DEFINED__ */ + + +#ifndef __IDXGIFactory2_FWD_DEFINED__ +#define __IDXGIFactory2_FWD_DEFINED__ +typedef interface IDXGIFactory2 IDXGIFactory2; + +#endif /* __IDXGIFactory2_FWD_DEFINED__ */ + + +#ifndef __IDXGIAdapter2_FWD_DEFINED__ +#define __IDXGIAdapter2_FWD_DEFINED__ +typedef interface IDXGIAdapter2 IDXGIAdapter2; + +#endif /* __IDXGIAdapter2_FWD_DEFINED__ */ + + +#ifndef __IDXGIOutput1_FWD_DEFINED__ +#define __IDXGIOutput1_FWD_DEFINED__ +typedef interface IDXGIOutput1 IDXGIOutput1; + +#endif /* __IDXGIOutput1_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "dxgi.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_dxgi1_2_0000_0000 */ +/* [local] */ + +/*#include */ +/*#pragma region Desktop Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0000_v0_0_s_ifspec; + +#ifndef __IDXGIDisplayControl_INTERFACE_DEFINED__ +#define __IDXGIDisplayControl_INTERFACE_DEFINED__ + +/* interface IDXGIDisplayControl */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIDisplayControl; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("ea9dbf1a-c88e-4486-854a-98aa0138f30c") + IDXGIDisplayControl : public IUnknown + { + public: + virtual BOOL STDMETHODCALLTYPE IsStereoEnabled( void) = 0; + + virtual void STDMETHODCALLTYPE SetStereoEnabled( + BOOL enabled) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIDisplayControlVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIDisplayControl * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIDisplayControl * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIDisplayControl * This); + + BOOL ( STDMETHODCALLTYPE *IsStereoEnabled )( + IDXGIDisplayControl * This); + + void ( STDMETHODCALLTYPE *SetStereoEnabled )( + IDXGIDisplayControl * This, + BOOL enabled); + + END_INTERFACE + } IDXGIDisplayControlVtbl; + + interface IDXGIDisplayControl + { + CONST_VTBL struct IDXGIDisplayControlVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIDisplayControl_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIDisplayControl_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIDisplayControl_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIDisplayControl_IsStereoEnabled(This) \ + ( (This)->lpVtbl -> IsStereoEnabled(This) ) + +#define IDXGIDisplayControl_SetStereoEnabled(This,enabled) \ + ( (This)->lpVtbl -> SetStereoEnabled(This,enabled) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIDisplayControl_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi1_2_0000_0001 */ +/* [local] */ + +typedef struct DXGI_OUTDUPL_MOVE_RECT + { + POINT SourcePoint; + RECT DestinationRect; + } DXGI_OUTDUPL_MOVE_RECT; + +typedef struct DXGI_OUTDUPL_DESC + { + DXGI_MODE_DESC ModeDesc; + DXGI_MODE_ROTATION Rotation; + BOOL DesktopImageInSystemMemory; + } DXGI_OUTDUPL_DESC; + +typedef struct DXGI_OUTDUPL_POINTER_POSITION + { + POINT Position; + BOOL Visible; + } DXGI_OUTDUPL_POINTER_POSITION; + +typedef +enum DXGI_OUTDUPL_POINTER_SHAPE_TYPE + { + DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MONOCHROME = 0x1, + DXGI_OUTDUPL_POINTER_SHAPE_TYPE_COLOR = 0x2, + DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MASKED_COLOR = 0x4 + } DXGI_OUTDUPL_POINTER_SHAPE_TYPE; + +typedef struct DXGI_OUTDUPL_POINTER_SHAPE_INFO + { + UINT Type; + UINT Width; + UINT Height; + UINT Pitch; + POINT HotSpot; + } DXGI_OUTDUPL_POINTER_SHAPE_INFO; + +typedef struct DXGI_OUTDUPL_FRAME_INFO + { + LARGE_INTEGER LastPresentTime; + LARGE_INTEGER LastMouseUpdateTime; + UINT AccumulatedFrames; + BOOL RectsCoalesced; + BOOL ProtectedContentMaskedOut; + DXGI_OUTDUPL_POINTER_POSITION PointerPosition; + UINT TotalMetadataBufferSize; + UINT PointerShapeBufferSize; + } DXGI_OUTDUPL_FRAME_INFO; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0001_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0001_v0_0_s_ifspec; + +#ifndef __IDXGIOutputDuplication_INTERFACE_DEFINED__ +#define __IDXGIOutputDuplication_INTERFACE_DEFINED__ + +/* interface IDXGIOutputDuplication */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIOutputDuplication; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("191cfac3-a341-470d-b26e-a864f428319c") + IDXGIOutputDuplication : public IDXGIObject + { + public: + virtual void STDMETHODCALLTYPE GetDesc( + /* [annotation][out] */ + _Out_ DXGI_OUTDUPL_DESC *pDesc) = 0; + + virtual HRESULT STDMETHODCALLTYPE AcquireNextFrame( + /* [annotation][in] */ + _In_ UINT TimeoutInMilliseconds, + /* [annotation][out] */ + _Out_ DXGI_OUTDUPL_FRAME_INFO *pFrameInfo, + /* [annotation][out] */ + _COM_Outptr_ IDXGIResource **ppDesktopResource) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFrameDirtyRects( + /* [annotation][in] */ + _In_ UINT DirtyRectsBufferSize, + /* [annotation][out] */ + _Out_writes_bytes_to_(DirtyRectsBufferSize, *pDirtyRectsBufferSizeRequired) RECT *pDirtyRectsBuffer, + /* [annotation][out] */ + _Out_ UINT *pDirtyRectsBufferSizeRequired) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFrameMoveRects( + /* [annotation][in] */ + _In_ UINT MoveRectsBufferSize, + /* [annotation][out] */ + _Out_writes_bytes_to_(MoveRectsBufferSize, *pMoveRectsBufferSizeRequired) DXGI_OUTDUPL_MOVE_RECT *pMoveRectBuffer, + /* [annotation][out] */ + _Out_ UINT *pMoveRectsBufferSizeRequired) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFramePointerShape( + /* [annotation][in] */ + _In_ UINT PointerShapeBufferSize, + /* [annotation][out] */ + _Out_writes_bytes_to_(PointerShapeBufferSize, *pPointerShapeBufferSizeRequired) void *pPointerShapeBuffer, + /* [annotation][out] */ + _Out_ UINT *pPointerShapeBufferSizeRequired, + /* [annotation][out] */ + _Out_ DXGI_OUTDUPL_POINTER_SHAPE_INFO *pPointerShapeInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE MapDesktopSurface( + /* [annotation][out] */ + _Out_ DXGI_MAPPED_RECT *pLockedRect) = 0; + + virtual HRESULT STDMETHODCALLTYPE UnMapDesktopSurface( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReleaseFrame( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIOutputDuplicationVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIOutputDuplication * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIOutputDuplication * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIOutputDuplication * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIOutputDuplication * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIOutputDuplication * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIOutputDuplication * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIOutputDuplication * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + void ( STDMETHODCALLTYPE *GetDesc )( + IDXGIOutputDuplication * This, + /* [annotation][out] */ + _Out_ DXGI_OUTDUPL_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *AcquireNextFrame )( + IDXGIOutputDuplication * This, + /* [annotation][in] */ + _In_ UINT TimeoutInMilliseconds, + /* [annotation][out] */ + _Out_ DXGI_OUTDUPL_FRAME_INFO *pFrameInfo, + /* [annotation][out] */ + _COM_Outptr_ IDXGIResource **ppDesktopResource); + + HRESULT ( STDMETHODCALLTYPE *GetFrameDirtyRects )( + IDXGIOutputDuplication * This, + /* [annotation][in] */ + _In_ UINT DirtyRectsBufferSize, + /* [annotation][out] */ + _Out_writes_bytes_to_(DirtyRectsBufferSize, *pDirtyRectsBufferSizeRequired) RECT *pDirtyRectsBuffer, + /* [annotation][out] */ + _Out_ UINT *pDirtyRectsBufferSizeRequired); + + HRESULT ( STDMETHODCALLTYPE *GetFrameMoveRects )( + IDXGIOutputDuplication * This, + /* [annotation][in] */ + _In_ UINT MoveRectsBufferSize, + /* [annotation][out] */ + _Out_writes_bytes_to_(MoveRectsBufferSize, *pMoveRectsBufferSizeRequired) DXGI_OUTDUPL_MOVE_RECT *pMoveRectBuffer, + /* [annotation][out] */ + _Out_ UINT *pMoveRectsBufferSizeRequired); + + HRESULT ( STDMETHODCALLTYPE *GetFramePointerShape )( + IDXGIOutputDuplication * This, + /* [annotation][in] */ + _In_ UINT PointerShapeBufferSize, + /* [annotation][out] */ + _Out_writes_bytes_to_(PointerShapeBufferSize, *pPointerShapeBufferSizeRequired) void *pPointerShapeBuffer, + /* [annotation][out] */ + _Out_ UINT *pPointerShapeBufferSizeRequired, + /* [annotation][out] */ + _Out_ DXGI_OUTDUPL_POINTER_SHAPE_INFO *pPointerShapeInfo); + + HRESULT ( STDMETHODCALLTYPE *MapDesktopSurface )( + IDXGIOutputDuplication * This, + /* [annotation][out] */ + _Out_ DXGI_MAPPED_RECT *pLockedRect); + + HRESULT ( STDMETHODCALLTYPE *UnMapDesktopSurface )( + IDXGIOutputDuplication * This); + + HRESULT ( STDMETHODCALLTYPE *ReleaseFrame )( + IDXGIOutputDuplication * This); + + END_INTERFACE + } IDXGIOutputDuplicationVtbl; + + interface IDXGIOutputDuplication + { + CONST_VTBL struct IDXGIOutputDuplicationVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIOutputDuplication_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIOutputDuplication_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIOutputDuplication_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIOutputDuplication_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIOutputDuplication_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIOutputDuplication_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIOutputDuplication_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIOutputDuplication_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define IDXGIOutputDuplication_AcquireNextFrame(This,TimeoutInMilliseconds,pFrameInfo,ppDesktopResource) \ + ( (This)->lpVtbl -> AcquireNextFrame(This,TimeoutInMilliseconds,pFrameInfo,ppDesktopResource) ) + +#define IDXGIOutputDuplication_GetFrameDirtyRects(This,DirtyRectsBufferSize,pDirtyRectsBuffer,pDirtyRectsBufferSizeRequired) \ + ( (This)->lpVtbl -> GetFrameDirtyRects(This,DirtyRectsBufferSize,pDirtyRectsBuffer,pDirtyRectsBufferSizeRequired) ) + +#define IDXGIOutputDuplication_GetFrameMoveRects(This,MoveRectsBufferSize,pMoveRectBuffer,pMoveRectsBufferSizeRequired) \ + ( (This)->lpVtbl -> GetFrameMoveRects(This,MoveRectsBufferSize,pMoveRectBuffer,pMoveRectsBufferSizeRequired) ) + +#define IDXGIOutputDuplication_GetFramePointerShape(This,PointerShapeBufferSize,pPointerShapeBuffer,pPointerShapeBufferSizeRequired,pPointerShapeInfo) \ + ( (This)->lpVtbl -> GetFramePointerShape(This,PointerShapeBufferSize,pPointerShapeBuffer,pPointerShapeBufferSizeRequired,pPointerShapeInfo) ) + +#define IDXGIOutputDuplication_MapDesktopSurface(This,pLockedRect) \ + ( (This)->lpVtbl -> MapDesktopSurface(This,pLockedRect) ) + +#define IDXGIOutputDuplication_UnMapDesktopSurface(This) \ + ( (This)->lpVtbl -> UnMapDesktopSurface(This) ) + +#define IDXGIOutputDuplication_ReleaseFrame(This) \ + ( (This)->lpVtbl -> ReleaseFrame(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIOutputDuplication_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi1_2_0000_0002 */ +/* [local] */ + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ +/*#pragma region App Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ +typedef +enum DXGI_ALPHA_MODE + { + DXGI_ALPHA_MODE_UNSPECIFIED = 0, + DXGI_ALPHA_MODE_PREMULTIPLIED = 1, + DXGI_ALPHA_MODE_STRAIGHT = 2, + DXGI_ALPHA_MODE_IGNORE = 3, + DXGI_ALPHA_MODE_FORCE_DWORD = 0xffffffff + } DXGI_ALPHA_MODE; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0002_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0002_v0_0_s_ifspec; + +#ifndef __IDXGISurface2_INTERFACE_DEFINED__ +#define __IDXGISurface2_INTERFACE_DEFINED__ + +/* interface IDXGISurface2 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGISurface2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("aba496dd-b617-4cb8-a866-bc44d7eb1fa2") + IDXGISurface2 : public IDXGISurface1 + { + public: + virtual HRESULT STDMETHODCALLTYPE GetResource( + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][out] */ + _COM_Outptr_ void **ppParentResource, + /* [annotation][out] */ + _Out_ UINT *pSubresourceIndex) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGISurface2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGISurface2 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGISurface2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGISurface2 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGISurface2 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGISurface2 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGISurface2 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGISurface2 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + IDXGISurface2 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetDesc )( + IDXGISurface2 * This, + /* [annotation][out] */ + _Out_ DXGI_SURFACE_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *Map )( + IDXGISurface2 * This, + /* [annotation][out] */ + _Out_ DXGI_MAPPED_RECT *pLockedRect, + /* [in] */ UINT MapFlags); + + HRESULT ( STDMETHODCALLTYPE *Unmap )( + IDXGISurface2 * This); + + HRESULT ( STDMETHODCALLTYPE *GetDC )( + IDXGISurface2 * This, + /* [in] */ BOOL Discard, + /* [annotation][out] */ + _Out_ HDC *phdc); + + HRESULT ( STDMETHODCALLTYPE *ReleaseDC )( + IDXGISurface2 * This, + /* [annotation][in] */ + _In_opt_ RECT *pDirtyRect); + + HRESULT ( STDMETHODCALLTYPE *GetResource )( + IDXGISurface2 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][out] */ + _COM_Outptr_ void **ppParentResource, + /* [annotation][out] */ + _Out_ UINT *pSubresourceIndex); + + END_INTERFACE + } IDXGISurface2Vtbl; + + interface IDXGISurface2 + { + CONST_VTBL struct IDXGISurface2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGISurface2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGISurface2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGISurface2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGISurface2_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGISurface2_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGISurface2_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGISurface2_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGISurface2_GetDevice(This,riid,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) + + +#define IDXGISurface2_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define IDXGISurface2_Map(This,pLockedRect,MapFlags) \ + ( (This)->lpVtbl -> Map(This,pLockedRect,MapFlags) ) + +#define IDXGISurface2_Unmap(This) \ + ( (This)->lpVtbl -> Unmap(This) ) + + +#define IDXGISurface2_GetDC(This,Discard,phdc) \ + ( (This)->lpVtbl -> GetDC(This,Discard,phdc) ) + +#define IDXGISurface2_ReleaseDC(This,pDirtyRect) \ + ( (This)->lpVtbl -> ReleaseDC(This,pDirtyRect) ) + + +#define IDXGISurface2_GetResource(This,riid,ppParentResource,pSubresourceIndex) \ + ( (This)->lpVtbl -> GetResource(This,riid,ppParentResource,pSubresourceIndex) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGISurface2_INTERFACE_DEFINED__ */ + + +#ifndef __IDXGIResource1_INTERFACE_DEFINED__ +#define __IDXGIResource1_INTERFACE_DEFINED__ + +/* interface IDXGIResource1 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIResource1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("30961379-4609-4a41-998e-54fe567ee0c1") + IDXGIResource1 : public IDXGIResource + { + public: + virtual HRESULT STDMETHODCALLTYPE CreateSubresourceSurface( + UINT index, + /* [annotation][out] */ + _COM_Outptr_ IDXGISurface2 **ppSurface) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSharedHandle( + /* [annotation][in] */ + _In_opt_ const SECURITY_ATTRIBUTES *pAttributes, + /* [annotation][in] */ + _In_ DWORD dwAccess, + /* [annotation][in] */ + _In_opt_ LPCWSTR lpName, + /* [annotation][out] */ + _Out_ HANDLE *pHandle) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIResource1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIResource1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIResource1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIResource1 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIResource1 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIResource1 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIResource1 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIResource1 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + IDXGIResource1 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetSharedHandle )( + IDXGIResource1 * This, + /* [annotation][out] */ + _Out_ HANDLE *pSharedHandle); + + HRESULT ( STDMETHODCALLTYPE *GetUsage )( + IDXGIResource1 * This, + /* [out] */ DXGI_USAGE *pUsage); + + HRESULT ( STDMETHODCALLTYPE *SetEvictionPriority )( + IDXGIResource1 * This, + /* [in] */ UINT EvictionPriority); + + HRESULT ( STDMETHODCALLTYPE *GetEvictionPriority )( + IDXGIResource1 * This, + /* [annotation][retval][out] */ + _Out_ UINT *pEvictionPriority); + + HRESULT ( STDMETHODCALLTYPE *CreateSubresourceSurface )( + IDXGIResource1 * This, + UINT index, + /* [annotation][out] */ + _COM_Outptr_ IDXGISurface2 **ppSurface); + + HRESULT ( STDMETHODCALLTYPE *CreateSharedHandle )( + IDXGIResource1 * This, + /* [annotation][in] */ + _In_opt_ const SECURITY_ATTRIBUTES *pAttributes, + /* [annotation][in] */ + _In_ DWORD dwAccess, + /* [annotation][in] */ + _In_opt_ LPCWSTR lpName, + /* [annotation][out] */ + _Out_ HANDLE *pHandle); + + END_INTERFACE + } IDXGIResource1Vtbl; + + interface IDXGIResource1 + { + CONST_VTBL struct IDXGIResource1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIResource1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIResource1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIResource1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIResource1_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIResource1_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIResource1_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIResource1_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIResource1_GetDevice(This,riid,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) + + +#define IDXGIResource1_GetSharedHandle(This,pSharedHandle) \ + ( (This)->lpVtbl -> GetSharedHandle(This,pSharedHandle) ) + +#define IDXGIResource1_GetUsage(This,pUsage) \ + ( (This)->lpVtbl -> GetUsage(This,pUsage) ) + +#define IDXGIResource1_SetEvictionPriority(This,EvictionPriority) \ + ( (This)->lpVtbl -> SetEvictionPriority(This,EvictionPriority) ) + +#define IDXGIResource1_GetEvictionPriority(This,pEvictionPriority) \ + ( (This)->lpVtbl -> GetEvictionPriority(This,pEvictionPriority) ) + + +#define IDXGIResource1_CreateSubresourceSurface(This,index,ppSurface) \ + ( (This)->lpVtbl -> CreateSubresourceSurface(This,index,ppSurface) ) + +#define IDXGIResource1_CreateSharedHandle(This,pAttributes,dwAccess,lpName,pHandle) \ + ( (This)->lpVtbl -> CreateSharedHandle(This,pAttributes,dwAccess,lpName,pHandle) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIResource1_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi1_2_0000_0004 */ +/* [local] */ + +typedef +enum _DXGI_OFFER_RESOURCE_PRIORITY + { + DXGI_OFFER_RESOURCE_PRIORITY_LOW = 1, + DXGI_OFFER_RESOURCE_PRIORITY_NORMAL = ( DXGI_OFFER_RESOURCE_PRIORITY_LOW + 1 ) , + DXGI_OFFER_RESOURCE_PRIORITY_HIGH = ( DXGI_OFFER_RESOURCE_PRIORITY_NORMAL + 1 ) + } DXGI_OFFER_RESOURCE_PRIORITY; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0004_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0004_v0_0_s_ifspec; + +#ifndef __IDXGIDevice2_INTERFACE_DEFINED__ +#define __IDXGIDevice2_INTERFACE_DEFINED__ + +/* interface IDXGIDevice2 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIDevice2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("05008617-fbfd-4051-a790-144884b4f6a9") + IDXGIDevice2 : public IDXGIDevice1 + { + public: + virtual HRESULT STDMETHODCALLTYPE OfferResources( + /* [annotation][in] */ + _In_ UINT NumResources, + /* [annotation][size_is][in] */ + _In_reads_(NumResources) IDXGIResource *const *ppResources, + /* [annotation][in] */ + _In_ DXGI_OFFER_RESOURCE_PRIORITY Priority) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReclaimResources( + /* [annotation][in] */ + _In_ UINT NumResources, + /* [annotation][size_is][in] */ + _In_reads_(NumResources) IDXGIResource *const *ppResources, + /* [annotation][size_is][out] */ + _Out_writes_all_opt_(NumResources) BOOL *pDiscarded) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnqueueSetEvent( + /* [annotation][in] */ + _In_ HANDLE hEvent) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIDevice2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIDevice2 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIDevice2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIDevice2 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIDevice2 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIDevice2 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIDevice2 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIDevice2 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetAdapter )( + IDXGIDevice2 * This, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **pAdapter); + + HRESULT ( STDMETHODCALLTYPE *CreateSurface )( + IDXGIDevice2 * This, + /* [annotation][in] */ + _In_ const DXGI_SURFACE_DESC *pDesc, + /* [in] */ UINT NumSurfaces, + /* [in] */ DXGI_USAGE Usage, + /* [annotation][in] */ + _In_opt_ const DXGI_SHARED_RESOURCE *pSharedResource, + /* [annotation][out] */ + _COM_Outptr_ IDXGISurface **ppSurface); + + HRESULT ( STDMETHODCALLTYPE *QueryResourceResidency )( + IDXGIDevice2 * This, + /* [annotation][size_is][in] */ + _In_reads_(NumResources) IUnknown *const *ppResources, + /* [annotation][size_is][out] */ + _Out_writes_(NumResources) DXGI_RESIDENCY *pResidencyStatus, + /* [in] */ UINT NumResources); + + HRESULT ( STDMETHODCALLTYPE *SetGPUThreadPriority )( + IDXGIDevice2 * This, + /* [in] */ INT Priority); + + HRESULT ( STDMETHODCALLTYPE *GetGPUThreadPriority )( + IDXGIDevice2 * This, + /* [annotation][retval][out] */ + _Out_ INT *pPriority); + + HRESULT ( STDMETHODCALLTYPE *SetMaximumFrameLatency )( + IDXGIDevice2 * This, + /* [in] */ UINT MaxLatency); + + HRESULT ( STDMETHODCALLTYPE *GetMaximumFrameLatency )( + IDXGIDevice2 * This, + /* [annotation][out] */ + _Out_ UINT *pMaxLatency); + + HRESULT ( STDMETHODCALLTYPE *OfferResources )( + IDXGIDevice2 * This, + /* [annotation][in] */ + _In_ UINT NumResources, + /* [annotation][size_is][in] */ + _In_reads_(NumResources) IDXGIResource *const *ppResources, + /* [annotation][in] */ + _In_ DXGI_OFFER_RESOURCE_PRIORITY Priority); + + HRESULT ( STDMETHODCALLTYPE *ReclaimResources )( + IDXGIDevice2 * This, + /* [annotation][in] */ + _In_ UINT NumResources, + /* [annotation][size_is][in] */ + _In_reads_(NumResources) IDXGIResource *const *ppResources, + /* [annotation][size_is][out] */ + _Out_writes_all_opt_(NumResources) BOOL *pDiscarded); + + HRESULT ( STDMETHODCALLTYPE *EnqueueSetEvent )( + IDXGIDevice2 * This, + /* [annotation][in] */ + _In_ HANDLE hEvent); + + END_INTERFACE + } IDXGIDevice2Vtbl; + + interface IDXGIDevice2 + { + CONST_VTBL struct IDXGIDevice2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIDevice2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIDevice2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIDevice2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIDevice2_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIDevice2_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIDevice2_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIDevice2_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIDevice2_GetAdapter(This,pAdapter) \ + ( (This)->lpVtbl -> GetAdapter(This,pAdapter) ) + +#define IDXGIDevice2_CreateSurface(This,pDesc,NumSurfaces,Usage,pSharedResource,ppSurface) \ + ( (This)->lpVtbl -> CreateSurface(This,pDesc,NumSurfaces,Usage,pSharedResource,ppSurface) ) + +#define IDXGIDevice2_QueryResourceResidency(This,ppResources,pResidencyStatus,NumResources) \ + ( (This)->lpVtbl -> QueryResourceResidency(This,ppResources,pResidencyStatus,NumResources) ) + +#define IDXGIDevice2_SetGPUThreadPriority(This,Priority) \ + ( (This)->lpVtbl -> SetGPUThreadPriority(This,Priority) ) + +#define IDXGIDevice2_GetGPUThreadPriority(This,pPriority) \ + ( (This)->lpVtbl -> GetGPUThreadPriority(This,pPriority) ) + + +#define IDXGIDevice2_SetMaximumFrameLatency(This,MaxLatency) \ + ( (This)->lpVtbl -> SetMaximumFrameLatency(This,MaxLatency) ) + +#define IDXGIDevice2_GetMaximumFrameLatency(This,pMaxLatency) \ + ( (This)->lpVtbl -> GetMaximumFrameLatency(This,pMaxLatency) ) + + +#define IDXGIDevice2_OfferResources(This,NumResources,ppResources,Priority) \ + ( (This)->lpVtbl -> OfferResources(This,NumResources,ppResources,Priority) ) + +#define IDXGIDevice2_ReclaimResources(This,NumResources,ppResources,pDiscarded) \ + ( (This)->lpVtbl -> ReclaimResources(This,NumResources,ppResources,pDiscarded) ) + +#define IDXGIDevice2_EnqueueSetEvent(This,hEvent) \ + ( (This)->lpVtbl -> EnqueueSetEvent(This,hEvent) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIDevice2_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi1_2_0000_0005 */ +/* [local] */ + +#define DXGI_ENUM_MODES_STEREO ( 4UL ) + +#define DXGI_ENUM_MODES_DISABLED_STEREO ( 8UL ) + +#define DXGI_SHARED_RESOURCE_READ ( 0x80000000L ) + +#define DXGI_SHARED_RESOURCE_WRITE ( 1 ) + +typedef struct DXGI_MODE_DESC1 + { + UINT Width; + UINT Height; + DXGI_RATIONAL RefreshRate; + DXGI_FORMAT Format; + DXGI_MODE_SCANLINE_ORDER ScanlineOrdering; + DXGI_MODE_SCALING Scaling; + BOOL Stereo; + } DXGI_MODE_DESC1; + +typedef +enum DXGI_SCALING + { + DXGI_SCALING_STRETCH = 0, + DXGI_SCALING_NONE = 1, + DXGI_SCALING_ASPECT_RATIO_STRETCH = 2 + } DXGI_SCALING; + +typedef struct DXGI_SWAP_CHAIN_DESC1 + { + UINT Width; + UINT Height; + DXGI_FORMAT Format; + BOOL Stereo; + DXGI_SAMPLE_DESC SampleDesc; + DXGI_USAGE BufferUsage; + UINT BufferCount; + DXGI_SCALING Scaling; + DXGI_SWAP_EFFECT SwapEffect; + DXGI_ALPHA_MODE AlphaMode; + UINT Flags; + } DXGI_SWAP_CHAIN_DESC1; + +typedef struct DXGI_SWAP_CHAIN_FULLSCREEN_DESC + { + DXGI_RATIONAL RefreshRate; + DXGI_MODE_SCANLINE_ORDER ScanlineOrdering; + DXGI_MODE_SCALING Scaling; + BOOL Windowed; + } DXGI_SWAP_CHAIN_FULLSCREEN_DESC; + +typedef struct DXGI_PRESENT_PARAMETERS + { + UINT DirtyRectsCount; + /* [annotation] */ + _Field_size_full_opt_(DirtyRectsCount) RECT *pDirtyRects; + RECT *pScrollRect; + POINT *pScrollOffset; + } DXGI_PRESENT_PARAMETERS; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0005_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0005_v0_0_s_ifspec; + +#ifndef __IDXGISwapChain1_INTERFACE_DEFINED__ +#define __IDXGISwapChain1_INTERFACE_DEFINED__ + +/* interface IDXGISwapChain1 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGISwapChain1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("790a45f7-0d42-4876-983a-0a55cfe6f4aa") + IDXGISwapChain1 : public IDXGISwapChain + { + public: + virtual HRESULT STDMETHODCALLTYPE GetDesc1( + /* [annotation][out] */ + _Out_ DXGI_SWAP_CHAIN_DESC1 *pDesc) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFullscreenDesc( + /* [annotation][out] */ + _Out_ DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pDesc) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetHwnd( + /* [annotation][out] */ + _Out_ HWND *pHwnd) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCoreWindow( + /* [annotation][in] */ + _In_ REFIID refiid, + /* [annotation][out] */ + _COM_Outptr_ void **ppUnk) = 0; + + virtual HRESULT STDMETHODCALLTYPE Present1( + /* [in] */ UINT SyncInterval, + /* [in] */ UINT PresentFlags, + /* [annotation][in] */ + _In_ const DXGI_PRESENT_PARAMETERS *pPresentParameters) = 0; + + virtual BOOL STDMETHODCALLTYPE IsTemporaryMonoSupported( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRestrictToOutput( + /* [annotation][out] */ + _Out_ IDXGIOutput **ppRestrictToOutput) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetBackgroundColor( + /* [annotation][in] */ + _In_ const DXGI_RGBA *pColor) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetBackgroundColor( + /* [annotation][out] */ + _Out_ DXGI_RGBA *pColor) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetRotation( + /* [annotation][in] */ + _In_ DXGI_MODE_ROTATION Rotation) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRotation( + /* [annotation][out] */ + _Out_ DXGI_MODE_ROTATION *pRotation) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGISwapChain1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGISwapChain1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGISwapChain1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGISwapChain1 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGISwapChain1 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGISwapChain1 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGISwapChain1 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGISwapChain1 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + IDXGISwapChain1 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *Present )( + IDXGISwapChain1 * This, + /* [in] */ UINT SyncInterval, + /* [in] */ UINT Flags); + + HRESULT ( STDMETHODCALLTYPE *GetBuffer )( + IDXGISwapChain1 * This, + /* [in] */ UINT Buffer, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][out][in] */ + _COM_Outptr_ void **ppSurface); + + HRESULT ( STDMETHODCALLTYPE *SetFullscreenState )( + IDXGISwapChain1 * This, + /* [in] */ BOOL Fullscreen, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pTarget); + + HRESULT ( STDMETHODCALLTYPE *GetFullscreenState )( + IDXGISwapChain1 * This, + /* [annotation][out] */ + _Out_opt_ BOOL *pFullscreen, + /* [annotation][out] */ + _COM_Outptr_opt_result_maybenull_ IDXGIOutput **ppTarget); + + HRESULT ( STDMETHODCALLTYPE *GetDesc )( + IDXGISwapChain1 * This, + /* [annotation][out] */ + _Out_ DXGI_SWAP_CHAIN_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *ResizeBuffers )( + IDXGISwapChain1 * This, + /* [in] */ UINT BufferCount, + /* [in] */ UINT Width, + /* [in] */ UINT Height, + /* [in] */ DXGI_FORMAT NewFormat, + /* [in] */ UINT SwapChainFlags); + + HRESULT ( STDMETHODCALLTYPE *ResizeTarget )( + IDXGISwapChain1 * This, + /* [annotation][in] */ + _In_ const DXGI_MODE_DESC *pNewTargetParameters); + + HRESULT ( STDMETHODCALLTYPE *GetContainingOutput )( + IDXGISwapChain1 * This, + /* [annotation][out] */ + _COM_Outptr_ IDXGIOutput **ppOutput); + + HRESULT ( STDMETHODCALLTYPE *GetFrameStatistics )( + IDXGISwapChain1 * This, + /* [annotation][out] */ + _Out_ DXGI_FRAME_STATISTICS *pStats); + + HRESULT ( STDMETHODCALLTYPE *GetLastPresentCount )( + IDXGISwapChain1 * This, + /* [annotation][out] */ + _Out_ UINT *pLastPresentCount); + + HRESULT ( STDMETHODCALLTYPE *GetDesc1 )( + IDXGISwapChain1 * This, + /* [annotation][out] */ + _Out_ DXGI_SWAP_CHAIN_DESC1 *pDesc); + + HRESULT ( STDMETHODCALLTYPE *GetFullscreenDesc )( + IDXGISwapChain1 * This, + /* [annotation][out] */ + _Out_ DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *GetHwnd )( + IDXGISwapChain1 * This, + /* [annotation][out] */ + _Out_ HWND *pHwnd); + + HRESULT ( STDMETHODCALLTYPE *GetCoreWindow )( + IDXGISwapChain1 * This, + /* [annotation][in] */ + _In_ REFIID refiid, + /* [annotation][out] */ + _COM_Outptr_ void **ppUnk); + + HRESULT ( STDMETHODCALLTYPE *Present1 )( + IDXGISwapChain1 * This, + /* [in] */ UINT SyncInterval, + /* [in] */ UINT PresentFlags, + /* [annotation][in] */ + _In_ const DXGI_PRESENT_PARAMETERS *pPresentParameters); + + BOOL ( STDMETHODCALLTYPE *IsTemporaryMonoSupported )( + IDXGISwapChain1 * This); + + HRESULT ( STDMETHODCALLTYPE *GetRestrictToOutput )( + IDXGISwapChain1 * This, + /* [annotation][out] */ + _Out_ IDXGIOutput **ppRestrictToOutput); + + HRESULT ( STDMETHODCALLTYPE *SetBackgroundColor )( + IDXGISwapChain1 * This, + /* [annotation][in] */ + _In_ const DXGI_RGBA *pColor); + + HRESULT ( STDMETHODCALLTYPE *GetBackgroundColor )( + IDXGISwapChain1 * This, + /* [annotation][out] */ + _Out_ DXGI_RGBA *pColor); + + HRESULT ( STDMETHODCALLTYPE *SetRotation )( + IDXGISwapChain1 * This, + /* [annotation][in] */ + _In_ DXGI_MODE_ROTATION Rotation); + + HRESULT ( STDMETHODCALLTYPE *GetRotation )( + IDXGISwapChain1 * This, + /* [annotation][out] */ + _Out_ DXGI_MODE_ROTATION *pRotation); + + END_INTERFACE + } IDXGISwapChain1Vtbl; + + interface IDXGISwapChain1 + { + CONST_VTBL struct IDXGISwapChain1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGISwapChain1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGISwapChain1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGISwapChain1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGISwapChain1_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGISwapChain1_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGISwapChain1_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGISwapChain1_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGISwapChain1_GetDevice(This,riid,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) + + +#define IDXGISwapChain1_Present(This,SyncInterval,Flags) \ + ( (This)->lpVtbl -> Present(This,SyncInterval,Flags) ) + +#define IDXGISwapChain1_GetBuffer(This,Buffer,riid,ppSurface) \ + ( (This)->lpVtbl -> GetBuffer(This,Buffer,riid,ppSurface) ) + +#define IDXGISwapChain1_SetFullscreenState(This,Fullscreen,pTarget) \ + ( (This)->lpVtbl -> SetFullscreenState(This,Fullscreen,pTarget) ) + +#define IDXGISwapChain1_GetFullscreenState(This,pFullscreen,ppTarget) \ + ( (This)->lpVtbl -> GetFullscreenState(This,pFullscreen,ppTarget) ) + +#define IDXGISwapChain1_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define IDXGISwapChain1_ResizeBuffers(This,BufferCount,Width,Height,NewFormat,SwapChainFlags) \ + ( (This)->lpVtbl -> ResizeBuffers(This,BufferCount,Width,Height,NewFormat,SwapChainFlags) ) + +#define IDXGISwapChain1_ResizeTarget(This,pNewTargetParameters) \ + ( (This)->lpVtbl -> ResizeTarget(This,pNewTargetParameters) ) + +#define IDXGISwapChain1_GetContainingOutput(This,ppOutput) \ + ( (This)->lpVtbl -> GetContainingOutput(This,ppOutput) ) + +#define IDXGISwapChain1_GetFrameStatistics(This,pStats) \ + ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) ) + +#define IDXGISwapChain1_GetLastPresentCount(This,pLastPresentCount) \ + ( (This)->lpVtbl -> GetLastPresentCount(This,pLastPresentCount) ) + + +#define IDXGISwapChain1_GetDesc1(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) + +#define IDXGISwapChain1_GetFullscreenDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetFullscreenDesc(This,pDesc) ) + +#define IDXGISwapChain1_GetHwnd(This,pHwnd) \ + ( (This)->lpVtbl -> GetHwnd(This,pHwnd) ) + +#define IDXGISwapChain1_GetCoreWindow(This,refiid,ppUnk) \ + ( (This)->lpVtbl -> GetCoreWindow(This,refiid,ppUnk) ) + +#define IDXGISwapChain1_Present1(This,SyncInterval,PresentFlags,pPresentParameters) \ + ( (This)->lpVtbl -> Present1(This,SyncInterval,PresentFlags,pPresentParameters) ) + +#define IDXGISwapChain1_IsTemporaryMonoSupported(This) \ + ( (This)->lpVtbl -> IsTemporaryMonoSupported(This) ) + +#define IDXGISwapChain1_GetRestrictToOutput(This,ppRestrictToOutput) \ + ( (This)->lpVtbl -> GetRestrictToOutput(This,ppRestrictToOutput) ) + +#define IDXGISwapChain1_SetBackgroundColor(This,pColor) \ + ( (This)->lpVtbl -> SetBackgroundColor(This,pColor) ) + +#define IDXGISwapChain1_GetBackgroundColor(This,pColor) \ + ( (This)->lpVtbl -> GetBackgroundColor(This,pColor) ) + +#define IDXGISwapChain1_SetRotation(This,Rotation) \ + ( (This)->lpVtbl -> SetRotation(This,Rotation) ) + +#define IDXGISwapChain1_GetRotation(This,pRotation) \ + ( (This)->lpVtbl -> GetRotation(This,pRotation) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGISwapChain1_INTERFACE_DEFINED__ */ + + +#ifndef __IDXGIFactory2_INTERFACE_DEFINED__ +#define __IDXGIFactory2_INTERFACE_DEFINED__ + +/* interface IDXGIFactory2 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIFactory2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("50c83a1c-e072-4c48-87b0-3630fa36a6d0") + IDXGIFactory2 : public IDXGIFactory1 + { + public: + virtual BOOL STDMETHODCALLTYPE IsWindowedStereoEnabled( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSwapChainForHwnd( + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ HWND hWnd, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSwapChainForCoreWindow( + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ IUnknown *pWindow, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSharedResourceAdapterLuid( + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _Out_ LUID *pLuid) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterStereoStatusWindow( + /* [annotation][in] */ + _In_ HWND WindowHandle, + /* [annotation][in] */ + _In_ UINT wMsg, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterStereoStatusEvent( + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie) = 0; + + virtual void STDMETHODCALLTYPE UnregisterStereoStatus( + /* [annotation][in] */ + _In_ DWORD dwCookie) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterOcclusionStatusWindow( + /* [annotation][in] */ + _In_ HWND WindowHandle, + /* [annotation][in] */ + _In_ UINT wMsg, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterOcclusionStatusEvent( + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie) = 0; + + virtual void STDMETHODCALLTYPE UnregisterOcclusionStatus( + /* [annotation][in] */ + _In_ DWORD dwCookie) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSwapChainForComposition( + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIFactory2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIFactory2 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIFactory2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIFactory2 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIFactory2 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIFactory2 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIFactory2 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIFactory2 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *EnumAdapters )( + IDXGIFactory2 * This, + /* [in] */ UINT Adapter, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **ppAdapter); + + HRESULT ( STDMETHODCALLTYPE *MakeWindowAssociation )( + IDXGIFactory2 * This, + HWND WindowHandle, + UINT Flags); + + HRESULT ( STDMETHODCALLTYPE *GetWindowAssociation )( + IDXGIFactory2 * This, + /* [annotation][out] */ + _Out_ HWND *pWindowHandle); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChain )( + IDXGIFactory2 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ DXGI_SWAP_CHAIN_DESC *pDesc, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *CreateSoftwareAdapter )( + IDXGIFactory2 * This, + /* [in] */ HMODULE Module, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **ppAdapter); + + HRESULT ( STDMETHODCALLTYPE *EnumAdapters1 )( + IDXGIFactory2 * This, + /* [in] */ UINT Adapter, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter1 **ppAdapter); + + BOOL ( STDMETHODCALLTYPE *IsCurrent )( + IDXGIFactory2 * This); + + BOOL ( STDMETHODCALLTYPE *IsWindowedStereoEnabled )( + IDXGIFactory2 * This); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForHwnd )( + IDXGIFactory2 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ HWND hWnd, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForCoreWindow )( + IDXGIFactory2 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ IUnknown *pWindow, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *GetSharedResourceAdapterLuid )( + IDXGIFactory2 * This, + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _Out_ LUID *pLuid); + + HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusWindow )( + IDXGIFactory2 * This, + /* [annotation][in] */ + _In_ HWND WindowHandle, + /* [annotation][in] */ + _In_ UINT wMsg, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusEvent )( + IDXGIFactory2 * This, + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + void ( STDMETHODCALLTYPE *UnregisterStereoStatus )( + IDXGIFactory2 * This, + /* [annotation][in] */ + _In_ DWORD dwCookie); + + HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusWindow )( + IDXGIFactory2 * This, + /* [annotation][in] */ + _In_ HWND WindowHandle, + /* [annotation][in] */ + _In_ UINT wMsg, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusEvent )( + IDXGIFactory2 * This, + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + void ( STDMETHODCALLTYPE *UnregisterOcclusionStatus )( + IDXGIFactory2 * This, + /* [annotation][in] */ + _In_ DWORD dwCookie); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForComposition )( + IDXGIFactory2 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain); + + END_INTERFACE + } IDXGIFactory2Vtbl; + + interface IDXGIFactory2 + { + CONST_VTBL struct IDXGIFactory2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIFactory2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIFactory2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIFactory2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIFactory2_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIFactory2_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIFactory2_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIFactory2_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIFactory2_EnumAdapters(This,Adapter,ppAdapter) \ + ( (This)->lpVtbl -> EnumAdapters(This,Adapter,ppAdapter) ) + +#define IDXGIFactory2_MakeWindowAssociation(This,WindowHandle,Flags) \ + ( (This)->lpVtbl -> MakeWindowAssociation(This,WindowHandle,Flags) ) + +#define IDXGIFactory2_GetWindowAssociation(This,pWindowHandle) \ + ( (This)->lpVtbl -> GetWindowAssociation(This,pWindowHandle) ) + +#define IDXGIFactory2_CreateSwapChain(This,pDevice,pDesc,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChain(This,pDevice,pDesc,ppSwapChain) ) + +#define IDXGIFactory2_CreateSoftwareAdapter(This,Module,ppAdapter) \ + ( (This)->lpVtbl -> CreateSoftwareAdapter(This,Module,ppAdapter) ) + + +#define IDXGIFactory2_EnumAdapters1(This,Adapter,ppAdapter) \ + ( (This)->lpVtbl -> EnumAdapters1(This,Adapter,ppAdapter) ) + +#define IDXGIFactory2_IsCurrent(This) \ + ( (This)->lpVtbl -> IsCurrent(This) ) + + +#define IDXGIFactory2_IsWindowedStereoEnabled(This) \ + ( (This)->lpVtbl -> IsWindowedStereoEnabled(This) ) + +#define IDXGIFactory2_CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain) ) + +#define IDXGIFactory2_CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain) ) + +#define IDXGIFactory2_GetSharedResourceAdapterLuid(This,hResource,pLuid) \ + ( (This)->lpVtbl -> GetSharedResourceAdapterLuid(This,hResource,pLuid) ) + +#define IDXGIFactory2_RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie) \ + ( (This)->lpVtbl -> RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie) ) + +#define IDXGIFactory2_RegisterStereoStatusEvent(This,hEvent,pdwCookie) \ + ( (This)->lpVtbl -> RegisterStereoStatusEvent(This,hEvent,pdwCookie) ) + +#define IDXGIFactory2_UnregisterStereoStatus(This,dwCookie) \ + ( (This)->lpVtbl -> UnregisterStereoStatus(This,dwCookie) ) + +#define IDXGIFactory2_RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie) \ + ( (This)->lpVtbl -> RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie) ) + +#define IDXGIFactory2_RegisterOcclusionStatusEvent(This,hEvent,pdwCookie) \ + ( (This)->lpVtbl -> RegisterOcclusionStatusEvent(This,hEvent,pdwCookie) ) + +#define IDXGIFactory2_UnregisterOcclusionStatus(This,dwCookie) \ + ( (This)->lpVtbl -> UnregisterOcclusionStatus(This,dwCookie) ) + +#define IDXGIFactory2_CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIFactory2_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi1_2_0000_0007 */ +/* [local] */ + +typedef +enum DXGI_GRAPHICS_PREEMPTION_GRANULARITY + { + DXGI_GRAPHICS_PREEMPTION_DMA_BUFFER_BOUNDARY = 0, + DXGI_GRAPHICS_PREEMPTION_PRIMITIVE_BOUNDARY = 1, + DXGI_GRAPHICS_PREEMPTION_TRIANGLE_BOUNDARY = 2, + DXGI_GRAPHICS_PREEMPTION_PIXEL_BOUNDARY = 3, + DXGI_GRAPHICS_PREEMPTION_INSTRUCTION_BOUNDARY = 4 + } DXGI_GRAPHICS_PREEMPTION_GRANULARITY; + +typedef +enum DXGI_COMPUTE_PREEMPTION_GRANULARITY + { + DXGI_COMPUTE_PREEMPTION_DMA_BUFFER_BOUNDARY = 0, + DXGI_COMPUTE_PREEMPTION_DISPATCH_BOUNDARY = 1, + DXGI_COMPUTE_PREEMPTION_THREAD_GROUP_BOUNDARY = 2, + DXGI_COMPUTE_PREEMPTION_THREAD_BOUNDARY = 3, + DXGI_COMPUTE_PREEMPTION_INSTRUCTION_BOUNDARY = 4 + } DXGI_COMPUTE_PREEMPTION_GRANULARITY; + +typedef struct DXGI_ADAPTER_DESC2 + { + WCHAR Description[ 128 ]; + UINT VendorId; + UINT DeviceId; + UINT SubSysId; + UINT Revision; + SIZE_T DedicatedVideoMemory; + SIZE_T DedicatedSystemMemory; + SIZE_T SharedSystemMemory; + LUID AdapterLuid; + UINT Flags; + DXGI_GRAPHICS_PREEMPTION_GRANULARITY GraphicsPreemptionGranularity; + DXGI_COMPUTE_PREEMPTION_GRANULARITY ComputePreemptionGranularity; + } DXGI_ADAPTER_DESC2; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0007_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0007_v0_0_s_ifspec; + +#ifndef __IDXGIAdapter2_INTERFACE_DEFINED__ +#define __IDXGIAdapter2_INTERFACE_DEFINED__ + +/* interface IDXGIAdapter2 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIAdapter2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("0AA1AE0A-FA0E-4B84-8644-E05FF8E5ACB5") + IDXGIAdapter2 : public IDXGIAdapter1 + { + public: + virtual HRESULT STDMETHODCALLTYPE GetDesc2( + /* [annotation][out] */ + _Out_ DXGI_ADAPTER_DESC2 *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIAdapter2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIAdapter2 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIAdapter2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIAdapter2 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIAdapter2 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIAdapter2 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIAdapter2 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIAdapter2 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *EnumOutputs )( + IDXGIAdapter2 * This, + /* [in] */ UINT Output, + /* [annotation][out][in] */ + _COM_Outptr_ IDXGIOutput **ppOutput); + + HRESULT ( STDMETHODCALLTYPE *GetDesc )( + IDXGIAdapter2 * This, + /* [annotation][out] */ + _Out_ DXGI_ADAPTER_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *CheckInterfaceSupport )( + IDXGIAdapter2 * This, + /* [annotation][in] */ + _In_ REFGUID InterfaceName, + /* [annotation][out] */ + _Out_ LARGE_INTEGER *pUMDVersion); + + HRESULT ( STDMETHODCALLTYPE *GetDesc1 )( + IDXGIAdapter2 * This, + /* [annotation][out] */ + _Out_ DXGI_ADAPTER_DESC1 *pDesc); + + HRESULT ( STDMETHODCALLTYPE *GetDesc2 )( + IDXGIAdapter2 * This, + /* [annotation][out] */ + _Out_ DXGI_ADAPTER_DESC2 *pDesc); + + END_INTERFACE + } IDXGIAdapter2Vtbl; + + interface IDXGIAdapter2 + { + CONST_VTBL struct IDXGIAdapter2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIAdapter2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIAdapter2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIAdapter2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIAdapter2_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIAdapter2_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIAdapter2_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIAdapter2_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIAdapter2_EnumOutputs(This,Output,ppOutput) \ + ( (This)->lpVtbl -> EnumOutputs(This,Output,ppOutput) ) + +#define IDXGIAdapter2_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define IDXGIAdapter2_CheckInterfaceSupport(This,InterfaceName,pUMDVersion) \ + ( (This)->lpVtbl -> CheckInterfaceSupport(This,InterfaceName,pUMDVersion) ) + + +#define IDXGIAdapter2_GetDesc1(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) + + +#define IDXGIAdapter2_GetDesc2(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc2(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIAdapter2_INTERFACE_DEFINED__ */ + + +#ifndef __IDXGIOutput1_INTERFACE_DEFINED__ +#define __IDXGIOutput1_INTERFACE_DEFINED__ + +/* interface IDXGIOutput1 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIOutput1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("00cddea8-939b-4b83-a340-a685226666cc") + IDXGIOutput1 : public IDXGIOutput + { + public: + virtual HRESULT STDMETHODCALLTYPE GetDisplayModeList1( + /* [in] */ DXGI_FORMAT EnumFormat, + /* [in] */ UINT Flags, + /* [annotation][out][in] */ + _Inout_ UINT *pNumModes, + /* [annotation][out] */ + _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC1 *pDesc) = 0; + + virtual HRESULT STDMETHODCALLTYPE FindClosestMatchingMode1( + /* [annotation][in] */ + _In_ const DXGI_MODE_DESC1 *pModeToMatch, + /* [annotation][out] */ + _Out_ DXGI_MODE_DESC1 *pClosestMatch, + /* [annotation][in] */ + _In_opt_ IUnknown *pConcernedDevice) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDisplaySurfaceData1( + /* [annotation][in] */ + _In_ IDXGIResource *pDestination) = 0; + + virtual HRESULT STDMETHODCALLTYPE DuplicateOutput( + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][out] */ + _COM_Outptr_ IDXGIOutputDuplication **ppOutputDuplication) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIOutput1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIOutput1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIOutput1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIOutput1 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIOutput1 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIOutput1 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIOutput1 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIOutput1 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetDesc )( + IDXGIOutput1 * This, + /* [annotation][out] */ + _Out_ DXGI_OUTPUT_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList )( + IDXGIOutput1 * This, + /* [in] */ DXGI_FORMAT EnumFormat, + /* [in] */ UINT Flags, + /* [annotation][out][in] */ + _Inout_ UINT *pNumModes, + /* [annotation][out] */ + _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode )( + IDXGIOutput1 * This, + /* [annotation][in] */ + _In_ const DXGI_MODE_DESC *pModeToMatch, + /* [annotation][out] */ + _Out_ DXGI_MODE_DESC *pClosestMatch, + /* [annotation][in] */ + _In_opt_ IUnknown *pConcernedDevice); + + HRESULT ( STDMETHODCALLTYPE *WaitForVBlank )( + IDXGIOutput1 * This); + + HRESULT ( STDMETHODCALLTYPE *TakeOwnership )( + IDXGIOutput1 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + BOOL Exclusive); + + void ( STDMETHODCALLTYPE *ReleaseOwnership )( + IDXGIOutput1 * This); + + HRESULT ( STDMETHODCALLTYPE *GetGammaControlCapabilities )( + IDXGIOutput1 * This, + /* [annotation][out] */ + _Out_ DXGI_GAMMA_CONTROL_CAPABILITIES *pGammaCaps); + + HRESULT ( STDMETHODCALLTYPE *SetGammaControl )( + IDXGIOutput1 * This, + /* [annotation][in] */ + _In_ const DXGI_GAMMA_CONTROL *pArray); + + HRESULT ( STDMETHODCALLTYPE *GetGammaControl )( + IDXGIOutput1 * This, + /* [annotation][out] */ + _Out_ DXGI_GAMMA_CONTROL *pArray); + + HRESULT ( STDMETHODCALLTYPE *SetDisplaySurface )( + IDXGIOutput1 * This, + /* [annotation][in] */ + _In_ IDXGISurface *pScanoutSurface); + + HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData )( + IDXGIOutput1 * This, + /* [annotation][in] */ + _In_ IDXGISurface *pDestination); + + HRESULT ( STDMETHODCALLTYPE *GetFrameStatistics )( + IDXGIOutput1 * This, + /* [annotation][out] */ + _Out_ DXGI_FRAME_STATISTICS *pStats); + + HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList1 )( + IDXGIOutput1 * This, + /* [in] */ DXGI_FORMAT EnumFormat, + /* [in] */ UINT Flags, + /* [annotation][out][in] */ + _Inout_ UINT *pNumModes, + /* [annotation][out] */ + _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC1 *pDesc); + + HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode1 )( + IDXGIOutput1 * This, + /* [annotation][in] */ + _In_ const DXGI_MODE_DESC1 *pModeToMatch, + /* [annotation][out] */ + _Out_ DXGI_MODE_DESC1 *pClosestMatch, + /* [annotation][in] */ + _In_opt_ IUnknown *pConcernedDevice); + + HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData1 )( + IDXGIOutput1 * This, + /* [annotation][in] */ + _In_ IDXGIResource *pDestination); + + HRESULT ( STDMETHODCALLTYPE *DuplicateOutput )( + IDXGIOutput1 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][out] */ + _COM_Outptr_ IDXGIOutputDuplication **ppOutputDuplication); + + END_INTERFACE + } IDXGIOutput1Vtbl; + + interface IDXGIOutput1 + { + CONST_VTBL struct IDXGIOutput1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIOutput1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIOutput1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIOutput1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIOutput1_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIOutput1_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIOutput1_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIOutput1_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIOutput1_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define IDXGIOutput1_GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) \ + ( (This)->lpVtbl -> GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) ) + +#define IDXGIOutput1_FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) \ + ( (This)->lpVtbl -> FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) ) + +#define IDXGIOutput1_WaitForVBlank(This) \ + ( (This)->lpVtbl -> WaitForVBlank(This) ) + +#define IDXGIOutput1_TakeOwnership(This,pDevice,Exclusive) \ + ( (This)->lpVtbl -> TakeOwnership(This,pDevice,Exclusive) ) + +#define IDXGIOutput1_ReleaseOwnership(This) \ + ( (This)->lpVtbl -> ReleaseOwnership(This) ) + +#define IDXGIOutput1_GetGammaControlCapabilities(This,pGammaCaps) \ + ( (This)->lpVtbl -> GetGammaControlCapabilities(This,pGammaCaps) ) + +#define IDXGIOutput1_SetGammaControl(This,pArray) \ + ( (This)->lpVtbl -> SetGammaControl(This,pArray) ) + +#define IDXGIOutput1_GetGammaControl(This,pArray) \ + ( (This)->lpVtbl -> GetGammaControl(This,pArray) ) + +#define IDXGIOutput1_SetDisplaySurface(This,pScanoutSurface) \ + ( (This)->lpVtbl -> SetDisplaySurface(This,pScanoutSurface) ) + +#define IDXGIOutput1_GetDisplaySurfaceData(This,pDestination) \ + ( (This)->lpVtbl -> GetDisplaySurfaceData(This,pDestination) ) + +#define IDXGIOutput1_GetFrameStatistics(This,pStats) \ + ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) ) + + +#define IDXGIOutput1_GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) \ + ( (This)->lpVtbl -> GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) ) + +#define IDXGIOutput1_FindClosestMatchingMode1(This,pModeToMatch,pClosestMatch,pConcernedDevice) \ + ( (This)->lpVtbl -> FindClosestMatchingMode1(This,pModeToMatch,pClosestMatch,pConcernedDevice) ) + +#define IDXGIOutput1_GetDisplaySurfaceData1(This,pDestination) \ + ( (This)->lpVtbl -> GetDisplaySurfaceData1(This,pDestination) ) + +#define IDXGIOutput1_DuplicateOutput(This,pDevice,ppOutputDuplication) \ + ( (This)->lpVtbl -> DuplicateOutput(This,pDevice,ppOutputDuplication) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIOutput1_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi1_2_0000_0009 */ +/* [local] */ + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ +DEFINE_GUID(IID_IDXGIDisplayControl,0xea9dbf1a,0xc88e,0x4486,0x85,0x4a,0x98,0xaa,0x01,0x38,0xf3,0x0c); +DEFINE_GUID(IID_IDXGIOutputDuplication,0x191cfac3,0xa341,0x470d,0xb2,0x6e,0xa8,0x64,0xf4,0x28,0x31,0x9c); +DEFINE_GUID(IID_IDXGISurface2,0xaba496dd,0xb617,0x4cb8,0xa8,0x66,0xbc,0x44,0xd7,0xeb,0x1f,0xa2); +DEFINE_GUID(IID_IDXGIResource1,0x30961379,0x4609,0x4a41,0x99,0x8e,0x54,0xfe,0x56,0x7e,0xe0,0xc1); +DEFINE_GUID(IID_IDXGIDevice2,0x05008617,0xfbfd,0x4051,0xa7,0x90,0x14,0x48,0x84,0xb4,0xf6,0xa9); +DEFINE_GUID(IID_IDXGISwapChain1,0x790a45f7,0x0d42,0x4876,0x98,0x3a,0x0a,0x55,0xcf,0xe6,0xf4,0xaa); +DEFINE_GUID(IID_IDXGIFactory2,0x50c83a1c,0xe072,0x4c48,0x87,0xb0,0x36,0x30,0xfa,0x36,0xa6,0xd0); +DEFINE_GUID(IID_IDXGIAdapter2,0x0AA1AE0A,0xFA0E,0x4B84,0x86,0x44,0xE0,0x5F,0xF8,0xE5,0xAC,0xB5); +DEFINE_GUID(IID_IDXGIOutput1,0x00cddea8,0x939b,0x4b83,0xa3,0x40,0xa6,0x85,0x22,0x66,0x66,0xcc); + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0009_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0009_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/dxgi1_3.h b/gfx/include/dxsdk/dxgi1_3.h new file mode 100644 index 0000000000..839c05ca46 --- /dev/null +++ b/gfx/include/dxsdk/dxgi1_3.h @@ -0,0 +1,2121 @@ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ +/* @@MIDL_FILE_HEADING( ) */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __dxgi1_3_h__ +#define __dxgi1_3_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IDXGIDevice3_FWD_DEFINED__ +#define __IDXGIDevice3_FWD_DEFINED__ +typedef interface IDXGIDevice3 IDXGIDevice3; + +#endif /* __IDXGIDevice3_FWD_DEFINED__ */ + + +#ifndef __IDXGISwapChain2_FWD_DEFINED__ +#define __IDXGISwapChain2_FWD_DEFINED__ +typedef interface IDXGISwapChain2 IDXGISwapChain2; + +#endif /* __IDXGISwapChain2_FWD_DEFINED__ */ + + +#ifndef __IDXGIOutput2_FWD_DEFINED__ +#define __IDXGIOutput2_FWD_DEFINED__ +typedef interface IDXGIOutput2 IDXGIOutput2; + +#endif /* __IDXGIOutput2_FWD_DEFINED__ */ + + +#ifndef __IDXGIFactory3_FWD_DEFINED__ +#define __IDXGIFactory3_FWD_DEFINED__ +typedef interface IDXGIFactory3 IDXGIFactory3; + +#endif /* __IDXGIFactory3_FWD_DEFINED__ */ + + +#ifndef __IDXGIDecodeSwapChain_FWD_DEFINED__ +#define __IDXGIDecodeSwapChain_FWD_DEFINED__ +typedef interface IDXGIDecodeSwapChain IDXGIDecodeSwapChain; + +#endif /* __IDXGIDecodeSwapChain_FWD_DEFINED__ */ + + +#ifndef __IDXGIFactoryMedia_FWD_DEFINED__ +#define __IDXGIFactoryMedia_FWD_DEFINED__ +typedef interface IDXGIFactoryMedia IDXGIFactoryMedia; + +#endif /* __IDXGIFactoryMedia_FWD_DEFINED__ */ + + +#ifndef __IDXGISwapChainMedia_FWD_DEFINED__ +#define __IDXGISwapChainMedia_FWD_DEFINED__ +typedef interface IDXGISwapChainMedia IDXGISwapChainMedia; + +#endif /* __IDXGISwapChainMedia_FWD_DEFINED__ */ + + +#ifndef __IDXGIOutput3_FWD_DEFINED__ +#define __IDXGIOutput3_FWD_DEFINED__ +typedef interface IDXGIOutput3 IDXGIOutput3; + +#endif /* __IDXGIOutput3_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "dxgi1_2.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_dxgi1_3_0000_0000 */ +/* [local] */ + +/*#include */ +/*#pragma region App Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ +#define DXGI_CREATE_FACTORY_DEBUG 0x1 +HRESULT WINAPI CreateDXGIFactory2(UINT Flags, REFIID riid, _COM_Outptr_ void **ppFactory); +HRESULT WINAPI DXGIGetDebugInterface1(UINT Flags, REFIID riid, _COM_Outptr_ void **pDebug); + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0000_v0_0_s_ifspec; + +#ifndef __IDXGIDevice3_INTERFACE_DEFINED__ +#define __IDXGIDevice3_INTERFACE_DEFINED__ + +/* interface IDXGIDevice3 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIDevice3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6007896c-3244-4afd-bf18-a6d3beda5023") + IDXGIDevice3 : public IDXGIDevice2 + { + public: + virtual void STDMETHODCALLTYPE Trim( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIDevice3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIDevice3 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIDevice3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIDevice3 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIDevice3 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIDevice3 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIDevice3 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIDevice3 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetAdapter )( + IDXGIDevice3 * This, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **pAdapter); + + HRESULT ( STDMETHODCALLTYPE *CreateSurface )( + IDXGIDevice3 * This, + /* [annotation][in] */ + _In_ const DXGI_SURFACE_DESC *pDesc, + /* [in] */ UINT NumSurfaces, + /* [in] */ DXGI_USAGE Usage, + /* [annotation][in] */ + _In_opt_ const DXGI_SHARED_RESOURCE *pSharedResource, + /* [annotation][out] */ + _COM_Outptr_ IDXGISurface **ppSurface); + + HRESULT ( STDMETHODCALLTYPE *QueryResourceResidency )( + IDXGIDevice3 * This, + /* [annotation][size_is][in] */ + _In_reads_(NumResources) IUnknown *const *ppResources, + /* [annotation][size_is][out] */ + _Out_writes_(NumResources) DXGI_RESIDENCY *pResidencyStatus, + /* [in] */ UINT NumResources); + + HRESULT ( STDMETHODCALLTYPE *SetGPUThreadPriority )( + IDXGIDevice3 * This, + /* [in] */ INT Priority); + + HRESULT ( STDMETHODCALLTYPE *GetGPUThreadPriority )( + IDXGIDevice3 * This, + /* [annotation][retval][out] */ + _Out_ INT *pPriority); + + HRESULT ( STDMETHODCALLTYPE *SetMaximumFrameLatency )( + IDXGIDevice3 * This, + /* [in] */ UINT MaxLatency); + + HRESULT ( STDMETHODCALLTYPE *GetMaximumFrameLatency )( + IDXGIDevice3 * This, + /* [annotation][out] */ + _Out_ UINT *pMaxLatency); + + HRESULT ( STDMETHODCALLTYPE *OfferResources )( + IDXGIDevice3 * This, + /* [annotation][in] */ + _In_ UINT NumResources, + /* [annotation][size_is][in] */ + _In_reads_(NumResources) IDXGIResource *const *ppResources, + /* [annotation][in] */ + _In_ DXGI_OFFER_RESOURCE_PRIORITY Priority); + + HRESULT ( STDMETHODCALLTYPE *ReclaimResources )( + IDXGIDevice3 * This, + /* [annotation][in] */ + _In_ UINT NumResources, + /* [annotation][size_is][in] */ + _In_reads_(NumResources) IDXGIResource *const *ppResources, + /* [annotation][size_is][out] */ + _Out_writes_all_opt_(NumResources) BOOL *pDiscarded); + + HRESULT ( STDMETHODCALLTYPE *EnqueueSetEvent )( + IDXGIDevice3 * This, + /* [annotation][in] */ + _In_ HANDLE hEvent); + + void ( STDMETHODCALLTYPE *Trim )( + IDXGIDevice3 * This); + + END_INTERFACE + } IDXGIDevice3Vtbl; + + interface IDXGIDevice3 + { + CONST_VTBL struct IDXGIDevice3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIDevice3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIDevice3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIDevice3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIDevice3_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIDevice3_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIDevice3_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIDevice3_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIDevice3_GetAdapter(This,pAdapter) \ + ( (This)->lpVtbl -> GetAdapter(This,pAdapter) ) + +#define IDXGIDevice3_CreateSurface(This,pDesc,NumSurfaces,Usage,pSharedResource,ppSurface) \ + ( (This)->lpVtbl -> CreateSurface(This,pDesc,NumSurfaces,Usage,pSharedResource,ppSurface) ) + +#define IDXGIDevice3_QueryResourceResidency(This,ppResources,pResidencyStatus,NumResources) \ + ( (This)->lpVtbl -> QueryResourceResidency(This,ppResources,pResidencyStatus,NumResources) ) + +#define IDXGIDevice3_SetGPUThreadPriority(This,Priority) \ + ( (This)->lpVtbl -> SetGPUThreadPriority(This,Priority) ) + +#define IDXGIDevice3_GetGPUThreadPriority(This,pPriority) \ + ( (This)->lpVtbl -> GetGPUThreadPriority(This,pPriority) ) + + +#define IDXGIDevice3_SetMaximumFrameLatency(This,MaxLatency) \ + ( (This)->lpVtbl -> SetMaximumFrameLatency(This,MaxLatency) ) + +#define IDXGIDevice3_GetMaximumFrameLatency(This,pMaxLatency) \ + ( (This)->lpVtbl -> GetMaximumFrameLatency(This,pMaxLatency) ) + + +#define IDXGIDevice3_OfferResources(This,NumResources,ppResources,Priority) \ + ( (This)->lpVtbl -> OfferResources(This,NumResources,ppResources,Priority) ) + +#define IDXGIDevice3_ReclaimResources(This,NumResources,ppResources,pDiscarded) \ + ( (This)->lpVtbl -> ReclaimResources(This,NumResources,ppResources,pDiscarded) ) + +#define IDXGIDevice3_EnqueueSetEvent(This,hEvent) \ + ( (This)->lpVtbl -> EnqueueSetEvent(This,hEvent) ) + + +#define IDXGIDevice3_Trim(This) \ + ( (This)->lpVtbl -> Trim(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIDevice3_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi1_3_0000_0001 */ +/* [local] */ + +typedef struct DXGI_MATRIX_3X2_F + { + FLOAT _11; + FLOAT _12; + FLOAT _21; + FLOAT _22; + FLOAT _31; + FLOAT _32; + } DXGI_MATRIX_3X2_F; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0001_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0001_v0_0_s_ifspec; + +#ifndef __IDXGISwapChain2_INTERFACE_DEFINED__ +#define __IDXGISwapChain2_INTERFACE_DEFINED__ + +/* interface IDXGISwapChain2 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGISwapChain2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("a8be2ac4-199f-4946-b331-79599fb98de7") + IDXGISwapChain2 : public IDXGISwapChain1 + { + public: + virtual HRESULT STDMETHODCALLTYPE SetSourceSize( + UINT Width, + UINT Height) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSourceSize( + /* [annotation][out] */ + _Out_ UINT *pWidth, + /* [annotation][out] */ + _Out_ UINT *pHeight) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetMaximumFrameLatency( + UINT MaxLatency) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMaximumFrameLatency( + /* [annotation][out] */ + _Out_ UINT *pMaxLatency) = 0; + + virtual HANDLE STDMETHODCALLTYPE GetFrameLatencyWaitableObject( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetMatrixTransform( + const DXGI_MATRIX_3X2_F *pMatrix) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMatrixTransform( + /* [annotation][out] */ + _Out_ DXGI_MATRIX_3X2_F *pMatrix) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGISwapChain2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGISwapChain2 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGISwapChain2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGISwapChain2 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGISwapChain2 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGISwapChain2 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGISwapChain2 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGISwapChain2 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + IDXGISwapChain2 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *Present )( + IDXGISwapChain2 * This, + /* [in] */ UINT SyncInterval, + /* [in] */ UINT Flags); + + HRESULT ( STDMETHODCALLTYPE *GetBuffer )( + IDXGISwapChain2 * This, + /* [in] */ UINT Buffer, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][out][in] */ + _COM_Outptr_ void **ppSurface); + + HRESULT ( STDMETHODCALLTYPE *SetFullscreenState )( + IDXGISwapChain2 * This, + /* [in] */ BOOL Fullscreen, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pTarget); + + HRESULT ( STDMETHODCALLTYPE *GetFullscreenState )( + IDXGISwapChain2 * This, + /* [annotation][out] */ + _Out_opt_ BOOL *pFullscreen, + /* [annotation][out] */ + _COM_Outptr_opt_result_maybenull_ IDXGIOutput **ppTarget); + + HRESULT ( STDMETHODCALLTYPE *GetDesc )( + IDXGISwapChain2 * This, + /* [annotation][out] */ + _Out_ DXGI_SWAP_CHAIN_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *ResizeBuffers )( + IDXGISwapChain2 * This, + /* [in] */ UINT BufferCount, + /* [in] */ UINT Width, + /* [in] */ UINT Height, + /* [in] */ DXGI_FORMAT NewFormat, + /* [in] */ UINT SwapChainFlags); + + HRESULT ( STDMETHODCALLTYPE *ResizeTarget )( + IDXGISwapChain2 * This, + /* [annotation][in] */ + _In_ const DXGI_MODE_DESC *pNewTargetParameters); + + HRESULT ( STDMETHODCALLTYPE *GetContainingOutput )( + IDXGISwapChain2 * This, + /* [annotation][out] */ + _COM_Outptr_ IDXGIOutput **ppOutput); + + HRESULT ( STDMETHODCALLTYPE *GetFrameStatistics )( + IDXGISwapChain2 * This, + /* [annotation][out] */ + _Out_ DXGI_FRAME_STATISTICS *pStats); + + HRESULT ( STDMETHODCALLTYPE *GetLastPresentCount )( + IDXGISwapChain2 * This, + /* [annotation][out] */ + _Out_ UINT *pLastPresentCount); + + HRESULT ( STDMETHODCALLTYPE *GetDesc1 )( + IDXGISwapChain2 * This, + /* [annotation][out] */ + _Out_ DXGI_SWAP_CHAIN_DESC1 *pDesc); + + HRESULT ( STDMETHODCALLTYPE *GetFullscreenDesc )( + IDXGISwapChain2 * This, + /* [annotation][out] */ + _Out_ DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *GetHwnd )( + IDXGISwapChain2 * This, + /* [annotation][out] */ + _Out_ HWND *pHwnd); + + HRESULT ( STDMETHODCALLTYPE *GetCoreWindow )( + IDXGISwapChain2 * This, + /* [annotation][in] */ + _In_ REFIID refiid, + /* [annotation][out] */ + _COM_Outptr_ void **ppUnk); + + HRESULT ( STDMETHODCALLTYPE *Present1 )( + IDXGISwapChain2 * This, + /* [in] */ UINT SyncInterval, + /* [in] */ UINT PresentFlags, + /* [annotation][in] */ + _In_ const DXGI_PRESENT_PARAMETERS *pPresentParameters); + + BOOL ( STDMETHODCALLTYPE *IsTemporaryMonoSupported )( + IDXGISwapChain2 * This); + + HRESULT ( STDMETHODCALLTYPE *GetRestrictToOutput )( + IDXGISwapChain2 * This, + /* [annotation][out] */ + _Out_ IDXGIOutput **ppRestrictToOutput); + + HRESULT ( STDMETHODCALLTYPE *SetBackgroundColor )( + IDXGISwapChain2 * This, + /* [annotation][in] */ + _In_ const DXGI_RGBA *pColor); + + HRESULT ( STDMETHODCALLTYPE *GetBackgroundColor )( + IDXGISwapChain2 * This, + /* [annotation][out] */ + _Out_ DXGI_RGBA *pColor); + + HRESULT ( STDMETHODCALLTYPE *SetRotation )( + IDXGISwapChain2 * This, + /* [annotation][in] */ + _In_ DXGI_MODE_ROTATION Rotation); + + HRESULT ( STDMETHODCALLTYPE *GetRotation )( + IDXGISwapChain2 * This, + /* [annotation][out] */ + _Out_ DXGI_MODE_ROTATION *pRotation); + + HRESULT ( STDMETHODCALLTYPE *SetSourceSize )( + IDXGISwapChain2 * This, + UINT Width, + UINT Height); + + HRESULT ( STDMETHODCALLTYPE *GetSourceSize )( + IDXGISwapChain2 * This, + /* [annotation][out] */ + _Out_ UINT *pWidth, + /* [annotation][out] */ + _Out_ UINT *pHeight); + + HRESULT ( STDMETHODCALLTYPE *SetMaximumFrameLatency )( + IDXGISwapChain2 * This, + UINT MaxLatency); + + HRESULT ( STDMETHODCALLTYPE *GetMaximumFrameLatency )( + IDXGISwapChain2 * This, + /* [annotation][out] */ + _Out_ UINT *pMaxLatency); + + HANDLE ( STDMETHODCALLTYPE *GetFrameLatencyWaitableObject )( + IDXGISwapChain2 * This); + + HRESULT ( STDMETHODCALLTYPE *SetMatrixTransform )( + IDXGISwapChain2 * This, + const DXGI_MATRIX_3X2_F *pMatrix); + + HRESULT ( STDMETHODCALLTYPE *GetMatrixTransform )( + IDXGISwapChain2 * This, + /* [annotation][out] */ + _Out_ DXGI_MATRIX_3X2_F *pMatrix); + + END_INTERFACE + } IDXGISwapChain2Vtbl; + + interface IDXGISwapChain2 + { + CONST_VTBL struct IDXGISwapChain2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGISwapChain2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGISwapChain2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGISwapChain2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGISwapChain2_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGISwapChain2_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGISwapChain2_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGISwapChain2_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGISwapChain2_GetDevice(This,riid,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) + + +#define IDXGISwapChain2_Present(This,SyncInterval,Flags) \ + ( (This)->lpVtbl -> Present(This,SyncInterval,Flags) ) + +#define IDXGISwapChain2_GetBuffer(This,Buffer,riid,ppSurface) \ + ( (This)->lpVtbl -> GetBuffer(This,Buffer,riid,ppSurface) ) + +#define IDXGISwapChain2_SetFullscreenState(This,Fullscreen,pTarget) \ + ( (This)->lpVtbl -> SetFullscreenState(This,Fullscreen,pTarget) ) + +#define IDXGISwapChain2_GetFullscreenState(This,pFullscreen,ppTarget) \ + ( (This)->lpVtbl -> GetFullscreenState(This,pFullscreen,ppTarget) ) + +#define IDXGISwapChain2_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define IDXGISwapChain2_ResizeBuffers(This,BufferCount,Width,Height,NewFormat,SwapChainFlags) \ + ( (This)->lpVtbl -> ResizeBuffers(This,BufferCount,Width,Height,NewFormat,SwapChainFlags) ) + +#define IDXGISwapChain2_ResizeTarget(This,pNewTargetParameters) \ + ( (This)->lpVtbl -> ResizeTarget(This,pNewTargetParameters) ) + +#define IDXGISwapChain2_GetContainingOutput(This,ppOutput) \ + ( (This)->lpVtbl -> GetContainingOutput(This,ppOutput) ) + +#define IDXGISwapChain2_GetFrameStatistics(This,pStats) \ + ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) ) + +#define IDXGISwapChain2_GetLastPresentCount(This,pLastPresentCount) \ + ( (This)->lpVtbl -> GetLastPresentCount(This,pLastPresentCount) ) + + +#define IDXGISwapChain2_GetDesc1(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) + +#define IDXGISwapChain2_GetFullscreenDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetFullscreenDesc(This,pDesc) ) + +#define IDXGISwapChain2_GetHwnd(This,pHwnd) \ + ( (This)->lpVtbl -> GetHwnd(This,pHwnd) ) + +#define IDXGISwapChain2_GetCoreWindow(This,refiid,ppUnk) \ + ( (This)->lpVtbl -> GetCoreWindow(This,refiid,ppUnk) ) + +#define IDXGISwapChain2_Present1(This,SyncInterval,PresentFlags,pPresentParameters) \ + ( (This)->lpVtbl -> Present1(This,SyncInterval,PresentFlags,pPresentParameters) ) + +#define IDXGISwapChain2_IsTemporaryMonoSupported(This) \ + ( (This)->lpVtbl -> IsTemporaryMonoSupported(This) ) + +#define IDXGISwapChain2_GetRestrictToOutput(This,ppRestrictToOutput) \ + ( (This)->lpVtbl -> GetRestrictToOutput(This,ppRestrictToOutput) ) + +#define IDXGISwapChain2_SetBackgroundColor(This,pColor) \ + ( (This)->lpVtbl -> SetBackgroundColor(This,pColor) ) + +#define IDXGISwapChain2_GetBackgroundColor(This,pColor) \ + ( (This)->lpVtbl -> GetBackgroundColor(This,pColor) ) + +#define IDXGISwapChain2_SetRotation(This,Rotation) \ + ( (This)->lpVtbl -> SetRotation(This,Rotation) ) + +#define IDXGISwapChain2_GetRotation(This,pRotation) \ + ( (This)->lpVtbl -> GetRotation(This,pRotation) ) + + +#define IDXGISwapChain2_SetSourceSize(This,Width,Height) \ + ( (This)->lpVtbl -> SetSourceSize(This,Width,Height) ) + +#define IDXGISwapChain2_GetSourceSize(This,pWidth,pHeight) \ + ( (This)->lpVtbl -> GetSourceSize(This,pWidth,pHeight) ) + +#define IDXGISwapChain2_SetMaximumFrameLatency(This,MaxLatency) \ + ( (This)->lpVtbl -> SetMaximumFrameLatency(This,MaxLatency) ) + +#define IDXGISwapChain2_GetMaximumFrameLatency(This,pMaxLatency) \ + ( (This)->lpVtbl -> GetMaximumFrameLatency(This,pMaxLatency) ) + +#define IDXGISwapChain2_GetFrameLatencyWaitableObject(This) \ + ( (This)->lpVtbl -> GetFrameLatencyWaitableObject(This) ) + +#define IDXGISwapChain2_SetMatrixTransform(This,pMatrix) \ + ( (This)->lpVtbl -> SetMatrixTransform(This,pMatrix) ) + +#define IDXGISwapChain2_GetMatrixTransform(This,pMatrix) \ + ( (This)->lpVtbl -> GetMatrixTransform(This,pMatrix) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGISwapChain2_INTERFACE_DEFINED__ */ + + +#ifndef __IDXGIOutput2_INTERFACE_DEFINED__ +#define __IDXGIOutput2_INTERFACE_DEFINED__ + +/* interface IDXGIOutput2 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIOutput2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("595e39d1-2724-4663-99b1-da969de28364") + IDXGIOutput2 : public IDXGIOutput1 + { + public: + virtual BOOL STDMETHODCALLTYPE SupportsOverlays( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIOutput2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIOutput2 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIOutput2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIOutput2 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIOutput2 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIOutput2 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIOutput2 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIOutput2 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetDesc )( + IDXGIOutput2 * This, + /* [annotation][out] */ + _Out_ DXGI_OUTPUT_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList )( + IDXGIOutput2 * This, + /* [in] */ DXGI_FORMAT EnumFormat, + /* [in] */ UINT Flags, + /* [annotation][out][in] */ + _Inout_ UINT *pNumModes, + /* [annotation][out] */ + _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode )( + IDXGIOutput2 * This, + /* [annotation][in] */ + _In_ const DXGI_MODE_DESC *pModeToMatch, + /* [annotation][out] */ + _Out_ DXGI_MODE_DESC *pClosestMatch, + /* [annotation][in] */ + _In_opt_ IUnknown *pConcernedDevice); + + HRESULT ( STDMETHODCALLTYPE *WaitForVBlank )( + IDXGIOutput2 * This); + + HRESULT ( STDMETHODCALLTYPE *TakeOwnership )( + IDXGIOutput2 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + BOOL Exclusive); + + void ( STDMETHODCALLTYPE *ReleaseOwnership )( + IDXGIOutput2 * This); + + HRESULT ( STDMETHODCALLTYPE *GetGammaControlCapabilities )( + IDXGIOutput2 * This, + /* [annotation][out] */ + _Out_ DXGI_GAMMA_CONTROL_CAPABILITIES *pGammaCaps); + + HRESULT ( STDMETHODCALLTYPE *SetGammaControl )( + IDXGIOutput2 * This, + /* [annotation][in] */ + _In_ const DXGI_GAMMA_CONTROL *pArray); + + HRESULT ( STDMETHODCALLTYPE *GetGammaControl )( + IDXGIOutput2 * This, + /* [annotation][out] */ + _Out_ DXGI_GAMMA_CONTROL *pArray); + + HRESULT ( STDMETHODCALLTYPE *SetDisplaySurface )( + IDXGIOutput2 * This, + /* [annotation][in] */ + _In_ IDXGISurface *pScanoutSurface); + + HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData )( + IDXGIOutput2 * This, + /* [annotation][in] */ + _In_ IDXGISurface *pDestination); + + HRESULT ( STDMETHODCALLTYPE *GetFrameStatistics )( + IDXGIOutput2 * This, + /* [annotation][out] */ + _Out_ DXGI_FRAME_STATISTICS *pStats); + + HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList1 )( + IDXGIOutput2 * This, + /* [in] */ DXGI_FORMAT EnumFormat, + /* [in] */ UINT Flags, + /* [annotation][out][in] */ + _Inout_ UINT *pNumModes, + /* [annotation][out] */ + _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC1 *pDesc); + + HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode1 )( + IDXGIOutput2 * This, + /* [annotation][in] */ + _In_ const DXGI_MODE_DESC1 *pModeToMatch, + /* [annotation][out] */ + _Out_ DXGI_MODE_DESC1 *pClosestMatch, + /* [annotation][in] */ + _In_opt_ IUnknown *pConcernedDevice); + + HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData1 )( + IDXGIOutput2 * This, + /* [annotation][in] */ + _In_ IDXGIResource *pDestination); + + HRESULT ( STDMETHODCALLTYPE *DuplicateOutput )( + IDXGIOutput2 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][out] */ + _COM_Outptr_ IDXGIOutputDuplication **ppOutputDuplication); + + BOOL ( STDMETHODCALLTYPE *SupportsOverlays )( + IDXGIOutput2 * This); + + END_INTERFACE + } IDXGIOutput2Vtbl; + + interface IDXGIOutput2 + { + CONST_VTBL struct IDXGIOutput2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIOutput2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIOutput2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIOutput2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIOutput2_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIOutput2_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIOutput2_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIOutput2_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIOutput2_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define IDXGIOutput2_GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) \ + ( (This)->lpVtbl -> GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) ) + +#define IDXGIOutput2_FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) \ + ( (This)->lpVtbl -> FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) ) + +#define IDXGIOutput2_WaitForVBlank(This) \ + ( (This)->lpVtbl -> WaitForVBlank(This) ) + +#define IDXGIOutput2_TakeOwnership(This,pDevice,Exclusive) \ + ( (This)->lpVtbl -> TakeOwnership(This,pDevice,Exclusive) ) + +#define IDXGIOutput2_ReleaseOwnership(This) \ + ( (This)->lpVtbl -> ReleaseOwnership(This) ) + +#define IDXGIOutput2_GetGammaControlCapabilities(This,pGammaCaps) \ + ( (This)->lpVtbl -> GetGammaControlCapabilities(This,pGammaCaps) ) + +#define IDXGIOutput2_SetGammaControl(This,pArray) \ + ( (This)->lpVtbl -> SetGammaControl(This,pArray) ) + +#define IDXGIOutput2_GetGammaControl(This,pArray) \ + ( (This)->lpVtbl -> GetGammaControl(This,pArray) ) + +#define IDXGIOutput2_SetDisplaySurface(This,pScanoutSurface) \ + ( (This)->lpVtbl -> SetDisplaySurface(This,pScanoutSurface) ) + +#define IDXGIOutput2_GetDisplaySurfaceData(This,pDestination) \ + ( (This)->lpVtbl -> GetDisplaySurfaceData(This,pDestination) ) + +#define IDXGIOutput2_GetFrameStatistics(This,pStats) \ + ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) ) + + +#define IDXGIOutput2_GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) \ + ( (This)->lpVtbl -> GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) ) + +#define IDXGIOutput2_FindClosestMatchingMode1(This,pModeToMatch,pClosestMatch,pConcernedDevice) \ + ( (This)->lpVtbl -> FindClosestMatchingMode1(This,pModeToMatch,pClosestMatch,pConcernedDevice) ) + +#define IDXGIOutput2_GetDisplaySurfaceData1(This,pDestination) \ + ( (This)->lpVtbl -> GetDisplaySurfaceData1(This,pDestination) ) + +#define IDXGIOutput2_DuplicateOutput(This,pDevice,ppOutputDuplication) \ + ( (This)->lpVtbl -> DuplicateOutput(This,pDevice,ppOutputDuplication) ) + + +#define IDXGIOutput2_SupportsOverlays(This) \ + ( (This)->lpVtbl -> SupportsOverlays(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIOutput2_INTERFACE_DEFINED__ */ + + +#ifndef __IDXGIFactory3_INTERFACE_DEFINED__ +#define __IDXGIFactory3_INTERFACE_DEFINED__ + +/* interface IDXGIFactory3 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIFactory3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("25483823-cd46-4c7d-86ca-47aa95b837bd") + IDXGIFactory3 : public IDXGIFactory2 + { + public: + virtual UINT STDMETHODCALLTYPE GetCreationFlags( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIFactory3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIFactory3 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIFactory3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIFactory3 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIFactory3 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIFactory3 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIFactory3 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIFactory3 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *EnumAdapters )( + IDXGIFactory3 * This, + /* [in] */ UINT Adapter, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **ppAdapter); + + HRESULT ( STDMETHODCALLTYPE *MakeWindowAssociation )( + IDXGIFactory3 * This, + HWND WindowHandle, + UINT Flags); + + HRESULT ( STDMETHODCALLTYPE *GetWindowAssociation )( + IDXGIFactory3 * This, + /* [annotation][out] */ + _Out_ HWND *pWindowHandle); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChain )( + IDXGIFactory3 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ DXGI_SWAP_CHAIN_DESC *pDesc, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *CreateSoftwareAdapter )( + IDXGIFactory3 * This, + /* [in] */ HMODULE Module, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **ppAdapter); + + HRESULT ( STDMETHODCALLTYPE *EnumAdapters1 )( + IDXGIFactory3 * This, + /* [in] */ UINT Adapter, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter1 **ppAdapter); + + BOOL ( STDMETHODCALLTYPE *IsCurrent )( + IDXGIFactory3 * This); + + BOOL ( STDMETHODCALLTYPE *IsWindowedStereoEnabled )( + IDXGIFactory3 * This); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForHwnd )( + IDXGIFactory3 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ HWND hWnd, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForCoreWindow )( + IDXGIFactory3 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ IUnknown *pWindow, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *GetSharedResourceAdapterLuid )( + IDXGIFactory3 * This, + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _Out_ LUID *pLuid); + + HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusWindow )( + IDXGIFactory3 * This, + /* [annotation][in] */ + _In_ HWND WindowHandle, + /* [annotation][in] */ + _In_ UINT wMsg, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusEvent )( + IDXGIFactory3 * This, + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + void ( STDMETHODCALLTYPE *UnregisterStereoStatus )( + IDXGIFactory3 * This, + /* [annotation][in] */ + _In_ DWORD dwCookie); + + HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusWindow )( + IDXGIFactory3 * This, + /* [annotation][in] */ + _In_ HWND WindowHandle, + /* [annotation][in] */ + _In_ UINT wMsg, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusEvent )( + IDXGIFactory3 * This, + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + void ( STDMETHODCALLTYPE *UnregisterOcclusionStatus )( + IDXGIFactory3 * This, + /* [annotation][in] */ + _In_ DWORD dwCookie); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForComposition )( + IDXGIFactory3 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain); + + UINT ( STDMETHODCALLTYPE *GetCreationFlags )( + IDXGIFactory3 * This); + + END_INTERFACE + } IDXGIFactory3Vtbl; + + interface IDXGIFactory3 + { + CONST_VTBL struct IDXGIFactory3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIFactory3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIFactory3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIFactory3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIFactory3_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIFactory3_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIFactory3_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIFactory3_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIFactory3_EnumAdapters(This,Adapter,ppAdapter) \ + ( (This)->lpVtbl -> EnumAdapters(This,Adapter,ppAdapter) ) + +#define IDXGIFactory3_MakeWindowAssociation(This,WindowHandle,Flags) \ + ( (This)->lpVtbl -> MakeWindowAssociation(This,WindowHandle,Flags) ) + +#define IDXGIFactory3_GetWindowAssociation(This,pWindowHandle) \ + ( (This)->lpVtbl -> GetWindowAssociation(This,pWindowHandle) ) + +#define IDXGIFactory3_CreateSwapChain(This,pDevice,pDesc,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChain(This,pDevice,pDesc,ppSwapChain) ) + +#define IDXGIFactory3_CreateSoftwareAdapter(This,Module,ppAdapter) \ + ( (This)->lpVtbl -> CreateSoftwareAdapter(This,Module,ppAdapter) ) + + +#define IDXGIFactory3_EnumAdapters1(This,Adapter,ppAdapter) \ + ( (This)->lpVtbl -> EnumAdapters1(This,Adapter,ppAdapter) ) + +#define IDXGIFactory3_IsCurrent(This) \ + ( (This)->lpVtbl -> IsCurrent(This) ) + + +#define IDXGIFactory3_IsWindowedStereoEnabled(This) \ + ( (This)->lpVtbl -> IsWindowedStereoEnabled(This) ) + +#define IDXGIFactory3_CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain) ) + +#define IDXGIFactory3_CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain) ) + +#define IDXGIFactory3_GetSharedResourceAdapterLuid(This,hResource,pLuid) \ + ( (This)->lpVtbl -> GetSharedResourceAdapterLuid(This,hResource,pLuid) ) + +#define IDXGIFactory3_RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie) \ + ( (This)->lpVtbl -> RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie) ) + +#define IDXGIFactory3_RegisterStereoStatusEvent(This,hEvent,pdwCookie) \ + ( (This)->lpVtbl -> RegisterStereoStatusEvent(This,hEvent,pdwCookie) ) + +#define IDXGIFactory3_UnregisterStereoStatus(This,dwCookie) \ + ( (This)->lpVtbl -> UnregisterStereoStatus(This,dwCookie) ) + +#define IDXGIFactory3_RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie) \ + ( (This)->lpVtbl -> RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie) ) + +#define IDXGIFactory3_RegisterOcclusionStatusEvent(This,hEvent,pdwCookie) \ + ( (This)->lpVtbl -> RegisterOcclusionStatusEvent(This,hEvent,pdwCookie) ) + +#define IDXGIFactory3_UnregisterOcclusionStatus(This,dwCookie) \ + ( (This)->lpVtbl -> UnregisterOcclusionStatus(This,dwCookie) ) + +#define IDXGIFactory3_CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) ) + + +#define IDXGIFactory3_GetCreationFlags(This) \ + ( (This)->lpVtbl -> GetCreationFlags(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIFactory3_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi1_3_0000_0004 */ +/* [local] */ + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ +/*#pragma region App Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ +typedef struct DXGI_DECODE_SWAP_CHAIN_DESC + { + UINT Flags; + } DXGI_DECODE_SWAP_CHAIN_DESC; + +typedef +enum DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS + { + DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_NOMINAL_RANGE = 0x1, + DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_BT709 = 0x2, + DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_xvYCC = 0x4 + } DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0004_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0004_v0_0_s_ifspec; + +#ifndef __IDXGIDecodeSwapChain_INTERFACE_DEFINED__ +#define __IDXGIDecodeSwapChain_INTERFACE_DEFINED__ + +/* interface IDXGIDecodeSwapChain */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIDecodeSwapChain; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("2633066b-4514-4c7a-8fd8-12ea98059d18") + IDXGIDecodeSwapChain : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE PresentBuffer( + UINT BufferToPresent, + UINT SyncInterval, + UINT Flags) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetSourceRect( + const RECT *pRect) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetTargetRect( + const RECT *pRect) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDestSize( + UINT Width, + UINT Height) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSourceRect( + /* [annotation][out] */ + _Out_ RECT *pRect) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTargetRect( + /* [annotation][out] */ + _Out_ RECT *pRect) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDestSize( + /* [annotation][out] */ + _Out_ UINT *pWidth, + /* [annotation][out] */ + _Out_ UINT *pHeight) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetColorSpace( + DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS ColorSpace) = 0; + + virtual DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS STDMETHODCALLTYPE GetColorSpace( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIDecodeSwapChainVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIDecodeSwapChain * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIDecodeSwapChain * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIDecodeSwapChain * This); + + HRESULT ( STDMETHODCALLTYPE *PresentBuffer )( + IDXGIDecodeSwapChain * This, + UINT BufferToPresent, + UINT SyncInterval, + UINT Flags); + + HRESULT ( STDMETHODCALLTYPE *SetSourceRect )( + IDXGIDecodeSwapChain * This, + const RECT *pRect); + + HRESULT ( STDMETHODCALLTYPE *SetTargetRect )( + IDXGIDecodeSwapChain * This, + const RECT *pRect); + + HRESULT ( STDMETHODCALLTYPE *SetDestSize )( + IDXGIDecodeSwapChain * This, + UINT Width, + UINT Height); + + HRESULT ( STDMETHODCALLTYPE *GetSourceRect )( + IDXGIDecodeSwapChain * This, + /* [annotation][out] */ + _Out_ RECT *pRect); + + HRESULT ( STDMETHODCALLTYPE *GetTargetRect )( + IDXGIDecodeSwapChain * This, + /* [annotation][out] */ + _Out_ RECT *pRect); + + HRESULT ( STDMETHODCALLTYPE *GetDestSize )( + IDXGIDecodeSwapChain * This, + /* [annotation][out] */ + _Out_ UINT *pWidth, + /* [annotation][out] */ + _Out_ UINT *pHeight); + + HRESULT ( STDMETHODCALLTYPE *SetColorSpace )( + IDXGIDecodeSwapChain * This, + DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS ColorSpace); + + DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS ( STDMETHODCALLTYPE *GetColorSpace )( + IDXGIDecodeSwapChain * This); + + END_INTERFACE + } IDXGIDecodeSwapChainVtbl; + + interface IDXGIDecodeSwapChain + { + CONST_VTBL struct IDXGIDecodeSwapChainVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIDecodeSwapChain_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIDecodeSwapChain_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIDecodeSwapChain_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIDecodeSwapChain_PresentBuffer(This,BufferToPresent,SyncInterval,Flags) \ + ( (This)->lpVtbl -> PresentBuffer(This,BufferToPresent,SyncInterval,Flags) ) + +#define IDXGIDecodeSwapChain_SetSourceRect(This,pRect) \ + ( (This)->lpVtbl -> SetSourceRect(This,pRect) ) + +#define IDXGIDecodeSwapChain_SetTargetRect(This,pRect) \ + ( (This)->lpVtbl -> SetTargetRect(This,pRect) ) + +#define IDXGIDecodeSwapChain_SetDestSize(This,Width,Height) \ + ( (This)->lpVtbl -> SetDestSize(This,Width,Height) ) + +#define IDXGIDecodeSwapChain_GetSourceRect(This,pRect) \ + ( (This)->lpVtbl -> GetSourceRect(This,pRect) ) + +#define IDXGIDecodeSwapChain_GetTargetRect(This,pRect) \ + ( (This)->lpVtbl -> GetTargetRect(This,pRect) ) + +#define IDXGIDecodeSwapChain_GetDestSize(This,pWidth,pHeight) \ + ( (This)->lpVtbl -> GetDestSize(This,pWidth,pHeight) ) + +#define IDXGIDecodeSwapChain_SetColorSpace(This,ColorSpace) \ + ( (This)->lpVtbl -> SetColorSpace(This,ColorSpace) ) + +#define IDXGIDecodeSwapChain_GetColorSpace(This) \ + ( (This)->lpVtbl -> GetColorSpace(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIDecodeSwapChain_INTERFACE_DEFINED__ */ + + +#ifndef __IDXGIFactoryMedia_INTERFACE_DEFINED__ +#define __IDXGIFactoryMedia_INTERFACE_DEFINED__ + +/* interface IDXGIFactoryMedia */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIFactoryMedia; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("41e7d1f2-a591-4f7b-a2e5-fa9c843e1c12") + IDXGIFactoryMedia : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE CreateSwapChainForCompositionSurfaceHandle( + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_opt_ HANDLE hSurface, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateDecodeSwapChainForCompositionSurfaceHandle( + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_opt_ HANDLE hSurface, + /* [annotation][in] */ + _In_ DXGI_DECODE_SWAP_CHAIN_DESC *pDesc, + /* [annotation][in] */ + _In_ IDXGIResource *pYuvDecodeBuffers, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGIDecodeSwapChain **ppSwapChain) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIFactoryMediaVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIFactoryMedia * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIFactoryMedia * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIFactoryMedia * This); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForCompositionSurfaceHandle )( + IDXGIFactoryMedia * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_opt_ HANDLE hSurface, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *CreateDecodeSwapChainForCompositionSurfaceHandle )( + IDXGIFactoryMedia * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_opt_ HANDLE hSurface, + /* [annotation][in] */ + _In_ DXGI_DECODE_SWAP_CHAIN_DESC *pDesc, + /* [annotation][in] */ + _In_ IDXGIResource *pYuvDecodeBuffers, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGIDecodeSwapChain **ppSwapChain); + + END_INTERFACE + } IDXGIFactoryMediaVtbl; + + interface IDXGIFactoryMedia + { + CONST_VTBL struct IDXGIFactoryMediaVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIFactoryMedia_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIFactoryMedia_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIFactoryMedia_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIFactoryMedia_CreateSwapChainForCompositionSurfaceHandle(This,pDevice,hSurface,pDesc,pRestrictToOutput,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChainForCompositionSurfaceHandle(This,pDevice,hSurface,pDesc,pRestrictToOutput,ppSwapChain) ) + +#define IDXGIFactoryMedia_CreateDecodeSwapChainForCompositionSurfaceHandle(This,pDevice,hSurface,pDesc,pYuvDecodeBuffers,pRestrictToOutput,ppSwapChain) \ + ( (This)->lpVtbl -> CreateDecodeSwapChainForCompositionSurfaceHandle(This,pDevice,hSurface,pDesc,pYuvDecodeBuffers,pRestrictToOutput,ppSwapChain) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIFactoryMedia_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi1_3_0000_0006 */ +/* [local] */ + +typedef +enum DXGI_FRAME_PRESENTATION_MODE + { + DXGI_FRAME_PRESENTATION_MODE_COMPOSED = 0, + DXGI_FRAME_PRESENTATION_MODE_OVERLAY = 1, + DXGI_FRAME_PRESENTATION_MODE_NONE = 2, + DXGI_FRAME_PRESENTATION_MODE_COMPOSITION_FAILURE = 3 + } DXGI_FRAME_PRESENTATION_MODE; + +typedef struct DXGI_FRAME_STATISTICS_MEDIA + { + UINT PresentCount; + UINT PresentRefreshCount; + UINT SyncRefreshCount; + LARGE_INTEGER SyncQPCTime; + LARGE_INTEGER SyncGPUTime; + DXGI_FRAME_PRESENTATION_MODE CompositionMode; + UINT ApprovedPresentDuration; + } DXGI_FRAME_STATISTICS_MEDIA; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0006_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0006_v0_0_s_ifspec; + +#ifndef __IDXGISwapChainMedia_INTERFACE_DEFINED__ +#define __IDXGISwapChainMedia_INTERFACE_DEFINED__ + +/* interface IDXGISwapChainMedia */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGISwapChainMedia; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("dd95b90b-f05f-4f6a-bd65-25bfb264bd84") + IDXGISwapChainMedia : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetFrameStatisticsMedia( + /* [annotation][out] */ + _Out_ DXGI_FRAME_STATISTICS_MEDIA *pStats) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPresentDuration( + UINT Duration) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckPresentDurationSupport( + UINT DesiredPresentDuration, + /* [annotation][out] */ + _Out_ UINT *pClosestSmallerPresentDuration, + /* [annotation][out] */ + _Out_ UINT *pClosestLargerPresentDuration) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGISwapChainMediaVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGISwapChainMedia * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGISwapChainMedia * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGISwapChainMedia * This); + + HRESULT ( STDMETHODCALLTYPE *GetFrameStatisticsMedia )( + IDXGISwapChainMedia * This, + /* [annotation][out] */ + _Out_ DXGI_FRAME_STATISTICS_MEDIA *pStats); + + HRESULT ( STDMETHODCALLTYPE *SetPresentDuration )( + IDXGISwapChainMedia * This, + UINT Duration); + + HRESULT ( STDMETHODCALLTYPE *CheckPresentDurationSupport )( + IDXGISwapChainMedia * This, + UINT DesiredPresentDuration, + /* [annotation][out] */ + _Out_ UINT *pClosestSmallerPresentDuration, + /* [annotation][out] */ + _Out_ UINT *pClosestLargerPresentDuration); + + END_INTERFACE + } IDXGISwapChainMediaVtbl; + + interface IDXGISwapChainMedia + { + CONST_VTBL struct IDXGISwapChainMediaVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGISwapChainMedia_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGISwapChainMedia_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGISwapChainMedia_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGISwapChainMedia_GetFrameStatisticsMedia(This,pStats) \ + ( (This)->lpVtbl -> GetFrameStatisticsMedia(This,pStats) ) + +#define IDXGISwapChainMedia_SetPresentDuration(This,Duration) \ + ( (This)->lpVtbl -> SetPresentDuration(This,Duration) ) + +#define IDXGISwapChainMedia_CheckPresentDurationSupport(This,DesiredPresentDuration,pClosestSmallerPresentDuration,pClosestLargerPresentDuration) \ + ( (This)->lpVtbl -> CheckPresentDurationSupport(This,DesiredPresentDuration,pClosestSmallerPresentDuration,pClosestLargerPresentDuration) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGISwapChainMedia_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi1_3_0000_0007 */ +/* [local] */ + +typedef +enum DXGI_OVERLAY_SUPPORT_FLAG + { + DXGI_OVERLAY_SUPPORT_FLAG_DIRECT = 0x1, + DXGI_OVERLAY_SUPPORT_FLAG_SCALING = 0x2 + } DXGI_OVERLAY_SUPPORT_FLAG; + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ +/*#pragma region App Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0007_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0007_v0_0_s_ifspec; + +#ifndef __IDXGIOutput3_INTERFACE_DEFINED__ +#define __IDXGIOutput3_INTERFACE_DEFINED__ + +/* interface IDXGIOutput3 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIOutput3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("8a6bb301-7e7e-41F4-a8e0-5b32f7f99b18") + IDXGIOutput3 : public IDXGIOutput2 + { + public: + virtual HRESULT STDMETHODCALLTYPE CheckOverlaySupport( + /* [annotation][in] */ + _In_ DXGI_FORMAT EnumFormat, + /* [annotation][out] */ + _In_ IUnknown *pConcernedDevice, + /* [annotation][out] */ + _Out_ UINT *pFlags) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIOutput3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIOutput3 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIOutput3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIOutput3 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIOutput3 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIOutput3 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIOutput3 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIOutput3 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetDesc )( + IDXGIOutput3 * This, + /* [annotation][out] */ + _Out_ DXGI_OUTPUT_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList )( + IDXGIOutput3 * This, + /* [in] */ DXGI_FORMAT EnumFormat, + /* [in] */ UINT Flags, + /* [annotation][out][in] */ + _Inout_ UINT *pNumModes, + /* [annotation][out] */ + _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode )( + IDXGIOutput3 * This, + /* [annotation][in] */ + _In_ const DXGI_MODE_DESC *pModeToMatch, + /* [annotation][out] */ + _Out_ DXGI_MODE_DESC *pClosestMatch, + /* [annotation][in] */ + _In_opt_ IUnknown *pConcernedDevice); + + HRESULT ( STDMETHODCALLTYPE *WaitForVBlank )( + IDXGIOutput3 * This); + + HRESULT ( STDMETHODCALLTYPE *TakeOwnership )( + IDXGIOutput3 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + BOOL Exclusive); + + void ( STDMETHODCALLTYPE *ReleaseOwnership )( + IDXGIOutput3 * This); + + HRESULT ( STDMETHODCALLTYPE *GetGammaControlCapabilities )( + IDXGIOutput3 * This, + /* [annotation][out] */ + _Out_ DXGI_GAMMA_CONTROL_CAPABILITIES *pGammaCaps); + + HRESULT ( STDMETHODCALLTYPE *SetGammaControl )( + IDXGIOutput3 * This, + /* [annotation][in] */ + _In_ const DXGI_GAMMA_CONTROL *pArray); + + HRESULT ( STDMETHODCALLTYPE *GetGammaControl )( + IDXGIOutput3 * This, + /* [annotation][out] */ + _Out_ DXGI_GAMMA_CONTROL *pArray); + + HRESULT ( STDMETHODCALLTYPE *SetDisplaySurface )( + IDXGIOutput3 * This, + /* [annotation][in] */ + _In_ IDXGISurface *pScanoutSurface); + + HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData )( + IDXGIOutput3 * This, + /* [annotation][in] */ + _In_ IDXGISurface *pDestination); + + HRESULT ( STDMETHODCALLTYPE *GetFrameStatistics )( + IDXGIOutput3 * This, + /* [annotation][out] */ + _Out_ DXGI_FRAME_STATISTICS *pStats); + + HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList1 )( + IDXGIOutput3 * This, + /* [in] */ DXGI_FORMAT EnumFormat, + /* [in] */ UINT Flags, + /* [annotation][out][in] */ + _Inout_ UINT *pNumModes, + /* [annotation][out] */ + _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC1 *pDesc); + + HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode1 )( + IDXGIOutput3 * This, + /* [annotation][in] */ + _In_ const DXGI_MODE_DESC1 *pModeToMatch, + /* [annotation][out] */ + _Out_ DXGI_MODE_DESC1 *pClosestMatch, + /* [annotation][in] */ + _In_opt_ IUnknown *pConcernedDevice); + + HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData1 )( + IDXGIOutput3 * This, + /* [annotation][in] */ + _In_ IDXGIResource *pDestination); + + HRESULT ( STDMETHODCALLTYPE *DuplicateOutput )( + IDXGIOutput3 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][out] */ + _COM_Outptr_ IDXGIOutputDuplication **ppOutputDuplication); + + BOOL ( STDMETHODCALLTYPE *SupportsOverlays )( + IDXGIOutput3 * This); + + HRESULT ( STDMETHODCALLTYPE *CheckOverlaySupport )( + IDXGIOutput3 * This, + /* [annotation][in] */ + _In_ DXGI_FORMAT EnumFormat, + /* [annotation][out] */ + _In_ IUnknown *pConcernedDevice, + /* [annotation][out] */ + _Out_ UINT *pFlags); + + END_INTERFACE + } IDXGIOutput3Vtbl; + + interface IDXGIOutput3 + { + CONST_VTBL struct IDXGIOutput3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIOutput3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIOutput3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIOutput3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIOutput3_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIOutput3_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIOutput3_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIOutput3_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIOutput3_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define IDXGIOutput3_GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) \ + ( (This)->lpVtbl -> GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) ) + +#define IDXGIOutput3_FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) \ + ( (This)->lpVtbl -> FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) ) + +#define IDXGIOutput3_WaitForVBlank(This) \ + ( (This)->lpVtbl -> WaitForVBlank(This) ) + +#define IDXGIOutput3_TakeOwnership(This,pDevice,Exclusive) \ + ( (This)->lpVtbl -> TakeOwnership(This,pDevice,Exclusive) ) + +#define IDXGIOutput3_ReleaseOwnership(This) \ + ( (This)->lpVtbl -> ReleaseOwnership(This) ) + +#define IDXGIOutput3_GetGammaControlCapabilities(This,pGammaCaps) \ + ( (This)->lpVtbl -> GetGammaControlCapabilities(This,pGammaCaps) ) + +#define IDXGIOutput3_SetGammaControl(This,pArray) \ + ( (This)->lpVtbl -> SetGammaControl(This,pArray) ) + +#define IDXGIOutput3_GetGammaControl(This,pArray) \ + ( (This)->lpVtbl -> GetGammaControl(This,pArray) ) + +#define IDXGIOutput3_SetDisplaySurface(This,pScanoutSurface) \ + ( (This)->lpVtbl -> SetDisplaySurface(This,pScanoutSurface) ) + +#define IDXGIOutput3_GetDisplaySurfaceData(This,pDestination) \ + ( (This)->lpVtbl -> GetDisplaySurfaceData(This,pDestination) ) + +#define IDXGIOutput3_GetFrameStatistics(This,pStats) \ + ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) ) + + +#define IDXGIOutput3_GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) \ + ( (This)->lpVtbl -> GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) ) + +#define IDXGIOutput3_FindClosestMatchingMode1(This,pModeToMatch,pClosestMatch,pConcernedDevice) \ + ( (This)->lpVtbl -> FindClosestMatchingMode1(This,pModeToMatch,pClosestMatch,pConcernedDevice) ) + +#define IDXGIOutput3_GetDisplaySurfaceData1(This,pDestination) \ + ( (This)->lpVtbl -> GetDisplaySurfaceData1(This,pDestination) ) + +#define IDXGIOutput3_DuplicateOutput(This,pDevice,ppOutputDuplication) \ + ( (This)->lpVtbl -> DuplicateOutput(This,pDevice,ppOutputDuplication) ) + + +#define IDXGIOutput3_SupportsOverlays(This) \ + ( (This)->lpVtbl -> SupportsOverlays(This) ) + + +#define IDXGIOutput3_CheckOverlaySupport(This,EnumFormat,pConcernedDevice,pFlags) \ + ( (This)->lpVtbl -> CheckOverlaySupport(This,EnumFormat,pConcernedDevice,pFlags) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIOutput3_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi1_3_0000_0008 */ +/* [local] */ + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ +DEFINE_GUID(IID_IDXGIDevice3,0x6007896c,0x3244,0x4afd,0xbf,0x18,0xa6,0xd3,0xbe,0xda,0x50,0x23); +DEFINE_GUID(IID_IDXGISwapChain2,0xa8be2ac4,0x199f,0x4946,0xb3,0x31,0x79,0x59,0x9f,0xb9,0x8d,0xe7); +DEFINE_GUID(IID_IDXGIOutput2,0x595e39d1,0x2724,0x4663,0x99,0xb1,0xda,0x96,0x9d,0xe2,0x83,0x64); +DEFINE_GUID(IID_IDXGIFactory3,0x25483823,0xcd46,0x4c7d,0x86,0xca,0x47,0xaa,0x95,0xb8,0x37,0xbd); +DEFINE_GUID(IID_IDXGIDecodeSwapChain,0x2633066b,0x4514,0x4c7a,0x8f,0xd8,0x12,0xea,0x98,0x05,0x9d,0x18); +DEFINE_GUID(IID_IDXGIFactoryMedia,0x41e7d1f2,0xa591,0x4f7b,0xa2,0xe5,0xfa,0x9c,0x84,0x3e,0x1c,0x12); +DEFINE_GUID(IID_IDXGISwapChainMedia,0xdd95b90b,0xf05f,0x4f6a,0xbd,0x65,0x25,0xbf,0xb2,0x64,0xbd,0x84); +DEFINE_GUID(IID_IDXGIOutput3,0x8a6bb301,0x7e7e,0x41F4,0xa8,0xe0,0x5b,0x32,0xf7,0xf9,0x9b,0x18); + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0008_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0008_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/dxgi1_4.h b/gfx/include/dxsdk/dxgi1_4.h new file mode 100644 index 0000000000..5eae7849dc --- /dev/null +++ b/gfx/include/dxsdk/dxgi1_4.h @@ -0,0 +1,1494 @@ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ +/* @@MIDL_FILE_HEADING( ) */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __dxgi1_4_h__ +#define __dxgi1_4_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IDXGISwapChain3_FWD_DEFINED__ +#define __IDXGISwapChain3_FWD_DEFINED__ +typedef interface IDXGISwapChain3 IDXGISwapChain3; + +#endif /* __IDXGISwapChain3_FWD_DEFINED__ */ + + +#ifndef __IDXGIOutput4_FWD_DEFINED__ +#define __IDXGIOutput4_FWD_DEFINED__ +typedef interface IDXGIOutput4 IDXGIOutput4; + +#endif /* __IDXGIOutput4_FWD_DEFINED__ */ + + +#ifndef __IDXGIFactory4_FWD_DEFINED__ +#define __IDXGIFactory4_FWD_DEFINED__ +typedef interface IDXGIFactory4 IDXGIFactory4; + +#endif /* __IDXGIFactory4_FWD_DEFINED__ */ + + +#ifndef __IDXGIAdapter3_FWD_DEFINED__ +#define __IDXGIAdapter3_FWD_DEFINED__ +typedef interface IDXGIAdapter3 IDXGIAdapter3; + +#endif /* __IDXGIAdapter3_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "dxgi1_3.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_dxgi1_4_0000_0000 */ +/* [local] */ + +/*#include */ +/*#pragma region App Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ +typedef +enum DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG + { + DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT = 0x1, + DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_OVERLAY_PRESENT = 0x2 + } DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0000_v0_0_s_ifspec; + +#ifndef __IDXGISwapChain3_INTERFACE_DEFINED__ +#define __IDXGISwapChain3_INTERFACE_DEFINED__ + +/* interface IDXGISwapChain3 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGISwapChain3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("94d99bdb-f1f8-4ab0-b236-7da0170edab1") + IDXGISwapChain3 : public IDXGISwapChain2 + { + public: + virtual UINT STDMETHODCALLTYPE GetCurrentBackBufferIndex( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckColorSpaceSupport( + /* [annotation][in] */ + _In_ DXGI_COLOR_SPACE_TYPE ColorSpace, + /* [annotation][out] */ + _Out_ UINT *pColorSpaceSupport) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetColorSpace1( + /* [annotation][in] */ + _In_ DXGI_COLOR_SPACE_TYPE ColorSpace) = 0; + + virtual HRESULT STDMETHODCALLTYPE ResizeBuffers1( + /* [annotation][in] */ + _In_ UINT BufferCount, + /* [annotation][in] */ + _In_ UINT Width, + /* [annotation][in] */ + _In_ UINT Height, + /* [annotation][in] */ + _In_ DXGI_FORMAT Format, + /* [annotation][in] */ + _In_ UINT SwapChainFlags, + /* [annotation][in] */ + _In_reads_(BufferCount) const UINT *pCreationNodeMask, + /* [annotation][in] */ + _In_reads_(BufferCount) IUnknown *const *ppPresentQueue) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGISwapChain3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGISwapChain3 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGISwapChain3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGISwapChain3 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGISwapChain3 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGISwapChain3 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGISwapChain3 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGISwapChain3 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + IDXGISwapChain3 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *Present )( + IDXGISwapChain3 * This, + /* [in] */ UINT SyncInterval, + /* [in] */ UINT Flags); + + HRESULT ( STDMETHODCALLTYPE *GetBuffer )( + IDXGISwapChain3 * This, + /* [in] */ UINT Buffer, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][out][in] */ + _COM_Outptr_ void **ppSurface); + + HRESULT ( STDMETHODCALLTYPE *SetFullscreenState )( + IDXGISwapChain3 * This, + /* [in] */ BOOL Fullscreen, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pTarget); + + HRESULT ( STDMETHODCALLTYPE *GetFullscreenState )( + IDXGISwapChain3 * This, + /* [annotation][out] */ + _Out_opt_ BOOL *pFullscreen, + /* [annotation][out] */ + _COM_Outptr_opt_result_maybenull_ IDXGIOutput **ppTarget); + + HRESULT ( STDMETHODCALLTYPE *GetDesc )( + IDXGISwapChain3 * This, + /* [annotation][out] */ + _Out_ DXGI_SWAP_CHAIN_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *ResizeBuffers )( + IDXGISwapChain3 * This, + /* [in] */ UINT BufferCount, + /* [in] */ UINT Width, + /* [in] */ UINT Height, + /* [in] */ DXGI_FORMAT NewFormat, + /* [in] */ UINT SwapChainFlags); + + HRESULT ( STDMETHODCALLTYPE *ResizeTarget )( + IDXGISwapChain3 * This, + /* [annotation][in] */ + _In_ const DXGI_MODE_DESC *pNewTargetParameters); + + HRESULT ( STDMETHODCALLTYPE *GetContainingOutput )( + IDXGISwapChain3 * This, + /* [annotation][out] */ + _COM_Outptr_ IDXGIOutput **ppOutput); + + HRESULT ( STDMETHODCALLTYPE *GetFrameStatistics )( + IDXGISwapChain3 * This, + /* [annotation][out] */ + _Out_ DXGI_FRAME_STATISTICS *pStats); + + HRESULT ( STDMETHODCALLTYPE *GetLastPresentCount )( + IDXGISwapChain3 * This, + /* [annotation][out] */ + _Out_ UINT *pLastPresentCount); + + HRESULT ( STDMETHODCALLTYPE *GetDesc1 )( + IDXGISwapChain3 * This, + /* [annotation][out] */ + _Out_ DXGI_SWAP_CHAIN_DESC1 *pDesc); + + HRESULT ( STDMETHODCALLTYPE *GetFullscreenDesc )( + IDXGISwapChain3 * This, + /* [annotation][out] */ + _Out_ DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *GetHwnd )( + IDXGISwapChain3 * This, + /* [annotation][out] */ + _Out_ HWND *pHwnd); + + HRESULT ( STDMETHODCALLTYPE *GetCoreWindow )( + IDXGISwapChain3 * This, + /* [annotation][in] */ + _In_ REFIID refiid, + /* [annotation][out] */ + _COM_Outptr_ void **ppUnk); + + HRESULT ( STDMETHODCALLTYPE *Present1 )( + IDXGISwapChain3 * This, + /* [in] */ UINT SyncInterval, + /* [in] */ UINT PresentFlags, + /* [annotation][in] */ + _In_ const DXGI_PRESENT_PARAMETERS *pPresentParameters); + + BOOL ( STDMETHODCALLTYPE *IsTemporaryMonoSupported )( + IDXGISwapChain3 * This); + + HRESULT ( STDMETHODCALLTYPE *GetRestrictToOutput )( + IDXGISwapChain3 * This, + /* [annotation][out] */ + _Out_ IDXGIOutput **ppRestrictToOutput); + + HRESULT ( STDMETHODCALLTYPE *SetBackgroundColor )( + IDXGISwapChain3 * This, + /* [annotation][in] */ + _In_ const DXGI_RGBA *pColor); + + HRESULT ( STDMETHODCALLTYPE *GetBackgroundColor )( + IDXGISwapChain3 * This, + /* [annotation][out] */ + _Out_ DXGI_RGBA *pColor); + + HRESULT ( STDMETHODCALLTYPE *SetRotation )( + IDXGISwapChain3 * This, + /* [annotation][in] */ + _In_ DXGI_MODE_ROTATION Rotation); + + HRESULT ( STDMETHODCALLTYPE *GetRotation )( + IDXGISwapChain3 * This, + /* [annotation][out] */ + _Out_ DXGI_MODE_ROTATION *pRotation); + + HRESULT ( STDMETHODCALLTYPE *SetSourceSize )( + IDXGISwapChain3 * This, + UINT Width, + UINT Height); + + HRESULT ( STDMETHODCALLTYPE *GetSourceSize )( + IDXGISwapChain3 * This, + /* [annotation][out] */ + _Out_ UINT *pWidth, + /* [annotation][out] */ + _Out_ UINT *pHeight); + + HRESULT ( STDMETHODCALLTYPE *SetMaximumFrameLatency )( + IDXGISwapChain3 * This, + UINT MaxLatency); + + HRESULT ( STDMETHODCALLTYPE *GetMaximumFrameLatency )( + IDXGISwapChain3 * This, + /* [annotation][out] */ + _Out_ UINT *pMaxLatency); + + HANDLE ( STDMETHODCALLTYPE *GetFrameLatencyWaitableObject )( + IDXGISwapChain3 * This); + + HRESULT ( STDMETHODCALLTYPE *SetMatrixTransform )( + IDXGISwapChain3 * This, + const DXGI_MATRIX_3X2_F *pMatrix); + + HRESULT ( STDMETHODCALLTYPE *GetMatrixTransform )( + IDXGISwapChain3 * This, + /* [annotation][out] */ + _Out_ DXGI_MATRIX_3X2_F *pMatrix); + + UINT ( STDMETHODCALLTYPE *GetCurrentBackBufferIndex )( + IDXGISwapChain3 * This); + + HRESULT ( STDMETHODCALLTYPE *CheckColorSpaceSupport )( + IDXGISwapChain3 * This, + /* [annotation][in] */ + _In_ DXGI_COLOR_SPACE_TYPE ColorSpace, + /* [annotation][out] */ + _Out_ UINT *pColorSpaceSupport); + + HRESULT ( STDMETHODCALLTYPE *SetColorSpace1 )( + IDXGISwapChain3 * This, + /* [annotation][in] */ + _In_ DXGI_COLOR_SPACE_TYPE ColorSpace); + + HRESULT ( STDMETHODCALLTYPE *ResizeBuffers1 )( + IDXGISwapChain3 * This, + /* [annotation][in] */ + _In_ UINT BufferCount, + /* [annotation][in] */ + _In_ UINT Width, + /* [annotation][in] */ + _In_ UINT Height, + /* [annotation][in] */ + _In_ DXGI_FORMAT Format, + /* [annotation][in] */ + _In_ UINT SwapChainFlags, + /* [annotation][in] */ + _In_reads_(BufferCount) const UINT *pCreationNodeMask, + /* [annotation][in] */ + _In_reads_(BufferCount) IUnknown *const *ppPresentQueue); + + END_INTERFACE + } IDXGISwapChain3Vtbl; + + interface IDXGISwapChain3 + { + CONST_VTBL struct IDXGISwapChain3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGISwapChain3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGISwapChain3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGISwapChain3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGISwapChain3_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGISwapChain3_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGISwapChain3_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGISwapChain3_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGISwapChain3_GetDevice(This,riid,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) + + +#define IDXGISwapChain3_Present(This,SyncInterval,Flags) \ + ( (This)->lpVtbl -> Present(This,SyncInterval,Flags) ) + +#define IDXGISwapChain3_GetBuffer(This,Buffer,riid,ppSurface) \ + ( (This)->lpVtbl -> GetBuffer(This,Buffer,riid,ppSurface) ) + +#define IDXGISwapChain3_SetFullscreenState(This,Fullscreen,pTarget) \ + ( (This)->lpVtbl -> SetFullscreenState(This,Fullscreen,pTarget) ) + +#define IDXGISwapChain3_GetFullscreenState(This,pFullscreen,ppTarget) \ + ( (This)->lpVtbl -> GetFullscreenState(This,pFullscreen,ppTarget) ) + +#define IDXGISwapChain3_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define IDXGISwapChain3_ResizeBuffers(This,BufferCount,Width,Height,NewFormat,SwapChainFlags) \ + ( (This)->lpVtbl -> ResizeBuffers(This,BufferCount,Width,Height,NewFormat,SwapChainFlags) ) + +#define IDXGISwapChain3_ResizeTarget(This,pNewTargetParameters) \ + ( (This)->lpVtbl -> ResizeTarget(This,pNewTargetParameters) ) + +#define IDXGISwapChain3_GetContainingOutput(This,ppOutput) \ + ( (This)->lpVtbl -> GetContainingOutput(This,ppOutput) ) + +#define IDXGISwapChain3_GetFrameStatistics(This,pStats) \ + ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) ) + +#define IDXGISwapChain3_GetLastPresentCount(This,pLastPresentCount) \ + ( (This)->lpVtbl -> GetLastPresentCount(This,pLastPresentCount) ) + + +#define IDXGISwapChain3_GetDesc1(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) + +#define IDXGISwapChain3_GetFullscreenDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetFullscreenDesc(This,pDesc) ) + +#define IDXGISwapChain3_GetHwnd(This,pHwnd) \ + ( (This)->lpVtbl -> GetHwnd(This,pHwnd) ) + +#define IDXGISwapChain3_GetCoreWindow(This,refiid,ppUnk) \ + ( (This)->lpVtbl -> GetCoreWindow(This,refiid,ppUnk) ) + +#define IDXGISwapChain3_Present1(This,SyncInterval,PresentFlags,pPresentParameters) \ + ( (This)->lpVtbl -> Present1(This,SyncInterval,PresentFlags,pPresentParameters) ) + +#define IDXGISwapChain3_IsTemporaryMonoSupported(This) \ + ( (This)->lpVtbl -> IsTemporaryMonoSupported(This) ) + +#define IDXGISwapChain3_GetRestrictToOutput(This,ppRestrictToOutput) \ + ( (This)->lpVtbl -> GetRestrictToOutput(This,ppRestrictToOutput) ) + +#define IDXGISwapChain3_SetBackgroundColor(This,pColor) \ + ( (This)->lpVtbl -> SetBackgroundColor(This,pColor) ) + +#define IDXGISwapChain3_GetBackgroundColor(This,pColor) \ + ( (This)->lpVtbl -> GetBackgroundColor(This,pColor) ) + +#define IDXGISwapChain3_SetRotation(This,Rotation) \ + ( (This)->lpVtbl -> SetRotation(This,Rotation) ) + +#define IDXGISwapChain3_GetRotation(This,pRotation) \ + ( (This)->lpVtbl -> GetRotation(This,pRotation) ) + + +#define IDXGISwapChain3_SetSourceSize(This,Width,Height) \ + ( (This)->lpVtbl -> SetSourceSize(This,Width,Height) ) + +#define IDXGISwapChain3_GetSourceSize(This,pWidth,pHeight) \ + ( (This)->lpVtbl -> GetSourceSize(This,pWidth,pHeight) ) + +#define IDXGISwapChain3_SetMaximumFrameLatency(This,MaxLatency) \ + ( (This)->lpVtbl -> SetMaximumFrameLatency(This,MaxLatency) ) + +#define IDXGISwapChain3_GetMaximumFrameLatency(This,pMaxLatency) \ + ( (This)->lpVtbl -> GetMaximumFrameLatency(This,pMaxLatency) ) + +#define IDXGISwapChain3_GetFrameLatencyWaitableObject(This) \ + ( (This)->lpVtbl -> GetFrameLatencyWaitableObject(This) ) + +#define IDXGISwapChain3_SetMatrixTransform(This,pMatrix) \ + ( (This)->lpVtbl -> SetMatrixTransform(This,pMatrix) ) + +#define IDXGISwapChain3_GetMatrixTransform(This,pMatrix) \ + ( (This)->lpVtbl -> GetMatrixTransform(This,pMatrix) ) + + +#define IDXGISwapChain3_GetCurrentBackBufferIndex(This) \ + ( (This)->lpVtbl -> GetCurrentBackBufferIndex(This) ) + +#define IDXGISwapChain3_CheckColorSpaceSupport(This,ColorSpace,pColorSpaceSupport) \ + ( (This)->lpVtbl -> CheckColorSpaceSupport(This,ColorSpace,pColorSpaceSupport) ) + +#define IDXGISwapChain3_SetColorSpace1(This,ColorSpace) \ + ( (This)->lpVtbl -> SetColorSpace1(This,ColorSpace) ) + +#define IDXGISwapChain3_ResizeBuffers1(This,BufferCount,Width,Height,Format,SwapChainFlags,pCreationNodeMask,ppPresentQueue) \ + ( (This)->lpVtbl -> ResizeBuffers1(This,BufferCount,Width,Height,Format,SwapChainFlags,pCreationNodeMask,ppPresentQueue) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGISwapChain3_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi1_4_0000_0001 */ +/* [local] */ + +typedef +enum DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG + { + DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG_PRESENT = 0x1 + } DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0001_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0001_v0_0_s_ifspec; + +#ifndef __IDXGIOutput4_INTERFACE_DEFINED__ +#define __IDXGIOutput4_INTERFACE_DEFINED__ + +/* interface IDXGIOutput4 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIOutput4; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("dc7dca35-2196-414d-9F53-617884032a60") + IDXGIOutput4 : public IDXGIOutput3 + { + public: + virtual HRESULT STDMETHODCALLTYPE CheckOverlayColorSpaceSupport( + /* [annotation][in] */ + _In_ DXGI_FORMAT Format, + /* [annotation][in] */ + _In_ DXGI_COLOR_SPACE_TYPE ColorSpace, + /* [annotation][in] */ + _In_ IUnknown *pConcernedDevice, + /* [annotation][out] */ + _Out_ UINT *pFlags) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIOutput4Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIOutput4 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIOutput4 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIOutput4 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIOutput4 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIOutput4 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIOutput4 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIOutput4 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetDesc )( + IDXGIOutput4 * This, + /* [annotation][out] */ + _Out_ DXGI_OUTPUT_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList )( + IDXGIOutput4 * This, + /* [in] */ DXGI_FORMAT EnumFormat, + /* [in] */ UINT Flags, + /* [annotation][out][in] */ + _Inout_ UINT *pNumModes, + /* [annotation][out] */ + _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode )( + IDXGIOutput4 * This, + /* [annotation][in] */ + _In_ const DXGI_MODE_DESC *pModeToMatch, + /* [annotation][out] */ + _Out_ DXGI_MODE_DESC *pClosestMatch, + /* [annotation][in] */ + _In_opt_ IUnknown *pConcernedDevice); + + HRESULT ( STDMETHODCALLTYPE *WaitForVBlank )( + IDXGIOutput4 * This); + + HRESULT ( STDMETHODCALLTYPE *TakeOwnership )( + IDXGIOutput4 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + BOOL Exclusive); + + void ( STDMETHODCALLTYPE *ReleaseOwnership )( + IDXGIOutput4 * This); + + HRESULT ( STDMETHODCALLTYPE *GetGammaControlCapabilities )( + IDXGIOutput4 * This, + /* [annotation][out] */ + _Out_ DXGI_GAMMA_CONTROL_CAPABILITIES *pGammaCaps); + + HRESULT ( STDMETHODCALLTYPE *SetGammaControl )( + IDXGIOutput4 * This, + /* [annotation][in] */ + _In_ const DXGI_GAMMA_CONTROL *pArray); + + HRESULT ( STDMETHODCALLTYPE *GetGammaControl )( + IDXGIOutput4 * This, + /* [annotation][out] */ + _Out_ DXGI_GAMMA_CONTROL *pArray); + + HRESULT ( STDMETHODCALLTYPE *SetDisplaySurface )( + IDXGIOutput4 * This, + /* [annotation][in] */ + _In_ IDXGISurface *pScanoutSurface); + + HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData )( + IDXGIOutput4 * This, + /* [annotation][in] */ + _In_ IDXGISurface *pDestination); + + HRESULT ( STDMETHODCALLTYPE *GetFrameStatistics )( + IDXGIOutput4 * This, + /* [annotation][out] */ + _Out_ DXGI_FRAME_STATISTICS *pStats); + + HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList1 )( + IDXGIOutput4 * This, + /* [in] */ DXGI_FORMAT EnumFormat, + /* [in] */ UINT Flags, + /* [annotation][out][in] */ + _Inout_ UINT *pNumModes, + /* [annotation][out] */ + _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC1 *pDesc); + + HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode1 )( + IDXGIOutput4 * This, + /* [annotation][in] */ + _In_ const DXGI_MODE_DESC1 *pModeToMatch, + /* [annotation][out] */ + _Out_ DXGI_MODE_DESC1 *pClosestMatch, + /* [annotation][in] */ + _In_opt_ IUnknown *pConcernedDevice); + + HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData1 )( + IDXGIOutput4 * This, + /* [annotation][in] */ + _In_ IDXGIResource *pDestination); + + HRESULT ( STDMETHODCALLTYPE *DuplicateOutput )( + IDXGIOutput4 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][out] */ + _COM_Outptr_ IDXGIOutputDuplication **ppOutputDuplication); + + BOOL ( STDMETHODCALLTYPE *SupportsOverlays )( + IDXGIOutput4 * This); + + HRESULT ( STDMETHODCALLTYPE *CheckOverlaySupport )( + IDXGIOutput4 * This, + /* [annotation][in] */ + _In_ DXGI_FORMAT EnumFormat, + /* [annotation][out] */ + _In_ IUnknown *pConcernedDevice, + /* [annotation][out] */ + _Out_ UINT *pFlags); + + HRESULT ( STDMETHODCALLTYPE *CheckOverlayColorSpaceSupport )( + IDXGIOutput4 * This, + /* [annotation][in] */ + _In_ DXGI_FORMAT Format, + /* [annotation][in] */ + _In_ DXGI_COLOR_SPACE_TYPE ColorSpace, + /* [annotation][in] */ + _In_ IUnknown *pConcernedDevice, + /* [annotation][out] */ + _Out_ UINT *pFlags); + + END_INTERFACE + } IDXGIOutput4Vtbl; + + interface IDXGIOutput4 + { + CONST_VTBL struct IDXGIOutput4Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIOutput4_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIOutput4_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIOutput4_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIOutput4_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIOutput4_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIOutput4_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIOutput4_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIOutput4_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define IDXGIOutput4_GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) \ + ( (This)->lpVtbl -> GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) ) + +#define IDXGIOutput4_FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) \ + ( (This)->lpVtbl -> FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) ) + +#define IDXGIOutput4_WaitForVBlank(This) \ + ( (This)->lpVtbl -> WaitForVBlank(This) ) + +#define IDXGIOutput4_TakeOwnership(This,pDevice,Exclusive) \ + ( (This)->lpVtbl -> TakeOwnership(This,pDevice,Exclusive) ) + +#define IDXGIOutput4_ReleaseOwnership(This) \ + ( (This)->lpVtbl -> ReleaseOwnership(This) ) + +#define IDXGIOutput4_GetGammaControlCapabilities(This,pGammaCaps) \ + ( (This)->lpVtbl -> GetGammaControlCapabilities(This,pGammaCaps) ) + +#define IDXGIOutput4_SetGammaControl(This,pArray) \ + ( (This)->lpVtbl -> SetGammaControl(This,pArray) ) + +#define IDXGIOutput4_GetGammaControl(This,pArray) \ + ( (This)->lpVtbl -> GetGammaControl(This,pArray) ) + +#define IDXGIOutput4_SetDisplaySurface(This,pScanoutSurface) \ + ( (This)->lpVtbl -> SetDisplaySurface(This,pScanoutSurface) ) + +#define IDXGIOutput4_GetDisplaySurfaceData(This,pDestination) \ + ( (This)->lpVtbl -> GetDisplaySurfaceData(This,pDestination) ) + +#define IDXGIOutput4_GetFrameStatistics(This,pStats) \ + ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) ) + + +#define IDXGIOutput4_GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) \ + ( (This)->lpVtbl -> GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) ) + +#define IDXGIOutput4_FindClosestMatchingMode1(This,pModeToMatch,pClosestMatch,pConcernedDevice) \ + ( (This)->lpVtbl -> FindClosestMatchingMode1(This,pModeToMatch,pClosestMatch,pConcernedDevice) ) + +#define IDXGIOutput4_GetDisplaySurfaceData1(This,pDestination) \ + ( (This)->lpVtbl -> GetDisplaySurfaceData1(This,pDestination) ) + +#define IDXGIOutput4_DuplicateOutput(This,pDevice,ppOutputDuplication) \ + ( (This)->lpVtbl -> DuplicateOutput(This,pDevice,ppOutputDuplication) ) + + +#define IDXGIOutput4_SupportsOverlays(This) \ + ( (This)->lpVtbl -> SupportsOverlays(This) ) + + +#define IDXGIOutput4_CheckOverlaySupport(This,EnumFormat,pConcernedDevice,pFlags) \ + ( (This)->lpVtbl -> CheckOverlaySupport(This,EnumFormat,pConcernedDevice,pFlags) ) + + +#define IDXGIOutput4_CheckOverlayColorSpaceSupport(This,Format,ColorSpace,pConcernedDevice,pFlags) \ + ( (This)->lpVtbl -> CheckOverlayColorSpaceSupport(This,Format,ColorSpace,pConcernedDevice,pFlags) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIOutput4_INTERFACE_DEFINED__ */ + + +#ifndef __IDXGIFactory4_INTERFACE_DEFINED__ +#define __IDXGIFactory4_INTERFACE_DEFINED__ + +/* interface IDXGIFactory4 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIFactory4; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1bc6ea02-ef36-464f-bf0c-21ca39e5168a") + IDXGIFactory4 : public IDXGIFactory3 + { + public: + virtual HRESULT STDMETHODCALLTYPE EnumAdapterByLuid( + /* [annotation] */ + _In_ LUID AdapterLuid, + /* [annotation] */ + _In_ REFIID riid, + /* [annotation] */ + _COM_Outptr_ void **ppvAdapter) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumWarpAdapter( + /* [annotation] */ + _In_ REFIID riid, + /* [annotation] */ + _COM_Outptr_ void **ppvAdapter) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIFactory4Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIFactory4 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIFactory4 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIFactory4 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIFactory4 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIFactory4 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIFactory4 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIFactory4 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *EnumAdapters )( + IDXGIFactory4 * This, + /* [in] */ UINT Adapter, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **ppAdapter); + + HRESULT ( STDMETHODCALLTYPE *MakeWindowAssociation )( + IDXGIFactory4 * This, + HWND WindowHandle, + UINT Flags); + + HRESULT ( STDMETHODCALLTYPE *GetWindowAssociation )( + IDXGIFactory4 * This, + /* [annotation][out] */ + _Out_ HWND *pWindowHandle); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChain )( + IDXGIFactory4 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ DXGI_SWAP_CHAIN_DESC *pDesc, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *CreateSoftwareAdapter )( + IDXGIFactory4 * This, + /* [in] */ HMODULE Module, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **ppAdapter); + + HRESULT ( STDMETHODCALLTYPE *EnumAdapters1 )( + IDXGIFactory4 * This, + /* [in] */ UINT Adapter, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter1 **ppAdapter); + + BOOL ( STDMETHODCALLTYPE *IsCurrent )( + IDXGIFactory4 * This); + + BOOL ( STDMETHODCALLTYPE *IsWindowedStereoEnabled )( + IDXGIFactory4 * This); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForHwnd )( + IDXGIFactory4 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ HWND hWnd, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForCoreWindow )( + IDXGIFactory4 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ IUnknown *pWindow, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *GetSharedResourceAdapterLuid )( + IDXGIFactory4 * This, + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _Out_ LUID *pLuid); + + HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusWindow )( + IDXGIFactory4 * This, + /* [annotation][in] */ + _In_ HWND WindowHandle, + /* [annotation][in] */ + _In_ UINT wMsg, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusEvent )( + IDXGIFactory4 * This, + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + void ( STDMETHODCALLTYPE *UnregisterStereoStatus )( + IDXGIFactory4 * This, + /* [annotation][in] */ + _In_ DWORD dwCookie); + + HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusWindow )( + IDXGIFactory4 * This, + /* [annotation][in] */ + _In_ HWND WindowHandle, + /* [annotation][in] */ + _In_ UINT wMsg, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusEvent )( + IDXGIFactory4 * This, + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + void ( STDMETHODCALLTYPE *UnregisterOcclusionStatus )( + IDXGIFactory4 * This, + /* [annotation][in] */ + _In_ DWORD dwCookie); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForComposition )( + IDXGIFactory4 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain); + + UINT ( STDMETHODCALLTYPE *GetCreationFlags )( + IDXGIFactory4 * This); + + HRESULT ( STDMETHODCALLTYPE *EnumAdapterByLuid )( + IDXGIFactory4 * This, + /* [annotation] */ + _In_ LUID AdapterLuid, + /* [annotation] */ + _In_ REFIID riid, + /* [annotation] */ + _COM_Outptr_ void **ppvAdapter); + + HRESULT ( STDMETHODCALLTYPE *EnumWarpAdapter )( + IDXGIFactory4 * This, + /* [annotation] */ + _In_ REFIID riid, + /* [annotation] */ + _COM_Outptr_ void **ppvAdapter); + + END_INTERFACE + } IDXGIFactory4Vtbl; + + interface IDXGIFactory4 + { + CONST_VTBL struct IDXGIFactory4Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIFactory4_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIFactory4_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIFactory4_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIFactory4_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIFactory4_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIFactory4_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIFactory4_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIFactory4_EnumAdapters(This,Adapter,ppAdapter) \ + ( (This)->lpVtbl -> EnumAdapters(This,Adapter,ppAdapter) ) + +#define IDXGIFactory4_MakeWindowAssociation(This,WindowHandle,Flags) \ + ( (This)->lpVtbl -> MakeWindowAssociation(This,WindowHandle,Flags) ) + +#define IDXGIFactory4_GetWindowAssociation(This,pWindowHandle) \ + ( (This)->lpVtbl -> GetWindowAssociation(This,pWindowHandle) ) + +#define IDXGIFactory4_CreateSwapChain(This,pDevice,pDesc,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChain(This,pDevice,pDesc,ppSwapChain) ) + +#define IDXGIFactory4_CreateSoftwareAdapter(This,Module,ppAdapter) \ + ( (This)->lpVtbl -> CreateSoftwareAdapter(This,Module,ppAdapter) ) + + +#define IDXGIFactory4_EnumAdapters1(This,Adapter,ppAdapter) \ + ( (This)->lpVtbl -> EnumAdapters1(This,Adapter,ppAdapter) ) + +#define IDXGIFactory4_IsCurrent(This) \ + ( (This)->lpVtbl -> IsCurrent(This) ) + + +#define IDXGIFactory4_IsWindowedStereoEnabled(This) \ + ( (This)->lpVtbl -> IsWindowedStereoEnabled(This) ) + +#define IDXGIFactory4_CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain) ) + +#define IDXGIFactory4_CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain) ) + +#define IDXGIFactory4_GetSharedResourceAdapterLuid(This,hResource,pLuid) \ + ( (This)->lpVtbl -> GetSharedResourceAdapterLuid(This,hResource,pLuid) ) + +#define IDXGIFactory4_RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie) \ + ( (This)->lpVtbl -> RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie) ) + +#define IDXGIFactory4_RegisterStereoStatusEvent(This,hEvent,pdwCookie) \ + ( (This)->lpVtbl -> RegisterStereoStatusEvent(This,hEvent,pdwCookie) ) + +#define IDXGIFactory4_UnregisterStereoStatus(This,dwCookie) \ + ( (This)->lpVtbl -> UnregisterStereoStatus(This,dwCookie) ) + +#define IDXGIFactory4_RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie) \ + ( (This)->lpVtbl -> RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie) ) + +#define IDXGIFactory4_RegisterOcclusionStatusEvent(This,hEvent,pdwCookie) \ + ( (This)->lpVtbl -> RegisterOcclusionStatusEvent(This,hEvent,pdwCookie) ) + +#define IDXGIFactory4_UnregisterOcclusionStatus(This,dwCookie) \ + ( (This)->lpVtbl -> UnregisterOcclusionStatus(This,dwCookie) ) + +#define IDXGIFactory4_CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) ) + + +#define IDXGIFactory4_GetCreationFlags(This) \ + ( (This)->lpVtbl -> GetCreationFlags(This) ) + + +#define IDXGIFactory4_EnumAdapterByLuid(This,AdapterLuid,riid,ppvAdapter) \ + ( (This)->lpVtbl -> EnumAdapterByLuid(This,AdapterLuid,riid,ppvAdapter) ) + +#define IDXGIFactory4_EnumWarpAdapter(This,riid,ppvAdapter) \ + ( (This)->lpVtbl -> EnumWarpAdapter(This,riid,ppvAdapter) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIFactory4_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi1_4_0000_0003 */ +/* [local] */ + +typedef +enum DXGI_MEMORY_SEGMENT_GROUP + { + DXGI_MEMORY_SEGMENT_GROUP_LOCAL = 0, + DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL = 1 + } DXGI_MEMORY_SEGMENT_GROUP; + +typedef struct DXGI_QUERY_VIDEO_MEMORY_INFO + { + UINT64 Budget; + UINT64 CurrentUsage; + UINT64 AvailableForReservation; + UINT64 CurrentReservation; + } DXGI_QUERY_VIDEO_MEMORY_INFO; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0003_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0003_v0_0_s_ifspec; + +#ifndef __IDXGIAdapter3_INTERFACE_DEFINED__ +#define __IDXGIAdapter3_INTERFACE_DEFINED__ + +/* interface IDXGIAdapter3 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIAdapter3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("645967A4-1392-4310-A798-8053CE3E93FD") + IDXGIAdapter3 : public IDXGIAdapter2 + { + public: + virtual HRESULT STDMETHODCALLTYPE RegisterHardwareContentProtectionTeardownStatusEvent( + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie) = 0; + + virtual void STDMETHODCALLTYPE UnregisterHardwareContentProtectionTeardownStatus( + /* [annotation][in] */ + _In_ DWORD dwCookie) = 0; + + virtual HRESULT STDMETHODCALLTYPE QueryVideoMemoryInfo( + /* [annotation][in] */ + _In_ UINT NodeIndex, + /* [annotation][in] */ + _In_ DXGI_MEMORY_SEGMENT_GROUP MemorySegmentGroup, + /* [annotation][out] */ + _Out_ DXGI_QUERY_VIDEO_MEMORY_INFO *pVideoMemoryInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetVideoMemoryReservation( + /* [annotation][in] */ + _In_ UINT NodeIndex, + /* [annotation][in] */ + _In_ DXGI_MEMORY_SEGMENT_GROUP MemorySegmentGroup, + /* [annotation][in] */ + _In_ UINT64 Reservation) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterVideoMemoryBudgetChangeNotificationEvent( + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie) = 0; + + virtual void STDMETHODCALLTYPE UnregisterVideoMemoryBudgetChangeNotification( + /* [annotation][in] */ + _In_ DWORD dwCookie) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIAdapter3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIAdapter3 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIAdapter3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIAdapter3 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIAdapter3 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIAdapter3 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIAdapter3 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIAdapter3 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *EnumOutputs )( + IDXGIAdapter3 * This, + /* [in] */ UINT Output, + /* [annotation][out][in] */ + _COM_Outptr_ IDXGIOutput **ppOutput); + + HRESULT ( STDMETHODCALLTYPE *GetDesc )( + IDXGIAdapter3 * This, + /* [annotation][out] */ + _Out_ DXGI_ADAPTER_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *CheckInterfaceSupport )( + IDXGIAdapter3 * This, + /* [annotation][in] */ + _In_ REFGUID InterfaceName, + /* [annotation][out] */ + _Out_ LARGE_INTEGER *pUMDVersion); + + HRESULT ( STDMETHODCALLTYPE *GetDesc1 )( + IDXGIAdapter3 * This, + /* [annotation][out] */ + _Out_ DXGI_ADAPTER_DESC1 *pDesc); + + HRESULT ( STDMETHODCALLTYPE *GetDesc2 )( + IDXGIAdapter3 * This, + /* [annotation][out] */ + _Out_ DXGI_ADAPTER_DESC2 *pDesc); + + HRESULT ( STDMETHODCALLTYPE *RegisterHardwareContentProtectionTeardownStatusEvent )( + IDXGIAdapter3 * This, + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + void ( STDMETHODCALLTYPE *UnregisterHardwareContentProtectionTeardownStatus )( + IDXGIAdapter3 * This, + /* [annotation][in] */ + _In_ DWORD dwCookie); + + HRESULT ( STDMETHODCALLTYPE *QueryVideoMemoryInfo )( + IDXGIAdapter3 * This, + /* [annotation][in] */ + _In_ UINT NodeIndex, + /* [annotation][in] */ + _In_ DXGI_MEMORY_SEGMENT_GROUP MemorySegmentGroup, + /* [annotation][out] */ + _Out_ DXGI_QUERY_VIDEO_MEMORY_INFO *pVideoMemoryInfo); + + HRESULT ( STDMETHODCALLTYPE *SetVideoMemoryReservation )( + IDXGIAdapter3 * This, + /* [annotation][in] */ + _In_ UINT NodeIndex, + /* [annotation][in] */ + _In_ DXGI_MEMORY_SEGMENT_GROUP MemorySegmentGroup, + /* [annotation][in] */ + _In_ UINT64 Reservation); + + HRESULT ( STDMETHODCALLTYPE *RegisterVideoMemoryBudgetChangeNotificationEvent )( + IDXGIAdapter3 * This, + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + void ( STDMETHODCALLTYPE *UnregisterVideoMemoryBudgetChangeNotification )( + IDXGIAdapter3 * This, + /* [annotation][in] */ + _In_ DWORD dwCookie); + + END_INTERFACE + } IDXGIAdapter3Vtbl; + + interface IDXGIAdapter3 + { + CONST_VTBL struct IDXGIAdapter3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIAdapter3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIAdapter3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIAdapter3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIAdapter3_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIAdapter3_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIAdapter3_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIAdapter3_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIAdapter3_EnumOutputs(This,Output,ppOutput) \ + ( (This)->lpVtbl -> EnumOutputs(This,Output,ppOutput) ) + +#define IDXGIAdapter3_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define IDXGIAdapter3_CheckInterfaceSupport(This,InterfaceName,pUMDVersion) \ + ( (This)->lpVtbl -> CheckInterfaceSupport(This,InterfaceName,pUMDVersion) ) + + +#define IDXGIAdapter3_GetDesc1(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) + + +#define IDXGIAdapter3_GetDesc2(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc2(This,pDesc) ) + + +#define IDXGIAdapter3_RegisterHardwareContentProtectionTeardownStatusEvent(This,hEvent,pdwCookie) \ + ( (This)->lpVtbl -> RegisterHardwareContentProtectionTeardownStatusEvent(This,hEvent,pdwCookie) ) + +#define IDXGIAdapter3_UnregisterHardwareContentProtectionTeardownStatus(This,dwCookie) \ + ( (This)->lpVtbl -> UnregisterHardwareContentProtectionTeardownStatus(This,dwCookie) ) + +#define IDXGIAdapter3_QueryVideoMemoryInfo(This,NodeIndex,MemorySegmentGroup,pVideoMemoryInfo) \ + ( (This)->lpVtbl -> QueryVideoMemoryInfo(This,NodeIndex,MemorySegmentGroup,pVideoMemoryInfo) ) + +#define IDXGIAdapter3_SetVideoMemoryReservation(This,NodeIndex,MemorySegmentGroup,Reservation) \ + ( (This)->lpVtbl -> SetVideoMemoryReservation(This,NodeIndex,MemorySegmentGroup,Reservation) ) + +#define IDXGIAdapter3_RegisterVideoMemoryBudgetChangeNotificationEvent(This,hEvent,pdwCookie) \ + ( (This)->lpVtbl -> RegisterVideoMemoryBudgetChangeNotificationEvent(This,hEvent,pdwCookie) ) + +#define IDXGIAdapter3_UnregisterVideoMemoryBudgetChangeNotification(This,dwCookie) \ + ( (This)->lpVtbl -> UnregisterVideoMemoryBudgetChangeNotification(This,dwCookie) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIAdapter3_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi1_4_0000_0004 */ +/* [local] */ + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ +DEFINE_GUID(IID_IDXGISwapChain3,0x94d99bdb,0xf1f8,0x4ab0,0xb2,0x36,0x7d,0xa0,0x17,0x0e,0xda,0xb1); +DEFINE_GUID(IID_IDXGIOutput4,0xdc7dca35,0x2196,0x414d,0x9F,0x53,0x61,0x78,0x84,0x03,0x2a,0x60); +DEFINE_GUID(IID_IDXGIFactory4,0x1bc6ea02,0xef36,0x464f,0xbf,0x0c,0x21,0xca,0x39,0xe5,0x16,0x8a); +DEFINE_GUID(IID_IDXGIAdapter3,0x645967A4,0x1392,0x4310,0xA7,0x98,0x80,0x53,0xCE,0x3E,0x93,0xFD); + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0004_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0004_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/dxgi1_5.h b/gfx/include/dxsdk/dxgi1_5.h new file mode 100644 index 0000000000..f9d8257d5c --- /dev/null +++ b/gfx/include/dxsdk/dxgi1_5.h @@ -0,0 +1,1539 @@ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ +/* @@MIDL_FILE_HEADING( ) */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __dxgi1_5_h__ +#define __dxgi1_5_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IDXGIOutput5_FWD_DEFINED__ +#define __IDXGIOutput5_FWD_DEFINED__ +typedef interface IDXGIOutput5 IDXGIOutput5; + +#endif /* __IDXGIOutput5_FWD_DEFINED__ */ + + +#ifndef __IDXGISwapChain4_FWD_DEFINED__ +#define __IDXGISwapChain4_FWD_DEFINED__ +typedef interface IDXGISwapChain4 IDXGISwapChain4; + +#endif /* __IDXGISwapChain4_FWD_DEFINED__ */ + + +#ifndef __IDXGIDevice4_FWD_DEFINED__ +#define __IDXGIDevice4_FWD_DEFINED__ +typedef interface IDXGIDevice4 IDXGIDevice4; + +#endif /* __IDXGIDevice4_FWD_DEFINED__ */ + + +#ifndef __IDXGIFactory5_FWD_DEFINED__ +#define __IDXGIFactory5_FWD_DEFINED__ +typedef interface IDXGIFactory5 IDXGIFactory5; + +#endif /* __IDXGIFactory5_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "dxgi1_4.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_dxgi1_5_0000_0000 */ +/* [local] */ + +/*#include */ +/*#pragma region App Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ +typedef +enum DXGI_OUTDUPL_FLAG + { + DXGI_OUTDUPL_COMPOSITED_UI_CAPTURE_ONLY = 1 + } DXGI_OUTDUPL_FLAG; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0000_v0_0_s_ifspec; + +#ifndef __IDXGIOutput5_INTERFACE_DEFINED__ +#define __IDXGIOutput5_INTERFACE_DEFINED__ + +/* interface IDXGIOutput5 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIOutput5; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("80A07424-AB52-42EB-833C-0C42FD282D98") + IDXGIOutput5 : public IDXGIOutput4 + { + public: + virtual HRESULT STDMETHODCALLTYPE DuplicateOutput1( + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [in] */ UINT Flags, + /* [annotation][in] */ + _In_ UINT SupportedFormatsCount, + /* [annotation][in] */ + _In_reads_(SupportedFormatsCount) const DXGI_FORMAT *pSupportedFormats, + /* [annotation][out] */ + _COM_Outptr_ IDXGIOutputDuplication **ppOutputDuplication) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIOutput5Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIOutput5 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIOutput5 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIOutput5 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIOutput5 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIOutput5 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIOutput5 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIOutput5 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetDesc )( + IDXGIOutput5 * This, + /* [annotation][out] */ + _Out_ DXGI_OUTPUT_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList )( + IDXGIOutput5 * This, + /* [in] */ DXGI_FORMAT EnumFormat, + /* [in] */ UINT Flags, + /* [annotation][out][in] */ + _Inout_ UINT *pNumModes, + /* [annotation][out] */ + _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode )( + IDXGIOutput5 * This, + /* [annotation][in] */ + _In_ const DXGI_MODE_DESC *pModeToMatch, + /* [annotation][out] */ + _Out_ DXGI_MODE_DESC *pClosestMatch, + /* [annotation][in] */ + _In_opt_ IUnknown *pConcernedDevice); + + HRESULT ( STDMETHODCALLTYPE *WaitForVBlank )( + IDXGIOutput5 * This); + + HRESULT ( STDMETHODCALLTYPE *TakeOwnership )( + IDXGIOutput5 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + BOOL Exclusive); + + void ( STDMETHODCALLTYPE *ReleaseOwnership )( + IDXGIOutput5 * This); + + HRESULT ( STDMETHODCALLTYPE *GetGammaControlCapabilities )( + IDXGIOutput5 * This, + /* [annotation][out] */ + _Out_ DXGI_GAMMA_CONTROL_CAPABILITIES *pGammaCaps); + + HRESULT ( STDMETHODCALLTYPE *SetGammaControl )( + IDXGIOutput5 * This, + /* [annotation][in] */ + _In_ const DXGI_GAMMA_CONTROL *pArray); + + HRESULT ( STDMETHODCALLTYPE *GetGammaControl )( + IDXGIOutput5 * This, + /* [annotation][out] */ + _Out_ DXGI_GAMMA_CONTROL *pArray); + + HRESULT ( STDMETHODCALLTYPE *SetDisplaySurface )( + IDXGIOutput5 * This, + /* [annotation][in] */ + _In_ IDXGISurface *pScanoutSurface); + + HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData )( + IDXGIOutput5 * This, + /* [annotation][in] */ + _In_ IDXGISurface *pDestination); + + HRESULT ( STDMETHODCALLTYPE *GetFrameStatistics )( + IDXGIOutput5 * This, + /* [annotation][out] */ + _Out_ DXGI_FRAME_STATISTICS *pStats); + + HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList1 )( + IDXGIOutput5 * This, + /* [in] */ DXGI_FORMAT EnumFormat, + /* [in] */ UINT Flags, + /* [annotation][out][in] */ + _Inout_ UINT *pNumModes, + /* [annotation][out] */ + _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC1 *pDesc); + + HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode1 )( + IDXGIOutput5 * This, + /* [annotation][in] */ + _In_ const DXGI_MODE_DESC1 *pModeToMatch, + /* [annotation][out] */ + _Out_ DXGI_MODE_DESC1 *pClosestMatch, + /* [annotation][in] */ + _In_opt_ IUnknown *pConcernedDevice); + + HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData1 )( + IDXGIOutput5 * This, + /* [annotation][in] */ + _In_ IDXGIResource *pDestination); + + HRESULT ( STDMETHODCALLTYPE *DuplicateOutput )( + IDXGIOutput5 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][out] */ + _COM_Outptr_ IDXGIOutputDuplication **ppOutputDuplication); + + BOOL ( STDMETHODCALLTYPE *SupportsOverlays )( + IDXGIOutput5 * This); + + HRESULT ( STDMETHODCALLTYPE *CheckOverlaySupport )( + IDXGIOutput5 * This, + /* [annotation][in] */ + _In_ DXGI_FORMAT EnumFormat, + /* [annotation][out] */ + _In_ IUnknown *pConcernedDevice, + /* [annotation][out] */ + _Out_ UINT *pFlags); + + HRESULT ( STDMETHODCALLTYPE *CheckOverlayColorSpaceSupport )( + IDXGIOutput5 * This, + /* [annotation][in] */ + _In_ DXGI_FORMAT Format, + /* [annotation][in] */ + _In_ DXGI_COLOR_SPACE_TYPE ColorSpace, + /* [annotation][in] */ + _In_ IUnknown *pConcernedDevice, + /* [annotation][out] */ + _Out_ UINT *pFlags); + + HRESULT ( STDMETHODCALLTYPE *DuplicateOutput1 )( + IDXGIOutput5 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [in] */ UINT Flags, + /* [annotation][in] */ + _In_ UINT SupportedFormatsCount, + /* [annotation][in] */ + _In_reads_(SupportedFormatsCount) const DXGI_FORMAT *pSupportedFormats, + /* [annotation][out] */ + _COM_Outptr_ IDXGIOutputDuplication **ppOutputDuplication); + + END_INTERFACE + } IDXGIOutput5Vtbl; + + interface IDXGIOutput5 + { + CONST_VTBL struct IDXGIOutput5Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIOutput5_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIOutput5_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIOutput5_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIOutput5_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIOutput5_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIOutput5_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIOutput5_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIOutput5_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define IDXGIOutput5_GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) \ + ( (This)->lpVtbl -> GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) ) + +#define IDXGIOutput5_FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) \ + ( (This)->lpVtbl -> FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) ) + +#define IDXGIOutput5_WaitForVBlank(This) \ + ( (This)->lpVtbl -> WaitForVBlank(This) ) + +#define IDXGIOutput5_TakeOwnership(This,pDevice,Exclusive) \ + ( (This)->lpVtbl -> TakeOwnership(This,pDevice,Exclusive) ) + +#define IDXGIOutput5_ReleaseOwnership(This) \ + ( (This)->lpVtbl -> ReleaseOwnership(This) ) + +#define IDXGIOutput5_GetGammaControlCapabilities(This,pGammaCaps) \ + ( (This)->lpVtbl -> GetGammaControlCapabilities(This,pGammaCaps) ) + +#define IDXGIOutput5_SetGammaControl(This,pArray) \ + ( (This)->lpVtbl -> SetGammaControl(This,pArray) ) + +#define IDXGIOutput5_GetGammaControl(This,pArray) \ + ( (This)->lpVtbl -> GetGammaControl(This,pArray) ) + +#define IDXGIOutput5_SetDisplaySurface(This,pScanoutSurface) \ + ( (This)->lpVtbl -> SetDisplaySurface(This,pScanoutSurface) ) + +#define IDXGIOutput5_GetDisplaySurfaceData(This,pDestination) \ + ( (This)->lpVtbl -> GetDisplaySurfaceData(This,pDestination) ) + +#define IDXGIOutput5_GetFrameStatistics(This,pStats) \ + ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) ) + + +#define IDXGIOutput5_GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) \ + ( (This)->lpVtbl -> GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) ) + +#define IDXGIOutput5_FindClosestMatchingMode1(This,pModeToMatch,pClosestMatch,pConcernedDevice) \ + ( (This)->lpVtbl -> FindClosestMatchingMode1(This,pModeToMatch,pClosestMatch,pConcernedDevice) ) + +#define IDXGIOutput5_GetDisplaySurfaceData1(This,pDestination) \ + ( (This)->lpVtbl -> GetDisplaySurfaceData1(This,pDestination) ) + +#define IDXGIOutput5_DuplicateOutput(This,pDevice,ppOutputDuplication) \ + ( (This)->lpVtbl -> DuplicateOutput(This,pDevice,ppOutputDuplication) ) + + +#define IDXGIOutput5_SupportsOverlays(This) \ + ( (This)->lpVtbl -> SupportsOverlays(This) ) + + +#define IDXGIOutput5_CheckOverlaySupport(This,EnumFormat,pConcernedDevice,pFlags) \ + ( (This)->lpVtbl -> CheckOverlaySupport(This,EnumFormat,pConcernedDevice,pFlags) ) + + +#define IDXGIOutput5_CheckOverlayColorSpaceSupport(This,Format,ColorSpace,pConcernedDevice,pFlags) \ + ( (This)->lpVtbl -> CheckOverlayColorSpaceSupport(This,Format,ColorSpace,pConcernedDevice,pFlags) ) + + +#define IDXGIOutput5_DuplicateOutput1(This,pDevice,Flags,SupportedFormatsCount,pSupportedFormats,ppOutputDuplication) \ + ( (This)->lpVtbl -> DuplicateOutput1(This,pDevice,Flags,SupportedFormatsCount,pSupportedFormats,ppOutputDuplication) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIOutput5_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi1_5_0000_0001 */ +/* [local] */ + +typedef +enum DXGI_HDR_METADATA_TYPE + { + DXGI_HDR_METADATA_TYPE_NONE = 0, + DXGI_HDR_METADATA_TYPE_HDR10 = 1 + } DXGI_HDR_METADATA_TYPE; + +typedef struct DXGI_HDR_METADATA_HDR10 + { + UINT16 RedPrimary[ 2 ]; + UINT16 GreenPrimary[ 2 ]; + UINT16 BluePrimary[ 2 ]; + UINT16 WhitePoint[ 2 ]; + UINT MaxMasteringLuminance; + UINT MinMasteringLuminance; + UINT16 MaxContentLightLevel; + UINT16 MaxFrameAverageLightLevel; + } DXGI_HDR_METADATA_HDR10; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0001_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0001_v0_0_s_ifspec; + +#ifndef __IDXGISwapChain4_INTERFACE_DEFINED__ +#define __IDXGISwapChain4_INTERFACE_DEFINED__ + +/* interface IDXGISwapChain4 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGISwapChain4; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3D585D5A-BD4A-489E-B1F4-3DBCB6452FFB") + IDXGISwapChain4 : public IDXGISwapChain3 + { + public: + virtual HRESULT STDMETHODCALLTYPE SetHDRMetaData( + /* [annotation][in] */ + _In_ DXGI_HDR_METADATA_TYPE Type, + /* [annotation][in] */ + _In_ UINT Size, + /* [annotation][size_is][in] */ + _In_reads_opt_(Size) void *pMetaData) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGISwapChain4Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGISwapChain4 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGISwapChain4 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGISwapChain4 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGISwapChain4 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGISwapChain4 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGISwapChain4 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGISwapChain4 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + IDXGISwapChain4 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *Present )( + IDXGISwapChain4 * This, + /* [in] */ UINT SyncInterval, + /* [in] */ UINT Flags); + + HRESULT ( STDMETHODCALLTYPE *GetBuffer )( + IDXGISwapChain4 * This, + /* [in] */ UINT Buffer, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][out][in] */ + _COM_Outptr_ void **ppSurface); + + HRESULT ( STDMETHODCALLTYPE *SetFullscreenState )( + IDXGISwapChain4 * This, + /* [in] */ BOOL Fullscreen, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pTarget); + + HRESULT ( STDMETHODCALLTYPE *GetFullscreenState )( + IDXGISwapChain4 * This, + /* [annotation][out] */ + _Out_opt_ BOOL *pFullscreen, + /* [annotation][out] */ + _COM_Outptr_opt_result_maybenull_ IDXGIOutput **ppTarget); + + HRESULT ( STDMETHODCALLTYPE *GetDesc )( + IDXGISwapChain4 * This, + /* [annotation][out] */ + _Out_ DXGI_SWAP_CHAIN_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *ResizeBuffers )( + IDXGISwapChain4 * This, + /* [in] */ UINT BufferCount, + /* [in] */ UINT Width, + /* [in] */ UINT Height, + /* [in] */ DXGI_FORMAT NewFormat, + /* [in] */ UINT SwapChainFlags); + + HRESULT ( STDMETHODCALLTYPE *ResizeTarget )( + IDXGISwapChain4 * This, + /* [annotation][in] */ + _In_ const DXGI_MODE_DESC *pNewTargetParameters); + + HRESULT ( STDMETHODCALLTYPE *GetContainingOutput )( + IDXGISwapChain4 * This, + /* [annotation][out] */ + _COM_Outptr_ IDXGIOutput **ppOutput); + + HRESULT ( STDMETHODCALLTYPE *GetFrameStatistics )( + IDXGISwapChain4 * This, + /* [annotation][out] */ + _Out_ DXGI_FRAME_STATISTICS *pStats); + + HRESULT ( STDMETHODCALLTYPE *GetLastPresentCount )( + IDXGISwapChain4 * This, + /* [annotation][out] */ + _Out_ UINT *pLastPresentCount); + + HRESULT ( STDMETHODCALLTYPE *GetDesc1 )( + IDXGISwapChain4 * This, + /* [annotation][out] */ + _Out_ DXGI_SWAP_CHAIN_DESC1 *pDesc); + + HRESULT ( STDMETHODCALLTYPE *GetFullscreenDesc )( + IDXGISwapChain4 * This, + /* [annotation][out] */ + _Out_ DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *GetHwnd )( + IDXGISwapChain4 * This, + /* [annotation][out] */ + _Out_ HWND *pHwnd); + + HRESULT ( STDMETHODCALLTYPE *GetCoreWindow )( + IDXGISwapChain4 * This, + /* [annotation][in] */ + _In_ REFIID refiid, + /* [annotation][out] */ + _COM_Outptr_ void **ppUnk); + + HRESULT ( STDMETHODCALLTYPE *Present1 )( + IDXGISwapChain4 * This, + /* [in] */ UINT SyncInterval, + /* [in] */ UINT PresentFlags, + /* [annotation][in] */ + _In_ const DXGI_PRESENT_PARAMETERS *pPresentParameters); + + BOOL ( STDMETHODCALLTYPE *IsTemporaryMonoSupported )( + IDXGISwapChain4 * This); + + HRESULT ( STDMETHODCALLTYPE *GetRestrictToOutput )( + IDXGISwapChain4 * This, + /* [annotation][out] */ + _Out_ IDXGIOutput **ppRestrictToOutput); + + HRESULT ( STDMETHODCALLTYPE *SetBackgroundColor )( + IDXGISwapChain4 * This, + /* [annotation][in] */ + _In_ const DXGI_RGBA *pColor); + + HRESULT ( STDMETHODCALLTYPE *GetBackgroundColor )( + IDXGISwapChain4 * This, + /* [annotation][out] */ + _Out_ DXGI_RGBA *pColor); + + HRESULT ( STDMETHODCALLTYPE *SetRotation )( + IDXGISwapChain4 * This, + /* [annotation][in] */ + _In_ DXGI_MODE_ROTATION Rotation); + + HRESULT ( STDMETHODCALLTYPE *GetRotation )( + IDXGISwapChain4 * This, + /* [annotation][out] */ + _Out_ DXGI_MODE_ROTATION *pRotation); + + HRESULT ( STDMETHODCALLTYPE *SetSourceSize )( + IDXGISwapChain4 * This, + UINT Width, + UINT Height); + + HRESULT ( STDMETHODCALLTYPE *GetSourceSize )( + IDXGISwapChain4 * This, + /* [annotation][out] */ + _Out_ UINT *pWidth, + /* [annotation][out] */ + _Out_ UINT *pHeight); + + HRESULT ( STDMETHODCALLTYPE *SetMaximumFrameLatency )( + IDXGISwapChain4 * This, + UINT MaxLatency); + + HRESULT ( STDMETHODCALLTYPE *GetMaximumFrameLatency )( + IDXGISwapChain4 * This, + /* [annotation][out] */ + _Out_ UINT *pMaxLatency); + + HANDLE ( STDMETHODCALLTYPE *GetFrameLatencyWaitableObject )( + IDXGISwapChain4 * This); + + HRESULT ( STDMETHODCALLTYPE *SetMatrixTransform )( + IDXGISwapChain4 * This, + const DXGI_MATRIX_3X2_F *pMatrix); + + HRESULT ( STDMETHODCALLTYPE *GetMatrixTransform )( + IDXGISwapChain4 * This, + /* [annotation][out] */ + _Out_ DXGI_MATRIX_3X2_F *pMatrix); + + UINT ( STDMETHODCALLTYPE *GetCurrentBackBufferIndex )( + IDXGISwapChain4 * This); + + HRESULT ( STDMETHODCALLTYPE *CheckColorSpaceSupport )( + IDXGISwapChain4 * This, + /* [annotation][in] */ + _In_ DXGI_COLOR_SPACE_TYPE ColorSpace, + /* [annotation][out] */ + _Out_ UINT *pColorSpaceSupport); + + HRESULT ( STDMETHODCALLTYPE *SetColorSpace1 )( + IDXGISwapChain4 * This, + /* [annotation][in] */ + _In_ DXGI_COLOR_SPACE_TYPE ColorSpace); + + HRESULT ( STDMETHODCALLTYPE *ResizeBuffers1 )( + IDXGISwapChain4 * This, + /* [annotation][in] */ + _In_ UINT BufferCount, + /* [annotation][in] */ + _In_ UINT Width, + /* [annotation][in] */ + _In_ UINT Height, + /* [annotation][in] */ + _In_ DXGI_FORMAT Format, + /* [annotation][in] */ + _In_ UINT SwapChainFlags, + /* [annotation][in] */ + _In_reads_(BufferCount) const UINT *pCreationNodeMask, + /* [annotation][in] */ + _In_reads_(BufferCount) IUnknown *const *ppPresentQueue); + + HRESULT ( STDMETHODCALLTYPE *SetHDRMetaData )( + IDXGISwapChain4 * This, + /* [annotation][in] */ + _In_ DXGI_HDR_METADATA_TYPE Type, + /* [annotation][in] */ + _In_ UINT Size, + /* [annotation][size_is][in] */ + _In_reads_opt_(Size) void *pMetaData); + + END_INTERFACE + } IDXGISwapChain4Vtbl; + + interface IDXGISwapChain4 + { + CONST_VTBL struct IDXGISwapChain4Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGISwapChain4_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGISwapChain4_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGISwapChain4_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGISwapChain4_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGISwapChain4_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGISwapChain4_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGISwapChain4_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGISwapChain4_GetDevice(This,riid,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) + + +#define IDXGISwapChain4_Present(This,SyncInterval,Flags) \ + ( (This)->lpVtbl -> Present(This,SyncInterval,Flags) ) + +#define IDXGISwapChain4_GetBuffer(This,Buffer,riid,ppSurface) \ + ( (This)->lpVtbl -> GetBuffer(This,Buffer,riid,ppSurface) ) + +#define IDXGISwapChain4_SetFullscreenState(This,Fullscreen,pTarget) \ + ( (This)->lpVtbl -> SetFullscreenState(This,Fullscreen,pTarget) ) + +#define IDXGISwapChain4_GetFullscreenState(This,pFullscreen,ppTarget) \ + ( (This)->lpVtbl -> GetFullscreenState(This,pFullscreen,ppTarget) ) + +#define IDXGISwapChain4_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define IDXGISwapChain4_ResizeBuffers(This,BufferCount,Width,Height,NewFormat,SwapChainFlags) \ + ( (This)->lpVtbl -> ResizeBuffers(This,BufferCount,Width,Height,NewFormat,SwapChainFlags) ) + +#define IDXGISwapChain4_ResizeTarget(This,pNewTargetParameters) \ + ( (This)->lpVtbl -> ResizeTarget(This,pNewTargetParameters) ) + +#define IDXGISwapChain4_GetContainingOutput(This,ppOutput) \ + ( (This)->lpVtbl -> GetContainingOutput(This,ppOutput) ) + +#define IDXGISwapChain4_GetFrameStatistics(This,pStats) \ + ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) ) + +#define IDXGISwapChain4_GetLastPresentCount(This,pLastPresentCount) \ + ( (This)->lpVtbl -> GetLastPresentCount(This,pLastPresentCount) ) + + +#define IDXGISwapChain4_GetDesc1(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) + +#define IDXGISwapChain4_GetFullscreenDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetFullscreenDesc(This,pDesc) ) + +#define IDXGISwapChain4_GetHwnd(This,pHwnd) \ + ( (This)->lpVtbl -> GetHwnd(This,pHwnd) ) + +#define IDXGISwapChain4_GetCoreWindow(This,refiid,ppUnk) \ + ( (This)->lpVtbl -> GetCoreWindow(This,refiid,ppUnk) ) + +#define IDXGISwapChain4_Present1(This,SyncInterval,PresentFlags,pPresentParameters) \ + ( (This)->lpVtbl -> Present1(This,SyncInterval,PresentFlags,pPresentParameters) ) + +#define IDXGISwapChain4_IsTemporaryMonoSupported(This) \ + ( (This)->lpVtbl -> IsTemporaryMonoSupported(This) ) + +#define IDXGISwapChain4_GetRestrictToOutput(This,ppRestrictToOutput) \ + ( (This)->lpVtbl -> GetRestrictToOutput(This,ppRestrictToOutput) ) + +#define IDXGISwapChain4_SetBackgroundColor(This,pColor) \ + ( (This)->lpVtbl -> SetBackgroundColor(This,pColor) ) + +#define IDXGISwapChain4_GetBackgroundColor(This,pColor) \ + ( (This)->lpVtbl -> GetBackgroundColor(This,pColor) ) + +#define IDXGISwapChain4_SetRotation(This,Rotation) \ + ( (This)->lpVtbl -> SetRotation(This,Rotation) ) + +#define IDXGISwapChain4_GetRotation(This,pRotation) \ + ( (This)->lpVtbl -> GetRotation(This,pRotation) ) + + +#define IDXGISwapChain4_SetSourceSize(This,Width,Height) \ + ( (This)->lpVtbl -> SetSourceSize(This,Width,Height) ) + +#define IDXGISwapChain4_GetSourceSize(This,pWidth,pHeight) \ + ( (This)->lpVtbl -> GetSourceSize(This,pWidth,pHeight) ) + +#define IDXGISwapChain4_SetMaximumFrameLatency(This,MaxLatency) \ + ( (This)->lpVtbl -> SetMaximumFrameLatency(This,MaxLatency) ) + +#define IDXGISwapChain4_GetMaximumFrameLatency(This,pMaxLatency) \ + ( (This)->lpVtbl -> GetMaximumFrameLatency(This,pMaxLatency) ) + +#define IDXGISwapChain4_GetFrameLatencyWaitableObject(This) \ + ( (This)->lpVtbl -> GetFrameLatencyWaitableObject(This) ) + +#define IDXGISwapChain4_SetMatrixTransform(This,pMatrix) \ + ( (This)->lpVtbl -> SetMatrixTransform(This,pMatrix) ) + +#define IDXGISwapChain4_GetMatrixTransform(This,pMatrix) \ + ( (This)->lpVtbl -> GetMatrixTransform(This,pMatrix) ) + + +#define IDXGISwapChain4_GetCurrentBackBufferIndex(This) \ + ( (This)->lpVtbl -> GetCurrentBackBufferIndex(This) ) + +#define IDXGISwapChain4_CheckColorSpaceSupport(This,ColorSpace,pColorSpaceSupport) \ + ( (This)->lpVtbl -> CheckColorSpaceSupport(This,ColorSpace,pColorSpaceSupport) ) + +#define IDXGISwapChain4_SetColorSpace1(This,ColorSpace) \ + ( (This)->lpVtbl -> SetColorSpace1(This,ColorSpace) ) + +#define IDXGISwapChain4_ResizeBuffers1(This,BufferCount,Width,Height,Format,SwapChainFlags,pCreationNodeMask,ppPresentQueue) \ + ( (This)->lpVtbl -> ResizeBuffers1(This,BufferCount,Width,Height,Format,SwapChainFlags,pCreationNodeMask,ppPresentQueue) ) + + +#define IDXGISwapChain4_SetHDRMetaData(This,Type,Size,pMetaData) \ + ( (This)->lpVtbl -> SetHDRMetaData(This,Type,Size,pMetaData) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGISwapChain4_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi1_5_0000_0002 */ +/* [local] */ + +typedef +enum _DXGI_OFFER_RESOURCE_FLAGS + { + DXGI_OFFER_RESOURCE_FLAG_ALLOW_DECOMMIT = 0x1 + } DXGI_OFFER_RESOURCE_FLAGS; + +typedef +enum _DXGI_RECLAIM_RESOURCE_RESULTS + { + DXGI_RECLAIM_RESOURCE_RESULT_OK = 0, + DXGI_RECLAIM_RESOURCE_RESULT_DISCARDED = 1, + DXGI_RECLAIM_RESOURCE_RESULT_NOT_COMMITTED = 2 + } DXGI_RECLAIM_RESOURCE_RESULTS; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0002_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0002_v0_0_s_ifspec; + +#ifndef __IDXGIDevice4_INTERFACE_DEFINED__ +#define __IDXGIDevice4_INTERFACE_DEFINED__ + +/* interface IDXGIDevice4 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIDevice4; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("95B4F95F-D8DA-4CA4-9EE6-3B76D5968A10") + IDXGIDevice4 : public IDXGIDevice3 + { + public: + virtual HRESULT STDMETHODCALLTYPE OfferResources1( + /* [annotation][in] */ + _In_ UINT NumResources, + /* [annotation][size_is][in] */ + _In_reads_(NumResources) IDXGIResource *const *ppResources, + /* [annotation][in] */ + _In_ DXGI_OFFER_RESOURCE_PRIORITY Priority, + /* [annotation][in] */ + _In_ UINT Flags) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReclaimResources1( + /* [annotation][in] */ + _In_ UINT NumResources, + /* [annotation][size_is][in] */ + _In_reads_(NumResources) IDXGIResource *const *ppResources, + /* [annotation][size_is][out] */ + _Out_writes_all_(NumResources) DXGI_RECLAIM_RESOURCE_RESULTS *pResults) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIDevice4Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIDevice4 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIDevice4 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIDevice4 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIDevice4 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIDevice4 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIDevice4 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIDevice4 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetAdapter )( + IDXGIDevice4 * This, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **pAdapter); + + HRESULT ( STDMETHODCALLTYPE *CreateSurface )( + IDXGIDevice4 * This, + /* [annotation][in] */ + _In_ const DXGI_SURFACE_DESC *pDesc, + /* [in] */ UINT NumSurfaces, + /* [in] */ DXGI_USAGE Usage, + /* [annotation][in] */ + _In_opt_ const DXGI_SHARED_RESOURCE *pSharedResource, + /* [annotation][out] */ + _COM_Outptr_ IDXGISurface **ppSurface); + + HRESULT ( STDMETHODCALLTYPE *QueryResourceResidency )( + IDXGIDevice4 * This, + /* [annotation][size_is][in] */ + _In_reads_(NumResources) IUnknown *const *ppResources, + /* [annotation][size_is][out] */ + _Out_writes_(NumResources) DXGI_RESIDENCY *pResidencyStatus, + /* [in] */ UINT NumResources); + + HRESULT ( STDMETHODCALLTYPE *SetGPUThreadPriority )( + IDXGIDevice4 * This, + /* [in] */ INT Priority); + + HRESULT ( STDMETHODCALLTYPE *GetGPUThreadPriority )( + IDXGIDevice4 * This, + /* [annotation][retval][out] */ + _Out_ INT *pPriority); + + HRESULT ( STDMETHODCALLTYPE *SetMaximumFrameLatency )( + IDXGIDevice4 * This, + /* [in] */ UINT MaxLatency); + + HRESULT ( STDMETHODCALLTYPE *GetMaximumFrameLatency )( + IDXGIDevice4 * This, + /* [annotation][out] */ + _Out_ UINT *pMaxLatency); + + HRESULT ( STDMETHODCALLTYPE *OfferResources )( + IDXGIDevice4 * This, + /* [annotation][in] */ + _In_ UINT NumResources, + /* [annotation][size_is][in] */ + _In_reads_(NumResources) IDXGIResource *const *ppResources, + /* [annotation][in] */ + _In_ DXGI_OFFER_RESOURCE_PRIORITY Priority); + + HRESULT ( STDMETHODCALLTYPE *ReclaimResources )( + IDXGIDevice4 * This, + /* [annotation][in] */ + _In_ UINT NumResources, + /* [annotation][size_is][in] */ + _In_reads_(NumResources) IDXGIResource *const *ppResources, + /* [annotation][size_is][out] */ + _Out_writes_all_opt_(NumResources) BOOL *pDiscarded); + + HRESULT ( STDMETHODCALLTYPE *EnqueueSetEvent )( + IDXGIDevice4 * This, + /* [annotation][in] */ + _In_ HANDLE hEvent); + + void ( STDMETHODCALLTYPE *Trim )( + IDXGIDevice4 * This); + + HRESULT ( STDMETHODCALLTYPE *OfferResources1 )( + IDXGIDevice4 * This, + /* [annotation][in] */ + _In_ UINT NumResources, + /* [annotation][size_is][in] */ + _In_reads_(NumResources) IDXGIResource *const *ppResources, + /* [annotation][in] */ + _In_ DXGI_OFFER_RESOURCE_PRIORITY Priority, + /* [annotation][in] */ + _In_ UINT Flags); + + HRESULT ( STDMETHODCALLTYPE *ReclaimResources1 )( + IDXGIDevice4 * This, + /* [annotation][in] */ + _In_ UINT NumResources, + /* [annotation][size_is][in] */ + _In_reads_(NumResources) IDXGIResource *const *ppResources, + /* [annotation][size_is][out] */ + _Out_writes_all_(NumResources) DXGI_RECLAIM_RESOURCE_RESULTS *pResults); + + END_INTERFACE + } IDXGIDevice4Vtbl; + + interface IDXGIDevice4 + { + CONST_VTBL struct IDXGIDevice4Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIDevice4_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIDevice4_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIDevice4_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIDevice4_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIDevice4_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIDevice4_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIDevice4_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIDevice4_GetAdapter(This,pAdapter) \ + ( (This)->lpVtbl -> GetAdapter(This,pAdapter) ) + +#define IDXGIDevice4_CreateSurface(This,pDesc,NumSurfaces,Usage,pSharedResource,ppSurface) \ + ( (This)->lpVtbl -> CreateSurface(This,pDesc,NumSurfaces,Usage,pSharedResource,ppSurface) ) + +#define IDXGIDevice4_QueryResourceResidency(This,ppResources,pResidencyStatus,NumResources) \ + ( (This)->lpVtbl -> QueryResourceResidency(This,ppResources,pResidencyStatus,NumResources) ) + +#define IDXGIDevice4_SetGPUThreadPriority(This,Priority) \ + ( (This)->lpVtbl -> SetGPUThreadPriority(This,Priority) ) + +#define IDXGIDevice4_GetGPUThreadPriority(This,pPriority) \ + ( (This)->lpVtbl -> GetGPUThreadPriority(This,pPriority) ) + + +#define IDXGIDevice4_SetMaximumFrameLatency(This,MaxLatency) \ + ( (This)->lpVtbl -> SetMaximumFrameLatency(This,MaxLatency) ) + +#define IDXGIDevice4_GetMaximumFrameLatency(This,pMaxLatency) \ + ( (This)->lpVtbl -> GetMaximumFrameLatency(This,pMaxLatency) ) + + +#define IDXGIDevice4_OfferResources(This,NumResources,ppResources,Priority) \ + ( (This)->lpVtbl -> OfferResources(This,NumResources,ppResources,Priority) ) + +#define IDXGIDevice4_ReclaimResources(This,NumResources,ppResources,pDiscarded) \ + ( (This)->lpVtbl -> ReclaimResources(This,NumResources,ppResources,pDiscarded) ) + +#define IDXGIDevice4_EnqueueSetEvent(This,hEvent) \ + ( (This)->lpVtbl -> EnqueueSetEvent(This,hEvent) ) + + +#define IDXGIDevice4_Trim(This) \ + ( (This)->lpVtbl -> Trim(This) ) + + +#define IDXGIDevice4_OfferResources1(This,NumResources,ppResources,Priority,Flags) \ + ( (This)->lpVtbl -> OfferResources1(This,NumResources,ppResources,Priority,Flags) ) + +#define IDXGIDevice4_ReclaimResources1(This,NumResources,ppResources,pResults) \ + ( (This)->lpVtbl -> ReclaimResources1(This,NumResources,ppResources,pResults) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIDevice4_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi1_5_0000_0003 */ +/* [local] */ + +typedef +enum DXGI_FEATURE + { + DXGI_FEATURE_PRESENT_ALLOW_TEARING = 0 + } DXGI_FEATURE; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0003_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0003_v0_0_s_ifspec; + +#ifndef __IDXGIFactory5_INTERFACE_DEFINED__ +#define __IDXGIFactory5_INTERFACE_DEFINED__ + +/* interface IDXGIFactory5 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIFactory5; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("7632e1f5-ee65-4dca-87fd-84cd75f8838d") + IDXGIFactory5 : public IDXGIFactory4 + { + public: + virtual HRESULT STDMETHODCALLTYPE CheckFeatureSupport( + DXGI_FEATURE Feature, + /* [annotation] */ + _Inout_updates_bytes_(FeatureSupportDataSize) void *pFeatureSupportData, + UINT FeatureSupportDataSize) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIFactory5Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIFactory5 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIFactory5 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIFactory5 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIFactory5 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIFactory5 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIFactory5 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIFactory5 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *EnumAdapters )( + IDXGIFactory5 * This, + /* [in] */ UINT Adapter, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **ppAdapter); + + HRESULT ( STDMETHODCALLTYPE *MakeWindowAssociation )( + IDXGIFactory5 * This, + HWND WindowHandle, + UINT Flags); + + HRESULT ( STDMETHODCALLTYPE *GetWindowAssociation )( + IDXGIFactory5 * This, + /* [annotation][out] */ + _Out_ HWND *pWindowHandle); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChain )( + IDXGIFactory5 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ DXGI_SWAP_CHAIN_DESC *pDesc, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *CreateSoftwareAdapter )( + IDXGIFactory5 * This, + /* [in] */ HMODULE Module, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **ppAdapter); + + HRESULT ( STDMETHODCALLTYPE *EnumAdapters1 )( + IDXGIFactory5 * This, + /* [in] */ UINT Adapter, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter1 **ppAdapter); + + BOOL ( STDMETHODCALLTYPE *IsCurrent )( + IDXGIFactory5 * This); + + BOOL ( STDMETHODCALLTYPE *IsWindowedStereoEnabled )( + IDXGIFactory5 * This); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForHwnd )( + IDXGIFactory5 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ HWND hWnd, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForCoreWindow )( + IDXGIFactory5 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ IUnknown *pWindow, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *GetSharedResourceAdapterLuid )( + IDXGIFactory5 * This, + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _Out_ LUID *pLuid); + + HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusWindow )( + IDXGIFactory5 * This, + /* [annotation][in] */ + _In_ HWND WindowHandle, + /* [annotation][in] */ + _In_ UINT wMsg, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusEvent )( + IDXGIFactory5 * This, + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + void ( STDMETHODCALLTYPE *UnregisterStereoStatus )( + IDXGIFactory5 * This, + /* [annotation][in] */ + _In_ DWORD dwCookie); + + HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusWindow )( + IDXGIFactory5 * This, + /* [annotation][in] */ + _In_ HWND WindowHandle, + /* [annotation][in] */ + _In_ UINT wMsg, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusEvent )( + IDXGIFactory5 * This, + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + void ( STDMETHODCALLTYPE *UnregisterOcclusionStatus )( + IDXGIFactory5 * This, + /* [annotation][in] */ + _In_ DWORD dwCookie); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForComposition )( + IDXGIFactory5 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain); + + UINT ( STDMETHODCALLTYPE *GetCreationFlags )( + IDXGIFactory5 * This); + + HRESULT ( STDMETHODCALLTYPE *EnumAdapterByLuid )( + IDXGIFactory5 * This, + /* [annotation] */ + _In_ LUID AdapterLuid, + /* [annotation] */ + _In_ REFIID riid, + /* [annotation] */ + _COM_Outptr_ void **ppvAdapter); + + HRESULT ( STDMETHODCALLTYPE *EnumWarpAdapter )( + IDXGIFactory5 * This, + /* [annotation] */ + _In_ REFIID riid, + /* [annotation] */ + _COM_Outptr_ void **ppvAdapter); + + HRESULT ( STDMETHODCALLTYPE *CheckFeatureSupport )( + IDXGIFactory5 * This, + DXGI_FEATURE Feature, + /* [annotation] */ + _Inout_updates_bytes_(FeatureSupportDataSize) void *pFeatureSupportData, + UINT FeatureSupportDataSize); + + END_INTERFACE + } IDXGIFactory5Vtbl; + + interface IDXGIFactory5 + { + CONST_VTBL struct IDXGIFactory5Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIFactory5_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIFactory5_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIFactory5_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIFactory5_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIFactory5_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIFactory5_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIFactory5_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIFactory5_EnumAdapters(This,Adapter,ppAdapter) \ + ( (This)->lpVtbl -> EnumAdapters(This,Adapter,ppAdapter) ) + +#define IDXGIFactory5_MakeWindowAssociation(This,WindowHandle,Flags) \ + ( (This)->lpVtbl -> MakeWindowAssociation(This,WindowHandle,Flags) ) + +#define IDXGIFactory5_GetWindowAssociation(This,pWindowHandle) \ + ( (This)->lpVtbl -> GetWindowAssociation(This,pWindowHandle) ) + +#define IDXGIFactory5_CreateSwapChain(This,pDevice,pDesc,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChain(This,pDevice,pDesc,ppSwapChain) ) + +#define IDXGIFactory5_CreateSoftwareAdapter(This,Module,ppAdapter) \ + ( (This)->lpVtbl -> CreateSoftwareAdapter(This,Module,ppAdapter) ) + + +#define IDXGIFactory5_EnumAdapters1(This,Adapter,ppAdapter) \ + ( (This)->lpVtbl -> EnumAdapters1(This,Adapter,ppAdapter) ) + +#define IDXGIFactory5_IsCurrent(This) \ + ( (This)->lpVtbl -> IsCurrent(This) ) + + +#define IDXGIFactory5_IsWindowedStereoEnabled(This) \ + ( (This)->lpVtbl -> IsWindowedStereoEnabled(This) ) + +#define IDXGIFactory5_CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain) ) + +#define IDXGIFactory5_CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain) ) + +#define IDXGIFactory5_GetSharedResourceAdapterLuid(This,hResource,pLuid) \ + ( (This)->lpVtbl -> GetSharedResourceAdapterLuid(This,hResource,pLuid) ) + +#define IDXGIFactory5_RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie) \ + ( (This)->lpVtbl -> RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie) ) + +#define IDXGIFactory5_RegisterStereoStatusEvent(This,hEvent,pdwCookie) \ + ( (This)->lpVtbl -> RegisterStereoStatusEvent(This,hEvent,pdwCookie) ) + +#define IDXGIFactory5_UnregisterStereoStatus(This,dwCookie) \ + ( (This)->lpVtbl -> UnregisterStereoStatus(This,dwCookie) ) + +#define IDXGIFactory5_RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie) \ + ( (This)->lpVtbl -> RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie) ) + +#define IDXGIFactory5_RegisterOcclusionStatusEvent(This,hEvent,pdwCookie) \ + ( (This)->lpVtbl -> RegisterOcclusionStatusEvent(This,hEvent,pdwCookie) ) + +#define IDXGIFactory5_UnregisterOcclusionStatus(This,dwCookie) \ + ( (This)->lpVtbl -> UnregisterOcclusionStatus(This,dwCookie) ) + +#define IDXGIFactory5_CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) ) + + +#define IDXGIFactory5_GetCreationFlags(This) \ + ( (This)->lpVtbl -> GetCreationFlags(This) ) + + +#define IDXGIFactory5_EnumAdapterByLuid(This,AdapterLuid,riid,ppvAdapter) \ + ( (This)->lpVtbl -> EnumAdapterByLuid(This,AdapterLuid,riid,ppvAdapter) ) + +#define IDXGIFactory5_EnumWarpAdapter(This,riid,ppvAdapter) \ + ( (This)->lpVtbl -> EnumWarpAdapter(This,riid,ppvAdapter) ) + + +#define IDXGIFactory5_CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) \ + ( (This)->lpVtbl -> CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIFactory5_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi1_5_0000_0004 */ +/* [local] */ + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ +DEFINE_GUID(IID_IDXGIOutput5,0x80A07424,0xAB52,0x42EB,0x83,0x3C,0x0C,0x42,0xFD,0x28,0x2D,0x98); +DEFINE_GUID(IID_IDXGISwapChain4,0x3D585D5A,0xBD4A,0x489E,0xB1,0xF4,0x3D,0xBC,0xB6,0x45,0x2F,0xFB); +DEFINE_GUID(IID_IDXGIDevice4,0x95B4F95F,0xD8DA,0x4CA4,0x9E,0xE6,0x3B,0x76,0xD5,0x96,0x8A,0x10); +DEFINE_GUID(IID_IDXGIFactory5,0x7632e1f5,0xee65,0x4dca,0x87,0xfd,0x84,0xcd,0x75,0xf8,0x83,0x8d); + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0004_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0004_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/dxgi1_6.h b/gfx/include/dxsdk/dxgi1_6.h new file mode 100644 index 0000000000..a23db170d7 --- /dev/null +++ b/gfx/include/dxsdk/dxgi1_6.h @@ -0,0 +1,730 @@ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ +/* @@MIDL_FILE_HEADING( ) */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __dxgi1_6_h__ +#define __dxgi1_6_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IDXGIAdapter4_FWD_DEFINED__ +#define __IDXGIAdapter4_FWD_DEFINED__ +typedef interface IDXGIAdapter4 IDXGIAdapter4; + +#endif /* __IDXGIAdapter4_FWD_DEFINED__ */ + + +#ifndef __IDXGIOutput6_FWD_DEFINED__ +#define __IDXGIOutput6_FWD_DEFINED__ +typedef interface IDXGIOutput6 IDXGIOutput6; + +#endif /* __IDXGIOutput6_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "dxgi1_5.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_dxgi1_6_0000_0000 */ +/* [local] */ + +// Copyright (c) Microsoft Corporation. All Rights Reserved +/*#include */ +/*#pragma region App Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ +typedef +enum DXGI_ADAPTER_FLAG3 + { + DXGI_ADAPTER_FLAG3_NONE = 0, + DXGI_ADAPTER_FLAG3_REMOTE = 1, + DXGI_ADAPTER_FLAG3_SOFTWARE = 2, + DXGI_ADAPTER_FLAG3_ACG_COMPATIBLE = 4, + DXGI_ADAPTER_FLAG3_SUPPORT_MONITORED_FENCES = 8, + DXGI_ADAPTER_FLAG3_SUPPORT_NON_MONITORED_FENCES = 0x10, + DXGI_ADAPTER_FLAG3_KEYED_MUTEX_CONFORMANCE = 0x20, + DXGI_ADAPTER_FLAG3_FORCE_DWORD = 0xffffffff + } DXGI_ADAPTER_FLAG3; + +DEFINE_ENUM_FLAG_OPERATORS( DXGI_ADAPTER_FLAG3 ); +typedef struct DXGI_ADAPTER_DESC3 + { + WCHAR Description[ 128 ]; + UINT VendorId; + UINT DeviceId; + UINT SubSysId; + UINT Revision; + SIZE_T DedicatedVideoMemory; + SIZE_T DedicatedSystemMemory; + SIZE_T SharedSystemMemory; + LUID AdapterLuid; + DXGI_ADAPTER_FLAG3 Flags; + DXGI_GRAPHICS_PREEMPTION_GRANULARITY GraphicsPreemptionGranularity; + DXGI_COMPUTE_PREEMPTION_GRANULARITY ComputePreemptionGranularity; + } DXGI_ADAPTER_DESC3; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0000_v0_0_s_ifspec; + +#ifndef __IDXGIAdapter4_INTERFACE_DEFINED__ +#define __IDXGIAdapter4_INTERFACE_DEFINED__ + +/* interface IDXGIAdapter4 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIAdapter4; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3c8d99d1-4fbf-4181-a82c-af66bf7bd24e") + IDXGIAdapter4 : public IDXGIAdapter3 + { + public: + virtual HRESULT STDMETHODCALLTYPE GetDesc3( + /* [annotation][out] */ + _Out_ DXGI_ADAPTER_DESC3 *pDesc) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIAdapter4Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIAdapter4 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIAdapter4 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIAdapter4 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIAdapter4 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIAdapter4 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIAdapter4 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIAdapter4 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *EnumOutputs )( + IDXGIAdapter4 * This, + /* [in] */ UINT Output, + /* [annotation][out][in] */ + _COM_Outptr_ IDXGIOutput **ppOutput); + + HRESULT ( STDMETHODCALLTYPE *GetDesc )( + IDXGIAdapter4 * This, + /* [annotation][out] */ + _Out_ DXGI_ADAPTER_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *CheckInterfaceSupport )( + IDXGIAdapter4 * This, + /* [annotation][in] */ + _In_ REFGUID InterfaceName, + /* [annotation][out] */ + _Out_ LARGE_INTEGER *pUMDVersion); + + HRESULT ( STDMETHODCALLTYPE *GetDesc1 )( + IDXGIAdapter4 * This, + /* [annotation][out] */ + _Out_ DXGI_ADAPTER_DESC1 *pDesc); + + HRESULT ( STDMETHODCALLTYPE *GetDesc2 )( + IDXGIAdapter4 * This, + /* [annotation][out] */ + _Out_ DXGI_ADAPTER_DESC2 *pDesc); + + HRESULT ( STDMETHODCALLTYPE *RegisterHardwareContentProtectionTeardownStatusEvent )( + IDXGIAdapter4 * This, + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + void ( STDMETHODCALLTYPE *UnregisterHardwareContentProtectionTeardownStatus )( + IDXGIAdapter4 * This, + /* [annotation][in] */ + _In_ DWORD dwCookie); + + HRESULT ( STDMETHODCALLTYPE *QueryVideoMemoryInfo )( + IDXGIAdapter4 * This, + /* [annotation][in] */ + _In_ UINT NodeIndex, + /* [annotation][in] */ + _In_ DXGI_MEMORY_SEGMENT_GROUP MemorySegmentGroup, + /* [annotation][out] */ + _Out_ DXGI_QUERY_VIDEO_MEMORY_INFO *pVideoMemoryInfo); + + HRESULT ( STDMETHODCALLTYPE *SetVideoMemoryReservation )( + IDXGIAdapter4 * This, + /* [annotation][in] */ + _In_ UINT NodeIndex, + /* [annotation][in] */ + _In_ DXGI_MEMORY_SEGMENT_GROUP MemorySegmentGroup, + /* [annotation][in] */ + _In_ UINT64 Reservation); + + HRESULT ( STDMETHODCALLTYPE *RegisterVideoMemoryBudgetChangeNotificationEvent )( + IDXGIAdapter4 * This, + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + void ( STDMETHODCALLTYPE *UnregisterVideoMemoryBudgetChangeNotification )( + IDXGIAdapter4 * This, + /* [annotation][in] */ + _In_ DWORD dwCookie); + + HRESULT ( STDMETHODCALLTYPE *GetDesc3 )( + IDXGIAdapter4 * This, + /* [annotation][out] */ + _Out_ DXGI_ADAPTER_DESC3 *pDesc); + + END_INTERFACE + } IDXGIAdapter4Vtbl; + + interface IDXGIAdapter4 + { + CONST_VTBL struct IDXGIAdapter4Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIAdapter4_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIAdapter4_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIAdapter4_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIAdapter4_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIAdapter4_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIAdapter4_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIAdapter4_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIAdapter4_EnumOutputs(This,Output,ppOutput) \ + ( (This)->lpVtbl -> EnumOutputs(This,Output,ppOutput) ) + +#define IDXGIAdapter4_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define IDXGIAdapter4_CheckInterfaceSupport(This,InterfaceName,pUMDVersion) \ + ( (This)->lpVtbl -> CheckInterfaceSupport(This,InterfaceName,pUMDVersion) ) + + +#define IDXGIAdapter4_GetDesc1(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) + + +#define IDXGIAdapter4_GetDesc2(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc2(This,pDesc) ) + + +#define IDXGIAdapter4_RegisterHardwareContentProtectionTeardownStatusEvent(This,hEvent,pdwCookie) \ + ( (This)->lpVtbl -> RegisterHardwareContentProtectionTeardownStatusEvent(This,hEvent,pdwCookie) ) + +#define IDXGIAdapter4_UnregisterHardwareContentProtectionTeardownStatus(This,dwCookie) \ + ( (This)->lpVtbl -> UnregisterHardwareContentProtectionTeardownStatus(This,dwCookie) ) + +#define IDXGIAdapter4_QueryVideoMemoryInfo(This,NodeIndex,MemorySegmentGroup,pVideoMemoryInfo) \ + ( (This)->lpVtbl -> QueryVideoMemoryInfo(This,NodeIndex,MemorySegmentGroup,pVideoMemoryInfo) ) + +#define IDXGIAdapter4_SetVideoMemoryReservation(This,NodeIndex,MemorySegmentGroup,Reservation) \ + ( (This)->lpVtbl -> SetVideoMemoryReservation(This,NodeIndex,MemorySegmentGroup,Reservation) ) + +#define IDXGIAdapter4_RegisterVideoMemoryBudgetChangeNotificationEvent(This,hEvent,pdwCookie) \ + ( (This)->lpVtbl -> RegisterVideoMemoryBudgetChangeNotificationEvent(This,hEvent,pdwCookie) ) + +#define IDXGIAdapter4_UnregisterVideoMemoryBudgetChangeNotification(This,dwCookie) \ + ( (This)->lpVtbl -> UnregisterVideoMemoryBudgetChangeNotification(This,dwCookie) ) + + +#define IDXGIAdapter4_GetDesc3(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc3(This,pDesc) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIAdapter4_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi1_6_0000_0001 */ +/* [local] */ + +typedef struct DXGI_OUTPUT_DESC1 + { + WCHAR DeviceName[ 32 ]; + RECT DesktopCoordinates; + BOOL AttachedToDesktop; + DXGI_MODE_ROTATION Rotation; + HMONITOR Monitor; + UINT BitsPerColor; + DXGI_COLOR_SPACE_TYPE ColorSpace; + FLOAT RedPrimary[ 2 ]; + FLOAT GreenPrimary[ 2 ]; + FLOAT BluePrimary[ 2 ]; + FLOAT WhitePoint[ 2 ]; + FLOAT MinLuminance; + FLOAT MaxLuminance; + FLOAT MaxFullFrameLuminance; + } DXGI_OUTPUT_DESC1; + +typedef +enum DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAGS + { + DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_FULLSCREEN = 1, + DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_WINDOWED = 2, + DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_CURSOR_STRETCHED = 4 + } DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAGS ); + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0001_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0001_v0_0_s_ifspec; + +#ifndef __IDXGIOutput6_INTERFACE_DEFINED__ +#define __IDXGIOutput6_INTERFACE_DEFINED__ + +/* interface IDXGIOutput6 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIOutput6; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("068346e8-aaec-4b84-add7-137f513f77a1") + IDXGIOutput6 : public IDXGIOutput5 + { + public: + virtual HRESULT STDMETHODCALLTYPE GetDesc1( + /* [annotation][out] */ + _Out_ DXGI_OUTPUT_DESC1 *pDesc) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckHardwareCompositionSupport( + /* [annotation][out] */ + _Out_ UINT *pFlags) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIOutput6Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIOutput6 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIOutput6 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIOutput6 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIOutput6 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIOutput6 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIOutput6 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIOutput6 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *GetDesc )( + IDXGIOutput6 * This, + /* [annotation][out] */ + _Out_ DXGI_OUTPUT_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList )( + IDXGIOutput6 * This, + /* [in] */ DXGI_FORMAT EnumFormat, + /* [in] */ UINT Flags, + /* [annotation][out][in] */ + _Inout_ UINT *pNumModes, + /* [annotation][out] */ + _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC *pDesc); + + HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode )( + IDXGIOutput6 * This, + /* [annotation][in] */ + _In_ const DXGI_MODE_DESC *pModeToMatch, + /* [annotation][out] */ + _Out_ DXGI_MODE_DESC *pClosestMatch, + /* [annotation][in] */ + _In_opt_ IUnknown *pConcernedDevice); + + HRESULT ( STDMETHODCALLTYPE *WaitForVBlank )( + IDXGIOutput6 * This); + + HRESULT ( STDMETHODCALLTYPE *TakeOwnership )( + IDXGIOutput6 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + BOOL Exclusive); + + void ( STDMETHODCALLTYPE *ReleaseOwnership )( + IDXGIOutput6 * This); + + HRESULT ( STDMETHODCALLTYPE *GetGammaControlCapabilities )( + IDXGIOutput6 * This, + /* [annotation][out] */ + _Out_ DXGI_GAMMA_CONTROL_CAPABILITIES *pGammaCaps); + + HRESULT ( STDMETHODCALLTYPE *SetGammaControl )( + IDXGIOutput6 * This, + /* [annotation][in] */ + _In_ const DXGI_GAMMA_CONTROL *pArray); + + HRESULT ( STDMETHODCALLTYPE *GetGammaControl )( + IDXGIOutput6 * This, + /* [annotation][out] */ + _Out_ DXGI_GAMMA_CONTROL *pArray); + + HRESULT ( STDMETHODCALLTYPE *SetDisplaySurface )( + IDXGIOutput6 * This, + /* [annotation][in] */ + _In_ IDXGISurface *pScanoutSurface); + + HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData )( + IDXGIOutput6 * This, + /* [annotation][in] */ + _In_ IDXGISurface *pDestination); + + HRESULT ( STDMETHODCALLTYPE *GetFrameStatistics )( + IDXGIOutput6 * This, + /* [annotation][out] */ + _Out_ DXGI_FRAME_STATISTICS *pStats); + + HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList1 )( + IDXGIOutput6 * This, + /* [in] */ DXGI_FORMAT EnumFormat, + /* [in] */ UINT Flags, + /* [annotation][out][in] */ + _Inout_ UINT *pNumModes, + /* [annotation][out] */ + _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC1 *pDesc); + + HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode1 )( + IDXGIOutput6 * This, + /* [annotation][in] */ + _In_ const DXGI_MODE_DESC1 *pModeToMatch, + /* [annotation][out] */ + _Out_ DXGI_MODE_DESC1 *pClosestMatch, + /* [annotation][in] */ + _In_opt_ IUnknown *pConcernedDevice); + + HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData1 )( + IDXGIOutput6 * This, + /* [annotation][in] */ + _In_ IDXGIResource *pDestination); + + HRESULT ( STDMETHODCALLTYPE *DuplicateOutput )( + IDXGIOutput6 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][out] */ + _COM_Outptr_ IDXGIOutputDuplication **ppOutputDuplication); + + BOOL ( STDMETHODCALLTYPE *SupportsOverlays )( + IDXGIOutput6 * This); + + HRESULT ( STDMETHODCALLTYPE *CheckOverlaySupport )( + IDXGIOutput6 * This, + /* [annotation][in] */ + _In_ DXGI_FORMAT EnumFormat, + /* [annotation][out] */ + _In_ IUnknown *pConcernedDevice, + /* [annotation][out] */ + _Out_ UINT *pFlags); + + HRESULT ( STDMETHODCALLTYPE *CheckOverlayColorSpaceSupport )( + IDXGIOutput6 * This, + /* [annotation][in] */ + _In_ DXGI_FORMAT Format, + /* [annotation][in] */ + _In_ DXGI_COLOR_SPACE_TYPE ColorSpace, + /* [annotation][in] */ + _In_ IUnknown *pConcernedDevice, + /* [annotation][out] */ + _Out_ UINT *pFlags); + + HRESULT ( STDMETHODCALLTYPE *DuplicateOutput1 )( + IDXGIOutput6 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [in] */ UINT Flags, + /* [annotation][in] */ + _In_ UINT SupportedFormatsCount, + /* [annotation][in] */ + _In_reads_(SupportedFormatsCount) const DXGI_FORMAT *pSupportedFormats, + /* [annotation][out] */ + _COM_Outptr_ IDXGIOutputDuplication **ppOutputDuplication); + + HRESULT ( STDMETHODCALLTYPE *GetDesc1 )( + IDXGIOutput6 * This, + /* [annotation][out] */ + _Out_ DXGI_OUTPUT_DESC1 *pDesc); + + HRESULT ( STDMETHODCALLTYPE *CheckHardwareCompositionSupport )( + IDXGIOutput6 * This, + /* [annotation][out] */ + _Out_ UINT *pFlags); + + END_INTERFACE + } IDXGIOutput6Vtbl; + + interface IDXGIOutput6 + { + CONST_VTBL struct IDXGIOutput6Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIOutput6_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIOutput6_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIOutput6_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIOutput6_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIOutput6_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIOutput6_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIOutput6_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIOutput6_GetDesc(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc(This,pDesc) ) + +#define IDXGIOutput6_GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) \ + ( (This)->lpVtbl -> GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) ) + +#define IDXGIOutput6_FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) \ + ( (This)->lpVtbl -> FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) ) + +#define IDXGIOutput6_WaitForVBlank(This) \ + ( (This)->lpVtbl -> WaitForVBlank(This) ) + +#define IDXGIOutput6_TakeOwnership(This,pDevice,Exclusive) \ + ( (This)->lpVtbl -> TakeOwnership(This,pDevice,Exclusive) ) + +#define IDXGIOutput6_ReleaseOwnership(This) \ + ( (This)->lpVtbl -> ReleaseOwnership(This) ) + +#define IDXGIOutput6_GetGammaControlCapabilities(This,pGammaCaps) \ + ( (This)->lpVtbl -> GetGammaControlCapabilities(This,pGammaCaps) ) + +#define IDXGIOutput6_SetGammaControl(This,pArray) \ + ( (This)->lpVtbl -> SetGammaControl(This,pArray) ) + +#define IDXGIOutput6_GetGammaControl(This,pArray) \ + ( (This)->lpVtbl -> GetGammaControl(This,pArray) ) + +#define IDXGIOutput6_SetDisplaySurface(This,pScanoutSurface) \ + ( (This)->lpVtbl -> SetDisplaySurface(This,pScanoutSurface) ) + +#define IDXGIOutput6_GetDisplaySurfaceData(This,pDestination) \ + ( (This)->lpVtbl -> GetDisplaySurfaceData(This,pDestination) ) + +#define IDXGIOutput6_GetFrameStatistics(This,pStats) \ + ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) ) + + +#define IDXGIOutput6_GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) \ + ( (This)->lpVtbl -> GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) ) + +#define IDXGIOutput6_FindClosestMatchingMode1(This,pModeToMatch,pClosestMatch,pConcernedDevice) \ + ( (This)->lpVtbl -> FindClosestMatchingMode1(This,pModeToMatch,pClosestMatch,pConcernedDevice) ) + +#define IDXGIOutput6_GetDisplaySurfaceData1(This,pDestination) \ + ( (This)->lpVtbl -> GetDisplaySurfaceData1(This,pDestination) ) + +#define IDXGIOutput6_DuplicateOutput(This,pDevice,ppOutputDuplication) \ + ( (This)->lpVtbl -> DuplicateOutput(This,pDevice,ppOutputDuplication) ) + + +#define IDXGIOutput6_SupportsOverlays(This) \ + ( (This)->lpVtbl -> SupportsOverlays(This) ) + + +#define IDXGIOutput6_CheckOverlaySupport(This,EnumFormat,pConcernedDevice,pFlags) \ + ( (This)->lpVtbl -> CheckOverlaySupport(This,EnumFormat,pConcernedDevice,pFlags) ) + + +#define IDXGIOutput6_CheckOverlayColorSpaceSupport(This,Format,ColorSpace,pConcernedDevice,pFlags) \ + ( (This)->lpVtbl -> CheckOverlayColorSpaceSupport(This,Format,ColorSpace,pConcernedDevice,pFlags) ) + + +#define IDXGIOutput6_DuplicateOutput1(This,pDevice,Flags,SupportedFormatsCount,pSupportedFormats,ppOutputDuplication) \ + ( (This)->lpVtbl -> DuplicateOutput1(This,pDevice,Flags,SupportedFormatsCount,pSupportedFormats,ppOutputDuplication) ) + + +#define IDXGIOutput6_GetDesc1(This,pDesc) \ + ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) + +#define IDXGIOutput6_CheckHardwareCompositionSupport(This,pFlags) \ + ( (This)->lpVtbl -> CheckHardwareCompositionSupport(This,pFlags) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIOutput6_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi1_6_0000_0002 */ +/* [local] */ + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ +DEFINE_GUID(IID_IDXGIAdapter4,0x3c8d99d1,0x4fbf,0x4181,0xa8,0x2c,0xaf,0x66,0xbf,0x7b,0xd2,0x4e); +DEFINE_GUID(IID_IDXGIOutput6,0x068346e8,0xaaec,0x4b84,0xad,0xd7,0x13,0x7f,0x51,0x3f,0x77,0xa1); + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0002_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0002_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/dxgicommon.h b/gfx/include/dxsdk/dxgicommon.h new file mode 100644 index 0000000000..bdeab3217f --- /dev/null +++ b/gfx/include/dxsdk/dxgicommon.h @@ -0,0 +1,56 @@ +// +// Copyright (C) Microsoft. All rights reserved. +// + +#ifndef __dxgicommon_h__ +#define __dxgicommon_h__ + + +typedef struct DXGI_RATIONAL +{ + UINT Numerator; + UINT Denominator; +} DXGI_RATIONAL; + +// The following values are used with DXGI_SAMPLE_DESC::Quality: +#define DXGI_STANDARD_MULTISAMPLE_QUALITY_PATTERN 0xffffffff +#define DXGI_CENTER_MULTISAMPLE_QUALITY_PATTERN 0xfffffffe + +typedef struct DXGI_SAMPLE_DESC +{ + UINT Count; + UINT Quality; +} DXGI_SAMPLE_DESC; + +typedef enum DXGI_COLOR_SPACE_TYPE +{ + DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709 = 0, + DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709 = 1, + DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P709 = 2, + DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P2020 = 3, + DXGI_COLOR_SPACE_RESERVED = 4, + DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601 = 5, + DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601 = 6, + DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P601 = 7, + DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709 = 8, + DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P709 = 9, + DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020 = 10, + DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020 = 11, + DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020 = 12, + DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_LEFT_P2020 = 13, + DXGI_COLOR_SPACE_RGB_STUDIO_G2084_NONE_P2020 = 14, + DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_TOPLEFT_P2020 = 15, + DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_TOPLEFT_P2020 = 16, + DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P2020 = 17, + DXGI_COLOR_SPACE_YCBCR_STUDIO_GHLG_TOPLEFT_P2020 = 18, + DXGI_COLOR_SPACE_YCBCR_FULL_GHLG_TOPLEFT_P2020 = 19, + DXGI_COLOR_SPACE_RGB_STUDIO_G24_NONE_P709 = 20, + DXGI_COLOR_SPACE_RGB_STUDIO_G24_NONE_P2020 = 21, + DXGI_COLOR_SPACE_YCBCR_STUDIO_G24_LEFT_P709 = 22, + DXGI_COLOR_SPACE_YCBCR_STUDIO_G24_LEFT_P2020 = 23, + DXGI_COLOR_SPACE_YCBCR_STUDIO_G24_TOPLEFT_P2020 = 24, + DXGI_COLOR_SPACE_CUSTOM = 0xFFFFFFFF +} DXGI_COLOR_SPACE_TYPE; + +#endif // __dxgicommon_h__ + diff --git a/gfx/include/dxsdk/dxgidebug.h b/gfx/include/dxsdk/dxgidebug.h new file mode 100644 index 0000000000..9a561ad31c --- /dev/null +++ b/gfx/include/dxsdk/dxgidebug.h @@ -0,0 +1,995 @@ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ +/* @@MIDL_FILE_HEADING( ) */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __dxgidebug_h__ +#define __dxgidebug_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IDXGIInfoQueue_FWD_DEFINED__ +#define __IDXGIInfoQueue_FWD_DEFINED__ +typedef interface IDXGIInfoQueue IDXGIInfoQueue; + +#endif /* __IDXGIInfoQueue_FWD_DEFINED__ */ + + +#ifndef __IDXGIDebug_FWD_DEFINED__ +#define __IDXGIDebug_FWD_DEFINED__ +typedef interface IDXGIDebug IDXGIDebug; + +#endif /* __IDXGIDebug_FWD_DEFINED__ */ + + +#ifndef __IDXGIDebug1_FWD_DEFINED__ +#define __IDXGIDebug1_FWD_DEFINED__ +typedef interface IDXGIDebug1 IDXGIDebug1; + +#endif /* __IDXGIDebug1_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_dxgidebug_0000_0000 */ +/* [local] */ + +/*#include */ +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ +#define DXGI_DEBUG_BINARY_VERSION ( 1 ) + +typedef +enum DXGI_DEBUG_RLO_FLAGS + { + DXGI_DEBUG_RLO_SUMMARY = 0x1, + DXGI_DEBUG_RLO_DETAIL = 0x2, + DXGI_DEBUG_RLO_IGNORE_INTERNAL = 0x4, + DXGI_DEBUG_RLO_ALL = 0x7 + } DXGI_DEBUG_RLO_FLAGS; + +typedef GUID DXGI_DEBUG_ID; + +DEFINE_GUID(DXGI_DEBUG_ALL, 0xe48ae283, 0xda80, 0x490b, 0x87, 0xe6, 0x43, 0xe9, 0xa9, 0xcf, 0xda, 0x8); +DEFINE_GUID(DXGI_DEBUG_DX, 0x35cdd7fc, 0x13b2, 0x421d, 0xa5, 0xd7, 0x7e, 0x44, 0x51, 0x28, 0x7d, 0x64); +DEFINE_GUID(DXGI_DEBUG_DXGI, 0x25cddaa4, 0xb1c6, 0x47e1, 0xac, 0x3e, 0x98, 0x87, 0x5b, 0x5a, 0x2e, 0x2a); +DEFINE_GUID(DXGI_DEBUG_APP, 0x6cd6e01, 0x4219, 0x4ebd, 0x87, 0x9, 0x27, 0xed, 0x23, 0x36, 0xc, 0x62); +typedef +enum DXGI_INFO_QUEUE_MESSAGE_CATEGORY + { + DXGI_INFO_QUEUE_MESSAGE_CATEGORY_UNKNOWN = 0, + DXGI_INFO_QUEUE_MESSAGE_CATEGORY_MISCELLANEOUS = ( DXGI_INFO_QUEUE_MESSAGE_CATEGORY_UNKNOWN + 1 ) , + DXGI_INFO_QUEUE_MESSAGE_CATEGORY_INITIALIZATION = ( DXGI_INFO_QUEUE_MESSAGE_CATEGORY_MISCELLANEOUS + 1 ) , + DXGI_INFO_QUEUE_MESSAGE_CATEGORY_CLEANUP = ( DXGI_INFO_QUEUE_MESSAGE_CATEGORY_INITIALIZATION + 1 ) , + DXGI_INFO_QUEUE_MESSAGE_CATEGORY_COMPILATION = ( DXGI_INFO_QUEUE_MESSAGE_CATEGORY_CLEANUP + 1 ) , + DXGI_INFO_QUEUE_MESSAGE_CATEGORY_STATE_CREATION = ( DXGI_INFO_QUEUE_MESSAGE_CATEGORY_COMPILATION + 1 ) , + DXGI_INFO_QUEUE_MESSAGE_CATEGORY_STATE_SETTING = ( DXGI_INFO_QUEUE_MESSAGE_CATEGORY_STATE_CREATION + 1 ) , + DXGI_INFO_QUEUE_MESSAGE_CATEGORY_STATE_GETTING = ( DXGI_INFO_QUEUE_MESSAGE_CATEGORY_STATE_SETTING + 1 ) , + DXGI_INFO_QUEUE_MESSAGE_CATEGORY_RESOURCE_MANIPULATION = ( DXGI_INFO_QUEUE_MESSAGE_CATEGORY_STATE_GETTING + 1 ) , + DXGI_INFO_QUEUE_MESSAGE_CATEGORY_EXECUTION = ( DXGI_INFO_QUEUE_MESSAGE_CATEGORY_RESOURCE_MANIPULATION + 1 ) , + DXGI_INFO_QUEUE_MESSAGE_CATEGORY_SHADER = ( DXGI_INFO_QUEUE_MESSAGE_CATEGORY_EXECUTION + 1 ) + } DXGI_INFO_QUEUE_MESSAGE_CATEGORY; + +typedef +enum DXGI_INFO_QUEUE_MESSAGE_SEVERITY + { + DXGI_INFO_QUEUE_MESSAGE_SEVERITY_CORRUPTION = 0, + DXGI_INFO_QUEUE_MESSAGE_SEVERITY_ERROR = ( DXGI_INFO_QUEUE_MESSAGE_SEVERITY_CORRUPTION + 1 ) , + DXGI_INFO_QUEUE_MESSAGE_SEVERITY_WARNING = ( DXGI_INFO_QUEUE_MESSAGE_SEVERITY_ERROR + 1 ) , + DXGI_INFO_QUEUE_MESSAGE_SEVERITY_INFO = ( DXGI_INFO_QUEUE_MESSAGE_SEVERITY_WARNING + 1 ) , + DXGI_INFO_QUEUE_MESSAGE_SEVERITY_MESSAGE = ( DXGI_INFO_QUEUE_MESSAGE_SEVERITY_INFO + 1 ) + } DXGI_INFO_QUEUE_MESSAGE_SEVERITY; + +typedef int DXGI_INFO_QUEUE_MESSAGE_ID; + +#define DXGI_INFO_QUEUE_MESSAGE_ID_STRING_FROM_APPLICATION 0 +typedef struct DXGI_INFO_QUEUE_MESSAGE + { + DXGI_DEBUG_ID Producer; + DXGI_INFO_QUEUE_MESSAGE_CATEGORY Category; + DXGI_INFO_QUEUE_MESSAGE_SEVERITY Severity; + DXGI_INFO_QUEUE_MESSAGE_ID ID; + /* [annotation] */ + _Field_size_(DescriptionByteLength) const char *pDescription; + SIZE_T DescriptionByteLength; + } DXGI_INFO_QUEUE_MESSAGE; + +typedef struct DXGI_INFO_QUEUE_FILTER_DESC + { + UINT NumCategories; + /* [annotation] */ + _Field_size_(NumCategories) DXGI_INFO_QUEUE_MESSAGE_CATEGORY *pCategoryList; + UINT NumSeverities; + /* [annotation] */ + _Field_size_(NumSeverities) DXGI_INFO_QUEUE_MESSAGE_SEVERITY *pSeverityList; + UINT NumIDs; + /* [annotation] */ + _Field_size_(NumIDs) DXGI_INFO_QUEUE_MESSAGE_ID *pIDList; + } DXGI_INFO_QUEUE_FILTER_DESC; + +typedef struct DXGI_INFO_QUEUE_FILTER + { + DXGI_INFO_QUEUE_FILTER_DESC AllowList; + DXGI_INFO_QUEUE_FILTER_DESC DenyList; + } DXGI_INFO_QUEUE_FILTER; + +#define DXGI_INFO_QUEUE_DEFAULT_MESSAGE_COUNT_LIMIT 1024 +HRESULT WINAPI DXGIGetDebugInterface(REFIID riid, void **ppDebug); + + +extern RPC_IF_HANDLE __MIDL_itf_dxgidebug_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgidebug_0000_0000_v0_0_s_ifspec; + +#ifndef __IDXGIInfoQueue_INTERFACE_DEFINED__ +#define __IDXGIInfoQueue_INTERFACE_DEFINED__ + +/* interface IDXGIInfoQueue */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_IDXGIInfoQueue; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("D67441C7-672A-476f-9E82-CD55B44949CE") + IDXGIInfoQueue : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetMessageCountLimit( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ UINT64 MessageCountLimit) = 0; + + virtual void STDMETHODCALLTYPE ClearStoredMessages( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMessage( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ UINT64 MessageIndex, + /* [annotation] */ + _Out_writes_bytes_opt_(*pMessageByteLength) DXGI_INFO_QUEUE_MESSAGE *pMessage, + /* [annotation] */ + _Inout_ SIZE_T *pMessageByteLength) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetNumStoredMessagesAllowedByRetrievalFilters( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetNumStoredMessages( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetNumMessagesDiscardedByMessageCountLimit( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetMessageCountLimit( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetNumMessagesAllowedByStorageFilter( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetNumMessagesDeniedByStorageFilter( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddStorageFilterEntries( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_FILTER *pFilter) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStorageFilter( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _Out_writes_bytes_opt_(*pFilterByteLength) DXGI_INFO_QUEUE_FILTER *pFilter, + /* [annotation] */ + _Inout_ SIZE_T *pFilterByteLength) = 0; + + virtual void STDMETHODCALLTYPE ClearStorageFilter( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushEmptyStorageFilter( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushDenyAllStorageFilter( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushCopyOfStorageFilter( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushStorageFilter( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_FILTER *pFilter) = 0; + + virtual void STDMETHODCALLTYPE PopStorageFilter( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer) = 0; + + virtual UINT STDMETHODCALLTYPE GetStorageFilterStackSize( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddRetrievalFilterEntries( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_FILTER *pFilter) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRetrievalFilter( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _Out_writes_bytes_opt_(*pFilterByteLength) DXGI_INFO_QUEUE_FILTER *pFilter, + /* [annotation] */ + _Inout_ SIZE_T *pFilterByteLength) = 0; + + virtual void STDMETHODCALLTYPE ClearRetrievalFilter( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushEmptyRetrievalFilter( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushDenyAllRetrievalFilter( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushCopyOfRetrievalFilter( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushRetrievalFilter( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_FILTER *pFilter) = 0; + + virtual void STDMETHODCALLTYPE PopRetrievalFilter( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer) = 0; + + virtual UINT STDMETHODCALLTYPE GetRetrievalFilterStackSize( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddMessage( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_MESSAGE_CATEGORY Category, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_MESSAGE_SEVERITY Severity, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_MESSAGE_ID ID, + /* [annotation] */ + _In_ LPCSTR pDescription) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddApplicationMessage( + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_MESSAGE_SEVERITY Severity, + /* [annotation] */ + _In_ LPCSTR pDescription) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetBreakOnCategory( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_MESSAGE_CATEGORY Category, + /* [annotation] */ + _In_ BOOL bEnable) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetBreakOnSeverity( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_MESSAGE_SEVERITY Severity, + /* [annotation] */ + _In_ BOOL bEnable) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetBreakOnID( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_MESSAGE_ID ID, + /* [annotation] */ + _In_ BOOL bEnable) = 0; + + virtual BOOL STDMETHODCALLTYPE GetBreakOnCategory( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_MESSAGE_CATEGORY Category) = 0; + + virtual BOOL STDMETHODCALLTYPE GetBreakOnSeverity( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_MESSAGE_SEVERITY Severity) = 0; + + virtual BOOL STDMETHODCALLTYPE GetBreakOnID( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_MESSAGE_ID ID) = 0; + + virtual void STDMETHODCALLTYPE SetMuteDebugOutput( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ BOOL bMute) = 0; + + virtual BOOL STDMETHODCALLTYPE GetMuteDebugOutput( + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIInfoQueueVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIInfoQueue * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIInfoQueue * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIInfoQueue * This); + + HRESULT ( STDMETHODCALLTYPE *SetMessageCountLimit )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ UINT64 MessageCountLimit); + + void ( STDMETHODCALLTYPE *ClearStoredMessages )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer); + + HRESULT ( STDMETHODCALLTYPE *GetMessage )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ UINT64 MessageIndex, + /* [annotation] */ + _Out_writes_bytes_opt_(*pMessageByteLength) DXGI_INFO_QUEUE_MESSAGE *pMessage, + /* [annotation] */ + _Inout_ SIZE_T *pMessageByteLength); + + UINT64 ( STDMETHODCALLTYPE *GetNumStoredMessagesAllowedByRetrievalFilters )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer); + + UINT64 ( STDMETHODCALLTYPE *GetNumStoredMessages )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer); + + UINT64 ( STDMETHODCALLTYPE *GetNumMessagesDiscardedByMessageCountLimit )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer); + + UINT64 ( STDMETHODCALLTYPE *GetMessageCountLimit )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer); + + UINT64 ( STDMETHODCALLTYPE *GetNumMessagesAllowedByStorageFilter )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer); + + UINT64 ( STDMETHODCALLTYPE *GetNumMessagesDeniedByStorageFilter )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer); + + HRESULT ( STDMETHODCALLTYPE *AddStorageFilterEntries )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_FILTER *pFilter); + + HRESULT ( STDMETHODCALLTYPE *GetStorageFilter )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _Out_writes_bytes_opt_(*pFilterByteLength) DXGI_INFO_QUEUE_FILTER *pFilter, + /* [annotation] */ + _Inout_ SIZE_T *pFilterByteLength); + + void ( STDMETHODCALLTYPE *ClearStorageFilter )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer); + + HRESULT ( STDMETHODCALLTYPE *PushEmptyStorageFilter )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer); + + HRESULT ( STDMETHODCALLTYPE *PushDenyAllStorageFilter )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer); + + HRESULT ( STDMETHODCALLTYPE *PushCopyOfStorageFilter )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer); + + HRESULT ( STDMETHODCALLTYPE *PushStorageFilter )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_FILTER *pFilter); + + void ( STDMETHODCALLTYPE *PopStorageFilter )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer); + + UINT ( STDMETHODCALLTYPE *GetStorageFilterStackSize )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer); + + HRESULT ( STDMETHODCALLTYPE *AddRetrievalFilterEntries )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_FILTER *pFilter); + + HRESULT ( STDMETHODCALLTYPE *GetRetrievalFilter )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _Out_writes_bytes_opt_(*pFilterByteLength) DXGI_INFO_QUEUE_FILTER *pFilter, + /* [annotation] */ + _Inout_ SIZE_T *pFilterByteLength); + + void ( STDMETHODCALLTYPE *ClearRetrievalFilter )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer); + + HRESULT ( STDMETHODCALLTYPE *PushEmptyRetrievalFilter )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer); + + HRESULT ( STDMETHODCALLTYPE *PushDenyAllRetrievalFilter )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer); + + HRESULT ( STDMETHODCALLTYPE *PushCopyOfRetrievalFilter )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer); + + HRESULT ( STDMETHODCALLTYPE *PushRetrievalFilter )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_FILTER *pFilter); + + void ( STDMETHODCALLTYPE *PopRetrievalFilter )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer); + + UINT ( STDMETHODCALLTYPE *GetRetrievalFilterStackSize )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer); + + HRESULT ( STDMETHODCALLTYPE *AddMessage )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_MESSAGE_CATEGORY Category, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_MESSAGE_SEVERITY Severity, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_MESSAGE_ID ID, + /* [annotation] */ + _In_ LPCSTR pDescription); + + HRESULT ( STDMETHODCALLTYPE *AddApplicationMessage )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_MESSAGE_SEVERITY Severity, + /* [annotation] */ + _In_ LPCSTR pDescription); + + HRESULT ( STDMETHODCALLTYPE *SetBreakOnCategory )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_MESSAGE_CATEGORY Category, + /* [annotation] */ + _In_ BOOL bEnable); + + HRESULT ( STDMETHODCALLTYPE *SetBreakOnSeverity )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_MESSAGE_SEVERITY Severity, + /* [annotation] */ + _In_ BOOL bEnable); + + HRESULT ( STDMETHODCALLTYPE *SetBreakOnID )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_MESSAGE_ID ID, + /* [annotation] */ + _In_ BOOL bEnable); + + BOOL ( STDMETHODCALLTYPE *GetBreakOnCategory )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_MESSAGE_CATEGORY Category); + + BOOL ( STDMETHODCALLTYPE *GetBreakOnSeverity )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_MESSAGE_SEVERITY Severity); + + BOOL ( STDMETHODCALLTYPE *GetBreakOnID )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ DXGI_INFO_QUEUE_MESSAGE_ID ID); + + void ( STDMETHODCALLTYPE *SetMuteDebugOutput )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer, + /* [annotation] */ + _In_ BOOL bMute); + + BOOL ( STDMETHODCALLTYPE *GetMuteDebugOutput )( + IDXGIInfoQueue * This, + /* [annotation] */ + _In_ DXGI_DEBUG_ID Producer); + + END_INTERFACE + } IDXGIInfoQueueVtbl; + + interface IDXGIInfoQueue + { + CONST_VTBL struct IDXGIInfoQueueVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIInfoQueue_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIInfoQueue_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIInfoQueue_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIInfoQueue_SetMessageCountLimit(This,Producer,MessageCountLimit) \ + ( (This)->lpVtbl -> SetMessageCountLimit(This,Producer,MessageCountLimit) ) + +#define IDXGIInfoQueue_ClearStoredMessages(This,Producer) \ + ( (This)->lpVtbl -> ClearStoredMessages(This,Producer) ) + +#define IDXGIInfoQueue_GetMessage(This,Producer,MessageIndex,pMessage,pMessageByteLength) \ + ( (This)->lpVtbl -> GetMessage(This,Producer,MessageIndex,pMessage,pMessageByteLength) ) + +#define IDXGIInfoQueue_GetNumStoredMessagesAllowedByRetrievalFilters(This,Producer) \ + ( (This)->lpVtbl -> GetNumStoredMessagesAllowedByRetrievalFilters(This,Producer) ) + +#define IDXGIInfoQueue_GetNumStoredMessages(This,Producer) \ + ( (This)->lpVtbl -> GetNumStoredMessages(This,Producer) ) + +#define IDXGIInfoQueue_GetNumMessagesDiscardedByMessageCountLimit(This,Producer) \ + ( (This)->lpVtbl -> GetNumMessagesDiscardedByMessageCountLimit(This,Producer) ) + +#define IDXGIInfoQueue_GetMessageCountLimit(This,Producer) \ + ( (This)->lpVtbl -> GetMessageCountLimit(This,Producer) ) + +#define IDXGIInfoQueue_GetNumMessagesAllowedByStorageFilter(This,Producer) \ + ( (This)->lpVtbl -> GetNumMessagesAllowedByStorageFilter(This,Producer) ) + +#define IDXGIInfoQueue_GetNumMessagesDeniedByStorageFilter(This,Producer) \ + ( (This)->lpVtbl -> GetNumMessagesDeniedByStorageFilter(This,Producer) ) + +#define IDXGIInfoQueue_AddStorageFilterEntries(This,Producer,pFilter) \ + ( (This)->lpVtbl -> AddStorageFilterEntries(This,Producer,pFilter) ) + +#define IDXGIInfoQueue_GetStorageFilter(This,Producer,pFilter,pFilterByteLength) \ + ( (This)->lpVtbl -> GetStorageFilter(This,Producer,pFilter,pFilterByteLength) ) + +#define IDXGIInfoQueue_ClearStorageFilter(This,Producer) \ + ( (This)->lpVtbl -> ClearStorageFilter(This,Producer) ) + +#define IDXGIInfoQueue_PushEmptyStorageFilter(This,Producer) \ + ( (This)->lpVtbl -> PushEmptyStorageFilter(This,Producer) ) + +#define IDXGIInfoQueue_PushDenyAllStorageFilter(This,Producer) \ + ( (This)->lpVtbl -> PushDenyAllStorageFilter(This,Producer) ) + +#define IDXGIInfoQueue_PushCopyOfStorageFilter(This,Producer) \ + ( (This)->lpVtbl -> PushCopyOfStorageFilter(This,Producer) ) + +#define IDXGIInfoQueue_PushStorageFilter(This,Producer,pFilter) \ + ( (This)->lpVtbl -> PushStorageFilter(This,Producer,pFilter) ) + +#define IDXGIInfoQueue_PopStorageFilter(This,Producer) \ + ( (This)->lpVtbl -> PopStorageFilter(This,Producer) ) + +#define IDXGIInfoQueue_GetStorageFilterStackSize(This,Producer) \ + ( (This)->lpVtbl -> GetStorageFilterStackSize(This,Producer) ) + +#define IDXGIInfoQueue_AddRetrievalFilterEntries(This,Producer,pFilter) \ + ( (This)->lpVtbl -> AddRetrievalFilterEntries(This,Producer,pFilter) ) + +#define IDXGIInfoQueue_GetRetrievalFilter(This,Producer,pFilter,pFilterByteLength) \ + ( (This)->lpVtbl -> GetRetrievalFilter(This,Producer,pFilter,pFilterByteLength) ) + +#define IDXGIInfoQueue_ClearRetrievalFilter(This,Producer) \ + ( (This)->lpVtbl -> ClearRetrievalFilter(This,Producer) ) + +#define IDXGIInfoQueue_PushEmptyRetrievalFilter(This,Producer) \ + ( (This)->lpVtbl -> PushEmptyRetrievalFilter(This,Producer) ) + +#define IDXGIInfoQueue_PushDenyAllRetrievalFilter(This,Producer) \ + ( (This)->lpVtbl -> PushDenyAllRetrievalFilter(This,Producer) ) + +#define IDXGIInfoQueue_PushCopyOfRetrievalFilter(This,Producer) \ + ( (This)->lpVtbl -> PushCopyOfRetrievalFilter(This,Producer) ) + +#define IDXGIInfoQueue_PushRetrievalFilter(This,Producer,pFilter) \ + ( (This)->lpVtbl -> PushRetrievalFilter(This,Producer,pFilter) ) + +#define IDXGIInfoQueue_PopRetrievalFilter(This,Producer) \ + ( (This)->lpVtbl -> PopRetrievalFilter(This,Producer) ) + +#define IDXGIInfoQueue_GetRetrievalFilterStackSize(This,Producer) \ + ( (This)->lpVtbl -> GetRetrievalFilterStackSize(This,Producer) ) + +#define IDXGIInfoQueue_AddMessage(This,Producer,Category,Severity,ID,pDescription) \ + ( (This)->lpVtbl -> AddMessage(This,Producer,Category,Severity,ID,pDescription) ) + +#define IDXGIInfoQueue_AddApplicationMessage(This,Severity,pDescription) \ + ( (This)->lpVtbl -> AddApplicationMessage(This,Severity,pDescription) ) + +#define IDXGIInfoQueue_SetBreakOnCategory(This,Producer,Category,bEnable) \ + ( (This)->lpVtbl -> SetBreakOnCategory(This,Producer,Category,bEnable) ) + +#define IDXGIInfoQueue_SetBreakOnSeverity(This,Producer,Severity,bEnable) \ + ( (This)->lpVtbl -> SetBreakOnSeverity(This,Producer,Severity,bEnable) ) + +#define IDXGIInfoQueue_SetBreakOnID(This,Producer,ID,bEnable) \ + ( (This)->lpVtbl -> SetBreakOnID(This,Producer,ID,bEnable) ) + +#define IDXGIInfoQueue_GetBreakOnCategory(This,Producer,Category) \ + ( (This)->lpVtbl -> GetBreakOnCategory(This,Producer,Category) ) + +#define IDXGIInfoQueue_GetBreakOnSeverity(This,Producer,Severity) \ + ( (This)->lpVtbl -> GetBreakOnSeverity(This,Producer,Severity) ) + +#define IDXGIInfoQueue_GetBreakOnID(This,Producer,ID) \ + ( (This)->lpVtbl -> GetBreakOnID(This,Producer,ID) ) + +#define IDXGIInfoQueue_SetMuteDebugOutput(This,Producer,bMute) \ + ( (This)->lpVtbl -> SetMuteDebugOutput(This,Producer,bMute) ) + +#define IDXGIInfoQueue_GetMuteDebugOutput(This,Producer) \ + ( (This)->lpVtbl -> GetMuteDebugOutput(This,Producer) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIInfoQueue_INTERFACE_DEFINED__ */ + + +#ifndef __IDXGIDebug_INTERFACE_DEFINED__ +#define __IDXGIDebug_INTERFACE_DEFINED__ + +/* interface IDXGIDebug */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_IDXGIDebug; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("119E7452-DE9E-40fe-8806-88F90C12B441") + IDXGIDebug : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE ReportLiveObjects( + GUID apiid, + DXGI_DEBUG_RLO_FLAGS flags) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIDebugVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIDebug * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIDebug * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIDebug * This); + + HRESULT ( STDMETHODCALLTYPE *ReportLiveObjects )( + IDXGIDebug * This, + GUID apiid, + DXGI_DEBUG_RLO_FLAGS flags); + + END_INTERFACE + } IDXGIDebugVtbl; + + interface IDXGIDebug + { + CONST_VTBL struct IDXGIDebugVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIDebug_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIDebug_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIDebug_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIDebug_ReportLiveObjects(This,apiid,flags) \ + ( (This)->lpVtbl -> ReportLiveObjects(This,apiid,flags) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIDebug_INTERFACE_DEFINED__ */ + + +#ifndef __IDXGIDebug1_INTERFACE_DEFINED__ +#define __IDXGIDebug1_INTERFACE_DEFINED__ + +/* interface IDXGIDebug1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_IDXGIDebug1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("c5a05f0c-16f2-4adf-9f4d-a8c4d58ac550") + IDXGIDebug1 : public IDXGIDebug + { + public: + virtual void STDMETHODCALLTYPE EnableLeakTrackingForThread( void) = 0; + + virtual void STDMETHODCALLTYPE DisableLeakTrackingForThread( void) = 0; + + virtual BOOL STDMETHODCALLTYPE IsLeakTrackingEnabledForThread( void) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIDebug1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIDebug1 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIDebug1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIDebug1 * This); + + HRESULT ( STDMETHODCALLTYPE *ReportLiveObjects )( + IDXGIDebug1 * This, + GUID apiid, + DXGI_DEBUG_RLO_FLAGS flags); + + void ( STDMETHODCALLTYPE *EnableLeakTrackingForThread )( + IDXGIDebug1 * This); + + void ( STDMETHODCALLTYPE *DisableLeakTrackingForThread )( + IDXGIDebug1 * This); + + BOOL ( STDMETHODCALLTYPE *IsLeakTrackingEnabledForThread )( + IDXGIDebug1 * This); + + END_INTERFACE + } IDXGIDebug1Vtbl; + + interface IDXGIDebug1 + { + CONST_VTBL struct IDXGIDebug1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIDebug1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIDebug1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIDebug1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIDebug1_ReportLiveObjects(This,apiid,flags) \ + ( (This)->lpVtbl -> ReportLiveObjects(This,apiid,flags) ) + + +#define IDXGIDebug1_EnableLeakTrackingForThread(This) \ + ( (This)->lpVtbl -> EnableLeakTrackingForThread(This) ) + +#define IDXGIDebug1_DisableLeakTrackingForThread(This) \ + ( (This)->lpVtbl -> DisableLeakTrackingForThread(This) ) + +#define IDXGIDebug1_IsLeakTrackingEnabledForThread(This) \ + ( (This)->lpVtbl -> IsLeakTrackingEnabledForThread(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIDebug1_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgidebug_0000_0003 */ +/* [local] */ + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +/*#pragma endregion*/ +/*#pragma region Desktop Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +/*#pragma endregion*/ +DEFINE_GUID(IID_IDXGIInfoQueue,0xD67441C7,0x672A,0x476f,0x9E,0x82,0xCD,0x55,0xB4,0x49,0x49,0xCE); +DEFINE_GUID(IID_IDXGIDebug,0x119E7452,0xDE9E,0x40fe,0x88,0x06,0x88,0xF9,0x0C,0x12,0xB4,0x41); +DEFINE_GUID(IID_IDXGIDebug1,0xc5a05f0c,0x16f2,0x4adf,0x9f,0x4d,0xa8,0xc4,0xd5,0x8a,0xc5,0x50); + + +extern RPC_IF_HANDLE __MIDL_itf_dxgidebug_0000_0003_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgidebug_0000_0003_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/dxgiformat.h b/gfx/include/dxsdk/dxgiformat.h new file mode 100644 index 0000000000..4159caba4b --- /dev/null +++ b/gfx/include/dxsdk/dxgiformat.h @@ -0,0 +1,137 @@ +// +// Copyright (C) Microsoft. All rights reserved. +// + +#ifndef __dxgiformat_h__ +#define __dxgiformat_h__ + +#define DXGI_FORMAT_DEFINED 1 + +typedef enum DXGI_FORMAT +{ + DXGI_FORMAT_UNKNOWN = 0, + DXGI_FORMAT_R32G32B32A32_TYPELESS = 1, + DXGI_FORMAT_R32G32B32A32_FLOAT = 2, + DXGI_FORMAT_R32G32B32A32_UINT = 3, + DXGI_FORMAT_R32G32B32A32_SINT = 4, + DXGI_FORMAT_R32G32B32_TYPELESS = 5, + DXGI_FORMAT_R32G32B32_FLOAT = 6, + DXGI_FORMAT_R32G32B32_UINT = 7, + DXGI_FORMAT_R32G32B32_SINT = 8, + DXGI_FORMAT_R16G16B16A16_TYPELESS = 9, + DXGI_FORMAT_R16G16B16A16_FLOAT = 10, + DXGI_FORMAT_R16G16B16A16_UNORM = 11, + DXGI_FORMAT_R16G16B16A16_UINT = 12, + DXGI_FORMAT_R16G16B16A16_SNORM = 13, + DXGI_FORMAT_R16G16B16A16_SINT = 14, + DXGI_FORMAT_R32G32_TYPELESS = 15, + DXGI_FORMAT_R32G32_FLOAT = 16, + DXGI_FORMAT_R32G32_UINT = 17, + DXGI_FORMAT_R32G32_SINT = 18, + DXGI_FORMAT_R32G8X24_TYPELESS = 19, + DXGI_FORMAT_D32_FLOAT_S8X24_UINT = 20, + DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS = 21, + DXGI_FORMAT_X32_TYPELESS_G8X24_UINT = 22, + DXGI_FORMAT_R10G10B10A2_TYPELESS = 23, + DXGI_FORMAT_R10G10B10A2_UNORM = 24, + DXGI_FORMAT_R10G10B10A2_UINT = 25, + DXGI_FORMAT_R11G11B10_FLOAT = 26, + DXGI_FORMAT_R8G8B8A8_TYPELESS = 27, + DXGI_FORMAT_R8G8B8A8_UNORM = 28, + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB = 29, + DXGI_FORMAT_R8G8B8A8_UINT = 30, + DXGI_FORMAT_R8G8B8A8_SNORM = 31, + DXGI_FORMAT_R8G8B8A8_SINT = 32, + DXGI_FORMAT_R16G16_TYPELESS = 33, + DXGI_FORMAT_R16G16_FLOAT = 34, + DXGI_FORMAT_R16G16_UNORM = 35, + DXGI_FORMAT_R16G16_UINT = 36, + DXGI_FORMAT_R16G16_SNORM = 37, + DXGI_FORMAT_R16G16_SINT = 38, + DXGI_FORMAT_R32_TYPELESS = 39, + DXGI_FORMAT_D32_FLOAT = 40, + DXGI_FORMAT_R32_FLOAT = 41, + DXGI_FORMAT_R32_UINT = 42, + DXGI_FORMAT_R32_SINT = 43, + DXGI_FORMAT_R24G8_TYPELESS = 44, + DXGI_FORMAT_D24_UNORM_S8_UINT = 45, + DXGI_FORMAT_R24_UNORM_X8_TYPELESS = 46, + DXGI_FORMAT_X24_TYPELESS_G8_UINT = 47, + DXGI_FORMAT_R8G8_TYPELESS = 48, + DXGI_FORMAT_R8G8_UNORM = 49, + DXGI_FORMAT_R8G8_UINT = 50, + DXGI_FORMAT_R8G8_SNORM = 51, + DXGI_FORMAT_R8G8_SINT = 52, + DXGI_FORMAT_R16_TYPELESS = 53, + DXGI_FORMAT_R16_FLOAT = 54, + DXGI_FORMAT_D16_UNORM = 55, + DXGI_FORMAT_R16_UNORM = 56, + DXGI_FORMAT_R16_UINT = 57, + DXGI_FORMAT_R16_SNORM = 58, + DXGI_FORMAT_R16_SINT = 59, + DXGI_FORMAT_R8_TYPELESS = 60, + DXGI_FORMAT_R8_UNORM = 61, + DXGI_FORMAT_R8_UINT = 62, + DXGI_FORMAT_R8_SNORM = 63, + DXGI_FORMAT_R8_SINT = 64, + DXGI_FORMAT_A8_UNORM = 65, + DXGI_FORMAT_R1_UNORM = 66, + DXGI_FORMAT_R9G9B9E5_SHAREDEXP = 67, + DXGI_FORMAT_R8G8_B8G8_UNORM = 68, + DXGI_FORMAT_G8R8_G8B8_UNORM = 69, + DXGI_FORMAT_BC1_TYPELESS = 70, + DXGI_FORMAT_BC1_UNORM = 71, + DXGI_FORMAT_BC1_UNORM_SRGB = 72, + DXGI_FORMAT_BC2_TYPELESS = 73, + DXGI_FORMAT_BC2_UNORM = 74, + DXGI_FORMAT_BC2_UNORM_SRGB = 75, + DXGI_FORMAT_BC3_TYPELESS = 76, + DXGI_FORMAT_BC3_UNORM = 77, + DXGI_FORMAT_BC3_UNORM_SRGB = 78, + DXGI_FORMAT_BC4_TYPELESS = 79, + DXGI_FORMAT_BC4_UNORM = 80, + DXGI_FORMAT_BC4_SNORM = 81, + DXGI_FORMAT_BC5_TYPELESS = 82, + DXGI_FORMAT_BC5_UNORM = 83, + DXGI_FORMAT_BC5_SNORM = 84, + DXGI_FORMAT_B5G6R5_UNORM = 85, + DXGI_FORMAT_B5G5R5A1_UNORM = 86, + DXGI_FORMAT_B8G8R8A8_UNORM = 87, + DXGI_FORMAT_B8G8R8X8_UNORM = 88, + DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM = 89, + DXGI_FORMAT_B8G8R8A8_TYPELESS = 90, + DXGI_FORMAT_B8G8R8A8_UNORM_SRGB = 91, + DXGI_FORMAT_B8G8R8X8_TYPELESS = 92, + DXGI_FORMAT_B8G8R8X8_UNORM_SRGB = 93, + DXGI_FORMAT_BC6H_TYPELESS = 94, + DXGI_FORMAT_BC6H_UF16 = 95, + DXGI_FORMAT_BC6H_SF16 = 96, + DXGI_FORMAT_BC7_TYPELESS = 97, + DXGI_FORMAT_BC7_UNORM = 98, + DXGI_FORMAT_BC7_UNORM_SRGB = 99, + DXGI_FORMAT_AYUV = 100, + DXGI_FORMAT_Y410 = 101, + DXGI_FORMAT_Y416 = 102, + DXGI_FORMAT_NV12 = 103, + DXGI_FORMAT_P010 = 104, + DXGI_FORMAT_P016 = 105, + DXGI_FORMAT_420_OPAQUE = 106, + DXGI_FORMAT_YUY2 = 107, + DXGI_FORMAT_Y210 = 108, + DXGI_FORMAT_Y216 = 109, + DXGI_FORMAT_NV11 = 110, + DXGI_FORMAT_AI44 = 111, + DXGI_FORMAT_IA44 = 112, + DXGI_FORMAT_P8 = 113, + DXGI_FORMAT_A8P8 = 114, + DXGI_FORMAT_B4G4R4A4_UNORM = 115, + + DXGI_FORMAT_P208 = 130, + DXGI_FORMAT_V208 = 131, + DXGI_FORMAT_V408 = 132, + + + DXGI_FORMAT_FORCE_UINT = 0xffffffff +} DXGI_FORMAT; + +#endif // __dxgiformat_h__ diff --git a/gfx/include/dxsdk/dxgitype.h b/gfx/include/dxsdk/dxgitype.h new file mode 100644 index 0000000000..d3a698b5a1 --- /dev/null +++ b/gfx/include/dxsdk/dxgitype.h @@ -0,0 +1,143 @@ +// +// Copyright (C) Microsoft. All rights reserved. +// +#ifndef __dxgitype_h__ +#define __dxgitype_h__ + +#include "dxgicommon.h" +#include "dxgiformat.h" + +#define _FACDXGI 0x87a +#define MAKE_DXGI_HRESULT(code) MAKE_HRESULT(1, _FACDXGI, code) +#define MAKE_DXGI_STATUS(code) MAKE_HRESULT(0, _FACDXGI, code) + +#ifndef DXGI_STATUS_OCCLUDED + +#define DXGI_STATUS_OCCLUDED MAKE_DXGI_STATUS(1) +#define DXGI_STATUS_CLIPPED MAKE_DXGI_STATUS(2) +#define DXGI_STATUS_NO_REDIRECTION MAKE_DXGI_STATUS(4) +#define DXGI_STATUS_NO_DESKTOP_ACCESS MAKE_DXGI_STATUS(5) +#define DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE MAKE_DXGI_STATUS(6) +#define DXGI_STATUS_MODE_CHANGED MAKE_DXGI_STATUS(7) +#define DXGI_STATUS_MODE_CHANGE_IN_PROGRESS MAKE_DXGI_STATUS(8) + +#endif /*DXGI_STATUS_OCCLUDED*/ + +#ifndef DXGI_ERROR_INVALID_CALL + +#define DXGI_ERROR_INVALID_CALL MAKE_DXGI_HRESULT(1) +#define DXGI_ERROR_NOT_FOUND MAKE_DXGI_HRESULT(2) +#define DXGI_ERROR_MORE_DATA MAKE_DXGI_HRESULT(3) +#define DXGI_ERROR_UNSUPPORTED MAKE_DXGI_HRESULT(4) +#define DXGI_ERROR_DEVICE_REMOVED MAKE_DXGI_HRESULT(5) +#define DXGI_ERROR_DEVICE_HUNG MAKE_DXGI_HRESULT(6) +#define DXGI_ERROR_DEVICE_RESET MAKE_DXGI_HRESULT(7) +#define DXGI_ERROR_WAS_STILL_DRAWING MAKE_DXGI_HRESULT(10) +#define DXGI_ERROR_FRAME_STATISTICS_DISJOINT MAKE_DXGI_HRESULT(11) +#define DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE MAKE_DXGI_HRESULT(12) +#define DXGI_ERROR_DRIVER_INTERNAL_ERROR MAKE_DXGI_HRESULT(32) +#define DXGI_ERROR_NONEXCLUSIVE MAKE_DXGI_HRESULT(33) +#define DXGI_ERROR_NOT_CURRENTLY_AVAILABLE MAKE_DXGI_HRESULT(34) +#define DXGI_ERROR_REMOTE_CLIENT_DISCONNECTED MAKE_DXGI_HRESULT(35) +#define DXGI_ERROR_REMOTE_OUTOFMEMORY MAKE_DXGI_HRESULT(36) + +#endif /*DXGI_ERROR_INVALID_CALL*/ + +// DXGI error messages have moved to winerror.h + +#define DXGI_CPU_ACCESS_NONE ( 0 ) +#define DXGI_CPU_ACCESS_DYNAMIC ( 1 ) +#define DXGI_CPU_ACCESS_READ_WRITE ( 2 ) +#define DXGI_CPU_ACCESS_SCRATCH ( 3 ) +#define DXGI_CPU_ACCESS_FIELD 15 + + +typedef struct DXGI_RGB +{ + float Red; + float Green; + float Blue; +} DXGI_RGB; + +#ifndef D3DCOLORVALUE_DEFINED +typedef struct _D3DCOLORVALUE { + float r; + float g; + float b; + float a; +} D3DCOLORVALUE; + +#define D3DCOLORVALUE_DEFINED +#endif + +typedef D3DCOLORVALUE DXGI_RGBA; + +typedef struct DXGI_GAMMA_CONTROL +{ + DXGI_RGB Scale; + DXGI_RGB Offset; + DXGI_RGB GammaCurve[ 1025 ]; +} DXGI_GAMMA_CONTROL; + +typedef struct DXGI_GAMMA_CONTROL_CAPABILITIES +{ + BOOL ScaleAndOffsetSupported; + float MaxConvertedValue; + float MinConvertedValue; + UINT NumGammaControlPoints; + float ControlPointPositions[1025]; +} DXGI_GAMMA_CONTROL_CAPABILITIES; + +typedef enum DXGI_MODE_SCANLINE_ORDER +{ + DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED = 0, + DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE = 1, + DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST = 2, + DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST = 3 +} DXGI_MODE_SCANLINE_ORDER; + +typedef enum DXGI_MODE_SCALING +{ + DXGI_MODE_SCALING_UNSPECIFIED = 0, + DXGI_MODE_SCALING_CENTERED = 1, + DXGI_MODE_SCALING_STRETCHED = 2 +} DXGI_MODE_SCALING; + +typedef enum DXGI_MODE_ROTATION +{ + DXGI_MODE_ROTATION_UNSPECIFIED = 0, + DXGI_MODE_ROTATION_IDENTITY = 1, + DXGI_MODE_ROTATION_ROTATE90 = 2, + DXGI_MODE_ROTATION_ROTATE180 = 3, + DXGI_MODE_ROTATION_ROTATE270 = 4 +} DXGI_MODE_ROTATION; + +typedef struct DXGI_MODE_DESC +{ + UINT Width; + UINT Height; + DXGI_RATIONAL RefreshRate; + DXGI_FORMAT Format; + DXGI_MODE_SCANLINE_ORDER ScanlineOrdering; + DXGI_MODE_SCALING Scaling; +} DXGI_MODE_DESC; + +typedef struct DXGI_JPEG_DC_HUFFMAN_TABLE +{ + BYTE CodeCounts[12]; + BYTE CodeValues[12]; +} DXGI_JPEG_DC_HUFFMAN_TABLE; + +typedef struct DXGI_JPEG_AC_HUFFMAN_TABLE +{ + BYTE CodeCounts[16]; + BYTE CodeValues[162]; +} DXGI_JPEG_AC_HUFFMAN_TABLE; + +typedef struct DXGI_JPEG_QUANTIZATION_TABLE +{ + BYTE Elements[64]; +} DXGI_JPEG_QUANTIZATION_TABLE; + +#endif // __dxgitype_h__ + diff --git a/gfx/include/dxsdk/dxsdkver.h b/gfx/include/dxsdk/dxsdkver.h new file mode 100644 index 0000000000..7d88bbbb03 --- /dev/null +++ b/gfx/include/dxsdk/dxsdkver.h @@ -0,0 +1,18 @@ +/*==========================================================================; + * + * + * File: dxsdkver.h + * Content: DirectX SDK Version Include File + * + ****************************************************************************/ + +#ifndef _DXSDKVER_H_ +#define _DXSDKVER_H_ + +#define _DXSDK_PRODUCT_MAJOR 9 +#define _DXSDK_PRODUCT_MINOR 29 +#define _DXSDK_BUILD_MAJOR 1962 +#define _DXSDK_BUILD_MINOR 0 + +#endif // _DXSDKVER_H_ + diff --git a/gfx/include/dxsdk/gameux.h b/gfx/include/dxsdk/gameux.h new file mode 100644 index 0000000000..5065960d7f --- /dev/null +++ b/gfx/include/dxsdk/gameux.h @@ -0,0 +1,733 @@ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.00.0613 */ +/* @@MIDL_FILE_HEADING( ) */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __gameux_h__ +#define __gameux_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IGameExplorer_FWD_DEFINED__ +#define __IGameExplorer_FWD_DEFINED__ +typedef interface IGameExplorer IGameExplorer; + +#endif /* __IGameExplorer_FWD_DEFINED__ */ + + +#ifndef __IGameStatistics_FWD_DEFINED__ +#define __IGameStatistics_FWD_DEFINED__ +typedef interface IGameStatistics IGameStatistics; + +#endif /* __IGameStatistics_FWD_DEFINED__ */ + + +#ifndef __IGameStatisticsMgr_FWD_DEFINED__ +#define __IGameStatisticsMgr_FWD_DEFINED__ +typedef interface IGameStatisticsMgr IGameStatisticsMgr; + +#endif /* __IGameStatisticsMgr_FWD_DEFINED__ */ + + +#ifndef __IGameExplorer2_FWD_DEFINED__ +#define __IGameExplorer2_FWD_DEFINED__ +typedef interface IGameExplorer2 IGameExplorer2; + +#endif /* __IGameExplorer2_FWD_DEFINED__ */ + + +#ifndef __GameExplorer_FWD_DEFINED__ +#define __GameExplorer_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class GameExplorer GameExplorer; +#else +typedef struct GameExplorer GameExplorer; +#endif /* __cplusplus */ + +#endif /* __GameExplorer_FWD_DEFINED__ */ + + +#ifndef __GameStatistics_FWD_DEFINED__ +#define __GameStatistics_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class GameStatistics GameStatistics; +#else +typedef struct GameStatistics GameStatistics; +#endif /* __cplusplus */ + +#endif /* __GameStatistics_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "shobjidl_core.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_gameux_0000_0000 */ +/* [local] */ + +#include +#pragma region Desktop Family +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) +#define ID_GDF_XML __GDF_XML +#define ID_GDF_THUMBNAIL __GDF_THUMBNAIL +#define ID_ICON_ICO __ICON_ICO +#define ID_GDF_XML_STR L"__GDF_XML" +#define ID_GDF_THUMBNAIL_STR L"__GDF_THUMBNAIL" +typedef /* [v1_enum] */ +enum GAME_INSTALL_SCOPE + { + GIS_NOT_INSTALLED = 1, + GIS_CURRENT_USER = 2, + GIS_ALL_USERS = 3 + } GAME_INSTALL_SCOPE; + + + +extern RPC_IF_HANDLE __MIDL_itf_gameux_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_gameux_0000_0000_v0_0_s_ifspec; + +#ifndef __IGameExplorer_INTERFACE_DEFINED__ +#define __IGameExplorer_INTERFACE_DEFINED__ + +/* interface IGameExplorer */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IGameExplorer; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("E7B2FB72-D728-49B3-A5F2-18EBF5F1349E") + IGameExplorer : public IUnknown + { + public: + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE AddGame( + /* [in] */ __RPC__in BSTR bstrGDFBinaryPath, + /* [in] */ __RPC__in BSTR bstrGameInstallDirectory, + /* [in] */ GAME_INSTALL_SCOPE installScope, + /* [out][in] */ __RPC__inout GUID *pguidInstanceID) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE RemoveGame( + /* [in] */ GUID guidInstanceID) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE UpdateGame( + /* [in] */ GUID guidInstanceID) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE VerifyAccess( + /* [in] */ __RPC__in BSTR bstrGDFBinaryPath, + /* [out] */ __RPC__out BOOL *pfHasAccess) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IGameExplorerVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + __RPC__in IGameExplorer * This, + /* [in] */ __RPC__in REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + __RPC__in IGameExplorer * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + __RPC__in IGameExplorer * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddGame )( + __RPC__in IGameExplorer * This, + /* [in] */ __RPC__in BSTR bstrGDFBinaryPath, + /* [in] */ __RPC__in BSTR bstrGameInstallDirectory, + /* [in] */ GAME_INSTALL_SCOPE installScope, + /* [out][in] */ __RPC__inout GUID *pguidInstanceID); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemoveGame )( + __RPC__in IGameExplorer * This, + /* [in] */ GUID guidInstanceID); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *UpdateGame )( + __RPC__in IGameExplorer * This, + /* [in] */ GUID guidInstanceID); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *VerifyAccess )( + __RPC__in IGameExplorer * This, + /* [in] */ __RPC__in BSTR bstrGDFBinaryPath, + /* [out] */ __RPC__out BOOL *pfHasAccess); + + END_INTERFACE + } IGameExplorerVtbl; + + interface IGameExplorer + { + CONST_VTBL struct IGameExplorerVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IGameExplorer_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IGameExplorer_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IGameExplorer_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IGameExplorer_AddGame(This,bstrGDFBinaryPath,bstrGameInstallDirectory,installScope,pguidInstanceID) \ + ( (This)->lpVtbl -> AddGame(This,bstrGDFBinaryPath,bstrGameInstallDirectory,installScope,pguidInstanceID) ) + +#define IGameExplorer_RemoveGame(This,guidInstanceID) \ + ( (This)->lpVtbl -> RemoveGame(This,guidInstanceID) ) + +#define IGameExplorer_UpdateGame(This,guidInstanceID) \ + ( (This)->lpVtbl -> UpdateGame(This,guidInstanceID) ) + +#define IGameExplorer_VerifyAccess(This,bstrGDFBinaryPath,pfHasAccess) \ + ( (This)->lpVtbl -> VerifyAccess(This,bstrGDFBinaryPath,pfHasAccess) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IGameExplorer_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_gameux_0000_0001 */ +/* [local] */ + +typedef /* [v1_enum] */ +enum GAMESTATS_OPEN_TYPE + { + GAMESTATS_OPEN_OPENORCREATE = 0, + GAMESTATS_OPEN_OPENONLY = 1 + } GAMESTATS_OPEN_TYPE; + +typedef /* [v1_enum] */ +enum GAMESTATS_OPEN_RESULT + { + GAMESTATS_OPEN_CREATED = 0, + GAMESTATS_OPEN_OPENED = 1 + } GAMESTATS_OPEN_RESULT; + + + +extern RPC_IF_HANDLE __MIDL_itf_gameux_0000_0001_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_gameux_0000_0001_v0_0_s_ifspec; + +#ifndef __IGameStatistics_INTERFACE_DEFINED__ +#define __IGameStatistics_INTERFACE_DEFINED__ + +/* interface IGameStatistics */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IGameStatistics; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3887C9CA-04A0-42ae-BC4C-5FA6C7721145") + IGameStatistics : public IUnknown + { + public: + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMaxCategoryLength( + /* [retval][out] */ __RPC__out UINT *cch) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMaxNameLength( + /* [retval][out] */ __RPC__out UINT *cch) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMaxValueLength( + /* [retval][out] */ __RPC__out UINT *cch) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMaxCategories( + /* [retval][out] */ __RPC__out WORD *pMax) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMaxStatsPerCategory( + /* [retval][out] */ __RPC__out WORD *pMax) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetCategoryTitle( + /* [in] */ WORD categoryIndex, + /* [string][in] */ __RPC__in_string LPCWSTR title) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetCategoryTitle( + /* [in] */ WORD categoryIndex, + /* [retval][string][out] */ __RPC__deref_out_opt_string LPWSTR *pTitle) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetStatistic( + /* [in] */ WORD categoryIndex, + /* [in] */ WORD statIndex, + /* [string][unique][out][in] */ __RPC__deref_opt_inout_opt_string LPWSTR *pName, + /* [string][unique][out][in] */ __RPC__deref_opt_inout_opt_string LPWSTR *pValue) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetStatistic( + /* [in] */ WORD categoryIndex, + /* [in] */ WORD statIndex, + /* [string][in] */ __RPC__in_string LPCWSTR name, + /* [string][in] */ __RPC__in_string LPCWSTR value) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Save( + /* [in] */ BOOL trackChanges) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetLastPlayedCategory( + /* [in] */ UINT categoryIndex) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetLastPlayedCategory( + /* [retval][out] */ __RPC__out UINT *pCategoryIndex) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IGameStatisticsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + __RPC__in IGameStatistics * This, + /* [in] */ __RPC__in REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + __RPC__in IGameStatistics * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + __RPC__in IGameStatistics * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMaxCategoryLength )( + __RPC__in IGameStatistics * This, + /* [retval][out] */ __RPC__out UINT *cch); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMaxNameLength )( + __RPC__in IGameStatistics * This, + /* [retval][out] */ __RPC__out UINT *cch); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMaxValueLength )( + __RPC__in IGameStatistics * This, + /* [retval][out] */ __RPC__out UINT *cch); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMaxCategories )( + __RPC__in IGameStatistics * This, + /* [retval][out] */ __RPC__out WORD *pMax); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMaxStatsPerCategory )( + __RPC__in IGameStatistics * This, + /* [retval][out] */ __RPC__out WORD *pMax); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetCategoryTitle )( + __RPC__in IGameStatistics * This, + /* [in] */ WORD categoryIndex, + /* [string][in] */ __RPC__in_string LPCWSTR title); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetCategoryTitle )( + __RPC__in IGameStatistics * This, + /* [in] */ WORD categoryIndex, + /* [retval][string][out] */ __RPC__deref_out_opt_string LPWSTR *pTitle); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetStatistic )( + __RPC__in IGameStatistics * This, + /* [in] */ WORD categoryIndex, + /* [in] */ WORD statIndex, + /* [string][unique][out][in] */ __RPC__deref_opt_inout_opt_string LPWSTR *pName, + /* [string][unique][out][in] */ __RPC__deref_opt_inout_opt_string LPWSTR *pValue); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetStatistic )( + __RPC__in IGameStatistics * This, + /* [in] */ WORD categoryIndex, + /* [in] */ WORD statIndex, + /* [string][in] */ __RPC__in_string LPCWSTR name, + /* [string][in] */ __RPC__in_string LPCWSTR value); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Save )( + __RPC__in IGameStatistics * This, + /* [in] */ BOOL trackChanges); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetLastPlayedCategory )( + __RPC__in IGameStatistics * This, + /* [in] */ UINT categoryIndex); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetLastPlayedCategory )( + __RPC__in IGameStatistics * This, + /* [retval][out] */ __RPC__out UINT *pCategoryIndex); + + END_INTERFACE + } IGameStatisticsVtbl; + + interface IGameStatistics + { + CONST_VTBL struct IGameStatisticsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IGameStatistics_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IGameStatistics_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IGameStatistics_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IGameStatistics_GetMaxCategoryLength(This,cch) \ + ( (This)->lpVtbl -> GetMaxCategoryLength(This,cch) ) + +#define IGameStatistics_GetMaxNameLength(This,cch) \ + ( (This)->lpVtbl -> GetMaxNameLength(This,cch) ) + +#define IGameStatistics_GetMaxValueLength(This,cch) \ + ( (This)->lpVtbl -> GetMaxValueLength(This,cch) ) + +#define IGameStatistics_GetMaxCategories(This,pMax) \ + ( (This)->lpVtbl -> GetMaxCategories(This,pMax) ) + +#define IGameStatistics_GetMaxStatsPerCategory(This,pMax) \ + ( (This)->lpVtbl -> GetMaxStatsPerCategory(This,pMax) ) + +#define IGameStatistics_SetCategoryTitle(This,categoryIndex,title) \ + ( (This)->lpVtbl -> SetCategoryTitle(This,categoryIndex,title) ) + +#define IGameStatistics_GetCategoryTitle(This,categoryIndex,pTitle) \ + ( (This)->lpVtbl -> GetCategoryTitle(This,categoryIndex,pTitle) ) + +#define IGameStatistics_GetStatistic(This,categoryIndex,statIndex,pName,pValue) \ + ( (This)->lpVtbl -> GetStatistic(This,categoryIndex,statIndex,pName,pValue) ) + +#define IGameStatistics_SetStatistic(This,categoryIndex,statIndex,name,value) \ + ( (This)->lpVtbl -> SetStatistic(This,categoryIndex,statIndex,name,value) ) + +#define IGameStatistics_Save(This,trackChanges) \ + ( (This)->lpVtbl -> Save(This,trackChanges) ) + +#define IGameStatistics_SetLastPlayedCategory(This,categoryIndex) \ + ( (This)->lpVtbl -> SetLastPlayedCategory(This,categoryIndex) ) + +#define IGameStatistics_GetLastPlayedCategory(This,pCategoryIndex) \ + ( (This)->lpVtbl -> GetLastPlayedCategory(This,pCategoryIndex) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IGameStatistics_INTERFACE_DEFINED__ */ + + +#ifndef __IGameStatisticsMgr_INTERFACE_DEFINED__ +#define __IGameStatisticsMgr_INTERFACE_DEFINED__ + +/* interface IGameStatisticsMgr */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IGameStatisticsMgr; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("AFF3EA11-E70E-407d-95DD-35E612C41CE2") + IGameStatisticsMgr : public IUnknown + { + public: + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetGameStatistics( + /* [string][in] */ __RPC__in_string LPCWSTR GDFBinaryPath, + /* [in] */ GAMESTATS_OPEN_TYPE openType, + /* [out] */ __RPC__out GAMESTATS_OPEN_RESULT *pOpenResult, + /* [retval][out] */ __RPC__deref_out_opt IGameStatistics **ppiStats) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE RemoveGameStatistics( + /* [string][in] */ __RPC__in_string LPCWSTR GDFBinaryPath) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IGameStatisticsMgrVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + __RPC__in IGameStatisticsMgr * This, + /* [in] */ __RPC__in REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + __RPC__in IGameStatisticsMgr * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + __RPC__in IGameStatisticsMgr * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetGameStatistics )( + __RPC__in IGameStatisticsMgr * This, + /* [string][in] */ __RPC__in_string LPCWSTR GDFBinaryPath, + /* [in] */ GAMESTATS_OPEN_TYPE openType, + /* [out] */ __RPC__out GAMESTATS_OPEN_RESULT *pOpenResult, + /* [retval][out] */ __RPC__deref_out_opt IGameStatistics **ppiStats); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemoveGameStatistics )( + __RPC__in IGameStatisticsMgr * This, + /* [string][in] */ __RPC__in_string LPCWSTR GDFBinaryPath); + + END_INTERFACE + } IGameStatisticsMgrVtbl; + + interface IGameStatisticsMgr + { + CONST_VTBL struct IGameStatisticsMgrVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IGameStatisticsMgr_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IGameStatisticsMgr_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IGameStatisticsMgr_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IGameStatisticsMgr_GetGameStatistics(This,GDFBinaryPath,openType,pOpenResult,ppiStats) \ + ( (This)->lpVtbl -> GetGameStatistics(This,GDFBinaryPath,openType,pOpenResult,ppiStats) ) + +#define IGameStatisticsMgr_RemoveGameStatistics(This,GDFBinaryPath) \ + ( (This)->lpVtbl -> RemoveGameStatistics(This,GDFBinaryPath) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IGameStatisticsMgr_INTERFACE_DEFINED__ */ + + +#ifndef __IGameExplorer2_INTERFACE_DEFINED__ +#define __IGameExplorer2_INTERFACE_DEFINED__ + +/* interface IGameExplorer2 */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IGameExplorer2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("86874AA7-A1ED-450d-A7EB-B89E20B2FFF3") + IGameExplorer2 : public IUnknown + { + public: + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE InstallGame( + /* [string][in] */ __RPC__in_string LPCWSTR binaryGDFPath, + /* [unique][in] */ __RPC__in_opt LPCWSTR installDirectory, + /* [in] */ GAME_INSTALL_SCOPE installScope) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE UninstallGame( + /* [string][in] */ __RPC__in_string LPCWSTR binaryGDFPath) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CheckAccess( + /* [string][in] */ __RPC__in_string LPCWSTR binaryGDFPath, + /* [retval][out] */ __RPC__out BOOL *pHasAccess) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IGameExplorer2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + __RPC__in IGameExplorer2 * This, + /* [in] */ __RPC__in REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + __RPC__in IGameExplorer2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + __RPC__in IGameExplorer2 * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *InstallGame )( + __RPC__in IGameExplorer2 * This, + /* [string][in] */ __RPC__in_string LPCWSTR binaryGDFPath, + /* [unique][in] */ __RPC__in_opt LPCWSTR installDirectory, + /* [in] */ GAME_INSTALL_SCOPE installScope); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *UninstallGame )( + __RPC__in IGameExplorer2 * This, + /* [string][in] */ __RPC__in_string LPCWSTR binaryGDFPath); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *CheckAccess )( + __RPC__in IGameExplorer2 * This, + /* [string][in] */ __RPC__in_string LPCWSTR binaryGDFPath, + /* [retval][out] */ __RPC__out BOOL *pHasAccess); + + END_INTERFACE + } IGameExplorer2Vtbl; + + interface IGameExplorer2 + { + CONST_VTBL struct IGameExplorer2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IGameExplorer2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IGameExplorer2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IGameExplorer2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IGameExplorer2_InstallGame(This,binaryGDFPath,installDirectory,installScope) \ + ( (This)->lpVtbl -> InstallGame(This,binaryGDFPath,installDirectory,installScope) ) + +#define IGameExplorer2_UninstallGame(This,binaryGDFPath) \ + ( (This)->lpVtbl -> UninstallGame(This,binaryGDFPath) ) + +#define IGameExplorer2_CheckAccess(This,binaryGDFPath,pHasAccess) \ + ( (This)->lpVtbl -> CheckAccess(This,binaryGDFPath,pHasAccess) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IGameExplorer2_INTERFACE_DEFINED__ */ + + + +#ifndef __gameuxLib_LIBRARY_DEFINED__ +#define __gameuxLib_LIBRARY_DEFINED__ + +/* library gameuxLib */ +/* [helpstring][version][uuid] */ + + +EXTERN_C const IID LIBID_gameuxLib; + +EXTERN_C const CLSID CLSID_GameExplorer; + +#ifdef __cplusplus + +class DECLSPEC_UUID("9A5EA990-3034-4D6F-9128-01F3C61022BC") +GameExplorer; +#endif + +EXTERN_C const CLSID CLSID_GameStatistics; + +#ifdef __cplusplus + +class DECLSPEC_UUID("DBC85A2C-C0DC-4961-B6E2-D28B62C11AD4") +GameStatistics; +#endif +#endif /* __gameuxLib_LIBRARY_DEFINED__ */ + +/* interface __MIDL_itf_gameux_0000_0005 */ +/* [local] */ + +#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +#pragma endregion + + +extern RPC_IF_HANDLE __MIDL_itf_gameux_0000_0005_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_gameux_0000_0005_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +unsigned long __RPC_USER BSTR_UserSize( __RPC__in unsigned long *, unsigned long , __RPC__in BSTR * ); +unsigned char * __RPC_USER BSTR_UserMarshal( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in BSTR * ); +unsigned char * __RPC_USER BSTR_UserUnmarshal(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out BSTR * ); +void __RPC_USER BSTR_UserFree( __RPC__in unsigned long *, __RPC__in BSTR * ); + +unsigned long __RPC_USER BSTR_UserSize64( __RPC__in unsigned long *, unsigned long , __RPC__in BSTR * ); +unsigned char * __RPC_USER BSTR_UserMarshal64( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in BSTR * ); +unsigned char * __RPC_USER BSTR_UserUnmarshal64(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out BSTR * ); +void __RPC_USER BSTR_UserFree64( __RPC__in unsigned long *, __RPC__in BSTR * ); + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/gfx/include/dxsdk/pixplugin.h b/gfx/include/dxsdk/pixplugin.h new file mode 100644 index 0000000000..9c249afc0a --- /dev/null +++ b/gfx/include/dxsdk/pixplugin.h @@ -0,0 +1,120 @@ +//================================================================================================== +// PIXPlugin.h +// +// Microsoft PIX Plugin Header +// +// Copyright (c) Microsoft Corporation, All rights reserved +//================================================================================================== + +#pragma once + +#ifdef __cplusplus +extern "C" +{ +#endif + + +//================================================================================================== +// PIX_PLUGIN_SYSTEM_VERSION - Indicates version of the plugin interface the plugin is built with. +//================================================================================================== +#define PIX_PLUGIN_SYSTEM_VERSION 0x101 + + +//================================================================================================== +// PIXCOUNTERID - A unique identifier for each PIX plugin counter. +//================================================================================================== +typedef int PIXCOUNTERID; + + +//================================================================================================== +// PIXCOUNTERDATATYPE - Indicates what type of data the counter produces. +//================================================================================================== +enum PIXCOUNTERDATATYPE +{ + PCDT_RESERVED, + PCDT_FLOAT, + PCDT_INT, + PCDT_INT64, + PCDT_STRING, +}; + + +//================================================================================================== +// PIXPLUGININFO - This structure is filled out by PIXGetPluginInfo and passed back to PIX. +//================================================================================================== +struct PIXPLUGININFO +{ + // Filled in by caller: + HINSTANCE hinst; + + // Filled in by PIXGetPluginInfo: + WCHAR* pstrPluginName; // Name of plugin + int iPluginVersion; // Version of this particular plugin + int iPluginSystemVersion; // Version of PIX's plugin system this plugin was designed for +}; + + +//================================================================================================== +// PIXCOUNTERINFO - This structure is filled out by PIXGetCounterInfo and passed back to PIX +// to allow PIX to determine information about the counters in the plugin. +//================================================================================================== +struct PIXCOUNTERINFO +{ + PIXCOUNTERID counterID; // Used to uniquely ID this counter + WCHAR* pstrName; // String name of the counter + PIXCOUNTERDATATYPE pcdtDataType; // Data type returned by this counter +}; + + +//================================================================================================== +// PIXGetPluginInfo - This returns basic information about this plugin to PIX. +//================================================================================================== +BOOL WINAPI PIXGetPluginInfo( PIXPLUGININFO* pPIXPluginInfo ); + + +//================================================================================================== +// PIXGetCounterInfo - This returns an array of PIXCOUNTERINFO structs to PIX. +// These PIXCOUNTERINFOs allow PIX to enumerate the counters contained +// in this plugin. +//================================================================================================== +BOOL WINAPI PIXGetCounterInfo( DWORD* pdwReturnCounters, PIXCOUNTERINFO** ppCounterInfoList ); + + +//================================================================================================== +// PIXGetCounterDesc - This is called by PIX to request a description of the indicated counter. +//================================================================================================== +BOOL WINAPI PIXGetCounterDesc( PIXCOUNTERID id, WCHAR** ppstrCounterDesc ); + + +//================================================================================================== +// PIXBeginExperiment - This called by PIX once per counter when instrumentation starts. +//================================================================================================== +BOOL WINAPI PIXBeginExperiment( PIXCOUNTERID id, const WCHAR* pstrApplication ); + + +//================================================================================================== +// PIXEndFrame - This is called by PIX once per counter at the end of each frame to gather the +// counter value for that frame. Note that the pointer to the return data must +// continue to point to valid counter data until the next call to PIXEndFrame (or +// PIXEndExperiment) for the same counter. So do not set *ppReturnData to the same +// pointer for multiple counters, or point to a local variable that will go out of +// scope. See the sample PIX plugin for an example of how to structure a plugin +// properly. +//================================================================================================== +BOOL WINAPI PIXEndFrame( PIXCOUNTERID id, UINT iFrame, DWORD* pdwReturnBytes, BYTE** ppReturnData ); + + +//================================================================================================== +// PIXEndExperiment - This is called by PIX once per counter when instrumentation ends. +//================================================================================================== +BOOL WINAPI PIXEndExperiment( PIXCOUNTERID id ); + + +#ifdef __cplusplus +}; +#endif + +//================================================================================================== +// eof: PIXPlugin.h +//================================================================================================== + diff --git a/gfx/include/dxsdk/rmxfguid.h b/gfx/include/dxsdk/rmxfguid.h new file mode 100644 index 0000000000..d3326ccc9a --- /dev/null +++ b/gfx/include/dxsdk/rmxfguid.h @@ -0,0 +1,223 @@ +/*************************************************************************** + * + * Copyright (C) 1998-1999 Microsoft Corporation. All Rights Reserved. + * + * File: rmxfguid.h + * + * Content: Defines GUIDs of D3DRM's templates. + * + ***************************************************************************/ + +#ifndef __RMXFGUID_H_ +#define __RMXFGUID_H_ + +/* {2B957100-9E9A-11cf-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMInfo, +0x2b957100, 0x9e9a, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {3D82AB44-62DA-11cf-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMMesh, +0x3d82ab44, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {3D82AB5E-62DA-11cf-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMVector, +0x3d82ab5e, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {3D82AB5F-62DA-11cf-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMMeshFace, +0x3d82ab5f, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {3D82AB4D-62DA-11cf-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMMaterial, +0x3d82ab4d, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {35FF44E1-6C7C-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMaterialArray, +0x35ff44e1, 0x6c7c, 0x11cf, 0x8F, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {3D82AB46-62DA-11cf-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMFrame, +0x3d82ab46, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {F6F23F41-7686-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMFrameTransformMatrix, +0xf6f23f41, 0x7686, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {F6F23F42-7686-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMeshMaterialList, +0xf6f23f42, 0x7686, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {F6F23F40-7686-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMeshTextureCoords, +0xf6f23f40, 0x7686, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {F6F23F43-7686-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMeshNormals, +0xf6f23f43, 0x7686, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {F6F23F44-7686-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMCoords2d, +0xf6f23f44, 0x7686, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {F6F23F45-7686-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMatrix4x4, +0xf6f23f45, 0x7686, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {3D82AB4F-62DA-11cf-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMAnimation, +0x3d82ab4f, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {3D82AB50-62DA-11cf-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMAnimationSet, +0x3d82ab50, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {10DD46A8-775B-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMAnimationKey, +0x10dd46a8, 0x775b, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xA3); + +/* {10DD46A9-775B-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMFloatKeys, +0x10dd46a9, 0x775b, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xA3); + +/* {01411840-7786-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMaterialAmbientColor, +0x01411840, 0x7786, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xA3); + +/* {01411841-7786-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMaterialDiffuseColor, +0x01411841, 0x7786, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xA3); + +/* {01411842-7786-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMaterialSpecularColor, +0x01411842, 0x7786, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xA3); + +/* {D3E16E80-7835-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMaterialEmissiveColor, +0xd3e16e80, 0x7835, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {01411843-7786-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMaterialPower, +0x01411843, 0x7786, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xA3); + +/* {35FF44E0-6C7C-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMColorRGBA, +0x35ff44e0, 0x6c7c, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xA3); + +/* {D3E16E81-7835-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMColorRGB, +0xd3e16e81, 0x7835, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {A42790E0-7810-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMGuid, +0xa42790e0, 0x7810, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {A42790E1-7810-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMTextureFilename, +0xa42790e1, 0x7810, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {A42790E2-7810-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMTextureReference, +0xa42790e2, 0x7810, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {1630B820-7842-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMIndexedColor, +0x1630b820, 0x7842, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {1630B821-7842-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMeshVertexColors, +0x1630b821, 0x7842, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {4885AE60-78E8-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMaterialWrap, +0x4885ae60, 0x78e8, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {537DA6A0-CA37-11d0-941C-0080C80CFA7B} */ +DEFINE_GUID(TID_D3DRMBoolean, +0x537da6a0, 0xca37, 0x11d0, 0x94, 0x1c, 0x0, 0x80, 0xc8, 0xc, 0xfa, 0x7b); + +/* {ED1EC5C0-C0A8-11d0-941C-0080C80CFA7B} */ +DEFINE_GUID(TID_D3DRMMeshFaceWraps, +0xed1ec5c0, 0xc0a8, 0x11d0, 0x94, 0x1c, 0x0, 0x80, 0xc8, 0xc, 0xfa, 0x7b); + +/* {4885AE63-78E8-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMBoolean2d, +0x4885ae63, 0x78e8, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {F406B180-7B3B-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMTimedFloatKeys, +0xf406b180, 0x7b3b, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {E2BF56C0-840F-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMAnimationOptions, +0xe2bf56c0, 0x840f, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {E2BF56C1-840F-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMFramePosition, +0xe2bf56c1, 0x840f, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {E2BF56C2-840F-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMFrameVelocity, +0xe2bf56c2, 0x840f, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {E2BF56C3-840F-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMFrameRotation, +0xe2bf56c3, 0x840f, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {3D82AB4A-62DA-11cf-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMLight, +0x3d82ab4a, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {3D82AB51-62DA-11cf-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMCamera, +0x3d82ab51, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {E5745280-B24F-11cf-9DD5-00AA00A71A2F} */ +DEFINE_GUID(TID_D3DRMAppData, +0xe5745280, 0xb24f, 0x11cf, 0x9d, 0xd5, 0x0, 0xaa, 0x0, 0xa7, 0x1a, 0x2f); + +/* {AED22740-B31F-11cf-9DD5-00AA00A71A2F} */ +DEFINE_GUID(TID_D3DRMLightUmbra, +0xaed22740, 0xb31f, 0x11cf, 0x9d, 0xd5, 0x0, 0xaa, 0x0, 0xa7, 0x1a, 0x2f); + +/* {AED22742-B31F-11cf-9DD5-00AA00A71A2F} */ +DEFINE_GUID(TID_D3DRMLightRange, +0xaed22742, 0xb31f, 0x11cf, 0x9d, 0xd5, 0x0, 0xaa, 0x0, 0xa7, 0x1a, 0x2f); + +/* {AED22741-B31F-11cf-9DD5-00AA00A71A2F} */ +DEFINE_GUID(TID_D3DRMLightPenumbra, +0xaed22741, 0xb31f, 0x11cf, 0x9d, 0xd5, 0x0, 0xaa, 0x0, 0xa7, 0x1a, 0x2f); + +/* {A8A98BA0-C5E5-11cf-B941-0080C80CFA7B} */ +DEFINE_GUID(TID_D3DRMLightAttenuation, +0xa8a98ba0, 0xc5e5, 0x11cf, 0xb9, 0x41, 0x0, 0x80, 0xc8, 0xc, 0xfa, 0x7b); + +/* {3A23EEA0-94B1-11d0-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMInlineData, +0x3a23eea0, 0x94b1, 0x11d0, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {3A23EEA1-94B1-11d0-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMUrl, +0x3a23eea1, 0x94b1, 0x11d0, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {8A63C360-997D-11d0-941C-0080C80CFA7B} */ +DEFINE_GUID(TID_D3DRMProgressiveMesh, +0x8A63C360, 0x997D, 0x11d0, 0x94, 0x1C, 0x0, 0x80, 0xC8, 0x0C, 0xFA, 0x7B); + +/* {98116AA0-BDBA-11d1-82C0-00A0C9697271} */ +DEFINE_GUID(TID_D3DRMExternalVisual, +0x98116AA0, 0xBDBA, 0x11d1, 0x82, 0xC0, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x71); + +/* {7F0F21E0-BFE1-11d1-82C0-00A0C9697271} */ +DEFINE_GUID(TID_D3DRMStringProperty, +0x7f0f21e0, 0xbfe1, 0x11d1, 0x82, 0xc0, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x71); + +/* {7F0F21E1-BFE1-11d1-82C0-00A0C9697271} */ +DEFINE_GUID(TID_D3DRMPropertyBag, +0x7f0f21e1, 0xbfe1, 0x11d1, 0x82, 0xc0, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x71); + +// {7F5D5EA0-D53A-11d1-82C0-00A0C9697271} +DEFINE_GUID(TID_D3DRMRightHanded, +0x7f5d5ea0, 0xd53a, 0x11d1, 0x82, 0xc0, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x71); + +#endif /* __RMXFGUID_H_ */ + diff --git a/gfx/include/dxsdk/rmxftmpl.h b/gfx/include/dxsdk/rmxftmpl.h new file mode 100644 index 0000000000..e0018d0461 --- /dev/null +++ b/gfx/include/dxsdk/rmxftmpl.h @@ -0,0 +1,339 @@ +/* D3DRM XFile templates in binary form */ + +#ifndef _RMXFTMPL_H_ +#define _RMXFTMPL_H_ + +unsigned char D3DRM_XTEMPLATES[] = { + 0x78, 0x6f, 0x66, 0x20, 0x30, 0x33, 0x30, 0x32, 0x62, + 0x69, 0x6e, 0x20, 0x30, 0x30, 0x36, 0x34, 0x1f, 0, 0x1, + 0, 0x6, 0, 0, 0, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0xa, 0, 0x5, 0, 0x43, 0xab, 0x82, 0x3d, 0xda, + 0x62, 0xcf, 0x11, 0xab, 0x39, 0, 0x20, 0xaf, 0x71, 0xe4, + 0x33, 0x28, 0, 0x1, 0, 0x5, 0, 0, 0, 0x6d, + 0x61, 0x6a, 0x6f, 0x72, 0x14, 0, 0x28, 0, 0x1, 0, + 0x5, 0, 0, 0, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x14, + 0, 0x29, 0, 0x1, 0, 0x5, 0, 0, 0, 0x66, + 0x6c, 0x61, 0x67, 0x73, 0x14, 0, 0xb, 0, 0x1f, 0, + 0x1, 0, 0x6, 0, 0, 0, 0x56, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0xa, 0, 0x5, 0, 0x5e, 0xab, 0x82, 0x3d, + 0xda, 0x62, 0xcf, 0x11, 0xab, 0x39, 0, 0x20, 0xaf, 0x71, + 0xe4, 0x33, 0x2a, 0, 0x1, 0, 0x1, 0, 0, 0, + 0x78, 0x14, 0, 0x2a, 0, 0x1, 0, 0x1, 0, 0, + 0, 0x79, 0x14, 0, 0x2a, 0, 0x1, 0, 0x1, 0, + 0, 0, 0x7a, 0x14, 0, 0xb, 0, 0x1f, 0, 0x1, + 0, 0x8, 0, 0, 0, 0x43, 0x6f, 0x6f, 0x72, 0x64, + 0x73, 0x32, 0x64, 0xa, 0, 0x5, 0, 0x44, 0x3f, 0xf2, + 0xf6, 0x86, 0x76, 0xcf, 0x11, 0x8f, 0x52, 0, 0x40, 0x33, + 0x35, 0x94, 0xa3, 0x2a, 0, 0x1, 0, 0x1, 0, 0, + 0, 0x75, 0x14, 0, 0x2a, 0, 0x1, 0, 0x1, 0, + 0, 0, 0x76, 0x14, 0, 0xb, 0, 0x1f, 0, 0x1, + 0, 0x9, 0, 0, 0, 0x4d, 0x61, 0x74, 0x72, 0x69, + 0x78, 0x34, 0x78, 0x34, 0xa, 0, 0x5, 0, 0x45, 0x3f, + 0xf2, 0xf6, 0x86, 0x76, 0xcf, 0x11, 0x8f, 0x52, 0, 0x40, + 0x33, 0x35, 0x94, 0xa3, 0x34, 0, 0x2a, 0, 0x1, 0, + 0x6, 0, 0, 0, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, + 0xe, 0, 0x3, 0, 0x10, 0, 0, 0, 0xf, 0, + 0x14, 0, 0xb, 0, 0x1f, 0, 0x1, 0, 0x9, 0, + 0, 0, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x47, 0x42, + 0x41, 0xa, 0, 0x5, 0, 0xe0, 0x44, 0xff, 0x35, 0x7c, + 0x6c, 0xcf, 0x11, 0x8f, 0x52, 0, 0x40, 0x33, 0x35, 0x94, + 0xa3, 0x2a, 0, 0x1, 0, 0x3, 0, 0, 0, 0x72, + 0x65, 0x64, 0x14, 0, 0x2a, 0, 0x1, 0, 0x5, 0, + 0, 0, 0x67, 0x72, 0x65, 0x65, 0x6e, 0x14, 0, 0x2a, + 0, 0x1, 0, 0x4, 0, 0, 0, 0x62, 0x6c, 0x75, + 0x65, 0x14, 0, 0x2a, 0, 0x1, 0, 0x5, 0, 0, + 0, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x14, 0, 0xb, 0, + 0x1f, 0, 0x1, 0, 0x8, 0, 0, 0, 0x43, 0x6f, + 0x6c, 0x6f, 0x72, 0x52, 0x47, 0x42, 0xa, 0, 0x5, 0, + 0x81, 0x6e, 0xe1, 0xd3, 0x35, 0x78, 0xcf, 0x11, 0x8f, 0x52, + 0, 0x40, 0x33, 0x35, 0x94, 0xa3, 0x2a, 0, 0x1, 0, + 0x3, 0, 0, 0, 0x72, 0x65, 0x64, 0x14, 0, 0x2a, + 0, 0x1, 0, 0x5, 0, 0, 0, 0x67, 0x72, 0x65, + 0x65, 0x6e, 0x14, 0, 0x2a, 0, 0x1, 0, 0x4, 0, + 0, 0, 0x62, 0x6c, 0x75, 0x65, 0x14, 0, 0xb, 0, + 0x1f, 0, 0x1, 0, 0xc, 0, 0, 0, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x65, 0x64, 0x43, 0x6f, 0x6c, 0x6f, 0x72, + 0xa, 0, 0x5, 0, 0x20, 0xb8, 0x30, 0x16, 0x42, 0x78, + 0xcf, 0x11, 0x8f, 0x52, 0, 0x40, 0x33, 0x35, 0x94, 0xa3, + 0x29, 0, 0x1, 0, 0x5, 0, 0, 0, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x14, 0, 0x1, 0, 0x9, 0, 0, + 0, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x47, 0x42, 0x41, + 0x1, 0, 0xa, 0, 0, 0, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x14, 0, 0xb, 0, + 0x1f, 0, 0x1, 0, 0x7, 0, 0, 0, 0x42, 0x6f, + 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0xa, 0, 0x5, 0, 0xa0, + 0xa6, 0x7d, 0x53, 0x37, 0xca, 0xd0, 0x11, 0x94, 0x1c, 0, + 0x80, 0xc8, 0xc, 0xfa, 0x7b, 0x29, 0, 0x1, 0, 0x9, + 0, 0, 0, 0x74, 0x72, 0x75, 0x65, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x14, 0, 0xb, 0, 0x1f, 0, 0x1, 0, + 0x9, 0, 0, 0, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, + 0x6e, 0x32, 0x64, 0xa, 0, 0x5, 0, 0x63, 0xae, 0x85, + 0x48, 0xe8, 0x78, 0xcf, 0x11, 0x8f, 0x52, 0, 0x40, 0x33, + 0x35, 0x94, 0xa3, 0x1, 0, 0x7, 0, 0, 0, 0x42, + 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x1, 0, 0x1, 0, + 0, 0, 0x75, 0x14, 0, 0x1, 0, 0x7, 0, 0, + 0, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x1, 0, + 0x1, 0, 0, 0, 0x76, 0x14, 0, 0xb, 0, 0x1f, + 0, 0x1, 0, 0xc, 0, 0, 0, 0x4d, 0x61, 0x74, + 0x65, 0x72, 0x69, 0x61, 0x6c, 0x57, 0x72, 0x61, 0x70, 0xa, + 0, 0x5, 0, 0x60, 0xae, 0x85, 0x48, 0xe8, 0x78, 0xcf, + 0x11, 0x8f, 0x52, 0, 0x40, 0x33, 0x35, 0x94, 0xa3, 0x1, + 0, 0x7, 0, 0, 0, 0x42, 0x6f, 0x6f, 0x6c, 0x65, + 0x61, 0x6e, 0x1, 0, 0x1, 0, 0, 0, 0x75, 0x14, + 0, 0x1, 0, 0x7, 0, 0, 0, 0x42, 0x6f, 0x6f, + 0x6c, 0x65, 0x61, 0x6e, 0x1, 0, 0x1, 0, 0, 0, + 0x76, 0x14, 0, 0xb, 0, 0x1f, 0, 0x1, 0, 0xf, + 0, 0, 0, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, + 0x46, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0xa, 0, + 0x5, 0, 0xe1, 0x90, 0x27, 0xa4, 0x10, 0x78, 0xcf, 0x11, + 0x8f, 0x52, 0, 0x40, 0x33, 0x35, 0x94, 0xa3, 0x31, 0, + 0x1, 0, 0x8, 0, 0, 0, 0x66, 0x69, 0x6c, 0x65, + 0x6e, 0x61, 0x6d, 0x65, 0x14, 0, 0xb, 0, 0x1f, 0, + 0x1, 0, 0x8, 0, 0, 0, 0x4d, 0x61, 0x74, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0xa, 0, 0x5, 0, 0x4d, 0xab, + 0x82, 0x3d, 0xda, 0x62, 0xcf, 0x11, 0xab, 0x39, 0, 0x20, + 0xaf, 0x71, 0xe4, 0x33, 0x1, 0, 0x9, 0, 0, 0, + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x47, 0x42, 0x41, 0x1, + 0, 0x9, 0, 0, 0, 0x66, 0x61, 0x63, 0x65, 0x43, + 0x6f, 0x6c, 0x6f, 0x72, 0x14, 0, 0x2a, 0, 0x1, 0, + 0x5, 0, 0, 0, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x14, + 0, 0x1, 0, 0x8, 0, 0, 0, 0x43, 0x6f, 0x6c, + 0x6f, 0x72, 0x52, 0x47, 0x42, 0x1, 0, 0xd, 0, 0, + 0, 0x73, 0x70, 0x65, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x43, + 0x6f, 0x6c, 0x6f, 0x72, 0x14, 0, 0x1, 0, 0x8, 0, + 0, 0, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x47, 0x42, + 0x1, 0, 0xd, 0, 0, 0, 0x65, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x14, + 0, 0xe, 0, 0x12, 0, 0x12, 0, 0x12, 0, 0xf, + 0, 0xb, 0, 0x1f, 0, 0x1, 0, 0x8, 0, 0, + 0, 0x4d, 0x65, 0x73, 0x68, 0x46, 0x61, 0x63, 0x65, 0xa, + 0, 0x5, 0, 0x5f, 0xab, 0x82, 0x3d, 0xda, 0x62, 0xcf, + 0x11, 0xab, 0x39, 0, 0x20, 0xaf, 0x71, 0xe4, 0x33, 0x29, + 0, 0x1, 0, 0x12, 0, 0, 0, 0x6e, 0x46, 0x61, + 0x63, 0x65, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, 0x6e, + 0x64, 0x69, 0x63, 0x65, 0x73, 0x14, 0, 0x34, 0, 0x29, + 0, 0x1, 0, 0x11, 0, 0, 0, 0x66, 0x61, 0x63, + 0x65, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, 0x6e, 0x64, + 0x69, 0x63, 0x65, 0x73, 0xe, 0, 0x1, 0, 0x12, 0, + 0, 0, 0x6e, 0x46, 0x61, 0x63, 0x65, 0x56, 0x65, 0x72, + 0x74, 0x65, 0x78, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, + 0xf, 0, 0x14, 0, 0xb, 0, 0x1f, 0, 0x1, 0, + 0xd, 0, 0, 0, 0x4d, 0x65, 0x73, 0x68, 0x46, 0x61, + 0x63, 0x65, 0x57, 0x72, 0x61, 0x70, 0x73, 0xa, 0, 0x5, + 0, 0xc0, 0xc5, 0x1e, 0xed, 0xa8, 0xc0, 0xd0, 0x11, 0x94, + 0x1c, 0, 0x80, 0xc8, 0xc, 0xfa, 0x7b, 0x29, 0, 0x1, + 0, 0xf, 0, 0, 0, 0x6e, 0x46, 0x61, 0x63, 0x65, + 0x57, 0x72, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x14, 0, 0x34, 0, 0x1, 0, 0x9, 0, 0, 0, + 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x32, 0x64, 0x1, + 0, 0xe, 0, 0, 0, 0x66, 0x61, 0x63, 0x65, 0x57, + 0x72, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0xe, + 0, 0x1, 0, 0xf, 0, 0, 0, 0x6e, 0x46, 0x61, + 0x63, 0x65, 0x57, 0x72, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0xf, 0, 0x14, 0, 0xb, 0, 0x1f, 0, + 0x1, 0, 0x11, 0, 0, 0, 0x4d, 0x65, 0x73, 0x68, + 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6f, + 0x72, 0x64, 0x73, 0xa, 0, 0x5, 0, 0x40, 0x3f, 0xf2, + 0xf6, 0x86, 0x76, 0xcf, 0x11, 0x8f, 0x52, 0, 0x40, 0x33, + 0x35, 0x94, 0xa3, 0x29, 0, 0x1, 0, 0xe, 0, 0, + 0, 0x6e, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, + 0x6f, 0x6f, 0x72, 0x64, 0x73, 0x14, 0, 0x34, 0, 0x1, + 0, 0x8, 0, 0, 0, 0x43, 0x6f, 0x6f, 0x72, 0x64, + 0x73, 0x32, 0x64, 0x1, 0, 0xd, 0, 0, 0, 0x74, + 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6f, 0x72, + 0x64, 0x73, 0xe, 0, 0x1, 0, 0xe, 0, 0, 0, + 0x6e, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, + 0x6f, 0x72, 0x64, 0x73, 0xf, 0, 0x14, 0, 0xb, 0, + 0x1f, 0, 0x1, 0, 0x10, 0, 0, 0, 0x4d, 0x65, + 0x73, 0x68, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, + 0x4c, 0x69, 0x73, 0x74, 0xa, 0, 0x5, 0, 0x42, 0x3f, + 0xf2, 0xf6, 0x86, 0x76, 0xcf, 0x11, 0x8f, 0x52, 0, 0x40, + 0x33, 0x35, 0x94, 0xa3, 0x29, 0, 0x1, 0, 0xa, 0, + 0, 0, 0x6e, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, + 0x6c, 0x73, 0x14, 0, 0x29, 0, 0x1, 0, 0xc, 0, + 0, 0, 0x6e, 0x46, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x65, 0x73, 0x14, 0, 0x34, 0, 0x29, 0, + 0x1, 0, 0xb, 0, 0, 0, 0x66, 0x61, 0x63, 0x65, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0xe, 0, 0x1, + 0, 0xc, 0, 0, 0, 0x6e, 0x46, 0x61, 0x63, 0x65, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0xf, 0, 0x14, + 0, 0xe, 0, 0x1, 0, 0x8, 0, 0, 0, 0x4d, + 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0xf, 0, 0xb, + 0, 0x1f, 0, 0x1, 0, 0xb, 0, 0, 0, 0x4d, + 0x65, 0x73, 0x68, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x73, + 0xa, 0, 0x5, 0, 0x43, 0x3f, 0xf2, 0xf6, 0x86, 0x76, + 0xcf, 0x11, 0x8f, 0x52, 0, 0x40, 0x33, 0x35, 0x94, 0xa3, + 0x29, 0, 0x1, 0, 0x8, 0, 0, 0, 0x6e, 0x4e, + 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x73, 0x14, 0, 0x34, 0, + 0x1, 0, 0x6, 0, 0, 0, 0x56, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x1, 0, 0x7, 0, 0, 0, 0x6e, 0x6f, + 0x72, 0x6d, 0x61, 0x6c, 0x73, 0xe, 0, 0x1, 0, 0x8, + 0, 0, 0, 0x6e, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, + 0x73, 0xf, 0, 0x14, 0, 0x29, 0, 0x1, 0, 0xc, + 0, 0, 0, 0x6e, 0x46, 0x61, 0x63, 0x65, 0x4e, 0x6f, + 0x72, 0x6d, 0x61, 0x6c, 0x73, 0x14, 0, 0x34, 0, 0x1, + 0, 0x8, 0, 0, 0, 0x4d, 0x65, 0x73, 0x68, 0x46, + 0x61, 0x63, 0x65, 0x1, 0, 0xb, 0, 0, 0, 0x66, + 0x61, 0x63, 0x65, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x73, + 0xe, 0, 0x1, 0, 0xc, 0, 0, 0, 0x6e, 0x46, + 0x61, 0x63, 0x65, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x73, + 0xf, 0, 0x14, 0, 0xb, 0, 0x1f, 0, 0x1, 0, + 0x10, 0, 0, 0, 0x4d, 0x65, 0x73, 0x68, 0x56, 0x65, + 0x72, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x73, + 0xa, 0, 0x5, 0, 0x21, 0xb8, 0x30, 0x16, 0x42, 0x78, + 0xcf, 0x11, 0x8f, 0x52, 0, 0x40, 0x33, 0x35, 0x94, 0xa3, + 0x29, 0, 0x1, 0, 0xd, 0, 0, 0, 0x6e, 0x56, + 0x65, 0x72, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, + 0x73, 0x14, 0, 0x34, 0, 0x1, 0, 0xc, 0, 0, + 0, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x43, 0x6f, + 0x6c, 0x6f, 0x72, 0x1, 0, 0xc, 0, 0, 0, 0x76, + 0x65, 0x72, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, + 0x73, 0xe, 0, 0x1, 0, 0xd, 0, 0, 0, 0x6e, + 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, + 0x72, 0x73, 0xf, 0, 0x14, 0, 0xb, 0, 0x1f, 0, + 0x1, 0, 0x4, 0, 0, 0, 0x4d, 0x65, 0x73, 0x68, + 0xa, 0, 0x5, 0, 0x44, 0xab, 0x82, 0x3d, 0xda, 0x62, + 0xcf, 0x11, 0xab, 0x39, 0, 0x20, 0xaf, 0x71, 0xe4, 0x33, + 0x29, 0, 0x1, 0, 0x9, 0, 0, 0, 0x6e, 0x56, + 0x65, 0x72, 0x74, 0x69, 0x63, 0x65, 0x73, 0x14, 0, 0x34, + 0, 0x1, 0, 0x6, 0, 0, 0, 0x56, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x1, 0, 0x8, 0, 0, 0, 0x76, + 0x65, 0x72, 0x74, 0x69, 0x63, 0x65, 0x73, 0xe, 0, 0x1, + 0, 0x9, 0, 0, 0, 0x6e, 0x56, 0x65, 0x72, 0x74, + 0x69, 0x63, 0x65, 0x73, 0xf, 0, 0x14, 0, 0x29, 0, + 0x1, 0, 0x6, 0, 0, 0, 0x6e, 0x46, 0x61, 0x63, + 0x65, 0x73, 0x14, 0, 0x34, 0, 0x1, 0, 0x8, 0, + 0, 0, 0x4d, 0x65, 0x73, 0x68, 0x46, 0x61, 0x63, 0x65, + 0x1, 0, 0x5, 0, 0, 0, 0x66, 0x61, 0x63, 0x65, + 0x73, 0xe, 0, 0x1, 0, 0x6, 0, 0, 0, 0x6e, + 0x46, 0x61, 0x63, 0x65, 0x73, 0xf, 0, 0x14, 0, 0xe, + 0, 0x12, 0, 0x12, 0, 0x12, 0, 0xf, 0, 0xb, + 0, 0x1f, 0, 0x1, 0, 0x14, 0, 0, 0, 0x46, + 0x72, 0x61, 0x6d, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x6f, 0x72, 0x6d, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0xa, + 0, 0x5, 0, 0x41, 0x3f, 0xf2, 0xf6, 0x86, 0x76, 0xcf, + 0x11, 0x8f, 0x52, 0, 0x40, 0x33, 0x35, 0x94, 0xa3, 0x1, + 0, 0x9, 0, 0, 0, 0x4d, 0x61, 0x74, 0x72, 0x69, + 0x78, 0x34, 0x78, 0x34, 0x1, 0, 0xb, 0, 0, 0, + 0x66, 0x72, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x72, 0x69, + 0x78, 0x14, 0, 0xb, 0, 0x1f, 0, 0x1, 0, 0x5, + 0, 0, 0, 0x46, 0x72, 0x61, 0x6d, 0x65, 0xa, 0, + 0x5, 0, 0x46, 0xab, 0x82, 0x3d, 0xda, 0x62, 0xcf, 0x11, + 0xab, 0x39, 0, 0x20, 0xaf, 0x71, 0xe4, 0x33, 0xe, 0, + 0x12, 0, 0x12, 0, 0x12, 0, 0xf, 0, 0xb, 0, + 0x1f, 0, 0x1, 0, 0x9, 0, 0, 0, 0x46, 0x6c, + 0x6f, 0x61, 0x74, 0x4b, 0x65, 0x79, 0x73, 0xa, 0, 0x5, + 0, 0xa9, 0x46, 0xdd, 0x10, 0x5b, 0x77, 0xcf, 0x11, 0x8f, + 0x52, 0, 0x40, 0x33, 0x35, 0x94, 0xa3, 0x29, 0, 0x1, + 0, 0x7, 0, 0, 0, 0x6e, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x14, 0, 0x34, 0, 0x2a, 0, 0x1, 0, + 0x6, 0, 0, 0, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0xe, 0, 0x1, 0, 0x7, 0, 0, 0, 0x6e, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0xf, 0, 0x14, 0, 0xb, + 0, 0x1f, 0, 0x1, 0, 0xe, 0, 0, 0, 0x54, + 0x69, 0x6d, 0x65, 0x64, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x4b, + 0x65, 0x79, 0x73, 0xa, 0, 0x5, 0, 0x80, 0xb1, 0x6, + 0xf4, 0x3b, 0x7b, 0xcf, 0x11, 0x8f, 0x52, 0, 0x40, 0x33, + 0x35, 0x94, 0xa3, 0x29, 0, 0x1, 0, 0x4, 0, 0, + 0, 0x74, 0x69, 0x6d, 0x65, 0x14, 0, 0x1, 0, 0x9, + 0, 0, 0, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x4b, 0x65, + 0x79, 0x73, 0x1, 0, 0x6, 0, 0, 0, 0x74, 0x66, + 0x6b, 0x65, 0x79, 0x73, 0x14, 0, 0xb, 0, 0x1f, 0, + 0x1, 0, 0xc, 0, 0, 0, 0x41, 0x6e, 0x69, 0x6d, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0xa, 0, + 0x5, 0, 0xa8, 0x46, 0xdd, 0x10, 0x5b, 0x77, 0xcf, 0x11, + 0x8f, 0x52, 0, 0x40, 0x33, 0x35, 0x94, 0xa3, 0x29, 0, + 0x1, 0, 0x7, 0, 0, 0, 0x6b, 0x65, 0x79, 0x54, + 0x79, 0x70, 0x65, 0x14, 0, 0x29, 0, 0x1, 0, 0x5, + 0, 0, 0, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x14, 0, + 0x34, 0, 0x1, 0, 0xe, 0, 0, 0, 0x54, 0x69, + 0x6d, 0x65, 0x64, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x4b, 0x65, + 0x79, 0x73, 0x1, 0, 0x4, 0, 0, 0, 0x6b, 0x65, + 0x79, 0x73, 0xe, 0, 0x1, 0, 0x5, 0, 0, 0, + 0x6e, 0x4b, 0x65, 0x79, 0x73, 0xf, 0, 0x14, 0, 0xb, + 0, 0x1f, 0, 0x1, 0, 0x10, 0, 0, 0, 0x41, + 0x6e, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa, 0, 0x5, 0, 0xc0, + 0x56, 0xbf, 0xe2, 0xf, 0x84, 0xcf, 0x11, 0x8f, 0x52, 0, + 0x40, 0x33, 0x35, 0x94, 0xa3, 0x29, 0, 0x1, 0, 0xa, + 0, 0, 0, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, + 0x73, 0x65, 0x64, 0x14, 0, 0x29, 0, 0x1, 0, 0xf, + 0, 0, 0, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x14, 0, + 0xb, 0, 0x1f, 0, 0x1, 0, 0x9, 0, 0, 0, + 0x41, 0x6e, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa, + 0, 0x5, 0, 0x4f, 0xab, 0x82, 0x3d, 0xda, 0x62, 0xcf, + 0x11, 0xab, 0x39, 0, 0x20, 0xaf, 0x71, 0xe4, 0x33, 0xe, + 0, 0x12, 0, 0x12, 0, 0x12, 0, 0xf, 0, 0xb, + 0, 0x1f, 0, 0x1, 0, 0xc, 0, 0, 0, 0x41, + 0x6e, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0xa, 0, 0x5, 0, 0x50, 0xab, 0x82, 0x3d, 0xda, + 0x62, 0xcf, 0x11, 0xab, 0x39, 0, 0x20, 0xaf, 0x71, 0xe4, + 0x33, 0xe, 0, 0x1, 0, 0x9, 0, 0, 0, 0x41, + 0x6e, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xf, 0, + 0xb, 0, 0x1f, 0, 0x1, 0, 0xa, 0, 0, 0, + 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, + 0xa, 0, 0x5, 0, 0xa0, 0xee, 0x23, 0x3a, 0xb1, 0x94, + 0xd0, 0x11, 0xab, 0x39, 0, 0x20, 0xaf, 0x71, 0xe4, 0x33, + 0xe, 0, 0x1, 0, 0x6, 0, 0, 0, 0x42, 0x49, + 0x4e, 0x41, 0x52, 0x59, 0xf, 0, 0xb, 0, 0x1f, 0, + 0x1, 0, 0x3, 0, 0, 0, 0x55, 0x72, 0x6c, 0xa, + 0, 0x5, 0, 0xa1, 0xee, 0x23, 0x3a, 0xb1, 0x94, 0xd0, + 0x11, 0xab, 0x39, 0, 0x20, 0xaf, 0x71, 0xe4, 0x33, 0x29, + 0, 0x1, 0, 0x5, 0, 0, 0, 0x6e, 0x55, 0x72, + 0x6c, 0x73, 0x14, 0, 0x34, 0, 0x31, 0, 0x1, 0, + 0x4, 0, 0, 0, 0x75, 0x72, 0x6c, 0x73, 0xe, 0, + 0x1, 0, 0x5, 0, 0, 0, 0x6e, 0x55, 0x72, 0x6c, + 0x73, 0xf, 0, 0x14, 0, 0xb, 0, 0x1f, 0, 0x1, + 0, 0xf, 0, 0, 0, 0x50, 0x72, 0x6f, 0x67, 0x72, + 0x65, 0x73, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x68, + 0xa, 0, 0x5, 0, 0x60, 0xc3, 0x63, 0x8a, 0x7d, 0x99, + 0xd0, 0x11, 0x94, 0x1c, 0, 0x80, 0xc8, 0xc, 0xfa, 0x7b, + 0xe, 0, 0x1, 0, 0x3, 0, 0, 0, 0x55, 0x72, + 0x6c, 0x13, 0, 0x1, 0, 0xa, 0, 0, 0, 0x49, + 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, 0xf, + 0, 0xb, 0, 0x1f, 0, 0x1, 0, 0x4, 0, 0, + 0, 0x47, 0x75, 0x69, 0x64, 0xa, 0, 0x5, 0, 0xe0, + 0x90, 0x27, 0xa4, 0x10, 0x78, 0xcf, 0x11, 0x8f, 0x52, 0, + 0x40, 0x33, 0x35, 0x94, 0xa3, 0x29, 0, 0x1, 0, 0x5, + 0, 0, 0, 0x64, 0x61, 0x74, 0x61, 0x31, 0x14, 0, + 0x28, 0, 0x1, 0, 0x5, 0, 0, 0, 0x64, 0x61, + 0x74, 0x61, 0x32, 0x14, 0, 0x28, 0, 0x1, 0, 0x5, + 0, 0, 0, 0x64, 0x61, 0x74, 0x61, 0x33, 0x14, 0, + 0x34, 0, 0x2d, 0, 0x1, 0, 0x5, 0, 0, 0, + 0x64, 0x61, 0x74, 0x61, 0x34, 0xe, 0, 0x3, 0, 0x8, + 0, 0, 0, 0xf, 0, 0x14, 0, 0xb, 0, 0x1f, + 0, 0x1, 0, 0xe, 0, 0, 0, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x79, 0xa, 0, 0x5, 0, 0xe0, 0x21, 0xf, 0x7f, 0xe1, + 0xbf, 0xd1, 0x11, 0x82, 0xc0, 0, 0xa0, 0xc9, 0x69, 0x72, + 0x71, 0x31, 0, 0x1, 0, 0x3, 0, 0, 0, 0x6b, + 0x65, 0x79, 0x14, 0, 0x31, 0, 0x1, 0, 0x5, 0, + 0, 0, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x14, 0, 0xb, + 0, 0x1f, 0, 0x1, 0, 0xb, 0, 0, 0, 0x50, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x42, 0x61, 0x67, + 0xa, 0, 0x5, 0, 0xe1, 0x21, 0xf, 0x7f, 0xe1, 0xbf, + 0xd1, 0x11, 0x82, 0xc0, 0, 0xa0, 0xc9, 0x69, 0x72, 0x71, + 0xe, 0, 0x1, 0, 0xe, 0, 0, 0, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0xf, 0, 0xb, 0, 0x1f, 0, 0x1, 0, + 0xe, 0, 0, 0, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0xa, 0, + 0x5, 0, 0xa0, 0x6a, 0x11, 0x98, 0xba, 0xbd, 0xd1, 0x11, + 0x82, 0xc0, 0, 0xa0, 0xc9, 0x69, 0x72, 0x71, 0x1, 0, + 0x4, 0, 0, 0, 0x47, 0x75, 0x69, 0x64, 0x1, 0, + 0x12, 0, 0, 0, 0x67, 0x75, 0x69, 0x64, 0x45, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x56, 0x69, 0x73, 0x75, + 0x61, 0x6c, 0x14, 0, 0xe, 0, 0x12, 0, 0x12, 0, + 0x12, 0, 0xf, 0, 0xb, 0, 0x1f, 0, 0x1, 0, + 0xb, 0, 0, 0, 0x52, 0x69, 0x67, 0x68, 0x74, 0x48, + 0x61, 0x6e, 0x64, 0x65, 0x64, 0xa, 0, 0x5, 0, 0xa0, + 0x5e, 0x5d, 0x7f, 0x3a, 0xd5, 0xd1, 0x11, 0x82, 0xc0, 0, + 0xa0, 0xc9, 0x69, 0x72, 0x71, 0x29, 0, 0x1, 0, 0xc, + 0, 0, 0, 0x62, 0x52, 0x69, 0x67, 0x68, 0x74, 0x48, + 0x61, 0x6e, 0x64, 0x65, 0x64, 0x14, 0, 0xb, 0 +}; + +#define D3DRM_XTEMPLATE_BYTES 3278 + +#endif /* _RMXFTMPL_H_ */ diff --git a/gfx/include/dxsdk/rpcsal.h b/gfx/include/dxsdk/rpcsal.h new file mode 100644 index 0000000000..7e6c69c245 --- /dev/null +++ b/gfx/include/dxsdk/rpcsal.h @@ -0,0 +1,330 @@ +/****************************************************************\ +* * +* rpcsal.h - markers for documenting the semantics of RPC APIs * +* * +* Version 1.0 * +* * +* Copyright (c) 2004 Microsoft Corporation. All rights reserved. * +* * +\****************************************************************/ + +// ------------------------------------------------------------------------------- +// Introduction +// +// rpcsal.h provides a set of annotations to describe how RPC functions use their +// parameters - the assumptions it makes about them, adn the guarantees it makes +// upon finishing. These annotations are similar to those found in specstrings.h, +// but are designed to be used by the MIDL compiler when it generates annotations +// enabled header files. +// +// IDL authors do not need to annotate their functions declarations. The MIDL compiler +// will interpret the IDL directives and use one of the annotations contained +// in this header. This documentation is intended to help those trying to understand +// the MIDL-generated header files or those who maintain their own copies of these files. +// +// ------------------------------------------------------------------------------- +// Differences between rpcsal.h and specstrings.h +// +// There are a few important differences between the annotations found in rpcsal.h and +// those in specstrings.h: +// +// 1. [in] parameters are not marked as read-only. They may be used for scratch space +// at the server and changes will not affect the client. +// 2. String versions of each macro alleviates the need for a special type definition +// +// ------------------------------------------------------------------------------- +// Interpreting RPC Annotations +// +// These annotations are interpreted precisely in the same way as those in specstrings.h. +// Please refer to that header for information related to general usage in annotations. +// +// To construct an RPC annotation, concatenate the appropriate value from each category +// along with a leading __RPC_. A typical annotation looks like "__RPC__in_string". +// +// |----------------------------------------------------------------------------------| +// | RPC Annotations | +// |------------|------------|---------|--------|----------|----------|---------------| +// | Level | Usage | Size | Output | Optional | String | Parameters | +// |------------|------------|---------|--------|----------|----------|---------------| +// | <> | <> | <> | <> | <> | <> | <> | +// | _deref | _in | _ecount | _full | _opt | _string | (size) | +// | _deref_opt | _out | _bcount | _part | | | (size,length) | +// | | _inout | | | | | | +// | | | | | | | | +// |------------|------------|---------|--------|----------|----------|---------------| +// +// Level: Describes the buffer pointer's level of indirection from the parameter or +// return value 'p'. +// +// <> : p is the buffer pointer. +// _deref : *p is the buffer pointer. p must not be NULL. +// _deref_opt : *p may be the buffer pointer. p may be NULL, in which case the rest of +// the annotation is ignored. +// +// Usage: Describes how the function uses the buffer. +// +// <> : The buffer is not accessed. If used on the return value or with _deref, the +// function will provide the buffer, and it will be uninitialized at exit. +// Otherwise, the caller must provide the buffer. This should only be used +// for alloc and free functions. +// _in : The function will only read from the buffer. The caller must provide the +// buffer and initialize it. Cannot be used with _deref. +// _out : The function will only write to the buffer. If used on the return value or +// with _deref, the function will provide the buffer and initialize it. +// Otherwise, the caller must provide the buffer, and the function will +// initialize it. +// _inout : The function may freely read from and write to the buffer. The caller must +// provide the buffer and initialize it. If used with _deref, the buffer may +// be reallocated by the function. +// +// Size: Describes the total size of the buffer. This may be less than the space actually +// allocated for the buffer, in which case it describes the accessible amount. +// +// <> : No buffer size is given. If the type specifies the buffer size (such as +// with LPSTR and LPWSTR), that amount is used. Otherwise, the buffer is one +// element long. Must be used with _in, _out, or _inout. +// _ecount : The buffer size is an explicit element count. +// _bcount : The buffer size is an explicit byte count. +// +// Output: Describes how much of the buffer will be initialized by the function. For +// _inout buffers, this also describes how much is initialized at entry. Omit this +// category for _in buffers; they must be fully initialized by the caller. +// +// <> : The type specifies how much is initialized. For instance, a function initializing +// an LPWSTR must NULL-terminate the string. +// _full : The function initializes the entire buffer. +// _part : The function initializes part of the buffer, and explicitly indicates how much. +// +// Optional: Describes if the buffer itself is optional. +// +// <> : The pointer to the buffer must not be NULL. +// _opt : The pointer to the buffer might be NULL. It will be checked before being dereferenced. +// +// String: Describes if the buffer is NULL terminated +// +// <> : The buffer is not assumed to be NULL terminated +// _string : The buffer is assumed to be NULL terminated once it has been initialized +// +// Parameters: Gives explicit counts for the size and length of the buffer. +// +// <> : There is no explicit count. Use when neither _ecount nor _bcount is used. +// (size) : Only the buffer's total size is given. Use with _ecount or _bcount but not _part. +// (size,length) : The buffer's total size and initialized length are given. Use with _ecount_part +// and _bcount_part. +// +// Notes: +// +// 1. Specifying two buffer annotations on a single parameter results in unspecified behavior +// (e.g. __RPC__in_bcount(5) __RPC__out_bcount(6) +// +// 2. The size of the buffer and the amount that has been initialized are separate concepts. +// Specify the size using _ecount or _bcount. Specify the amount that is initialized using +// _full, _part, or _string. As a special case, a single element buffer does not need +// _ecount, _bcount, _full, or _part +// +// 3. The count may be less than the total size of the buffer in which case it describes the +// accessible portion. +// +// 4. "__RPC__opt" and "__RPC_deref" are not valid annotations. +// +// 5. The placement of _opt when using _deref is important: +// __RPC__deref_opt_... : Input may be NULL +// __RPC__deref_..._opt : Output may be NULL +// __RPC__deref_opt_..._opt : Both input and output may be NULL +// + +#pragma once + +#include + +#ifndef __RPCSAL_H_VERSION__ +#define __RPCSAL_H_VERSION__ ( 100 ) +#endif // __RPCSAL_H_VERSION__ + +#ifdef __REQUIRED_RPCSAL_H_VERSION__ + #if ( __RPCSAL_H_VERSION__ < __REQUIRED_RPCSAL_H_VERSION__ ) + #error incorrect version. Use the header that matches with the MIDL compiler. + #endif +#endif + + +#ifdef __cplusplus +extern "C" { +#endif // #ifdef __cplusplus + + +#ifndef _SAL1_2_Source_ +#define _SAL1_2_Source_(Name, args, annotes) _SA_annotes3(SAL_name, #Name, "", "1.2") _Group_(annotes _SAL_nop_impl_) +#endif // _SAL1_2_Source_ + +// [in] +#define __RPC__in _SAL1_2_Source_(__RPC__in, (), _Pre_ _Notref_ _Notnull_ _Pre_ _Valid_) +#define __RPC__in_string _SAL1_2_Source_(__RPC__in_string, (), __RPC__in _Pre_ _Null_terminated_) +#define __RPC__in_ecount(size) _SAL1_2_Source_(__RPC__in_ecount, (size), __RPC__in _Pre_readable_size_(size)) +#define __RPC__in_ecount_full(size) _SAL1_2_Source_(__RPC__in_ecount_full, (size), __RPC__in_ecount(size)) +#define __RPC__in_ecount_full_string(size) _SAL1_2_Source_(__RPC__in_ecount_full_string, (size), __RPC__in_ecount_full(size) _Pre_ _Null_terminated_) +#define __RPC__in_ecount_part(size, length) _SAL1_2_Source_(__RPC__in_ecount_part, (size,length), __RPC__in_ecount(length) _Pre_writable_size_(size)) +#define __RPC__in_xcount(size) _SAL1_2_Source_(__RPC__in_xcount, (size), __RPC__in _Pre_readable_size_(size)) +#define __RPC__in_xcount_full(size) _SAL1_2_Source_(__RPC__in_xcount_full, (size), __RPC__in_ecount(size)) +#define __RPC__in_xcount_full_string(size) _SAL1_2_Source_(__RPC__in_xcount_full_string, (size), __RPC__in_ecount_full(size) _Pre_ _Null_terminated_) +#define __RPC__in_xcount_part(size, length) _SAL1_2_Source_(__RPC__in_xcount_part, (size,length), __RPC__in_ecount(length) _Pre_writable_size_(size)) + + +#define __RPC__deref_in _SAL1_2_Source_(__RPC__deref_in, (), __RPC__in _At_(*_Curr_, _Pre_ _Notnull_)) +#define __RPC__deref_in_string _SAL1_2_Source_(__RPC__deref_in_string, (), __RPC__deref_in _At_(*_Curr_, _Pre_ _Null_terminated_)) +#define __RPC__deref_in_opt _SAL1_2_Source_(__RPC__deref_in_opt, (), __RPC__in _At_(*_Curr_, _Pre_ _Maybenull_)) +#define __RPC__deref_in_opt_string _SAL1_2_Source_(__RPC__deref_in_opt_string, (), __RPC__deref_in_opt _At_(*_Curr_, _Pre_ _Null_terminated_)) +#define __RPC__deref_opt_in _SAL1_2_Source_(__RPC__deref_opt_in, (), __RPC__in_opt _At_(*_Curr_, _Pre_ _Notnull_)) +#define __RPC__deref_opt_in_string _SAL1_2_Source_(__RPC__deref_opt_in_string, (), __RPC__deref_opt_in _At_(*_Curr_, _Pre_ _Null_terminated_)) +#define __RPC__deref_opt_in_opt _SAL1_2_Source_(__RPC__deref_opt_in_opt, (), __RPC__in_opt _At_(*_Curr_, _Pre_ _Maybenull_)) +#define __RPC__deref_opt_in_opt_string _SAL1_2_Source_(__RPC__deref_opt_in_opt_string, (), __RPC__deref_opt_in_opt _At_(*_Curr_, _Pre_ _Null_terminated_)) +#define __RPC__deref_in_ecount(size) _SAL1_2_Source_(__RPC__deref_in_ecount, (size), __RPC__in _At_(*_Curr_, _Pre_ _Notnull_ _Pre_readable_size_(size))) +#define __RPC__deref_in_ecount_part(size, length) _SAL1_2_Source_(__RPC__deref_in_ecount_part, (size,length), __RPC__deref_in_ecount(size) _At_(*_Curr_, _Pre_readable_size_(length))) +#define __RPC__deref_in_ecount_full(size) _SAL1_2_Source_(__RPC__deref_in_ecount_full, (size), __RPC__deref_in_ecount_part(size, size)) +#define __RPC__deref_in_ecount_full_opt(size) _SAL1_2_Source_(__RPC__deref_in_ecount_full_opt, (size), __RPC__deref_in_ecount_part_opt(size, size)) +#define __RPC__deref_in_ecount_full_opt_string(size) _SAL1_2_Source_(__RPC__deref_in_ecount_full_opt_string, (size), __RPC__deref_in_ecount_full_opt(size) _At_(*_Curr_, _Pre_ _Null_terminated_)) +#define __RPC__deref_in_ecount_full_string(size) _SAL1_2_Source_(__RPC__deref_in_ecount_full_string, (size), __RPC__deref_in_ecount_full(size) _At_(*_Curr_, _Pre_ _Null_terminated_)) +#define __RPC__deref_in_ecount_opt(size) _SAL1_2_Source_(__RPC__deref_in_ecount_opt, (size), __RPC__in _At_(*_Curr_, _Pre_ _Maybenull_ _Pre_readable_size_(size))) +#define __RPC__deref_in_ecount_opt_string(size) _SAL1_2_Source_(__RPC__deref_in_ecount_opt_string, (size), __RPC__deref_in_ecount_opt(size) _At_(*_Curr_, _Pre_ _Null_terminated_)) +#define __RPC__deref_in_ecount_part_opt(size, length) _SAL1_2_Source_(__RPC__deref_in_ecount_part_opt, (size,length), __RPC__deref_in_ecount_opt(size) _At_(*_Curr_, _Pre_readable_size_(length))) +#define __RPC__deref_in_xcount(size) _SAL1_2_Source_(__RPC__deref_in_xcount, (size), __RPC__deref_in_ecount(size)) +#define __RPC__deref_in_xcount_part(size, length) _SAL1_2_Source_(__RPC__deref_in_xcount_part, (size,length), __RPC__deref_in_ecount_part(size, length)) +#define __RPC__deref_in_xcount_full(size) _SAL1_2_Source_(__RPC__deref_in_xcount_full, (size), __RPC__deref_in_ecount_part(size, size)) +#define __RPC__deref_in_xcount_full_opt(size) _SAL1_2_Source_(__RPC__deref_in_xcount_full_opt, (size), __RPC__deref_in_ecount_full_opt(size)) +#define __RPC__deref_in_xcount_full_opt_string(size) _SAL1_2_Source_(__RPC__deref_in_xcount_full_opt_string, (size), __RPC__deref_in_ecount_full_opt_string(size)) +#define __RPC__deref_in_xcount_full_string(size) _SAL1_2_Source_(__RPC__deref_in_xcount_full_string, (size), __RPC__deref_in_ecount_full_string(size)) +#define __RPC__deref_in_xcount_opt(size) _SAL1_2_Source_(__RPC__deref_in_xcount_opt, (size), __RPC__deref_in_ecount_opt(size)) +#define __RPC__deref_in_xcount_opt_string(size) _SAL1_2_Source_(__RPC__deref_in_xcount_opt_string, (size), __RPC__deref_in_ecount_opt_string(size)) +#define __RPC__deref_in_xcount_part_opt(size, length) _SAL1_2_Source_(__RPC__deref_in_xcount_part_opt, (size,length), __RPC__deref_in_ecount_part_opt(size)) + +// [out] +#define __RPC__out _SAL1_2_Source_(__RPC__out, (), _Out_) +#define __RPC__out_ecount(size) _SAL1_2_Source_(__RPC__out_ecount, (size), _Out_writes_(size) _Post_writable_size_(size)) +#define __RPC__out_ecount_string(size) _SAL1_2_Source_(__RPC__out_ecount_string, (size), __RPC__out_ecount(size) _Post_ _Null_terminated_) +#define __RPC__out_ecount_part(size, length) _SAL1_2_Source_(__RPC__out_ecount_part, (size,length), __RPC__out_ecount(size) _Post_readable_size_(length)) +#define __RPC__out_ecount_full(size) _SAL1_2_Source_(__RPC__out_ecount_full, (size), __RPC__out_ecount_part(size, size)) +#define __RPC__out_ecount_full_string(size) _SAL1_2_Source_(__RPC__out_ecount_full_string, (size), __RPC__out_ecount_full(size) _Post_ _Null_terminated_) +#define __RPC__out_xcount(size) _SAL1_2_Source_(__RPC__out_xcount, (size), _Out_) +#define __RPC__out_xcount_string(size) _SAL1_2_Source_(__RPC__out_xcount_string, (size), __RPC__out _Post_ _Null_terminated_) +#define __RPC__out_xcount_part(size, length) _SAL1_2_Source_(__RPC__out_xcount_part, (size,length), __RPC__out) +#define __RPC__out_xcount_full(size) _SAL1_2_Source_(__RPC__out_xcount_full, (size), __RPC__out) +#define __RPC__out_xcount_full_string(size) _SAL1_2_Source_(__RPC__out_xcount_full_string, (size), __RPC__out _Post_ _Null_terminated_) + +// [in,out] +#define __RPC__inout _SAL1_2_Source_(__RPC__inout, (), _Inout_) +#define __RPC__inout_string _SAL1_2_Source_(__RPC__inout_string, (), __RPC__inout _Pre_ _Null_terminated_ _Post_ _Null_terminated_) +#define __RPC__inout_ecount(size) _SAL1_2_Source_(__RPC__inout_ecount, (size), _Inout_updates_(size)) +#define __RPC__inout_ecount_part(size, length) _SAL1_2_Source_(__RPC__inout_ecount_part, (size,length), _Inout_updates_to_(size, length)) +#define __RPC__inout_ecount_full(size) _SAL1_2_Source_(__RPC__inout_ecount_full, (size), __RPC__inout_ecount_part(size, size)) +#define __RPC__inout_ecount_full_string(size) _SAL1_2_Source_(__RPC__inout_ecount_full_string, (size), __RPC__inout_ecount_full(size) _Pre_ _Null_terminated_ _Post_ _Null_terminated_) +#define __RPC__inout_xcount(size) _SAL1_2_Source_(__RPC__inout_xcount, (size), _Inout_) +#define __RPC__inout_xcount_part(size, length) _SAL1_2_Source_(__RPC__inout_xcount_part, (size,length), _Inout_) +#define __RPC__inout_xcount_full(size) _SAL1_2_Source_(__RPC__inout_xcount_full, (size), __RPC__inout) +#define __RPC__inout_xcount_full_string(size) _SAL1_2_Source_(__RPC__inout_xcount_full_string, (size), __RPC__inout _Pre_ _Null_terminated_ _Post_ _Null_terminated_) + +// [in,unique] +#define __RPC__in_opt _SAL1_2_Source_(__RPC__in_opt, (), _Pre_ _Notref_ _Maybenull_ _Pre_ _Valid_) +#define __RPC__in_opt_string _SAL1_2_Source_(__RPC__in_opt_string, (), __RPC__in_opt _Pre_ _Null_terminated_) +#define __RPC__in_ecount_opt(size) _SAL1_2_Source_(__RPC__in_ecount_opt, (size), __RPC__in_opt _Pre_readable_size_(size)) +#define __RPC__in_ecount_opt_string(size) _SAL1_2_Source_(__RPC__in_ecount_opt_string, (size), __RPC__in_ecount_opt(size) _Pre_ _Null_terminated_) +#define __RPC__in_ecount_full_opt(size) _SAL1_2_Source_(__RPC__in_ecount_full_opt, (size), __RPC__in_ecount_opt(size)) +#define __RPC__in_ecount_full_opt_string(size) _SAL1_2_Source_(__RPC__in_ecount_full_opt_string, (size), __RPC__in_ecount_full_opt(size) _Pre_ _Null_terminated_) +#define __RPC__in_ecount_part_opt(size, length) _SAL1_2_Source_(__RPC__in_ecount_part_opt, (size,length), __RPC__in_ecount_opt(length) _Pre_writable_size_(size)) +#define __RPC__in_xcount_full_opt(size) _SAL1_2_Source_(__RPC__in_xcount_full_opt, (size), __RPC__in_ecount_opt(size)) +#define __RPC__in_xcount_full_opt_string(size) _SAL1_2_Source_(__RPC__in_xcount_full_opt_string, (size), __RPC__in_ecount_full_opt(size) _Pre_ _Null_terminated_) +#define __RPC__in_xcount_part_opt(size, length) _SAL1_2_Source_(__RPC__in_xcount_part_opt, (size,length), __RPC__in_ecount_part_opt(size, length)) +#define __RPC__in_xcount_opt(size) _SAL1_2_Source_(__RPC__in_xcount_opt, (size), __RPC__in_ecount_opt(size)) +#define __RPC__in_xcount_opt_string(size) _SAL1_2_Source_(__RPC__in_xcount_opt_string, (size), __RPC__in_ecount_opt(size) _Pre_ _Null_terminated_) + +// [in,out,unique] +#define __RPC__inout_opt _SAL1_2_Source_(__RPC__inout_opt, (), _Inout_opt_) +#define __RPC__inout_opt_string _SAL1_2_Source_(__RPC__inout_opt_string, (), __RPC__inout_opt _Pre_ _Null_terminated_) +#define __RPC__inout_ecount_opt(size) _SAL1_2_Source_(__RPC__inout_ecount_opt, (size), _Inout_updates_opt_(size)) +#define __RPC__inout_ecount_part_opt(size, length) _SAL1_2_Source_(__RPC__inout_ecount_part_opt, (size,length), _Inout_updates_to_opt_(size, length)) +#define __RPC__inout_ecount_full_opt(size) _SAL1_2_Source_(__RPC__inout_ecount_full_opt, (size), __RPC__inout_ecount_part_opt(size, size)) +#define __RPC__inout_ecount_full_opt_string(size) _SAL1_2_Source_(__RPC__inout_ecount_full_opt_string, (size), __RPC__inout_ecount_full_opt(size) _Pre_ _Null_terminated_ _Post_ _Null_terminated_) +#define __RPC__inout_xcount_opt(size) _SAL1_2_Source_(__RPC__inout_xcount_opt, (size), _Inout_opt_) +#define __RPC__inout_xcount_part_opt(size, length) _SAL1_2_Source_(__RPC__inout_xcount_part_opt, (size,length), _Inout_opt_) +#define __RPC__inout_xcount_full_opt(size) _SAL1_2_Source_(__RPC__inout_xcount_full_opt, (size), __RPC__inout_opt) +#define __RPC__inout_xcount_full_opt_string(size) _SAL1_2_Source_(__RPC__inout_xcount_full_opt_string, (size), __RPC__inout_opt _Pre_ _Null_terminated_ _Post_ _Null_terminated_) + +// [out] ** +#define __RPC__deref_out _SAL1_2_Source_(__RPC__deref_out, (), _Outptr_) +#define __RPC__deref_out_string _SAL1_2_Source_(__RPC__deref_out_string, (), _Outptr_result_z_) +#define __RPC__deref_out_opt _SAL1_2_Source_(__RPC__deref_out_opt, (), __RPC__deref_out) +#define __RPC__deref_out_opt_string _SAL1_2_Source_(__RPC__deref_out_opt_string, (), _Outptr_result_maybenull_z_ _At_(*_Curr_, _Pre_opt_z_)) +#define __RPC__deref_out_ecount(size) _SAL1_2_Source_(__RPC__deref_out_ecount, (size), _Outptr_result_buffer_(size)) +#define __RPC__deref_out_ecount_part(size, length) _SAL1_2_Source_(__RPC__deref_out_ecount_part, (size,length), _Outptr_result_buffer_to_(size, length)) +#define __RPC__deref_out_ecount_full(size) _SAL1_2_Source_(__RPC__deref_out_ecount_full, (size), __RPC__deref_out_ecount_part(size,size)) +#define __RPC__deref_out_ecount_full_string(size) _SAL1_2_Source_(__RPC__deref_out_ecount_full_string, (size), __RPC__deref_out_ecount_full(size) _At_(*_Curr_, _Post_ _Null_terminated_)) +#define __RPC__deref_out_xcount(size) _SAL1_2_Source_(__RPC__deref_out_xcount, (size), _Outptr_) +#define __RPC__deref_out_xcount_part(size, length) _SAL1_2_Source_(__RPC__deref_out_xcount_part, (size,length), __RPC__deref_out) +#define __RPC__deref_out_xcount_full(size) _SAL1_2_Source_(__RPC__deref_out_xcount_full, (size), __RPC__deref_out) +#define __RPC__deref_out_xcount_full_string(size) _SAL1_2_Source_(__RPC__deref_out_xcount_full_string, (size), __RPC__deref_out _At_(*_Curr_, _Post_ _Null_terminated_)) + +// [in,out] **, second pointer decoration. +#define __RPC__deref_inout _SAL1_2_Source_(__RPC__deref_inout, (), _Inout_ _At_(*_Curr_, _Pre_ _Notnull_ _Post_ _Notnull_)) +#define __RPC__deref_inout_string _SAL1_2_Source_(__RPC__deref_inout_string, (), __RPC__deref_inout _At_(*_Curr_, _Pre_ _Null_terminated_ _Post_ _Null_terminated_)) +#define __RPC__deref_inout_opt _SAL1_2_Source_(__RPC__deref_inout_opt, (), _Inout_ _At_(*_Curr_, _Pre_ _Maybenull_ _Post_ _Maybenull_)) +#define __RPC__deref_inout_opt_string _SAL1_2_Source_(__RPC__deref_inout_opt_string, (), __RPC__deref_inout_opt _At_(*_Curr_, _Pre_ _Null_terminated_ _Post_ _Null_terminated_)) +#define __RPC__deref_inout_ecount_opt(size) _SAL1_2_Source_(__RPC__deref_inout_ecount_opt, (size), __RPC__deref_inout_opt _At_(*_Curr_, _Pre_writable_size_(size) _Post_writable_size_(size))) +#define __RPC__deref_inout_ecount_part_opt(size, length) _SAL1_2_Source_(__RPC__deref_inout_ecount_part_opt, (size,length), __RPC__deref_inout_ecount_opt(size) _At_(*_Curr_, _Pre_readable_size_(length) _Post_readable_size_(length))) +#define __RPC__deref_inout_ecount_full_opt(size) _SAL1_2_Source_(__RPC__deref_inout_ecount_full_opt, (size), __RPC__deref_inout_ecount_part_opt(size, size)) +#define __RPC__deref_inout_ecount_full(size) _SAL1_2_Source_(__RPC__deref_inout_ecount_full, (size), __RPC__deref_inout _At_(*_Curr_, _Pre_readable_size_(size) _Post_readable_size_(size))) +#define __RPC__deref_inout_ecount_full_string(size) _SAL1_2_Source_(__RPC__deref_inout_ecount_full_string, (size), __RPC__deref_inout_ecount_full(size) _At_(*_Curr_, _Post_ _Null_terminated_)) +#define __RPC__deref_inout_ecount_full_opt_string(size) _SAL1_2_Source_(__RPC__deref_inout_ecount_full_opt_string, (size), __RPC__deref_inout_ecount_full_opt(size) _At_(*_Curr_, _Pre_ _Null_terminated_ _Post_ _Null_terminated_)) +#define __RPC__deref_inout_xcount_opt(size) _SAL1_2_Source_(__RPC__deref_inout_xcount_opt, (size), __RPC__deref_inout_opt) +#define __RPC__deref_inout_xcount_part_opt(size, length) _SAL1_2_Source_(__RPC__deref_inout_xcount_part_opt, (size,length), __RPC__deref_inout_opt) +#define __RPC__deref_inout_xcount_full_opt(size) _SAL1_2_Source_(__RPC__deref_inout_xcount_full_opt, (size), __RPC__deref_inout_opt) +#define __RPC__deref_inout_xcount_full(size) _SAL1_2_Source_(__RPC__deref_inout_xcount_full, (size), __RPC__deref_inout) +#define __RPC__deref_inout_xcount_full_string(size) _SAL1_2_Source_(__RPC__deref_inout_xcount_full_string, (size), __RPC__deref_inout _At_(*_Curr_, _Post_ _Null_terminated_)) +#define __RPC__deref_inout_xcount_full_opt_string(size) _SAL1_2_Source_(__RPC__deref_inout_xcount_full_opt_string, (size), __RPC__deref_inout_opt _At_(*_Curr_, _Pre_ _Null_terminated_ _Post_ _Null_terminated_)) + + +// #define __RPC_out_opt out_opt is not allowed in rpc + +// [in,out,unique] +#define __RPC__deref_opt_inout _SAL1_2_Source_(__RPC__deref_opt_inout, (), _Inout_opt_ _At_(*_Curr_, _Pre_ _Notnull_ _Post_ _Notnull_)) +#define __RPC__deref_opt_inout_ecount(size) _SAL1_2_Source_(__RPC__deref_opt_inout_ecount, (size), __RPC__deref_opt_inout _At_(*_Curr_, _Pre_writable_size_(size) _Post_writable_size_(size))) +#define __RPC__deref_opt_inout_string _SAL1_2_Source_(__RPC__deref_opt_inout_string, (), __RPC__deref_opt_inout _At_(*_Curr_, _Pre_ _Null_terminated_ _Post_ _Null_terminated_)) +#define __RPC__deref_opt_inout_ecount_part(size, length) _SAL1_2_Source_(__RPC__deref_opt_inout_ecount_part, (size,length), __RPC__deref_opt_inout_ecount(size) _At_(*_Curr_, _Pre_readable_size_(length) _Post_readable_size_(length))) +#define __RPC__deref_opt_inout_ecount_full(size) _SAL1_2_Source_(__RPC__deref_opt_inout_ecount_full, (size), __RPC__deref_opt_inout_ecount_part(size, size)) +#define __RPC__deref_opt_inout_ecount_full_string(size) _SAL1_2_Source_(__RPC__deref_opt_inout_ecount_full_string, (size), __RPC__deref_opt_inout_ecount_full(size) _At_(*_Curr_, _Pre_ _Null_terminated_ _Post_ _Null_terminated_)) +#define __RPC__deref_opt_inout_xcount_part(size, length) _SAL1_2_Source_(__RPC__deref_opt_inout_xcount_part, (size,length), __RPC__deref_opt_inout) +#define __RPC__deref_opt_inout_xcount_full(size) _SAL1_2_Source_(__RPC__deref_opt_inout_xcount_full, (size), __RPC__deref_opt_inout) +#define __RPC__deref_opt_inout_xcount_full_string(size) _SAL1_2_Source_(__RPC__deref_opt_inout_xcount_full_string, (size), __RPC__deref_opt_inout_string) + + +#define __RPC__deref_out_ecount_opt(size) _SAL1_2_Source_(__RPC__deref_out_ecount_opt, (size), _Outptr_result_buffer_maybenull_(size) _At_(*_Curr_, _Pre_maybenull_)) +#define __RPC__deref_out_ecount_part_opt(size, length) _SAL1_2_Source_(__RPC__deref_out_ecount_part_opt, (size,length), _Outptr_result_buffer_to_maybenull_(size, length) _At_(*_Curr_, _Pre_maybenull_)) +#define __RPC__deref_out_ecount_full_opt(size) _SAL1_2_Source_(__RPC__deref_out_ecount_full_opt, (size), __RPC__deref_out_ecount_part_opt(size, size)) +#define __RPC__deref_out_ecount_full_opt_string(size) _SAL1_2_Source_(__RPC__deref_out_ecount_full_opt_string, (size), __RPC__deref_out_ecount_part_opt(size, size) _At_(*_Curr_, _Post_ _Null_terminated_)) +#define __RPC__deref_out_xcount_opt(size) _SAL1_2_Source_(__RPC__deref_out_xcount_opt, (size), __RPC__out _At_(*_Curr_, _Pre_maybenull_ _Pre_writable_size_(_Inexpressible_(size)) _Post_ _Maybenull_)) +#define __RPC__deref_out_xcount_part_opt(size, length) _SAL1_2_Source_(__RPC__deref_out_xcount_part_opt, (size,length), __RPC__deref_out _At_(*_Curr_, _Pre_maybenull_ _Pre_writable_size_(_Inexpressible_(size)) _Post_ _Maybenull_)) +#define __RPC__deref_out_xcount_full_opt(size) _SAL1_2_Source_(__RPC__deref_out_xcount_full_opt, (size), __RPC__deref_out_opt _At_(*_Curr_, _Pre_maybenull_ _Pre_writable_size_(_Inexpressible_(size)))) +#define __RPC__deref_out_xcount_full_opt_string(size) _SAL1_2_Source_(__RPC__deref_out_xcount_full_opt_string, (size), __RPC__deref_out_opt _At_(*_Curr_, _Pre_maybenull_ _Pre_writable_size_(_Inexpressible_(size)) _Post_ _Null_terminated_)) + +#define __RPC__deref_opt_inout_opt _SAL1_2_Source_(__RPC__deref_opt_inout_opt, (), _Inout_opt_ _At_(*_Curr_, _Pre_ _Maybenull_ _Post_ _Maybenull_)) +#define __RPC__deref_opt_inout_opt_string _SAL1_2_Source_(__RPC__deref_opt_inout_opt_string, (), __RPC__deref_opt_inout_opt _At_(*_Curr_, _Pre_ _Null_terminated_ _Post_ _Null_terminated_)) +#define __RPC__deref_opt_inout_ecount_opt(size) _SAL1_2_Source_(__RPC__deref_opt_inout_ecount_opt, (size), _Inout_opt_ _At_(*_Curr_, _Pre_ _Maybenull_ _Pre_writable_size_(size) _Post_ _Maybenull_ _Post_writable_size_(size))) +#define __RPC__deref_opt_inout_ecount_part_opt(size, length) _SAL1_2_Source_(__RPC__deref_opt_inout_ecount_part_opt, (size,length), __RPC__deref_opt_inout_ecount_opt(size) _At_(*_Curr_, _Pre_readable_size_(length) _Post_readable_size_(length))) +#define __RPC__deref_opt_inout_ecount_full_opt(size) _SAL1_2_Source_(__RPC__deref_opt_inout_ecount_full_opt, (size), __RPC__deref_opt_inout_ecount_part_opt(size, size)) +#define __RPC__deref_opt_inout_ecount_full_opt_string(size) _SAL1_2_Source_(__RPC__deref_opt_inout_ecount_full_opt_string, (size), __RPC__deref_opt_inout_ecount_full_opt(size) _At_(*_Curr_, _Pre_ _Null_terminated_ _Post_ _Null_terminated_)) +#define __RPC__deref_opt_inout_xcount_opt(size) _SAL1_2_Source_(__RPC__deref_opt_inout_xcount_opt, (size), __RPC__deref_opt_inout_opt) +#define __RPC__deref_opt_inout_xcount_part_opt(size, length) _SAL1_2_Source_(__RPC__deref_opt_inout_xcount_part_opt, (size,length), __RPC__deref_opt_inout_opt) +#define __RPC__deref_opt_inout_xcount_full_opt(size) _SAL1_2_Source_(__RPC__deref_opt_inout_xcount_full_opt, (size), __RPC__deref_opt_inout_opt) +#define __RPC__deref_opt_inout_xcount_full_opt_string(size) _SAL1_2_Source_(__RPC__deref_opt_inout_xcount_full_opt_string, (size), __RPC__deref_opt_inout_opt_string) + +#define __RPC_full_pointer _SAL1_2_Source_(__RPC_full_pointer, (), _Maybenull_) +#define __RPC_unique_pointer _SAL1_2_Source_(__RPC_unique_pointer, (), _Maybenull_) +#define __RPC_ref_pointer _SAL1_2_Source_(__RPC_ref_pointer, (), _Notnull_) +#define __RPC_string _SAL1_2_Source_(__RPC_string, (), _Null_terminated_) + +#define __RPC__range(min,max) _SAL1_2_Source_(__RPC__range, (min,max), __range(min,max)) +#define __RPC__in_range(min,max) _SAL1_2_Source_(__RPC__in_range, (min,max), _In_range_(min,max)) + + +#ifdef __cplusplus +} +#endif + diff --git a/gfx/include/dxsdk/xapo.h b/gfx/include/dxsdk/xapo.h new file mode 100644 index 0000000000..83481a9a3d --- /dev/null +++ b/gfx/include/dxsdk/xapo.h @@ -0,0 +1,643 @@ +/*-========================================================================-_ + | - XAPO - | + | Copyright (c) Microsoft Corporation. All rights reserved. | + |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| + |PROJECT: XAPO MODEL: Unmanaged User-mode | + |VERSION: 1.0 EXCEPT: No Exceptions | + |CLASS: N / A MINREQ: WinXP, Xbox360 | + |BASE: N / A DIALECT: MSC++ 14.00 | + |>------------------------------------------------------------------------<| + | DUTY: Cross-platform Audio Processing Object interfaces | + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ + NOTES: + 1. Definition of terms: + DSP: Digital Signal Processing. + + CBR: Constant BitRate -- DSP that consumes a constant number of + input samples to produce an output sample. + For example, a 22kHz to 44kHz resampler is CBR DSP. + Even though the number of input to output samples differ, + the ratio between input to output rate remains constant. + All user-defined XAPOs are assumed to be CBR as + XAudio2 only allows CBR DSP to be added to an effect chain. + + XAPO: Cross-platform Audio Processing Object -- + a thin wrapper that manages DSP code, allowing it + to be easily plugged into an XAudio2 effect chain. + + Frame: A block of samples, one per channel, + to be played simultaneously. + E.g. a mono stream has one sample per frame. + + In-Place: Processing such that the input buffer equals the + output buffer (i.e. input data modified directly). + This form of processing is generally more efficient + than using separate memory for input and output. + However, an XAPO may not perform format conversion + when processing in-place. + + 2. XAPO member variables are divided into three classifications: + Immutable: Set once via IXAPO::Initialize and remain + constant during the lifespan of the XAPO. + + Locked: May change before the XAPO is locked via + IXAPO::LockForProcess but remain constant + until IXAPO::UnlockForProcess is called. + + Dynamic: May change from one processing pass to the next, + usually via IXAPOParameters::SetParameters. + XAPOs should assign reasonable defaults to their dynamic + variables during IXAPO::Initialize/LockForProcess so + that calling IXAPOParameters::SetParameters is not + required before processing begins. + + When implementing an XAPO, determine the type of each variable and + initialize them in the appropriate method. Immutable variables are + generally preferable over locked which are preferable over dynamic. + That is, one should strive to minimize XAPO state changes for + best performance, maintainability, and ease of use. + + 3. To minimize glitches, the realtime audio processing thread must + not block. XAPO methods called by the realtime thread are commented + as non-blocking and therefore should not use blocking synchronization, + allocate memory, access the disk, etc. The XAPO interfaces were + designed to allow an effect implementer to move such operations + into other methods called on an application controlled thread. + + 4. Extending functionality is accomplished through the addition of new + COM interfaces. For example, if a new member is added to a parameter + structure, a new interface using the new structure should be added, + leaving the original interface unchanged. + This ensures consistent communication between future versions of + XAudio2 and various versions of XAPOs that may exist in an application. + + 5. All audio data is interleaved in XAudio2. + The default audio format for an effect chain is WAVE_FORMAT_IEEE_FLOAT. + + 6. User-defined XAPOs should assume all input and output buffers are + 16-byte aligned. + + 7. See XAPOBase.h for an XAPO base class which provides a default + implementation for most of the interface methods defined below. */ + +#ifdef _MSC_VER +#pragma once +#endif + +#include + +#if(_WIN32_WINNT < _WIN32_WINNT_WIN8) +#error "This version of XAudio2 is available only in Windows 8 or later. Use the XAudio2 headers and libraries from the DirectX SDK with applications that target Windows 7 and earlier versions." +#endif // (_WIN32_WINNT < _WIN32_WINNT_WIN8) + +/*#include */ + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_TV_APP | WINAPI_PARTITION_TV_TITLE)*/ + +//---------------------------------------------------// + +#include + +// XAPO interface IDs +interface __declspec(uuid("A410B984-9839-4819-A0BE-2856AE6B3ADB")) IXAPO; +interface __declspec(uuid("26D95C66-80F2-499A-AD54-5AE7F01C6D98")) IXAPOParameters; + + +#if !defined(GUID_DEFS_ONLY) // ignore rest if only GUID definitions requested + #include + #include + #include // for WAVEFORMATEX etc. + + // XAPO error codes + #define FACILITY_XAPO 0x897 + #define XAPO_E_FORMAT_UNSUPPORTED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_XAPO, 0x01) // requested audio format unsupported + + // supported number of channels (samples per frame) range + #define XAPO_MIN_CHANNELS 1 + #define XAPO_MAX_CHANNELS 64 + + // supported framerate range + #define XAPO_MIN_FRAMERATE 1000 + #define XAPO_MAX_FRAMERATE 200000 + + // unicode string length, including terminator, used with XAPO_REGISTRATION_PROPERTIES + #define XAPO_REGISTRATION_STRING_LENGTH 256 + + + // XAPO property flags, used with XAPO_REGISTRATION_PROPERTIES.Flags: + // Number of channels of input and output buffers must match, + // applies to XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS.pFormat. + #define XAPO_FLAG_CHANNELS_MUST_MATCH 0x00000001 + + // Framerate of input and output buffers must match, + // applies to XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS.pFormat. + #define XAPO_FLAG_FRAMERATE_MUST_MATCH 0x00000002 + + // Bit depth of input and output buffers must match, + // applies to XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS.pFormat. + // Container size of input and output buffers must also match if + // XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS.pFormat is WAVEFORMATEXTENSIBLE. + #define XAPO_FLAG_BITSPERSAMPLE_MUST_MATCH 0x00000004 + + // Number of input and output buffers must match, + // applies to XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS. + // + // Also, XAPO_REGISTRATION_PROPERTIES.MinInputBufferCount must + // equal XAPO_REGISTRATION_PROPERTIES.MinOutputBufferCount and + // XAPO_REGISTRATION_PROPERTIES.MaxInputBufferCount must equal + // XAPO_REGISTRATION_PROPERTIES.MaxOutputBufferCount when used. + #define XAPO_FLAG_BUFFERCOUNT_MUST_MATCH 0x00000008 + + // XAPO must be run in-place. Use this flag only if your DSP + // implementation cannot process separate input and output buffers. + // If set, the following flags must also be set: + // XAPO_FLAG_CHANNELS_MUST_MATCH + // XAPO_FLAG_FRAMERATE_MUST_MATCH + // XAPO_FLAG_BITSPERSAMPLE_MUST_MATCH + // XAPO_FLAG_BUFFERCOUNT_MUST_MATCH + // XAPO_FLAG_INPLACE_SUPPORTED + // + // Multiple input and output buffers may be used with in-place XAPOs, + // though the input buffer count must equal the output buffer count. + // When multiple input/output buffers are used, the XAPO may assume + // input buffer [N] equals output buffer [N] for in-place processing. + #define XAPO_FLAG_INPLACE_REQUIRED 0x00000020 + + // XAPO may be run in-place. If the XAPO is used in a chain + // such that the requirements for XAPO_FLAG_INPLACE_REQUIRED are met, + // XAudio2 will ensure the XAPO is run in-place. If not met, XAudio2 + // will still run the XAPO albeit with separate input and output buffers. + // + // For example, consider an effect which may be ran in stereo->5.1 mode or + // mono->mono mode. When set to stereo->5.1, it will be run with separate + // input and output buffers as format conversion is not permitted in-place. + // However, if configured to run mono->mono, the same XAPO can be run + // in-place. Thus the same implementation may be conveniently reused + // for various input/output configurations, while taking advantage of + // in-place processing when possible. + #define XAPO_FLAG_INPLACE_SUPPORTED 0x00000010 + + +//-----------------------------------------------------// + #pragma pack(push, 1) // set packing alignment to ensure consistency across arbitrary build environments + + + // XAPO registration properties, describes general XAPO characteristics, used with IXAPO::GetRegistrationProperties + typedef struct XAPO_REGISTRATION_PROPERTIES { + CLSID clsid; // COM class ID, used with CoCreate + WCHAR FriendlyName[XAPO_REGISTRATION_STRING_LENGTH]; // friendly name unicode string + WCHAR CopyrightInfo[XAPO_REGISTRATION_STRING_LENGTH]; // copyright information unicode string + UINT32 MajorVersion; // major version + UINT32 MinorVersion; // minor version + UINT32 Flags; // XAPO property flags, describes supported input/output configuration + UINT32 MinInputBufferCount; // minimum number of input buffers required for processing, can be 0 + UINT32 MaxInputBufferCount; // maximum number of input buffers supported for processing, must be >= MinInputBufferCount + UINT32 MinOutputBufferCount; // minimum number of output buffers required for processing, can be 0, must match MinInputBufferCount when XAPO_FLAG_BUFFERCOUNT_MUST_MATCH used + UINT32 MaxOutputBufferCount; // maximum number of output buffers supported for processing, must be >= MinOutputBufferCount, must match MaxInputBufferCount when XAPO_FLAG_BUFFERCOUNT_MUST_MATCH used + } XAPO_REGISTRATION_PROPERTIES; + + + // LockForProcess buffer parameters: + // Defines buffer parameters that remain constant while an XAPO is locked. + // Used with IXAPO::LockForProcess. + // + // For CBR XAPOs, MaxFrameCount is the only number of frames + // IXAPO::Process would have to handle for the respective buffer. + typedef struct XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS { + const WAVEFORMATEX* pFormat; // buffer audio format + UINT32 MaxFrameCount; // maximum number of frames in respective buffer that IXAPO::Process would have to handle, irrespective of dynamic variable settings, can be 0 + } XAPO_LOCKFORPROCESS_PARAMETERS; + + // Buffer flags: + // Describes assumed content of the respective buffer. + // Used with XAPO_PROCESS_BUFFER_PARAMETERS.BufferFlags. + // + // This meta-data can be used by an XAPO to implement + // optimizations that require knowledge of a buffer's content. + // + // For example, XAPOs that always produce silent output from silent input + // can check the flag on the input buffer to determine if any signal + // processing is necessary. If silent, the XAPO may simply set the flag + // on the output buffer to silent and return, optimizing out the work of + // processing silent data: XAPOs that generate silence for any reason may + // set the buffer's flag accordingly rather than writing out silent + // frames to the buffer itself. + // + // The flags represent what should be assumed is in the respective buffer. + // The flags may not reflect what is actually stored in memory. + typedef enum XAPO_BUFFER_FLAGS { + XAPO_BUFFER_SILENT, // silent data should be assumed, respective memory may be uninitialized + XAPO_BUFFER_VALID, // arbitrary data should be assumed (may or may not be silent frames), respective memory initialized + } XAPO_BUFFER_FLAGS; + + // Process buffer parameters: + // Defines buffer parameters that may change from one + // processing pass to the next. Used with IXAPO::Process. + // + // Note the byte size of the respective buffer must be at least: + // XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS.MaxFrameCount * XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS.pFormat->nBlockAlign + // + // Although the audio format and maximum size of the respective + // buffer is locked (defined by XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS), + // the actual memory address of the buffer given is permitted to change + // from one processing pass to the next. + // + // For CBR XAPOs, ValidFrameCount is constant while locked and equals + // the respective XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS.MaxFrameCount. + typedef struct XAPO_PROCESS_BUFFER_PARAMETERS { + void* pBuffer; // audio data buffer, must be non-NULL + XAPO_BUFFER_FLAGS BufferFlags; // describes assumed content of pBuffer, does not affect ValidFrameCount + UINT32 ValidFrameCount; // number of frames of valid data, must be within respective [0, XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS.MaxFrameCount], always XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS.MaxFrameCount for CBR/user-defined XAPOs, does not affect BufferFlags + } XAPO_PROCESS_BUFFER_PARAMETERS; + + +//-------------------------------------------------------------// + // Memory allocation macros that allow one module to allocate memory and + // another to free it, by guaranteeing that the same heap manager is used + // regardless of differences between build environments of the two modules. + // + // Used by IXAPO methods that must allocate arbitrary sized structures + // such as WAVEFORMATEX that are subsequently returned to the application. + #define XAPOAlloc(size) CoTaskMemAlloc(size) + #define XAPOFree(p) CoTaskMemFree(p) + + +//-----------------------------------------------------// + // IXAPO: + // The only mandatory XAPO COM interface -- a thin wrapper that manages + // DSP code, allowing it to be easily plugged into an XAudio2 effect chain. + #undef INTERFACE + #define INTERFACE IXAPO + DECLARE_INTERFACE_(IXAPO, IUnknown) { + //// + // DESCRIPTION: + // Allocates a copy of the registration properties of the XAPO. + // + // PARAMETERS: + // ppRegistrationProperties - [out] receives pointer to copy of registration properties, use XAPOFree to free structure, left untouched on failure + // + // RETURN VALUE: + // COM error code + //// + STDMETHOD(GetRegistrationProperties) (THIS_ _Outptr_ XAPO_REGISTRATION_PROPERTIES** ppRegistrationProperties) PURE; + + //// + // DESCRIPTION: + // Queries if an input/output configuration is supported. + // + // REMARKS: + // This method allows XAPOs to express dependency of input format + // with respect to output format. + // + // If the input/output format pair configuration is unsupported, + // this method also determines the nearest input format supported. + // Nearest meaning closest bit depth, framerate, and channel count, + // in that order of importance. + // + // The behaviour of this method should remain constant after the + // XAPO has been initialized. + // + // PARAMETERS: + // pOutputFormat - [in] output format known to be supported + // pRequestedInputFormat - [in] input format to examine + // ppSupportedInputFormat - [out] receives pointer to nearest input format supported if not NULL and input/output configuration unsupported, use XAPOFree to free structure, left untouched on any failure except XAPO_E_FORMAT_UNSUPPORTED + // + // RETURN VALUE: + // COM error code, including: + // S_OK - input/output configuration supported, ppSupportedInputFormat left untouched + // XAPO_E_FORMAT_UNSUPPORTED - input/output configuration unsupported, ppSupportedInputFormat receives pointer to nearest input format supported if not NULL + // E_INVALIDARG - either audio format invalid, ppSupportedInputFormat left untouched + //// + STDMETHOD(IsInputFormatSupported) (THIS_ const WAVEFORMATEX* pOutputFormat, const WAVEFORMATEX* pRequestedInputFormat, _Outptr_opt_ WAVEFORMATEX** ppSupportedInputFormat) PURE; + + //// + // DESCRIPTION: + // Queries if an input/output configuration is supported. + // + // REMARKS: + // This method allows XAPOs to express dependency of output format + // with respect to input format. + // + // If the input/output format pair configuration is unsupported, + // this method also determines the nearest output format supported. + // Nearest meaning closest bit depth, framerate, and channel count, + // in that order of importance. + // + // The behaviour of this method should remain constant after the + // XAPO has been initialized. + // + // PARAMETERS: + // pInputFormat - [in] input format known to be supported + // pRequestedOutputFormat - [in] output format to examine + // ppSupportedOutputFormat - [out] receives pointer to nearest output format supported if not NULL and input/output configuration unsupported, use XAPOFree to free structure, left untouched on any failure except XAPO_E_FORMAT_UNSUPPORTED + // + // RETURN VALUE: + // COM error code, including: + // S_OK - input/output configuration supported, ppSupportedOutputFormat left untouched + // XAPO_E_FORMAT_UNSUPPORTED - input/output configuration unsupported, ppSupportedOutputFormat receives pointer to nearest output format supported if not NULL + // E_INVALIDARG - either audio format invalid, ppSupportedOutputFormat left untouched + //// + STDMETHOD(IsOutputFormatSupported) (THIS_ const WAVEFORMATEX* pInputFormat, const WAVEFORMATEX* pRequestedOutputFormat, _Outptr_opt_ WAVEFORMATEX** ppSupportedOutputFormat) PURE; + + //// + // DESCRIPTION: + // Performs any effect-specific initialization if required. + // + // REMARKS: + // The contents of pData are defined by the XAPO. + // Immutable variables (constant during the lifespan of the XAPO) + // should be set once via this method. + // Once initialized, an XAPO cannot be initialized again. + // + // An XAPO should be initialized before passing it to XAudio2 + // as part of an effect chain. XAudio2 will not call this method; + // it exists for future content-driven initialization. + // + // PARAMETERS: + // pData - [in] effect-specific initialization parameters, may be NULL if DataByteSize == 0 + // DataByteSize - [in] size of pData in bytes, may be 0 if pData is NULL + // + // RETURN VALUE: + // COM error code + //// + STDMETHOD(Initialize) (THIS_ _In_reads_bytes_opt_(DataByteSize) const void* pData, UINT32 DataByteSize) PURE; + + //// + // DESCRIPTION: + // Resets variables dependent on frame history. + // + // REMARKS: + // All other variables remain unchanged, including variables set by + // IXAPOParameters::SetParameters. + // + // For example, an effect with delay should zero out its delay line + // during this method, but should not reallocate anything as the + // XAPO remains locked with a constant input/output configuration. + // + // XAudio2 calls this method only if the XAPO is locked. + // This method should not block as it is called from the + // realtime thread. + // + // PARAMETERS: + // void + // + // RETURN VALUE: + // void + //// + STDMETHOD_(void, Reset) (THIS) PURE; + + //// + // DESCRIPTION: + // Locks the XAPO to a specific input/output configuration, + // allowing it to do any final initialization before Process + // is called on the realtime thread. + // + // REMARKS: + // Once locked, the input/output configuration and any other locked + // variables remain constant until UnlockForProcess is called. + // + // XAPOs should assert the input/output configuration is supported + // and that any required effect-specific initialization is complete. + // IsInputFormatSupported, IsOutputFormatSupported, and Initialize + // should be called as necessary before this method is called. + // + // All internal memory buffers required for Process should be + // allocated by the time this method returns successfully + // as Process is non-blocking and should not allocate memory. + // + // Once locked, an XAPO cannot be locked again until + // UnLockForProcess is called. + // + // PARAMETERS: + // InputLockedParameterCount - [in] number of input buffers, must be within [XAPO_REGISTRATION_PROPERTIES.MinInputBufferCount, XAPO_REGISTRATION_PROPERTIES.MaxInputBufferCount] + // pInputLockedParameters - [in] array of input locked buffer parameter structures, may be NULL if InputLockedParameterCount == 0, otherwise must have InputLockedParameterCount elements + // OutputLockedParameterCount - [in] number of output buffers, must be within [XAPO_REGISTRATION_PROPERTIES.MinOutputBufferCount, XAPO_REGISTRATION_PROPERTIES.MaxOutputBufferCount], must match InputLockedParameterCount when XAPO_FLAG_BUFFERCOUNT_MUST_MATCH used + // pOutputLockedParameters - [in] array of output locked buffer parameter structures, may be NULL if OutputLockedParameterCount == 0, otherwise must have OutputLockedParameterCount elements + // + // RETURN VALUE: + // COM error code + //// + STDMETHOD(LockForProcess) (THIS_ UINT32 InputLockedParameterCount, _In_reads_opt_(InputLockedParameterCount) const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pInputLockedParameters, UINT32 OutputLockedParameterCount, _In_reads_opt_(OutputLockedParameterCount) const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pOutputLockedParameters) PURE; + + //// + // DESCRIPTION: + // Opposite of LockForProcess. Variables allocated during + // LockForProcess should be deallocated by this method. + // + // REMARKS: + // Unlocking an XAPO allows an XAPO instance to be reused with + // different input/output configurations. + // + // PARAMETERS: + // void + // + // RETURN VALUE: + // void + //// + STDMETHOD_(void, UnlockForProcess) (THIS) PURE; + + //// + // DESCRIPTION: + // Runs the XAPO's DSP code on the given input/output buffers. + // + // REMARKS: + // In addition to writing to the output buffers as appropriate, + // an XAPO must set the BufferFlags and ValidFrameCount members + // of all elements in pOutputProcessParameters accordingly. + // + // ppInputProcessParameters will not necessarily be the same as + // ppOutputProcessParameters for in-place processing, rather + // the pBuffer members of each will point to the same memory. + // + // Multiple input/output buffers may be used with in-place XAPOs, + // though the input buffer count must equal the output buffer count. + // When multiple input/output buffers are used with in-place XAPOs, + // the XAPO may assume input buffer [N] equals output buffer [N]. + // + // When IsEnabled is FALSE, the XAPO should process thru. + // Thru processing means an XAPO should not apply its normal + // processing to the given input/output buffers during Process. + // It should instead pass data from input to output with as little + // modification possible. Effects that perform format conversion + // should continue to do so. The effect must ensure transitions + // between normal and thru processing do not introduce + // discontinuities into the signal. + // + // XAudio2 calls this method only if the XAPO is locked. + // This method should not block as it is called from the + // realtime thread. + // + // PARAMETERS: + // InputProcessParameterCount - [in] number of input buffers, matches respective InputLockedParameterCount parameter given to LockForProcess + // pInputProcessParameters - [in] array of input process buffer parameter structures, may be NULL if InputProcessParameterCount == 0, otherwise must have InputProcessParameterCount elements + // OutputProcessParameterCount - [in] number of output buffers, matches respective OutputLockedParameterCount parameter given to LockForProcess + // pOutputProcessParameters - [in/out] array of output process buffer parameter structures, may be NULL if OutputProcessParameterCount == 0, otherwise must have OutputProcessParameterCount elements + // IsEnabled - [in] TRUE to process normally, FALSE to process thru + // + // RETURN VALUE: + // void + //// + STDMETHOD_(void, Process) (THIS_ UINT32 InputProcessParameterCount, _In_reads_opt_(InputProcessParameterCount) const XAPO_PROCESS_BUFFER_PARAMETERS* pInputProcessParameters, UINT32 OutputProcessParameterCount, _Inout_updates_opt_(OutputProcessParameterCount) XAPO_PROCESS_BUFFER_PARAMETERS* pOutputProcessParameters, BOOL IsEnabled) PURE; + + //// + // DESCRIPTION: + // Returns the number of input frames required to generate the + // requested number of output frames. + // + // REMARKS: + // XAudio2 may call this method to determine how many input frames + // an XAPO requires. This is constant for locked CBR XAPOs; + // this method need only be called once while an XAPO is locked. + // + // XAudio2 calls this method only if the XAPO is locked. + // This method should not block as it is called from the + // realtime thread. + // + // PARAMETERS: + // OutputFrameCount - [in] requested number of output frames, must be within respective [0, XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS.MaxFrameCount], always XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS.MaxFrameCount for CBR/user-defined XAPOs + // + // RETURN VALUE: + // number of input frames required + //// + STDMETHOD_(UINT32, CalcInputFrames) (THIS_ UINT32 OutputFrameCount) PURE; + + //// + // DESCRIPTION: + // Returns the number of output frames generated for the + // requested number of input frames. + // + // REMARKS: + // XAudio2 may call this method to determine how many output frames + // an XAPO will generate. This is constant for locked CBR XAPOs; + // this method need only be called once while an XAPO is locked. + // + // XAudio2 calls this method only if the XAPO is locked. + // This method should not block as it is called from the + // realtime thread. + // + // PARAMETERS: + // InputFrameCount - [in] requested number of input frames, must be within respective [0, XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS.MaxFrameCount], always XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS.MaxFrameCount for CBR/user-defined XAPOs + // + // RETURN VALUE: + // number of output frames generated + //// + STDMETHOD_(UINT32, CalcOutputFrames) (THIS_ UINT32 InputFrameCount) PURE; + }; + + + + // IXAPOParameters: + // Optional XAPO COM interface that allows an XAPO to use + // effect-specific parameters. + #undef INTERFACE + #define INTERFACE IXAPOParameters + DECLARE_INTERFACE_(IXAPOParameters, IUnknown) { + //// + // DESCRIPTION: + // Sets effect-specific parameters. + // + // REMARKS: + // This method may only be called on the realtime thread; + // no synchronization between it and IXAPO::Process is necessary. + // + // This method should not block as it is called from the + // realtime thread. + // + // PARAMETERS: + // pParameters - [in] effect-specific parameter block, must be != NULL + // ParameterByteSize - [in] size of pParameters in bytes, must be > 0 + // + // RETURN VALUE: + // void + //// + STDMETHOD_(void, SetParameters) (THIS_ _In_reads_bytes_(ParameterByteSize) const void* pParameters, UINT32 ParameterByteSize) PURE; + + //// + // DESCRIPTION: + // Gets effect-specific parameters. + // + // REMARKS: + // Unlike SetParameters, XAudio2 does not call this method on the + // realtime thread. Thus, the XAPO must protect variables shared + // with SetParameters/Process using appropriate synchronization. + // + // PARAMETERS: + // pParameters - [out] receives effect-specific parameter block, must be != NULL + // ParameterByteSize - [in] size of pParameters in bytes, must be > 0 + // + // RETURN VALUE: + // void + //// + STDMETHOD_(void, GetParameters) (THIS_ _Out_writes_bytes_(ParameterByteSize) void* pParameters, UINT32 ParameterByteSize) PURE; + }; + + +//-------------------------------------------------------------// + // macros to allow XAPO interfaces to be used in C code + #if !defined(__cplusplus) + // IXAPO + #define IXAPO_QueryInterface(This, riid, ppInterface) \ + ( (This)->lpVtbl->QueryInterface(This, riid, ppInterface) ) + + #define IXAPO_AddRef(This) \ + ( (This)->lpVtbl->AddRef(This) ) + + #define IXAPO_Release(This) \ + ( (This)->lpVtbl->Release(This) ) + + #define IXAPO_GetRegistrationProperties(This, ppRegistrationProperties) \ + ( (This)->lpVtbl->GetRegistrationProperties(This, ppRegistrationProperties) ) + + #define IXAPO_IsInputFormatSupported(This, pOutputFormat, pRequestedInputFormat, ppSupportedInputFormat) \ + ( (This)->lpVtbl->IsInputFormatSupported(This, pOutputFormat, pRequestedInputFormat, ppSupportedInputFormat) ) + + #define IXAPO_IsOutputFormatSupported(This, pInputFormat, pRequestedOutputFormat, ppSupportedOutputFormat) \ + ( (This)->lpVtbl->IsOutputFormatSupported(This, pInputFormat, pRequestedOutputFormat, ppSupportedOutputFormat) ) + + #define IXAPO_Initialize(This, pData, DataByteSize) \ + ( (This)->lpVtbl->Initialize(This, pData, DataByteSize) ) + + #define IXAPO_Reset(This) \ + ( (This)->lpVtbl->Reset(This) ) + + #define IXAPO_LockForProcess(This, InputLockedParameterCount, pInputLockedParameters, OutputLockedParameterCount, pOutputLockedParameters) \ + ( (This)->lpVtbl->LockForProcess(This, InputLockedParameterCount, pInputLockedParameters, OutputLockedParameterCount, pOutputLockedParameters) ) + + #define IXAPO_UnlockForProcess(This) \ + ( (This)->lpVtbl->UnlockForProcess(This) ) + + #define IXAPO_Process(This, InputProcessParameterCount, pInputProcessParameters, OutputProcessParameterCount, pOutputProcessParameters, IsEnabled) \ + ( (This)->lpVtbl->Process(This, InputProcessParameterCount, pInputProcessParameters, OutputProcessParameterCount, pOutputProcessParameters, IsEnabled) ) + + #define IXAPO_CalcInputFrames(This, OutputFrameCount) \ + ( (This)->lpVtbl->CalcInputFrames(This, OutputFrameCount) ) + + #define IXAPO_CalcOutputFrames(This, InputFrameCount) \ + ( (This)->lpVtbl->CalcOutputFrames(This, InputFrameCount) ) + + + // IXAPOParameters + #define IXAPOParameters_QueryInterface(This, riid, ppInterface) \ + ( (This)->lpVtbl->QueryInterface(This, riid, ppInterface) ) + + #define IXAPOParameters_AddRef(This) \ + ( (This)->lpVtbl->AddRef(This) ) + + #define IXAPOParameters_Release(This) \ + ( (This)->lpVtbl->Release(This) ) + + #define IXAPOParameters_SetParameters(This, pParameters, ParameterByteSize) \ + ( (This)->lpVtbl->SetParameters(This, pParameters, ParameterByteSize) ) + + #define IXAPOParameters_GetParameters(This, pParameters, ParameterByteSize) \ + ( (This)->lpVtbl->GetParameters(This, pParameters, ParameterByteSize) ) + #endif // !defined(__cplusplus) + + + #pragma pack(pop) // revert packing alignment +#endif // !defined(GUID_DEFS_ONLY) + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_TV_APP | WINAPI_PARTITION_TV_TITLE) */ +/*#pragma endregion*/ +//---------------------------------<-EOF->----------------------------------// diff --git a/gfx/include/dxsdk/xapobase.h b/gfx/include/dxsdk/xapobase.h new file mode 100644 index 0000000000..a26bf77571 --- /dev/null +++ b/gfx/include/dxsdk/xapobase.h @@ -0,0 +1,352 @@ +/*-========================================================================-_ + | - XAPO - | + | Copyright (c) Microsoft Corporation. All rights reserved. | + |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| + |PROJECT: XAPO MODEL: Unmanaged User-mode | + |VERSION: 1.0 EXCEPT: No Exceptions | + |CLASS: N / A MINREQ: WinXP, Xbox360 | + |BASE: N / A DIALECT: MSC++ 14.00 | + |>------------------------------------------------------------------------<| + | DUTY: XAPO base classes | + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ + NOTES: + 1. See XAPO.h for the rules governing XAPO interface behaviour. */ + +#ifdef _MSC_VER +#pragma once +#endif + +//---------------------------------------------------// +#include "XAPO.h" + +// default audio format ranges supported, applies to XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS.pFormat +#define XAPOBASE_DEFAULT_FORMAT_TAG WAVE_FORMAT_IEEE_FLOAT // 32-bit float only, applies to WAVEFORMATEX.wFormatTag or WAVEFORMATEXTENSIBLE.SubFormat when used +#define XAPOBASE_DEFAULT_FORMAT_MIN_CHANNELS XAPO_MIN_CHANNELS // minimum channel count, applies to WAVEFORMATEX.nChannels +#define XAPOBASE_DEFAULT_FORMAT_MAX_CHANNELS XAPO_MAX_CHANNELS // maximum channel count, applies to WAVEFORMATEX.nChannels +#define XAPOBASE_DEFAULT_FORMAT_MIN_FRAMERATE XAPO_MIN_FRAMERATE // minimum framerate, applies to WAVEFORMATEX.nSamplesPerSec +#define XAPOBASE_DEFAULT_FORMAT_MAX_FRAMERATE XAPO_MAX_FRAMERATE // maximum framerate, applies to WAVEFORMATEX.nSamplesPerSec +#define XAPOBASE_DEFAULT_FORMAT_BITSPERSAMPLE 32 // 32-bit float only, applies to WAVEFORMATEX.wBitsPerSample and WAVEFORMATEXTENSIBLE.wValidBitsPerSample when used + +// default XAPO property flags supported, applies to XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS +#define XAPOBASE_DEFAULT_FLAG (XAPO_FLAG_CHANNELS_MUST_MATCH | XAPO_FLAG_FRAMERATE_MUST_MATCH | XAPO_FLAG_BITSPERSAMPLE_MUST_MATCH | XAPO_FLAG_BUFFERCOUNT_MUST_MATCH | XAPO_FLAG_INPLACE_SUPPORTED) + +// default number of input and output buffers supported, applies to XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS +#define XAPOBASE_DEFAULT_BUFFER_COUNT 1 + + +//-------------------------------------------------------------// +// assertion +#if !defined(XAPOASSERT) + #if XAPODEBUG + #define XAPOASSERT(exp) if (!(exp)) { OutputDebugStringA("XAPO ASSERT: " #exp ", {" __FUNCTION__ "}\n"); __debugbreak(); } + #else + #define XAPOASSERT(exp) __assume(exp) + #endif +#endif +#if !defined(XAPOASSERT_NO_OUTPUT) + #if XAPODEBUG + #define XAPOASSERT_NO_OUTPUT(exp) if (!(exp)) { __debugbreak(); } + #else + #define XAPOASSERT_NO_OUTPUT(exp) __assume(exp) + #endif +#endif + + +//-----------------------------------------------------// +#pragma pack(push, 8) // set packing alignment to ensure consistency across arbitrary build environments, and ensure synchronization variables used by Interlocked functionality are correctly aligned + + +// primitive types +typedef float FLOAT32; // 32-bit IEEE float + + + //// + // DESCRIPTION: + // Default implementation of the IXAPO and IUnknown interfaces. + // Provides overridable implementations for all methods save IXAPO::Process. + //// +class __declspec(novtable) CXAPOBase: public IXAPO { +private: + const XAPO_REGISTRATION_PROPERTIES* m_pRegistrationProperties; // pointer to registration properties of the XAPO, set via constructor + + void* m_pfnMatrixMixFunction; // optimal matrix function pointer, used for thru processing + FLOAT32* m_pfl32MatrixCoefficients; // matrix coefficient table, used for thru processing + UINT32 m_nSrcFormatType; // input format type, used for thru processing + BOOL m_fIsScalarMatrix; // TRUE if m_pfl32MatrixCoefficients is diagonal matrix with all main diagonal entries equal, i.e. m_pfnMatrixMixFunction only used for type conversion (no channel conversion), used for thru processing + BOOL m_fIsLocked; // TRUE if XAPO locked via CXAPOBase.LockForProcess + + +protected: + LONG m_lReferenceCount; // COM reference count, must be aligned for atomic operations + + //// + // DESCRIPTION: + // Verifies an audio format falls within the default ranges supported. + // + // REMARKS: + // If pFormat is unsupported, and fOverwrite is TRUE, + // pFormat is overwritten with the nearest format supported. + // Nearest meaning closest bit depth, framerate, and channel count, + // in that order of importance. + // + // PARAMETERS: + // pFormat - [in/out] audio format to examine + // fOverwrite - [in] TRUE to overwrite pFormat if audio format unsupported + // + // RETURN VALUE: + // COM error code, including: + // S_OK - audio format supported, pFormat left untouched + // XAPO_E_FORMAT_UNSUPPORTED - audio format unsupported, pFormat overwritten with nearest audio format supported if fOverwrite TRUE + // E_INVALIDARG - audio format invalid, pFormat left untouched + //// + virtual HRESULT ValidateFormatDefault (_Inout_ WAVEFORMATEX* pFormat, BOOL fOverwrite); + + //// + // DESCRIPTION: + // Verifies that an input/output format pair configuration is supported + // with respect to the XAPO property flags. + // + // REMARKS: + // If pRequestedFormat is unsupported, and fOverwrite is TRUE, + // pRequestedFormat is overwritten with the nearest format supported. + // Nearest meaning closest bit depth, framerate, and channel count, + // in that order of importance. + // + // PARAMETERS: + // pSupportedFormat - [in] audio format known to be supported + // pRequestedFormat - [in/out] audio format to examine, must be WAVEFORMATEXTENSIBLE if fOverwrite TRUE + // fOverwrite - [in] TRUE to overwrite pRequestedFormat if input/output configuration unsupported + // + // RETURN VALUE: + // COM error code, including: + // S_OK - input/output configuration supported, pRequestedFormat left untouched + // XAPO_E_FORMAT_UNSUPPORTED - input/output configuration unsupported, pRequestedFormat overwritten with nearest audio format supported if fOverwrite TRUE + // E_INVALIDARG - either audio format invalid, pRequestedFormat left untouched + //// + HRESULT ValidateFormatPair (const WAVEFORMATEX* pSupportedFormat, _Inout_ WAVEFORMATEX* pRequestedFormat, BOOL fOverwrite); + + //// + // DESCRIPTION: + // This method may be called by an IXAPO::Process implementation + // for thru processing. It copies/mixes data from source to + // destination, making as few changes as possible to the audio data. + // + // REMARKS: + // However, this method is capable of channel upmix/downmix and uses + // the same matrix coefficient table used by windows Vista to do so. + // + // For in-place processing (input buffer == output buffer) + // this method does nothing. + // + // This method should be called only if the XAPO is locked and + // XAPO_FLAG_FRAMERATE_MUST_MATCH is used. + // + // PARAMETERS: + // pInputBuffer - [in] input buffer, format may be INT8, INT16, INT20 (contained in 24 or 32 bits), INT24 (contained in 24 or 32 bits), INT32, or FLOAT32 + // pOutputBuffer - [out] output buffer, format must be FLOAT32 + // FrameCount - [in] number of frames to process + // InputChannelCount - [in] number of input channels + // OutputChannelCount - [in] number of output channels + // MixWithOutput - [in] TRUE to mix with output, FALSE to overwrite output + // + // RETURN VALUE: + // void + //// + void ProcessThru (const void* pInputBuffer, _Inout_updates_(FrameCount*OutputChannelCount) FLOAT32* pOutputBuffer, UINT32 FrameCount, UINT32 InputChannelCount, UINT32 OutputChannelCount, BOOL MixWithOutput); + + // accessors + const XAPO_REGISTRATION_PROPERTIES* GetRegistrationPropertiesInternal () { return m_pRegistrationProperties; } + BOOL IsLocked () { return m_fIsLocked; } + + +public: + CXAPOBase (const XAPO_REGISTRATION_PROPERTIES* pRegistrationProperties); + virtual ~CXAPOBase (); + + // IUnknown methods: + // retrieves the requested interface pointer if supported + STDMETHOD(QueryInterface) (REFIID riid, _Outptr_ void** ppInterface) + { + XAPOASSERT(ppInterface != NULL); + HRESULT hr = S_OK; + + if (riid == __uuidof(IXAPO)) { + *ppInterface = static_cast(this); + AddRef(); + } else if (riid == __uuidof(IUnknown)) { + *ppInterface = static_cast(this); + AddRef(); + } else { + *ppInterface = NULL; + hr = E_NOINTERFACE; + } + + return hr; + } + + // increments reference count + STDMETHOD_(ULONG, AddRef) () + { + return (ULONG)InterlockedIncrement(&m_lReferenceCount); + } + + // decrements reference count and deletes the object if the reference count falls to zero + STDMETHOD_(ULONG, Release) () + { + ULONG uTmpReferenceCount = (ULONG)InterlockedDecrement(&m_lReferenceCount); + if (uTmpReferenceCount == 0) { + delete this; + } + return uTmpReferenceCount; + } + + // IXAPO methods: + // Allocates a copy of the registration properties of the XAPO. + // This default implementation returns a copy of the registration + // properties given to the constructor, allocated via XAPOAlloc. + STDMETHOD(GetRegistrationProperties) (_Outptr_ XAPO_REGISTRATION_PROPERTIES** ppRegistrationProperties); + + // Queries if a specific input format is supported for a given output format. + // This default implementation assumes only the format described by the + // XAPOBASE_DEFAULT_FORMAT values are supported for both input and output. + STDMETHOD(IsInputFormatSupported) (const WAVEFORMATEX* pOutputFormat, const WAVEFORMATEX* pRequestedInputFormat, _Outptr_opt_ WAVEFORMATEX** ppSupportedInputFormat); + + // Queries if a specific output format is supported for a given input format. + // This default implementation assumes only the format described by the + // XAPOBASE_DEFAULT_FORMAT values are supported for both input and output. + STDMETHOD(IsOutputFormatSupported) (const WAVEFORMATEX* pInputFormat, const WAVEFORMATEX* pRequestedOutputFormat, _Outptr_opt_ WAVEFORMATEX** ppSupportedOutputFormat); + + // Performs any effect-specific initialization. + // This default implementation is a no-op and only returns S_OK. + STDMETHOD(Initialize) (_In_reads_bytes_opt_(DataByteSize) const void*, UINT32 DataByteSize) + { + UNREFERENCED_PARAMETER(DataByteSize); + return S_OK; + } + + // Resets variables dependent on frame history. + // This default implementation is a no-op: this base class contains no + // relevant state to reset. + STDMETHOD_(void, Reset) () { return; } + + // Notifies XAPO of buffer formats Process() will be given. + // This default implementation performs basic input/output format + // validation against the XAPO's registration properties. + // Derived XAPOs should call the base implementation first. + STDMETHOD(LockForProcess) (_Pre_equal_to_(OutputLockedParameterCount) UINT32 InputLockedParameterCount, _In_reads_opt_(InputLockedParameterCount) const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pInputLockedParameters, _Pre_equal_to_(InputLockedParameterCount) UINT32 OutputLockedParameterCount, _In_reads_opt_(OutputLockedParameterCount) const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pOutputLockedParameters); + + // Opposite of LockForProcess. + // Derived XAPOs should call the base implementation first. + STDMETHOD_(void, UnlockForProcess) (); + + // Returns the number of input frames required to generate the requested number of output frames. + // By default, this method returns the same number of frames it was passed. + STDMETHOD_(UINT32, CalcInputFrames) (UINT32 OutputFrameCount) { return OutputFrameCount; } + + // Returns the number of output frames generated for the requested number of input frames. + // By default, this method returns the same number of frames it was passed. + STDMETHOD_(UINT32, CalcOutputFrames) (UINT32 InputFrameCount) { return InputFrameCount; } +}; + + + + + +//--------------------------------------------------------------------------// + //// + // DESCRIPTION: + // Extends CXAPOBase, providing a default implementation of the + // IXAPOParameters interface with appropriate synchronization to + // protect variables shared between IXAPOParameters::GetParameters + // and IXAPOParameters::SetParameters/IXAPO::Process. + // + // This class is for parameter blocks whose size is larger than 4 bytes. + // For smaller parameter blocks, use atomic operations directly + // on the parameters for synchronization. + //// +class __declspec(novtable) CXAPOParametersBase: public CXAPOBase, public IXAPOParameters { +private: + BYTE* m_pParameterBlocks; // three contiguous process parameter blocks used for synchronization, user responsible for initialization of parameter blocks before IXAPO::Process/SetParameters/GetParameters called + BYTE* m_pCurrentParameters; // pointer to current process parameters, must be aligned for atomic operations + BYTE* m_pCurrentParametersInternal; // pointer to current process parameters (temp pointer read by SetParameters/BeginProcess/EndProcess) + UINT32 m_uCurrentParametersIndex; // index of current process parameters + UINT32 m_uParameterBlockByteSize; // size of a single parameter block in bytes, must be > 0 + BOOL m_fNewerResultsReady; // TRUE if there exists new processing results not yet picked up by GetParameters(), must be aligned for atomic operations + BOOL m_fProducer; // TRUE if IXAPO::Process produces data to be returned by GetParameters(), SetParameters() and ParametersChanged() disallowed + + +public: + //// + // PARAMETERS: + // pRegistrationProperties - [in] registration properties of the XAPO + // pParameterBlocks - [in] three contiguous process parameter blocks used for synchronization + // uParameterBlockByteSize - [in] size of one of the parameter blocks, must be > 0, should be > 4 + // fProducer - [in] TRUE if IXAPO::Process produces data to be returned by GetParameters() (SetParameters() and ParametersChanged() disallowed) + //// + CXAPOParametersBase (const XAPO_REGISTRATION_PROPERTIES* pRegistrationProperties, _In_reads_bytes_opt_(3*uParameterBlockByteSize) BYTE* pParameterBlocks, UINT32 uParameterBlockByteSize, BOOL fProducer); + virtual ~CXAPOParametersBase (); + + // IUnknown methods: + // retrieves the requested interface pointer if supported + STDMETHOD(QueryInterface) (REFIID riid, _Outptr_result_maybenull_ void** ppInterface) + { + XAPOASSERT(ppInterface != NULL); + HRESULT hr = S_OK; + + if (riid == __uuidof(IXAPOParameters)) { + *ppInterface = static_cast(this); + CXAPOBase::AddRef(); + } else { + hr = CXAPOBase::QueryInterface(riid, ppInterface); + } + + return hr; + } + + // increments reference count + STDMETHOD_(ULONG, AddRef)() { return CXAPOBase::AddRef(); } + + // decrements reference count and deletes the object if the reference count falls to zero + STDMETHOD_(ULONG, Release)() { return CXAPOBase::Release(); } + + // IXAPOParameters methods: + // Sets effect-specific parameters. + // This method may only be called on the realtime audio processing thread. + STDMETHOD_(void, SetParameters) (_In_reads_bytes_(ParameterByteSize) const void* pParameters, UINT32 ParameterByteSize); + + // Gets effect-specific parameters. + // This method may block and should not be called from the realtime thread. + // Get the current parameters via BeginProcess. + STDMETHOD_(void, GetParameters) (_Out_writes_bytes_(ParameterByteSize) void* pParameters, UINT32 ParameterByteSize); + + // Called by SetParameters() to allow for user-defined parameter validation. + // SetParameters validates that ParameterByteSize == m_uParameterBlockByteSize + // so the user may assume/assert ParameterByteSize == m_uParameterBlockByteSize. + // This method should not block as it is called from the realtime thread. + virtual void OnSetParameters (_In_reads_bytes_(ParameterByteSize) const void* pParameters, UINT32 ParameterByteSize) + { + XAPOASSERT(m_uParameterBlockByteSize > 0); + XAPOASSERT(pParameters != NULL); + XAPOASSERT(ParameterByteSize == m_uParameterBlockByteSize); + } + + // Returns TRUE if SetParameters() has been called since the last processing pass. + // May only be used within the XAPO's IXAPO::Process implementation, + // before BeginProcess is called. + BOOL ParametersChanged (); + + // Returns latest process parameters. + // XAPOs must call this method within their IXAPO::Process + // implementation to access latest process parameters in threadsafe manner. + BYTE* BeginProcess (); + + // Notifies CXAPOParametersBase that the XAPO has finished accessing + // the latest process parameters. + // XAPOs must call this method within their IXAPO::Process + // implementation to access latest process parameters in threadsafe manner. + void EndProcess (); +}; + + +#pragma pack(pop) // revert packing alignment +//---------------------------------<-EOF->----------------------------------// diff --git a/gfx/include/dxsdk/xapofx.h b/gfx/include/dxsdk/xapofx.h new file mode 100644 index 0000000000..02f8ab0f85 --- /dev/null +++ b/gfx/include/dxsdk/xapofx.h @@ -0,0 +1,184 @@ +/*-========================================================================-_ + | - XAPOFX - | + | Copyright (c) Microsoft Corporation. All rights reserved. | + |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| + |PROJECT: XAPOFX MODEL: Unmanaged User-mode | + |VERSION: 1.3 EXCEPT: No Exceptions | + |CLASS: N / A MINREQ: WinXP, Xbox360 | + |BASE: N / A DIALECT: MSC++ 14.00 | + |>------------------------------------------------------------------------<| + | DUTY: Cross-platform Audio Processing Objects | + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ +*/ + +#ifdef _MSC_VER +#pragma once +#endif + +#include + +#if(_WIN32_WINNT < _WIN32_WINNT_WIN8) +#error "This version of XAudio2 is available only in Windows 8 or later. Use the XAudio2 headers and libraries from the DirectX SDK with applications that target Windows 7 and earlier versions." +#endif // (_WIN32_WINNT < _WIN32_WINNT_WIN8) + +/*#include */ + +/*#pragma region Application Family*/ +/*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_TV_APP | WINAPI_PARTITION_TV_TITLE)*/ + +//---------------------------------------------------// + +// FX class IDs +class __declspec(uuid("F5E01117-D6C4-485A-A3F5-695196F3DBFA")) FXEQ; +class __declspec(uuid("C4137916-2BE1-46FD-8599-441536F49856")) FXMasteringLimiter; +class __declspec(uuid("7D9ACA56-CB68-4807-B632-B137352E8596")) FXReverb; +class __declspec(uuid("5039D740-F736-449A-84D3-A56202557B87")) FXEcho; + + +#if !defined(GUID_DEFS_ONLY) // ignore rest if only GUID definitions requested + #include + #include + #include // float bounds + + + // EQ parameter bounds (inclusive), used with FXEQ: + #define FXEQ_MIN_FRAMERATE 22000 + #define FXEQ_MAX_FRAMERATE 48000 + + #define FXEQ_MIN_FREQUENCY_CENTER 20.0f + #define FXEQ_MAX_FREQUENCY_CENTER 20000.0f + #define FXEQ_DEFAULT_FREQUENCY_CENTER_0 100.0f // band 0 + #define FXEQ_DEFAULT_FREQUENCY_CENTER_1 800.0f // band 1 + #define FXEQ_DEFAULT_FREQUENCY_CENTER_2 2000.0f // band 2 + #define FXEQ_DEFAULT_FREQUENCY_CENTER_3 10000.0f // band 3 + + #define FXEQ_MIN_GAIN 0.126f // -18dB + #define FXEQ_MAX_GAIN 7.94f // +18dB + #define FXEQ_DEFAULT_GAIN 1.0f // 0dB change, all bands + + #define FXEQ_MIN_BANDWIDTH 0.1f + #define FXEQ_MAX_BANDWIDTH 2.0f + #define FXEQ_DEFAULT_BANDWIDTH 1.0f // all bands + + + // Mastering limiter parameter bounds (inclusive), used with FXMasteringLimiter: + #define FXMASTERINGLIMITER_MIN_RELEASE 1 + #define FXMASTERINGLIMITER_MAX_RELEASE 20 + #define FXMASTERINGLIMITER_DEFAULT_RELEASE 6 + + #define FXMASTERINGLIMITER_MIN_LOUDNESS 1 + #define FXMASTERINGLIMITER_MAX_LOUDNESS 1800 + #define FXMASTERINGLIMITER_DEFAULT_LOUDNESS 1000 + + + // Reverb parameter bounds (inclusive), used with FXReverb: + #define FXREVERB_MIN_DIFFUSION 0.0f + #define FXREVERB_MAX_DIFFUSION 1.0f + #define FXREVERB_DEFAULT_DIFFUSION 0.9f + + #define FXREVERB_MIN_ROOMSIZE 0.0001f + #define FXREVERB_MAX_ROOMSIZE 1.0f + #define FXREVERB_DEFAULT_ROOMSIZE 0.6f + + + // Echo initialization data/parameter bounds (inclusive), used with FXEcho: + #define FXECHO_MIN_WETDRYMIX 0.0f + #define FXECHO_MAX_WETDRYMIX 1.0f + #define FXECHO_DEFAULT_WETDRYMIX 0.5f + + #define FXECHO_MIN_FEEDBACK 0.0f + #define FXECHO_MAX_FEEDBACK 1.0f + #define FXECHO_DEFAULT_FEEDBACK 0.5f + + #define FXECHO_MIN_DELAY 1.0f + #define FXECHO_MAX_DELAY 2000.0f + #define FXECHO_DEFAULT_DELAY 500.0f + + +//-----------------------------------------------------// + #pragma pack(push, 1) // set packing alignment to ensure consistency across arbitrary build environments + + + // EQ parameters (4 bands), used with IXAPOParameters::SetParameters: + // The EQ supports only FLOAT32 audio foramts. + // The framerate must be within [22000, 48000] Hz. + typedef struct FXEQ_PARAMETERS { + float FrequencyCenter0; // center frequency in Hz, band 0 + float Gain0; // boost/cut + float Bandwidth0; // bandwidth, region of EQ is center frequency +/- bandwidth/2 + float FrequencyCenter1; // band 1 + float Gain1; + float Bandwidth1; + float FrequencyCenter2; // band 2 + float Gain2; + float Bandwidth2; + float FrequencyCenter3; // band 3 + float Gain3; + float Bandwidth3; + } FXEQ_PARAMETERS; + + + // Mastering limiter parameters, used with IXAPOParameters::SetParameters: + // The mastering limiter supports only FLOAT32 audio formats. + typedef struct FXMASTERINGLIMITER_PARAMETERS { + UINT32 Release; // release time (tuning factor with no specific units) + UINT32 Loudness; // loudness target (threshold) + } FXMASTERINGLIMITER_PARAMETERS; + + + // Reverb parameters, used with IXAPOParameters::SetParameters: + // The reverb supports only FLOAT32 audio formats with the following + // channel configurations: + // Input: Mono Output: Mono + // Input: Stereo Output: Stereo + typedef struct FXREVERB_PARAMETERS { + float Diffusion; // diffusion + float RoomSize; // room size + } FXREVERB_PARAMETERS; + + + // Echo initialization data, used with CreateFX: + // Use of this structure is optional, the default MaxDelay is FXECHO_DEFAULT_DELAY. + typedef struct FXECHO_INITDATA { + float MaxDelay; // maximum delay (all channels) in milliseconds, must be within [FXECHO_MIN_DELAY, FXECHO_MAX_DELAY] + } FXECHO_INITDATA; + + // Echo parameters, used with IXAPOParameters::SetParameters: + // The echo supports only FLOAT32 audio formats. + typedef struct FXECHO_PARAMETERS { + float WetDryMix; // ratio of wet (processed) signal to dry (original) signal + float Feedback; // amount of output fed back into input + float Delay; // delay (all channels) in milliseconds, must be within [FXECHO_MIN_DELAY, FXECHO_PARAMETERS.MaxDelay] + } FXECHO_PARAMETERS; + + +//-------------------------------------------------------------// + // function storage-class attribute and calltype + + #if !defined(FXDLL) + #define FX_API_(type) EXTERN_C type STDAPIVCALLTYPE + #else + #if defined(FXEXPORT) + #define FX_API_(type) EXTERN_C __declspec(dllexport) type STDAPIVCALLTYPE + #else + #define FX_API_(type) EXTERN_C __declspec(dllimport) type STDAPIVCALLTYPE + #endif + #endif + + #define FX_IMP_(type) type STDMETHODVCALLTYPE + + +//-------------------------------------------------------// + // creates instance of requested XAPO, use Release to free instance + // pInitData - [in] effect-specific initialization parameters, may be NULL if InitDataByteSize == 0 + // InitDataByteSize - [in] size of pInitData in bytes, may be 0 if pInitData is NULL + FX_API_(HRESULT) CreateFX (REFCLSID clsid, _Outptr_ IUnknown** pEffect, _In_reads_bytes_opt_(InitDataByteSize) const void* pInitData=NULL, UINT32 InitDataByteSize=0); + + + #pragma pack(pop) // revert packing alignment +#endif // !defined(GUID_DEFS_ONLY) + +/*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_TV_APP | WINAPI_PARTITION_TV_TITLE) */ +/*#pragma endregion*/ +//---------------------------------<-EOF->----------------------------------// + diff --git a/gfx/include/dxsdk/xdsp.h b/gfx/include/dxsdk/xdsp.h new file mode 100644 index 0000000000..6ed0dc546d --- /dev/null +++ b/gfx/include/dxsdk/xdsp.h @@ -0,0 +1,754 @@ +/*-========================================================================-_ + | - XDSP - | + | Copyright (c) Microsoft Corporation. All rights reserved. | + |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| + |PROJECT: XDSP MODEL: Unmanaged User-mode | + |VERSION: 1.2 EXCEPT: No Exceptions | + |CLASS: N / A MINREQ: WinXP, Xbox360 | + |BASE: N / A DIALECT: MSC++ 14.00 | + |>------------------------------------------------------------------------<| + | DUTY: DSP functions with CPU extension specific optimizations | + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ + NOTES: + 1. Definition of terms: + DSP: Digital Signal Processing. + FFT: Fast Fourier Transform. + Frame: A block of samples, one per channel, + to be played simultaneously. + + 2. All buffer parameters must be 16-byte aligned. + + 3. All FFT functions support only FLOAT32 audio. */ + +#pragma once +//---------------------------------------------------// +#include // general windows types +#include // trigonometric functions +#if defined(_XBOX) // SIMD intrinsics + #include +#else + #include +#endif + + +//-------------------------------------------------------------// +// assertion +#if !defined(DSPASSERT) + #if DBG + #define DSPASSERT(exp) if (!(exp)) { OutputDebugStringA("XDSP ASSERT: " #exp ", {" __FUNCTION__ "}\n"); __debugbreak(); } + #else + #define DSPASSERT(exp) __assume(exp) + #endif +#endif + +// true if n is a power of 2 +#if !defined(ISPOWEROF2) + #define ISPOWEROF2(n) ( ((n)&((n)-1)) == 0 && (n) != 0 ) +#endif + + +//-----------------------------------------------------------// +namespace XDSP { +#pragma warning(push) +#pragma warning(disable: 4328 4640) // disable "indirection alignment of formal parameter", "construction of local static object is not thread-safe" compile warnings + + +// Helper functions, used by the FFT functions. +// The application need not call them directly. + + // primitive types + typedef __m128 XVECTOR; + typedef XVECTOR& XVECTORREF; + typedef const XVECTOR& XVECTORREFC; + + + // Parallel multiplication of four complex numbers, assuming + // real and imaginary values are stored in separate vectors. + __forceinline void vmulComplex (__out XVECTORREF rResult, __out XVECTORREF iResult, __in XVECTORREFC r1, __in XVECTORREFC i1, __in XVECTORREFC r2, __in XVECTORREFC i2) + { + // (r1, i1) * (r2, i2) = (r1r2 - i1i2, r1i2 + r2i1) + XVECTOR vi1i2 = _mm_mul_ps(i1, i2); + XVECTOR vr1r2 = _mm_mul_ps(r1, r2); + XVECTOR vr1i2 = _mm_mul_ps(r1, i2); + XVECTOR vr2i1 = _mm_mul_ps(r2, i1); + rResult = _mm_sub_ps(vr1r2, vi1i2); // real: (r1*r2 - i1*i2) + iResult = _mm_add_ps(vr1i2, vr2i1); // imaginary: (r1*i2 + r2*i1) + } + __forceinline void vmulComplex (__inout XVECTORREF r1, __inout XVECTORREF i1, __in XVECTORREFC r2, __in XVECTORREFC i2) + { + // (r1, i1) * (r2, i2) = (r1r2 - i1i2, r1i2 + r2i1) + XVECTOR vi1i2 = _mm_mul_ps(i1, i2); + XVECTOR vr1r2 = _mm_mul_ps(r1, r2); + XVECTOR vr1i2 = _mm_mul_ps(r1, i2); + XVECTOR vr2i1 = _mm_mul_ps(r2, i1); + r1 = _mm_sub_ps(vr1r2, vi1i2); // real: (r1*r2 - i1*i2) + i1 = _mm_add_ps(vr1i2, vr2i1); // imaginary: (r1*i2 + r2*i1) + } + + + // Radix-4 decimation-in-time FFT butterfly. + // This version assumes that all four elements of the butterfly are + // adjacent in a single vector. + // + // Compute the product of the complex input vector and the + // 4-element DFT matrix: + // | 1 1 1 1 | | (r1X,i1X) | + // | 1 -j -1 j | | (r1Y,i1Y) | + // | 1 -1 1 -1 | | (r1Z,i1Z) | + // | 1 j -1 -j | | (r1W,i1W) | + // + // This matrix can be decomposed into two simpler ones to reduce the + // number of additions needed. The decomposed matrices look like this: + // | 1 0 1 0 | | 1 0 1 0 | + // | 0 1 0 -j | | 1 0 -1 0 | + // | 1 0 -1 0 | | 0 1 0 1 | + // | 0 1 0 j | | 0 1 0 -1 | + // + // Combine as follows: + // | 1 0 1 0 | | (r1X,i1X) | | (r1X + r1Z, i1X + i1Z) | + // Temp = | 1 0 -1 0 | * | (r1Y,i1Y) | = | (r1X - r1Z, i1X - i1Z) | + // | 0 1 0 1 | | (r1Z,i1Z) | | (r1Y + r1W, i1Y + i1W) | + // | 0 1 0 -1 | | (r1W,i1W) | | (r1Y - r1W, i1Y - i1W) | + // + // | 1 0 1 0 | | (rTempX,iTempX) | | (rTempX + rTempZ, iTempX + iTempZ) | + // Result = | 0 1 0 -j | * | (rTempY,iTempY) | = | (rTempY + iTempW, iTempY - rTempW) | + // | 1 0 -1 0 | | (rTempZ,iTempZ) | | (rTempX - rTempZ, iTempX - iTempZ) | + // | 0 1 0 j | | (rTempW,iTempW) | | (rTempY - iTempW, iTempY + rTempW) | + __forceinline void ButterflyDIT4_1 (__inout XVECTORREF r1, __inout XVECTORREF i1) + { + // sign constants for radix-4 butterflies + const static XVECTOR vDFT4SignBits1 = { 0.0f, -0.0f, 0.0f, -0.0f }; + const static XVECTOR vDFT4SignBits2 = { 0.0f, 0.0f, -0.0f, -0.0f }; + const static XVECTOR vDFT4SignBits3 = { 0.0f, -0.0f, -0.0f, 0.0f }; + + + // calculating Temp + XVECTOR rTemp = _mm_add_ps( _mm_shuffle_ps(r1, r1, _MM_SHUFFLE(1, 1, 0, 0)), // [r1X| r1X|r1Y| r1Y] + + _mm_xor_ps(_mm_shuffle_ps(r1, r1, _MM_SHUFFLE(3, 3, 2, 2)), vDFT4SignBits1) ); // [r1Z|-r1Z|r1W|-r1W] + XVECTOR iTemp = _mm_add_ps( _mm_shuffle_ps(i1, i1, _MM_SHUFFLE(1, 1, 0, 0)), // [i1X| i1X|i1Y| i1Y] + + _mm_xor_ps(_mm_shuffle_ps(i1, i1, _MM_SHUFFLE(3, 3, 2, 2)), vDFT4SignBits1) ); // [i1Z|-i1Z|i1W|-i1W] + + // calculating Result + XVECTOR rZrWiZiW = _mm_shuffle_ps(rTemp, iTemp, _MM_SHUFFLE(3, 2, 3, 2)); // [rTempZ|rTempW|iTempZ|iTempW] + XVECTOR rZiWrZiW = _mm_shuffle_ps(rZrWiZiW, rZrWiZiW, _MM_SHUFFLE(3, 0, 3, 0)); // [rTempZ|iTempW|rTempZ|iTempW] + XVECTOR iZrWiZrW = _mm_shuffle_ps(rZrWiZiW, rZrWiZiW, _MM_SHUFFLE(1, 2, 1, 2)); // [rTempZ|iTempW|rTempZ|iTempW] + r1 = _mm_add_ps( _mm_shuffle_ps(rTemp, rTemp, _MM_SHUFFLE(1, 0, 1, 0)), // [rTempX| rTempY| rTempX| rTempY] + + _mm_xor_ps(rZiWrZiW, vDFT4SignBits2) ); // [rTempZ| iTempW|-rTempZ|-iTempW] + i1 = _mm_add_ps( _mm_shuffle_ps(iTemp, iTemp, _MM_SHUFFLE(1, 0, 1, 0)), // [iTempX| iTempY| iTempX| iTempY] + + _mm_xor_ps(iZrWiZrW, vDFT4SignBits3) ); // [iTempZ|-rTempW|-iTempZ| rTempW] + } + + // Radix-4 decimation-in-time FFT butterfly. + // This version assumes that elements of the butterfly are + // in different vectors, so that each vector in the input + // contains elements from four different butterflies. + // The four separate butterflies are processed in parallel. + // + // The calculations here are the same as the ones in the single-vector + // radix-4 DFT, but instead of being done on a single vector (X,Y,Z,W) + // they are done in parallel on sixteen independent complex values. + // There is no interdependence between the vector elements: + // | 1 0 1 0 | | (rIn0,iIn0) | | (rIn0 + rIn2, iIn0 + iIn2) | + // | 1 0 -1 0 | * | (rIn1,iIn1) | = Temp = | (rIn0 - rIn2, iIn0 - iIn2) | + // | 0 1 0 1 | | (rIn2,iIn2) | | (rIn1 + rIn3, iIn1 + iIn3) | + // | 0 1 0 -1 | | (rIn3,iIn3) | | (rIn1 - rIn3, iIn1 - iIn3) | + // + // | 1 0 1 0 | | (rTemp0,iTemp0) | | (rTemp0 + rTemp2, iTemp0 + iTemp2) | + // Result = | 0 1 0 -j | * | (rTemp1,iTemp1) | = | (rTemp1 + iTemp3, iTemp1 - rTemp3) | + // | 1 0 -1 0 | | (rTemp2,iTemp2) | | (rTemp0 - rTemp2, iTemp0 - iTemp2) | + // | 0 1 0 j | | (rTemp3,iTemp3) | | (rTemp1 - iTemp3, iTemp1 + rTemp3) | + __forceinline void ButterflyDIT4_4 (__inout XVECTORREF r0, + __inout XVECTORREF r1, + __inout XVECTORREF r2, + __inout XVECTORREF r3, + __inout XVECTORREF i0, + __inout XVECTORREF i1, + __inout XVECTORREF i2, + __inout XVECTORREF i3, + __in_ecount(uStride*4) const XVECTOR* __restrict pUnityTableReal, + __in_ecount(uStride*4) const XVECTOR* __restrict pUnityTableImaginary, + const UINT32 uStride, const BOOL fLast) + { + DSPASSERT(pUnityTableReal != NULL); + DSPASSERT(pUnityTableImaginary != NULL); + DSPASSERT((UINT_PTR)pUnityTableReal % 16 == 0); + DSPASSERT((UINT_PTR)pUnityTableImaginary % 16 == 0); + DSPASSERT(ISPOWEROF2(uStride)); + + XVECTOR rTemp0, rTemp1, rTemp2, rTemp3, rTemp4, rTemp5, rTemp6, rTemp7; + XVECTOR iTemp0, iTemp1, iTemp2, iTemp3, iTemp4, iTemp5, iTemp6, iTemp7; + + + // calculating Temp + rTemp0 = _mm_add_ps(r0, r2); iTemp0 = _mm_add_ps(i0, i2); + rTemp2 = _mm_add_ps(r1, r3); iTemp2 = _mm_add_ps(i1, i3); + rTemp1 = _mm_sub_ps(r0, r2); iTemp1 = _mm_sub_ps(i0, i2); + rTemp3 = _mm_sub_ps(r1, r3); iTemp3 = _mm_sub_ps(i1, i3); + rTemp4 = _mm_add_ps(rTemp0, rTemp2); iTemp4 = _mm_add_ps(iTemp0, iTemp2); + rTemp5 = _mm_add_ps(rTemp1, iTemp3); iTemp5 = _mm_sub_ps(iTemp1, rTemp3); + rTemp6 = _mm_sub_ps(rTemp0, rTemp2); iTemp6 = _mm_sub_ps(iTemp0, iTemp2); + rTemp7 = _mm_sub_ps(rTemp1, iTemp3); iTemp7 = _mm_add_ps(iTemp1, rTemp3); + + // calculating Result + // vmulComplex(rTemp0, iTemp0, rTemp0, iTemp0, pUnityTableReal[0], pUnityTableImaginary[0]); // first one is always trivial + vmulComplex(rTemp5, iTemp5, pUnityTableReal[uStride], pUnityTableImaginary[uStride]); + vmulComplex(rTemp6, iTemp6, pUnityTableReal[uStride*2], pUnityTableImaginary[uStride*2]); + vmulComplex(rTemp7, iTemp7, pUnityTableReal[uStride*3], pUnityTableImaginary[uStride*3]); + if (fLast) { + ButterflyDIT4_1(rTemp4, iTemp4); + ButterflyDIT4_1(rTemp5, iTemp5); + ButterflyDIT4_1(rTemp6, iTemp6); + ButterflyDIT4_1(rTemp7, iTemp7); + } + + + r0 = rTemp4; i0 = iTemp4; + r1 = rTemp5; i1 = iTemp5; + r2 = rTemp6; i2 = iTemp6; + r3 = rTemp7; i3 = iTemp7; + } + +//-------------------------------------------------------// + + //// + // DESCRIPTION: + // 4-sample FFT. + // + // PARAMETERS: + // pReal - [inout] real components, must have at least uCount elements + // pImaginary - [inout] imaginary components, must have at least uCount elements + // uCount - [in] number of FFT iterations + // + // RETURN VALUE: + // void + //// + __forceinline void FFT4 (__inout_ecount(uCount) XVECTOR* __restrict pReal, __inout_ecount(uCount) XVECTOR* __restrict pImaginary, const UINT32 uCount=1) + { + DSPASSERT(pReal != NULL); + DSPASSERT(pImaginary != NULL); + DSPASSERT((UINT_PTR)pReal % 16 == 0); + DSPASSERT((UINT_PTR)pImaginary % 16 == 0); + DSPASSERT(ISPOWEROF2(uCount)); + + for (UINT32 uIndex=0; uIndex 16 + // uCount - [in] number of FFT iterations + // + // RETURN VALUE: + // void + //// + inline void FFT (__inout_ecount((uLength*uCount)/4) XVECTOR* __restrict pReal, __inout_ecount((uLength*uCount)/4) XVECTOR* __restrict pImaginary, __in_ecount(uLength*uCount) const XVECTOR* __restrict pUnityTable, const UINT32 uLength, const UINT32 uCount=1) + { + DSPASSERT(pReal != NULL); + DSPASSERT(pImaginary != NULL); + DSPASSERT(pUnityTable != NULL); + DSPASSERT((UINT_PTR)pReal % 16 == 0); + DSPASSERT((UINT_PTR)pImaginary % 16 == 0); + DSPASSERT((UINT_PTR)pUnityTable % 16 == 0); + DSPASSERT(uLength > 16); + DSPASSERT(ISPOWEROF2(uLength)); + DSPASSERT(ISPOWEROF2(uCount)); + + const XVECTOR* __restrict pUnityTableReal = pUnityTable; + const XVECTOR* __restrict pUnityTableImaginary = pUnityTable + (uLength>>2); + const UINT32 uTotal = uCount * uLength; + const UINT32 uTotal_vectors = uTotal >> 2; + const UINT32 uStage_vectors = uLength >> 2; + const UINT32 uStage_vectors_mask = uStage_vectors - 1; + const UINT32 uStride = uLength >> 4; // stride between butterfly elements + const UINT32 uStrideMask = uStride - 1; + const UINT32 uStride2 = uStride * 2; + const UINT32 uStride3 = uStride * 3; + const UINT32 uStrideInvMask = ~uStrideMask; + + + for (UINT32 uIndex=0; uIndex<(uTotal_vectors>>2); ++uIndex) { + const UINT32 n = ((uIndex & uStrideInvMask) << 2) + (uIndex & uStrideMask); + ButterflyDIT4_4(pReal[n], + pReal[n + uStride], + pReal[n + uStride2], + pReal[n + uStride3], + pImaginary[n ], + pImaginary[n + uStride], + pImaginary[n + uStride2], + pImaginary[n + uStride3], + pUnityTableReal + (n & uStage_vectors_mask), + pUnityTableImaginary + (n & uStage_vectors_mask), + uStride, FALSE); + } + + + if (uLength > 16*4) { + FFT(pReal, pImaginary, pUnityTable+(uLength>>1), uLength>>2, uCount*4); + } else if (uLength == 16*4) { + FFT16(pReal, pImaginary, uCount*4); + } else if (uLength == 8*4) { + FFT8(pReal, pImaginary, uCount*4); + } else if (uLength == 4*4) { + FFT4(pReal, pImaginary, uCount*4); + } + } + +//--------------------------------------------------------------------------// + //// + // DESCRIPTION: + // Initializes unity roots lookup table used by FFT functions. + // Once initialized, the table need not be initialized again unless a + // different FFT length is desired. + // + // REMARKS: + // The unity tables of FFT length 16 and below are hard coded into the + // respective FFT functions and so need not be initialized. + // + // PARAMETERS: + // pUnityTable - [out] unity table, receives unity roots lookup table, must have at least uLength elements + // uLength - [in] FFT length in frames, must be a power of 2 > 16 + // + // RETURN VALUE: + // void + //// +inline void FFTInitializeUnityTable (__out_ecount(uLength) XVECTOR* __restrict pUnityTable, UINT32 uLength) +{ + DSPASSERT(pUnityTable != NULL); + DSPASSERT(uLength > 16); + DSPASSERT(ISPOWEROF2(uLength)); + + FLOAT32* __restrict pfUnityTable = (FLOAT32* __restrict)pUnityTable; + + + // initialize unity table for recursive FFT lengths: uLength, uLength/4, uLength/16... > 16 + do { + FLOAT32 flStep = 6.283185307f / uLength; // 2PI / FFT length + uLength >>= 2; + + // pUnityTable[0 to uLength*4-1] contains real components for current FFT length + // pUnityTable[uLength*4 to uLength*8-1] contains imaginary components for current FFT length + for (UINT32 i=0; i<4; ++i) { + for (UINT32 j=0; j 16); +} + + + //// + // DESCRIPTION: + // The FFT functions generate output in bit reversed order. + // Use this function to re-arrange them into order of increasing frequency. + // + // REMARKS: + // + // PARAMETERS: + // pOutput - [out] output buffer, receives samples in order of increasing frequency, cannot overlap pInput, must have at least (1<= 2 + // + // RETURN VALUE: + // void + //// +inline void FFTUnswizzle (__out_ecount((1<= 2); + + FLOAT32* __restrict pfOutput = (FLOAT32* __restrict)pOutput; + const FLOAT32* __restrict pfInput = (const FLOAT32* __restrict)pInput; + const UINT32 uLength = UINT32(1 << uLog2Length); + + + if ((uLog2Length & 0x1) == 0) { + // even powers of two + for (UINT32 uIndex=0; uIndex> 2 ) | ( (n & 0x33333333) << 2 ); + n = ( (n & 0xf0f0f0f0) >> 4 ) | ( (n & 0x0f0f0f0f) << 4 ); + n = ( (n & 0xff00ff00) >> 8 ) | ( (n & 0x00ff00ff) << 8 ); + n = ( (n & 0xffff0000) >> 16 ) | ( (n & 0x0000ffff) << 16 ); + n >>= (32 - uLog2Length); + pfOutput[n] = pfInput[uIndex]; + } + } else { + // odd powers of two + for (UINT32 uIndex=0; uIndex>3); + n = ( (n & 0xcccccccc) >> 2 ) | ( (n & 0x33333333) << 2 ); + n = ( (n & 0xf0f0f0f0) >> 4 ) | ( (n & 0x0f0f0f0f) << 4 ); + n = ( (n & 0xff00ff00) >> 8 ) | ( (n & 0x00ff00ff) << 8 ); + n = ( (n & 0xffff0000) >> 16 ) | ( (n & 0x0000ffff) << 16 ); + n >>= (32 - (uLog2Length-3)); + n |= ((uIndex & 0x7) << (uLog2Length - 3)); + pfOutput[n] = pfInput[uIndex]; + } + } +} + + + //// + // DESCRIPTION: + // Convert complex components to polar form. + // + // PARAMETERS: + // pOutput - [out] output buffer, receives samples in polar form, must have at least uLength/4 elements + // pInputReal - [in] input buffer (real components), must have at least uLength/4 elements + // pInputImaginary - [in] input buffer (imaginary components), must have at least uLength/4 elements + // uLength - [in] FFT length in samples, must be a power of 2 >= 4 + // + // RETURN VALUE: + // void + //// +inline void FFTPolar (__out_ecount(uLength/4) XVECTOR* __restrict pOutput, __in_ecount(uLength/4) const XVECTOR* __restrict pInputReal, __in_ecount(uLength/4) const XVECTOR* __restrict pInputImaginary, const UINT32 uLength) +{ + DSPASSERT(pOutput != NULL); + DSPASSERT(pInputReal != NULL); + DSPASSERT(pInputImaginary != NULL); + DSPASSERT(uLength >= 4); + DSPASSERT(ISPOWEROF2(uLength)); + + FLOAT32 flOneOverLength = 1.0f / uLength; + + + // result = sqrtf((real/uLength)^2 + (imaginary/uLength)^2) * 2 + XVECTOR vOneOverLength = _mm_set_ps1(flOneOverLength); + + for (UINT32 uIndex=0; uIndex<(uLength>>2); ++uIndex) { + XVECTOR vReal = _mm_mul_ps(pInputReal[uIndex], vOneOverLength); + XVECTOR vImaginary = _mm_mul_ps(pInputImaginary[uIndex], vOneOverLength); + XVECTOR vRR = _mm_mul_ps(vReal, vReal); + XVECTOR vII = _mm_mul_ps(vImaginary, vImaginary); + XVECTOR vRRplusII = _mm_add_ps(vRR, vII); + XVECTOR vTotal = _mm_sqrt_ps(vRRplusII); + pOutput[uIndex] = _mm_add_ps(vTotal, vTotal); + } +} + + + + + +//--------------------------------------------------------------------------// + //// + // DESCRIPTION: + // Deinterleaves audio samples such that all samples corresponding to + + // + // REMARKS: + // For example, audio of the form [LRLRLR] becomes [LLLRRR]. + // + // PARAMETERS: + // pOutput - [out] output buffer, receives samples in deinterleaved form, cannot overlap pInput, must have at least (uChannelCount*uFrameCount)/4 elements + // pInput - [in] input buffer, cannot overlap pOutput, must have at least (uChannelCount*uFrameCount)/4 elements + // uChannelCount - [in] number of channels, must be > 1 + // uFrameCount - [in] number of frames of valid data, must be > 0 + // + // RETURN VALUE: + // void + //// +inline void Deinterleave (__out_ecount((uChannelCount*uFrameCount)/4) XVECTOR* __restrict pOutput, __in_ecount((uChannelCount*uFrameCount)/4) const XVECTOR* __restrict pInput, const UINT32 uChannelCount, const UINT32 uFrameCount) +{ + DSPASSERT(pOutput != NULL); + DSPASSERT(pInput != NULL); + DSPASSERT(uChannelCount > 1); + DSPASSERT(uFrameCount > 0); + + FLOAT32* __restrict pfOutput = (FLOAT32* __restrict)pOutput; + const FLOAT32* __restrict pfInput = (const FLOAT32* __restrict)pInput; + + + for (UINT32 uChannel=0; uChannel 1 + // uFrameCount - [in] number of frames of valid data, must be > 0 + // + // RETURN VALUE: + // void + //// +inline void Interleave (__out_ecount((uChannelCount*uFrameCount)/4) XVECTOR* __restrict pOutput, __in_ecount((uChannelCount*uFrameCount)/4) const XVECTOR* __restrict pInput, const UINT32 uChannelCount, const UINT32 uFrameCount) +{ + DSPASSERT(pOutput != NULL); + DSPASSERT(pInput != NULL); + DSPASSERT(uChannelCount > 1); + DSPASSERT(uFrameCount > 0); + + FLOAT32* __restrict pfOutput = (FLOAT32* __restrict)pOutput; + const FLOAT32* __restrict pfInput = (const FLOAT32* __restrict)pInput; + + + for (UINT32 uChannel=0; uChannel 0 && uChannelCount <= 6); + DSPASSERT(uLog2Length >= 2 && uLog2Length <= 9); + + XVECTOR vRealTemp[768]; + XVECTOR vImaginaryTemp[768]; + const UINT32 uLength = UINT32(1 << uLog2Length); + + + if (uChannelCount > 1) { + Deinterleave(vRealTemp, pReal, uChannelCount, uLength); + } else { + CopyMemory(vRealTemp, pReal, (uLength>>2)*sizeof(XVECTOR)); + } + for (UINT32 u=0; u>2); u++) { + vImaginaryTemp[u] = _mm_setzero_ps(); + } + + if (uLength > 16) { + for (UINT32 uChannel=0; uChannel>2)], &vImaginaryTemp[uChannel*(uLength>>2)], pUnityTable, uLength); + } + } else if (uLength == 16) { + for (UINT32 uChannel=0; uChannel>2)], &vImaginaryTemp[uChannel*(uLength>>2)]); + } + } else if (uLength == 8) { + for (UINT32 uChannel=0; uChannel>2)], &vImaginaryTemp[uChannel*(uLength>>2)]); + } + } else if (uLength == 4) { + for (UINT32 uChannel=0; uChannel>2)], &vImaginaryTemp[uChannel*(uLength>>2)]); + } + } + + for (UINT32 uChannel=0; uChannel>2)], &vRealTemp[uChannel*(uLength>>2)], uLog2Length); + FFTUnswizzle(&pImaginary[uChannel*(uLength>>2)], &vImaginaryTemp[uChannel*(uLength>>2)], uLog2Length); + } +} + + + //// + // DESCRIPTION: + // This function applies a 2^N-sample inverse FFT. + // Audio is interleaved if multichannel. + // + // PARAMETERS: + // pReal - [inout] real components, must have at least (1< 0 + // uLog2Length - [in] LOG (base 2) of FFT length in frames, must within [2, 10] + // + // RETURN VALUE: + // void + //// +inline void IFFTDeinterleaved (__inout_ecount((1< 0 && uChannelCount <= 6); + DSPASSERT(uLog2Length >= 2 && uLog2Length <= 9); + + XVECTOR vRealTemp[768]; + XVECTOR vImaginaryTemp[768]; + const UINT32 uLength = UINT32(1 << uLog2Length); + + + const XVECTOR vRnp = _mm_set_ps1(1.0f/uLength); + const XVECTOR vRnm = _mm_set_ps1(-1.0f/uLength); + for (UINT32 u=0; u>2); u++) { + vRealTemp[u] = _mm_mul_ps(pReal[u], vRnp); + vImaginaryTemp[u] = _mm_mul_ps(pImaginary[u], vRnm); + } + + if (uLength > 16) { + for (UINT32 uChannel=0; uChannel>2)], &vImaginaryTemp[uChannel*(uLength>>2)], pUnityTable, uLength); + } + } else if (uLength == 16) { + for (UINT32 uChannel=0; uChannel>2)], &vImaginaryTemp[uChannel*(uLength>>2)]); + } + } else if (uLength == 8) { + for (UINT32 uChannel=0; uChannel>2)], &vImaginaryTemp[uChannel*(uLength>>2)]); + } + } else if (uLength == 4) { + for (UINT32 uChannel=0; uChannel>2)], &vImaginaryTemp[uChannel*(uLength>>2)]); + } + } + + for (UINT32 uChannel=0; uChannel>2)], &vRealTemp[uChannel*(uLength>>2)], uLog2Length); + } + if (uChannelCount > 1) { + Interleave(pReal, vImaginaryTemp, uChannelCount, uLength); + } else { + CopyMemory(pReal, vImaginaryTemp, (uLength>>2)*sizeof(XVECTOR)); + } +} + + +#pragma warning(pop) +}; // namespace XDSP +//---------------------------------<-EOF->----------------------------------// + diff --git a/gfx/include/dxsdk/xma2defs.h b/gfx/include/dxsdk/xma2defs.h new file mode 100644 index 0000000000..13a4306cb8 --- /dev/null +++ b/gfx/include/dxsdk/xma2defs.h @@ -0,0 +1,718 @@ +/*************************************************************************** + * + * Copyright (c) Microsoft Corporation. All rights reserved. + * + * File: xma2defs.h + * Content: Constants, data types and functions for XMA2 compressed audio. + * + ***************************************************************************/ + +#ifndef __XMA2DEFS_INCLUDED__ +#define __XMA2DEFS_INCLUDED__ + +#include // Markers for documenting API semantics +#include // For S_OK, E_FAIL +#include // Basic data types and constants for audio work + + +/*************************************************************************** + * Overview + ***************************************************************************/ + +// A typical XMA2 file contains these RIFF chunks: +// +// 'fmt' or 'XMA2' chunk (or both): A description of the XMA data's structure +// and characteristics (length, channels, sample rate, loops, block size, etc). +// +// 'seek' chunk: A seek table to help navigate the XMA data. +// +// 'data' chunk: The encoded XMA2 data. +// +// The encoded XMA2 data is structured as a set of BLOCKS, which contain PACKETS, +// which contain FRAMES, which contain SUBFRAMES (roughly speaking). The frames +// in a file may also be divided into several subsets, called STREAMS. +// +// FRAME: A variable-sized segment of XMA data that decodes to exactly 512 mono +// or stereo PCM samples. This is the smallest unit of XMA data that can +// be decoded in isolation. Frames are an arbitrary number of bits in +// length, and need not be byte-aligned. See "XMA frame structure" below. +// +// SUBFRAME: A region of bits in an XMA frame that decodes to 128 mono or stereo +// samples. The XMA decoder cannot decode a subframe in isolation; it needs +// a whole frame to work with. However, it can begin emitting the frame's +// decoded samples at any one of the four subframe boundaries. Subframes +// can be addressed for seeking and looping purposes. +// +// PACKET: A 2Kb region containing a 32-bit header and some XMA frames. Frames +// can (and usually do) span packets. A packet's header includes the offset +// in bits of the first frame that begins within that packet. All of the +// frames that begin in a given packet belong to the same "stream" (see the +// Multichannel Audio section below). +// +// STREAM: A set of packets within an XMA file that all contain data for the +// same mono or stereo component of a PCM file with more than two channels. +// The packets comprising a given stream may be interleaved with each other +// more or less arbitrarily; see Multichannel Audio. +// +// BLOCK: An array of XMA packets; or, to break it down differently, a series of +// consecutive XMA frames, padded at the end with reserved data. A block +// must contain at least one 2Kb packet per stream, and it can hold up to +// 4095 packets (8190Kb), but its size is typically in the 32Kb-128Kb range. +// (The size chosen involves a trade-off between memory use and efficiency +// of reading from permanent storage.) +// +// XMA frames do not span blocks, so a block is guaranteed to begin with a +// set of complete frames, one per stream. Also, a block in a multi-stream +// XMA2 file always contains the same number of samples for each stream; +// see Multichannel Audio. +// +// The 'data' chunk in an XMA2 file is an array of XMA2WAVEFORMAT.BlockCount XMA +// blocks, all the same size (as specified in XMA2WAVEFORMAT.BlockSizeInBytes) +// except for the last one, which may be shorter. + + +// MULTICHANNEL AUDIO: the XMA decoder can only decode raw XMA data into either +// mono or stereo PCM data. In order to encode a 6-channel file (say), the file +// must be deinterleaved into 3 stereo streams that are encoded independently, +// producing 3 encoded XMA data streams. Then the packets in these 3 streams +// are interleaved to produce a single XMA2 file, and some information is added +// to the file so that the original 6-channel audio can be reconstructed at +// decode time. This works using the concept of an XMA stream (see above). +// +// The frames for all the streams in an XMA file are interleaved in an arbitrary +// order. To locate a frame that belongs to a given stream in a given XMA block, +// you must examine the first few packets in the block. Here (and only here) the +// packets are guaranteed to be presented in stream order, so that all frames +// beginning in packet 0 belong to stream 0 (the first stereo pair), etc. +// +// (This means that when decoding multi-stream XMA files, only entire XMA blocks +// should be submitted to the decoder; otherwise it cannot know which frames +// belong to which stream.) +// +// Once you have one frame that belongs to a given stream, you can find the next +// one by looking at the frame's 'NextFrameOffsetBits' value (which is stored in +// its first 15 bits; see XMAFRAME below). The GetXmaFrameBitPosition function +// uses this technique. + + +// SEEKING IN XMA2 FILES: Here is some pseudocode to find the byte position and +// subframe in an XMA2 file which will contain sample S when decoded. +// +// 1. Traverse the seek table to find the XMA2 block containing sample S. The +// seek table is an array of big-endian DWORDs, one per block in the file. +// The Nth DWORD is the total number of PCM samples that would be obtained +// by decoding the entire XMA file up to the end of block N. Hence, the +// block we want is the first one whose seek table entry is greater than S. +// (See the GetXmaBlockContainingSample helper function.) +// +// 2. Calculate which frame F within the block found above contains sample S. +// Since each frame decodes to 512 samples, this is straightforward. The +// first frame in the block produces samples X to X + 512, where X is the +// seek table entry for the prior block. So F is (S - X) / 512. +// +// 3. Find the bit offset within the block where frame F starts. Since frames +// are variable-sized, this can only be done by traversing all the frames in +// the block until we reach frame F. (See GetXmaFrameBitPosition.) +// +// 4. Frame F has four 128-sample subframes. To find the subframe containing S, +// we can use the formula (S % 512) / 128. +// +// In the case of multi-stream XMA files, sample S is a multichannel sample with +// parts coming from several frames, one per stream. To find all these frames, +// steps 2-4 need to be repeated for each stream N, using the knowledge that the +// first packets in a block are presented in stream order. The frame traversal +// in step 3 must be started at the first frame in the Nth packet of the block, +// which will be the first frame for stream N. (And the packet header will tell +// you the first frame's start position within the packet.) +// +// Step 1 can be performed using the GetXmaBlockContainingSample function below, +// and steps 2-4 by calling GetXmaDecodePositionForSample once for each stream. + + + +/*************************************************************************** + * XMA constants + ***************************************************************************/ + +// Size of the PCM samples produced by the XMA decoder +#define XMA_OUTPUT_SAMPLE_BYTES 2u +#define XMA_OUTPUT_SAMPLE_BITS (XMA_OUTPUT_SAMPLE_BYTES * 8u) + +// Size of an XMA packet +#define XMA_BYTES_PER_PACKET 2048u +#define XMA_BITS_PER_PACKET (XMA_BYTES_PER_PACKET * 8u) + +// Size of an XMA packet header +#define XMA_PACKET_HEADER_BYTES 4u +#define XMA_PACKET_HEADER_BITS (XMA_PACKET_HEADER_BYTES * 8u) + +// Sample blocks in a decoded XMA frame +#define XMA_SAMPLES_PER_FRAME 512u + +// Sample blocks in a decoded XMA subframe +#define XMA_SAMPLES_PER_SUBFRAME 128u + +// Maximum encoded data that can be submitted to the XMA decoder at a time +#define XMA_READBUFFER_MAX_PACKETS 4095u +#define XMA_READBUFFER_MAX_BYTES (XMA_READBUFFER_MAX_PACKETS * XMA_BYTES_PER_PACKET) + +// Maximum size allowed for the XMA decoder's output buffers +#define XMA_WRITEBUFFER_MAX_BYTES (31u * 256u) + +// Required byte alignment of the XMA decoder's output buffers +#define XMA_WRITEBUFFER_BYTE_ALIGNMENT 256u + +// Decode chunk sizes for the XMA_PLAYBACK_INIT.subframesToDecode field +#define XMA_MIN_SUBFRAMES_TO_DECODE 1u +#define XMA_MAX_SUBFRAMES_TO_DECODE 8u +#define XMA_OPTIMAL_SUBFRAMES_TO_DECODE 4u + +// LoopCount<255 means finite repetitions; LoopCount=255 means infinite looping +#define XMA_MAX_LOOPCOUNT 254u +#define XMA_INFINITE_LOOP 255u + + + +/*************************************************************************** + * XMA format structures + ***************************************************************************/ + +// The currently recommended way to express format information for XMA2 files +// is the XMA2WAVEFORMATEX structure. This structure is fully compliant with +// the WAVEFORMATEX standard and contains all the information needed to parse +// and manage XMA2 files in a compact way. + +#define WAVE_FORMAT_XMA2 0x166 + +typedef struct XMA2WAVEFORMATEX +{ + WAVEFORMATEX wfx; + // Meaning of the WAVEFORMATEX fields here: + // wFormatTag; // Audio format type; always WAVE_FORMAT_XMA2 + // nChannels; // Channel count of the decoded audio + // nSamplesPerSec; // Sample rate of the decoded audio + // nAvgBytesPerSec; // Used internally by the XMA encoder + // nBlockAlign; // Decoded sample size; channels * wBitsPerSample / 8 + // wBitsPerSample; // Bits per decoded mono sample; always 16 for XMA + // cbSize; // Size in bytes of the rest of this structure (34) + + WORD NumStreams; // Number of audio streams (1 or 2 channels each) + DWORD ChannelMask; // Spatial positions of the channels in this file, + // stored as SPEAKER_xxx values (see audiodefs.h) + DWORD SamplesEncoded; // Total number of PCM samples the file decodes to + DWORD BytesPerBlock; // XMA block size (but the last one may be shorter) + DWORD PlayBegin; // First valid sample in the decoded audio + DWORD PlayLength; // Length of the valid part of the decoded audio + DWORD LoopBegin; // Beginning of the loop region in decoded sample terms + DWORD LoopLength; // Length of the loop region in decoded sample terms + BYTE LoopCount; // Number of loop repetitions; 255 = infinite + BYTE EncoderVersion; // Version of XMA encoder that generated the file + WORD BlockCount; // XMA blocks in file (and entries in its seek table) +} XMA2WAVEFORMATEX, *PXMA2WAVEFORMATEX; + + +// The legacy XMA format structures are described here for reference, but they +// should not be used in new content. XMAWAVEFORMAT was the structure used in +// XMA version 1 files. XMA2WAVEFORMAT was used in early XMA2 files; it is not +// placed in the usual 'fmt' RIFF chunk but in its own 'XMA2' chunk. + +#ifndef WAVE_FORMAT_XMA +#define WAVE_FORMAT_XMA 0x0165 + +// Values used in the ChannelMask fields below. Similar to the SPEAKER_xxx +// values defined in audiodefs.h, but modified to fit in a single byte. +#ifndef XMA_SPEAKER_LEFT + #define XMA_SPEAKER_LEFT 0x01 + #define XMA_SPEAKER_RIGHT 0x02 + #define XMA_SPEAKER_CENTER 0x04 + #define XMA_SPEAKER_LFE 0x08 + #define XMA_SPEAKER_LEFT_SURROUND 0x10 + #define XMA_SPEAKER_RIGHT_SURROUND 0x20 + #define XMA_SPEAKER_LEFT_BACK 0x40 + #define XMA_SPEAKER_RIGHT_BACK 0x80 +#endif + + +// Used in XMAWAVEFORMAT for per-stream data +typedef struct XMASTREAMFORMAT +{ + DWORD PsuedoBytesPerSec; // Used by the XMA encoder (typo preserved for legacy reasons) + DWORD SampleRate; // The stream's decoded sample rate (in XMA2 files, + // this is the same for all streams in the file). + DWORD LoopStart; // Bit offset of the frame containing the loop start + // point, relative to the beginning of the stream. + DWORD LoopEnd; // Bit offset of the frame containing the loop end. + BYTE SubframeData; // Two 4-bit numbers specifying the exact location of + // the loop points within the frames that contain them. + // SubframeEnd: Subframe of the loop end frame where + // the loop ends. Ranges from 0 to 3. + // SubframeSkip: Subframes to skip in the start frame to + // reach the loop. Ranges from 0 to 4. + BYTE Channels; // Number of channels in the stream (1 or 2) + WORD ChannelMask; // Spatial positions of the channels in the stream +} XMASTREAMFORMAT; + +// Legacy XMA1 format structure +typedef struct XMAWAVEFORMAT +{ + WORD FormatTag; // Audio format type (always WAVE_FORMAT_XMA) + WORD BitsPerSample; // Bit depth (currently required to be 16) + WORD EncodeOptions; // Options for XMA encoder/decoder + WORD LargestSkip; // Largest skip used in interleaving streams + WORD NumStreams; // Number of interleaved audio streams + BYTE LoopCount; // Number of loop repetitions; 255 = infinite + BYTE Version; // XMA encoder version that generated the file. + // Always 3 or higher for XMA2 files. + XMASTREAMFORMAT XmaStreams[1]; // Per-stream format information; the actual + // array length is in the NumStreams field. +} XMAWAVEFORMAT; + + +// Used in XMA2WAVEFORMAT for per-stream data +typedef struct XMA2STREAMFORMAT +{ + BYTE Channels; // Number of channels in the stream (1 or 2) + BYTE RESERVED; // Reserved for future use + WORD ChannelMask; // Spatial positions of the channels in the stream +} XMA2STREAMFORMAT; + +// Legacy XMA2 format structure (big-endian byte ordering) +typedef struct XMA2WAVEFORMAT +{ + BYTE Version; // XMA encoder version that generated the file. + // Always 3 or higher for XMA2 files. + BYTE NumStreams; // Number of interleaved audio streams + BYTE RESERVED; // Reserved for future use + BYTE LoopCount; // Number of loop repetitions; 255 = infinite + DWORD LoopBegin; // Loop begin point, in samples + DWORD LoopEnd; // Loop end point, in samples + DWORD SampleRate; // The file's decoded sample rate + DWORD EncodeOptions; // Options for the XMA encoder/decoder + DWORD PsuedoBytesPerSec; // Used internally by the XMA encoder + DWORD BlockSizeInBytes; // Size in bytes of this file's XMA blocks (except + // possibly the last one). Always a multiple of + // 2Kb, since XMA blocks are arrays of 2Kb packets. + DWORD SamplesEncoded; // Total number of PCM samples encoded in this file + DWORD SamplesInSource; // Actual number of PCM samples in the source + // material used to generate this file + DWORD BlockCount; // Number of XMA blocks in this file (and hence + // also the number of entries in its seek table) + XMA2STREAMFORMAT Streams[1]; // Per-stream format information; the actual + // array length is in the NumStreams field. +} XMA2WAVEFORMAT; + +#endif // #ifndef WAVE_FORMAT_XMA + + + +/*************************************************************************** + * XMA packet structure (in big-endian form) + ***************************************************************************/ + +typedef struct XMA2PACKET +{ + int FrameCount : 6; // Number of XMA frames that begin in this packet + int FrameOffsetInBits : 15; // Bit of XmaData where the first complete frame begins + int PacketMetaData : 3; // Metadata stored in the packet (always 1 for XMA2) + int PacketSkipCount : 8; // How many packets belonging to other streams must be + // skipped to find the next packet belonging to this one + BYTE XmaData[XMA_BYTES_PER_PACKET - sizeof(DWORD)]; // XMA encoded data +} XMA2PACKET; + +// E.g. if the first DWORD of a packet is 0x30107902: +// +// 001100 000001000001111 001 00000010 +// | | | |____ Skip 2 packets to find the next one for this stream +// | | |___________ XMA2 signature (always 001) +// | |_____________________ First frame starts 527 bits into packet +// |________________________________ Packet contains 12 frames + + +// Helper functions to extract the fields above from an XMA packet. (Note that +// the bitfields cannot be read directly on little-endian architectures such as +// the Intel x86, as they are laid out in big-endian form.) + +__inline DWORD GetXmaPacketFrameCount(__in_bcount(1) const BYTE* pPacket) +{ + return (DWORD)(pPacket[0] >> 2); +} + +__inline DWORD GetXmaPacketFirstFrameOffsetInBits(__in_bcount(3) const BYTE* pPacket) +{ + return ((DWORD)(pPacket[0] & 0x3) << 13) | + ((DWORD)(pPacket[1]) << 5) | + ((DWORD)(pPacket[2]) >> 3); +} + +__inline DWORD GetXmaPacketMetadata(__in_bcount(3) const BYTE* pPacket) +{ + return (DWORD)(pPacket[2] & 0x7); +} + +__inline DWORD GetXmaPacketSkipCount(__in_bcount(4) const BYTE* pPacket) +{ + return (DWORD)(pPacket[3]); +} + + + +/*************************************************************************** + * XMA frame structure + ***************************************************************************/ + +// There is no way to represent the XMA frame as a C struct, since it is a +// variable-sized string of bits that need not be stored at a byte-aligned +// position in memory. This is the layout: +// +// XMAFRAME +// { +// LengthInBits: A 15-bit number representing the length of this frame. +// XmaData: Encoded XMA data; its size in bits is (LengthInBits - 15). +// } + +// Size in bits of the frame's initial LengthInBits field +#define XMA_BITS_IN_FRAME_LENGTH_FIELD 15 + +// Special LengthInBits value that marks an invalid final frame +#define XMA_FINAL_FRAME_MARKER 0x7FFF + + + +/*************************************************************************** + * XMA helper functions + ***************************************************************************/ + +// We define a local ASSERT macro to equal the global one if it exists. +// You can define XMA2DEFS_ASSERT in advance to override this default. +#ifndef XMA2DEFS_ASSERT + #ifdef ASSERT + #define XMA2DEFS_ASSERT ASSERT + #else + #define XMA2DEFS_ASSERT(a) /* No-op by default */ + #endif +#endif + + +// GetXmaBlockContainingSample: Use a given seek table to find the XMA block +// containing a given decoded sample. Note that the seek table entries in an +// XMA file are stored in big-endian form and may need to be converted prior +// to calling this function. + +__inline HRESULT GetXmaBlockContainingSample +( + DWORD nBlockCount, // Blocks in the file (= seek table entries) + __in_ecount(nBlockCount) const DWORD* pSeekTable, // Pointer to the seek table data + DWORD nDesiredSample, // Decoded sample to locate + __out DWORD* pnBlockContainingSample, // Index of the block containing the sample + __out DWORD* pnSampleOffsetWithinBlock // Position of the sample in this block +) +{ + DWORD nPreviousTotalSamples = 0; + DWORD nBlock; + DWORD nTotalSamplesSoFar; + + XMA2DEFS_ASSERT(pSeekTable); + XMA2DEFS_ASSERT(pnBlockContainingSample); + XMA2DEFS_ASSERT(pnSampleOffsetWithinBlock); + + for (nBlock = 0; nBlock < nBlockCount; ++nBlock) + { + nTotalSamplesSoFar = pSeekTable[nBlock]; + if (nTotalSamplesSoFar > nDesiredSample) + { + *pnBlockContainingSample = nBlock; + *pnSampleOffsetWithinBlock = nDesiredSample - nPreviousTotalSamples; + return S_OK; + } + nPreviousTotalSamples = nTotalSamplesSoFar; + } + + return E_FAIL; +} + + +// GetXmaFrameLengthInBits: Reads a given frame's LengthInBits field. + +__inline DWORD GetXmaFrameLengthInBits +( + __in_bcount(nBitPosition / 8 + 3) + __in const BYTE* pPacket, // Pointer to XMA packet[s] containing the frame + DWORD nBitPosition // Bit offset of the frame within this packet +) +{ + DWORD nRegion; + DWORD nBytePosition = nBitPosition / 8; + DWORD nBitOffset = nBitPosition % 8; + + if (nBitOffset < 2) // Only need to read 2 bytes (and might not be safe to read more) + { + nRegion = (DWORD)(pPacket[nBytePosition+0]) << 8 | + (DWORD)(pPacket[nBytePosition+1]); + return (nRegion >> (1 - nBitOffset)) & 0x7FFF; // Last 15 bits + } + else // Need to read 3 bytes + { + nRegion = (DWORD)(pPacket[nBytePosition+0]) << 16 | + (DWORD)(pPacket[nBytePosition+1]) << 8 | + (DWORD)(pPacket[nBytePosition+2]); + return (nRegion >> (9 - nBitOffset)) & 0x7FFF; // Last 15 bits + } +} + + +// GetXmaFrameBitPosition: Calculates the bit offset of a given frame within +// an XMA block or set of blocks. Returns 0 on failure. + +__inline DWORD GetXmaFrameBitPosition +( + __in_bcount(nXmaDataBytes) const BYTE* pXmaData, // Pointer to XMA block[s] + DWORD nXmaDataBytes, // Size of pXmaData in bytes + DWORD nStreamIndex, // Stream within which to seek + DWORD nDesiredFrame // Frame sought +) +{ + const BYTE* pCurrentPacket; + DWORD nPacketsExamined = 0; + DWORD nFrameCountSoFar = 0; + DWORD nFramesToSkip; + DWORD nFrameBitOffset; + + XMA2DEFS_ASSERT(pXmaData); + XMA2DEFS_ASSERT(nXmaDataBytes % XMA_BYTES_PER_PACKET == 0); + + // Get the first XMA packet belonging to the desired stream, relying on the + // fact that the first packets for each stream are in consecutive order at + // the beginning of an XMA block. + + pCurrentPacket = pXmaData + nStreamIndex * XMA_BYTES_PER_PACKET; + for (;;) + { + // If we have exceeded the size of the XMA data, return failure + if (pCurrentPacket + XMA_BYTES_PER_PACKET > pXmaData + nXmaDataBytes) + { + return 0; + } + + // If the current packet contains the frame we are looking for... + if (nFrameCountSoFar + GetXmaPacketFrameCount(pCurrentPacket) > nDesiredFrame) + { + // See how many frames in this packet we need to skip to get to it + XMA2DEFS_ASSERT(nDesiredFrame >= nFrameCountSoFar); + nFramesToSkip = nDesiredFrame - nFrameCountSoFar; + + // Get the bit offset of the first frame in this packet + nFrameBitOffset = XMA_PACKET_HEADER_BITS + GetXmaPacketFirstFrameOffsetInBits(pCurrentPacket); + + // Advance nFrameBitOffset to the frame of interest + while (nFramesToSkip--) + { + nFrameBitOffset += GetXmaFrameLengthInBits(pCurrentPacket, nFrameBitOffset); + } + + // The bit offset to return is the number of bits from pXmaData to + // pCurrentPacket plus the bit offset of the frame of interest + return (DWORD)(pCurrentPacket - pXmaData) * 8 + nFrameBitOffset; + } + + // If we haven't found the right packet yet, advance our counters + ++nPacketsExamined; + nFrameCountSoFar += GetXmaPacketFrameCount(pCurrentPacket); + + // And skip to the next packet belonging to the same stream + pCurrentPacket += XMA_BYTES_PER_PACKET * (GetXmaPacketSkipCount(pCurrentPacket) + 1); + } +} + + +// GetLastXmaFrameBitPosition: Calculates the bit offset of the last complete +// frame in an XMA block or set of blocks. + +__inline DWORD GetLastXmaFrameBitPosition +( + __in_bcount(nXmaDataBytes) const BYTE* pXmaData, // Pointer to XMA block[s] + DWORD nXmaDataBytes, // Size of pXmaData in bytes + DWORD nStreamIndex // Stream within which to seek +) +{ + const BYTE* pLastPacket; + DWORD nBytesToNextPacket; + DWORD nFrameBitOffset; + DWORD nFramesInLastPacket; + + XMA2DEFS_ASSERT(pXmaData); + XMA2DEFS_ASSERT(nXmaDataBytes % XMA_BYTES_PER_PACKET == 0); + XMA2DEFS_ASSERT(nXmaDataBytes >= XMA_BYTES_PER_PACKET * (nStreamIndex + 1)); + + // Get the first XMA packet belonging to the desired stream, relying on the + // fact that the first packets for each stream are in consecutive order at + // the beginning of an XMA block. + pLastPacket = pXmaData + nStreamIndex * XMA_BYTES_PER_PACKET; + + // Search for the last packet belonging to the desired stream + for (;;) + { + nBytesToNextPacket = XMA_BYTES_PER_PACKET * (GetXmaPacketSkipCount(pLastPacket) + 1); + XMA2DEFS_ASSERT(nBytesToNextPacket); + if (pLastPacket + nBytesToNextPacket + XMA_BYTES_PER_PACKET > pXmaData + nXmaDataBytes) + { + break; // The next packet would extend beyond the end of pXmaData + } + pLastPacket += nBytesToNextPacket; + } + + // The last packet can sometimes have no seekable frames, in which case we + // have to use the previous one + if (GetXmaPacketFrameCount(pLastPacket) == 0) + { + pLastPacket -= nBytesToNextPacket; + } + + // Found the last packet. Get the bit offset of its first frame. + nFrameBitOffset = XMA_PACKET_HEADER_BITS + GetXmaPacketFirstFrameOffsetInBits(pLastPacket); + + // Traverse frames until we reach the last one + nFramesInLastPacket = GetXmaPacketFrameCount(pLastPacket); + while (--nFramesInLastPacket) + { + nFrameBitOffset += GetXmaFrameLengthInBits(pLastPacket, nFrameBitOffset); + } + + // The bit offset to return is the number of bits from pXmaData to + // pLastPacket plus the offset of the last frame in this packet. + return (DWORD)(pLastPacket - pXmaData) * 8 + nFrameBitOffset; +} + + +// GetXmaDecodePositionForSample: Obtains the information needed to make the +// decoder generate audio starting at a given sample position relative to the +// beginning of the given XMA block: the bit offset of the appropriate frame, +// and the right subframe within that frame. This data can be passed directly +// to the XMAPlaybackSetDecodePosition function. + +__inline HRESULT GetXmaDecodePositionForSample +( + __in_bcount(nXmaDataBytes) const BYTE* pXmaData, // Pointer to XMA block[s] + DWORD nXmaDataBytes, // Size of pXmaData in bytes + DWORD nStreamIndex, // Stream within which to seek + DWORD nDesiredSample, // Sample sought + __out DWORD* pnBitOffset, // Returns the bit offset within pXmaData of + // the frame containing the sample sought + __out DWORD* pnSubFrame // Returns the subframe containing the sample +) +{ + DWORD nDesiredFrame = nDesiredSample / XMA_SAMPLES_PER_FRAME; + DWORD nSubFrame = (nDesiredSample % XMA_SAMPLES_PER_FRAME) / XMA_SAMPLES_PER_SUBFRAME; + DWORD nBitOffset = GetXmaFrameBitPosition(pXmaData, nXmaDataBytes, nStreamIndex, nDesiredFrame); + + XMA2DEFS_ASSERT(pnBitOffset); + XMA2DEFS_ASSERT(pnSubFrame); + + if (nBitOffset) + { + *pnBitOffset = nBitOffset; + *pnSubFrame = nSubFrame; + return S_OK; + } + else + { + return E_FAIL; + } +} + + +// GetXmaSampleRate: Obtains the legal XMA sample rate (24, 32, 44.1 or 48Khz) +// corresponding to a generic sample rate. + +__inline DWORD GetXmaSampleRate(DWORD dwGeneralRate) +{ + DWORD dwXmaRate = 48000; // Default XMA rate for all rates above 44100Hz + + if (dwGeneralRate <= 24000) dwXmaRate = 24000; + else if (dwGeneralRate <= 32000) dwXmaRate = 32000; + else if (dwGeneralRate <= 44100) dwXmaRate = 44100; + + return dwXmaRate; +} + + +// Functions to convert between WAVEFORMATEXTENSIBLE channel masks (combinations +// of the SPEAKER_xxx flags defined in audiodefs.h) and XMA channel masks (which +// are limited to eight possible speaker positions: left, right, center, low +// frequency, side left, side right, back left and back right). + +__inline DWORD GetStandardChannelMaskFromXmaMask(BYTE bXmaMask) +{ + DWORD dwStandardMask = 0; + + if (bXmaMask & XMA_SPEAKER_LEFT) dwStandardMask |= SPEAKER_FRONT_LEFT; + if (bXmaMask & XMA_SPEAKER_RIGHT) dwStandardMask |= SPEAKER_FRONT_RIGHT; + if (bXmaMask & XMA_SPEAKER_CENTER) dwStandardMask |= SPEAKER_FRONT_CENTER; + if (bXmaMask & XMA_SPEAKER_LFE) dwStandardMask |= SPEAKER_LOW_FREQUENCY; + if (bXmaMask & XMA_SPEAKER_LEFT_SURROUND) dwStandardMask |= SPEAKER_SIDE_LEFT; + if (bXmaMask & XMA_SPEAKER_RIGHT_SURROUND) dwStandardMask |= SPEAKER_SIDE_RIGHT; + if (bXmaMask & XMA_SPEAKER_LEFT_BACK) dwStandardMask |= SPEAKER_BACK_LEFT; + if (bXmaMask & XMA_SPEAKER_RIGHT_BACK) dwStandardMask |= SPEAKER_BACK_RIGHT; + + return dwStandardMask; +} + +__inline BYTE GetXmaChannelMaskFromStandardMask(DWORD dwStandardMask) +{ + BYTE bXmaMask = 0; + + if (dwStandardMask & SPEAKER_FRONT_LEFT) bXmaMask |= XMA_SPEAKER_LEFT; + if (dwStandardMask & SPEAKER_FRONT_RIGHT) bXmaMask |= XMA_SPEAKER_RIGHT; + if (dwStandardMask & SPEAKER_FRONT_CENTER) bXmaMask |= XMA_SPEAKER_CENTER; + if (dwStandardMask & SPEAKER_LOW_FREQUENCY) bXmaMask |= XMA_SPEAKER_LFE; + if (dwStandardMask & SPEAKER_SIDE_LEFT) bXmaMask |= XMA_SPEAKER_LEFT_SURROUND; + if (dwStandardMask & SPEAKER_SIDE_RIGHT) bXmaMask |= XMA_SPEAKER_RIGHT_SURROUND; + if (dwStandardMask & SPEAKER_BACK_LEFT) bXmaMask |= XMA_SPEAKER_LEFT_BACK; + if (dwStandardMask & SPEAKER_BACK_RIGHT) bXmaMask |= XMA_SPEAKER_RIGHT_BACK; + + return bXmaMask; +} + + +// LocalizeXma2Format: Modifies a XMA2WAVEFORMATEX structure in place to comply +// with the current platform's byte-ordering rules (little- or big-endian). + +__inline HRESULT LocalizeXma2Format(__inout XMA2WAVEFORMATEX* pXma2Format) +{ + #define XMASWAP2BYTES(n) ((WORD)(((n) >> 8) | (((n) & 0xff) << 8))) + #define XMASWAP4BYTES(n) ((DWORD)((n) >> 24 | (n) << 24 | ((n) & 0xff00) << 8 | ((n) & 0xff0000) >> 8)) + + if (pXma2Format->wfx.wFormatTag == WAVE_FORMAT_XMA2) + { + return S_OK; + } + else if (XMASWAP2BYTES(pXma2Format->wfx.wFormatTag) == WAVE_FORMAT_XMA2) + { + pXma2Format->wfx.wFormatTag = XMASWAP2BYTES(pXma2Format->wfx.wFormatTag); + pXma2Format->wfx.nChannels = XMASWAP2BYTES(pXma2Format->wfx.nChannels); + pXma2Format->wfx.nSamplesPerSec = XMASWAP4BYTES(pXma2Format->wfx.nSamplesPerSec); + pXma2Format->wfx.nAvgBytesPerSec = XMASWAP4BYTES(pXma2Format->wfx.nAvgBytesPerSec); + pXma2Format->wfx.nBlockAlign = XMASWAP2BYTES(pXma2Format->wfx.nBlockAlign); + pXma2Format->wfx.wBitsPerSample = XMASWAP2BYTES(pXma2Format->wfx.wBitsPerSample); + pXma2Format->wfx.cbSize = XMASWAP2BYTES(pXma2Format->wfx.cbSize); + pXma2Format->NumStreams = XMASWAP2BYTES(pXma2Format->NumStreams); + pXma2Format->ChannelMask = XMASWAP4BYTES(pXma2Format->ChannelMask); + pXma2Format->SamplesEncoded = XMASWAP4BYTES(pXma2Format->SamplesEncoded); + pXma2Format->BytesPerBlock = XMASWAP4BYTES(pXma2Format->BytesPerBlock); + pXma2Format->PlayBegin = XMASWAP4BYTES(pXma2Format->PlayBegin); + pXma2Format->PlayLength = XMASWAP4BYTES(pXma2Format->PlayLength); + pXma2Format->LoopBegin = XMASWAP4BYTES(pXma2Format->LoopBegin); + pXma2Format->LoopLength = XMASWAP4BYTES(pXma2Format->LoopLength); + pXma2Format->BlockCount = XMASWAP2BYTES(pXma2Format->BlockCount); + return S_OK; + } + else + { + return E_FAIL; // Not a recognizable XMA2 format + } + + #undef XMASWAP2BYTES + #undef XMASWAP4BYTES +} + + +#endif // #ifndef __XMA2DEFS_INCLUDED__ diff --git a/gfx/include/dxsdk/xnamath.h b/gfx/include/dxsdk/xnamath.h new file mode 100644 index 0000000000..daaba0b559 --- /dev/null +++ b/gfx/include/dxsdk/xnamath.h @@ -0,0 +1,2938 @@ +/*++ + +Copyright (c) Microsoft Corporation. All rights reserved. + +Module Name: + + xnamath.h + +Abstract: + + XNA math library for Windows and Xbox 360 +--*/ + +#if defined(_MSC_VER) && (_MSC_VER > 1000) +#pragma once +#endif + +#ifndef __XNAMATH_H__ +#define __XNAMATH_H__ + +#ifdef __XBOXMATH_H__ +#error XNAMATH and XBOXMATH are incompatible in the same compilation module. Use one or the other. +#endif + +#define XNAMATH_VERSION 203 + +#if !defined(_XM_X64_) && !defined(_XM_X86_) +#if defined(_M_AMD64) || defined(_AMD64_) +#define _XM_X64_ +#elif defined(_M_IX86) || defined(_X86_) +#define _XM_X86_ +#endif +#endif + +#if !defined(_XM_BIGENDIAN_) && !defined(_XM_LITTLEENDIAN_) +#if defined(_XM_X64_) || defined(_XM_X86_) +#define _XM_LITTLEENDIAN_ +#elif defined(_XBOX_VER) +#define _XM_BIGENDIAN_ +#else +#error xnamath.h only supports x86, x64, or XBox 360 targets +#endif +#endif + +#if defined(_XM_X86_) || defined(_XM_X64_) +#define _XM_SSE_INTRINSICS_ +#if !defined(__cplusplus) && !defined(_XM_NO_INTRINSICS_) +#error xnamath.h only supports C compliation for Xbox 360 targets and no intrinsics cases for x86/x64 +#endif +#elif defined(_XBOX_VER) +#if !defined(__VMX128_SUPPORTED) && !defined(_XM_NO_INTRINSICS_) +#error xnamath.h requires VMX128 compiler support for XBOX 360 +#endif // !__VMX128_SUPPORTED && !_XM_NO_INTRINSICS_ +#define _XM_VMX128_INTRINSICS_ +#else +#error xnamath.h only supports x86, x64, or XBox 360 targets +#endif + + +#if defined(_XM_SSE_INTRINSICS_) +#ifndef _XM_NO_INTRINSICS_ +#include +#include +#endif +#elif defined(_XM_VMX128_INTRINSICS_) +#error This version of xnamath.h is for Windows use only +#endif + +#if defined(_XM_SSE_INTRINSICS_) +#pragma warning(push) +#pragma warning(disable:4985) +#endif +#include +#if defined(_XM_SSE_INTRINSICS_) +#pragma warning(pop) +#endif + +#include + +#if !defined(XMINLINE) +#if !defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#define XMINLINE __inline +#else +#define XMINLINE __forceinline +#endif +#endif + +#if !defined(XMFINLINE) +#define XMFINLINE __forceinline +#endif + +#if !defined(XMDEBUG) +#if defined(_DEBUG) +#define XMDEBUG +#endif +#endif // !XMDEBUG + +#if !defined(XMASSERT) +#if defined(_PREFAST_) +#define XMASSERT(Expression) __analysis_assume((Expression)) +#elif defined(XMDEBUG) // !_PREFAST_ +#define XMASSERT(Expression) ((VOID)((Expression) || (XMAssert(#Expression, __FILE__, __LINE__), 0))) +#else // !XMDEBUG +#define XMASSERT(Expression) ((VOID)0) +#endif // !XMDEBUG +#endif // !XMASSERT + +#if !defined(XM_NO_ALIGNMENT) +#define _DECLSPEC_ALIGN_16_ __declspec(align(16)) +#else +#define _DECLSPEC_ALIGN_16_ +#endif + + +#if defined(_MSC_VER) && (_MSC_VER<1500) && (_MSC_VER>=1400) +#define _XM_ISVS2005_ +#endif + +/**************************************************************************** + * + * Constant definitions + * + ****************************************************************************/ + +#define XM_PI 3.141592654f +#define XM_2PI 6.283185307f +#define XM_1DIVPI 0.318309886f +#define XM_1DIV2PI 0.159154943f +#define XM_PIDIV2 1.570796327f +#define XM_PIDIV4 0.785398163f + +#define XM_SELECT_0 0x00000000 +#define XM_SELECT_1 0xFFFFFFFF + +#define XM_PERMUTE_0X 0x00010203 +#define XM_PERMUTE_0Y 0x04050607 +#define XM_PERMUTE_0Z 0x08090A0B +#define XM_PERMUTE_0W 0x0C0D0E0F +#define XM_PERMUTE_1X 0x10111213 +#define XM_PERMUTE_1Y 0x14151617 +#define XM_PERMUTE_1Z 0x18191A1B +#define XM_PERMUTE_1W 0x1C1D1E1F + +#define XM_CRMASK_CR6 0x000000F0 +#define XM_CRMASK_CR6TRUE 0x00000080 +#define XM_CRMASK_CR6FALSE 0x00000020 +#define XM_CRMASK_CR6BOUNDS XM_CRMASK_CR6FALSE + +#define XM_CACHE_LINE_SIZE 64 + +/**************************************************************************** + * + * Macros + * + ****************************************************************************/ + +// Unit conversion + +XMFINLINE FLOAT XMConvertToRadians(FLOAT fDegrees) { return fDegrees * (XM_PI / 180.0f); } +XMFINLINE FLOAT XMConvertToDegrees(FLOAT fRadians) { return fRadians * (180.0f / XM_PI); } + +// Condition register evaluation proceeding a recording (Rc) comparison + +#define XMComparisonAllTrue(CR) (((CR) & XM_CRMASK_CR6TRUE) == XM_CRMASK_CR6TRUE) +#define XMComparisonAnyTrue(CR) (((CR) & XM_CRMASK_CR6FALSE) != XM_CRMASK_CR6FALSE) +#define XMComparisonAllFalse(CR) (((CR) & XM_CRMASK_CR6FALSE) == XM_CRMASK_CR6FALSE) +#define XMComparisonAnyFalse(CR) (((CR) & XM_CRMASK_CR6TRUE) != XM_CRMASK_CR6TRUE) +#define XMComparisonMixed(CR) (((CR) & XM_CRMASK_CR6) == 0) +#define XMComparisonAllInBounds(CR) (((CR) & XM_CRMASK_CR6BOUNDS) == XM_CRMASK_CR6BOUNDS) +#define XMComparisonAnyOutOfBounds(CR) (((CR) & XM_CRMASK_CR6BOUNDS) != XM_CRMASK_CR6BOUNDS) + + +#define XMMin(a, b) (((a) < (b)) ? (a) : (b)) +#define XMMax(a, b) (((a) > (b)) ? (a) : (b)) + +/**************************************************************************** + * + * Data types + * + ****************************************************************************/ + +#pragma warning(push) +#pragma warning(disable:4201 4365 4324) + +#if !defined (_XM_X86_) && !defined(_XM_X64_) +#pragma bitfield_order(push) +#pragma bitfield_order(lsb_to_msb) +#endif // !_XM_X86_ && !_XM_X64_ + +#if defined(_XM_NO_INTRINSICS_) && !defined(_XBOX_VER) +// The __vector4 structure is an intrinsic on Xbox but must be separately defined +// for x86/x64 +typedef struct __vector4 +{ + union + { + float vector4_f32[4]; + unsigned int vector4_u32[4]; +#ifndef XM_STRICT_VECTOR4 + struct + { + FLOAT x; + FLOAT y; + FLOAT z; + FLOAT w; + }; + FLOAT v[4]; + UINT u[4]; +#endif // !XM_STRICT_VECTOR4 + }; +} __vector4; +#endif // _XM_NO_INTRINSICS_ + +#if (defined (_XM_X86_) || defined(_XM_X64_)) && defined(_XM_NO_INTRINSICS_) +typedef UINT __vector4i[4]; +#else +typedef __declspec(align(16)) UINT __vector4i[4]; +#endif + +// Vector intrinsic: Four 32 bit floating point components aligned on a 16 byte +// boundary and mapped to hardware vector registers +#if defined(_XM_SSE_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) +typedef __m128 XMVECTOR; +#else +typedef __vector4 XMVECTOR; +#endif + +// Conversion types for constants +typedef _DECLSPEC_ALIGN_16_ struct XMVECTORF32 { + union { + float f[4]; + XMVECTOR v; + }; + +#if defined(__cplusplus) + inline operator XMVECTOR() const { return v; } +#if !defined(_XM_NO_INTRINSICS_) && defined(_XM_SSE_INTRINSICS_) + inline operator __m128i() const { return reinterpret_cast(&v)[0]; } + inline operator __m128d() const { return reinterpret_cast(&v)[0]; } +#endif +#endif // __cplusplus +} XMVECTORF32; + +typedef _DECLSPEC_ALIGN_16_ struct XMVECTORI32 { + union { + INT i[4]; + XMVECTOR v; + }; +#if defined(__cplusplus) + inline operator XMVECTOR() const { return v; } +#if !defined(_XM_NO_INTRINSICS_) && defined(_XM_SSE_INTRINSICS_) + inline operator __m128i() const { return reinterpret_cast(&v)[0]; } + inline operator __m128d() const { return reinterpret_cast(&v)[0]; } +#endif +#endif // __cplusplus +} XMVECTORI32; + +typedef _DECLSPEC_ALIGN_16_ struct XMVECTORU8 { + union { + BYTE u[16]; + XMVECTOR v; + }; +#if defined(__cplusplus) + inline operator XMVECTOR() const { return v; } +#if !defined(_XM_NO_INTRINSICS_) && defined(_XM_SSE_INTRINSICS_) + inline operator __m128i() const { return reinterpret_cast(&v)[0]; } + inline operator __m128d() const { return reinterpret_cast(&v)[0]; } +#endif +#endif // __cplusplus +} XMVECTORU8; + +typedef _DECLSPEC_ALIGN_16_ struct XMVECTORU32 { + union { + UINT u[4]; + XMVECTOR v; + }; +#if defined(__cplusplus) + inline operator XMVECTOR() const { return v; } +#if !defined(_XM_NO_INTRINSICS_) && defined(_XM_SSE_INTRINSICS_) + inline operator __m128i() const { return reinterpret_cast(&v)[0]; } + inline operator __m128d() const { return reinterpret_cast(&v)[0]; } +#endif +#endif // __cplusplus +} XMVECTORU32; + +// Fix-up for (1st-3rd) XMVECTOR parameters that are pass-in-register for x86 and Xbox 360, but not for other targets +#if defined(_XM_VMX128_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) +typedef const XMVECTOR FXMVECTOR; +#elif defined(_XM_X86_) && !defined(_XM_NO_INTRINSICS_) +typedef const XMVECTOR FXMVECTOR; +#elif defined(__cplusplus) +typedef const XMVECTOR& FXMVECTOR; +#else +typedef const XMVECTOR FXMVECTOR; +#endif + +// Fix-up for (4th+) XMVECTOR parameters to pass in-register for Xbox 360 and by reference otherwise +#if defined(_XM_VMX128_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) +typedef const XMVECTOR CXMVECTOR; +#elif defined(__cplusplus) +typedef const XMVECTOR& CXMVECTOR; +#else +typedef const XMVECTOR CXMVECTOR; +#endif + +// Vector operators +#if defined(__cplusplus) && !defined(XM_NO_OPERATOR_OVERLOADS) + +XMVECTOR operator+ (FXMVECTOR V); +XMVECTOR operator- (FXMVECTOR V); + +XMVECTOR& operator+= (XMVECTOR& V1, FXMVECTOR V2); +XMVECTOR& operator-= (XMVECTOR& V1, FXMVECTOR V2); +XMVECTOR& operator*= (XMVECTOR& V1, FXMVECTOR V2); +XMVECTOR& operator/= (XMVECTOR& V1, FXMVECTOR V2); +XMVECTOR& operator*= (XMVECTOR& V, FLOAT S); +XMVECTOR& operator/= (XMVECTOR& V, FLOAT S); + +XMVECTOR operator+ (FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR operator- (FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR operator* (FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR operator/ (FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR operator* (FXMVECTOR V, FLOAT S); +XMVECTOR operator* (FLOAT S, FXMVECTOR V); +XMVECTOR operator/ (FXMVECTOR V, FLOAT S); + +#endif // __cplusplus && !XM_NO_OPERATOR_OVERLOADS + +// Matrix type: Sixteen 32 bit floating point components aligned on a +// 16 byte boundary and mapped to four hardware vector registers +#if (defined(_XM_X86_) || defined(_XM_X64_)) && defined(_XM_NO_INTRINSICS_) +typedef struct _XMMATRIX +#else +typedef _DECLSPEC_ALIGN_16_ struct _XMMATRIX +#endif +{ + union + { + XMVECTOR r[4]; + struct + { + FLOAT _11, _12, _13, _14; + FLOAT _21, _22, _23, _24; + FLOAT _31, _32, _33, _34; + FLOAT _41, _42, _43, _44; + }; + FLOAT m[4][4]; + }; + +#ifdef __cplusplus + + _XMMATRIX() {}; + _XMMATRIX(FXMVECTOR R0, FXMVECTOR R1, FXMVECTOR R2, CXMVECTOR R3); + _XMMATRIX(FLOAT m00, FLOAT m01, FLOAT m02, FLOAT m03, + FLOAT m10, FLOAT m11, FLOAT m12, FLOAT m13, + FLOAT m20, FLOAT m21, FLOAT m22, FLOAT m23, + FLOAT m30, FLOAT m31, FLOAT m32, FLOAT m33); + _XMMATRIX(CONST FLOAT *pArray); + + FLOAT operator() (UINT Row, UINT Column) CONST { return m[Row][Column]; } + FLOAT& operator() (UINT Row, UINT Column) { return m[Row][Column]; } + + _XMMATRIX& operator= (CONST _XMMATRIX& M); + +#ifndef XM_NO_OPERATOR_OVERLOADS + _XMMATRIX& operator*= (CONST _XMMATRIX& M); + _XMMATRIX operator* (CONST _XMMATRIX& M) CONST; +#endif // !XM_NO_OPERATOR_OVERLOADS + +#endif // __cplusplus + +} XMMATRIX; + +// Fix-up for XMMATRIX parameters to pass in-register on Xbox 360, by reference otherwise +#if defined(_XM_VMX128_INTRINSICS_) +typedef const XMMATRIX CXMMATRIX; +#elif defined(__cplusplus) +typedef const XMMATRIX& CXMMATRIX; +#else +typedef const XMMATRIX CXMMATRIX; +#endif + +// 16 bit floating point number consisting of a sign bit, a 5 bit biased +// exponent, and a 10 bit mantissa +//typedef WORD HALF; +typedef USHORT HALF; + +// 2D Vector; 32 bit floating point components +typedef struct _XMFLOAT2 +{ + FLOAT x; + FLOAT y; + +#ifdef __cplusplus + + _XMFLOAT2() {}; + _XMFLOAT2(FLOAT _x, FLOAT _y) : x(_x), y(_y) {}; + _XMFLOAT2(CONST FLOAT *pArray); + + _XMFLOAT2& operator= (CONST _XMFLOAT2& Float2); + +#endif // __cplusplus + +} XMFLOAT2; + +// 2D Vector; 32 bit floating point components aligned on a 16 byte boundary +#ifdef __cplusplus +__declspec(align(16)) struct XMFLOAT2A : public XMFLOAT2 +{ + XMFLOAT2A() : XMFLOAT2() {}; + XMFLOAT2A(FLOAT _x, FLOAT _y) : XMFLOAT2(_x, _y) {}; + XMFLOAT2A(CONST FLOAT *pArray) : XMFLOAT2(pArray) {}; + + XMFLOAT2A& operator= (CONST XMFLOAT2A& Float2); +}; +#else +typedef __declspec(align(16)) XMFLOAT2 XMFLOAT2A; +#endif // __cplusplus + +// 2D Vector; 16 bit floating point components +typedef struct _XMHALF2 +{ + HALF x; + HALF y; + +#ifdef __cplusplus + + _XMHALF2() {}; + _XMHALF2(HALF _x, HALF _y) : x(_x), y(_y) {}; + _XMHALF2(CONST HALF *pArray); + _XMHALF2(FLOAT _x, FLOAT _y); + _XMHALF2(CONST FLOAT *pArray); + + _XMHALF2& operator= (CONST _XMHALF2& Half2); + +#endif // __cplusplus + +} XMHALF2; + +// 2D Vector; 16 bit signed normalized integer components +typedef struct _XMSHORTN2 +{ + SHORT x; + SHORT y; + +#ifdef __cplusplus + + _XMSHORTN2() {}; + _XMSHORTN2(SHORT _x, SHORT _y) : x(_x), y(_y) {}; + _XMSHORTN2(CONST SHORT *pArray); + _XMSHORTN2(FLOAT _x, FLOAT _y); + _XMSHORTN2(CONST FLOAT *pArray); + + _XMSHORTN2& operator= (CONST _XMSHORTN2& ShortN2); + +#endif // __cplusplus + +} XMSHORTN2; + +// 2D Vector; 16 bit signed integer components +typedef struct _XMSHORT2 +{ + SHORT x; + SHORT y; + +#ifdef __cplusplus + + _XMSHORT2() {}; + _XMSHORT2(SHORT _x, SHORT _y) : x(_x), y(_y) {}; + _XMSHORT2(CONST SHORT *pArray); + _XMSHORT2(FLOAT _x, FLOAT _y); + _XMSHORT2(CONST FLOAT *pArray); + + _XMSHORT2& operator= (CONST _XMSHORT2& Short2); + +#endif // __cplusplus + +} XMSHORT2; + +// 2D Vector; 16 bit unsigned normalized integer components +typedef struct _XMUSHORTN2 +{ + USHORT x; + USHORT y; + +#ifdef __cplusplus + + _XMUSHORTN2() {}; + _XMUSHORTN2(USHORT _x, USHORT _y) : x(_x), y(_y) {}; + _XMUSHORTN2(CONST USHORT *pArray); + _XMUSHORTN2(FLOAT _x, FLOAT _y); + _XMUSHORTN2(CONST FLOAT *pArray); + + _XMUSHORTN2& operator= (CONST _XMUSHORTN2& UShortN2); + +#endif // __cplusplus + +} XMUSHORTN2; + +// 2D Vector; 16 bit unsigned integer components +typedef struct _XMUSHORT2 +{ + USHORT x; + USHORT y; + +#ifdef __cplusplus + + _XMUSHORT2() {}; + _XMUSHORT2(USHORT _x, USHORT _y) : x(_x), y(_y) {}; + _XMUSHORT2(CONST USHORT *pArray); + _XMUSHORT2(FLOAT _x, FLOAT _y); + _XMUSHORT2(CONST FLOAT *pArray); + + _XMUSHORT2& operator= (CONST _XMUSHORT2& UShort2); + +#endif // __cplusplus + +} XMUSHORT2; + +// 3D Vector; 32 bit floating point components +typedef struct _XMFLOAT3 +{ + FLOAT x; + FLOAT y; + FLOAT z; + +#ifdef __cplusplus + + _XMFLOAT3() {}; + _XMFLOAT3(FLOAT _x, FLOAT _y, FLOAT _z) : x(_x), y(_y), z(_z) {}; + _XMFLOAT3(CONST FLOAT *pArray); + + _XMFLOAT3& operator= (CONST _XMFLOAT3& Float3); + +#endif // __cplusplus + +} XMFLOAT3; + +// 3D Vector; 32 bit floating point components aligned on a 16 byte boundary +#ifdef __cplusplus +__declspec(align(16)) struct XMFLOAT3A : public XMFLOAT3 +{ + XMFLOAT3A() : XMFLOAT3() {}; + XMFLOAT3A(FLOAT _x, FLOAT _y, FLOAT _z) : XMFLOAT3(_x, _y, _z) {}; + XMFLOAT3A(CONST FLOAT *pArray) : XMFLOAT3(pArray) {}; + + XMFLOAT3A& operator= (CONST XMFLOAT3A& Float3); +}; +#else +typedef __declspec(align(16)) XMFLOAT3 XMFLOAT3A; +#endif // __cplusplus + +// 3D Vector; 11-11-10 bit normalized components packed into a 32 bit integer +// The normalized 3D Vector is packed into 32 bits as follows: a 10 bit signed, +// normalized integer for the z component and 11 bit signed, normalized +// integers for the x and y components. The z component is stored in the +// most significant bits and the x component in the least significant bits +// (Z10Y11X11): [32] zzzzzzzz zzyyyyyy yyyyyxxx xxxxxxxx [0] +typedef struct _XMHENDN3 +{ + union + { + struct + { + INT x : 11; // -1023/1023 to 1023/1023 + INT y : 11; // -1023/1023 to 1023/1023 + INT z : 10; // -511/511 to 511/511 + }; + UINT v; + }; + +#ifdef __cplusplus + + _XMHENDN3() {}; + _XMHENDN3(UINT Packed) : v(Packed) {}; + _XMHENDN3(FLOAT _x, FLOAT _y, FLOAT _z); + _XMHENDN3(CONST FLOAT *pArray); + + operator UINT () { return v; } + + _XMHENDN3& operator= (CONST _XMHENDN3& HenDN3); + _XMHENDN3& operator= (CONST UINT Packed); + +#endif // __cplusplus + +} XMHENDN3; + +// 3D Vector; 11-11-10 bit components packed into a 32 bit integer +// The 3D Vector is packed into 32 bits as follows: a 10 bit signed, +// integer for the z component and 11 bit signed integers for the +// x and y components. The z component is stored in the +// most significant bits and the x component in the least significant bits +// (Z10Y11X11): [32] zzzzzzzz zzyyyyyy yyyyyxxx xxxxxxxx [0] +typedef struct _XMHEND3 +{ + union + { + struct + { + INT x : 11; // -1023 to 1023 + INT y : 11; // -1023 to 1023 + INT z : 10; // -511 to 511 + }; + UINT v; + }; + +#ifdef __cplusplus + + _XMHEND3() {}; + _XMHEND3(UINT Packed) : v(Packed) {}; + _XMHEND3(FLOAT _x, FLOAT _y, FLOAT _z); + _XMHEND3(CONST FLOAT *pArray); + + operator UINT () { return v; } + + _XMHEND3& operator= (CONST _XMHEND3& HenD3); + _XMHEND3& operator= (CONST UINT Packed); + +#endif // __cplusplus + +} XMHEND3; + +// 3D Vector; 11-11-10 bit normalized components packed into a 32 bit integer +// The normalized 3D Vector is packed into 32 bits as follows: a 10 bit unsigned, +// normalized integer for the z component and 11 bit unsigned, normalized +// integers for the x and y components. The z component is stored in the +// most significant bits and the x component in the least significant bits +// (Z10Y11X11): [32] zzzzzzzz zzyyyyyy yyyyyxxx xxxxxxxx [0] +typedef struct _XMUHENDN3 +{ + union + { + struct + { + UINT x : 11; // 0/2047 to 2047/2047 + UINT y : 11; // 0/2047 to 2047/2047 + UINT z : 10; // 0/1023 to 1023/1023 + }; + UINT v; + }; + +#ifdef __cplusplus + + _XMUHENDN3() {}; + _XMUHENDN3(UINT Packed) : v(Packed) {}; + _XMUHENDN3(FLOAT _x, FLOAT _y, FLOAT _z); + _XMUHENDN3(CONST FLOAT *pArray); + + operator UINT () { return v; } + + _XMUHENDN3& operator= (CONST _XMUHENDN3& UHenDN3); + _XMUHENDN3& operator= (CONST UINT Packed); + +#endif // __cplusplus + +} XMUHENDN3; + +// 3D Vector; 11-11-10 bit components packed into a 32 bit integer +// The 3D Vector is packed into 32 bits as follows: a 10 bit unsigned +// integer for the z component and 11 bit unsigned integers +// for the x and y components. The z component is stored in the +// most significant bits and the x component in the least significant bits +// (Z10Y11X11): [32] zzzzzzzz zzyyyyyy yyyyyxxx xxxxxxxx [0] +typedef struct _XMUHEND3 +{ + union + { + struct + { + UINT x : 11; // 0 to 2047 + UINT y : 11; // 0 to 2047 + UINT z : 10; // 0 to 1023 + }; + UINT v; + }; + +#ifdef __cplusplus + + _XMUHEND3() {}; + _XMUHEND3(UINT Packed) : v(Packed) {}; + _XMUHEND3(FLOAT _x, FLOAT _y, FLOAT _z); + _XMUHEND3(CONST FLOAT *pArray); + + operator UINT () { return v; } + + _XMUHEND3& operator= (CONST _XMUHEND3& UHenD3); + _XMUHEND3& operator= (CONST UINT Packed); + +#endif // __cplusplus + +} XMUHEND3; + +// 3D Vector; 10-11-11 bit normalized components packed into a 32 bit integer +// The normalized 3D Vector is packed into 32 bits as follows: a 10 bit signed, +// normalized integer for the x component and 11 bit signed, normalized +// integers for the y and z components. The z component is stored in the +// most significant bits and the x component in the least significant bits +// (Z11Y11X10): [32] zzzzzzzz zzzyyyyy yyyyyyxx xxxxxxxx [0] +typedef struct _XMDHENN3 +{ + union + { + struct + { + INT x : 10; // -511/511 to 511/511 + INT y : 11; // -1023/1023 to 1023/1023 + INT z : 11; // -1023/1023 to 1023/1023 + }; + UINT v; + }; + +#ifdef __cplusplus + + _XMDHENN3() {}; + _XMDHENN3(UINT Packed) : v(Packed) {}; + _XMDHENN3(FLOAT _x, FLOAT _y, FLOAT _z); + _XMDHENN3(CONST FLOAT *pArray); + + operator UINT () { return v; } + + _XMDHENN3& operator= (CONST _XMDHENN3& DHenN3); + _XMDHENN3& operator= (CONST UINT Packed); + +#endif // __cplusplus + +} XMDHENN3; + +// 3D Vector; 10-11-11 bit components packed into a 32 bit integer +// The 3D Vector is packed into 32 bits as follows: a 10 bit signed, +// integer for the x component and 11 bit signed integers for the +// y and z components. The w component is stored in the +// most significant bits and the x component in the least significant bits +// (Z11Y11X10): [32] zzzzzzzz zzzyyyyy yyyyyyxx xxxxxxxx [0] +typedef struct _XMDHEN3 +{ + union + { + struct + { + INT x : 10; // -511 to 511 + INT y : 11; // -1023 to 1023 + INT z : 11; // -1023 to 1023 + }; + UINT v; + }; + +#ifdef __cplusplus + + _XMDHEN3() {}; + _XMDHEN3(UINT Packed) : v(Packed) {}; + _XMDHEN3(FLOAT _x, FLOAT _y, FLOAT _z); + _XMDHEN3(CONST FLOAT *pArray); + + operator UINT () { return v; } + + _XMDHEN3& operator= (CONST _XMDHEN3& DHen3); + _XMDHEN3& operator= (CONST UINT Packed); + +#endif // __cplusplus + +} XMDHEN3; + +// 3D Vector; 10-11-11 bit normalized components packed into a 32 bit integer +// The normalized 3D Vector is packed into 32 bits as follows: a 10 bit unsigned, +// normalized integer for the x component and 11 bit unsigned, normalized +// integers for the y and z components. The w component is stored in the +// most significant bits and the x component in the least significant bits +// (Z11Y11X10): [32] zzzzzzzz zzzyyyyy yyyyyyxx xxxxxxxx [0] +typedef struct _XMUDHENN3 +{ + union + { + struct + { + UINT x : 10; // 0/1023 to 1023/1023 + UINT y : 11; // 0/2047 to 2047/2047 + UINT z : 11; // 0/2047 to 2047/2047 + }; + UINT v; + }; + +#ifdef __cplusplus + + _XMUDHENN3() {}; + _XMUDHENN3(UINT Packed) : v(Packed) {}; + _XMUDHENN3(FLOAT _x, FLOAT _y, FLOAT _z); + _XMUDHENN3(CONST FLOAT *pArray); + + operator UINT () { return v; } + + _XMUDHENN3& operator= (CONST _XMUDHENN3& UDHenN3); + _XMUDHENN3& operator= (CONST UINT Packed); + +#endif // __cplusplus + +} XMUDHENN3; + +// 3D Vector; 10-11-11 bit components packed into a 32 bit integer +// The 3D Vector is packed into 32 bits as follows: a 10 bit unsigned, +// integer for the x component and 11 bit unsigned integers +// for the y and z components. The w component is stored in the +// most significant bits and the x component in the least significant bits +// (Z11Y11X10): [32] zzzzzzzz zzzyyyyy yyyyyyxx xxxxxxxx [0] +typedef struct _XMUDHEN3 +{ + union + { + struct + { + UINT x : 10; // 0 to 1023 + UINT y : 11; // 0 to 2047 + UINT z : 11; // 0 to 2047 + }; + UINT v; + }; + +#ifdef __cplusplus + + _XMUDHEN3() {}; + _XMUDHEN3(UINT Packed) : v(Packed) {}; + _XMUDHEN3(FLOAT _x, FLOAT _y, FLOAT _z); + _XMUDHEN3(CONST FLOAT *pArray); + + operator UINT () { return v; } + + _XMUDHEN3& operator= (CONST _XMUDHEN3& UDHen3); + _XMUDHEN3& operator= (CONST UINT Packed); + +#endif // __cplusplus + +} XMUDHEN3; + +// 3D vector: 5/6/5 unsigned integer components +typedef struct _XMU565 +{ + union + { + struct + { + USHORT x : 5; + USHORT y : 6; + USHORT z : 5; + }; + USHORT v; + }; + +#ifdef __cplusplus + + _XMU565() {}; + _XMU565(USHORT Packed) : v(Packed) {}; + _XMU565(CHAR _x, CHAR _y, CHAR _z) : x(_x), y(_y), z(_z) {}; + _XMU565(CONST CHAR *pArray); + _XMU565(FLOAT _x, FLOAT _y, FLOAT _z); + _XMU565(CONST FLOAT *pArray); + + operator USHORT () { return v; } + + _XMU565& operator= (CONST _XMU565& U565); + _XMU565& operator= (CONST USHORT Packed); + +#endif // __cplusplus + +} XMU565; + +// 3D vector: 11/11/10 floating-point components +// The 3D vector is packed into 32 bits as follows: a 5-bit biased exponent +// and 6-bit mantissa for x component, a 5-bit biased exponent and +// 6-bit mantissa for y component, a 5-bit biased exponent and a 5-bit +// mantissa for z. The z component is stored in the most significant bits +// and the x component in the least significant bits. No sign bits so +// all partial-precision numbers are positive. +// (Z10Y11X11): [32] ZZZZZzzz zzzYYYYY yyyyyyXX XXXxxxxx [0] +typedef struct _XMFLOAT3PK +{ + union + { + struct + { + UINT xm : 6; + UINT xe : 5; + UINT ym : 6; + UINT ye : 5; + UINT zm : 5; + UINT ze : 5; + }; + UINT v; + }; + +#ifdef __cplusplus + + _XMFLOAT3PK() {}; + _XMFLOAT3PK(UINT Packed) : v(Packed) {}; + _XMFLOAT3PK(FLOAT _x, FLOAT _y, FLOAT _z); + _XMFLOAT3PK(CONST FLOAT *pArray); + + operator UINT () { return v; } + + _XMFLOAT3PK& operator= (CONST _XMFLOAT3PK& float3pk); + _XMFLOAT3PK& operator= (CONST UINT Packed); + +#endif // __cplusplus + +} XMFLOAT3PK; + +// 3D vector: 9/9/9 floating-point components with shared 5-bit exponent +// The 3D vector is packed into 32 bits as follows: a 5-bit biased exponent +// with 9-bit mantissa for the x, y, and z component. The shared exponent +// is stored in the most significant bits and the x component mantissa is in +// the least significant bits. No sign bits so all partial-precision numbers +// are positive. +// (E5Z9Y9X9): [32] EEEEEzzz zzzzzzyy yyyyyyyx xxxxxxxx [0] +typedef struct _XMFLOAT3SE +{ + union + { + struct + { + UINT xm : 9; + UINT ym : 9; + UINT zm : 9; + UINT e : 5; + }; + UINT v; + }; + +#ifdef __cplusplus + + _XMFLOAT3SE() {}; + _XMFLOAT3SE(UINT Packed) : v(Packed) {}; + _XMFLOAT3SE(FLOAT _x, FLOAT _y, FLOAT _z); + _XMFLOAT3SE(CONST FLOAT *pArray); + + operator UINT () { return v; } + + _XMFLOAT3SE& operator= (CONST _XMFLOAT3SE& float3se); + _XMFLOAT3SE& operator= (CONST UINT Packed); + +#endif // __cplusplus + +} XMFLOAT3SE; + +// 4D Vector; 32 bit floating point components +typedef struct _XMFLOAT4 +{ + FLOAT x; + FLOAT y; + FLOAT z; + FLOAT w; + +#ifdef __cplusplus + + _XMFLOAT4() {}; + _XMFLOAT4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w) : x(_x), y(_y), z(_z), w(_w) {}; + _XMFLOAT4(CONST FLOAT *pArray); + + _XMFLOAT4& operator= (CONST _XMFLOAT4& Float4); + +#endif // __cplusplus + +} XMFLOAT4; + +// 4D Vector; 32 bit floating point components aligned on a 16 byte boundary +#ifdef __cplusplus +__declspec(align(16)) struct XMFLOAT4A : public XMFLOAT4 +{ + XMFLOAT4A() : XMFLOAT4() {}; + XMFLOAT4A(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w) : XMFLOAT4(_x, _y, _z, _w) {}; + XMFLOAT4A(CONST FLOAT *pArray) : XMFLOAT4(pArray) {}; + + XMFLOAT4A& operator= (CONST XMFLOAT4A& Float4); +}; +#else +typedef __declspec(align(16)) XMFLOAT4 XMFLOAT4A; +#endif // __cplusplus + +// 4D Vector; 16 bit floating point components +typedef struct _XMHALF4 +{ + HALF x; + HALF y; + HALF z; + HALF w; + +#ifdef __cplusplus + + _XMHALF4() {}; + _XMHALF4(HALF _x, HALF _y, HALF _z, HALF _w) : x(_x), y(_y), z(_z), w(_w) {}; + _XMHALF4(CONST HALF *pArray); + _XMHALF4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMHALF4(CONST FLOAT *pArray); + + _XMHALF4& operator= (CONST _XMHALF4& Half4); + +#endif // __cplusplus + +} XMHALF4; + +// 4D Vector; 16 bit signed normalized integer components +typedef struct _XMSHORTN4 +{ + SHORT x; + SHORT y; + SHORT z; + SHORT w; + +#ifdef __cplusplus + + _XMSHORTN4() {}; + _XMSHORTN4(SHORT _x, SHORT _y, SHORT _z, SHORT _w) : x(_x), y(_y), z(_z), w(_w) {}; + _XMSHORTN4(CONST SHORT *pArray); + _XMSHORTN4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMSHORTN4(CONST FLOAT *pArray); + + _XMSHORTN4& operator= (CONST _XMSHORTN4& ShortN4); + +#endif // __cplusplus + +} XMSHORTN4; + +// 4D Vector; 16 bit signed integer components +typedef struct _XMSHORT4 +{ + SHORT x; + SHORT y; + SHORT z; + SHORT w; + +#ifdef __cplusplus + + _XMSHORT4() {}; + _XMSHORT4(SHORT _x, SHORT _y, SHORT _z, SHORT _w) : x(_x), y(_y), z(_z), w(_w) {}; + _XMSHORT4(CONST SHORT *pArray); + _XMSHORT4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMSHORT4(CONST FLOAT *pArray); + + _XMSHORT4& operator= (CONST _XMSHORT4& Short4); + +#endif // __cplusplus + +} XMSHORT4; + +// 4D Vector; 16 bit unsigned normalized integer components +typedef struct _XMUSHORTN4 +{ + USHORT x; + USHORT y; + USHORT z; + USHORT w; + +#ifdef __cplusplus + + _XMUSHORTN4() {}; + _XMUSHORTN4(USHORT _x, USHORT _y, USHORT _z, USHORT _w) : x(_x), y(_y), z(_z), w(_w) {}; + _XMUSHORTN4(CONST USHORT *pArray); + _XMUSHORTN4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMUSHORTN4(CONST FLOAT *pArray); + + _XMUSHORTN4& operator= (CONST _XMUSHORTN4& UShortN4); + +#endif // __cplusplus + +} XMUSHORTN4; + +// 4D Vector; 16 bit unsigned integer components +typedef struct _XMUSHORT4 +{ + USHORT x; + USHORT y; + USHORT z; + USHORT w; + +#ifdef __cplusplus + + _XMUSHORT4() {}; + _XMUSHORT4(USHORT _x, USHORT _y, USHORT _z, USHORT _w) : x(_x), y(_y), z(_z), w(_w) {}; + _XMUSHORT4(CONST USHORT *pArray); + _XMUSHORT4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMUSHORT4(CONST FLOAT *pArray); + + _XMUSHORT4& operator= (CONST _XMUSHORT4& UShort4); + +#endif // __cplusplus + +} XMUSHORT4; + +// 4D Vector; 10-10-10-2 bit normalized components packed into a 32 bit integer +// The normalized 4D Vector is packed into 32 bits as follows: a 2 bit unsigned, +// normalized integer for the w component and 10 bit signed, normalized +// integers for the z, y, and x components. The w component is stored in the +// most significant bits and the x component in the least significant bits +// (W2Z10Y10X10): [32] wwzzzzzz zzzzyyyy yyyyyyxx xxxxxxxx [0] +typedef struct _XMXDECN4 +{ + union + { + struct + { + INT x : 10; // -511/511 to 511/511 + INT y : 10; // -511/511 to 511/511 + INT z : 10; // -511/511 to 511/511 + UINT w : 2; // 0/3 to 3/3 + }; + UINT v; + }; + +#ifdef __cplusplus + + _XMXDECN4() {}; + _XMXDECN4(UINT Packed) : v(Packed) {}; + _XMXDECN4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMXDECN4(CONST FLOAT *pArray); + + operator UINT () { return v; } + + _XMXDECN4& operator= (CONST _XMXDECN4& XDecN4); + _XMXDECN4& operator= (CONST UINT Packed); + +#endif // __cplusplus + +} XMXDECN4; + +// 4D Vector; 10-10-10-2 bit components packed into a 32 bit integer +// The normalized 4D Vector is packed into 32 bits as follows: a 2 bit unsigned +// integer for the w component and 10 bit signed integers for the +// z, y, and x components. The w component is stored in the +// most significant bits and the x component in the least significant bits +// (W2Z10Y10X10): [32] wwzzzzzz zzzzyyyy yyyyyyxx xxxxxxxx [0] +typedef struct _XMXDEC4 +{ + union + { + struct + { + INT x : 10; // -511 to 511 + INT y : 10; // -511 to 511 + INT z : 10; // -511 to 511 + UINT w : 2; // 0 to 3 + }; + UINT v; + }; + +#ifdef __cplusplus + + _XMXDEC4() {}; + _XMXDEC4(UINT Packed) : v(Packed) {}; + _XMXDEC4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMXDEC4(CONST FLOAT *pArray); + + operator UINT () { return v; } + + _XMXDEC4& operator= (CONST _XMXDEC4& XDec4); + _XMXDEC4& operator= (CONST UINT Packed); + +#endif // __cplusplus + +} XMXDEC4; + +// 4D Vector; 10-10-10-2 bit normalized components packed into a 32 bit integer +// The normalized 4D Vector is packed into 32 bits as follows: a 2 bit signed, +// normalized integer for the w component and 10 bit signed, normalized +// integers for the z, y, and x components. The w component is stored in the +// most significant bits and the x component in the least significant bits +// (W2Z10Y10X10): [32] wwzzzzzz zzzzyyyy yyyyyyxx xxxxxxxx [0] +typedef struct _XMDECN4 +{ + union + { + struct + { + INT x : 10; // -511/511 to 511/511 + INT y : 10; // -511/511 to 511/511 + INT z : 10; // -511/511 to 511/511 + INT w : 2; // -1/1 to 1/1 + }; + UINT v; + }; + +#ifdef __cplusplus + + _XMDECN4() {}; + _XMDECN4(UINT Packed) : v(Packed) {}; + _XMDECN4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMDECN4(CONST FLOAT *pArray); + + operator UINT () { return v; } + + _XMDECN4& operator= (CONST _XMDECN4& DecN4); + _XMDECN4& operator= (CONST UINT Packed); + +#endif // __cplusplus + +} XMDECN4; + +// 4D Vector; 10-10-10-2 bit components packed into a 32 bit integer +// The 4D Vector is packed into 32 bits as follows: a 2 bit signed, +// integer for the w component and 10 bit signed integers for the +// z, y, and x components. The w component is stored in the +// most significant bits and the x component in the least significant bits +// (W2Z10Y10X10): [32] wwzzzzzz zzzzyyyy yyyyyyxx xxxxxxxx [0] +typedef struct _XMDEC4 +{ + union + { + struct + { + INT x : 10; // -511 to 511 + INT y : 10; // -511 to 511 + INT z : 10; // -511 to 511 + INT w : 2; // -1 to 1 + }; + UINT v; + }; + +#ifdef __cplusplus + + _XMDEC4() {}; + _XMDEC4(UINT Packed) : v(Packed) {}; + _XMDEC4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMDEC4(CONST FLOAT *pArray); + + operator UINT () { return v; } + + _XMDEC4& operator= (CONST _XMDEC4& Dec4); + _XMDEC4& operator= (CONST UINT Packed); + +#endif // __cplusplus + +} XMDEC4; + +// 4D Vector; 10-10-10-2 bit normalized components packed into a 32 bit integer +// The normalized 4D Vector is packed into 32 bits as follows: a 2 bit unsigned, +// normalized integer for the w component and 10 bit unsigned, normalized +// integers for the z, y, and x components. The w component is stored in the +// most significant bits and the x component in the least significant bits +// (W2Z10Y10X10): [32] wwzzzzzz zzzzyyyy yyyyyyxx xxxxxxxx [0] +typedef struct _XMUDECN4 +{ + union + { + struct + { + UINT x : 10; // 0/1023 to 1023/1023 + UINT y : 10; // 0/1023 to 1023/1023 + UINT z : 10; // 0/1023 to 1023/1023 + UINT w : 2; // 0/3 to 3/3 + }; + UINT v; + }; + +#ifdef __cplusplus + + _XMUDECN4() {}; + _XMUDECN4(UINT Packed) : v(Packed) {}; + _XMUDECN4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMUDECN4(CONST FLOAT *pArray); + + operator UINT () { return v; } + + _XMUDECN4& operator= (CONST _XMUDECN4& UDecN4); + _XMUDECN4& operator= (CONST UINT Packed); + +#endif // __cplusplus + +} XMUDECN4; + +// 4D Vector; 10-10-10-2 bit components packed into a 32 bit integer +// The 4D Vector is packed into 32 bits as follows: a 2 bit unsigned, +// integer for the w component and 10 bit unsigned integers +// for the z, y, and x components. The w component is stored in the +// most significant bits and the x component in the least significant bits +// (W2Z10Y10X10): [32] wwzzzzzz zzzzyyyy yyyyyyxx xxxxxxxx [0] +typedef struct _XMUDEC4 +{ + union + { + struct + { + UINT x : 10; // 0 to 1023 + UINT y : 10; // 0 to 1023 + UINT z : 10; // 0 to 1023 + UINT w : 2; // 0 to 3 + }; + UINT v; + }; + +#ifdef __cplusplus + + _XMUDEC4() {}; + _XMUDEC4(UINT Packed) : v(Packed) {}; + _XMUDEC4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMUDEC4(CONST FLOAT *pArray); + + operator UINT () { return v; } + + _XMUDEC4& operator= (CONST _XMUDEC4& UDec4); + _XMUDEC4& operator= (CONST UINT Packed); + +#endif // __cplusplus + +} XMUDEC4; + +// 4D Vector; 20-20-20-4 bit normalized components packed into a 64 bit integer +// The normalized 4D Vector is packed into 64 bits as follows: a 4 bit unsigned, +// normalized integer for the w component and 20 bit signed, normalized +// integers for the z, y, and x components. The w component is stored in the +// most significant bits and the x component in the least significant bits +// (W4Z20Y20X20): [64] wwwwzzzz zzzzzzzz zzzzzzzz yyyyyyyy yyyyyyyy yyyyxxxx xxxxxxxx xxxxxxxx [0] +typedef struct _XMXICON4 +{ + union + { + struct + { + INT64 x : 20; // -524287/524287 to 524287/524287 + INT64 y : 20; // -524287/524287 to 524287/524287 + INT64 z : 20; // -524287/524287 to 524287/524287 + UINT64 w : 4; // 0/15 to 15/15 + }; + UINT64 v; + }; + +#ifdef __cplusplus + + _XMXICON4() {}; + _XMXICON4(UINT64 Packed) : v(Packed) {}; + _XMXICON4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMXICON4(CONST FLOAT *pArray); + + operator UINT64 () { return v; } + + _XMXICON4& operator= (CONST _XMXICON4& XIcoN4); + _XMXICON4& operator= (CONST UINT64 Packed); + +#endif // __cplusplus + +} XMXICON4; + +// 4D Vector; 20-20-20-4 bit components packed into a 64 bit integer +// The 4D Vector is packed into 64 bits as follows: a 4 bit unsigned +// integer for the w component and 20 bit signed integers for the +// z, y, and x components. The w component is stored in the +// most significant bits and the x component in the least significant bits +// (W4Z20Y20X20): [64] wwwwzzzz zzzzzzzz zzzzzzzz yyyyyyyy yyyyyyyy yyyyxxxx xxxxxxxx xxxxxxxx [0] +typedef struct _XMXICO4 +{ + union + { + struct + { + INT64 x : 20; // -524287 to 524287 + INT64 y : 20; // -524287 to 524287 + INT64 z : 20; // -524287 to 524287 + UINT64 w : 4; // 0 to 15 + }; + UINT64 v; + }; + +#ifdef __cplusplus + + _XMXICO4() {}; + _XMXICO4(UINT64 Packed) : v(Packed) {}; + _XMXICO4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMXICO4(CONST FLOAT *pArray); + + operator UINT64 () { return v; } + + _XMXICO4& operator= (CONST _XMXICO4& XIco4); + _XMXICO4& operator= (CONST UINT64 Packed); + +#endif // __cplusplus + +} XMXICO4; + +// 4D Vector; 20-20-20-4 bit normalized components packed into a 64 bit integer +// The normalized 4D Vector is packed into 64 bits as follows: a 4 bit signed, +// normalized integer for the w component and 20 bit signed, normalized +// integers for the z, y, and x components. The w component is stored in the +// most significant bits and the x component in the least significant bits +// (W4Z20Y20X20): [64] wwwwzzzz zzzzzzzz zzzzzzzz yyyyyyyy yyyyyyyy yyyyxxxx xxxxxxxx xxxxxxxx [0] +typedef struct _XMICON4 +{ + union + { + struct + { + INT64 x : 20; // -524287/524287 to 524287/524287 + INT64 y : 20; // -524287/524287 to 524287/524287 + INT64 z : 20; // -524287/524287 to 524287/524287 + INT64 w : 4; // -7/7 to 7/7 + }; + UINT64 v; + }; + +#ifdef __cplusplus + + _XMICON4() {}; + _XMICON4(UINT64 Packed) : v(Packed) {}; + _XMICON4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMICON4(CONST FLOAT *pArray); + + operator UINT64 () { return v; } + + _XMICON4& operator= (CONST _XMICON4& IcoN4); + _XMICON4& operator= (CONST UINT64 Packed); + +#endif // __cplusplus + +} XMICON4; + +// 4D Vector; 20-20-20-4 bit components packed into a 64 bit integer +// The 4D Vector is packed into 64 bits as follows: a 4 bit signed, +// integer for the w component and 20 bit signed integers for the +// z, y, and x components. The w component is stored in the +// most significant bits and the x component in the least significant bits +// (W4Z20Y20X20): [64] wwwwzzzz zzzzzzzz zzzzzzzz yyyyyyyy yyyyyyyy yyyyxxxx xxxxxxxx xxxxxxxx [0] +typedef struct _XMICO4 +{ + union + { + struct + { + INT64 x : 20; // -524287 to 524287 + INT64 y : 20; // -524287 to 524287 + INT64 z : 20; // -524287 to 524287 + INT64 w : 4; // -7 to 7 + }; + UINT64 v; + }; + +#ifdef __cplusplus + + _XMICO4() {}; + _XMICO4(UINT64 Packed) : v(Packed) {}; + _XMICO4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMICO4(CONST FLOAT *pArray); + + operator UINT64 () { return v; } + + _XMICO4& operator= (CONST _XMICO4& Ico4); + _XMICO4& operator= (CONST UINT64 Packed); + +#endif // __cplusplus + +} XMICO4; + +// 4D Vector; 20-20-20-4 bit normalized components packed into a 64 bit integer +// The normalized 4D Vector is packed into 64 bits as follows: a 4 bit unsigned, +// normalized integer for the w component and 20 bit unsigned, normalized +// integers for the z, y, and x components. The w component is stored in the +// most significant bits and the x component in the least significant bits +// (W4Z20Y20X20): [64] wwwwzzzz zzzzzzzz zzzzzzzz yyyyyyyy yyyyyyyy yyyyxxxx xxxxxxxx xxxxxxxx [0] +typedef struct _XMUICON4 +{ + union + { + struct + { + UINT64 x : 20; // 0/1048575 to 1048575/1048575 + UINT64 y : 20; // 0/1048575 to 1048575/1048575 + UINT64 z : 20; // 0/1048575 to 1048575/1048575 + UINT64 w : 4; // 0/15 to 15/15 + }; + UINT64 v; + }; + +#ifdef __cplusplus + + _XMUICON4() {}; + _XMUICON4(UINT64 Packed) : v(Packed) {}; + _XMUICON4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMUICON4(CONST FLOAT *pArray); + + operator UINT64 () { return v; } + + _XMUICON4& operator= (CONST _XMUICON4& UIcoN4); + _XMUICON4& operator= (CONST UINT64 Packed); + +#endif // __cplusplus + +} XMUICON4; + +// 4D Vector; 20-20-20-4 bit components packed into a 64 bit integer +// The 4D Vector is packed into 64 bits as follows: a 4 bit unsigned +// integer for the w component and 20 bit unsigned integers for the +// z, y, and x components. The w component is stored in the +// most significant bits and the x component in the least significant bits +// (W4Z20Y20X20): [64] wwwwzzzz zzzzzzzz zzzzzzzz yyyyyyyy yyyyyyyy yyyyxxxx xxxxxxxx xxxxxxxx [0] +typedef struct _XMUICO4 +{ + union + { + struct + { + UINT64 x : 20; // 0 to 1048575 + UINT64 y : 20; // 0 to 1048575 + UINT64 z : 20; // 0 to 1048575 + UINT64 w : 4; // 0 to 15 + }; + UINT64 v; + }; + +#ifdef __cplusplus + + _XMUICO4() {}; + _XMUICO4(UINT64 Packed) : v(Packed) {}; + _XMUICO4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMUICO4(CONST FLOAT *pArray); + + operator UINT64 () { return v; } + + _XMUICO4& operator= (CONST _XMUICO4& UIco4); + _XMUICO4& operator= (CONST UINT64 Packed); + +#endif // __cplusplus + +} XMUICO4; + +// ARGB Color; 8-8-8-8 bit unsigned normalized integer components packed into +// a 32 bit integer. The normalized color is packed into 32 bits using 8 bit +// unsigned, normalized integers for the alpha, red, green, and blue components. +// The alpha component is stored in the most significant bits and the blue +// component in the least significant bits (A8R8G8B8): +// [32] aaaaaaaa rrrrrrrr gggggggg bbbbbbbb [0] +typedef struct _XMCOLOR +{ + union + { + struct + { + UINT b : 8; // Blue: 0/255 to 255/255 + UINT g : 8; // Green: 0/255 to 255/255 + UINT r : 8; // Red: 0/255 to 255/255 + UINT a : 8; // Alpha: 0/255 to 255/255 + }; + UINT c; + }; + +#ifdef __cplusplus + + _XMCOLOR() {}; + _XMCOLOR(UINT Color) : c(Color) {}; + _XMCOLOR(FLOAT _r, FLOAT _g, FLOAT _b, FLOAT _a); + _XMCOLOR(CONST FLOAT *pArray); + + operator UINT () { return c; } + + _XMCOLOR& operator= (CONST _XMCOLOR& Color); + _XMCOLOR& operator= (CONST UINT Color); + +#endif // __cplusplus + +} XMCOLOR; + +// 4D Vector; 8 bit signed normalized integer components +typedef struct _XMBYTEN4 +{ + union + { + struct + { + CHAR x; + CHAR y; + CHAR z; + CHAR w; + }; + UINT v; + }; + +#ifdef __cplusplus + + _XMBYTEN4() {}; + _XMBYTEN4(CHAR _x, CHAR _y, CHAR _z, CHAR _w) : x(_x), y(_y), z(_z), w(_w) {}; + _XMBYTEN4(UINT Packed) : v(Packed) {}; + _XMBYTEN4(CONST CHAR *pArray); + _XMBYTEN4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMBYTEN4(CONST FLOAT *pArray); + + _XMBYTEN4& operator= (CONST _XMBYTEN4& ByteN4); + +#endif // __cplusplus + +} XMBYTEN4; + +// 4D Vector; 8 bit signed integer components +typedef struct _XMBYTE4 +{ + union + { + struct + { + CHAR x; + CHAR y; + CHAR z; + CHAR w; + }; + UINT v; + }; + +#ifdef __cplusplus + + _XMBYTE4() {}; + _XMBYTE4(CHAR _x, CHAR _y, CHAR _z, CHAR _w) : x(_x), y(_y), z(_z), w(_w) {}; + _XMBYTE4(UINT Packed) : v(Packed) {}; + _XMBYTE4(CONST CHAR *pArray); + _XMBYTE4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMBYTE4(CONST FLOAT *pArray); + + _XMBYTE4& operator= (CONST _XMBYTE4& Byte4); + +#endif // __cplusplus + +} XMBYTE4; + +// 4D Vector; 8 bit unsigned normalized integer components +typedef struct _XMUBYTEN4 +{ + union + { + struct + { + BYTE x; + BYTE y; + BYTE z; + BYTE w; + }; + UINT v; + }; + +#ifdef __cplusplus + + _XMUBYTEN4() {}; + _XMUBYTEN4(BYTE _x, BYTE _y, BYTE _z, BYTE _w) : x(_x), y(_y), z(_z), w(_w) {}; + _XMUBYTEN4(UINT Packed) : v(Packed) {}; + _XMUBYTEN4(CONST BYTE *pArray); + _XMUBYTEN4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMUBYTEN4(CONST FLOAT *pArray); + + _XMUBYTEN4& operator= (CONST _XMUBYTEN4& UByteN4); + +#endif // __cplusplus + +} XMUBYTEN4; + +// 4D Vector; 8 bit unsigned integer components +typedef struct _XMUBYTE4 +{ + union + { + struct + { + BYTE x; + BYTE y; + BYTE z; + BYTE w; + }; + UINT v; + }; + +#ifdef __cplusplus + + _XMUBYTE4() {}; + _XMUBYTE4(BYTE _x, BYTE _y, BYTE _z, BYTE _w) : x(_x), y(_y), z(_z), w(_w) {}; + _XMUBYTE4(UINT Packed) : v(Packed) {}; + _XMUBYTE4(CONST BYTE *pArray); + _XMUBYTE4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMUBYTE4(CONST FLOAT *pArray); + + _XMUBYTE4& operator= (CONST _XMUBYTE4& UByte4); + +#endif // __cplusplus + +} XMUBYTE4; + +// 4D vector; 4 bit unsigned integer components +typedef struct _XMUNIBBLE4 +{ + union + { + struct + { + USHORT x : 4; + USHORT y : 4; + USHORT z : 4; + USHORT w : 4; + }; + USHORT v; + }; + +#ifdef __cplusplus + + _XMUNIBBLE4() {}; + _XMUNIBBLE4(USHORT Packed) : v(Packed) {}; + _XMUNIBBLE4(CHAR _x, CHAR _y, CHAR _z, CHAR _w) : x(_x), y(_y), z(_z), w(_w) {}; + _XMUNIBBLE4(CONST CHAR *pArray); + _XMUNIBBLE4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w); + _XMUNIBBLE4(CONST FLOAT *pArray); + + operator USHORT () { return v; } + + _XMUNIBBLE4& operator= (CONST _XMUNIBBLE4& UNibble4); + _XMUNIBBLE4& operator= (CONST USHORT Packed); + +#endif // __cplusplus + +} XMUNIBBLE4; + +// 4D vector: 5/5/5/1 unsigned integer components +typedef struct _XMU555 +{ + union + { + struct + { + USHORT x : 5; + USHORT y : 5; + USHORT z : 5; + USHORT w : 1; + }; + USHORT v; + }; + +#ifdef __cplusplus + + _XMU555() {}; + _XMU555(USHORT Packed) : v(Packed) {}; + _XMU555(CHAR _x, CHAR _y, CHAR _z, BOOL _w) : x(_x), y(_y), z(_z), w(_w ? 0x1 : 0) {}; + _XMU555(CONST CHAR *pArray, BOOL _w); + _XMU555(FLOAT _x, FLOAT _y, FLOAT _z, BOOL _w); + _XMU555(CONST FLOAT *pArray, BOOL _w); + + operator USHORT () { return v; } + + _XMU555& operator= (CONST _XMU555& U555); + _XMU555& operator= (CONST USHORT Packed); + +#endif // __cplusplus + +} XMU555; + +// 3x3 Matrix: 32 bit floating point components +typedef struct _XMFLOAT3X3 +{ + union + { + struct + { + FLOAT _11, _12, _13; + FLOAT _21, _22, _23; + FLOAT _31, _32, _33; + }; + FLOAT m[3][3]; + }; + +#ifdef __cplusplus + + _XMFLOAT3X3() {}; + _XMFLOAT3X3(FLOAT m00, FLOAT m01, FLOAT m02, + FLOAT m10, FLOAT m11, FLOAT m12, + FLOAT m20, FLOAT m21, FLOAT m22); + _XMFLOAT3X3(CONST FLOAT *pArray); + + FLOAT operator() (UINT Row, UINT Column) CONST { return m[Row][Column]; } + FLOAT& operator() (UINT Row, UINT Column) { return m[Row][Column]; } + + _XMFLOAT3X3& operator= (CONST _XMFLOAT3X3& Float3x3); + +#endif // __cplusplus + +} XMFLOAT3X3; + +// 4x3 Matrix: 32 bit floating point components +typedef struct _XMFLOAT4X3 +{ + union + { + struct + { + FLOAT _11, _12, _13; + FLOAT _21, _22, _23; + FLOAT _31, _32, _33; + FLOAT _41, _42, _43; + }; + FLOAT m[4][3]; + }; + +#ifdef __cplusplus + + _XMFLOAT4X3() {}; + _XMFLOAT4X3(FLOAT m00, FLOAT m01, FLOAT m02, + FLOAT m10, FLOAT m11, FLOAT m12, + FLOAT m20, FLOAT m21, FLOAT m22, + FLOAT m30, FLOAT m31, FLOAT m32); + _XMFLOAT4X3(CONST FLOAT *pArray); + + FLOAT operator() (UINT Row, UINT Column) CONST { return m[Row][Column]; } + FLOAT& operator() (UINT Row, UINT Column) { return m[Row][Column]; } + + _XMFLOAT4X3& operator= (CONST _XMFLOAT4X3& Float4x3); + +#endif // __cplusplus + +} XMFLOAT4X3; + +// 4x3 Matrix: 32 bit floating point components aligned on a 16 byte boundary +#ifdef __cplusplus +__declspec(align(16)) struct XMFLOAT4X3A : public XMFLOAT4X3 +{ + XMFLOAT4X3A() : XMFLOAT4X3() {}; + XMFLOAT4X3A(FLOAT m00, FLOAT m01, FLOAT m02, + FLOAT m10, FLOAT m11, FLOAT m12, + FLOAT m20, FLOAT m21, FLOAT m22, + FLOAT m30, FLOAT m31, FLOAT m32) : + XMFLOAT4X3(m00,m01,m02,m10,m11,m12,m20,m21,m22,m30,m31,m32) {}; + XMFLOAT4X3A(CONST FLOAT *pArray) : XMFLOAT4X3(pArray) {} + + FLOAT operator() (UINT Row, UINT Column) CONST { return m[Row][Column]; } + FLOAT& operator() (UINT Row, UINT Column) { return m[Row][Column]; } + + XMFLOAT4X3A& operator= (CONST XMFLOAT4X3A& Float4x3); +}; +#else +typedef __declspec(align(16)) XMFLOAT4X3 XMFLOAT4X3A; +#endif // __cplusplus + +// 4x4 Matrix: 32 bit floating point components +typedef struct _XMFLOAT4X4 +{ + union + { + struct + { + FLOAT _11, _12, _13, _14; + FLOAT _21, _22, _23, _24; + FLOAT _31, _32, _33, _34; + FLOAT _41, _42, _43, _44; + }; + FLOAT m[4][4]; + }; + +#ifdef __cplusplus + + _XMFLOAT4X4() {}; + _XMFLOAT4X4(FLOAT m00, FLOAT m01, FLOAT m02, FLOAT m03, + FLOAT m10, FLOAT m11, FLOAT m12, FLOAT m13, + FLOAT m20, FLOAT m21, FLOAT m22, FLOAT m23, + FLOAT m30, FLOAT m31, FLOAT m32, FLOAT m33); + _XMFLOAT4X4(CONST FLOAT *pArray); + + FLOAT operator() (UINT Row, UINT Column) CONST { return m[Row][Column]; } + FLOAT& operator() (UINT Row, UINT Column) { return m[Row][Column]; } + + _XMFLOAT4X4& operator= (CONST _XMFLOAT4X4& Float4x4); + +#endif // __cplusplus + +} XMFLOAT4X4; + +// 4x4 Matrix: 32 bit floating point components aligned on a 16 byte boundary +#ifdef __cplusplus +__declspec(align(16)) struct XMFLOAT4X4A : public XMFLOAT4X4 +{ + XMFLOAT4X4A() : XMFLOAT4X4() {}; + XMFLOAT4X4A(FLOAT m00, FLOAT m01, FLOAT m02, FLOAT m03, + FLOAT m10, FLOAT m11, FLOAT m12, FLOAT m13, + FLOAT m20, FLOAT m21, FLOAT m22, FLOAT m23, + FLOAT m30, FLOAT m31, FLOAT m32, FLOAT m33) + : XMFLOAT4X4(m00,m01,m02,m03,m10,m11,m12,m13,m20,m21,m22,m23,m30,m31,m32,m33) {}; + XMFLOAT4X4A(CONST FLOAT *pArray) : XMFLOAT4X4(pArray) {} + + FLOAT operator() (UINT Row, UINT Column) CONST { return m[Row][Column]; } + FLOAT& operator() (UINT Row, UINT Column) { return m[Row][Column]; } + + XMFLOAT4X4A& operator= (CONST XMFLOAT4X4A& Float4x4); +}; +#else +typedef __declspec(align(16)) XMFLOAT4X4 XMFLOAT4X4A; +#endif // __cplusplus + +#if !defined(_XM_X86_) && !defined(_XM_X64_) +#pragma bitfield_order(pop) +#endif // !_XM_X86_ && !_XM_X64_ + +#pragma warning(pop) + + +/**************************************************************************** + * + * Data conversion operations + * + ****************************************************************************/ + +#if !defined(_XM_NO_INTRINSICS_) && defined(_XM_VMX128_INTRINSICS_) +#else +XMVECTOR XMConvertVectorIntToFloat(FXMVECTOR VInt, UINT DivExponent); +XMVECTOR XMConvertVectorFloatToInt(FXMVECTOR VFloat, UINT MulExponent); +XMVECTOR XMConvertVectorUIntToFloat(FXMVECTOR VUInt, UINT DivExponent); +XMVECTOR XMConvertVectorFloatToUInt(FXMVECTOR VFloat, UINT MulExponent); +#endif + +FLOAT XMConvertHalfToFloat(HALF Value); +FLOAT* XMConvertHalfToFloatStream(_Out_bytecap_x_(sizeof(FLOAT)+OutputStride*(HalfCount-1)) FLOAT* pOutputStream, + _In_ UINT OutputStride, + _In_bytecount_x_(sizeof(HALF)+InputStride*(HalfCount-1)) CONST HALF* pInputStream, + _In_ UINT InputStride, _In_ UINT HalfCount); +HALF XMConvertFloatToHalf(FLOAT Value); +HALF* XMConvertFloatToHalfStream(_Out_bytecap_x_(sizeof(HALF)+OutputStride*(FloatCount-1)) HALF* pOutputStream, + _In_ UINT OutputStride, + _In_bytecount_x_(sizeof(FLOAT)+InputStride*(FloatCount-1)) CONST FLOAT* pInputStream, + _In_ UINT InputStride, _In_ UINT FloatCount); + +#if !defined(_XM_NO_INTRINSICS_) && defined(_XM_VMX128_INTRINSICS_) +#else +XMVECTOR XMVectorSetBinaryConstant(UINT C0, UINT C1, UINT C2, UINT C3); +XMVECTOR XMVectorSplatConstant(INT IntConstant, UINT DivExponent); +XMVECTOR XMVectorSplatConstantInt(INT IntConstant); +#endif + +/**************************************************************************** + * + * Load operations + * + ****************************************************************************/ + +XMVECTOR XMLoadInt(_In_ CONST UINT* pSource); +XMVECTOR XMLoadFloat(_In_ CONST FLOAT* pSource); + +XMVECTOR XMLoadInt2(_In_count_c_(2) CONST UINT* pSource); +XMVECTOR XMLoadInt2A(_In_count_c_(2) CONST UINT* PSource); +XMVECTOR XMLoadFloat2(_In_ CONST XMFLOAT2* pSource); +XMVECTOR XMLoadFloat2A(_In_ CONST XMFLOAT2A* pSource); +XMVECTOR XMLoadHalf2(_In_ CONST XMHALF2* pSource); +XMVECTOR XMLoadShortN2(_In_ CONST XMSHORTN2* pSource); +XMVECTOR XMLoadShort2(_In_ CONST XMSHORT2* pSource); +XMVECTOR XMLoadUShortN2(_In_ CONST XMUSHORTN2* pSource); +XMVECTOR XMLoadUShort2(_In_ CONST XMUSHORT2* pSource); + +XMVECTOR XMLoadInt3(_In_count_c_(3) CONST UINT* pSource); +XMVECTOR XMLoadInt3A(_In_count_c_(3) CONST UINT* pSource); +XMVECTOR XMLoadFloat3(_In_ CONST XMFLOAT3* pSource); +XMVECTOR XMLoadFloat3A(_In_ CONST XMFLOAT3A* pSource); +XMVECTOR XMLoadHenDN3(_In_ CONST XMHENDN3* pSource); +XMVECTOR XMLoadHenD3(_In_ CONST XMHEND3* pSource); +XMVECTOR XMLoadUHenDN3(_In_ CONST XMUHENDN3* pSource); +XMVECTOR XMLoadUHenD3(_In_ CONST XMUHEND3* pSource); +XMVECTOR XMLoadDHenN3(_In_ CONST XMDHENN3* pSource); +XMVECTOR XMLoadDHen3(_In_ CONST XMDHEN3* pSource); +XMVECTOR XMLoadUDHenN3(_In_ CONST XMUDHENN3* pSource); +XMVECTOR XMLoadUDHen3(_In_ CONST XMUDHEN3* pSource); +XMVECTOR XMLoadU565(_In_ CONST XMU565* pSource); +XMVECTOR XMLoadFloat3PK(_In_ CONST XMFLOAT3PK* pSource); +XMVECTOR XMLoadFloat3SE(_In_ CONST XMFLOAT3SE* pSource); + +XMVECTOR XMLoadInt4(_In_count_c_(4) CONST UINT* pSource); +XMVECTOR XMLoadInt4A(_In_count_c_(4) CONST UINT* pSource); +XMVECTOR XMLoadFloat4(_In_ CONST XMFLOAT4* pSource); +XMVECTOR XMLoadFloat4A(_In_ CONST XMFLOAT4A* pSource); +XMVECTOR XMLoadHalf4(_In_ CONST XMHALF4* pSource); +XMVECTOR XMLoadShortN4(_In_ CONST XMSHORTN4* pSource); +XMVECTOR XMLoadShort4(_In_ CONST XMSHORT4* pSource); +XMVECTOR XMLoadUShortN4(_In_ CONST XMUSHORTN4* pSource); +XMVECTOR XMLoadUShort4(_In_ CONST XMUSHORT4* pSource); +XMVECTOR XMLoadXIcoN4(_In_ CONST XMXICON4* pSource); +XMVECTOR XMLoadXIco4(_In_ CONST XMXICO4* pSource); +XMVECTOR XMLoadIcoN4(_In_ CONST XMICON4* pSource); +XMVECTOR XMLoadIco4(_In_ CONST XMICO4* pSource); +XMVECTOR XMLoadUIcoN4(_In_ CONST XMUICON4* pSource); +XMVECTOR XMLoadUIco4(_In_ CONST XMUICO4* pSource); +XMVECTOR XMLoadXDecN4(_In_ CONST XMXDECN4* pSource); +XMVECTOR XMLoadXDec4(_In_ CONST XMXDEC4* pSource); +XMVECTOR XMLoadDecN4(_In_ CONST XMDECN4* pSource); +XMVECTOR XMLoadDec4(_In_ CONST XMDEC4* pSource); +XMVECTOR XMLoadUDecN4(_In_ CONST XMUDECN4* pSource); +XMVECTOR XMLoadUDec4(_In_ CONST XMUDEC4* pSource); +XMVECTOR XMLoadByteN4(_In_ CONST XMBYTEN4* pSource); +XMVECTOR XMLoadByte4(_In_ CONST XMBYTE4* pSource); +XMVECTOR XMLoadUByteN4(_In_ CONST XMUBYTEN4* pSource); +XMVECTOR XMLoadUByte4(_In_ CONST XMUBYTE4* pSource); +XMVECTOR XMLoadUNibble4(_In_ CONST XMUNIBBLE4* pSource); +XMVECTOR XMLoadU555(_In_ CONST XMU555* pSource); +XMVECTOR XMLoadColor(_In_ CONST XMCOLOR* pSource); + +XMMATRIX XMLoadFloat3x3(_In_ CONST XMFLOAT3X3* pSource); +XMMATRIX XMLoadFloat4x3(_In_ CONST XMFLOAT4X3* pSource); +XMMATRIX XMLoadFloat4x3A(_In_ CONST XMFLOAT4X3A* pSource); +XMMATRIX XMLoadFloat4x4(_In_ CONST XMFLOAT4X4* pSource); +XMMATRIX XMLoadFloat4x4A(_In_ CONST XMFLOAT4X4A* pSource); + +/**************************************************************************** + * + * Store operations + * + ****************************************************************************/ + +VOID XMStoreInt(_Out_ UINT* pDestination, FXMVECTOR V); +VOID XMStoreFloat(_Out_ FLOAT* pDestination, FXMVECTOR V); + +VOID XMStoreInt2(_Out_cap_c_(2) UINT* pDestination, FXMVECTOR V); +VOID XMStoreInt2A(_Out_cap_c_(2) UINT* pDestination, FXMVECTOR V); +VOID XMStoreFloat2(_Out_ XMFLOAT2* pDestination, FXMVECTOR V); +VOID XMStoreFloat2A(_Out_ XMFLOAT2A* pDestination, FXMVECTOR V); +VOID XMStoreHalf2(_Out_ XMHALF2* pDestination, FXMVECTOR V); +VOID XMStoreShortN2(_Out_ XMSHORTN2* pDestination, FXMVECTOR V); +VOID XMStoreShort2(_Out_ XMSHORT2* pDestination, FXMVECTOR V); +VOID XMStoreUShortN2(_Out_ XMUSHORTN2* pDestination, FXMVECTOR V); +VOID XMStoreUShort2(_Out_ XMUSHORT2* pDestination, FXMVECTOR V); + +VOID XMStoreInt3(_Out_cap_c_(3) UINT* pDestination, FXMVECTOR V); +VOID XMStoreInt3A(_Out_cap_c_(3) UINT* pDestination, FXMVECTOR V); +VOID XMStoreFloat3(_Out_ XMFLOAT3* pDestination, FXMVECTOR V); +VOID XMStoreFloat3A(_Out_ XMFLOAT3A* pDestination, FXMVECTOR V); +VOID XMStoreHenDN3(_Out_ XMHENDN3* pDestination, FXMVECTOR V); +VOID XMStoreHenD3(_Out_ XMHEND3* pDestination, FXMVECTOR V); +VOID XMStoreUHenDN3(_Out_ XMUHENDN3* pDestination, FXMVECTOR V); +VOID XMStoreUHenD3(_Out_ XMUHEND3* pDestination, FXMVECTOR V); +VOID XMStoreDHenN3(_Out_ XMDHENN3* pDestination, FXMVECTOR V); +VOID XMStoreDHen3(_Out_ XMDHEN3* pDestination, FXMVECTOR V); +VOID XMStoreUDHenN3(_Out_ XMUDHENN3* pDestination, FXMVECTOR V); +VOID XMStoreUDHen3(_Out_ XMUDHEN3* pDestination, FXMVECTOR V); +VOID XMStoreU565(_Out_ XMU565* pDestination, FXMVECTOR V); +VOID XMStoreFloat3PK(_Out_ XMFLOAT3PK* pDestination, FXMVECTOR V); +VOID XMStoreFloat3SE(_Out_ XMFLOAT3SE* pDestination, FXMVECTOR V); + +VOID XMStoreInt4(_Out_cap_c_(4) UINT* pDestination, FXMVECTOR V); +VOID XMStoreInt4A(_Out_cap_c_(4) UINT* pDestination, FXMVECTOR V); +VOID XMStoreInt4NC(_Out_ UINT* pDestination, FXMVECTOR V); +VOID XMStoreFloat4(_Out_ XMFLOAT4* pDestination, FXMVECTOR V); +VOID XMStoreFloat4A(_Out_ XMFLOAT4A* pDestination, FXMVECTOR V); +VOID XMStoreFloat4NC(_Out_ XMFLOAT4* pDestination, FXMVECTOR V); +VOID XMStoreHalf4(_Out_ XMHALF4* pDestination, FXMVECTOR V); +VOID XMStoreShortN4(_Out_ XMSHORTN4* pDestination, FXMVECTOR V); +VOID XMStoreShort4(_Out_ XMSHORT4* pDestination, FXMVECTOR V); +VOID XMStoreUShortN4(_Out_ XMUSHORTN4* pDestination, FXMVECTOR V); +VOID XMStoreUShort4(_Out_ XMUSHORT4* pDestination, FXMVECTOR V); +VOID XMStoreXIcoN4(_Out_ XMXICON4* pDestination, FXMVECTOR V); +VOID XMStoreXIco4(_Out_ XMXICO4* pDestination, FXMVECTOR V); +VOID XMStoreIcoN4(_Out_ XMICON4* pDestination, FXMVECTOR V); +VOID XMStoreIco4(_Out_ XMICO4* pDestination, FXMVECTOR V); +VOID XMStoreUIcoN4(_Out_ XMUICON4* pDestination, FXMVECTOR V); +VOID XMStoreUIco4(_Out_ XMUICO4* pDestination, FXMVECTOR V); +VOID XMStoreXDecN4(_Out_ XMXDECN4* pDestination, FXMVECTOR V); +VOID XMStoreXDec4(_Out_ XMXDEC4* pDestination, FXMVECTOR V); +VOID XMStoreDecN4(_Out_ XMDECN4* pDestination, FXMVECTOR V); +VOID XMStoreDec4(_Out_ XMDEC4* pDestination, FXMVECTOR V); +VOID XMStoreUDecN4(_Out_ XMUDECN4* pDestination, FXMVECTOR V); +VOID XMStoreUDec4(_Out_ XMUDEC4* pDestination, FXMVECTOR V); +VOID XMStoreByteN4(_Out_ XMBYTEN4* pDestination, FXMVECTOR V); +VOID XMStoreByte4(_Out_ XMBYTE4* pDestination, FXMVECTOR V); +VOID XMStoreUByteN4(_Out_ XMUBYTEN4* pDestination, FXMVECTOR V); +VOID XMStoreUByte4(_Out_ XMUBYTE4* pDestination, FXMVECTOR V); +VOID XMStoreUNibble4(_Out_ XMUNIBBLE4* pDestination, FXMVECTOR V); +VOID XMStoreU555(_Out_ XMU555* pDestination, FXMVECTOR V); +VOID XMStoreColor(_Out_ XMCOLOR* pDestination, FXMVECTOR V); + +VOID XMStoreFloat3x3(_Out_ XMFLOAT3X3* pDestination, CXMMATRIX M); +VOID XMStoreFloat3x3NC(_Out_ XMFLOAT3X3* pDestination, CXMMATRIX M); +VOID XMStoreFloat4x3(_Out_ XMFLOAT4X3* pDestination, CXMMATRIX M); +VOID XMStoreFloat4x3A(_Out_ XMFLOAT4X3A* pDestination, CXMMATRIX M); +VOID XMStoreFloat4x3NC(_Out_ XMFLOAT4X3* pDestination, CXMMATRIX M); +VOID XMStoreFloat4x4(_Out_ XMFLOAT4X4* pDestination, CXMMATRIX M); +VOID XMStoreFloat4x4A(_Out_ XMFLOAT4X4A* pDestination, CXMMATRIX M); +VOID XMStoreFloat4x4NC(_Out_ XMFLOAT4X4* pDestination, CXMMATRIX M); + +/**************************************************************************** + * + * General vector operations + * + ****************************************************************************/ + +XMVECTOR XMVectorZero(); +XMVECTOR XMVectorSet(FLOAT x, FLOAT y, FLOAT z, FLOAT w); +XMVECTOR XMVectorSetInt(UINT x, UINT y, UINT z, UINT w); +XMVECTOR XMVectorReplicate(FLOAT Value); +XMVECTOR XMVectorReplicatePtr(_In_ CONST FLOAT *pValue); +XMVECTOR XMVectorReplicateInt(UINT Value); +XMVECTOR XMVectorReplicateIntPtr(_In_ CONST UINT *pValue); +XMVECTOR XMVectorTrueInt(); +XMVECTOR XMVectorFalseInt(); +XMVECTOR XMVectorSplatX(FXMVECTOR V); +XMVECTOR XMVectorSplatY(FXMVECTOR V); +XMVECTOR XMVectorSplatZ(FXMVECTOR V); +XMVECTOR XMVectorSplatW(FXMVECTOR V); +XMVECTOR XMVectorSplatOne(); +XMVECTOR XMVectorSplatInfinity(); +XMVECTOR XMVectorSplatQNaN(); +XMVECTOR XMVectorSplatEpsilon(); +XMVECTOR XMVectorSplatSignMask(); + +FLOAT XMVectorGetByIndex(FXMVECTOR V,UINT i); +FLOAT XMVectorGetX(FXMVECTOR V); +FLOAT XMVectorGetY(FXMVECTOR V); +FLOAT XMVectorGetZ(FXMVECTOR V); +FLOAT XMVectorGetW(FXMVECTOR V); + +VOID XMVectorGetByIndexPtr(_Out_ FLOAT *f, FXMVECTOR V, UINT i); +VOID XMVectorGetXPtr(_Out_ FLOAT *x, FXMVECTOR V); +VOID XMVectorGetYPtr(_Out_ FLOAT *y, FXMVECTOR V); +VOID XMVectorGetZPtr(_Out_ FLOAT *z, FXMVECTOR V); +VOID XMVectorGetWPtr(_Out_ FLOAT *w, FXMVECTOR V); + +UINT XMVectorGetIntByIndex(FXMVECTOR V,UINT i); +UINT XMVectorGetIntX(FXMVECTOR V); +UINT XMVectorGetIntY(FXMVECTOR V); +UINT XMVectorGetIntZ(FXMVECTOR V); +UINT XMVectorGetIntW(FXMVECTOR V); + +VOID XMVectorGetIntByIndexPtr(_Out_ UINT *x,FXMVECTOR V, UINT i); +VOID XMVectorGetIntXPtr(_Out_ UINT *x, FXMVECTOR V); +VOID XMVectorGetIntYPtr(_Out_ UINT *y, FXMVECTOR V); +VOID XMVectorGetIntZPtr(_Out_ UINT *z, FXMVECTOR V); +VOID XMVectorGetIntWPtr(_Out_ UINT *w, FXMVECTOR V); + +XMVECTOR XMVectorSetByIndex(FXMVECTOR V,FLOAT f,UINT i); +XMVECTOR XMVectorSetX(FXMVECTOR V, FLOAT x); +XMVECTOR XMVectorSetY(FXMVECTOR V, FLOAT y); +XMVECTOR XMVectorSetZ(FXMVECTOR V, FLOAT z); +XMVECTOR XMVectorSetW(FXMVECTOR V, FLOAT w); + +XMVECTOR XMVectorSetByIndexPtr(FXMVECTOR V, _In_ CONST FLOAT *f, UINT i); +XMVECTOR XMVectorSetXPtr(FXMVECTOR V, _In_ CONST FLOAT *x); +XMVECTOR XMVectorSetYPtr(FXMVECTOR V, _In_ CONST FLOAT *y); +XMVECTOR XMVectorSetZPtr(FXMVECTOR V, _In_ CONST FLOAT *z); +XMVECTOR XMVectorSetWPtr(FXMVECTOR V, _In_ CONST FLOAT *w); + +XMVECTOR XMVectorSetIntByIndex(FXMVECTOR V, UINT x,UINT i); +XMVECTOR XMVectorSetIntX(FXMVECTOR V, UINT x); +XMVECTOR XMVectorSetIntY(FXMVECTOR V, UINT y); +XMVECTOR XMVectorSetIntZ(FXMVECTOR V, UINT z); +XMVECTOR XMVectorSetIntW(FXMVECTOR V, UINT w); + +XMVECTOR XMVectorSetIntByIndexPtr(FXMVECTOR V, _In_ CONST UINT *x, UINT i); +XMVECTOR XMVectorSetIntXPtr(FXMVECTOR V, _In_ CONST UINT *x); +XMVECTOR XMVectorSetIntYPtr(FXMVECTOR V, _In_ CONST UINT *y); +XMVECTOR XMVectorSetIntZPtr(FXMVECTOR V, _In_ CONST UINT *z); +XMVECTOR XMVectorSetIntWPtr(FXMVECTOR V, _In_ CONST UINT *w); + +XMVECTOR XMVectorPermuteControl(UINT ElementIndex0, UINT ElementIndex1, UINT ElementIndex2, UINT ElementIndex3); +XMVECTOR XMVectorPermute(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR Control); +XMVECTOR XMVectorSelectControl(UINT VectorIndex0, UINT VectorIndex1, UINT VectorIndex2, UINT VectorIndex3); +XMVECTOR XMVectorSelect(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR Control); +XMVECTOR XMVectorMergeXY(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorMergeZW(FXMVECTOR V1, FXMVECTOR V2); + +#if !defined(_XM_NO_INTRINSICS_) && defined(_XM_VMX128_INTRINSICS_) +#else +XMVECTOR XMVectorShiftLeft(FXMVECTOR V1, FXMVECTOR V2, UINT Elements); +XMVECTOR XMVectorRotateLeft(FXMVECTOR V, UINT Elements); +XMVECTOR XMVectorRotateRight(FXMVECTOR V, UINT Elements); +XMVECTOR XMVectorSwizzle(FXMVECTOR V, UINT E0, UINT E1, UINT E2, UINT E3); +XMVECTOR XMVectorInsert(FXMVECTOR VD, FXMVECTOR VS, UINT VSLeftRotateElements, + UINT Select0, UINT Select1, UINT Select2, UINT Select3); +#endif + +XMVECTOR XMVectorEqual(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorEqualR(_Out_ UINT* pCR, FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorEqualInt(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorEqualIntR(_Out_ UINT* pCR, FXMVECTOR V, FXMVECTOR V2); +XMVECTOR XMVectorNearEqual(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR Epsilon); +XMVECTOR XMVectorNotEqual(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorNotEqualInt(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorGreater(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorGreaterR(_Out_ UINT* pCR, FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorGreaterOrEqual(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorGreaterOrEqualR(_Out_ UINT* pCR, FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorLess(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorLessOrEqual(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorInBounds(FXMVECTOR V, FXMVECTOR Bounds); +XMVECTOR XMVectorInBoundsR(_Out_ UINT* pCR, FXMVECTOR V, FXMVECTOR Bounds); + +XMVECTOR XMVectorIsNaN(FXMVECTOR V); +XMVECTOR XMVectorIsInfinite(FXMVECTOR V); + +XMVECTOR XMVectorMin(FXMVECTOR V1,FXMVECTOR V2); +XMVECTOR XMVectorMax(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorRound(FXMVECTOR V); +XMVECTOR XMVectorTruncate(FXMVECTOR V); +XMVECTOR XMVectorFloor(FXMVECTOR V); +XMVECTOR XMVectorCeiling(FXMVECTOR V); +XMVECTOR XMVectorClamp(FXMVECTOR V, FXMVECTOR Min, FXMVECTOR Max); +XMVECTOR XMVectorSaturate(FXMVECTOR V); + +XMVECTOR XMVectorAndInt(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorAndCInt(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorOrInt(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorNorInt(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorXorInt(FXMVECTOR V1, FXMVECTOR V2); + +XMVECTOR XMVectorNegate(FXMVECTOR V); +XMVECTOR XMVectorAdd(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorAddAngles(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorSubtract(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorSubtractAngles(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorMultiply(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorMultiplyAdd(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR V3); +XMVECTOR XMVectorDivide(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorNegativeMultiplySubtract(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR V3); +XMVECTOR XMVectorScale(FXMVECTOR V, FLOAT ScaleFactor); +XMVECTOR XMVectorReciprocalEst(FXMVECTOR V); +XMVECTOR XMVectorReciprocal(FXMVECTOR V); +XMVECTOR XMVectorSqrtEst(FXMVECTOR V); +XMVECTOR XMVectorSqrt(FXMVECTOR V); +XMVECTOR XMVectorReciprocalSqrtEst(FXMVECTOR V); +XMVECTOR XMVectorReciprocalSqrt(FXMVECTOR V); +XMVECTOR XMVectorExpEst(FXMVECTOR V); +XMVECTOR XMVectorExp(FXMVECTOR V); +XMVECTOR XMVectorLogEst(FXMVECTOR V); +XMVECTOR XMVectorLog(FXMVECTOR V); +XMVECTOR XMVectorPowEst(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorPow(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorAbs(FXMVECTOR V); +XMVECTOR XMVectorMod(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVectorModAngles(FXMVECTOR Angles); +XMVECTOR XMVectorSin(FXMVECTOR V); +XMVECTOR XMVectorSinEst(FXMVECTOR V); +XMVECTOR XMVectorCos(FXMVECTOR V); +XMVECTOR XMVectorCosEst(FXMVECTOR V); +VOID XMVectorSinCos(_Out_ XMVECTOR* pSin, _Out_ XMVECTOR* pCos, FXMVECTOR V); +VOID XMVectorSinCosEst(_Out_ XMVECTOR* pSin, _Out_ XMVECTOR* pCos, FXMVECTOR V); +XMVECTOR XMVectorTan(FXMVECTOR V); +XMVECTOR XMVectorTanEst(FXMVECTOR V); +XMVECTOR XMVectorSinH(FXMVECTOR V); +XMVECTOR XMVectorSinHEst(FXMVECTOR V); +XMVECTOR XMVectorCosH(FXMVECTOR V); +XMVECTOR XMVectorCosHEst(FXMVECTOR V); +XMVECTOR XMVectorTanH(FXMVECTOR V); +XMVECTOR XMVectorTanHEst(FXMVECTOR V); +XMVECTOR XMVectorASin(FXMVECTOR V); +XMVECTOR XMVectorASinEst(FXMVECTOR V); +XMVECTOR XMVectorACos(FXMVECTOR V); +XMVECTOR XMVectorACosEst(FXMVECTOR V); +XMVECTOR XMVectorATan(FXMVECTOR V); +XMVECTOR XMVectorATanEst(FXMVECTOR V); +XMVECTOR XMVectorATan2(FXMVECTOR Y, FXMVECTOR X); +XMVECTOR XMVectorATan2Est(FXMVECTOR Y, FXMVECTOR X); +XMVECTOR XMVectorLerp(FXMVECTOR V0, FXMVECTOR V1, FLOAT t); +XMVECTOR XMVectorLerpV(FXMVECTOR V0, FXMVECTOR V1, FXMVECTOR T); +XMVECTOR XMVectorHermite(FXMVECTOR Position0, FXMVECTOR Tangent0, FXMVECTOR Position1, CXMVECTOR Tangent1, FLOAT t); +XMVECTOR XMVectorHermiteV(FXMVECTOR Position0, FXMVECTOR Tangent0, FXMVECTOR Position1, CXMVECTOR Tangent1, CXMVECTOR T); +XMVECTOR XMVectorCatmullRom(FXMVECTOR Position0, FXMVECTOR Position1, FXMVECTOR Position2, CXMVECTOR Position3, FLOAT t); +XMVECTOR XMVectorCatmullRomV(FXMVECTOR Position0, FXMVECTOR Position1, FXMVECTOR Position2, CXMVECTOR Position3, CXMVECTOR T); +XMVECTOR XMVectorBaryCentric(FXMVECTOR Position0, FXMVECTOR Position1, FXMVECTOR Position2, FLOAT f, FLOAT g); +XMVECTOR XMVectorBaryCentricV(FXMVECTOR Position0, FXMVECTOR Position1, FXMVECTOR Position2, CXMVECTOR F, CXMVECTOR G); + +/**************************************************************************** + * + * 2D vector operations + * + ****************************************************************************/ + + +BOOL XMVector2Equal(FXMVECTOR V1, FXMVECTOR V2); +UINT XMVector2EqualR(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector2EqualInt(FXMVECTOR V1, FXMVECTOR V2); +UINT XMVector2EqualIntR(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector2NearEqual(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR Epsilon); +BOOL XMVector2NotEqual(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector2NotEqualInt(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector2Greater(FXMVECTOR V1, FXMVECTOR V2); +UINT XMVector2GreaterR(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector2GreaterOrEqual(FXMVECTOR V1, FXMVECTOR V2); +UINT XMVector2GreaterOrEqualR(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector2Less(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector2LessOrEqual(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector2InBounds(FXMVECTOR V, FXMVECTOR Bounds); +UINT XMVector2InBoundsR(FXMVECTOR V, FXMVECTOR Bounds); + +BOOL XMVector2IsNaN(FXMVECTOR V); +BOOL XMVector2IsInfinite(FXMVECTOR V); + +XMVECTOR XMVector2Dot(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVector2Cross(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVector2LengthSq(FXMVECTOR V); +XMVECTOR XMVector2ReciprocalLengthEst(FXMVECTOR V); +XMVECTOR XMVector2ReciprocalLength(FXMVECTOR V); +XMVECTOR XMVector2LengthEst(FXMVECTOR V); +XMVECTOR XMVector2Length(FXMVECTOR V); +XMVECTOR XMVector2NormalizeEst(FXMVECTOR V); +XMVECTOR XMVector2Normalize(FXMVECTOR V); +XMVECTOR XMVector2ClampLength(FXMVECTOR V, FLOAT LengthMin, FLOAT LengthMax); +XMVECTOR XMVector2ClampLengthV(FXMVECTOR V, FXMVECTOR LengthMin, FXMVECTOR LengthMax); +XMVECTOR XMVector2Reflect(FXMVECTOR Incident, FXMVECTOR Normal); +XMVECTOR XMVector2Refract(FXMVECTOR Incident, FXMVECTOR Normal, FLOAT RefractionIndex); +XMVECTOR XMVector2RefractV(FXMVECTOR Incident, FXMVECTOR Normal, FXMVECTOR RefractionIndex); +XMVECTOR XMVector2Orthogonal(FXMVECTOR V); +XMVECTOR XMVector2AngleBetweenNormalsEst(FXMVECTOR N1, FXMVECTOR N2); +XMVECTOR XMVector2AngleBetweenNormals(FXMVECTOR N1, FXMVECTOR N2); +XMVECTOR XMVector2AngleBetweenVectors(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVector2LinePointDistance(FXMVECTOR LinePoint1, FXMVECTOR LinePoint2, FXMVECTOR Point); +XMVECTOR XMVector2IntersectLine(FXMVECTOR Line1Point1, FXMVECTOR Line1Point2, FXMVECTOR Line2Point1, CXMVECTOR Line2Point2); +XMVECTOR XMVector2Transform(FXMVECTOR V, CXMMATRIX M); +XMFLOAT4* XMVector2TransformStream(_Out_bytecap_x_(sizeof(XMFLOAT4)+OutputStride*(VectorCount-1)) XMFLOAT4* pOutputStream, + _In_ UINT OutputStride, + _In_bytecount_x_(sizeof(XMFLOAT2)+InputStride*(VectorCount-1)) CONST XMFLOAT2* pInputStream, + _In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M); +XMFLOAT4* XMVector2TransformStreamNC(_Out_bytecap_x_(sizeof(XMFLOAT4)+OutputStride*(VectorCount-1)) XMFLOAT4* pOutputStream, + _In_ UINT OutputStride, + _In_bytecount_x_(sizeof(XMFLOAT2)+InputStride*(VectorCount-1)) CONST XMFLOAT2* pInputStream, + _In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M); +XMVECTOR XMVector2TransformCoord(FXMVECTOR V, CXMMATRIX M); +XMFLOAT2* XMVector2TransformCoordStream(_Out_bytecap_x_(sizeof(XMFLOAT2)+OutputStride*(VectorCount-1)) XMFLOAT2* pOutputStream, + _In_ UINT OutputStride, + _In_bytecount_x_(sizeof(XMFLOAT2)+InputStride*(VectorCount-1)) CONST XMFLOAT2* pInputStream, + _In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M); +XMVECTOR XMVector2TransformNormal(FXMVECTOR V, CXMMATRIX M); +XMFLOAT2* XMVector2TransformNormalStream(_Out_bytecap_x_(sizeof(XMFLOAT2)+OutputStride*(VectorCount-1)) XMFLOAT2* pOutputStream, + _In_ UINT OutputStride, + _In_bytecount_x_(sizeof(XMFLOAT2)+InputStride*(VectorCount-1)) CONST XMFLOAT2* pInputStream, + _In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M); + +/**************************************************************************** + * + * 3D vector operations + * + ****************************************************************************/ + + +BOOL XMVector3Equal(FXMVECTOR V1, FXMVECTOR V2); +UINT XMVector3EqualR(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector3EqualInt(FXMVECTOR V1, FXMVECTOR V2); +UINT XMVector3EqualIntR(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector3NearEqual(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR Epsilon); +BOOL XMVector3NotEqual(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector3NotEqualInt(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector3Greater(FXMVECTOR V1, FXMVECTOR V2); +UINT XMVector3GreaterR(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector3GreaterOrEqual(FXMVECTOR V1, FXMVECTOR V2); +UINT XMVector3GreaterOrEqualR(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector3Less(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector3LessOrEqual(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector3InBounds(FXMVECTOR V, FXMVECTOR Bounds); +UINT XMVector3InBoundsR(FXMVECTOR V, FXMVECTOR Bounds); + +BOOL XMVector3IsNaN(FXMVECTOR V); +BOOL XMVector3IsInfinite(FXMVECTOR V); + +XMVECTOR XMVector3Dot(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVector3Cross(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVector3LengthSq(FXMVECTOR V); +XMVECTOR XMVector3ReciprocalLengthEst(FXMVECTOR V); +XMVECTOR XMVector3ReciprocalLength(FXMVECTOR V); +XMVECTOR XMVector3LengthEst(FXMVECTOR V); +XMVECTOR XMVector3Length(FXMVECTOR V); +XMVECTOR XMVector3NormalizeEst(FXMVECTOR V); +XMVECTOR XMVector3Normalize(FXMVECTOR V); +XMVECTOR XMVector3ClampLength(FXMVECTOR V, FLOAT LengthMin, FLOAT LengthMax); +XMVECTOR XMVector3ClampLengthV(FXMVECTOR V, FXMVECTOR LengthMin, FXMVECTOR LengthMax); +XMVECTOR XMVector3Reflect(FXMVECTOR Incident, FXMVECTOR Normal); +XMVECTOR XMVector3Refract(FXMVECTOR Incident, FXMVECTOR Normal, FLOAT RefractionIndex); +XMVECTOR XMVector3RefractV(FXMVECTOR Incident, FXMVECTOR Normal, FXMVECTOR RefractionIndex); +XMVECTOR XMVector3Orthogonal(FXMVECTOR V); +XMVECTOR XMVector3AngleBetweenNormalsEst(FXMVECTOR N1, FXMVECTOR N2); +XMVECTOR XMVector3AngleBetweenNormals(FXMVECTOR N1, FXMVECTOR N2); +XMVECTOR XMVector3AngleBetweenVectors(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVector3LinePointDistance(FXMVECTOR LinePoint1, FXMVECTOR LinePoint2, FXMVECTOR Point); +VOID XMVector3ComponentsFromNormal(_Out_ XMVECTOR* pParallel, _Out_ XMVECTOR* pPerpendicular, FXMVECTOR V, FXMVECTOR Normal); +XMVECTOR XMVector3Rotate(FXMVECTOR V, FXMVECTOR RotationQuaternion); +XMVECTOR XMVector3InverseRotate(FXMVECTOR V, FXMVECTOR RotationQuaternion); +XMVECTOR XMVector3Transform(FXMVECTOR V, CXMMATRIX M); +XMFLOAT4* XMVector3TransformStream(_Out_bytecap_x_(sizeof(XMFLOAT4)+OutputStride*(VectorCount-1)) XMFLOAT4* pOutputStream, + _In_ UINT OutputStride, + _In_bytecount_x_(sizeof(XMFLOAT3)+InputStride*(VectorCount-1)) CONST XMFLOAT3* pInputStream, + _In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M); +XMFLOAT4* XMVector3TransformStreamNC(_Out_bytecap_x_(sizeof(XMFLOAT4)+OutputStride*(VectorCount-1)) XMFLOAT4* pOutputStream, + _In_ UINT OutputStride, + _In_bytecount_x_(sizeof(XMFLOAT3)+InputStride*(VectorCount-1)) CONST XMFLOAT3* pInputStream, + _In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M); +XMVECTOR XMVector3TransformCoord(FXMVECTOR V, CXMMATRIX M); +XMFLOAT3* XMVector3TransformCoordStream(_Out_bytecap_x_(sizeof(XMFLOAT3)+OutputStride*(VectorCount-1)) XMFLOAT3* pOutputStream, + _In_ UINT OutputStride, + _In_bytecount_x_(sizeof(XMFLOAT3)+InputStride*(VectorCount-1)) CONST XMFLOAT3* pInputStream, + _In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M); +XMVECTOR XMVector3TransformNormal(FXMVECTOR V, CXMMATRIX M); +XMFLOAT3* XMVector3TransformNormalStream(_Out_bytecap_x_(sizeof(XMFLOAT3)+OutputStride*(VectorCount-1)) XMFLOAT3* pOutputStream, + _In_ UINT OutputStride, + _In_bytecount_x_(sizeof(XMFLOAT3)+InputStride*(VectorCount-1)) CONST XMFLOAT3* pInputStream, + _In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M); +XMVECTOR XMVector3Project(FXMVECTOR V, FLOAT ViewportX, FLOAT ViewportY, FLOAT ViewportWidth, FLOAT ViewportHeight, FLOAT ViewportMinZ, FLOAT ViewportMaxZ, + CXMMATRIX Projection, CXMMATRIX View, CXMMATRIX World); +XMFLOAT3* XMVector3ProjectStream(_Out_bytecap_x_(sizeof(XMFLOAT3)+OutputStride*(VectorCount-1)) XMFLOAT3* pOutputStream, + _In_ UINT OutputStride, + _In_bytecount_x_(sizeof(XMFLOAT3)+InputStride*(VectorCount-1)) CONST XMFLOAT3* pInputStream, + _In_ UINT InputStride, _In_ UINT VectorCount, + FLOAT ViewportX, FLOAT ViewportY, FLOAT ViewportWidth, FLOAT ViewportHeight, FLOAT ViewportMinZ, FLOAT ViewportMaxZ, + CXMMATRIX Projection, CXMMATRIX View, CXMMATRIX World); +XMVECTOR XMVector3Unproject(FXMVECTOR V, FLOAT ViewportX, FLOAT ViewportY, FLOAT ViewportWidth, FLOAT ViewportHeight, FLOAT ViewportMinZ, FLOAT ViewportMaxZ, + CXMMATRIX Projection, CXMMATRIX View, CXMMATRIX World); +XMFLOAT3* XMVector3UnprojectStream(_Out_bytecap_x_(sizeof(XMFLOAT3)+OutputStride*(VectorCount-1)) XMFLOAT3* pOutputStream, + _In_ UINT OutputStride, + _In_bytecount_x_(sizeof(XMFLOAT3)+InputStride*(VectorCount-1)) CONST XMFLOAT3* pInputStream, + _In_ UINT InputStride, _In_ UINT VectorCount, + FLOAT ViewportX, FLOAT ViewportY, FLOAT ViewportWidth, FLOAT ViewportHeight, FLOAT ViewportMinZ, FLOAT ViewportMaxZ, + CXMMATRIX Projection, CXMMATRIX View, CXMMATRIX World); + +/**************************************************************************** + * + * 4D vector operations + * + ****************************************************************************/ + +BOOL XMVector4Equal(FXMVECTOR V1, FXMVECTOR V2); +UINT XMVector4EqualR(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector4EqualInt(FXMVECTOR V1, FXMVECTOR V2); +UINT XMVector4EqualIntR(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector4NearEqual(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR Epsilon); +BOOL XMVector4NotEqual(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector4NotEqualInt(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector4Greater(FXMVECTOR V1, FXMVECTOR V2); +UINT XMVector4GreaterR(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector4GreaterOrEqual(FXMVECTOR V1, FXMVECTOR V2); +UINT XMVector4GreaterOrEqualR(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector4Less(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector4LessOrEqual(FXMVECTOR V1, FXMVECTOR V2); +BOOL XMVector4InBounds(FXMVECTOR V, FXMVECTOR Bounds); +UINT XMVector4InBoundsR(FXMVECTOR V, FXMVECTOR Bounds); + +BOOL XMVector4IsNaN(FXMVECTOR V); +BOOL XMVector4IsInfinite(FXMVECTOR V); + +XMVECTOR XMVector4Dot(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVector4Cross(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR V3); +XMVECTOR XMVector4LengthSq(FXMVECTOR V); +XMVECTOR XMVector4ReciprocalLengthEst(FXMVECTOR V); +XMVECTOR XMVector4ReciprocalLength(FXMVECTOR V); +XMVECTOR XMVector4LengthEst(FXMVECTOR V); +XMVECTOR XMVector4Length(FXMVECTOR V); +XMVECTOR XMVector4NormalizeEst(FXMVECTOR V); +XMVECTOR XMVector4Normalize(FXMVECTOR V); +XMVECTOR XMVector4ClampLength(FXMVECTOR V, FLOAT LengthMin, FLOAT LengthMax); +XMVECTOR XMVector4ClampLengthV(FXMVECTOR V, FXMVECTOR LengthMin, FXMVECTOR LengthMax); +XMVECTOR XMVector4Reflect(FXMVECTOR Incident, FXMVECTOR Normal); +XMVECTOR XMVector4Refract(FXMVECTOR Incident, FXMVECTOR Normal, FLOAT RefractionIndex); +XMVECTOR XMVector4RefractV(FXMVECTOR Incident, FXMVECTOR Normal, FXMVECTOR RefractionIndex); +XMVECTOR XMVector4Orthogonal(FXMVECTOR V); +XMVECTOR XMVector4AngleBetweenNormalsEst(FXMVECTOR N1, FXMVECTOR N2); +XMVECTOR XMVector4AngleBetweenNormals(FXMVECTOR N1, FXMVECTOR N2); +XMVECTOR XMVector4AngleBetweenVectors(FXMVECTOR V1, FXMVECTOR V2); +XMVECTOR XMVector4Transform(FXMVECTOR V, CXMMATRIX M); +XMFLOAT4* XMVector4TransformStream(_Out_bytecap_x_(sizeof(XMFLOAT4)+OutputStride*(VectorCount-1)) XMFLOAT4* pOutputStream, + _In_ UINT OutputStride, + _In_bytecount_x_(sizeof(XMFLOAT4)+InputStride*(VectorCount-1)) CONST XMFLOAT4* pInputStream, + _In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M); + +/**************************************************************************** + * + * Matrix operations + * + ****************************************************************************/ + +BOOL XMMatrixIsNaN(CXMMATRIX M); +BOOL XMMatrixIsInfinite(CXMMATRIX M); +BOOL XMMatrixIsIdentity(CXMMATRIX M); + +XMMATRIX XMMatrixMultiply(CXMMATRIX M1, CXMMATRIX M2); +XMMATRIX XMMatrixMultiplyTranspose(CXMMATRIX M1, CXMMATRIX M2); +XMMATRIX XMMatrixTranspose(CXMMATRIX M); +XMMATRIX XMMatrixInverse(_Out_ XMVECTOR* pDeterminant, CXMMATRIX M); +XMVECTOR XMMatrixDeterminant(CXMMATRIX M); +BOOL XMMatrixDecompose(_Out_ XMVECTOR *outScale, _Out_ XMVECTOR *outRotQuat, _Out_ XMVECTOR *outTrans, CXMMATRIX M); + +XMMATRIX XMMatrixIdentity(); +XMMATRIX XMMatrixSet(FLOAT m00, FLOAT m01, FLOAT m02, FLOAT m03, + FLOAT m10, FLOAT m11, FLOAT m12, FLOAT m13, + FLOAT m20, FLOAT m21, FLOAT m22, FLOAT m23, + FLOAT m30, FLOAT m31, FLOAT m32, FLOAT m33); +XMMATRIX XMMatrixTranslation(FLOAT OffsetX, FLOAT OffsetY, FLOAT OffsetZ); +XMMATRIX XMMatrixTranslationFromVector(FXMVECTOR Offset); +XMMATRIX XMMatrixScaling(FLOAT ScaleX, FLOAT ScaleY, FLOAT ScaleZ); +XMMATRIX XMMatrixScalingFromVector(FXMVECTOR Scale); +XMMATRIX XMMatrixRotationX(FLOAT Angle); +XMMATRIX XMMatrixRotationY(FLOAT Angle); +XMMATRIX XMMatrixRotationZ(FLOAT Angle); +XMMATRIX XMMatrixRotationRollPitchYaw(FLOAT Pitch, FLOAT Yaw, FLOAT Roll); +XMMATRIX XMMatrixRotationRollPitchYawFromVector(FXMVECTOR Angles); +XMMATRIX XMMatrixRotationNormal(FXMVECTOR NormalAxis, FLOAT Angle); +XMMATRIX XMMatrixRotationAxis(FXMVECTOR Axis, FLOAT Angle); +XMMATRIX XMMatrixRotationQuaternion(FXMVECTOR Quaternion); +XMMATRIX XMMatrixTransformation2D(FXMVECTOR ScalingOrigin, FLOAT ScalingOrientation, FXMVECTOR Scaling, + FXMVECTOR RotationOrigin, FLOAT Rotation, CXMVECTOR Translation); +XMMATRIX XMMatrixTransformation(FXMVECTOR ScalingOrigin, FXMVECTOR ScalingOrientationQuaternion, FXMVECTOR Scaling, + CXMVECTOR RotationOrigin, CXMVECTOR RotationQuaternion, CXMVECTOR Translation); +XMMATRIX XMMatrixAffineTransformation2D(FXMVECTOR Scaling, FXMVECTOR RotationOrigin, FLOAT Rotation, FXMVECTOR Translation); +XMMATRIX XMMatrixAffineTransformation(FXMVECTOR Scaling, FXMVECTOR RotationOrigin, FXMVECTOR RotationQuaternion, CXMVECTOR Translation); +XMMATRIX XMMatrixReflect(FXMVECTOR ReflectionPlane); +XMMATRIX XMMatrixShadow(FXMVECTOR ShadowPlane, FXMVECTOR LightPosition); + +XMMATRIX XMMatrixLookAtLH(FXMVECTOR EyePosition, FXMVECTOR FocusPosition, FXMVECTOR UpDirection); +XMMATRIX XMMatrixLookAtRH(FXMVECTOR EyePosition, FXMVECTOR FocusPosition, FXMVECTOR UpDirection); +XMMATRIX XMMatrixLookToLH(FXMVECTOR EyePosition, FXMVECTOR EyeDirection, FXMVECTOR UpDirection); +XMMATRIX XMMatrixLookToRH(FXMVECTOR EyePosition, FXMVECTOR EyeDirection, FXMVECTOR UpDirection); +XMMATRIX XMMatrixPerspectiveLH(FLOAT ViewWidth, FLOAT ViewHeight, FLOAT NearZ, FLOAT FarZ); +XMMATRIX XMMatrixPerspectiveRH(FLOAT ViewWidth, FLOAT ViewHeight, FLOAT NearZ, FLOAT FarZ); +XMMATRIX XMMatrixPerspectiveFovLH(FLOAT FovAngleY, FLOAT AspectHByW, FLOAT NearZ, FLOAT FarZ); +XMMATRIX XMMatrixPerspectiveFovRH(FLOAT FovAngleY, FLOAT AspectHByW, FLOAT NearZ, FLOAT FarZ); +XMMATRIX XMMatrixPerspectiveOffCenterLH(FLOAT ViewLeft, FLOAT ViewRight, FLOAT ViewBottom, FLOAT ViewTop, FLOAT NearZ, FLOAT FarZ); +XMMATRIX XMMatrixPerspectiveOffCenterRH(FLOAT ViewLeft, FLOAT ViewRight, FLOAT ViewBottom, FLOAT ViewTop, FLOAT NearZ, FLOAT FarZ); +XMMATRIX XMMatrixOrthographicLH(FLOAT ViewWidth, FLOAT ViewHeight, FLOAT NearZ, FLOAT FarZ); +XMMATRIX XMMatrixOrthographicRH(FLOAT ViewWidth, FLOAT ViewHeight, FLOAT NearZ, FLOAT FarZ); +XMMATRIX XMMatrixOrthographicOffCenterLH(FLOAT ViewLeft, FLOAT ViewRight, FLOAT ViewBottom, FLOAT ViewTop, FLOAT NearZ, FLOAT FarZ); +XMMATRIX XMMatrixOrthographicOffCenterRH(FLOAT ViewLeft, FLOAT ViewRight, FLOAT ViewBottom, FLOAT ViewTop, FLOAT NearZ, FLOAT FarZ); + +/**************************************************************************** + * + * Quaternion operations + * + ****************************************************************************/ + +BOOL XMQuaternionEqual(FXMVECTOR Q1, FXMVECTOR Q2); +BOOL XMQuaternionNotEqual(FXMVECTOR Q1, FXMVECTOR Q2); + +BOOL XMQuaternionIsNaN(FXMVECTOR Q); +BOOL XMQuaternionIsInfinite(FXMVECTOR Q); +BOOL XMQuaternionIsIdentity(FXMVECTOR Q); + +XMVECTOR XMQuaternionDot(FXMVECTOR Q1, FXMVECTOR Q2); +XMVECTOR XMQuaternionMultiply(FXMVECTOR Q1, FXMVECTOR Q2); +XMVECTOR XMQuaternionLengthSq(FXMVECTOR Q); +XMVECTOR XMQuaternionReciprocalLength(FXMVECTOR Q); +XMVECTOR XMQuaternionLength(FXMVECTOR Q); +XMVECTOR XMQuaternionNormalizeEst(FXMVECTOR Q); +XMVECTOR XMQuaternionNormalize(FXMVECTOR Q); +XMVECTOR XMQuaternionConjugate(FXMVECTOR Q); +XMVECTOR XMQuaternionInverse(FXMVECTOR Q); +XMVECTOR XMQuaternionLn(FXMVECTOR Q); +XMVECTOR XMQuaternionExp(FXMVECTOR Q); +XMVECTOR XMQuaternionSlerp(FXMVECTOR Q0, FXMVECTOR Q1, FLOAT t); +XMVECTOR XMQuaternionSlerpV(FXMVECTOR Q0, FXMVECTOR Q1, FXMVECTOR T); +XMVECTOR XMQuaternionSquad(FXMVECTOR Q0, FXMVECTOR Q1, FXMVECTOR Q2, CXMVECTOR Q3, FLOAT t); +XMVECTOR XMQuaternionSquadV(FXMVECTOR Q0, FXMVECTOR Q1, FXMVECTOR Q2, CXMVECTOR Q3, CXMVECTOR T); +VOID XMQuaternionSquadSetup(_Out_ XMVECTOR* pA, _Out_ XMVECTOR* pB, _Out_ XMVECTOR* pC, FXMVECTOR Q0, FXMVECTOR Q1, FXMVECTOR Q2, CXMVECTOR Q3); +XMVECTOR XMQuaternionBaryCentric(FXMVECTOR Q0, FXMVECTOR Q1, FXMVECTOR Q2, FLOAT f, FLOAT g); +XMVECTOR XMQuaternionBaryCentricV(FXMVECTOR Q0, FXMVECTOR Q1, FXMVECTOR Q2, CXMVECTOR F, CXMVECTOR G); + +XMVECTOR XMQuaternionIdentity(); +XMVECTOR XMQuaternionRotationRollPitchYaw(FLOAT Pitch, FLOAT Yaw, FLOAT Roll); +XMVECTOR XMQuaternionRotationRollPitchYawFromVector(FXMVECTOR Angles); +XMVECTOR XMQuaternionRotationNormal(FXMVECTOR NormalAxis, FLOAT Angle); +XMVECTOR XMQuaternionRotationAxis(FXMVECTOR Axis, FLOAT Angle); +XMVECTOR XMQuaternionRotationMatrix(CXMMATRIX M); + +VOID XMQuaternionToAxisAngle(_Out_ XMVECTOR* pAxis, _Out_ FLOAT* pAngle, FXMVECTOR Q); + +/**************************************************************************** + * + * Plane operations + * + ****************************************************************************/ + +BOOL XMPlaneEqual(FXMVECTOR P1, FXMVECTOR P2); +BOOL XMPlaneNearEqual(FXMVECTOR P1, FXMVECTOR P2, FXMVECTOR Epsilon); +BOOL XMPlaneNotEqual(FXMVECTOR P1, FXMVECTOR P2); + +BOOL XMPlaneIsNaN(FXMVECTOR P); +BOOL XMPlaneIsInfinite(FXMVECTOR P); + +XMVECTOR XMPlaneDot(FXMVECTOR P, FXMVECTOR V); +XMVECTOR XMPlaneDotCoord(FXMVECTOR P, FXMVECTOR V); +XMVECTOR XMPlaneDotNormal(FXMVECTOR P, FXMVECTOR V); +XMVECTOR XMPlaneNormalizeEst(FXMVECTOR P); +XMVECTOR XMPlaneNormalize(FXMVECTOR P); +XMVECTOR XMPlaneIntersectLine(FXMVECTOR P, FXMVECTOR LinePoint1, FXMVECTOR LinePoint2); +VOID XMPlaneIntersectPlane(_Out_ XMVECTOR* pLinePoint1, _Out_ XMVECTOR* pLinePoint2, FXMVECTOR P1, FXMVECTOR P2); +XMVECTOR XMPlaneTransform(FXMVECTOR P, CXMMATRIX M); +XMFLOAT4* XMPlaneTransformStream(_Out_bytecap_x_(sizeof(XMFLOAT4)+OutputStride*(PlaneCount-1)) XMFLOAT4* pOutputStream, + _In_ UINT OutputStride, + _In_bytecount_x_(sizeof(XMFLOAT4)+InputStride*(PlaneCount-1)) CONST XMFLOAT4* pInputStream, + _In_ UINT InputStride, _In_ UINT PlaneCount, CXMMATRIX M); + +XMVECTOR XMPlaneFromPointNormal(FXMVECTOR Point, FXMVECTOR Normal); +XMVECTOR XMPlaneFromPoints(FXMVECTOR Point1, FXMVECTOR Point2, FXMVECTOR Point3); + +/**************************************************************************** + * + * Color operations + * + ****************************************************************************/ + +BOOL XMColorEqual(FXMVECTOR C1, FXMVECTOR C2); +BOOL XMColorNotEqual(FXMVECTOR C1, FXMVECTOR C2); +BOOL XMColorGreater(FXMVECTOR C1, FXMVECTOR C2); +BOOL XMColorGreaterOrEqual(FXMVECTOR C1, FXMVECTOR C2); +BOOL XMColorLess(FXMVECTOR C1, FXMVECTOR C2); +BOOL XMColorLessOrEqual(FXMVECTOR C1, FXMVECTOR C2); + +BOOL XMColorIsNaN(FXMVECTOR C); +BOOL XMColorIsInfinite(FXMVECTOR C); + +XMVECTOR XMColorNegative(FXMVECTOR C); +XMVECTOR XMColorModulate(FXMVECTOR C1, FXMVECTOR C2); +XMVECTOR XMColorAdjustSaturation(FXMVECTOR C, FLOAT Saturation); +XMVECTOR XMColorAdjustContrast(FXMVECTOR C, FLOAT Contrast); + +/**************************************************************************** + * + * Miscellaneous operations + * + ****************************************************************************/ + +BOOL XMVerifyCPUSupport(); + +VOID XMAssert(_In_z_ CONST CHAR* pExpression, _In_z_ CONST CHAR* pFileName, UINT LineNumber); + +XMVECTOR XMFresnelTerm(FXMVECTOR CosIncidentAngle, FXMVECTOR RefractionIndex); + +BOOL XMScalarNearEqual(FLOAT S1, FLOAT S2, FLOAT Epsilon); +FLOAT XMScalarModAngle(FLOAT Value); +FLOAT XMScalarSin(FLOAT Value); +FLOAT XMScalarCos(FLOAT Value); +VOID XMScalarSinCos(_Out_ FLOAT* pSin, _Out_ FLOAT* pCos, FLOAT Value); +FLOAT XMScalarASin(FLOAT Value); +FLOAT XMScalarACos(FLOAT Value); +FLOAT XMScalarSinEst(FLOAT Value); +FLOAT XMScalarCosEst(FLOAT Value); +VOID XMScalarSinCosEst(_Out_ FLOAT* pSin, _Out_ FLOAT* pCos, FLOAT Value); +FLOAT XMScalarASinEst(FLOAT Value); +FLOAT XMScalarACosEst(FLOAT Value); + +/**************************************************************************** + * + * Globals + * + ****************************************************************************/ + +// The purpose of the following global constants is to prevent redundant +// reloading of the constants when they are referenced by more than one +// separate inline math routine called within the same function. Declaring +// a constant locally within a routine is sufficient to prevent redundant +// reloads of that constant when that single routine is called multiple +// times in a function, but if the constant is used (and declared) in a +// separate math routine it would be reloaded. + +#define XMGLOBALCONST extern CONST __declspec(selectany) + +XMGLOBALCONST XMVECTORF32 g_XMSinCoefficients0 = {1.0f, -0.166666667f, 8.333333333e-3f, -1.984126984e-4f}; +XMGLOBALCONST XMVECTORF32 g_XMSinCoefficients1 = {2.755731922e-6f, -2.505210839e-8f, 1.605904384e-10f, -7.647163732e-13f}; +XMGLOBALCONST XMVECTORF32 g_XMSinCoefficients2 = {2.811457254e-15f, -8.220635247e-18f, 1.957294106e-20f, -3.868170171e-23f}; +XMGLOBALCONST XMVECTORF32 g_XMCosCoefficients0 = {1.0f, -0.5f, 4.166666667e-2f, -1.388888889e-3f}; +XMGLOBALCONST XMVECTORF32 g_XMCosCoefficients1 = {2.480158730e-5f, -2.755731922e-7f, 2.087675699e-9f, -1.147074560e-11f}; +XMGLOBALCONST XMVECTORF32 g_XMCosCoefficients2 = {4.779477332e-14f, -1.561920697e-16f, 4.110317623e-19f, -8.896791392e-22f}; +XMGLOBALCONST XMVECTORF32 g_XMTanCoefficients0 = {1.0f, 0.333333333f, 0.133333333f, 5.396825397e-2f}; +XMGLOBALCONST XMVECTORF32 g_XMTanCoefficients1 = {2.186948854e-2f, 8.863235530e-3f, 3.592128167e-3f, 1.455834485e-3f}; +XMGLOBALCONST XMVECTORF32 g_XMTanCoefficients2 = {5.900274264e-4f, 2.391290764e-4f, 9.691537707e-5f, 3.927832950e-5f}; +XMGLOBALCONST XMVECTORF32 g_XMASinCoefficients0 = {-0.05806367563904f, -0.41861972469416f, 0.22480114791621f, 2.17337241360606f}; +XMGLOBALCONST XMVECTORF32 g_XMASinCoefficients1 = {0.61657275907170f, 4.29696498283455f, -1.18942822255452f, -6.53784832094831f}; +XMGLOBALCONST XMVECTORF32 g_XMASinCoefficients2 = {-1.36926553863413f, -4.48179294237210f, 1.41810672941833f, 5.48179257935713f}; +XMGLOBALCONST XMVECTORF32 g_XMATanCoefficients0 = {1.0f, 0.333333334f, 0.2f, 0.142857143f}; +XMGLOBALCONST XMVECTORF32 g_XMATanCoefficients1 = {1.111111111e-1f, 9.090909091e-2f, 7.692307692e-2f, 6.666666667e-2f}; +XMGLOBALCONST XMVECTORF32 g_XMATanCoefficients2 = {5.882352941e-2f, 5.263157895e-2f, 4.761904762e-2f, 4.347826087e-2f}; +XMGLOBALCONST XMVECTORF32 g_XMSinEstCoefficients = {1.0f, -1.66521856991541e-1f, 8.199913018755e-3f, -1.61475937228e-4f}; +XMGLOBALCONST XMVECTORF32 g_XMCosEstCoefficients = {1.0f, -4.95348008918096e-1f, 3.878259962881e-2f, -9.24587976263e-4f}; +XMGLOBALCONST XMVECTORF32 g_XMTanEstCoefficients = {2.484f, -1.954923183e-1f, 2.467401101f, XM_1DIVPI}; +XMGLOBALCONST XMVECTORF32 g_XMATanEstCoefficients = {7.689891418951e-1f, 1.104742493348f, 8.661844266006e-1f, XM_PIDIV2}; +XMGLOBALCONST XMVECTORF32 g_XMASinEstCoefficients = {-1.36178272886711f, 2.37949493464538f, -8.08228565650486e-1f, 2.78440142746736e-1f}; +XMGLOBALCONST XMVECTORF32 g_XMASinEstConstants = {1.00000011921f, XM_PIDIV2, 0.0f, 0.0f}; +XMGLOBALCONST XMVECTORF32 g_XMPiConstants0 = {XM_PI, XM_2PI, XM_1DIVPI, XM_1DIV2PI}; +XMGLOBALCONST XMVECTORF32 g_XMIdentityR0 = {1.0f, 0.0f, 0.0f, 0.0f}; +XMGLOBALCONST XMVECTORF32 g_XMIdentityR1 = {0.0f, 1.0f, 0.0f, 0.0f}; +XMGLOBALCONST XMVECTORF32 g_XMIdentityR2 = {0.0f, 0.0f, 1.0f, 0.0f}; +XMGLOBALCONST XMVECTORF32 g_XMIdentityR3 = {0.0f, 0.0f, 0.0f, 1.0f}; +XMGLOBALCONST XMVECTORF32 g_XMNegIdentityR0 = {-1.0f,0.0f, 0.0f, 0.0f}; +XMGLOBALCONST XMVECTORF32 g_XMNegIdentityR1 = {0.0f,-1.0f, 0.0f, 0.0f}; +XMGLOBALCONST XMVECTORF32 g_XMNegIdentityR2 = {0.0f, 0.0f,-1.0f, 0.0f}; +XMGLOBALCONST XMVECTORF32 g_XMNegIdentityR3 = {0.0f, 0.0f, 0.0f,-1.0f}; +XMGLOBALCONST XMVECTORI32 g_XMNegativeZero = {0x80000000, 0x80000000, 0x80000000, 0x80000000}; +XMGLOBALCONST XMVECTORI32 g_XMNegate3 = {0x80000000, 0x80000000, 0x80000000, 0x00000000}; +XMGLOBALCONST XMVECTORI32 g_XMMask3 = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000}; +XMGLOBALCONST XMVECTORI32 g_XMMaskX = {0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000}; +XMGLOBALCONST XMVECTORI32 g_XMMaskY = {0x00000000, 0xFFFFFFFF, 0x00000000, 0x00000000}; +XMGLOBALCONST XMVECTORI32 g_XMMaskZ = {0x00000000, 0x00000000, 0xFFFFFFFF, 0x00000000}; +XMGLOBALCONST XMVECTORI32 g_XMMaskW = {0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF}; +XMGLOBALCONST XMVECTORF32 g_XMOne = { 1.0f, 1.0f, 1.0f, 1.0f}; +XMGLOBALCONST XMVECTORF32 g_XMOne3 = { 1.0f, 1.0f, 1.0f, 0.0f}; +XMGLOBALCONST XMVECTORF32 g_XMZero = { 0.0f, 0.0f, 0.0f, 0.0f}; +XMGLOBALCONST XMVECTORF32 g_XMNegativeOne = {-1.0f,-1.0f,-1.0f,-1.0f}; +XMGLOBALCONST XMVECTORF32 g_XMOneHalf = { 0.5f, 0.5f, 0.5f, 0.5f}; +XMGLOBALCONST XMVECTORF32 g_XMNegativeOneHalf = {-0.5f,-0.5f,-0.5f,-0.5f}; +XMGLOBALCONST XMVECTORF32 g_XMNegativeTwoPi = {-XM_2PI, -XM_2PI, -XM_2PI, -XM_2PI}; +XMGLOBALCONST XMVECTORF32 g_XMNegativePi = {-XM_PI, -XM_PI, -XM_PI, -XM_PI}; +XMGLOBALCONST XMVECTORF32 g_XMHalfPi = {XM_PIDIV2, XM_PIDIV2, XM_PIDIV2, XM_PIDIV2}; +XMGLOBALCONST XMVECTORF32 g_XMPi = {XM_PI, XM_PI, XM_PI, XM_PI}; +XMGLOBALCONST XMVECTORF32 g_XMReciprocalPi = {XM_1DIVPI, XM_1DIVPI, XM_1DIVPI, XM_1DIVPI}; +XMGLOBALCONST XMVECTORF32 g_XMTwoPi = {XM_2PI, XM_2PI, XM_2PI, XM_2PI}; +XMGLOBALCONST XMVECTORF32 g_XMReciprocalTwoPi = {XM_1DIV2PI, XM_1DIV2PI, XM_1DIV2PI, XM_1DIV2PI}; +XMGLOBALCONST XMVECTORF32 g_XMEpsilon = {1.192092896e-7f, 1.192092896e-7f, 1.192092896e-7f, 1.192092896e-7f}; +XMGLOBALCONST XMVECTORI32 g_XMInfinity = {0x7F800000, 0x7F800000, 0x7F800000, 0x7F800000}; +XMGLOBALCONST XMVECTORI32 g_XMQNaN = {0x7FC00000, 0x7FC00000, 0x7FC00000, 0x7FC00000}; +XMGLOBALCONST XMVECTORI32 g_XMQNaNTest = {0x007FFFFF, 0x007FFFFF, 0x007FFFFF, 0x007FFFFF}; +XMGLOBALCONST XMVECTORI32 g_XMAbsMask = {0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF}; +XMGLOBALCONST XMVECTORI32 g_XMFltMin = {0x00800000, 0x00800000, 0x00800000, 0x00800000}; +XMGLOBALCONST XMVECTORI32 g_XMFltMax = {0x7F7FFFFF, 0x7F7FFFFF, 0x7F7FFFFF, 0x7F7FFFFF}; +XMGLOBALCONST XMVECTORI32 g_XMNegOneMask = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF}; +XMGLOBALCONST XMVECTORI32 g_XMMaskA8R8G8B8 = {0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000}; +XMGLOBALCONST XMVECTORI32 g_XMFlipA8R8G8B8 = {0x00000000, 0x00000000, 0x00000000, 0x80000000}; +XMGLOBALCONST XMVECTORF32 g_XMFixAA8R8G8B8 = {0.0f,0.0f,0.0f,(float)(0x80000000U)}; +XMGLOBALCONST XMVECTORF32 g_XMNormalizeA8R8G8B8 = {1.0f/(255.0f*(float)(0x10000)),1.0f/(255.0f*(float)(0x100)),1.0f/255.0f,1.0f/(255.0f*(float)(0x1000000))}; +XMGLOBALCONST XMVECTORI32 g_XMMaskA2B10G10R10 = {0x000003FF, 0x000FFC00, 0x3FF00000, 0xC0000000}; +XMGLOBALCONST XMVECTORI32 g_XMFlipA2B10G10R10 = {0x00000200, 0x00080000, 0x20000000, 0x80000000}; +XMGLOBALCONST XMVECTORF32 g_XMFixAA2B10G10R10 = {-512.0f,-512.0f*(float)(0x400),-512.0f*(float)(0x100000),(float)(0x80000000U)}; +XMGLOBALCONST XMVECTORF32 g_XMNormalizeA2B10G10R10 = {1.0f/511.0f,1.0f/(511.0f*(float)(0x400)),1.0f/(511.0f*(float)(0x100000)),1.0f/(3.0f*(float)(0x40000000))}; +XMGLOBALCONST XMVECTORI32 g_XMMaskX16Y16 = {0x0000FFFF, 0xFFFF0000, 0x00000000, 0x00000000}; +XMGLOBALCONST XMVECTORI32 g_XMFlipX16Y16 = {0x00008000, 0x00000000, 0x00000000, 0x00000000}; +XMGLOBALCONST XMVECTORF32 g_XMFixX16Y16 = {-32768.0f,0.0f,0.0f,0.0f}; +XMGLOBALCONST XMVECTORF32 g_XMNormalizeX16Y16 = {1.0f/32767.0f,1.0f/(32767.0f*65536.0f),0.0f,0.0f}; +XMGLOBALCONST XMVECTORI32 g_XMMaskX16Y16Z16W16 = {0x0000FFFF, 0x0000FFFF, 0xFFFF0000, 0xFFFF0000}; +XMGLOBALCONST XMVECTORI32 g_XMFlipX16Y16Z16W16 = {0x00008000, 0x00008000, 0x00000000, 0x00000000}; +XMGLOBALCONST XMVECTORF32 g_XMFixX16Y16Z16W16 = {-32768.0f,-32768.0f,0.0f,0.0f}; +XMGLOBALCONST XMVECTORF32 g_XMNormalizeX16Y16Z16W16 = {1.0f/32767.0f,1.0f/32767.0f,1.0f/(32767.0f*65536.0f),1.0f/(32767.0f*65536.0f)}; +XMGLOBALCONST XMVECTORF32 g_XMNoFraction = {8388608.0f,8388608.0f,8388608.0f,8388608.0f}; +XMGLOBALCONST XMVECTORI32 g_XMMaskByte = {0x000000FF, 0x000000FF, 0x000000FF, 0x000000FF}; +XMGLOBALCONST XMVECTORF32 g_XMNegateX = {-1.0f, 1.0f, 1.0f, 1.0f}; +XMGLOBALCONST XMVECTORF32 g_XMNegateY = { 1.0f,-1.0f, 1.0f, 1.0f}; +XMGLOBALCONST XMVECTORF32 g_XMNegateZ = { 1.0f, 1.0f,-1.0f, 1.0f}; +XMGLOBALCONST XMVECTORF32 g_XMNegateW = { 1.0f, 1.0f, 1.0f,-1.0f}; +XMGLOBALCONST XMVECTORI32 g_XMSelect0101 = {XM_SELECT_0, XM_SELECT_1, XM_SELECT_0, XM_SELECT_1}; +XMGLOBALCONST XMVECTORI32 g_XMSelect1010 = {XM_SELECT_1, XM_SELECT_0, XM_SELECT_1, XM_SELECT_0}; +XMGLOBALCONST XMVECTORI32 g_XMOneHalfMinusEpsilon = { 0x3EFFFFFD, 0x3EFFFFFD, 0x3EFFFFFD, 0x3EFFFFFD}; +XMGLOBALCONST XMVECTORI32 g_XMSelect1000 = {XM_SELECT_1, XM_SELECT_0, XM_SELECT_0, XM_SELECT_0}; +XMGLOBALCONST XMVECTORI32 g_XMSelect1100 = {XM_SELECT_1, XM_SELECT_1, XM_SELECT_0, XM_SELECT_0}; +XMGLOBALCONST XMVECTORI32 g_XMSelect1110 = {XM_SELECT_1, XM_SELECT_1, XM_SELECT_1, XM_SELECT_0}; +XMGLOBALCONST XMVECTORI32 g_XMSwizzleXYXY = {XM_PERMUTE_0X, XM_PERMUTE_0Y, XM_PERMUTE_0X, XM_PERMUTE_0Y}; +XMGLOBALCONST XMVECTORI32 g_XMSwizzleXYZX = {XM_PERMUTE_0X, XM_PERMUTE_0Y, XM_PERMUTE_0Z, XM_PERMUTE_0X}; +XMGLOBALCONST XMVECTORI32 g_XMSwizzleYXZW = {XM_PERMUTE_0Y, XM_PERMUTE_0X, XM_PERMUTE_0Z, XM_PERMUTE_0W}; +XMGLOBALCONST XMVECTORI32 g_XMSwizzleYZXW = {XM_PERMUTE_0Y, XM_PERMUTE_0Z, XM_PERMUTE_0X, XM_PERMUTE_0W}; +XMGLOBALCONST XMVECTORI32 g_XMSwizzleZXYW = {XM_PERMUTE_0Z, XM_PERMUTE_0X, XM_PERMUTE_0Y, XM_PERMUTE_0W}; +XMGLOBALCONST XMVECTORI32 g_XMPermute0X0Y1X1Y = {XM_PERMUTE_0X, XM_PERMUTE_0Y, XM_PERMUTE_1X, XM_PERMUTE_1Y}; +XMGLOBALCONST XMVECTORI32 g_XMPermute0Z0W1Z1W = {XM_PERMUTE_0Z, XM_PERMUTE_0W, XM_PERMUTE_1Z, XM_PERMUTE_1W}; +XMGLOBALCONST XMVECTORF32 g_XMFixupY16 = {1.0f,1.0f/65536.0f,0.0f,0.0f}; +XMGLOBALCONST XMVECTORF32 g_XMFixupY16W16 = {1.0f,1.0f,1.0f/65536.0f,1.0f/65536.0f}; +XMGLOBALCONST XMVECTORI32 g_XMFlipY = {0,0x80000000,0,0}; +XMGLOBALCONST XMVECTORI32 g_XMFlipZ = {0,0,0x80000000,0}; +XMGLOBALCONST XMVECTORI32 g_XMFlipW = {0,0,0,0x80000000}; +XMGLOBALCONST XMVECTORI32 g_XMFlipYZ = {0,0x80000000,0x80000000,0}; +XMGLOBALCONST XMVECTORI32 g_XMFlipZW = {0,0,0x80000000,0x80000000}; +XMGLOBALCONST XMVECTORI32 g_XMFlipYW = {0,0x80000000,0,0x80000000}; +XMGLOBALCONST XMVECTORI32 g_XMMaskHenD3 = {0x7FF,0x7ff<<11,0x3FF<<22,0}; +XMGLOBALCONST XMVECTORI32 g_XMMaskDHen3 = {0x3FF,0x7ff<<10,0x7FF<<21,0}; +XMGLOBALCONST XMVECTORF32 g_XMAddUHenD3 = {0,0,32768.0f*65536.0f,0}; +XMGLOBALCONST XMVECTORF32 g_XMAddHenD3 = {-1024.0f,-1024.0f*2048.0f,0,0}; +XMGLOBALCONST XMVECTORF32 g_XMAddDHen3 = {-512.0f,-1024.0f*1024.0f,0,0}; +XMGLOBALCONST XMVECTORF32 g_XMMulHenD3 = {1.0f,1.0f/2048.0f,1.0f/(2048.0f*2048.0f),0}; +XMGLOBALCONST XMVECTORF32 g_XMMulDHen3 = {1.0f,1.0f/1024.0f,1.0f/(1024.0f*2048.0f),0}; +XMGLOBALCONST XMVECTORI32 g_XMXorHenD3 = {0x400,0x400<<11,0,0}; +XMGLOBALCONST XMVECTORI32 g_XMXorDHen3 = {0x200,0x400<<10,0,0}; +XMGLOBALCONST XMVECTORI32 g_XMMaskIco4 = {0xFFFFF,0xFFFFF000,0xFFFFF,0xF0000000}; +XMGLOBALCONST XMVECTORI32 g_XMXorXIco4 = {0x80000,0,0x80000,0x80000000}; +XMGLOBALCONST XMVECTORI32 g_XMXorIco4 = {0x80000,0,0x80000,0}; +XMGLOBALCONST XMVECTORF32 g_XMAddXIco4 = {-8.0f*65536.0f,0,-8.0f*65536.0f,32768.0f*65536.0f}; +XMGLOBALCONST XMVECTORF32 g_XMAddUIco4 = {0,32768.0f*65536.0f,0,32768.0f*65536.0f}; +XMGLOBALCONST XMVECTORF32 g_XMAddIco4 = {-8.0f*65536.0f,0,-8.0f*65536.0f,0}; +XMGLOBALCONST XMVECTORF32 g_XMMulIco4 = {1.0f,1.0f/4096.0f,1.0f,1.0f/(4096.0f*65536.0f)}; +XMGLOBALCONST XMVECTORI32 g_XMMaskDec4 = {0x3FF,0x3FF<<10,0x3FF<<20,0x3<<30}; +XMGLOBALCONST XMVECTORI32 g_XMXorDec4 = {0x200,0x200<<10,0x200<<20,0}; +XMGLOBALCONST XMVECTORF32 g_XMAddUDec4 = {0,0,0,32768.0f*65536.0f}; +XMGLOBALCONST XMVECTORF32 g_XMAddDec4 = {-512.0f,-512.0f*1024.0f,-512.0f*1024.0f*1024.0f,0}; +XMGLOBALCONST XMVECTORF32 g_XMMulDec4 = {1.0f,1.0f/1024.0f,1.0f/(1024.0f*1024.0f),1.0f/(1024.0f*1024.0f*1024.0f)}; +XMGLOBALCONST XMVECTORI32 g_XMMaskByte4 = {0xFF,0xFF00,0xFF0000,0xFF000000}; +XMGLOBALCONST XMVECTORI32 g_XMXorByte4 = {0x80,0x8000,0x800000,0x00000000}; +XMGLOBALCONST XMVECTORF32 g_XMAddByte4 = {-128.0f,-128.0f*256.0f,-128.0f*65536.0f,0}; + +/**************************************************************************** + * + * Implementation + * + ****************************************************************************/ + +#pragma warning(push) +#pragma warning(disable:4214 4204 4365 4616 6001) + +#if !defined(__cplusplus) && !defined(_XBOX) && defined(_XM_ISVS2005_) + +/* Work around VC 2005 bug where math.h defines logf with a semicolon at the end. + * Note this is fixed as of Visual Studio 2005 Service Pack 1 + */ + +#undef logf +#define logf(x) ((float)log((double)(x))) + +#endif // !defined(__cplusplus) && !defined(_XBOX) && defined(_XM_ISVS2005_) + +//------------------------------------------------------------------------------ + +#if defined(_XM_NO_INTRINSICS_) || defined(_XM_SSE_INTRINSICS_) + +XMFINLINE XMVECTOR XMVectorSetBinaryConstant(UINT C0, UINT C1, UINT C2, UINT C3) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTORU32 vResult; + vResult.u[0] = (0-(C0&1)) & 0x3F800000; + vResult.u[1] = (0-(C1&1)) & 0x3F800000; + vResult.u[2] = (0-(C2&1)) & 0x3F800000; + vResult.u[3] = (0-(C3&1)) & 0x3F800000; + return vResult.v; +#else // XM_SSE_INTRINSICS_ + static const XMVECTORU32 g_vMask1 = {1,1,1,1}; + // Move the parms to a vector + __m128i vTemp = _mm_set_epi32(C3,C2,C1,C0); + // Mask off the low bits + vTemp = _mm_and_si128(vTemp,g_vMask1); + // 0xFFFFFFFF on true bits + vTemp = _mm_cmpeq_epi32(vTemp,g_vMask1); + // 0xFFFFFFFF -> 1.0f, 0x00000000 -> 0.0f + vTemp = _mm_and_si128(vTemp,g_XMOne); + return reinterpret_cast(&vTemp)[0]; +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorSplatConstant(INT IntConstant, UINT DivExponent) +{ +#if defined(_XM_NO_INTRINSICS_) + XMASSERT( IntConstant >= -16 && IntConstant <= 15 ); + XMASSERT(DivExponent<32); + { + XMVECTORI32 V = { IntConstant, IntConstant, IntConstant, IntConstant }; + return XMConvertVectorIntToFloat( V.v, DivExponent); + } +#else // XM_SSE_INTRINSICS_ + XMASSERT( IntConstant >= -16 && IntConstant <= 15 ); + XMASSERT(DivExponent<32); + // Splat the int + __m128i vScale = _mm_set1_epi32(IntConstant); + // Convert to a float + XMVECTOR vResult = _mm_cvtepi32_ps(vScale); + // Convert DivExponent into 1.0f/(1<(&vScale)[0]); + return vResult; +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorSplatConstantInt(INT IntConstant) +{ +#if defined(_XM_NO_INTRINSICS_) + XMASSERT( IntConstant >= -16 && IntConstant <= 15 ); + { + XMVECTORI32 V = { IntConstant, IntConstant, IntConstant, IntConstant }; + return V.v; + } +#else // XM_SSE_INTRINSICS_ + XMASSERT( IntConstant >= -16 && IntConstant <= 15 ); + __m128i V = _mm_set1_epi32( IntConstant ); + return reinterpret_cast<__m128 *>(&V)[0]; +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorShiftLeft(FXMVECTOR V1, FXMVECTOR V2, UINT Elements) +{ + return XMVectorPermute(V1, V2, XMVectorPermuteControl((Elements), ((Elements) + 1), ((Elements) + 2), ((Elements) + 3))); +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorRotateLeft(FXMVECTOR V, UINT Elements) +{ +#if defined(_XM_NO_INTRINSICS_) + XMASSERT( Elements < 4 ); + { + XMVECTORF32 vResult = { V.vector4_f32[Elements & 3], V.vector4_f32[(Elements + 1) & 3], + V.vector4_f32[(Elements + 2) & 3], V.vector4_f32[(Elements + 3) & 3] }; + return vResult.v; + } +#else // XM_SSE_INTRINSICS_ + FLOAT fx = XMVectorGetByIndex(V,(Elements) & 3); + FLOAT fy = XMVectorGetByIndex(V,((Elements) + 1) & 3); + FLOAT fz = XMVectorGetByIndex(V,((Elements) + 2) & 3); + FLOAT fw = XMVectorGetByIndex(V,((Elements) + 3) & 3); + return _mm_set_ps( fw, fz, fy, fx ); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorRotateRight(FXMVECTOR V, UINT Elements) +{ +#if defined(_XM_NO_INTRINSICS_) + XMASSERT( Elements < 4 ); + { + XMVECTORF32 vResult = { V.vector4_f32[(4 - (Elements)) & 3], V.vector4_f32[(5 - (Elements)) & 3], + V.vector4_f32[(6 - (Elements)) & 3], V.vector4_f32[(7 - (Elements)) & 3] }; + return vResult.v; + } +#else // XM_SSE_INTRINSICS_ + FLOAT fx = XMVectorGetByIndex(V,(4 - (Elements)) & 3); + FLOAT fy = XMVectorGetByIndex(V,(5 - (Elements)) & 3); + FLOAT fz = XMVectorGetByIndex(V,(6 - (Elements)) & 3); + FLOAT fw = XMVectorGetByIndex(V,(7 - (Elements)) & 3); + return _mm_set_ps( fw, fz, fy, fx ); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorSwizzle(FXMVECTOR V, UINT E0, UINT E1, UINT E2, UINT E3) +{ +#if defined(_XM_NO_INTRINSICS_) + XMASSERT( (E0 < 4) && (E1 < 4) && (E2 < 4) && (E3 < 4) ); + { + XMVECTORF32 vResult = { V.vector4_f32[E0], V.vector4_f32[E1], V.vector4_f32[E2], V.vector4_f32[E3] }; + return vResult.v; + } +#else // XM_SSE_INTRINSICS_ + FLOAT fx = XMVectorGetByIndex(V,E0); + FLOAT fy = XMVectorGetByIndex(V,E1); + FLOAT fz = XMVectorGetByIndex(V,E2); + FLOAT fw = XMVectorGetByIndex(V,E3); + return _mm_set_ps( fw, fz, fy, fx ); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorInsert(FXMVECTOR VD, FXMVECTOR VS, UINT VSLeftRotateElements, + UINT Select0, UINT Select1, UINT Select2, UINT Select3) +{ + XMVECTOR Control = XMVectorSelectControl(Select0&1, Select1&1, Select2&1, Select3&1); + return XMVectorSelect( VD, XMVectorRotateLeft(VS, VSLeftRotateElements), Control ); +} + +// Implemented for VMX128 intrinsics as #defines aboves +#endif _XM_NO_INTRINSICS_ || _XM_SSE_INTRINSICS_ + +//------------------------------------------------------------------------------ + +#include "xnamathconvert.inl" +#include "xnamathvector.inl" +#include "xnamathmatrix.inl" +#include "xnamathmisc.inl" + +#pragma warning(pop) + +#endif // __XNAMATH_H__ + diff --git a/gfx/include/dxsdk/xnamathconvert.inl b/gfx/include/dxsdk/xnamathconvert.inl new file mode 100644 index 0000000000..370d27d290 --- /dev/null +++ b/gfx/include/dxsdk/xnamathconvert.inl @@ -0,0 +1,5785 @@ +/*++ + +Copyright (c) Microsoft Corporation. All rights reserved. + +Module Name: + + xnamathconvert.inl + +Abstract: + + XNA math library for Windows and Xbox 360: Conversion, loading, and storing functions. +--*/ + +#if defined(_MSC_VER) && (_MSC_VER > 1000) +#pragma once +#endif + +#ifndef __XNAMATHCONVERT_INL__ +#define __XNAMATHCONVERT_INL__ + +#define XM_PACK_FACTOR (FLOAT)(1 << 22) +#define XM_UNPACK_FACTOR_UNSIGNED (FLOAT)(1 << 23) +#define XM_UNPACK_FACTOR_SIGNED XM_PACK_FACTOR + +#define XM_UNPACK_UNSIGNEDN_OFFSET(BitsX, BitsY, BitsZ, BitsW) \ + {-XM_UNPACK_FACTOR_UNSIGNED / (FLOAT)((1 << (BitsX)) - 1), \ + -XM_UNPACK_FACTOR_UNSIGNED / (FLOAT)((1 << (BitsY)) - 1), \ + -XM_UNPACK_FACTOR_UNSIGNED / (FLOAT)((1 << (BitsZ)) - 1), \ + -XM_UNPACK_FACTOR_UNSIGNED / (FLOAT)((1 << (BitsW)) - 1)} + +#define XM_UNPACK_UNSIGNEDN_SCALE(BitsX, BitsY, BitsZ, BitsW) \ + {XM_UNPACK_FACTOR_UNSIGNED / (FLOAT)((1 << (BitsX)) - 1), \ + XM_UNPACK_FACTOR_UNSIGNED / (FLOAT)((1 << (BitsY)) - 1), \ + XM_UNPACK_FACTOR_UNSIGNED / (FLOAT)((1 << (BitsZ)) - 1), \ + XM_UNPACK_FACTOR_UNSIGNED / (FLOAT)((1 << (BitsW)) - 1)} + +#define XM_UNPACK_SIGNEDN_SCALE(BitsX, BitsY, BitsZ, BitsW) \ + {-XM_UNPACK_FACTOR_SIGNED / (FLOAT)((1 << ((BitsX) - 1)) - 1), \ + -XM_UNPACK_FACTOR_SIGNED / (FLOAT)((1 << ((BitsY) - 1)) - 1), \ + -XM_UNPACK_FACTOR_SIGNED / (FLOAT)((1 << ((BitsZ) - 1)) - 1), \ + -XM_UNPACK_FACTOR_SIGNED / (FLOAT)((1 << ((BitsW) - 1)) - 1)} + +//#define XM_UNPACK_SIGNEDN_OFFSET(BitsX, BitsY, BitsZ, BitsW) \ +// {-XM_UNPACK_FACTOR_SIGNED / (FLOAT)((1 << ((BitsX) - 1)) - 1) * 3.0f, \ +// -XM_UNPACK_FACTOR_SIGNED / (FLOAT)((1 << ((BitsY) - 1)) - 1) * 3.0f, \ +// -XM_UNPACK_FACTOR_SIGNED / (FLOAT)((1 << ((BitsZ) - 1)) - 1) * 3.0f, \ +// -XM_UNPACK_FACTOR_SIGNED / (FLOAT)((1 << ((BitsW) - 1)) - 1) * 3.0f} + +#define XM_PACK_UNSIGNEDN_SCALE(BitsX, BitsY, BitsZ, BitsW) \ + {-(FLOAT)((1 << (BitsX)) - 1) / XM_PACK_FACTOR, \ + -(FLOAT)((1 << (BitsY)) - 1) / XM_PACK_FACTOR, \ + -(FLOAT)((1 << (BitsZ)) - 1) / XM_PACK_FACTOR, \ + -(FLOAT)((1 << (BitsW)) - 1) / XM_PACK_FACTOR} + +#define XM_PACK_SIGNEDN_SCALE(BitsX, BitsY, BitsZ, BitsW) \ + {-(FLOAT)((1 << ((BitsX) - 1)) - 1) / XM_PACK_FACTOR, \ + -(FLOAT)((1 << ((BitsY) - 1)) - 1) / XM_PACK_FACTOR, \ + -(FLOAT)((1 << ((BitsZ) - 1)) - 1) / XM_PACK_FACTOR, \ + -(FLOAT)((1 << ((BitsW) - 1)) - 1) / XM_PACK_FACTOR} + +#define XM_PACK_OFFSET XMVectorSplatConstant(3, 0) +//#define XM_UNPACK_OFFSET XM_PACK_OFFSET + +/**************************************************************************** + * + * Data conversion + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE FLOAT XMConvertHalfToFloat +( + HALF Value +) +{ +#if defined(_XM_NO_INTRINSICS_) || defined(_XM_SSE_INTRINSICS_) + + UINT Mantissa; + UINT Exponent; + UINT Result; + + Mantissa = (UINT)(Value & 0x03FF); + + if ((Value & 0x7C00) != 0) // The value is normalized + { + Exponent = (UINT)((Value >> 10) & 0x1F); + } + else if (Mantissa != 0) // The value is denormalized + { + // Normalize the value in the resulting float + Exponent = 1; + + do + { + Exponent--; + Mantissa <<= 1; + } while ((Mantissa & 0x0400) == 0); + + Mantissa &= 0x03FF; + } + else // The value is zero + { + Exponent = (UINT)-112; + } + + Result = ((Value & 0x8000) << 16) | // Sign + ((Exponent + 112) << 23) | // Exponent + (Mantissa << 13); // Mantissa + + return *(FLOAT*)&Result; + +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif +} + +//------------------------------------------------------------------------------ + +XMINLINE FLOAT* XMConvertHalfToFloatStream +( + FLOAT* pOutputStream, + UINT OutputStride, + CONST HALF* pInputStream, + UINT InputStride, + UINT HalfCount +) +{ +#if defined(_XM_NO_INTRINSICS_) || defined(_XM_SSE_INTRINSICS_) + + UINT i; + BYTE* pHalf = (BYTE*)pInputStream; + BYTE* pFloat = (BYTE*)pOutputStream; + + XMASSERT(pOutputStream); + XMASSERT(pInputStream); + + for (i = 0; i < HalfCount; i++) + { + *(FLOAT*)pFloat = XMConvertHalfToFloat(*(HALF*)pHalf); + pHalf += InputStride; + pFloat += OutputStride; + } + + return pOutputStream; + +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE HALF XMConvertFloatToHalf +( + FLOAT Value +) +{ +#if defined(_XM_NO_INTRINSICS_) || defined(_XM_SSE_INTRINSICS_) + UINT Result; + + UINT IValue = ((UINT *)(&Value))[0]; + UINT Sign = (IValue & 0x80000000U) >> 16U; + IValue = IValue & 0x7FFFFFFFU; // Hack off the sign + + if (IValue > 0x47FFEFFFU) + { + // The number is too large to be represented as a half. Saturate to infinity. + Result = 0x7FFFU; + } + else + { + if (IValue < 0x38800000U) + { + // The number is too small to be represented as a normalized half. + // Convert it to a denormalized value. + UINT Shift = 113U - (IValue >> 23U); + IValue = (0x800000U | (IValue & 0x7FFFFFU)) >> Shift; + } + else + { + // Rebias the exponent to represent the value as a normalized half. + IValue += 0xC8000000U; + } + + Result = ((IValue + 0x0FFFU + ((IValue >> 13U) & 1U)) >> 13U)&0x7FFFU; + } + return (HALF)(Result|Sign); + +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif +} + +//------------------------------------------------------------------------------ + +XMINLINE HALF* XMConvertFloatToHalfStream +( + HALF* pOutputStream, + UINT OutputStride, + CONST FLOAT* pInputStream, + UINT InputStride, + UINT FloatCount +) +{ +#if defined(_XM_NO_INTRINSICS_) || defined(_XM_SSE_INTRINSICS_) + + UINT i; + BYTE* pFloat = (BYTE*)pInputStream; + BYTE* pHalf = (BYTE*)pOutputStream; + + XMASSERT(pOutputStream); + XMASSERT(pInputStream); + + for (i = 0; i < FloatCount; i++) + { + *(HALF*)pHalf = XMConvertFloatToHalf(*(FLOAT*)pFloat); + pFloat += InputStride; + pHalf += OutputStride; + } + return pOutputStream; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +#if defined(_XM_NO_INTRINSICS_) || defined(_XM_SSE_INTRINSICS_) +// For VMX128, these routines are all defines in the main header + +#pragma warning(push) +#pragma warning(disable:4701) // Prevent warnings about 'Result' potentially being used without having been initialized + +XMINLINE XMVECTOR XMConvertVectorIntToFloat +( + FXMVECTOR VInt, + UINT DivExponent +) +{ +#if defined(_XM_NO_INTRINSICS_) + UINT ElementIndex; + FLOAT fScale; + XMVECTOR Result; + XMASSERT(DivExponent<32); + fScale = 1.0f / (FLOAT)(1U << DivExponent); + ElementIndex = 0; + do { + INT iTemp = (INT)VInt.vector4_u32[ElementIndex]; + Result.vector4_f32[ElementIndex] = ((FLOAT)iTemp) * fScale; + } while (++ElementIndex<4); + return Result; +#else // _XM_SSE_INTRINSICS_ + XMASSERT(DivExponent<32); + // Convert to floats + XMVECTOR vResult = _mm_cvtepi32_ps(reinterpret_cast(&VInt)[0]); + // Convert DivExponent into 1.0f/(1<(&vScale)[0]); + return vResult; +#endif +} + +//------------------------------------------------------------------------------ + +XMINLINE XMVECTOR XMConvertVectorFloatToInt +( + FXMVECTOR VFloat, + UINT MulExponent +) +{ +#if defined(_XM_NO_INTRINSICS_) + UINT ElementIndex; + XMVECTOR Result; + FLOAT fScale; + XMASSERT(MulExponent<32); + // Get the scalar factor. + fScale = (FLOAT)(1U << MulExponent); + ElementIndex = 0; + do { + INT iResult; + FLOAT fTemp = VFloat.vector4_f32[ElementIndex]*fScale; + if (fTemp <= -(65536.0f*32768.0f)) { + iResult = (-0x7FFFFFFF)-1; + } else if (fTemp > (65536.0f*32768.0f)-128.0f) { + iResult = 0x7FFFFFFF; + } else { + iResult = (INT)fTemp; + } + Result.vector4_u32[ElementIndex] = (UINT)iResult; + } while (++ElementIndex<4); + return Result; +#else // _XM_SSE_INTRINSICS_ + XMASSERT(MulExponent<32); + static const XMVECTORF32 MaxInt = {65536.0f*32768.0f-128.0f,65536.0f*32768.0f-128.0f,65536.0f*32768.0f-128.0f,65536.0f*32768.0f-128.0f}; + XMVECTOR vResult = _mm_set_ps1((FLOAT)(1U << MulExponent)); + vResult = _mm_mul_ps(vResult,VFloat); + // In case of positive overflow, detect it + XMVECTOR vOverflow = _mm_cmpgt_ps(vResult,MaxInt); + // Float to int conversion + __m128i vResulti = _mm_cvttps_epi32(vResult); + // If there was positive overflow, set to 0x7FFFFFFF + vResult = _mm_and_ps(vOverflow,g_XMAbsMask); + vOverflow = _mm_andnot_ps(vOverflow,reinterpret_cast(&vResulti)[0]); + vOverflow = _mm_or_ps(vOverflow,vResult); + return vOverflow; +#endif +} + +//------------------------------------------------------------------------------ + +XMINLINE XMVECTOR XMConvertVectorUIntToFloat +( + FXMVECTOR VUInt, + UINT DivExponent +) +{ +#if defined(_XM_NO_INTRINSICS_) + UINT ElementIndex; + FLOAT fScale; + XMVECTOR Result; + XMASSERT(DivExponent<32); + fScale = 1.0f / (FLOAT)(1U << DivExponent); + ElementIndex = 0; + do { + Result.vector4_f32[ElementIndex] = (FLOAT)VUInt.vector4_u32[ElementIndex] * fScale; + } while (++ElementIndex<4); + return Result; +#else // _XM_SSE_INTRINSICS_ + XMASSERT(DivExponent<32); + static const XMVECTORF32 FixUnsigned = {32768.0f*65536.0f,32768.0f*65536.0f,32768.0f*65536.0f,32768.0f*65536.0f}; + // For the values that are higher than 0x7FFFFFFF, a fixup is needed + // Determine which ones need the fix. + XMVECTOR vMask = _mm_and_ps(VUInt,g_XMNegativeZero); + // Force all values positive + XMVECTOR vResult = _mm_xor_ps(VUInt,vMask); + // Convert to floats + vResult = _mm_cvtepi32_ps(reinterpret_cast(&vResult)[0]); + // Convert 0x80000000 -> 0xFFFFFFFF + __m128i iMask = _mm_srai_epi32(reinterpret_cast(&vMask)[0],31); + // For only the ones that are too big, add the fixup + vMask = _mm_and_ps(reinterpret_cast(&iMask)[0],FixUnsigned); + vResult = _mm_add_ps(vResult,vMask); + // Convert DivExponent into 1.0f/(1<(&iMask)[0]); + return vResult; +#endif +} + +//------------------------------------------------------------------------------ + +XMINLINE XMVECTOR XMConvertVectorFloatToUInt +( + FXMVECTOR VFloat, + UINT MulExponent +) +{ +#if defined(_XM_NO_INTRINSICS_) + UINT ElementIndex; + XMVECTOR Result; + FLOAT fScale; + XMASSERT(MulExponent<32); + // Get the scalar factor. + fScale = (FLOAT)(1U << MulExponent); + ElementIndex = 0; + do { + UINT uResult; + FLOAT fTemp = VFloat.vector4_f32[ElementIndex]*fScale; + if (fTemp <= 0.0f) { + uResult = 0; + } else if (fTemp >= (65536.0f*65536.0f)) { + uResult = 0xFFFFFFFFU; + } else { + uResult = (UINT)fTemp; + } + Result.vector4_u32[ElementIndex] = uResult; + } while (++ElementIndex<4); + return Result; +#else // _XM_SSE_INTRINSICS_ + XMASSERT(MulExponent<32); + static const XMVECTORF32 MaxUInt = {65536.0f*65536.0f-256.0f,65536.0f*65536.0f-256.0f,65536.0f*65536.0f-256.0f,65536.0f*65536.0f-256.0f}; + static const XMVECTORF32 UnsignedFix = {32768.0f*65536.0f,32768.0f*65536.0f,32768.0f*65536.0f,32768.0f*65536.0f}; + XMVECTOR vResult = _mm_set_ps1(static_cast(1U << MulExponent)); + vResult = _mm_mul_ps(vResult,VFloat); + // Clamp to >=0 + vResult = _mm_max_ps(vResult,g_XMZero); + // Any numbers that are too big, set to 0xFFFFFFFFU + XMVECTOR vOverflow = _mm_cmpgt_ps(vResult,MaxUInt); + XMVECTOR vValue = UnsignedFix; + // Too large for a signed integer? + XMVECTOR vMask = _mm_cmpge_ps(vResult,vValue); + // Zero for number's lower than 0x80000000, 32768.0f*65536.0f otherwise + vValue = _mm_and_ps(vValue,vMask); + // Perform fixup only on numbers too large (Keeps low bit precision) + vResult = _mm_sub_ps(vResult,vValue); + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Convert from signed to unsigned pnly if greater than 0x80000000 + vMask = _mm_and_ps(vMask,g_XMNegativeZero); + vResult = _mm_xor_ps(reinterpret_cast(&vResulti)[0],vMask); + // On those that are too large, set to 0xFFFFFFFF + vResult = _mm_or_ps(vResult,vOverflow); + return vResult; +#endif +} + +#pragma warning(pop) + +#endif // _XM_NO_INTRINSICS_ || _XM_SSE_INTRINSICS_ + +/**************************************************************************** + * + * Vector and matrix load operations + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadInt(CONST UINT* pSource) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + XMASSERT(pSource); + XMASSERT(((UINT_PTR)pSource & 3) == 0); + + V.vector4_u32[0] = *pSource; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + XMASSERT(((UINT_PTR)pSource & 3) == 0); + + return _mm_load_ss( (const float*)pSource ); +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadFloat(CONST FLOAT* pSource) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + XMASSERT(pSource); + XMASSERT(((UINT_PTR)pSource & 3) == 0); + + V.vector4_f32[0] = *pSource; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + XMASSERT(((UINT_PTR)pSource & 3) == 0); + + return _mm_load_ss( pSource ); +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadInt2 +( + CONST UINT* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + + XMASSERT(pSource); + + V.vector4_u32[0] = pSource[0]; + V.vector4_u32[1] = pSource[1]; + + return V; +#elif defined(_XM_SSE_INTRINSICS_) + + XMASSERT(pSource); + + __m128 x = _mm_load_ss( (const float*)pSource ); + __m128 y = _mm_load_ss( (const float*)(pSource+1) ); + return _mm_unpacklo_ps( x, y ); +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadInt2A +( + CONST UINT* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + + XMASSERT(pSource); + XMASSERT(((UINT_PTR)pSource & 0xF) == 0); + + V.vector4_u32[0] = pSource[0]; + V.vector4_u32[1] = pSource[1]; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + + XMASSERT(pSource); + XMASSERT(((UINT_PTR)pSource & 0xF) == 0); + + __m128i V = _mm_loadl_epi64( (const __m128i*)pSource ); + return reinterpret_cast<__m128 *>(&V)[0]; + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadFloat2 +( + CONST XMFLOAT2* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR V; + XMASSERT(pSource); + + ((UINT *)(&V.vector4_f32[0]))[0] = ((const UINT *)(&pSource->x))[0]; + ((UINT *)(&V.vector4_f32[1]))[0] = ((const UINT *)(&pSource->y))[0]; + return V; +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + + __m128 x = _mm_load_ss( &pSource->x ); + __m128 y = _mm_load_ss( &pSource->y ); + return _mm_unpacklo_ps( x, y ); +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadFloat2A +( + CONST XMFLOAT2A* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + + XMASSERT(pSource); + XMASSERT(((UINT_PTR)pSource & 0xF) == 0); + + V.vector4_f32[0] = pSource->x; + V.vector4_f32[1] = pSource->y; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + XMASSERT(((UINT_PTR)pSource & 0xF) == 0); + + __m128i V = _mm_loadl_epi64( (const __m128i*)pSource ); + return reinterpret_cast<__m128 *>(&V)[0]; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadHalf2 +( + CONST XMHALF2* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMASSERT(pSource); + { + XMVECTOR vResult = { + XMConvertHalfToFloat(pSource->x), + XMConvertHalfToFloat(pSource->y), + 0.0f, + 0.0f + }; + return vResult; + } +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + XMVECTOR vResult = { + XMConvertHalfToFloat(pSource->x), + XMConvertHalfToFloat(pSource->y), + 0.0f, + 0.0f + }; + return vResult; + +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadShortN2 +( + CONST XMSHORTN2* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMASSERT(pSource); + XMASSERT(pSource->x != -32768); + XMASSERT(pSource->y != -32768); + { + XMVECTOR vResult = { + (FLOAT)pSource->x * (1.0f/32767.0f), + (FLOAT)pSource->y * (1.0f/32767.0f), + 0.0f, + 0.0f + }; + return vResult; + } + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + XMASSERT(pSource->x != -32768); + XMASSERT(pSource->y != -32768); + // Splat the two shorts in all four entries (WORD alignment okay, + // DWORD alignment preferred) + __m128 vTemp = _mm_load_ps1(reinterpret_cast(&pSource->x)); + // Mask x&0xFFFF, y&0xFFFF0000,z&0,w&0 + vTemp = _mm_and_ps(vTemp,g_XMMaskX16Y16); + // x needs to be sign extended + vTemp = _mm_xor_ps(vTemp,g_XMFlipX16Y16); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // x - 0x8000 to undo the signed order. + vTemp = _mm_add_ps(vTemp,g_XMFixX16Y16); + // Convert 0-32767 to 0.0f-1.0f + return _mm_mul_ps(vTemp,g_XMNormalizeX16Y16); +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadShort2 +( + CONST XMSHORT2* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + + XMASSERT(pSource); + XMASSERT(pSource->x != -32768); + XMASSERT(pSource->y != -32768); + + V.vector4_f32[0] = (FLOAT)pSource->x; + V.vector4_f32[1] = (FLOAT)pSource->y; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + XMASSERT(pSource->x != -32768); + XMASSERT(pSource->y != -32768); + // Splat the two shorts in all four entries (WORD alignment okay, + // DWORD alignment preferred) + __m128 vTemp = _mm_load_ps1(reinterpret_cast(&pSource->x)); + // Mask x&0xFFFF, y&0xFFFF0000,z&0,w&0 + vTemp = _mm_and_ps(vTemp,g_XMMaskX16Y16); + // x needs to be sign extended + vTemp = _mm_xor_ps(vTemp,g_XMFlipX16Y16); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // x - 0x8000 to undo the signed order. + vTemp = _mm_add_ps(vTemp,g_XMFixX16Y16); + // Y is 65536 too large + return _mm_mul_ps(vTemp,g_XMFixupY16); +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadUShortN2 +( + CONST XMUSHORTN2* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + + XMASSERT(pSource); + + V.vector4_f32[0] = (FLOAT)pSource->x / 65535.0f; + V.vector4_f32[1] = (FLOAT)pSource->y / 65535.0f; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + static const XMVECTORF32 FixupY16 = {1.0f/65535.0f,1.0f/(65535.0f*65536.0f),0.0f,0.0f}; + static const XMVECTORF32 FixaddY16 = {0,32768.0f*65536.0f,0,0}; + XMASSERT(pSource); + // Splat the two shorts in all four entries (WORD alignment okay, + // DWORD alignment preferred) + __m128 vTemp = _mm_load_ps1(reinterpret_cast(&pSource->x)); + // Mask x&0xFFFF, y&0xFFFF0000,z&0,w&0 + vTemp = _mm_and_ps(vTemp,g_XMMaskX16Y16); + // y needs to be sign flipped + vTemp = _mm_xor_ps(vTemp,g_XMFlipY); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // y + 0x8000 to undo the signed order. + vTemp = _mm_add_ps(vTemp,FixaddY16); + // Y is 65536 times too large + vTemp = _mm_mul_ps(vTemp,FixupY16); + return vTemp; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadUShort2 +( + CONST XMUSHORT2* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + + XMASSERT(pSource); + + V.vector4_f32[0] = (FLOAT)pSource->x; + V.vector4_f32[1] = (FLOAT)pSource->y; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + static const XMVECTORF32 FixaddY16 = {0,32768.0f,0,0}; + XMASSERT(pSource); + // Splat the two shorts in all four entries (WORD alignment okay, + // DWORD alignment preferred) + __m128 vTemp = _mm_load_ps1(reinterpret_cast(&pSource->x)); + // Mask x&0xFFFF, y&0xFFFF0000,z&0,w&0 + vTemp = _mm_and_ps(vTemp,g_XMMaskX16Y16); + // y needs to be sign flipped + vTemp = _mm_xor_ps(vTemp,g_XMFlipY); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // Y is 65536 times too large + vTemp = _mm_mul_ps(vTemp,g_XMFixupY16); + // y + 0x8000 to undo the signed order. + vTemp = _mm_add_ps(vTemp,FixaddY16); + return vTemp; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadInt3 +( + CONST UINT* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + + XMASSERT(pSource); + + V.vector4_u32[0] = pSource[0]; + V.vector4_u32[1] = pSource[1]; + V.vector4_u32[2] = pSource[2]; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + +#ifdef _XM_ISVS2005_ + __m128i V = _mm_set_epi32( 0, *(pSource+2), *(pSource+1), *pSource ); + return reinterpret_cast<__m128 *>(&V)[0]; +#else + __m128 x = _mm_load_ss( (const float*)pSource ); + __m128 y = _mm_load_ss( (const float*)(pSource+1) ); + __m128 z = _mm_load_ss( (const float*)(pSource+2) ); + __m128 xy = _mm_unpacklo_ps( x, y ); + return _mm_movelh_ps( xy, z ); +#endif // !_XM_ISVS2005_ +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadInt3A +( + CONST UINT* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + + XMASSERT(pSource); + XMASSERT(((UINT_PTR)pSource & 0xF) == 0); + + V.vector4_u32[0] = pSource[0]; + V.vector4_u32[1] = pSource[1]; + V.vector4_u32[2] = pSource[2]; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + + // Reads an extra integer that is 'undefined' + + __m128i V = _mm_load_si128( (const __m128i*)pSource ); + return reinterpret_cast<__m128 *>(&V)[0]; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadFloat3 +( + CONST XMFLOAT3* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR V; + XMASSERT(pSource); + + ((UINT *)(&V.vector4_f32[0]))[0] = ((const UINT *)(&pSource->x))[0]; + ((UINT *)(&V.vector4_f32[1]))[0] = ((const UINT *)(&pSource->y))[0]; + ((UINT *)(&V.vector4_f32[2]))[0] = ((const UINT *)(&pSource->z))[0]; + return V; +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + +#ifdef _XM_ISVS2005_ + // This reads 1 floats past the memory that should be ignored. + // Need to continue to do this for VS 2005 due to compiler issue but prefer new method + // to avoid triggering issues with memory debug tools (like AV) + return _mm_loadu_ps( &pSource->x ); +#else + __m128 x = _mm_load_ss( &pSource->x ); + __m128 y = _mm_load_ss( &pSource->y ); + __m128 z = _mm_load_ss( &pSource->z ); + __m128 xy = _mm_unpacklo_ps( x, y ); + return _mm_movelh_ps( xy, z ); +#endif // !_XM_ISVS2005_ +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadFloat3A +( + CONST XMFLOAT3A* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + + XMASSERT(pSource); + XMASSERT(((UINT_PTR)pSource & 0xF) == 0); + + V.vector4_f32[0] = pSource->x; + V.vector4_f32[1] = pSource->y; + V.vector4_f32[2] = pSource->z; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + XMASSERT(((UINT_PTR)pSource & 0xF) == 0); + + // This reads 1 floats past the memory that should be ignored. + return _mm_load_ps( &pSource->x ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadUHenDN3 +( + CONST XMUHENDN3* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + UINT Element; + + XMASSERT(pSource); + + Element = pSource->v & 0x7FF; + V.vector4_f32[0] = (FLOAT)Element / 2047.0f; + Element = (pSource->v >> 11) & 0x7FF; + V.vector4_f32[1] = (FLOAT)Element / 2047.0f; + Element = (pSource->v >> 22) & 0x3FF; + V.vector4_f32[2] = (FLOAT)Element / 1023.0f; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + static const XMVECTORF32 UHenDN3Mul = {1.0f/2047.0f,1.0f/(2047.0f*2048.0f),1.0f/(1023.0f*2048.0f*2048.0f),0}; + XMASSERT(pSource); + // Get the 32 bit value and splat it + XMVECTOR vResult = _mm_load_ps1(reinterpret_cast(&pSource->v)); + // Mask off x, y and z + vResult = _mm_and_ps(vResult,g_XMMaskHenD3); + // Convert x and y to unsigned + vResult = _mm_xor_ps(vResult,g_XMFlipZ); + // Convert to float + vResult = _mm_cvtepi32_ps(reinterpret_cast(&vResult)[0]); + // Convert x and y back to signed + vResult = _mm_add_ps(vResult,g_XMAddUHenD3); + // Normalize x,y and z to -1.0f-1.0f + vResult = _mm_mul_ps(vResult,UHenDN3Mul); + return vResult; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadUHenD3 +( + CONST XMUHEND3* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + UINT Element; + + XMASSERT(pSource); + + Element = pSource->v & 0x7FF; + V.vector4_f32[0] = (FLOAT)Element; + Element = (pSource->v >> 11) & 0x7FF; + V.vector4_f32[1] = (FLOAT)Element; + Element = (pSource->v >> 22) & 0x3FF; + V.vector4_f32[2] = (FLOAT)Element; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + // Get the 32 bit value and splat it + XMVECTOR vResult = _mm_load_ps1(reinterpret_cast(&pSource->v)); + // Mask off x, y and z + vResult = _mm_and_ps(vResult,g_XMMaskHenD3); + // Convert x and y to unsigned + vResult = _mm_xor_ps(vResult,g_XMFlipZ); + // Convert to float + vResult = _mm_cvtepi32_ps(reinterpret_cast(&vResult)[0]); + // Convert x and y back to signed + vResult = _mm_add_ps(vResult,g_XMAddUHenD3); + // Normalize x and y to -1024-1023.0f and z to -512-511.0f + vResult = _mm_mul_ps(vResult,g_XMMulHenD3); + return vResult; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadHenDN3 +( + CONST XMHENDN3* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + UINT Element; + static CONST UINT SignExtendXY[] = {0x00000000, 0xFFFFF800}; + static CONST UINT SignExtendZ[] = {0x00000000, 0xFFFFFC00}; + + XMASSERT(pSource); + XMASSERT((pSource->v & 0x7FF) != 0x400); + XMASSERT(((pSource->v >> 11) & 0x7FF) != 0x400); + XMASSERT(((pSource->v >> 22) & 0x3FF) != 0x200); + + Element = pSource->v & 0x7FF; + V.vector4_f32[0] = (FLOAT)(SHORT)(Element | SignExtendXY[Element >> 10]) / 1023.0f; + Element = (pSource->v >> 11) & 0x7FF; + V.vector4_f32[1] = (FLOAT)(SHORT)(Element | SignExtendXY[Element >> 10]) / 1023.0f; + Element = (pSource->v >> 22) & 0x3FF; + V.vector4_f32[2] = (FLOAT)(SHORT)(Element | SignExtendZ[Element >> 9]) / 511.0f; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + static const XMVECTORF32 HenDN3Mul = {1.0f/1023.0f,1.0f/(1023.0f*2048.0f),1.0f/(511.0f*2048.0f*2048.0f),0}; + XMASSERT(pSource); + XMASSERT((pSource->v & 0x7FF) != 0x400); + XMASSERT(((pSource->v >> 11) & 0x7FF) != 0x400); + XMASSERT(((pSource->v >> 22) & 0x3FF) != 0x200); + // Get the 32 bit value and splat it + XMVECTOR vResult = _mm_load_ps1(reinterpret_cast(&pSource->v)); + // Mask off x, y and z + vResult = _mm_and_ps(vResult,g_XMMaskHenD3); + // Convert x and y to unsigned + vResult = _mm_xor_ps(vResult,g_XMXorHenD3); + // Convert to float + vResult = _mm_cvtepi32_ps(reinterpret_cast(&vResult)[0]); + // Convert x and y back to signed + vResult = _mm_add_ps(vResult,g_XMAddHenD3); + // Normalize x,y and z to -1.0f-1.0f + vResult = _mm_mul_ps(vResult,HenDN3Mul); + return vResult; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadHenD3 +( + CONST XMHEND3* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + UINT Element; + static CONST UINT SignExtendXY[] = {0x00000000, 0xFFFFF800}; + static CONST UINT SignExtendZ[] = {0x00000000, 0xFFFFFC00}; + + XMASSERT(pSource); + XMASSERT((pSource->v & 0x7FF) != 0x400); + XMASSERT(((pSource->v >> 11) & 0x7FF) != 0x400); + XMASSERT(((pSource->v >> 22) & 0x3FF) != 0x200); + + Element = pSource->v & 0x7FF; + V.vector4_f32[0] = (FLOAT)(SHORT)(Element | SignExtendXY[Element >> 10]); + Element = (pSource->v >> 11) & 0x7FF; + V.vector4_f32[1] = (FLOAT)(SHORT)(Element | SignExtendXY[Element >> 10]); + Element = (pSource->v >> 22) & 0x3FF; + V.vector4_f32[2] = (FLOAT)(SHORT)(Element | SignExtendZ[Element >> 9]); + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + XMASSERT((pSource->v & 0x7FF) != 0x400); + XMASSERT(((pSource->v >> 11) & 0x7FF) != 0x400); + XMASSERT(((pSource->v >> 22) & 0x3FF) != 0x200); + // Get the 32 bit value and splat it + XMVECTOR vResult = _mm_load_ps1(reinterpret_cast(&pSource->v)); + // Mask off x, y and z + vResult = _mm_and_ps(vResult,g_XMMaskHenD3); + // Convert x and y to unsigned + vResult = _mm_xor_ps(vResult,g_XMXorHenD3); + // Convert to float + vResult = _mm_cvtepi32_ps(reinterpret_cast(&vResult)[0]); + // Convert x and y back to signed + vResult = _mm_add_ps(vResult,g_XMAddHenD3); + // Normalize x and y to -1024-1023.0f and z to -512-511.0f + vResult = _mm_mul_ps(vResult,g_XMMulHenD3); + return vResult; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadUDHenN3 +( + CONST XMUDHENN3* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + UINT Element; + + XMASSERT(pSource); + + Element = pSource->v & 0x3FF; + V.vector4_f32[0] = (FLOAT)Element / 1023.0f; + Element = (pSource->v >> 10) & 0x7FF; + V.vector4_f32[1] = (FLOAT)Element / 2047.0f; + Element = (pSource->v >> 21) & 0x7FF; + V.vector4_f32[2] = (FLOAT)Element / 2047.0f; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + static const XMVECTORF32 UDHenN3Mul = {1.0f/1023.0f,1.0f/(2047.0f*1024.0f),1.0f/(2047.0f*1024.0f*2048.0f),0}; + XMASSERT(pSource); + // Get the 32 bit value and splat it + XMVECTOR vResult = _mm_load_ps1(reinterpret_cast(&pSource->v)); + // Mask off x, y and z + vResult = _mm_and_ps(vResult,g_XMMaskDHen3); + // Convert x and y to unsigned + vResult = _mm_xor_ps(vResult,g_XMFlipZ); + // Convert to float + vResult = _mm_cvtepi32_ps(reinterpret_cast(&vResult)[0]); + // Convert x and y back to signed + vResult = _mm_add_ps(vResult,g_XMAddUHenD3); + // Normalize x,y and z to -1.0f-1.0f + vResult = _mm_mul_ps(vResult,UDHenN3Mul); + return vResult; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadUDHen3 +( + CONST XMUDHEN3* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + UINT Element; + + XMASSERT(pSource); + + Element = pSource->v & 0x3FF; + V.vector4_f32[0] = (FLOAT)Element; + Element = (pSource->v >> 10) & 0x7FF; + V.vector4_f32[1] = (FLOAT)Element; + Element = (pSource->v >> 21) & 0x7FF; + V.vector4_f32[2] = (FLOAT)Element; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + // Get the 32 bit value and splat it + XMVECTOR vResult = _mm_load_ps1(reinterpret_cast(&pSource->v)); + // Mask off x, y and z + vResult = _mm_and_ps(vResult,g_XMMaskDHen3); + // Convert x and y to unsigned + vResult = _mm_xor_ps(vResult,g_XMFlipZ); + // Convert to float + vResult = _mm_cvtepi32_ps(reinterpret_cast(&vResult)[0]); + // Convert x and y back to signed + vResult = _mm_add_ps(vResult,g_XMAddUHenD3); + // Normalize x to 0-1023.0f and y and z to 0-2047.0f + vResult = _mm_mul_ps(vResult,g_XMMulDHen3); + return vResult; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadDHenN3 +( + CONST XMDHENN3* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + UINT Element; + static CONST UINT SignExtendX[] = {0x00000000, 0xFFFFFC00}; + static CONST UINT SignExtendYZ[] = {0x00000000, 0xFFFFF800}; + + XMASSERT(pSource); + XMASSERT((pSource->v & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 10) & 0x7FF) != 0x400); + XMASSERT(((pSource->v >> 21) & 0x7FF) != 0x400); + + Element = pSource->v & 0x3FF; + V.vector4_f32[0] = (FLOAT)(SHORT)(Element | SignExtendX[Element >> 9]) / 511.0f; + Element = (pSource->v >> 10) & 0x7FF; + V.vector4_f32[1] = (FLOAT)(SHORT)(Element | SignExtendYZ[Element >> 10]) / 1023.0f; + Element = (pSource->v >> 21) & 0x7FF; + V.vector4_f32[2] = (FLOAT)(SHORT)(Element | SignExtendYZ[Element >> 10]) / 1023.0f; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + static const XMVECTORF32 DHenN3Mul = {1.0f/511.0f,1.0f/(1023.0f*1024.0f),1.0f/(1023.0f*1024.0f*2048.0f),0}; + XMASSERT(pSource); + XMASSERT((pSource->v & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 10) & 0x7FF) != 0x400); + XMASSERT(((pSource->v >> 21) & 0x7FF) != 0x400); + // Get the 32 bit value and splat it + XMVECTOR vResult = _mm_load_ps1(reinterpret_cast(&pSource->v)); + // Mask off x, y and z + vResult = _mm_and_ps(vResult,g_XMMaskDHen3); + // Convert x and y to unsigned + vResult = _mm_xor_ps(vResult,g_XMXorDHen3); + // Convert to float + vResult = _mm_cvtepi32_ps(reinterpret_cast(&vResult)[0]); + // Convert x and y back to signed + vResult = _mm_add_ps(vResult,g_XMAddDHen3); + // Normalize x,y and z to -1.0f-1.0f + vResult = _mm_mul_ps(vResult,DHenN3Mul); + return vResult; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadDHen3 +( + CONST XMDHEN3* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + UINT Element; + static CONST UINT SignExtendX[] = {0x00000000, 0xFFFFFC00}; + static CONST UINT SignExtendYZ[] = {0x00000000, 0xFFFFF800}; + + XMASSERT(pSource); + XMASSERT((pSource->v & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 10) & 0x7FF) != 0x400); + XMASSERT(((pSource->v >> 21) & 0x7FF) != 0x400); + + Element = pSource->v & 0x3FF; + V.vector4_f32[0] = (FLOAT)(SHORT)(Element | SignExtendX[Element >> 9]); + Element = (pSource->v >> 10) & 0x7FF; + V.vector4_f32[1] = (FLOAT)(SHORT)(Element | SignExtendYZ[Element >> 10]); + Element = (pSource->v >> 21) & 0x7FF; + V.vector4_f32[2] = (FLOAT)(SHORT)(Element | SignExtendYZ[Element >> 10]); + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + XMASSERT((pSource->v & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 10) & 0x7FF) != 0x400); + XMASSERT(((pSource->v >> 21) & 0x7FF) != 0x400); + // Get the 32 bit value and splat it + XMVECTOR vResult = _mm_load_ps1(reinterpret_cast(&pSource->v)); + // Mask off x, y and z + vResult = _mm_and_ps(vResult,g_XMMaskDHen3); + // Convert x and y to unsigned + vResult = _mm_xor_ps(vResult,g_XMXorDHen3); + // Convert to float + vResult = _mm_cvtepi32_ps(reinterpret_cast(&vResult)[0]); + // Convert x and y back to signed + vResult = _mm_add_ps(vResult,g_XMAddDHen3); + // Normalize x to -210-511.0f and y and z to -1024-1023.0f + vResult = _mm_mul_ps(vResult,g_XMMulDHen3); + return vResult; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadU565 +( + CONST XMU565* pSource +) +{ +#if defined(_XM_SSE_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) + static const XMVECTORI32 U565And = {0x1F,0x3F<<5,0x1F<<11,0}; + static const XMVECTORF32 U565Mul = {1.0f,1.0f/32.0f,1.0f/2048.f,0}; + XMASSERT(pSource); + // Get the 32 bit value and splat it + XMVECTOR vResult = _mm_load_ps1(reinterpret_cast(&pSource->v)); + // Mask off x, y and z + vResult = _mm_and_ps(vResult,U565And); + // Convert to float + vResult = _mm_cvtepi32_ps(reinterpret_cast(&vResult)[0]); + // Normalize x, y, and z + vResult = _mm_mul_ps(vResult,U565Mul); + return vResult; +#else + XMVECTOR V; + UINT Element; + + XMASSERT(pSource); + + Element = pSource->v & 0x1F; + V.vector4_f32[0] = (FLOAT)Element; + Element = (pSource->v >> 5) & 0x3F; + V.vector4_f32[1] = (FLOAT)Element; + Element = (pSource->v >> 11) & 0x1F; + V.vector4_f32[2] = (FLOAT)Element; + + return V; +#endif // !_XM_SSE_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadFloat3PK +( + CONST XMFLOAT3PK* pSource +) +{ + _DECLSPEC_ALIGN_16_ UINT Result[4]; + UINT Mantissa; + UINT Exponent; + + XMASSERT(pSource); + + // X Channel (6-bit mantissa) + Mantissa = pSource->xm; + + if ( pSource->xe == 0x1f ) // INF or NAN + { + Result[0] = 0x7f800000 | (pSource->xm << 17); + } + else + { + if ( pSource->xe != 0 ) // The value is normalized + { + Exponent = pSource->xe; + } + else if (Mantissa != 0) // The value is denormalized + { + // Normalize the value in the resulting float + Exponent = 1; + + do + { + Exponent--; + Mantissa <<= 1; + } while ((Mantissa & 0x40) == 0); + + Mantissa &= 0x3F; + } + else // The value is zero + { + Exponent = (UINT)-112; + } + + Result[0] = ((Exponent + 112) << 23) | (Mantissa << 17); + } + + // Y Channel (6-bit mantissa) + Mantissa = pSource->ym; + + if ( pSource->ye == 0x1f ) // INF or NAN + { + Result[1] = 0x7f800000 | (pSource->ym << 17); + } + else + { + if ( pSource->ye != 0 ) // The value is normalized + { + Exponent = pSource->ye; + } + else if (Mantissa != 0) // The value is denormalized + { + // Normalize the value in the resulting float + Exponent = 1; + + do + { + Exponent--; + Mantissa <<= 1; + } while ((Mantissa & 0x40) == 0); + + Mantissa &= 0x3F; + } + else // The value is zero + { + Exponent = (UINT)-112; + } + + Result[1] = ((Exponent + 112) << 23) | (Mantissa << 17); + } + + // Z Channel (5-bit mantissa) + Mantissa = pSource->zm; + + if ( pSource->ze == 0x1f ) // INF or NAN + { + Result[2] = 0x7f800000 | (pSource->zm << 17); + } + else + { + if ( pSource->ze != 0 ) // The value is normalized + { + Exponent = pSource->ze; + } + else if (Mantissa != 0) // The value is denormalized + { + // Normalize the value in the resulting float + Exponent = 1; + + do + { + Exponent--; + Mantissa <<= 1; + } while ((Mantissa & 0x20) == 0); + + Mantissa &= 0x1F; + } + else // The value is zero + { + Exponent = (UINT)-112; + } + + Result[2] = ((Exponent + 112) << 23) | (Mantissa << 18); + } + + return XMLoadFloat3A( (XMFLOAT3A*)&Result ); +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadFloat3SE +( + CONST XMFLOAT3SE* pSource +) +{ + _DECLSPEC_ALIGN_16_ UINT Result[4]; + UINT Mantissa; + UINT Exponent, ExpBits; + + XMASSERT(pSource); + + if ( pSource->e == 0x1f ) // INF or NAN + { + Result[0] = 0x7f800000 | (pSource->xm << 14); + Result[1] = 0x7f800000 | (pSource->ym << 14); + Result[2] = 0x7f800000 | (pSource->zm << 14); + } + else if ( pSource->e != 0 ) // The values are all normalized + { + Exponent = pSource->e; + + ExpBits = (Exponent + 112) << 23; + + Mantissa = pSource->xm; + Result[0] = ExpBits | (Mantissa << 14); + + Mantissa = pSource->ym; + Result[1] = ExpBits | (Mantissa << 14); + + Mantissa = pSource->zm; + Result[2] = ExpBits | (Mantissa << 14); + } + else + { + // X Channel + Mantissa = pSource->xm; + + if (Mantissa != 0) // The value is denormalized + { + // Normalize the value in the resulting float + Exponent = 1; + + do + { + Exponent--; + Mantissa <<= 1; + } while ((Mantissa & 0x200) == 0); + + Mantissa &= 0x1FF; + } + else // The value is zero + { + Exponent = (UINT)-112; + } + + Result[0] = ((Exponent + 112) << 23) | (Mantissa << 14); + + // Y Channel + Mantissa = pSource->ym; + + if (Mantissa != 0) // The value is denormalized + { + // Normalize the value in the resulting float + Exponent = 1; + + do + { + Exponent--; + Mantissa <<= 1; + } while ((Mantissa & 0x200) == 0); + + Mantissa &= 0x1FF; + } + else // The value is zero + { + Exponent = (UINT)-112; + } + + Result[1] = ((Exponent + 112) << 23) | (Mantissa << 14); + + // Z Channel + Mantissa = pSource->zm; + + if (Mantissa != 0) // The value is denormalized + { + // Normalize the value in the resulting float + Exponent = 1; + + do + { + Exponent--; + Mantissa <<= 1; + } while ((Mantissa & 0x200) == 0); + + Mantissa &= 0x1FF; + } + else // The value is zero + { + Exponent = (UINT)-112; + } + + Result[2] = ((Exponent + 112) << 23) | (Mantissa << 14); + } + + return XMLoadFloat3A( (XMFLOAT3A*)&Result ); +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadInt4 +( + CONST UINT* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + + XMASSERT(pSource); + + V.vector4_u32[0] = pSource[0]; + V.vector4_u32[1] = pSource[1]; + V.vector4_u32[2] = pSource[2]; + V.vector4_u32[3] = pSource[3]; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + + XMASSERT(pSource); + + __m128i V = _mm_loadu_si128( (const __m128i*)pSource ); + return reinterpret_cast<__m128 *>(&V)[0]; + +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadInt4A +( + CONST UINT* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + + XMASSERT(pSource); + XMASSERT(((UINT_PTR)pSource & 0xF) == 0); + + V.vector4_u32[0] = pSource[0]; + V.vector4_u32[1] = pSource[1]; + V.vector4_u32[2] = pSource[2]; + V.vector4_u32[3] = pSource[3]; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + + XMASSERT(pSource); + XMASSERT(((UINT_PTR)pSource & 0xF) == 0); + + __m128i V = _mm_load_si128( (const __m128i*)pSource ); + return reinterpret_cast<__m128 *>(&V)[0]; + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadFloat4 +( + CONST XMFLOAT4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR V; + XMASSERT(pSource); + + ((UINT *)(&V.vector4_f32[0]))[0] = ((const UINT *)(&pSource->x))[0]; + ((UINT *)(&V.vector4_f32[1]))[0] = ((const UINT *)(&pSource->y))[0]; + ((UINT *)(&V.vector4_f32[2]))[0] = ((const UINT *)(&pSource->z))[0]; + ((UINT *)(&V.vector4_f32[3]))[0] = ((const UINT *)(&pSource->w))[0]; + return V; +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + + return _mm_loadu_ps( &pSource->x ); +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadFloat4A +( + CONST XMFLOAT4A* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + + XMASSERT(pSource); + XMASSERT(((UINT_PTR)pSource & 0xF) == 0); + + V.vector4_f32[0] = pSource->x; + V.vector4_f32[1] = pSource->y; + V.vector4_f32[2] = pSource->z; + V.vector4_f32[3] = pSource->w; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + + XMASSERT(pSource); + XMASSERT(((UINT_PTR)pSource & 0xF) == 0); + + return _mm_load_ps( &pSource->x ); + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadHalf4 +( + CONST XMHALF4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMASSERT(pSource); + { + XMVECTOR vResult = { + XMConvertHalfToFloat(pSource->x), + XMConvertHalfToFloat(pSource->y), + XMConvertHalfToFloat(pSource->z), + XMConvertHalfToFloat(pSource->w) + }; + return vResult; + } +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + XMVECTOR vResult = { + XMConvertHalfToFloat(pSource->x), + XMConvertHalfToFloat(pSource->y), + XMConvertHalfToFloat(pSource->z), + XMConvertHalfToFloat(pSource->w) + }; + return vResult; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadShortN4 +( + CONST XMSHORTN4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMASSERT(pSource); + XMASSERT(pSource->x != -32768); + XMASSERT(pSource->y != -32768); + XMASSERT(pSource->z != -32768); + XMASSERT(pSource->w != -32768); + { + XMVECTOR vResult = { + (FLOAT)pSource->x * (1.0f/32767.0f), + (FLOAT)pSource->y * (1.0f/32767.0f), + (FLOAT)pSource->z * (1.0f/32767.0f), + (FLOAT)pSource->w * (1.0f/32767.0f) + }; + return vResult; + } +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + XMASSERT(pSource->x != -32768); + XMASSERT(pSource->y != -32768); + XMASSERT(pSource->z != -32768); + XMASSERT(pSource->w != -32768); + // Splat the color in all four entries (x,z,y,w) + __m128d vIntd = _mm_load1_pd(reinterpret_cast(&pSource->x)); + // Shift x&0ffff,z&0xffff,y&0xffff0000,w&0xffff0000 + __m128 vTemp = _mm_and_ps(reinterpret_cast(&vIntd)[0],g_XMMaskX16Y16Z16W16); + // x and z are unsigned! Flip the bits to convert the order to signed + vTemp = _mm_xor_ps(vTemp,g_XMFlipX16Y16Z16W16); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // x and z - 0x8000 to complete the conversion + vTemp = _mm_add_ps(vTemp,g_XMFixX16Y16Z16W16); + // Convert -32767-32767 to -1.0f-1.0f + vTemp = _mm_mul_ps(vTemp,g_XMNormalizeX16Y16Z16W16); + // Very important! The entries are x,z,y,w, flip it to x,y,z,w + vTemp = _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(3,1,2,0)); + return vTemp; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadShort4 +( + CONST XMSHORT4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + + XMASSERT(pSource); + XMASSERT(pSource->x != -32768); + XMASSERT(pSource->y != -32768); + XMASSERT(pSource->z != -32768); + XMASSERT(pSource->w != -32768); + + V.vector4_f32[0] = (FLOAT)pSource->x; + V.vector4_f32[1] = (FLOAT)pSource->y; + V.vector4_f32[2] = (FLOAT)pSource->z; + V.vector4_f32[3] = (FLOAT)pSource->w; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + XMASSERT(pSource->x != -32768); + XMASSERT(pSource->y != -32768); + XMASSERT(pSource->z != -32768); + XMASSERT(pSource->w != -32768); + // Splat the color in all four entries (x,z,y,w) + __m128d vIntd = _mm_load1_pd(reinterpret_cast(&pSource->x)); + // Shift x&0ffff,z&0xffff,y&0xffff0000,w&0xffff0000 + __m128 vTemp = _mm_and_ps(reinterpret_cast(&vIntd)[0],g_XMMaskX16Y16Z16W16); + // x and z are unsigned! Flip the bits to convert the order to signed + vTemp = _mm_xor_ps(vTemp,g_XMFlipX16Y16Z16W16); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // x and z - 0x8000 to complete the conversion + vTemp = _mm_add_ps(vTemp,g_XMFixX16Y16Z16W16); + // Fix y and w because they are 65536 too large + vTemp = _mm_mul_ps(vTemp,g_XMFixupY16W16); + // Very important! The entries are x,z,y,w, flip it to x,y,z,w + return _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(3,1,2,0)); +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadUShortN4 +( + CONST XMUSHORTN4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + + XMASSERT(pSource); + + V.vector4_f32[0] = (FLOAT)pSource->x / 65535.0f; + V.vector4_f32[1] = (FLOAT)pSource->y / 65535.0f; + V.vector4_f32[2] = (FLOAT)pSource->z / 65535.0f; + V.vector4_f32[3] = (FLOAT)pSource->w / 65535.0f; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + static const XMVECTORF32 FixupY16W16 = {1.0f/65535.0f,1.0f/65535.0f,1.0f/(65535.0f*65536.0f),1.0f/(65535.0f*65536.0f)}; + static const XMVECTORF32 FixaddY16W16 = {0,0,32768.0f*65536.0f,32768.0f*65536.0f}; + XMASSERT(pSource); + // Splat the color in all four entries (x,z,y,w) + __m128d vIntd = _mm_load1_pd(reinterpret_cast(&pSource->x)); + // Shift x&0ffff,z&0xffff,y&0xffff0000,w&0xffff0000 + __m128 vTemp = _mm_and_ps(reinterpret_cast(&vIntd)[0],g_XMMaskX16Y16Z16W16); + // y and w are signed! Flip the bits to convert the order to unsigned + vTemp = _mm_xor_ps(vTemp,g_XMFlipZW); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // y and w + 0x8000 to complete the conversion + vTemp = _mm_add_ps(vTemp,FixaddY16W16); + // Fix y and w because they are 65536 too large + vTemp = _mm_mul_ps(vTemp,FixupY16W16); + // Very important! The entries are x,z,y,w, flip it to x,y,z,w + return _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(3,1,2,0)); +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadUShort4 +( + CONST XMUSHORT4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + + XMASSERT(pSource); + + V.vector4_f32[0] = (FLOAT)pSource->x; + V.vector4_f32[1] = (FLOAT)pSource->y; + V.vector4_f32[2] = (FLOAT)pSource->z; + V.vector4_f32[3] = (FLOAT)pSource->w; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + static const XMVECTORF32 FixaddY16W16 = {0,0,32768.0f,32768.0f}; + XMASSERT(pSource); + // Splat the color in all four entries (x,z,y,w) + __m128d vIntd = _mm_load1_pd(reinterpret_cast(&pSource->x)); + // Shift x&0ffff,z&0xffff,y&0xffff0000,w&0xffff0000 + __m128 vTemp = _mm_and_ps(reinterpret_cast(&vIntd)[0],g_XMMaskX16Y16Z16W16); + // y and w are signed! Flip the bits to convert the order to unsigned + vTemp = _mm_xor_ps(vTemp,g_XMFlipZW); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // Fix y and w because they are 65536 too large + vTemp = _mm_mul_ps(vTemp,g_XMFixupY16W16); + // y and w + 0x8000 to complete the conversion + vTemp = _mm_add_ps(vTemp,FixaddY16W16); + // Very important! The entries are x,z,y,w, flip it to x,y,z,w + return _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(3,1,2,0)); +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadXIcoN4 +( + CONST XMXICON4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + UINT Element; + static CONST UINT SignExtend[] = {0x00000000, 0xFFF00000}; + + XMASSERT(pSource); + XMASSERT((pSource->v & 0xFFFFFull) != 0x80000ull); + XMASSERT(((pSource->v >> 20) & 0xFFFFFull) != 0x80000ull); + XMASSERT(((pSource->v >> 40) & 0xFFFFFull) != 0x80000ull); + + Element = (UINT)(pSource->v & 0xFFFFF); + V.vector4_f32[0] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]) / 524287.0f; + Element = (UINT)((pSource->v >> 20) & 0xFFFFF); + V.vector4_f32[1] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]) / 524287.0f; + Element = (UINT)((pSource->v >> 40) & 0xFFFFF); + V.vector4_f32[2] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]) / 524287.0f; + V.vector4_f32[3] = (FLOAT)(pSource->v >> 60) / 15.0f; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT((pSource->v & 0xFFFFFull) != 0x80000ull); + XMASSERT(((pSource->v >> 20) & 0xFFFFFull) != 0x80000ull); + XMASSERT(((pSource->v >> 40) & 0xFFFFFull) != 0x80000ull); + static const XMVECTORF32 LoadXIcoN4Mul = {1.0f/524287.0f,1.0f/(524287.0f*4096.0f),1.0f/524287.0f,1.0f/(15.0f*4096.0f*65536.0f)}; + XMASSERT(pSource); + // Grab the 64 bit structure + __m128d vResultd = _mm_load_sd(reinterpret_cast(&pSource->v)); + // By shifting down 8 bits, y and z are in seperate 32 bit elements + __m128i vResulti = _mm_srli_si128(reinterpret_cast(&vResultd)[0],8/8); + // vResultd has x and w, vResulti has y and z, merge into one as x,w,y,z + XMVECTOR vTemp = _mm_shuffle_ps(reinterpret_cast(&vResultd)[0],reinterpret_cast(&vResulti)[0],_MM_SHUFFLE(1,0,1,0)); + // Fix the entries to x,y,z,w + vTemp = _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(1,3,2,0)); + // Mask x,y,z and w + vTemp = _mm_and_ps(vTemp,g_XMMaskIco4); + // x and z are unsigned! Flip the bits to convert the order to signed + vTemp = _mm_xor_ps(vTemp,g_XMXorXIco4); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // x and z - 0x80 to complete the conversion + vTemp = _mm_add_ps(vTemp,g_XMAddXIco4); + // Fix y and w because they are too large + vTemp = _mm_mul_ps(vTemp,LoadXIcoN4Mul); + return vTemp; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadXIco4 +( + CONST XMXICO4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + UINT Element; + static CONST UINT SignExtend[] = {0x00000000, 0xFFF00000}; + + XMASSERT(pSource); + XMASSERT((pSource->v & 0xFFFFFull) != 0x80000ull); + XMASSERT(((pSource->v >> 20) & 0xFFFFFull) != 0x80000ull); + XMASSERT(((pSource->v >> 40) & 0xFFFFFull) != 0x80000ull); + + Element = (UINT)(pSource->v & 0xFFFFF); + V.vector4_f32[0] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]); + Element = (UINT)((pSource->v >> 20) & 0xFFFFF); + V.vector4_f32[1] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]); + Element = (UINT)((pSource->v >> 40) & 0xFFFFF); + V.vector4_f32[2] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]); + V.vector4_f32[3] = (FLOAT)(pSource->v >> 60); + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT((pSource->v & 0xFFFFFull) != 0x80000ull); + XMASSERT(((pSource->v >> 20) & 0xFFFFFull) != 0x80000ull); + XMASSERT(((pSource->v >> 40) & 0xFFFFFull) != 0x80000ull); + XMASSERT(pSource); + // Grab the 64 bit structure + __m128d vResultd = _mm_load_sd(reinterpret_cast(&pSource->v)); + // By shifting down 8 bits, y and z are in seperate 32 bit elements + __m128i vResulti = _mm_srli_si128(reinterpret_cast(&vResultd)[0],8/8); + // vResultd has x and w, vResulti has y and z, merge into one as x,w,y,z + XMVECTOR vTemp = _mm_shuffle_ps(reinterpret_cast(&vResultd)[0],reinterpret_cast(&vResulti)[0],_MM_SHUFFLE(1,0,1,0)); + // Fix the entries to x,y,z,w + vTemp = _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(1,3,2,0)); + // Mask x,y,z and w + vTemp = _mm_and_ps(vTemp,g_XMMaskIco4); + // x and z are unsigned! Flip the bits to convert the order to signed + vTemp = _mm_xor_ps(vTemp,g_XMXorXIco4); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // x and z - 0x80 to complete the conversion + vTemp = _mm_add_ps(vTemp,g_XMAddXIco4); + // Fix y and w because they are too large + vTemp = _mm_mul_ps(vTemp,g_XMMulIco4); + return vTemp; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadUIcoN4 +( + CONST XMUICON4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + + XMASSERT(pSource); + + V.vector4_f32[0] = (FLOAT)(pSource->v & 0xFFFFF) / 1048575.0f; + V.vector4_f32[1] = (FLOAT)((pSource->v >> 20) & 0xFFFFF) / 1048575.0f; + V.vector4_f32[2] = (FLOAT)((pSource->v >> 40) & 0xFFFFF) / 1048575.0f; + V.vector4_f32[3] = (FLOAT)(pSource->v >> 60) / 15.0f; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + static const XMVECTORF32 LoadUIcoN4Mul = {1.0f/1048575.0f,1.0f/(1048575.0f*4096.0f),1.0f/1048575.0f,1.0f/(15.0f*4096.0f*65536.0f)}; + XMASSERT(pSource); + // Grab the 64 bit structure + __m128d vResultd = _mm_load_sd(reinterpret_cast(&pSource->v)); + // By shifting down 8 bits, y and z are in seperate 32 bit elements + __m128i vResulti = _mm_srli_si128(reinterpret_cast(&vResultd)[0],8/8); + // vResultd has x and w, vResulti has y and z, merge into one as x,w,y,z + XMVECTOR vTemp = _mm_shuffle_ps(reinterpret_cast(&vResultd)[0],reinterpret_cast(&vResulti)[0],_MM_SHUFFLE(1,0,1,0)); + // Fix the entries to x,y,z,w + vTemp = _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(1,3,2,0)); + // Mask x,y,z and w + vTemp = _mm_and_ps(vTemp,g_XMMaskIco4); + // x and z are unsigned! Flip the bits to convert the order to signed + vTemp = _mm_xor_ps(vTemp,g_XMFlipYW); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // x and z - 0x80 to complete the conversion + vTemp = _mm_add_ps(vTemp,g_XMAddUIco4); + // Fix y and w because they are too large + vTemp = _mm_mul_ps(vTemp,LoadUIcoN4Mul); + return vTemp; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadUIco4 +( + CONST XMUICO4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + + XMASSERT(pSource); + + V.vector4_f32[0] = (FLOAT)(pSource->v & 0xFFFFF); + V.vector4_f32[1] = (FLOAT)((pSource->v >> 20) & 0xFFFFF); + V.vector4_f32[2] = (FLOAT)((pSource->v >> 40) & 0xFFFFF); + V.vector4_f32[3] = (FLOAT)(pSource->v >> 60); + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + // Grab the 64 bit structure + __m128d vResultd = _mm_load_sd(reinterpret_cast(&pSource->v)); + // By shifting down 8 bits, y and z are in seperate 32 bit elements + __m128i vResulti = _mm_srli_si128(reinterpret_cast(&vResultd)[0],8/8); + // vResultd has x and w, vResulti has y and z, merge into one as x,w,y,z + XMVECTOR vTemp = _mm_shuffle_ps(reinterpret_cast(&vResultd)[0],reinterpret_cast(&vResulti)[0],_MM_SHUFFLE(1,0,1,0)); + // Fix the entries to x,y,z,w + vTemp = _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(1,3,2,0)); + // Mask x,y,z and w + vTemp = _mm_and_ps(vTemp,g_XMMaskIco4); + // x and z are unsigned! Flip the bits to convert the order to signed + vTemp = _mm_xor_ps(vTemp,g_XMFlipYW); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // x and z - 0x80 to complete the conversion + vTemp = _mm_add_ps(vTemp,g_XMAddUIco4); + // Fix y and w because they are too large + vTemp = _mm_mul_ps(vTemp,g_XMMulIco4); + return vTemp; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadIcoN4 +( + CONST XMICON4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + UINT Element; + static CONST UINT SignExtend[] = {0x00000000, 0xFFF00000}; + static CONST UINT SignExtendW[] = {0x00000000, 0xFFFFFFF0}; + + XMASSERT(pSource); + + Element = (UINT)(pSource->v & 0xFFFFF); + V.vector4_f32[0] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]) / 524287.0f; + Element = (UINT)((pSource->v >> 20) & 0xFFFFF); + V.vector4_f32[1] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]) / 524287.0f; + Element = (UINT)((pSource->v >> 40) & 0xFFFFF); + V.vector4_f32[2] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]) / 524287.0f; + Element = (UINT)(pSource->v >> 60); + V.vector4_f32[3] = (FLOAT)(INT)(Element | SignExtendW[Element >> 3]) / 7.0f; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + static const XMVECTORF32 LoadIcoN4Mul = {1.0f/524287.0f,1.0f/(524287.0f*4096.0f),1.0f/524287.0f,1.0f/(7.0f*4096.0f*65536.0f)}; + XMASSERT(pSource); + // Grab the 64 bit structure + __m128d vResultd = _mm_load_sd(reinterpret_cast(&pSource->v)); + // By shifting down 8 bits, y and z are in seperate 32 bit elements + __m128i vResulti = _mm_srli_si128(reinterpret_cast(&vResultd)[0],8/8); + // vResultd has x and w, vResulti has y and z, merge into one as x,w,y,z + XMVECTOR vTemp = _mm_shuffle_ps(reinterpret_cast(&vResultd)[0],reinterpret_cast(&vResulti)[0],_MM_SHUFFLE(1,0,1,0)); + // Fix the entries to x,y,z,w + vTemp = _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(1,3,2,0)); + // Mask x,y,z and w + vTemp = _mm_and_ps(vTemp,g_XMMaskIco4); + // x and z are unsigned! Flip the bits to convert the order to signed + vTemp = _mm_xor_ps(vTemp,g_XMXorIco4); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // x and z - 0x80 to complete the conversion + vTemp = _mm_add_ps(vTemp,g_XMAddIco4); + // Fix y and w because they are too large + vTemp = _mm_mul_ps(vTemp,LoadIcoN4Mul); + return vTemp; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadIco4 +( + CONST XMICO4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + UINT Element; + static CONST UINT SignExtend[] = {0x00000000, 0xFFF00000}; + static CONST UINT SignExtendW[] = {0x00000000, 0xFFFFFFF0}; + + XMASSERT(pSource); + + Element = (UINT)(pSource->v & 0xFFFFF); + V.vector4_f32[0] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]); + Element = (UINT)((pSource->v >> 20) & 0xFFFFF); + V.vector4_f32[1] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]); + Element = (UINT)((pSource->v >> 40) & 0xFFFFF); + V.vector4_f32[2] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]); + Element = (UINT)(pSource->v >> 60); + V.vector4_f32[3] = (FLOAT)(INT)(Element | SignExtendW[Element >> 3]); + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + // Grab the 64 bit structure + __m128d vResultd = _mm_load_sd(reinterpret_cast(&pSource->v)); + // By shifting down 8 bits, y and z are in seperate 32 bit elements + __m128i vResulti = _mm_srli_si128(reinterpret_cast(&vResultd)[0],8/8); + // vResultd has x and w, vResulti has y and z, merge into one as x,w,y,z + XMVECTOR vTemp = _mm_shuffle_ps(reinterpret_cast(&vResultd)[0],reinterpret_cast(&vResulti)[0],_MM_SHUFFLE(1,0,1,0)); + // Fix the entries to x,y,z,w + vTemp = _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(1,3,2,0)); + // Mask x,y,z and w + vTemp = _mm_and_ps(vTemp,g_XMMaskIco4); + // x and z are unsigned! Flip the bits to convert the order to signed + vTemp = _mm_xor_ps(vTemp,g_XMXorIco4); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // x and z - 0x80 to complete the conversion + vTemp = _mm_add_ps(vTemp,g_XMAddIco4); + // Fix y and w because they are too large + vTemp = _mm_mul_ps(vTemp,g_XMMulIco4); + return vTemp; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadXDecN4 +( + CONST XMXDECN4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR V; + UINT Element; + static CONST UINT SignExtend[] = {0x00000000, 0xFFFFFC00}; + + XMASSERT(pSource); + XMASSERT((pSource->v & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 10) & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 20) & 0x3FF) != 0x200); + + Element = pSource->v & 0x3FF; + V.vector4_f32[0] = (FLOAT)(SHORT)(Element | SignExtend[Element >> 9]) / 511.0f; + Element = (pSource->v >> 10) & 0x3FF; + V.vector4_f32[1] = (FLOAT)(SHORT)(Element | SignExtend[Element >> 9]) / 511.0f; + Element = (pSource->v >> 20) & 0x3FF; + V.vector4_f32[2] = (FLOAT)(SHORT)(Element | SignExtend[Element >> 9]) / 511.0f; + V.vector4_f32[3] = (FLOAT)(pSource->v >> 30) / 3.0f; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + // Splat the color in all four entries + __m128 vTemp = _mm_load_ps1(reinterpret_cast(&pSource->v)); + // Shift R&0xFF0000, G&0xFF00, B&0xFF, A&0xFF000000 + vTemp = _mm_and_ps(vTemp,g_XMMaskA2B10G10R10); + // a is unsigned! Flip the bit to convert the order to signed + vTemp = _mm_xor_ps(vTemp,g_XMFlipA2B10G10R10); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // RGB + 0, A + 0x80000000.f to undo the signed order. + vTemp = _mm_add_ps(vTemp,g_XMFixAA2B10G10R10); + // Convert 0-255 to 0.0f-1.0f + return _mm_mul_ps(vTemp,g_XMNormalizeA2B10G10R10); +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadXDec4 +( + CONST XMXDEC4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + UINT Element; + static CONST UINT SignExtend[] = {0x00000000, 0xFFFFFC00}; + + XMASSERT(pSource); + XMASSERT((pSource->v & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 10) & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 20) & 0x3FF) != 0x200); + + Element = pSource->v & 0x3FF; + V.vector4_f32[0] = (FLOAT)(SHORT)(Element | SignExtend[Element >> 9]); + Element = (pSource->v >> 10) & 0x3FF; + V.vector4_f32[1] = (FLOAT)(SHORT)(Element | SignExtend[Element >> 9]); + Element = (pSource->v >> 20) & 0x3FF; + V.vector4_f32[2] = (FLOAT)(SHORT)(Element | SignExtend[Element >> 9]); + V.vector4_f32[3] = (FLOAT)(pSource->v >> 30); + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT((pSource->v & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 10) & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 20) & 0x3FF) != 0x200); + static const XMVECTORI32 XDec4Xor = {0x200, 0x200<<10, 0x200<<20, 0x80000000}; + static const XMVECTORF32 XDec4Add = {-512.0f,-512.0f*1024.0f,-512.0f*1024.0f*1024.0f,32768*65536.0f}; + XMASSERT(pSource); + // Splat the color in all four entries + XMVECTOR vTemp = _mm_load_ps1(reinterpret_cast(&pSource->v)); + // Shift R&0xFF0000, G&0xFF00, B&0xFF, A&0xFF000000 + vTemp = _mm_and_ps(vTemp,g_XMMaskDec4); + // a is unsigned! Flip the bit to convert the order to signed + vTemp = _mm_xor_ps(vTemp,XDec4Xor); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // RGB + 0, A + 0x80000000.f to undo the signed order. + vTemp = _mm_add_ps(vTemp,XDec4Add); + // Convert 0-255 to 0.0f-1.0f + vTemp = _mm_mul_ps(vTemp,g_XMMulDec4); + return vTemp; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadUDecN4 +( + CONST XMUDECN4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + UINT Element; + + XMASSERT(pSource); + + Element = pSource->v & 0x3FF; + V.vector4_f32[0] = (FLOAT)Element / 1023.0f; + Element = (pSource->v >> 10) & 0x3FF; + V.vector4_f32[1] = (FLOAT)Element / 1023.0f; + Element = (pSource->v >> 20) & 0x3FF; + V.vector4_f32[2] = (FLOAT)Element / 1023.0f; + V.vector4_f32[3] = (FLOAT)(pSource->v >> 30) / 3.0f; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + static const XMVECTORF32 UDecN4Mul = {1.0f/1023.0f,1.0f/(1023.0f*1024.0f),1.0f/(1023.0f*1024.0f*1024.0f),1.0f/(3.0f*1024.0f*1024.0f*1024.0f)}; + // Splat the color in all four entries + XMVECTOR vTemp = _mm_load_ps1(reinterpret_cast(&pSource->v)); + // Shift R&0xFF0000, G&0xFF00, B&0xFF, A&0xFF000000 + vTemp = _mm_and_ps(vTemp,g_XMMaskDec4); + // a is unsigned! Flip the bit to convert the order to signed + vTemp = _mm_xor_ps(vTemp,g_XMFlipW); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // RGB + 0, A + 0x80000000.f to undo the signed order. + vTemp = _mm_add_ps(vTemp,g_XMAddUDec4); + // Convert 0-255 to 0.0f-1.0f + vTemp = _mm_mul_ps(vTemp,UDecN4Mul); + return vTemp; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadUDec4 +( + CONST XMUDEC4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + UINT Element; + + XMASSERT(pSource); + + Element = pSource->v & 0x3FF; + V.vector4_f32[0] = (FLOAT)Element; + Element = (pSource->v >> 10) & 0x3FF; + V.vector4_f32[1] = (FLOAT)Element; + Element = (pSource->v >> 20) & 0x3FF; + V.vector4_f32[2] = (FLOAT)Element; + V.vector4_f32[3] = (FLOAT)(pSource->v >> 30); + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + // Splat the color in all four entries + XMVECTOR vTemp = _mm_load_ps1(reinterpret_cast(&pSource->v)); + // Shift R&0xFF0000, G&0xFF00, B&0xFF, A&0xFF000000 + vTemp = _mm_and_ps(vTemp,g_XMMaskDec4); + // a is unsigned! Flip the bit to convert the order to signed + vTemp = _mm_xor_ps(vTemp,g_XMFlipW); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // RGB + 0, A + 0x80000000.f to undo the signed order. + vTemp = _mm_add_ps(vTemp,g_XMAddUDec4); + // Convert 0-255 to 0.0f-1.0f + vTemp = _mm_mul_ps(vTemp,g_XMMulDec4); + return vTemp; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadDecN4 +( + CONST XMDECN4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + UINT Element; + static CONST UINT SignExtend[] = {0x00000000, 0xFFFFFC00}; + static CONST UINT SignExtendW[] = {0x00000000, 0xFFFFFFFC}; + + XMASSERT(pSource); + XMASSERT((pSource->v & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 10) & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 20) & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 30) & 0x3) != 0x2); + + Element = pSource->v & 0x3FF; + V.vector4_f32[0] = (FLOAT)(SHORT)(Element | SignExtend[Element >> 9]) / 511.0f; + Element = (pSource->v >> 10) & 0x3FF; + V.vector4_f32[1] = (FLOAT)(SHORT)(Element | SignExtend[Element >> 9]) / 511.0f; + Element = (pSource->v >> 20) & 0x3FF; + V.vector4_f32[2] = (FLOAT)(SHORT)(Element | SignExtend[Element >> 9]) / 511.0f; + Element = pSource->v >> 30; + V.vector4_f32[3] = (FLOAT)(SHORT)(Element | SignExtendW[Element >> 1]); + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + XMASSERT((pSource->v & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 10) & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 20) & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 30) & 0x3) != 0x2); + static const XMVECTORF32 DecN4Mul = {1.0f/511.0f,1.0f/(511.0f*1024.0f),1.0f/(511.0f*1024.0f*1024.0f),1.0f/(1024.0f*1024.0f*1024.0f)}; + // Splat the color in all four entries + XMVECTOR vTemp = _mm_load_ps1(reinterpret_cast(&pSource->v)); + // Shift R&0xFF0000, G&0xFF00, B&0xFF, A&0xFF000000 + vTemp = _mm_and_ps(vTemp,g_XMMaskDec4); + // a is unsigned! Flip the bit to convert the order to signed + vTemp = _mm_xor_ps(vTemp,g_XMXorDec4); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // RGB + 0, A + 0x80000000.f to undo the signed order. + vTemp = _mm_add_ps(vTemp,g_XMAddDec4); + // Convert 0-255 to 0.0f-1.0f + vTemp = _mm_mul_ps(vTemp,DecN4Mul); + return vTemp; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadDec4 +( + CONST XMDEC4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + UINT Element; + static CONST UINT SignExtend[] = {0x00000000, 0xFFFFFC00}; + static CONST UINT SignExtendW[] = {0x00000000, 0xFFFFFFFC}; + + XMASSERT(pSource); + XMASSERT((pSource->v & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 10) & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 20) & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 30) & 0x3) != 0x2); + + Element = pSource->v & 0x3FF; + V.vector4_f32[0] = (FLOAT)(SHORT)(Element | SignExtend[Element >> 9]); + Element = (pSource->v >> 10) & 0x3FF; + V.vector4_f32[1] = (FLOAT)(SHORT)(Element | SignExtend[Element >> 9]); + Element = (pSource->v >> 20) & 0x3FF; + V.vector4_f32[2] = (FLOAT)(SHORT)(Element | SignExtend[Element >> 9]); + Element = pSource->v >> 30; + V.vector4_f32[3] = (FLOAT)(SHORT)(Element | SignExtendW[Element >> 1]); + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT((pSource->v & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 10) & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 20) & 0x3FF) != 0x200); + XMASSERT(((pSource->v >> 30) & 0x3) != 0x2); + XMASSERT(pSource); + // Splat the color in all four entries + XMVECTOR vTemp = _mm_load_ps1(reinterpret_cast(&pSource->v)); + // Shift R&0xFF0000, G&0xFF00, B&0xFF, A&0xFF000000 + vTemp = _mm_and_ps(vTemp,g_XMMaskDec4); + // a is unsigned! Flip the bit to convert the order to signed + vTemp = _mm_xor_ps(vTemp,g_XMXorDec4); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // RGB + 0, A + 0x80000000.f to undo the signed order. + vTemp = _mm_add_ps(vTemp,g_XMAddDec4); + // Convert 0-255 to 0.0f-1.0f + vTemp = _mm_mul_ps(vTemp,g_XMMulDec4); + return vTemp; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadUByteN4 +( + CONST XMUBYTEN4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + + XMASSERT(pSource); + + V.vector4_f32[0] = (FLOAT)pSource->x / 255.0f; + V.vector4_f32[1] = (FLOAT)pSource->y / 255.0f; + V.vector4_f32[2] = (FLOAT)pSource->z / 255.0f; + V.vector4_f32[3] = (FLOAT)pSource->w / 255.0f; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + static const XMVECTORF32 LoadUByteN4Mul = {1.0f/255.0f,1.0f/(255.0f*256.0f),1.0f/(255.0f*65536.0f),1.0f/(255.0f*65536.0f*256.0f)}; + XMASSERT(pSource); + // Splat the color in all four entries (x,z,y,w) + XMVECTOR vTemp = _mm_load1_ps(reinterpret_cast(&pSource->x)); + // Mask x&0ff,y&0xff00,z&0xff0000,w&0xff000000 + vTemp = _mm_and_ps(vTemp,g_XMMaskByte4); + // w is signed! Flip the bits to convert the order to unsigned + vTemp = _mm_xor_ps(vTemp,g_XMFlipW); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // w + 0x80 to complete the conversion + vTemp = _mm_add_ps(vTemp,g_XMAddUDec4); + // Fix y, z and w because they are too large + vTemp = _mm_mul_ps(vTemp,LoadUByteN4Mul); + return vTemp; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadUByte4 +( + CONST XMUBYTE4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + + XMASSERT(pSource); + + V.vector4_f32[0] = (FLOAT)pSource->x; + V.vector4_f32[1] = (FLOAT)pSource->y; + V.vector4_f32[2] = (FLOAT)pSource->z; + V.vector4_f32[3] = (FLOAT)pSource->w; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + static const XMVECTORF32 LoadUByte4Mul = {1.0f,1.0f/256.0f,1.0f/65536.0f,1.0f/(65536.0f*256.0f)}; + XMASSERT(pSource); + // Splat the color in all four entries (x,z,y,w) + XMVECTOR vTemp = _mm_load1_ps(reinterpret_cast(&pSource->x)); + // Mask x&0ff,y&0xff00,z&0xff0000,w&0xff000000 + vTemp = _mm_and_ps(vTemp,g_XMMaskByte4); + // w is signed! Flip the bits to convert the order to unsigned + vTemp = _mm_xor_ps(vTemp,g_XMFlipW); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // w + 0x80 to complete the conversion + vTemp = _mm_add_ps(vTemp,g_XMAddUDec4); + // Fix y, z and w because they are too large + vTemp = _mm_mul_ps(vTemp,LoadUByte4Mul); + return vTemp; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadByteN4 +( + CONST XMBYTEN4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + + XMASSERT(pSource); + XMASSERT(pSource->x != -128); + XMASSERT(pSource->y != -128); + XMASSERT(pSource->z != -128); + XMASSERT(pSource->w != -128); + + V.vector4_f32[0] = (FLOAT)pSource->x / 127.0f; + V.vector4_f32[1] = (FLOAT)pSource->y / 127.0f; + V.vector4_f32[2] = (FLOAT)pSource->z / 127.0f; + V.vector4_f32[3] = (FLOAT)pSource->w / 127.0f; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + static const XMVECTORF32 LoadByteN4Mul = {1.0f/127.0f,1.0f/(127.0f*256.0f),1.0f/(127.0f*65536.0f),1.0f/(127.0f*65536.0f*256.0f)}; + XMASSERT(pSource); + XMASSERT(pSource->x != -128); + XMASSERT(pSource->y != -128); + XMASSERT(pSource->z != -128); + XMASSERT(pSource->w != -128); + // Splat the color in all four entries (x,z,y,w) + XMVECTOR vTemp = _mm_load1_ps(reinterpret_cast(&pSource->x)); + // Mask x&0ff,y&0xff00,z&0xff0000,w&0xff000000 + vTemp = _mm_and_ps(vTemp,g_XMMaskByte4); + // x,y and z are unsigned! Flip the bits to convert the order to signed + vTemp = _mm_xor_ps(vTemp,g_XMXorByte4); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // x, y and z - 0x80 to complete the conversion + vTemp = _mm_add_ps(vTemp,g_XMAddByte4); + // Fix y, z and w because they are too large + vTemp = _mm_mul_ps(vTemp,LoadByteN4Mul); + return vTemp; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadByte4 +( + CONST XMBYTE4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + + XMASSERT(pSource); + XMASSERT(pSource->x != -128); + XMASSERT(pSource->y != -128); + XMASSERT(pSource->z != -128); + XMASSERT(pSource->w != -128); + + V.vector4_f32[0] = (FLOAT)pSource->x; + V.vector4_f32[1] = (FLOAT)pSource->y; + V.vector4_f32[2] = (FLOAT)pSource->z; + V.vector4_f32[3] = (FLOAT)pSource->w; + + return V; + +#elif defined(_XM_SSE_INTRINSICS_) + static const XMVECTORF32 LoadByte4Mul = {1.0f,1.0f/256.0f,1.0f/65536.0f,1.0f/(65536.0f*256.0f)}; + XMASSERT(pSource); + XMASSERT(pSource->x != -128); + XMASSERT(pSource->y != -128); + XMASSERT(pSource->z != -128); + XMASSERT(pSource->w != -128); + // Splat the color in all four entries (x,z,y,w) + XMVECTOR vTemp = _mm_load1_ps(reinterpret_cast(&pSource->x)); + // Mask x&0ff,y&0xff00,z&0xff0000,w&0xff000000 + vTemp = _mm_and_ps(vTemp,g_XMMaskByte4); + // x,y and z are unsigned! Flip the bits to convert the order to signed + vTemp = _mm_xor_ps(vTemp,g_XMXorByte4); + // Convert to floating point numbers + vTemp = _mm_cvtepi32_ps(reinterpret_cast(&vTemp)[0]); + // x, y and z - 0x80 to complete the conversion + vTemp = _mm_add_ps(vTemp,g_XMAddByte4); + // Fix y, z and w because they are too large + vTemp = _mm_mul_ps(vTemp,LoadByte4Mul); + return vTemp; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadUNibble4 +( + CONST XMUNIBBLE4* pSource +) +{ +#if defined(_XM_SSE_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) + static const XMVECTORI32 UNibble4And = {0xF,0xF0,0xF00,0xF000}; + static const XMVECTORF32 UNibble4Mul = {1.0f,1.0f/16.f,1.0f/256.f,1.0f/4096.f}; + XMASSERT(pSource); + // Get the 32 bit value and splat it + XMVECTOR vResult = _mm_load_ps1(reinterpret_cast(&pSource->v)); + // Mask off x, y and z + vResult = _mm_and_ps(vResult,UNibble4And); + // Convert to float + vResult = _mm_cvtepi32_ps(reinterpret_cast(&vResult)[0]); + // Normalize x, y, and z + vResult = _mm_mul_ps(vResult,UNibble4Mul); + return vResult; +#else + XMVECTOR V; + UINT Element; + + XMASSERT(pSource); + + Element = pSource->v & 0xF; + V.vector4_f32[0] = (FLOAT)Element; + Element = (pSource->v >> 4) & 0xF; + V.vector4_f32[1] = (FLOAT)Element; + Element = (pSource->v >> 8) & 0xF; + V.vector4_f32[2] = (FLOAT)Element; + Element = (pSource->v >> 12) & 0xF; + V.vector4_f32[3] = (FLOAT)Element; + + return V; +#endif // !_XM_SSE_INTRISICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadU555 +( + CONST XMU555* pSource +) +{ +#if defined(_XM_SSE_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) + static const XMVECTORI32 U555And = {0x1F,0x1F<<5,0x1F<<10,0x8000}; + static const XMVECTORF32 U555Mul = {1.0f,1.0f/32.f,1.0f/1024.f,1.0f/32768.f}; + XMASSERT(pSource); + // Get the 32 bit value and splat it + XMVECTOR vResult = _mm_load_ps1(reinterpret_cast(&pSource->v)); + // Mask off x, y and z + vResult = _mm_and_ps(vResult,U555And); + // Convert to float + vResult = _mm_cvtepi32_ps(reinterpret_cast(&vResult)[0]); + // Normalize x, y, and z + vResult = _mm_mul_ps(vResult,U555Mul); + return vResult; +#else + XMVECTOR V; + UINT Element; + + XMASSERT(pSource); + + Element = pSource->v & 0x1F; + V.vector4_f32[0] = (FLOAT)Element; + Element = (pSource->v >> 5) & 0x1F; + V.vector4_f32[1] = (FLOAT)Element; + Element = (pSource->v >> 10) & 0x1F; + V.vector4_f32[2] = (FLOAT)Element; + Element = (pSource->v >> 15) & 0x1; + V.vector4_f32[3] = (FLOAT)Element; + + return V; +#endif // !_XM_SSE_INTRISICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMLoadColor +( + CONST XMCOLOR* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMASSERT(pSource); + { + // INT -> Float conversions are done in one instruction. + // UINT -> Float calls a runtime function. Keep in INT + INT iColor = (INT)(pSource->c); + XMVECTOR vColor = { + (FLOAT)((iColor >> 16) & 0xFF) * (1.0f/255.0f), + (FLOAT)((iColor >> 8) & 0xFF) * (1.0f/255.0f), + (FLOAT)(iColor & 0xFF) * (1.0f/255.0f), + (FLOAT)((iColor >> 24) & 0xFF) * (1.0f/255.0f) + }; + return vColor; + } +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + // Splat the color in all four entries + __m128i vInt = _mm_set1_epi32(pSource->c); + // Shift R&0xFF0000, G&0xFF00, B&0xFF, A&0xFF000000 + vInt = _mm_and_si128(vInt,g_XMMaskA8R8G8B8); + // a is unsigned! Flip the bit to convert the order to signed + vInt = _mm_xor_si128(vInt,g_XMFlipA8R8G8B8); + // Convert to floating point numbers + XMVECTOR vTemp = _mm_cvtepi32_ps(vInt); + // RGB + 0, A + 0x80000000.f to undo the signed order. + vTemp = _mm_add_ps(vTemp,g_XMFixAA8R8G8B8); + // Convert 0-255 to 0.0f-1.0f + return _mm_mul_ps(vTemp,g_XMNormalizeA8R8G8B8); +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMLoadFloat3x3 +( + CONST XMFLOAT3X3* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMMATRIX M; + + XMASSERT(pSource); + + M.r[0].vector4_f32[0] = pSource->m[0][0]; + M.r[0].vector4_f32[1] = pSource->m[0][1]; + M.r[0].vector4_f32[2] = pSource->m[0][2]; + M.r[0].vector4_f32[3] = 0.0f; + + M.r[1].vector4_f32[0] = pSource->m[1][0]; + M.r[1].vector4_f32[1] = pSource->m[1][1]; + M.r[1].vector4_f32[2] = pSource->m[1][2]; + M.r[1].vector4_f32[3] = 0.0f; + + M.r[2].vector4_f32[0] = pSource->m[2][0]; + M.r[2].vector4_f32[1] = pSource->m[2][1]; + M.r[2].vector4_f32[2] = pSource->m[2][2]; + M.r[2].vector4_f32[3] = 0.0f; + + M.r[3].vector4_f32[0] = 0.0f; + M.r[3].vector4_f32[1] = 0.0f; + M.r[3].vector4_f32[2] = 0.0f; + M.r[3].vector4_f32[3] = 1.0f; + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMMATRIX M; + XMVECTOR V1, V2, V3, Z, T1, T2, T3, T4, T5; + + Z = _mm_setzero_ps(); + + XMASSERT(pSource); + + V1 = _mm_loadu_ps( &pSource->m[0][0] ); + V2 = _mm_loadu_ps( &pSource->m[1][1] ); + V3 = _mm_load_ss( &pSource->m[2][2] ); + + T1 = _mm_unpackhi_ps( V1, Z ); + T2 = _mm_unpacklo_ps( V2, Z ); + T3 = _mm_shuffle_ps( V3, T2, _MM_SHUFFLE( 0, 1, 0, 0 ) ); + T4 = _mm_movehl_ps( T2, T3 ); + T5 = _mm_movehl_ps( Z, T1 ); + + M.r[0] = _mm_movelh_ps( V1, T1 ); + M.r[1] = _mm_add_ps( T4, T5 ); + M.r[2] = _mm_shuffle_ps( V2, V3, _MM_SHUFFLE(1, 0, 3, 2) ); + M.r[3] = g_XMIdentityR3; + + return M; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMLoadFloat4x3 +( + CONST XMFLOAT4X3* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMMATRIX M; + XMASSERT(pSource); + + ((UINT *)(&M.r[0].vector4_f32[0]))[0] = ((const UINT *)(&pSource->m[0][0]))[0]; + ((UINT *)(&M.r[0].vector4_f32[1]))[0] = ((const UINT *)(&pSource->m[0][1]))[0]; + ((UINT *)(&M.r[0].vector4_f32[2]))[0] = ((const UINT *)(&pSource->m[0][2]))[0]; + M.r[0].vector4_f32[3] = 0.0f; + + ((UINT *)(&M.r[1].vector4_f32[0]))[0] = ((const UINT *)(&pSource->m[1][0]))[0]; + ((UINT *)(&M.r[1].vector4_f32[1]))[0] = ((const UINT *)(&pSource->m[1][1]))[0]; + ((UINT *)(&M.r[1].vector4_f32[2]))[0] = ((const UINT *)(&pSource->m[1][2]))[0]; + M.r[1].vector4_f32[3] = 0.0f; + + ((UINT *)(&M.r[2].vector4_f32[0]))[0] = ((const UINT *)(&pSource->m[2][0]))[0]; + ((UINT *)(&M.r[2].vector4_f32[1]))[0] = ((const UINT *)(&pSource->m[2][1]))[0]; + ((UINT *)(&M.r[2].vector4_f32[2]))[0] = ((const UINT *)(&pSource->m[2][2]))[0]; + M.r[2].vector4_f32[3] = 0.0f; + + ((UINT *)(&M.r[3].vector4_f32[0]))[0] = ((const UINT *)(&pSource->m[3][0]))[0]; + ((UINT *)(&M.r[3].vector4_f32[1]))[0] = ((const UINT *)(&pSource->m[3][1]))[0]; + ((UINT *)(&M.r[3].vector4_f32[2]))[0] = ((const UINT *)(&pSource->m[3][2]))[0]; + M.r[3].vector4_f32[3] = 1.0f; + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + // Use unaligned load instructions to + // load the 12 floats + // vTemp1 = x1,y1,z1,x2 + XMVECTOR vTemp1 = _mm_loadu_ps(&pSource->m[0][0]); + // vTemp2 = y2,z2,x3,y3 + XMVECTOR vTemp2 = _mm_loadu_ps(&pSource->m[1][1]); + // vTemp4 = z3,x4,y4,z4 + XMVECTOR vTemp4 = _mm_loadu_ps(&pSource->m[2][2]); + // vTemp3 = x3,y3,z3,z3 + XMVECTOR vTemp3 = _mm_shuffle_ps(vTemp2,vTemp4,_MM_SHUFFLE(0,0,3,2)); + // vTemp2 = y2,z2,x2,x2 + vTemp2 = _mm_shuffle_ps(vTemp2,vTemp1,_MM_SHUFFLE(3,3,1,0)); + // vTemp2 = x2,y2,z2,z2 + vTemp2 = _mm_shuffle_ps(vTemp2,vTemp2,_MM_SHUFFLE(1,1,0,2)); + // vTemp1 = x1,y1,z1,0 + vTemp1 = _mm_and_ps(vTemp1,g_XMMask3); + // vTemp2 = x2,y2,z2,0 + vTemp2 = _mm_and_ps(vTemp2,g_XMMask3); + // vTemp3 = x3,y3,z3,0 + vTemp3 = _mm_and_ps(vTemp3,g_XMMask3); + // vTemp4i = x4,y4,z4,0 + __m128i vTemp4i = _mm_srli_si128(reinterpret_cast(&vTemp4)[0],32/8); + // vTemp4i = x4,y4,z4,1.0f + vTemp4i = _mm_or_si128(vTemp4i,g_XMIdentityR3); + XMMATRIX M(vTemp1, + vTemp2, + vTemp3, + reinterpret_cast(&vTemp4i)[0]); + return M; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMLoadFloat4x3A +( + CONST XMFLOAT4X3A* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMMATRIX M; + + XMASSERT(pSource); + XMASSERT(((UINT_PTR)pSource & 0xF) == 0); + + M.r[0].vector4_f32[0] = pSource->m[0][0]; + M.r[0].vector4_f32[1] = pSource->m[0][1]; + M.r[0].vector4_f32[2] = pSource->m[0][2]; + M.r[0].vector4_f32[3] = 0.0f; + + M.r[1].vector4_f32[0] = pSource->m[1][0]; + M.r[1].vector4_f32[1] = pSource->m[1][1]; + M.r[1].vector4_f32[2] = pSource->m[1][2]; + M.r[1].vector4_f32[3] = 0.0f; + + M.r[2].vector4_f32[0] = pSource->m[2][0]; + M.r[2].vector4_f32[1] = pSource->m[2][1]; + M.r[2].vector4_f32[2] = pSource->m[2][2]; + M.r[2].vector4_f32[3] = 0.0f; + + M.r[3].vector4_f32[0] = pSource->m[3][0]; + M.r[3].vector4_f32[1] = pSource->m[3][1]; + M.r[3].vector4_f32[2] = pSource->m[3][2]; + M.r[3].vector4_f32[3] = 1.0f; + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + // Use aligned load instructions to + // load the 12 floats + // vTemp1 = x1,y1,z1,x2 + XMVECTOR vTemp1 = _mm_load_ps(&pSource->m[0][0]); + // vTemp2 = y2,z2,x3,y3 + XMVECTOR vTemp2 = _mm_load_ps(&pSource->m[1][1]); + // vTemp4 = z3,x4,y4,z4 + XMVECTOR vTemp4 = _mm_load_ps(&pSource->m[2][2]); + // vTemp3 = x3,y3,z3,z3 + XMVECTOR vTemp3 = _mm_shuffle_ps(vTemp2,vTemp4,_MM_SHUFFLE(0,0,3,2)); + // vTemp2 = y2,z2,x2,x2 + vTemp2 = _mm_shuffle_ps(vTemp2,vTemp1,_MM_SHUFFLE(3,3,1,0)); + // vTemp2 = x2,y2,z2,z2 + vTemp2 = _mm_shuffle_ps(vTemp2,vTemp2,_MM_SHUFFLE(1,1,0,2)); + // vTemp1 = x1,y1,z1,0 + vTemp1 = _mm_and_ps(vTemp1,g_XMMask3); + // vTemp2 = x2,y2,z2,0 + vTemp2 = _mm_and_ps(vTemp2,g_XMMask3); + // vTemp3 = x3,y3,z3,0 + vTemp3 = _mm_and_ps(vTemp3,g_XMMask3); + // vTemp4i = x4,y4,z4,0 + __m128i vTemp4i = _mm_srli_si128(reinterpret_cast(&vTemp4)[0],32/8); + // vTemp4i = x4,y4,z4,1.0f + vTemp4i = _mm_or_si128(vTemp4i,g_XMIdentityR3); + XMMATRIX M(vTemp1, + vTemp2, + vTemp3, + reinterpret_cast(&vTemp4i)[0]); + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMLoadFloat4x4 +( + CONST XMFLOAT4X4* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMMATRIX M; + XMASSERT(pSource); + + ((UINT *)(&M.r[0].vector4_f32[0]))[0] = ((const UINT *)(&pSource->m[0][0]))[0]; + ((UINT *)(&M.r[0].vector4_f32[1]))[0] = ((const UINT *)(&pSource->m[0][1]))[0]; + ((UINT *)(&M.r[0].vector4_f32[2]))[0] = ((const UINT *)(&pSource->m[0][2]))[0]; + ((UINT *)(&M.r[0].vector4_f32[3]))[0] = ((const UINT *)(&pSource->m[0][3]))[0]; + + ((UINT *)(&M.r[1].vector4_f32[0]))[0] = ((const UINT *)(&pSource->m[1][0]))[0]; + ((UINT *)(&M.r[1].vector4_f32[1]))[0] = ((const UINT *)(&pSource->m[1][1]))[0]; + ((UINT *)(&M.r[1].vector4_f32[2]))[0] = ((const UINT *)(&pSource->m[1][2]))[0]; + ((UINT *)(&M.r[1].vector4_f32[3]))[0] = ((const UINT *)(&pSource->m[1][3]))[0]; + + ((UINT *)(&M.r[2].vector4_f32[0]))[0] = ((const UINT *)(&pSource->m[2][0]))[0]; + ((UINT *)(&M.r[2].vector4_f32[1]))[0] = ((const UINT *)(&pSource->m[2][1]))[0]; + ((UINT *)(&M.r[2].vector4_f32[2]))[0] = ((const UINT *)(&pSource->m[2][2]))[0]; + ((UINT *)(&M.r[2].vector4_f32[3]))[0] = ((const UINT *)(&pSource->m[2][3]))[0]; + + ((UINT *)(&M.r[3].vector4_f32[0]))[0] = ((const UINT *)(&pSource->m[3][0]))[0]; + ((UINT *)(&M.r[3].vector4_f32[1]))[0] = ((const UINT *)(&pSource->m[3][1]))[0]; + ((UINT *)(&M.r[3].vector4_f32[2]))[0] = ((const UINT *)(&pSource->m[3][2]))[0]; + ((UINT *)(&M.r[3].vector4_f32[3]))[0] = ((const UINT *)(&pSource->m[3][3]))[0]; + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSource); + XMMATRIX M; + + M.r[0] = _mm_loadu_ps( &pSource->_11 ); + M.r[1] = _mm_loadu_ps( &pSource->_21 ); + M.r[2] = _mm_loadu_ps( &pSource->_31 ); + M.r[3] = _mm_loadu_ps( &pSource->_41 ); + + return M; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMLoadFloat4x4A +( + CONST XMFLOAT4X4A* pSource +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMMATRIX M; + + XMASSERT(pSource); + XMASSERT(((UINT_PTR)pSource & 0xF) == 0); + + M.r[0].vector4_f32[0] = pSource->m[0][0]; + M.r[0].vector4_f32[1] = pSource->m[0][1]; + M.r[0].vector4_f32[2] = pSource->m[0][2]; + M.r[0].vector4_f32[3] = pSource->m[0][3]; + + M.r[1].vector4_f32[0] = pSource->m[1][0]; + M.r[1].vector4_f32[1] = pSource->m[1][1]; + M.r[1].vector4_f32[2] = pSource->m[1][2]; + M.r[1].vector4_f32[3] = pSource->m[1][3]; + + M.r[2].vector4_f32[0] = pSource->m[2][0]; + M.r[2].vector4_f32[1] = pSource->m[2][1]; + M.r[2].vector4_f32[2] = pSource->m[2][2]; + M.r[2].vector4_f32[3] = pSource->m[2][3]; + + M.r[3].vector4_f32[0] = pSource->m[3][0]; + M.r[3].vector4_f32[1] = pSource->m[3][1]; + M.r[3].vector4_f32[2] = pSource->m[3][2]; + M.r[3].vector4_f32[3] = pSource->m[3][3]; + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMMATRIX M; + + XMASSERT(pSource); + + M.r[0] = _mm_load_ps( &pSource->_11 ); + M.r[1] = _mm_load_ps( &pSource->_21 ); + M.r[2] = _mm_load_ps( &pSource->_31 ); + M.r[3] = _mm_load_ps( &pSource->_41 ); + + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +/**************************************************************************** + * + * Vector and matrix store operations + * + ****************************************************************************/ + +XMFINLINE VOID XMStoreInt +( + UINT* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 3) == 0); + + *pDestination = XMVectorGetIntX( V ); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 3) == 0); + + _mm_store_ss( (float*)pDestination, V ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreFloat +( + FLOAT* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 3) == 0); + + *pDestination = XMVectorGetX( V ); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 3) == 0); + + _mm_store_ss( pDestination, V ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreInt2 +( + UINT* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 3) == 0); + + pDestination[0] = V.vector4_u32[0]; + pDestination[1] = V.vector4_u32[1]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 3) == 0); + + XMVECTOR T = _mm_shuffle_ps( V, V, _MM_SHUFFLE( 1, 1, 1, 1 ) ); + _mm_store_ss( (float*)&pDestination[0], V ); + _mm_store_ss( (float*)&pDestination[1], T ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreInt2A +( + UINT* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 0xF) == 0); + + pDestination[0] = V.vector4_u32[0]; + pDestination[1] = V.vector4_u32[1]; + +#elif defined(_XM_SSE_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 0xF) == 0); + + _mm_storel_epi64( (__m128i*)pDestination, reinterpret_cast(&V)[0] ); + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreFloat2 +( + XMFLOAT2* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 3) == 0); + + pDestination->x = V.vector4_f32[0]; + pDestination->y = V.vector4_f32[1]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 3) == 0); + + XMVECTOR T = _mm_shuffle_ps( V, V, _MM_SHUFFLE( 1, 1, 1, 1 ) ); + _mm_store_ss( &pDestination->x, V ); + _mm_store_ss( &pDestination->y, T ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreFloat2A +( + XMFLOAT2A* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 0xF) == 0); + + pDestination->x = V.vector4_f32[0]; + pDestination->y = V.vector4_f32[1]; + +#elif defined(_XM_SSE_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 0xF) == 0); + + _mm_storel_epi64( (__m128i*)pDestination, reinterpret_cast(&V)[0] ); + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreHalf2 +( + XMHALF2* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + + pDestination->x = XMConvertFloatToHalf(V.vector4_f32[0]); + pDestination->y = XMConvertFloatToHalf(V.vector4_f32[1]); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + pDestination->x = XMConvertFloatToHalf(XMVectorGetX(V)); + pDestination->y = XMConvertFloatToHalf(XMVectorGetY(V)); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreShortN2 +( + XMSHORTN2* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTORF32 Scale = {32767.0f, 32767.0f, 32767.0f, 32767.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, g_XMNegativeOne.v, g_XMOne.v); + N = XMVectorMultiply(N, Scale.v); + N = XMVectorRound(N); + + pDestination->x = (SHORT)N.vector4_f32[0]; + pDestination->y = (SHORT)N.vector4_f32[1]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static CONST XMVECTORF32 Scale = {32767.0f, 32767.0f, 32767.0f, 32767.0f}; + + XMVECTOR vResult = _mm_max_ps(V,g_XMNegativeOne); + vResult = _mm_min_ps(vResult,g_XMOne); + vResult = _mm_mul_ps(vResult,Scale); + __m128i vResulti = _mm_cvtps_epi32(vResult); + vResulti = _mm_packs_epi32(vResulti,vResulti); + _mm_store_ss(reinterpret_cast(&pDestination->x),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreShort2 +( + XMSHORT2* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTOR Min = {-32767.0f, -32767.0f, -32767.0f, -32767.0f}; + static CONST XMVECTOR Max = {32767.0f, 32767.0f, 32767.0f, 32767.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, Min, Max); + N = XMVectorRound(N); + + pDestination->x = (SHORT)N.vector4_f32[0]; + pDestination->y = (SHORT)N.vector4_f32[1]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static CONST XMVECTORF32 Min = {-32767.0f, -32767.0f, -32767.0f, -32767.0f}; + static CONST XMVECTORF32 Max = {32767.0f, 32767.0f, 32767.0f, 32767.0f}; + // Bounds check + XMVECTOR vResult = _mm_max_ps(V,Min); + vResult = _mm_min_ps(vResult,Max); + // Convert to int with rounding + __m128i vInt = _mm_cvtps_epi32(vResult); + // Pack the ints into shorts + vInt = _mm_packs_epi32(vInt,vInt); + _mm_store_ss(reinterpret_cast(&pDestination->x),reinterpret_cast(&vInt)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreUShortN2 +( + XMUSHORTN2* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTORF32 Scale = {65535.0f, 65535.0f, 65535.0f, 65535.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, XMVectorZero(), g_XMOne.v); + N = XMVectorMultiplyAdd(N, Scale.v, g_XMOneHalf.v); + N = XMVectorTruncate(N); + + pDestination->x = (SHORT)N.vector4_f32[0]; + pDestination->y = (SHORT)N.vector4_f32[1]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static CONST XMVECTORF32 Scale = {65535.0f, 65535.0f, 65535.0f, 65535.0f}; + // Bounds check + XMVECTOR vResult = _mm_max_ps(V,g_XMZero); + vResult = _mm_min_ps(vResult,g_XMOne); + vResult = _mm_mul_ps(vResult,Scale); + // Convert to int with rounding + __m128i vInt = _mm_cvtps_epi32(vResult); + // Since the SSE pack instruction clamps using signed rules, + // manually extract the values to store them to memory + pDestination->x = static_cast(_mm_extract_epi16(vInt,0)); + pDestination->y = static_cast(_mm_extract_epi16(vInt,2)); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreUShort2 +( + XMUSHORT2* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTOR Max = {65535.0f, 65535.0f, 65535.0f, 65535.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, XMVectorZero(), Max); + N = XMVectorRound(N); + + pDestination->x = (SHORT)N.vector4_f32[0]; + pDestination->y = (SHORT)N.vector4_f32[1]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static CONST XMVECTORF32 Max = {65535.0f, 65535.0f, 65535.0f, 65535.0f}; + // Bounds check + XMVECTOR vResult = _mm_max_ps(V,g_XMZero); + vResult = _mm_min_ps(vResult,Max); + // Convert to int with rounding + __m128i vInt = _mm_cvtps_epi32(vResult); + // Since the SSE pack instruction clamps using signed rules, + // manually extract the values to store them to memory + pDestination->x = static_cast(_mm_extract_epi16(vInt,0)); + pDestination->y = static_cast(_mm_extract_epi16(vInt,2)); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreInt3 +( + UINT* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 3) == 0); + + pDestination[0] = V.vector4_u32[0]; + pDestination[1] = V.vector4_u32[1]; + pDestination[2] = V.vector4_u32[2]; + +#elif defined(_XM_SSE_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 3) == 0); + + XMVECTOR T1 = _mm_shuffle_ps(V,V,_MM_SHUFFLE(1,1,1,1)); + XMVECTOR T2 = _mm_shuffle_ps(V,V,_MM_SHUFFLE(2,2,2,2)); + _mm_store_ss( (float*)pDestination, V ); + _mm_store_ss( (float*)&pDestination[1], T1 ); + _mm_store_ss( (float*)&pDestination[2], T2 ); + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreInt3A +( + UINT* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 0xF) == 0); + + pDestination[0] = V.vector4_u32[0]; + pDestination[1] = V.vector4_u32[1]; + pDestination[2] = V.vector4_u32[2]; + +#elif defined(_XM_SSE_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 0xF) == 0); + + XMVECTOR T = _mm_shuffle_ps(V,V,_MM_SHUFFLE(2,2,2,2)); + _mm_storel_epi64( (__m128i*)pDestination, reinterpret_cast(&V)[0] ); + _mm_store_ss( (float*)&pDestination[2], T ); + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreFloat3 +( + XMFLOAT3* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 3) == 0); + + pDestination->x = V.vector4_f32[0]; + pDestination->y = V.vector4_f32[1]; + pDestination->z = V.vector4_f32[2]; + +#elif defined(_XM_SSE_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 3) == 0); + + XMVECTOR T1 = _mm_shuffle_ps(V,V,_MM_SHUFFLE(1,1,1,1)); + XMVECTOR T2 = _mm_shuffle_ps(V,V,_MM_SHUFFLE(2,2,2,2)); + _mm_store_ss( &pDestination->x, V ); + _mm_store_ss( &pDestination->y, T1 ); + _mm_store_ss( &pDestination->z, T2 ); + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreFloat3A +( + XMFLOAT3A* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 0xF) == 0); + + pDestination->x = V.vector4_f32[0]; + pDestination->y = V.vector4_f32[1]; + pDestination->z = V.vector4_f32[2]; + +#elif defined(_XM_SSE_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 0xF) == 0); + + XMVECTOR T = _mm_shuffle_ps(V,V,_MM_SHUFFLE(2,2,2,2)); + _mm_storel_epi64( (__m128i*)pDestination, reinterpret_cast(&V)[0] ); + _mm_store_ss( &pDestination->z, T ); + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreUHenDN3 +( + XMUHENDN3* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTORF32 Scale = {2047.0f, 2047.0f, 1023.0f, 0.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, XMVectorZero(), g_XMOne.v); + N = XMVectorMultiply(N, Scale.v); + + pDestination->v = (((UINT)N.vector4_f32[2] & 0x3FF) << 22) | + (((UINT)N.vector4_f32[1] & 0x7FF) << 11) | + (((UINT)N.vector4_f32[0] & 0x7FF)); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static const XMVECTORF32 ScaleUHenDN3 = {2047.0f, 2047.0f*2048.0f,1023.0f*(2048.0f*2048.0f)/2.0f,1.0f}; + static const XMVECTORI32 MaskUHenDN3 = {0x7FF,0x7FF<<11,0x3FF<<(22-1),0}; + // Clamp to bounds + XMVECTOR vResult = _mm_max_ps(V,g_XMZero); + vResult = _mm_min_ps(vResult,g_XMOne); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleUHenDN3); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,MaskUHenDN3); + // Do a horizontal or of 3 entries + __m128i vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(0,3,2,1)); + // i = x|y + vResulti = _mm_or_si128(vResulti,vResulti2); + // Move Z to the x position + vResulti2 = _mm_shuffle_epi32(vResulti2,_MM_SHUFFLE(0,3,2,1)); + // Add Z to itself to perform a single bit left shift + vResulti2 = _mm_add_epi32(vResulti2,vResulti2); + // i = x|y|z + vResulti = _mm_or_si128(vResulti,vResulti2); + _mm_store_ss(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreUHenD3 +( + XMUHEND3* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTOR Max = {2047.0f, 2047.0f, 1023.0f, 0.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, XMVectorZero(), Max); + + pDestination->v = (((UINT)N.vector4_f32[2] & 0x3FF) << 22) | + (((UINT)N.vector4_f32[1] & 0x7FF) << 11) | + (((UINT)N.vector4_f32[0] & 0x7FF)); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static const XMVECTORF32 MaxUHenD3 = { 2047.0f, 2047.0f, 1023.0f, 1.0f}; + static const XMVECTORF32 ScaleUHenD3 = {1.0f, 2048.0f,(2048.0f*2048.0f)/2.0f,1.0f}; + static const XMVECTORI32 MaskUHenD3 = {0x7FF,0x7FF<<11,0x3FF<<(22-1),0}; + // Clamp to bounds + XMVECTOR vResult = _mm_max_ps(V,g_XMZero); + vResult = _mm_min_ps(vResult,MaxUHenD3); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleUHenD3); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,MaskUHenD3); + // Do a horizontal or of 3 entries + __m128i vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(0,3,2,1)); + // i = x|y + vResulti = _mm_or_si128(vResulti,vResulti2); + // Move Z to the x position + vResulti2 = _mm_shuffle_epi32(vResulti2,_MM_SHUFFLE(0,3,2,1)); + // Add Z to itself to perform a single bit left shift + vResulti2 = _mm_add_epi32(vResulti2,vResulti2); + // i = x|y|z + vResulti = _mm_or_si128(vResulti,vResulti2); + _mm_store_ss(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreHenDN3 +( + XMHENDN3* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTORF32 Scale = {1023.0f, 1023.0f, 511.0f, 1.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, g_XMNegativeOne.v, g_XMOne.v); + N = XMVectorMultiply(N, Scale.v); + + pDestination->v = (((INT)N.vector4_f32[2] & 0x3FF) << 22) | + (((INT)N.vector4_f32[1] & 0x7FF) << 11) | + (((INT)N.vector4_f32[0] & 0x7FF)); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static const XMVECTORF32 ScaleHenDN3 = {1023.0f, 1023.0f*2048.0f,511.0f*(2048.0f*2048.0f),1.0f}; + // Clamp to bounds + XMVECTOR vResult = _mm_max_ps(V,g_XMNegativeOne); + vResult = _mm_min_ps(vResult,g_XMOne); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleHenDN3); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,g_XMMaskHenD3); + // Do a horizontal or of all 4 entries + vResult = _mm_shuffle_ps(reinterpret_cast(&vResulti)[0],reinterpret_cast(&vResulti)[0],_MM_SHUFFLE(0,3,2,1)); + vResulti = _mm_or_si128(vResulti,reinterpret_cast(&vResult)[0]); + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(0,3,2,1)); + vResulti = _mm_or_si128(vResulti,reinterpret_cast(&vResult)[0]); + _mm_store_ss(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreHenD3 +( + XMHEND3* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTOR Min = {-1023.0f, -1023.0f, -511.0f, -1.0f}; + static CONST XMVECTOR Max = {1023.0f, 1023.0f, 511.0f, 1.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, Min, Max); + + pDestination->v = (((INT)N.vector4_f32[2] & 0x3FF) << 22) | + (((INT)N.vector4_f32[1] & 0x7FF) << 11) | + (((INT)N.vector4_f32[0] & 0x7FF)); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static const XMVECTORF32 MinHenD3 = {-1023.0f,-1023.0f,-511.0f,-1.0f}; + static const XMVECTORF32 MaxHenD3 = { 1023.0f, 1023.0f, 511.0f, 1.0f}; + static const XMVECTORF32 ScaleHenD3 = {1.0f, 2048.0f,(2048.0f*2048.0f),1.0f}; + // Clamp to bounds + XMVECTOR vResult = _mm_max_ps(V,MinHenD3); + vResult = _mm_min_ps(vResult,MaxHenD3); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleHenD3); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,g_XMMaskHenD3); + // Do a horizontal or of all 4 entries + vResult = _mm_shuffle_ps(reinterpret_cast(&vResulti)[0],reinterpret_cast(&vResulti)[0],_MM_SHUFFLE(0,3,2,1)); + vResulti = _mm_or_si128(vResulti,reinterpret_cast(&vResult)[0]); + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(0,3,2,1)); + vResulti = _mm_or_si128(vResulti,reinterpret_cast(&vResult)[0]); + _mm_store_ss(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreUDHenN3 +( + XMUDHENN3* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTORF32 Scale = {1023.0f, 2047.0f, 2047.0f, 0.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, XMVectorZero(), g_XMOne.v); + N = XMVectorMultiply(N, Scale.v); + + pDestination->v = (((UINT)N.vector4_f32[2] & 0x7FF) << 21) | + (((UINT)N.vector4_f32[1] & 0x7FF) << 10) | + (((UINT)N.vector4_f32[0] & 0x3FF)); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static const XMVECTORF32 ScaleUDHenN3 = {1023.0f,2047.0f*1024.0f,2047.0f*(1024.0f*2048.0f)/2.0f,1.0f}; + static const XMVECTORI32 MaskUDHenN3 = {0x3FF,0x7FF<<10,0x7FF<<(21-1),0}; + // Clamp to bounds + XMVECTOR vResult = _mm_max_ps(V,g_XMZero); + vResult = _mm_min_ps(vResult,g_XMOne); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleUDHenN3); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,MaskUDHenN3); + // Do a horizontal or of 3 entries + __m128i vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(0,3,2,1)); + // i = x|y + vResulti = _mm_or_si128(vResulti,vResulti2); + // Move Z to the x position + vResulti2 = _mm_shuffle_epi32(vResulti2,_MM_SHUFFLE(0,3,2,1)); + // Add Z to itself to perform a single bit left shift + vResulti2 = _mm_add_epi32(vResulti2,vResulti2); + // i = x|y|z + vResulti = _mm_or_si128(vResulti,vResulti2); + _mm_store_ss(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreUDHen3 +( + XMUDHEN3* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTOR Max = {1023.0f, 2047.0f, 2047.0f, 0.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, XMVectorZero(), Max); + + pDestination->v = (((UINT)N.vector4_f32[2] & 0x7FF) << 21) | + (((UINT)N.vector4_f32[1] & 0x7FF) << 10) | + (((UINT)N.vector4_f32[0] & 0x3FF)); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static const XMVECTORF32 MaxUDHen3 = { 1023.0f, 2047.0f, 2047.0f, 1.0f}; + static const XMVECTORF32 ScaleUDHen3 = {1.0f, 1024.0f,(1024.0f*2048.0f)/2.0f,1.0f}; + static const XMVECTORI32 MaskUDHen3 = {0x3FF,0x7FF<<10,0x7FF<<(21-1),0}; + // Clamp to bounds + XMVECTOR vResult = _mm_max_ps(V,g_XMZero); + vResult = _mm_min_ps(vResult,MaxUDHen3); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleUDHen3); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,MaskUDHen3); + // Do a horizontal or of 3 entries + __m128i vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(0,3,2,1)); + // i = x|y + vResulti = _mm_or_si128(vResulti,vResulti2); + // Move Z to the x position + vResulti2 = _mm_shuffle_epi32(vResulti2,_MM_SHUFFLE(0,3,2,1)); + // Add Z to itself to perform a single bit left shift + vResulti2 = _mm_add_epi32(vResulti2,vResulti2); + // i = x|y|z + vResulti = _mm_or_si128(vResulti,vResulti2); + _mm_store_ss(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreDHenN3 +( + XMDHENN3* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTORF32 Scale = {511.0f, 1023.0f, 1023.0f, 1.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, g_XMNegativeOne.v, g_XMOne.v); + N = XMVectorMultiply(N, Scale.v); + + pDestination->v = (((INT)N.vector4_f32[2] & 0x7FF) << 21) | + (((INT)N.vector4_f32[1] & 0x7FF) << 10) | + (((INT)N.vector4_f32[0] & 0x3FF)); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static const XMVECTORF32 ScaleDHenN3 = {511.0f, 1023.0f*1024.0f,1023.0f*(1024.0f*2048.0f),1.0f}; + // Clamp to bounds + XMVECTOR vResult = _mm_max_ps(V,g_XMNegativeOne); + vResult = _mm_min_ps(vResult,g_XMOne); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleDHenN3); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,g_XMMaskDHen3); + // Do a horizontal or of all 4 entries + vResult = _mm_shuffle_ps(reinterpret_cast(&vResulti)[0],reinterpret_cast(&vResulti)[0],_MM_SHUFFLE(0,3,2,1)); + vResulti = _mm_or_si128(vResulti,reinterpret_cast(&vResult)[0]); + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(0,3,2,1)); + vResulti = _mm_or_si128(vResulti,reinterpret_cast(&vResult)[0]); + _mm_store_ss(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreDHen3 +( + XMDHEN3* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTOR Min = {-511.0f, -1023.0f, -1023.0f, -1.0f}; + static CONST XMVECTOR Max = {511.0f, 1023.0f, 1023.0f, 1.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, Min, Max); + + pDestination->v = (((INT)N.vector4_f32[2] & 0x7FF) << 21) | + (((INT)N.vector4_f32[1] & 0x7FF) << 10) | + (((INT)N.vector4_f32[0] & 0x3FF)); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static const XMVECTORF32 MinDHen3 = {-511.0f,-1023.0f,-1023.0f,-1.0f}; + static const XMVECTORF32 MaxDHen3 = { 511.0f, 1023.0f, 1023.0f, 1.0f}; + static const XMVECTORF32 ScaleDHen3 = {1.0f, 1024.0f,(1024.0f*2048.0f),1.0f}; + // Clamp to bounds + XMVECTOR vResult = _mm_max_ps(V,MinDHen3); + vResult = _mm_min_ps(vResult,MaxDHen3); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleDHen3); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,g_XMMaskDHen3); + // Do a horizontal or of all 4 entries + vResult = _mm_shuffle_ps(reinterpret_cast(&vResulti)[0],reinterpret_cast(&vResulti)[0],_MM_SHUFFLE(0,3,2,1)); + vResulti = _mm_or_si128(vResulti,reinterpret_cast(&vResult)[0]); + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(0,3,2,1)); + vResulti = _mm_or_si128(vResulti,reinterpret_cast(&vResult)[0]); + _mm_store_ss(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreU565 +( + XMU565* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_SSE_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) + XMASSERT(pDestination); + static CONST XMVECTORF32 Max = {31.0f, 63.0f, 31.0f, 0.0f}; + // Bounds check + XMVECTOR vResult = _mm_max_ps(V,g_XMZero); + vResult = _mm_min_ps(vResult,Max); + // Convert to int with rounding + __m128i vInt = _mm_cvtps_epi32(vResult); + // No SSE operations will write to 16-bit values, so we have to extract them manually + USHORT x = static_cast(_mm_extract_epi16(vInt,0)); + USHORT y = static_cast(_mm_extract_epi16(vInt,2)); + USHORT z = static_cast(_mm_extract_epi16(vInt,4)); + pDestination->v = ((z & 0x1F) << 11) | + ((y & 0x3F) << 5) | + ((x & 0x1F)); +#else + XMVECTOR N; + static CONST XMVECTORF32 Max = {31.0f, 63.0f, 31.0f, 0.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, XMVectorZero(), Max.v); + N = XMVectorRound(N); + + pDestination->v = (((USHORT)N.vector4_f32[2] & 0x1F) << 11) | + (((USHORT)N.vector4_f32[1] & 0x3F) << 5) | + (((USHORT)N.vector4_f32[0] & 0x1F)); +#endif !_XM_SSE_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreFloat3PK +( + XMFLOAT3PK* pDestination, + FXMVECTOR V +) +{ + _DECLSPEC_ALIGN_16_ UINT IValue[4]; + UINT I, Sign, j; + UINT Result[3]; + + XMASSERT(pDestination); + + XMStoreFloat3A( (XMFLOAT3A*)&IValue, V ); + + // X & Y Channels (5-bit exponent, 6-bit mantissa) + for(j=0; j < 2; ++j) + { + Sign = IValue[j] & 0x80000000; + I = IValue[j] & 0x7FFFFFFF; + + if ((I & 0x7F800000) == 0x7F800000) + { + // INF or NAN + Result[j] = 0x7c0; + if (( I & 0x7FFFFF ) != 0) + { + Result[j] = 0x7c0 | (((I>>17)|(I>11)|(I>>6)|(I))&0x3f); + } + else if ( Sign ) + { + // -INF is clamped to 0 since 3PK is positive only + Result[j] = 0; + } + } + else if ( Sign ) + { + // 3PK is positive only, so clamp to zero + Result[j] = 0; + } + else if (I > 0x477E0000U) + { + // The number is too large to be represented as a float11, set to max + Result[j] = 0x7BF; + } + else + { + if (I < 0x38800000U) + { + // The number is too small to be represented as a normalized float11 + // Convert it to a denormalized value. + UINT Shift = 113U - (I >> 23U); + I = (0x800000U | (I & 0x7FFFFFU)) >> Shift; + } + else + { + // Rebias the exponent to represent the value as a normalized float11 + I += 0xC8000000U; + } + + Result[j] = ((I + 0xFFFFU + ((I >> 17U) & 1U)) >> 17U)&0x7ffU; + } + } + + // Z Channel (5-bit exponent, 5-bit mantissa) + Sign = IValue[2] & 0x80000000; + I = IValue[2] & 0x7FFFFFFF; + + if ((I & 0x7F800000) == 0x7F800000) + { + // INF or NAN + Result[2] = 0x3e0; + if ( I & 0x7FFFFF ) + { + Result[2] = 0x3e0 | (((I>>18)|(I>13)|(I>>3)|(I))&0x1f); + } + else if ( Sign ) + { + // -INF is clamped to 0 since 3PK is positive only + Result[2] = 0; + } + } + else if ( Sign ) + { + // 3PK is positive only, so clamp to zero + Result[2] = 0; + } + else if (I > 0x477C0000U) + { + // The number is too large to be represented as a float10, set to max + Result[2] = 0x3df; + } + else + { + if (I < 0x38800000U) + { + // The number is too small to be represented as a normalized float10 + // Convert it to a denormalized value. + UINT Shift = 113U - (I >> 23U); + I = (0x800000U | (I & 0x7FFFFFU)) >> Shift; + } + else + { + // Rebias the exponent to represent the value as a normalized float10 + I += 0xC8000000U; + } + + Result[2] = ((I + 0x1FFFFU + ((I >> 18U) & 1U)) >> 18U)&0x3ffU; + } + + // Pack Result into memory + pDestination->v = (Result[0] & 0x7ff) + | ( (Result[1] & 0x7ff) << 11 ) + | ( (Result[2] & 0x3ff) << 22 ); +} + + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreFloat3SE +( + XMFLOAT3SE* pDestination, + FXMVECTOR V +) +{ + _DECLSPEC_ALIGN_16_ UINT IValue[4]; + UINT I, Sign, j, T; + UINT Frac[3]; + UINT Exp[3]; + + + XMASSERT(pDestination); + + XMStoreFloat3A( (XMFLOAT3A*)&IValue, V ); + + // X, Y, Z Channels (5-bit exponent, 9-bit mantissa) + for(j=0; j < 3; ++j) + { + Sign = IValue[j] & 0x80000000; + I = IValue[j] & 0x7FFFFFFF; + + if ((I & 0x7F800000) == 0x7F800000) + { + // INF or NAN + Exp[j] = 0x1f; + if (( I & 0x7FFFFF ) != 0) + { + Frac[j] = ((I>>14)|(I>5)|(I))&0x1ff; + } + else if ( Sign ) + { + // -INF is clamped to 0 since 3SE is positive only + Exp[j] = Frac[j] = 0; + } + } + else if ( Sign ) + { + // 3SE is positive only, so clamp to zero + Exp[j] = Frac[j] = 0; + } + else if (I > 0x477FC000U) + { + // The number is too large, set to max + Exp[j] = 0x1e; + Frac[j] = 0x1ff; + } + else + { + if (I < 0x38800000U) + { + // The number is too small to be represented as a normalized float11 + // Convert it to a denormalized value. + UINT Shift = 113U - (I >> 23U); + I = (0x800000U | (I & 0x7FFFFFU)) >> Shift; + } + else + { + // Rebias the exponent to represent the value as a normalized float11 + I += 0xC8000000U; + } + + T = ((I + 0x1FFFU + ((I >> 14U) & 1U)) >> 14U)&0x3fffU; + + Exp[j] = (T & 0x3E00) >> 9; + Frac[j] = T & 0x1ff; + } + } + + // Adjust to a shared exponent + T = XMMax( Exp[0], XMMax( Exp[1], Exp[2] ) ); + + Frac[0] = Frac[0] >> (T - Exp[0]); + Frac[1] = Frac[1] >> (T - Exp[1]); + Frac[2] = Frac[2] >> (T - Exp[2]); + + // Store packed into memory + pDestination->xm = Frac[0]; + pDestination->ym = Frac[1]; + pDestination->zm = Frac[2]; + pDestination->e = T; +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreInt4 +( + UINT* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + + pDestination[0] = V.vector4_u32[0]; + pDestination[1] = V.vector4_u32[1]; + pDestination[2] = V.vector4_u32[2]; + pDestination[3] = V.vector4_u32[3]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + + _mm_storeu_si128( (__m128i*)pDestination, reinterpret_cast(&V)[0] ); + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreInt4A +( + UINT* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 0xF) == 0); + + pDestination[0] = V.vector4_u32[0]; + pDestination[1] = V.vector4_u32[1]; + pDestination[2] = V.vector4_u32[2]; + pDestination[3] = V.vector4_u32[3]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 0xF) == 0); + + _mm_store_si128( (__m128i*)pDestination, reinterpret_cast(&V)[0] ); + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreInt4NC +( + UINT* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 3) == 0); + + pDestination[0] = V.vector4_u32[0]; + pDestination[1] = V.vector4_u32[1]; + pDestination[2] = V.vector4_u32[2]; + pDestination[3] = V.vector4_u32[3]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 3) == 0); + + _mm_storeu_si128( (__m128i*)pDestination, reinterpret_cast(&V)[0] ); + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreFloat4 +( + XMFLOAT4* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + + pDestination->x = V.vector4_f32[0]; + pDestination->y = V.vector4_f32[1]; + pDestination->z = V.vector4_f32[2]; + pDestination->w = V.vector4_f32[3]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + + _mm_storeu_ps( &pDestination->x, V ); + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreFloat4A +( + XMFLOAT4A* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 0xF) == 0); + + pDestination->x = V.vector4_f32[0]; + pDestination->y = V.vector4_f32[1]; + pDestination->z = V.vector4_f32[2]; + pDestination->w = V.vector4_f32[3]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 0xF) == 0); + + _mm_store_ps( &pDestination->x, V ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreFloat4NC +( + XMFLOAT4* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 3) == 0); + + pDestination->x = V.vector4_f32[0]; + pDestination->y = V.vector4_f32[1]; + pDestination->z = V.vector4_f32[2]; + pDestination->w = V.vector4_f32[3]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 3) == 0); + + _mm_storeu_ps( &pDestination->x, V ); + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreHalf4 +( + XMHALF4* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + + pDestination->x = XMConvertFloatToHalf(V.vector4_f32[0]); + pDestination->y = XMConvertFloatToHalf(V.vector4_f32[1]); + pDestination->z = XMConvertFloatToHalf(V.vector4_f32[2]); + pDestination->w = XMConvertFloatToHalf(V.vector4_f32[3]); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + pDestination->x = XMConvertFloatToHalf(XMVectorGetX(V)); + pDestination->y = XMConvertFloatToHalf(XMVectorGetY(V)); + pDestination->z = XMConvertFloatToHalf(XMVectorGetZ(V)); + pDestination->w = XMConvertFloatToHalf(XMVectorGetW(V)); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreShortN4 +( + XMSHORTN4* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTORF32 Scale = {32767.0f, 32767.0f, 32767.0f, 32767.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, g_XMNegativeOne.v, g_XMOne.v); + N = XMVectorMultiply(N, Scale.v); + N = XMVectorRound(N); + + pDestination->x = (SHORT)N.vector4_f32[0]; + pDestination->y = (SHORT)N.vector4_f32[1]; + pDestination->z = (SHORT)N.vector4_f32[2]; + pDestination->w = (SHORT)N.vector4_f32[3]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static CONST XMVECTORF32 Scale = {32767.0f, 32767.0f, 32767.0f, 32767.0f}; + + XMVECTOR vResult = _mm_max_ps(V,g_XMNegativeOne); + vResult = _mm_min_ps(vResult,g_XMOne); + vResult = _mm_mul_ps(vResult,Scale); + __m128i vResulti = _mm_cvtps_epi32(vResult); + vResulti = _mm_packs_epi32(vResulti,vResulti); + _mm_store_sd(reinterpret_cast(&pDestination->x),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreShort4 +( + XMSHORT4* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTOR Min = {-32767.0f, -32767.0f, -32767.0f, -32767.0f}; + static CONST XMVECTOR Max = {32767.0f, 32767.0f, 32767.0f, 32767.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, Min, Max); + N = XMVectorRound(N); + + pDestination->x = (SHORT)N.vector4_f32[0]; + pDestination->y = (SHORT)N.vector4_f32[1]; + pDestination->z = (SHORT)N.vector4_f32[2]; + pDestination->w = (SHORT)N.vector4_f32[3]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static CONST XMVECTORF32 Min = {-32767.0f, -32767.0f, -32767.0f, -32767.0f}; + static CONST XMVECTORF32 Max = {32767.0f, 32767.0f, 32767.0f, 32767.0f}; + // Bounds check + XMVECTOR vResult = _mm_max_ps(V,Min); + vResult = _mm_min_ps(vResult,Max); + // Convert to int with rounding + __m128i vInt = _mm_cvtps_epi32(vResult); + // Pack the ints into shorts + vInt = _mm_packs_epi32(vInt,vInt); + _mm_store_sd(reinterpret_cast(&pDestination->x),reinterpret_cast(&vInt)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreUShortN4 +( + XMUSHORTN4* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTORF32 Scale = {65535.0f, 65535.0f, 65535.0f, 65535.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, XMVectorZero(), g_XMOne.v); + N = XMVectorMultiplyAdd(N, Scale.v, g_XMOneHalf.v); + N = XMVectorTruncate(N); + + pDestination->x = (SHORT)N.vector4_f32[0]; + pDestination->y = (SHORT)N.vector4_f32[1]; + pDestination->z = (SHORT)N.vector4_f32[2]; + pDestination->w = (SHORT)N.vector4_f32[3]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static CONST XMVECTORF32 Scale = {65535.0f, 65535.0f, 65535.0f, 65535.0f}; + // Bounds check + XMVECTOR vResult = _mm_max_ps(V,g_XMZero); + vResult = _mm_min_ps(vResult,g_XMOne); + vResult = _mm_mul_ps(vResult,Scale); + // Convert to int with rounding + __m128i vInt = _mm_cvtps_epi32(vResult); + // Since the SSE pack instruction clamps using signed rules, + // manually extract the values to store them to memory + pDestination->x = static_cast(_mm_extract_epi16(vInt,0)); + pDestination->y = static_cast(_mm_extract_epi16(vInt,2)); + pDestination->z = static_cast(_mm_extract_epi16(vInt,4)); + pDestination->w = static_cast(_mm_extract_epi16(vInt,6)); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreUShort4 +( + XMUSHORT4* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTOR Max = {65535.0f, 65535.0f, 65535.0f, 65535.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, XMVectorZero(), Max); + N = XMVectorRound(N); + + pDestination->x = (SHORT)N.vector4_f32[0]; + pDestination->y = (SHORT)N.vector4_f32[1]; + pDestination->z = (SHORT)N.vector4_f32[2]; + pDestination->w = (SHORT)N.vector4_f32[3]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static CONST XMVECTORF32 Max = {65535.0f, 65535.0f, 65535.0f, 65535.0f}; + // Bounds check + XMVECTOR vResult = _mm_max_ps(V,g_XMZero); + vResult = _mm_min_ps(vResult,Max); + // Convert to int with rounding + __m128i vInt = _mm_cvtps_epi32(vResult); + // Since the SSE pack instruction clamps using signed rules, + // manually extract the values to store them to memory + pDestination->x = static_cast(_mm_extract_epi16(vInt,0)); + pDestination->y = static_cast(_mm_extract_epi16(vInt,2)); + pDestination->z = static_cast(_mm_extract_epi16(vInt,4)); + pDestination->w = static_cast(_mm_extract_epi16(vInt,6)); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreXIcoN4 +( + XMXICON4* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTORF32 Min = {-1.0f, -1.0f, -1.0f, 0.0f}; + static CONST XMVECTORF32 Scale = {524287.0f, 524287.0f, 524287.0f, 15.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, Min.v, g_XMOne.v); + N = XMVectorMultiply(N, Scale.v); + N = XMVectorRound(N); + + pDestination->v = ((UINT64)N.vector4_f32[3] << 60) | + (((INT64)N.vector4_f32[2] & 0xFFFFF) << 40) | + (((INT64)N.vector4_f32[1] & 0xFFFFF) << 20) | + (((INT64)N.vector4_f32[0] & 0xFFFFF)); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + // Note: Masks are x,w,y and z + static const XMVECTORF32 MinXIcoN4 = {-1.0f, 0.0f,-1.0f,-1.0f}; + static const XMVECTORF32 ScaleXIcoN4 = {524287.0f,15.0f*4096.0f*65536.0f*0.5f,524287.0f*4096.0f,524287.0f}; + static const XMVECTORI32 MaskXIcoN4 = {0xFFFFF,0xF<<((60-32)-1),0xFFFFF000,0xFFFFF}; + + // Clamp to bounds + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(2,1,3,0)); + vResult = _mm_max_ps(vResult,MinXIcoN4); + vResult = _mm_min_ps(vResult,g_XMOne); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleXIcoN4); + // Convert to integer (w is unsigned) + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Mask off unused bits + vResulti = _mm_and_si128(vResulti,MaskXIcoN4); + // Isolate Y + __m128i vResulti2 = _mm_and_si128(vResulti,g_XMMaskY); + // Double Y (Really W) to fixup for unsigned conversion + vResulti = _mm_add_epi32(vResulti,vResulti2); + // Shift y and z to straddle the 32-bit boundary + vResulti2 = _mm_srli_si128(vResulti,(64+12)/8); + // Shift it into place + vResulti2 = _mm_slli_si128(vResulti2,20/8); + // i = x|y<<20|z<<40|w<<60 + vResulti = _mm_or_si128(vResulti,vResulti2); + _mm_store_sd(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreXIco4 +( + XMXICO4* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTORF32 Min = {-524287.0f, -524287.0f, -524287.0f, 0.0f}; + static CONST XMVECTORF32 Max = {524287.0f, 524287.0f, 524287.0f, 15.0f}; + + XMASSERT(pDestination); + N = XMVectorClamp(V, Min.v, Max.v); + pDestination->v = ((UINT64)N.vector4_f32[3] << 60) | + (((INT64)N.vector4_f32[2] & 0xFFFFF) << 40) | + (((INT64)N.vector4_f32[1] & 0xFFFFF) << 20) | + (((INT64)N.vector4_f32[0] & 0xFFFFF)); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + // Note: Masks are x,w,y and z + static const XMVECTORF32 MinXIco4 = {-524287.0f, 0.0f,-524287.0f,-524287.0f}; + static const XMVECTORF32 MaxXIco4 = { 524287.0f,15.0f, 524287.0f, 524287.0f}; + static const XMVECTORF32 ScaleXIco4 = {1.0f,4096.0f*65536.0f*0.5f,4096.0f,1.0f}; + static const XMVECTORI32 MaskXIco4 = {0xFFFFF,0xF<<((60-1)-32),0xFFFFF000,0xFFFFF}; + // Clamp to bounds + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(2,1,3,0)); + vResult = _mm_max_ps(vResult,MinXIco4); + vResult = _mm_min_ps(vResult,MaxXIco4); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleXIco4); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,MaskXIco4); + // Isolate Y + __m128i vResulti2 = _mm_and_si128(vResulti,g_XMMaskY); + // Double Y (Really W) to fixup for unsigned conversion + vResulti = _mm_add_epi32(vResulti,vResulti2); + // Shift y and z to straddle the 32-bit boundary + vResulti2 = _mm_srli_si128(vResulti,(64+12)/8); + // Shift it into place + vResulti2 = _mm_slli_si128(vResulti2,20/8); + // i = x|y<<20|z<<40|w<<60 + vResulti = _mm_or_si128(vResulti,vResulti2); + _mm_store_sd(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreUIcoN4 +( + XMUICON4* pDestination, + FXMVECTOR V +) +{ + #define XM_URange ((FLOAT)(1 << 20)) + #define XM_URangeDiv2 ((FLOAT)(1 << 19)) + #define XM_UMaxXYZ ((FLOAT)((1 << 20) - 1)) + #define XM_UMaxW ((FLOAT)((1 << 4) - 1)) + #define XM_ScaleXYZ (-(FLOAT)((1 << 20) - 1) / XM_PACK_FACTOR) + #define XM_ScaleW (-(FLOAT)((1 << 4) - 1) / XM_PACK_FACTOR) + #define XM_Scale (-1.0f / XM_PACK_FACTOR) + #define XM_Offset (3.0f) + +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTORF32 Scale = {1048575.0f, 1048575.0f, 1048575.0f, 15.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, XMVectorZero(), g_XMOne.v); + N = XMVectorMultiplyAdd(N, Scale.v, g_XMOneHalf.v); + + pDestination->v = ((UINT64)N.vector4_f32[3] << 60) | + (((UINT64)N.vector4_f32[2] & 0xFFFFF) << 40) | + (((UINT64)N.vector4_f32[1] & 0xFFFFF) << 20) | + (((UINT64)N.vector4_f32[0] & 0xFFFFF)); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + // Note: Masks are x,w,y and z + static const XMVECTORF32 ScaleUIcoN4 = {1048575.0f,15.0f*4096.0f*65536.0f,1048575.0f*4096.0f,1048575.0f}; + static const XMVECTORI32 MaskUIcoN4 = {0xFFFFF,0xF<<(60-32),0xFFFFF000,0xFFFFF}; + static const XMVECTORF32 AddUIcoN4 = {0.0f,-32768.0f*65536.0f,-32768.0f*65536.0f,0.0f}; + // Clamp to bounds + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(2,1,3,0)); + vResult = _mm_max_ps(vResult,g_XMZero); + vResult = _mm_min_ps(vResult,g_XMOne); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleUIcoN4); + // Adjust for unsigned entries + vResult = _mm_add_ps(vResult,AddUIcoN4); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Fix the signs on the unsigned entries + vResulti = _mm_xor_si128(vResulti,g_XMFlipYZ); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,MaskUIcoN4); + // Shift y and z to straddle the 32-bit boundary + __m128i vResulti2 = _mm_srli_si128(vResulti,(64+12)/8); + // Shift it into place + vResulti2 = _mm_slli_si128(vResulti2,20/8); + // i = x|y<<20|z<<40|w<<60 + vResulti = _mm_or_si128(vResulti,vResulti2); + _mm_store_sd(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ + + #undef XM_URange + #undef XM_URangeDiv2 + #undef XM_UMaxXYZ + #undef XM_UMaxW + #undef XM_ScaleXYZ + #undef XM_ScaleW + #undef XM_Scale + #undef XM_Offset +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreUIco4 +( + XMUICO4* pDestination, + FXMVECTOR V +) +{ + #define XM_Scale (-1.0f / XM_PACK_FACTOR) + #define XM_URange ((FLOAT)(1 << 20)) + #define XM_URangeDiv2 ((FLOAT)(1 << 19)) + +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTOR Max = {1048575.0f, 1048575.0f, 1048575.0f, 15.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, XMVectorZero(), Max); + N = XMVectorRound(N); + + pDestination->v = ((UINT64)N.vector4_f32[3] << 60) | + (((UINT64)N.vector4_f32[2] & 0xFFFFF) << 40) | + (((UINT64)N.vector4_f32[1] & 0xFFFFF) << 20) | + (((UINT64)N.vector4_f32[0] & 0xFFFFF)); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + // Note: Masks are x,w,y and z + static const XMVECTORF32 MaxUIco4 = { 1048575.0f, 15.0f, 1048575.0f, 1048575.0f}; + static const XMVECTORF32 ScaleUIco4 = {1.0f,4096.0f*65536.0f,4096.0f,1.0f}; + static const XMVECTORI32 MaskUIco4 = {0xFFFFF,0xF<<(60-32),0xFFFFF000,0xFFFFF}; + static const XMVECTORF32 AddUIco4 = {0.0f,-32768.0f*65536.0f,-32768.0f*65536.0f,0.0f}; + // Clamp to bounds + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(2,1,3,0)); + vResult = _mm_max_ps(vResult,g_XMZero); + vResult = _mm_min_ps(vResult,MaxUIco4); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleUIco4); + vResult = _mm_add_ps(vResult,AddUIco4); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + vResulti = _mm_xor_si128(vResulti,g_XMFlipYZ); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,MaskUIco4); + // Shift y and z to straddle the 32-bit boundary + __m128i vResulti2 = _mm_srli_si128(vResulti,(64+12)/8); + // Shift it into place + vResulti2 = _mm_slli_si128(vResulti2,20/8); + // i = x|y<<20|z<<40|w<<60 + vResulti = _mm_or_si128(vResulti,vResulti2); + _mm_store_sd(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ + + #undef XM_Scale + #undef XM_URange + #undef XM_URangeDiv2 +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreIcoN4 +( + XMICON4* pDestination, + FXMVECTOR V +) +{ + #define XM_Scale (-1.0f / XM_PACK_FACTOR) + #define XM_URange ((FLOAT)(1 << 4)) + #define XM_Offset (3.0f) + #define XM_UMaxXYZ ((FLOAT)((1 << (20 - 1)) - 1)) + #define XM_UMaxW ((FLOAT)((1 << (4 - 1)) - 1)) + +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTORF32 Scale = {524287.0f, 524287.0f, 524287.0f, 7.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, g_XMNegativeOne.v, g_XMOne.v); + N = XMVectorMultiplyAdd(N, Scale.v, g_XMNegativeZero.v); + N = XMVectorRound(N); + + pDestination->v = ((UINT64)N.vector4_f32[3] << 60) | + (((UINT64)N.vector4_f32[2] & 0xFFFFF) << 40) | + (((UINT64)N.vector4_f32[1] & 0xFFFFF) << 20) | + (((UINT64)N.vector4_f32[0] & 0xFFFFF)); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + // Note: Masks are x,w,y and z + static const XMVECTORF32 ScaleIcoN4 = {524287.0f,7.0f*4096.0f*65536.0f,524287.0f*4096.0f,524287.0f}; + static const XMVECTORI32 MaskIcoN4 = {0xFFFFF,0xF<<(60-32),0xFFFFF000,0xFFFFF}; + // Clamp to bounds + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(2,1,3,0)); + vResult = _mm_max_ps(vResult,g_XMNegativeOne); + vResult = _mm_min_ps(vResult,g_XMOne); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleIcoN4); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,MaskIcoN4); + // Shift y and z to straddle the 32-bit boundary + __m128i vResulti2 = _mm_srli_si128(vResulti,(64+12)/8); + // Shift it into place + vResulti2 = _mm_slli_si128(vResulti2,20/8); + // i = x|y<<20|z<<40|w<<60 + vResulti = _mm_or_si128(vResulti,vResulti2); + _mm_store_sd(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ + + #undef XM_Scale + #undef XM_URange + #undef XM_Offset + #undef XM_UMaxXYZ + #undef XM_UMaxW +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreIco4 +( + XMICO4* pDestination, + FXMVECTOR V +) +{ + #define XM_Scale (-1.0f / XM_PACK_FACTOR) + #define XM_URange ((FLOAT)(1 << 4)) + #define XM_Offset (3.0f) + +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTOR Min = {-524287.0f, -524287.0f, -524287.0f, -7.0f}; + static CONST XMVECTOR Max = {524287.0f, 524287.0f, 524287.0f, 7.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, Min, Max); + N = XMVectorRound(N); + + pDestination->v = ((INT64)N.vector4_f32[3] << 60) | + (((INT64)N.vector4_f32[2] & 0xFFFFF) << 40) | + (((INT64)N.vector4_f32[1] & 0xFFFFF) << 20) | + (((INT64)N.vector4_f32[0] & 0xFFFFF)); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + // Note: Masks are x,w,y and z + static const XMVECTORF32 MinIco4 = {-524287.0f,-7.0f,-524287.0f,-524287.0f}; + static const XMVECTORF32 MaxIco4 = { 524287.0f, 7.0f, 524287.0f, 524287.0f}; + static const XMVECTORF32 ScaleIco4 = {1.0f,4096.0f*65536.0f,4096.0f,1.0f}; + static const XMVECTORI32 MaskIco4 = {0xFFFFF,0xF<<(60-32),0xFFFFF000,0xFFFFF}; + // Clamp to bounds + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(2,1,3,0)); + vResult = _mm_max_ps(vResult,MinIco4); + vResult = _mm_min_ps(vResult,MaxIco4); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleIco4); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,MaskIco4); + // Shift y and z to straddle the 32-bit boundary + __m128i vResulti2 = _mm_srli_si128(vResulti,(64+12)/8); + // Shift it into place + vResulti2 = _mm_slli_si128(vResulti2,20/8); + // i = x|y<<20|z<<40|w<<60 + vResulti = _mm_or_si128(vResulti,vResulti2); + _mm_store_sd(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ + + #undef XM_Scale + #undef XM_URange + #undef XM_Offset +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreXDecN4 +( + XMXDECN4* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTORF32 Min = {-1.0f, -1.0f, -1.0f, 0.0f}; + static CONST XMVECTORF32 Scale = {511.0f, 511.0f, 511.0f, 3.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, Min.v, g_XMOne.v); + N = XMVectorMultiply(N, Scale.v); + N = XMVectorRound(N); + + pDestination->v = ((UINT)N.vector4_f32[3] << 30) | + (((INT)N.vector4_f32[2] & 0x3FF) << 20) | + (((INT)N.vector4_f32[1] & 0x3FF) << 10) | + (((INT)N.vector4_f32[0] & 0x3FF)); + +#elif defined(_XM_SSE_INTRINSICS_) + static const XMVECTORF32 Min = {-1.0f, -1.0f, -1.0f, 0.0f}; + static const XMVECTORF32 Scale = {511.0f, 511.0f*1024.0f, 511.0f*1048576.0f,3.0f*536870912.0f}; + static const XMVECTORI32 ScaleMask = {0x3FF,0x3FF<<10,0x3FF<<20,0x3<<29}; + XMASSERT(pDestination); + XMVECTOR vResult = _mm_max_ps(V,Min); + vResult = _mm_min_ps(vResult,g_XMOne); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,Scale); + // Convert to int (W is unsigned) + __m128i vResulti = _mm_cvtps_epi32(vResult); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,ScaleMask); + // To fix W, add itself to shift it up to <<30 instead of <<29 + __m128i vResultw = _mm_and_si128(vResulti,g_XMMaskW); + vResulti = _mm_add_epi32(vResulti,vResultw); + // Do a horizontal or of all 4 entries + vResult = _mm_shuffle_ps(reinterpret_cast(&vResulti)[0],reinterpret_cast(&vResulti)[0],_MM_SHUFFLE(0,3,2,1)); + vResulti = _mm_or_si128(vResulti,reinterpret_cast(&vResult)[0]); + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(0,3,2,1)); + vResulti = _mm_or_si128(vResulti,reinterpret_cast(&vResult)[0]); + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(0,3,2,1)); + vResulti = _mm_or_si128(vResulti,reinterpret_cast(&vResult)[0]); + _mm_store_ss(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreXDec4 +( + XMXDEC4* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTOR Min = {-511.0f, -511.0f, -511.0f, 0.0f}; + static CONST XMVECTOR Max = {511.0f, 511.0f, 511.0f, 3.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, Min, Max); + + pDestination->v = ((UINT)N.vector4_f32[3] << 30) | + (((INT)N.vector4_f32[2] & 0x3FF) << 20) | + (((INT)N.vector4_f32[1] & 0x3FF) << 10) | + (((INT)N.vector4_f32[0] & 0x3FF)); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static const XMVECTORF32 MinXDec4 = {-511.0f,-511.0f,-511.0f, 0.0f}; + static const XMVECTORF32 MaxXDec4 = { 511.0f, 511.0f, 511.0f, 3.0f}; + static const XMVECTORF32 ScaleXDec4 = {1.0f,1024.0f/2.0f,1024.0f*1024.0f,1024.0f*1024.0f*1024.0f/2.0f}; + static const XMVECTORI32 MaskXDec4= {0x3FF,0x3FF<<(10-1),0x3FF<<20,0x3<<(30-1)}; + // Clamp to bounds + XMVECTOR vResult = _mm_max_ps(V,MinXDec4); + vResult = _mm_min_ps(vResult,MaxXDec4); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleXDec4); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,MaskXDec4); + // Do a horizontal or of 4 entries + __m128i vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(3,2,3,2)); + // x = x|z, y = y|w + vResulti = _mm_or_si128(vResulti,vResulti2); + // Move Z to the x position + vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(1,1,1,1)); + // Perform a single bit left shift on y|w + vResulti2 = _mm_add_epi32(vResulti2,vResulti2); + // i = x|y|z|w + vResulti = _mm_or_si128(vResulti,vResulti2); + _mm_store_ss(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreUDecN4 +( + XMUDECN4* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTORF32 Scale = {1023.0f, 1023.0f, 1023.0f, 3.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, XMVectorZero(), g_XMOne.v); + N = XMVectorMultiply(N, Scale.v); + + pDestination->v = ((UINT)N.vector4_f32[3] << 30) | + (((UINT)N.vector4_f32[2] & 0x3FF) << 20) | + (((UINT)N.vector4_f32[1] & 0x3FF) << 10) | + (((UINT)N.vector4_f32[0] & 0x3FF)); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static const XMVECTORF32 ScaleUDecN4 = {1023.0f,1023.0f*1024.0f*0.5f,1023.0f*1024.0f*1024.0f,3.0f*1024.0f*1024.0f*1024.0f*0.5f}; + static const XMVECTORI32 MaskUDecN4= {0x3FF,0x3FF<<(10-1),0x3FF<<20,0x3<<(30-1)}; + // Clamp to bounds + XMVECTOR vResult = _mm_max_ps(V,g_XMZero); + vResult = _mm_min_ps(vResult,g_XMOne); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleUDecN4); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,MaskUDecN4); + // Do a horizontal or of 4 entries + __m128i vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(3,2,3,2)); + // x = x|z, y = y|w + vResulti = _mm_or_si128(vResulti,vResulti2); + // Move Z to the x position + vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(1,1,1,1)); + // Perform a left shift by one bit on y|w + vResulti2 = _mm_add_epi32(vResulti2,vResulti2); + // i = x|y|z|w + vResulti = _mm_or_si128(vResulti,vResulti2); + _mm_store_ss(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreUDec4 +( + XMUDEC4* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTOR Max = {1023.0f, 1023.0f, 1023.0f, 3.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, XMVectorZero(), Max); + + pDestination->v = ((UINT)N.vector4_f32[3] << 30) | + (((UINT)N.vector4_f32[2] & 0x3FF) << 20) | + (((UINT)N.vector4_f32[1] & 0x3FF) << 10) | + (((UINT)N.vector4_f32[0] & 0x3FF)); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static const XMVECTORF32 MaxUDec4 = { 1023.0f, 1023.0f, 1023.0f, 3.0f}; + static const XMVECTORF32 ScaleUDec4 = {1.0f,1024.0f/2.0f,1024.0f*1024.0f,1024.0f*1024.0f*1024.0f/2.0f}; + static const XMVECTORI32 MaskUDec4= {0x3FF,0x3FF<<(10-1),0x3FF<<20,0x3<<(30-1)}; + // Clamp to bounds + XMVECTOR vResult = _mm_max_ps(V,g_XMZero); + vResult = _mm_min_ps(vResult,MaxUDec4); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleUDec4); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,MaskUDec4); + // Do a horizontal or of 4 entries + __m128i vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(3,2,3,2)); + // x = x|z, y = y|w + vResulti = _mm_or_si128(vResulti,vResulti2); + // Move Z to the x position + vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(1,1,1,1)); + // Perform a left shift by one bit on y|w + vResulti2 = _mm_add_epi32(vResulti2,vResulti2); + // i = x|y|z|w + vResulti = _mm_or_si128(vResulti,vResulti2); + _mm_store_ss(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreDecN4 +( + XMDECN4* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTORF32 Scale = {511.0f, 511.0f, 511.0f, 1.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, g_XMNegativeOne.v, g_XMOne.v); + N = XMVectorMultiply(N, Scale.v); + + pDestination->v = ((INT)N.vector4_f32[3] << 30) | + (((INT)N.vector4_f32[2] & 0x3FF) << 20) | + (((INT)N.vector4_f32[1] & 0x3FF) << 10) | + (((INT)N.vector4_f32[0] & 0x3FF)); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static const XMVECTORF32 ScaleDecN4 = {511.0f,511.0f*1024.0f,511.0f*1024.0f*1024.0f,1.0f*1024.0f*1024.0f*1024.0f}; + static const XMVECTORI32 MaskDecN4= {0x3FF,0x3FF<<10,0x3FF<<20,0x3<<30}; + // Clamp to bounds + XMVECTOR vResult = _mm_max_ps(V,g_XMNegativeOne); + vResult = _mm_min_ps(vResult,g_XMOne); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleDecN4); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,MaskDecN4); + // Do a horizontal or of 4 entries + __m128i vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(3,2,3,2)); + // x = x|z, y = y|w + vResulti = _mm_or_si128(vResulti,vResulti2); + // Move Z to the x position + vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(1,1,1,1)); + // i = x|y|z|w + vResulti = _mm_or_si128(vResulti,vResulti2); + _mm_store_ss(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreDec4 +( + XMDEC4* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTOR Min = {-511.0f, -511.0f, -511.0f, -1.0f}; + static CONST XMVECTOR Max = {511.0f, 511.0f, 511.0f, 1.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, Min, Max); + + pDestination->v = ((INT)N.vector4_f32[3] << 30) | + (((INT)N.vector4_f32[2] & 0x3FF) << 20) | + (((INT)N.vector4_f32[1] & 0x3FF) << 10) | + (((INT)N.vector4_f32[0] & 0x3FF)); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static const XMVECTORF32 MinDec4 = {-511.0f,-511.0f,-511.0f,-1.0f}; + static const XMVECTORF32 MaxDec4 = { 511.0f, 511.0f, 511.0f, 1.0f}; + static const XMVECTORF32 ScaleDec4 = {1.0f,1024.0f,1024.0f*1024.0f,1024.0f*1024.0f*1024.0f}; + static const XMVECTORI32 MaskDec4= {0x3FF,0x3FF<<10,0x3FF<<20,0x3<<30}; + // Clamp to bounds + XMVECTOR vResult = _mm_max_ps(V,MinDec4); + vResult = _mm_min_ps(vResult,MaxDec4); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleDec4); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,MaskDec4); + // Do a horizontal or of 4 entries + __m128i vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(3,2,3,2)); + // x = x|z, y = y|w + vResulti = _mm_or_si128(vResulti,vResulti2); + // Move Z to the x position + vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(1,1,1,1)); + // i = x|y|z|w + vResulti = _mm_or_si128(vResulti,vResulti2); + _mm_store_ss(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreUByteN4 +( + XMUBYTEN4* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTORF32 Scale = {255.0f, 255.0f, 255.0f, 255.0f}; + + XMASSERT(pDestination); + + N = XMVectorSaturate(V); + N = XMVectorMultiply(N, Scale.v); + N = XMVectorRound(N); + + pDestination->x = (BYTE)N.vector4_f32[0]; + pDestination->y = (BYTE)N.vector4_f32[1]; + pDestination->z = (BYTE)N.vector4_f32[2]; + pDestination->w = (BYTE)N.vector4_f32[3]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static const XMVECTORF32 ScaleUByteN4 = {255.0f,255.0f*256.0f*0.5f,255.0f*256.0f*256.0f,255.0f*256.0f*256.0f*256.0f*0.5f}; + static const XMVECTORI32 MaskUByteN4 = {0xFF,0xFF<<(8-1),0xFF<<16,0xFF<<(24-1)}; + // Clamp to bounds + XMVECTOR vResult = _mm_max_ps(V,g_XMZero); + vResult = _mm_min_ps(vResult,g_XMOne); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleUByteN4); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,MaskUByteN4); + // Do a horizontal or of 4 entries + __m128i vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(3,2,3,2)); + // x = x|z, y = y|w + vResulti = _mm_or_si128(vResulti,vResulti2); + // Move Z to the x position + vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(1,1,1,1)); + // Perform a single bit left shift to fix y|w + vResulti2 = _mm_add_epi32(vResulti2,vResulti2); + // i = x|y|z|w + vResulti = _mm_or_si128(vResulti,vResulti2); + _mm_store_ss(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreUByte4 +( + XMUBYTE4* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTOR Max = {255.0f, 255.0f, 255.0f, 255.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, XMVectorZero(), Max); + N = XMVectorRound(N); + + pDestination->x = (BYTE)N.vector4_f32[0]; + pDestination->y = (BYTE)N.vector4_f32[1]; + pDestination->z = (BYTE)N.vector4_f32[2]; + pDestination->w = (BYTE)N.vector4_f32[3]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static const XMVECTORF32 MaxUByte4 = { 255.0f, 255.0f, 255.0f, 255.0f}; + static const XMVECTORF32 ScaleUByte4 = {1.0f,256.0f*0.5f,256.0f*256.0f,256.0f*256.0f*256.0f*0.5f}; + static const XMVECTORI32 MaskUByte4 = {0xFF,0xFF<<(8-1),0xFF<<16,0xFF<<(24-1)}; + // Clamp to bounds + XMVECTOR vResult = _mm_max_ps(V,g_XMZero); + vResult = _mm_min_ps(vResult,MaxUByte4); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleUByte4); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,MaskUByte4); + // Do a horizontal or of 4 entries + __m128i vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(3,2,3,2)); + // x = x|z, y = y|w + vResulti = _mm_or_si128(vResulti,vResulti2); + // Move Z to the x position + vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(1,1,1,1)); + // Perform a single bit left shift to fix y|w + vResulti2 = _mm_add_epi32(vResulti2,vResulti2); + // i = x|y|z|w + vResulti = _mm_or_si128(vResulti,vResulti2); + _mm_store_ss(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreByteN4 +( + XMBYTEN4* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTORF32 Scale = {127.0f, 127.0f, 127.0f, 127.0f}; + + XMASSERT(pDestination); + + N = XMVectorMultiply(V, Scale.v); + N = XMVectorRound(N); + + pDestination->x = (CHAR)N.vector4_f32[0]; + pDestination->y = (CHAR)N.vector4_f32[1]; + pDestination->z = (CHAR)N.vector4_f32[2]; + pDestination->w = (CHAR)N.vector4_f32[3]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static const XMVECTORF32 ScaleByteN4 = {127.0f,127.0f*256.0f,127.0f*256.0f*256.0f,127.0f*256.0f*256.0f*256.0f}; + static const XMVECTORI32 MaskByteN4 = {0xFF,0xFF<<8,0xFF<<16,0xFF<<24}; + // Clamp to bounds + XMVECTOR vResult = _mm_max_ps(V,g_XMNegativeOne); + vResult = _mm_min_ps(vResult,g_XMOne); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleByteN4); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,MaskByteN4); + // Do a horizontal or of 4 entries + __m128i vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(3,2,3,2)); + // x = x|z, y = y|w + vResulti = _mm_or_si128(vResulti,vResulti2); + // Move Z to the x position + vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(1,1,1,1)); + // i = x|y|z|w + vResulti = _mm_or_si128(vResulti,vResulti2); + _mm_store_ss(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreByte4 +( + XMBYTE4* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTOR Min = {-127.0f, -127.0f, -127.0f, -127.0f}; + static CONST XMVECTOR Max = {127.0f, 127.0f, 127.0f, 127.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, Min, Max); + N = XMVectorRound(N); + + pDestination->x = (CHAR)N.vector4_f32[0]; + pDestination->y = (CHAR)N.vector4_f32[1]; + pDestination->z = (CHAR)N.vector4_f32[2]; + pDestination->w = (CHAR)N.vector4_f32[3]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static const XMVECTORF32 MinByte4 = {-127.0f,-127.0f,-127.0f,-127.0f}; + static const XMVECTORF32 MaxByte4 = { 127.0f, 127.0f, 127.0f, 127.0f}; + static const XMVECTORF32 ScaleByte4 = {1.0f,256.0f,256.0f*256.0f,256.0f*256.0f*256.0f}; + static const XMVECTORI32 MaskByte4 = {0xFF,0xFF<<8,0xFF<<16,0xFF<<24}; + // Clamp to bounds + XMVECTOR vResult = _mm_max_ps(V,MinByte4); + vResult = _mm_min_ps(vResult,MaxByte4); + // Scale by multiplication + vResult = _mm_mul_ps(vResult,ScaleByte4); + // Convert to int + __m128i vResulti = _mm_cvttps_epi32(vResult); + // Mask off any fraction + vResulti = _mm_and_si128(vResulti,MaskByte4); + // Do a horizontal or of 4 entries + __m128i vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(3,2,3,2)); + // x = x|z, y = y|w + vResulti = _mm_or_si128(vResulti,vResulti2); + // Move Z to the x position + vResulti2 = _mm_shuffle_epi32(vResulti,_MM_SHUFFLE(1,1,1,1)); + // i = x|y|z|w + vResulti = _mm_or_si128(vResulti,vResulti2); + _mm_store_ss(reinterpret_cast(&pDestination->v),reinterpret_cast(&vResulti)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreUNibble4 +( + XMUNIBBLE4* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_SSE_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) + XMASSERT(pDestination); + static CONST XMVECTORF32 Max = {15.0f,15.0f,15.0f,15.0f}; + // Bounds check + XMVECTOR vResult = _mm_max_ps(V,g_XMZero); + vResult = _mm_min_ps(vResult,Max); + // Convert to int with rounding + __m128i vInt = _mm_cvtps_epi32(vResult); + // No SSE operations will write to 16-bit values, so we have to extract them manually + USHORT x = static_cast(_mm_extract_epi16(vInt,0)); + USHORT y = static_cast(_mm_extract_epi16(vInt,2)); + USHORT z = static_cast(_mm_extract_epi16(vInt,4)); + USHORT w = static_cast(_mm_extract_epi16(vInt,6)); + pDestination->v = ((w & 0xF) << 12) | + ((z & 0xF) << 8) | + ((y & 0xF) << 4) | + ((x & 0xF)); +#else + XMVECTOR N; + static CONST XMVECTORF32 Max = {15.0f,15.0f,15.0f,15.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, XMVectorZero(), Max.v); + N = XMVectorRound(N); + + pDestination->v = (((USHORT)N.vector4_f32[3] & 0xF) << 12) | + (((USHORT)N.vector4_f32[2] & 0xF) << 8) | + (((USHORT)N.vector4_f32[1] & 0xF) << 4) | + (((USHORT)N.vector4_f32[0] & 0xF)); +#endif !_XM_SSE_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreU555( + XMU555* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_SSE_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) + XMASSERT(pDestination); + static CONST XMVECTORF32 Max = {31.0f, 31.0f, 31.0f, 1.0f}; + // Bounds check + XMVECTOR vResult = _mm_max_ps(V,g_XMZero); + vResult = _mm_min_ps(vResult,Max); + // Convert to int with rounding + __m128i vInt = _mm_cvtps_epi32(vResult); + // No SSE operations will write to 16-bit values, so we have to extract them manually + USHORT x = static_cast(_mm_extract_epi16(vInt,0)); + USHORT y = static_cast(_mm_extract_epi16(vInt,2)); + USHORT z = static_cast(_mm_extract_epi16(vInt,4)); + USHORT w = static_cast(_mm_extract_epi16(vInt,6)); + pDestination->v = ((w) ? 0x8000 : 0) | + ((z & 0x1F) << 10) | + ((y & 0x1F) << 5) | + ((x & 0x1F)); +#else + XMVECTOR N; + static CONST XMVECTORF32 Max = {31.0f, 31.0f, 31.0f, 1.0f}; + + XMASSERT(pDestination); + + N = XMVectorClamp(V, XMVectorZero(), Max.v); + N = XMVectorRound(N); + + pDestination->v = ((N.vector4_f32[3] > 0.f) ? 0x8000 : 0) | + (((USHORT)N.vector4_f32[2] & 0x1F) << 10) | + (((USHORT)N.vector4_f32[1] & 0x1F) << 5) | + (((USHORT)N.vector4_f32[0] & 0x1F)); +#endif !_XM_SSE_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreColor +( + XMCOLOR* pDestination, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + static CONST XMVECTORF32 Scale = {255.0f, 255.0f, 255.0f, 255.0f}; + + XMASSERT(pDestination); + + N = XMVectorSaturate(V); + N = XMVectorMultiply(N, Scale.v); + N = XMVectorRound(N); + + pDestination->c = ((UINT)N.vector4_f32[3] << 24) | + ((UINT)N.vector4_f32[0] << 16) | + ((UINT)N.vector4_f32[1] << 8) | + ((UINT)N.vector4_f32[2]); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + static CONST XMVECTORF32 Scale = {255.0f,255.0f,255.0f,255.0f}; + // Set <0 to 0 + XMVECTOR vResult = _mm_max_ps(V,g_XMZero); + // Set>1 to 1 + vResult = _mm_min_ps(vResult,g_XMOne); + // Convert to 0-255 + vResult = _mm_mul_ps(vResult,Scale); + // Shuffle RGBA to ARGB + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(3,0,1,2)); + // Convert to int + __m128i vInt = _mm_cvtps_epi32(vResult); + // Mash to shorts + vInt = _mm_packs_epi32(vInt,vInt); + // Mash to bytes + vInt = _mm_packus_epi16(vInt,vInt); + // Store the color + _mm_store_ss(reinterpret_cast(&pDestination->c),reinterpret_cast<__m128 *>(&vInt)[0]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreFloat3x3 +( + XMFLOAT3X3* pDestination, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) || defined(XM_NO_MISALIGNED_VECTOR_ACCESS) || defined(_XM_SSE_INTRINSICS_) + + XMStoreFloat3x3NC(pDestination, M); + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreFloat3x3NC +( + XMFLOAT3X3* pDestination, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + + pDestination->m[0][0] = M.r[0].vector4_f32[0]; + pDestination->m[0][1] = M.r[0].vector4_f32[1]; + pDestination->m[0][2] = M.r[0].vector4_f32[2]; + + pDestination->m[1][0] = M.r[1].vector4_f32[0]; + pDestination->m[1][1] = M.r[1].vector4_f32[1]; + pDestination->m[1][2] = M.r[1].vector4_f32[2]; + + pDestination->m[2][0] = M.r[2].vector4_f32[0]; + pDestination->m[2][1] = M.r[2].vector4_f32[1]; + pDestination->m[2][2] = M.r[2].vector4_f32[2]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + XMVECTOR vTemp1 = M.r[0]; + XMVECTOR vTemp2 = M.r[1]; + XMVECTOR vTemp3 = M.r[2]; + XMVECTOR vWork = _mm_shuffle_ps(vTemp1,vTemp2,_MM_SHUFFLE(0,0,2,2)); + vTemp1 = _mm_shuffle_ps(vTemp1,vWork,_MM_SHUFFLE(2,0,1,0)); + _mm_storeu_ps(&pDestination->m[0][0],vTemp1); + vTemp2 = _mm_shuffle_ps(vTemp2,vTemp3,_MM_SHUFFLE(1,0,2,1)); + _mm_storeu_ps(&pDestination->m[1][1],vTemp2); + vTemp3 = _mm_shuffle_ps(vTemp3,vTemp3,_MM_SHUFFLE(2,2,2,2)); + _mm_store_ss(&pDestination->m[2][2],vTemp3); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreFloat4x3 +( + XMFLOAT4X3* pDestination, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) || defined(XM_NO_MISALIGNED_VECTOR_ACCESS) || defined(_XM_SSE_INTRINSICS_) + + XMStoreFloat4x3NC(pDestination, M); + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreFloat4x3A +( + XMFLOAT4X3A* pDestination, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 0xF) == 0); + + pDestination->m[0][0] = M.r[0].vector4_f32[0]; + pDestination->m[0][1] = M.r[0].vector4_f32[1]; + pDestination->m[0][2] = M.r[0].vector4_f32[2]; + + pDestination->m[1][0] = M.r[1].vector4_f32[0]; + pDestination->m[1][1] = M.r[1].vector4_f32[1]; + pDestination->m[1][2] = M.r[1].vector4_f32[2]; + + pDestination->m[2][0] = M.r[2].vector4_f32[0]; + pDestination->m[2][1] = M.r[2].vector4_f32[1]; + pDestination->m[2][2] = M.r[2].vector4_f32[2]; + + pDestination->m[3][0] = M.r[3].vector4_f32[0]; + pDestination->m[3][1] = M.r[3].vector4_f32[1]; + pDestination->m[3][2] = M.r[3].vector4_f32[2]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 0xF) == 0); + // x1,y1,z1,w1 + XMVECTOR vTemp1 = M.r[0]; + // x2,y2,z2,w2 + XMVECTOR vTemp2 = M.r[1]; + // x3,y3,z3,w3 + XMVECTOR vTemp3 = M.r[2]; + // x4,y4,z4,w4 + XMVECTOR vTemp4 = M.r[3]; + // z1,z1,x2,y2 + XMVECTOR vTemp = _mm_shuffle_ps(vTemp1,vTemp2,_MM_SHUFFLE(1,0,2,2)); + // y2,z2,x3,y3 (Final) + vTemp2 = _mm_shuffle_ps(vTemp2,vTemp3,_MM_SHUFFLE(1,0,2,1)); + // x1,y1,z1,x2 (Final) + vTemp1 = _mm_shuffle_ps(vTemp1,vTemp,_MM_SHUFFLE(2,0,1,0)); + // z3,z3,x4,x4 + vTemp3 = _mm_shuffle_ps(vTemp3,vTemp4,_MM_SHUFFLE(0,0,2,2)); + // z3,x4,y4,z4 (Final) + vTemp3 = _mm_shuffle_ps(vTemp3,vTemp4,_MM_SHUFFLE(2,1,2,0)); + // Store in 3 operations + _mm_store_ps(&pDestination->m[0][0],vTemp1); + _mm_store_ps(&pDestination->m[1][1],vTemp2); + _mm_store_ps(&pDestination->m[2][2],vTemp3); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreFloat4x3NC +( + XMFLOAT4X3* pDestination, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + + pDestination->m[0][0] = M.r[0].vector4_f32[0]; + pDestination->m[0][1] = M.r[0].vector4_f32[1]; + pDestination->m[0][2] = M.r[0].vector4_f32[2]; + + pDestination->m[1][0] = M.r[1].vector4_f32[0]; + pDestination->m[1][1] = M.r[1].vector4_f32[1]; + pDestination->m[1][2] = M.r[1].vector4_f32[2]; + + pDestination->m[2][0] = M.r[2].vector4_f32[0]; + pDestination->m[2][1] = M.r[2].vector4_f32[1]; + pDestination->m[2][2] = M.r[2].vector4_f32[2]; + + pDestination->m[3][0] = M.r[3].vector4_f32[0]; + pDestination->m[3][1] = M.r[3].vector4_f32[1]; + pDestination->m[3][2] = M.r[3].vector4_f32[2]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + XMVECTOR vTemp1 = M.r[0]; + XMVECTOR vTemp2 = M.r[1]; + XMVECTOR vTemp3 = M.r[2]; + XMVECTOR vTemp4 = M.r[3]; + XMVECTOR vTemp2x = _mm_shuffle_ps(vTemp2,vTemp3,_MM_SHUFFLE(1,0,2,1)); + vTemp2 = _mm_shuffle_ps(vTemp2,vTemp1,_MM_SHUFFLE(2,2,0,0)); + vTemp1 = _mm_shuffle_ps(vTemp1,vTemp2,_MM_SHUFFLE(0,2,1,0)); + vTemp3 = _mm_shuffle_ps(vTemp3,vTemp4,_MM_SHUFFLE(0,0,2,2)); + vTemp3 = _mm_shuffle_ps(vTemp3,vTemp4,_MM_SHUFFLE(2,1,2,0)); + _mm_storeu_ps(&pDestination->m[0][0],vTemp1); + _mm_storeu_ps(&pDestination->m[1][1],vTemp2x); + _mm_storeu_ps(&pDestination->m[2][2],vTemp3); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreFloat4x4 +( + XMFLOAT4X4* pDestination, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) || defined(XM_NO_MISALIGNED_VECTOR_ACCESS) + + XMStoreFloat4x4NC(pDestination, M); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + + _mm_storeu_ps( &pDestination->_11, M.r[0] ); + _mm_storeu_ps( &pDestination->_21, M.r[1] ); + _mm_storeu_ps( &pDestination->_31, M.r[2] ); + _mm_storeu_ps( &pDestination->_41, M.r[3] ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreFloat4x4A +( + XMFLOAT4X4A* pDestination, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + XMASSERT(((UINT_PTR)pDestination & 0xF) == 0); + + pDestination->m[0][0] = M.r[0].vector4_f32[0]; + pDestination->m[0][1] = M.r[0].vector4_f32[1]; + pDestination->m[0][2] = M.r[0].vector4_f32[2]; + pDestination->m[0][3] = M.r[0].vector4_f32[3]; + + pDestination->m[1][0] = M.r[1].vector4_f32[0]; + pDestination->m[1][1] = M.r[1].vector4_f32[1]; + pDestination->m[1][2] = M.r[1].vector4_f32[2]; + pDestination->m[1][3] = M.r[1].vector4_f32[3]; + + pDestination->m[2][0] = M.r[2].vector4_f32[0]; + pDestination->m[2][1] = M.r[2].vector4_f32[1]; + pDestination->m[2][2] = M.r[2].vector4_f32[2]; + pDestination->m[2][3] = M.r[2].vector4_f32[3]; + + pDestination->m[3][0] = M.r[3].vector4_f32[0]; + pDestination->m[3][1] = M.r[3].vector4_f32[1]; + pDestination->m[3][2] = M.r[3].vector4_f32[2]; + pDestination->m[3][3] = M.r[3].vector4_f32[3]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + + _mm_store_ps( &pDestination->_11, M.r[0] ); + _mm_store_ps( &pDestination->_21, M.r[1] ); + _mm_store_ps( &pDestination->_31, M.r[2] ); + _mm_store_ps( &pDestination->_41, M.r[3] ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMStoreFloat4x4NC +( + XMFLOAT4X4* pDestination, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMASSERT(pDestination); + + pDestination->m[0][0] = M.r[0].vector4_f32[0]; + pDestination->m[0][1] = M.r[0].vector4_f32[1]; + pDestination->m[0][2] = M.r[0].vector4_f32[2]; + pDestination->m[0][3] = M.r[0].vector4_f32[3]; + + pDestination->m[1][0] = M.r[1].vector4_f32[0]; + pDestination->m[1][1] = M.r[1].vector4_f32[1]; + pDestination->m[1][2] = M.r[1].vector4_f32[2]; + pDestination->m[1][3] = M.r[1].vector4_f32[3]; + + pDestination->m[2][0] = M.r[2].vector4_f32[0]; + pDestination->m[2][1] = M.r[2].vector4_f32[1]; + pDestination->m[2][2] = M.r[2].vector4_f32[2]; + pDestination->m[2][3] = M.r[2].vector4_f32[3]; + + pDestination->m[3][0] = M.r[3].vector4_f32[0]; + pDestination->m[3][1] = M.r[3].vector4_f32[1]; + pDestination->m[3][2] = M.r[3].vector4_f32[2]; + pDestination->m[3][3] = M.r[3].vector4_f32[3]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDestination); + _mm_storeu_ps(&pDestination->m[0][0],M.r[0]); + _mm_storeu_ps(&pDestination->m[1][0],M.r[1]); + _mm_storeu_ps(&pDestination->m[2][0],M.r[2]); + _mm_storeu_ps(&pDestination->m[3][0],M.r[3]); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +#endif // __XNAMATHCONVERT_INL__ + diff --git a/gfx/include/dxsdk/xnamathmatrix.inl b/gfx/include/dxsdk/xnamathmatrix.inl new file mode 100644 index 0000000000..7ce4c1f238 --- /dev/null +++ b/gfx/include/dxsdk/xnamathmatrix.inl @@ -0,0 +1,3254 @@ +/*++ + +Copyright (c) Microsoft Corporation. All rights reserved. + +Module Name: + + xnamathmatrix.inl + +Abstract: + + XNA math library for Windows and Xbox 360: Matrix functions +--*/ + +#if defined(_MSC_VER) && (_MSC_VER > 1000) +#pragma once +#endif + +#ifndef __XNAMATHMATRIX_INL__ +#define __XNAMATHMATRIX_INL__ + +/**************************************************************************** + * + * Matrix + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ +// Comparison operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ + +// Return TRUE if any entry in the matrix is NaN +XMFINLINE BOOL XMMatrixIsNaN +( + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + UINT i, uTest; + const UINT *pWork; + + i = 16; + pWork = (const UINT *)(&M.m[0][0]); + do { + // Fetch value into integer unit + uTest = pWork[0]; + // Remove sign + uTest &= 0x7FFFFFFFU; + // NaN is 0x7F800001 through 0x7FFFFFFF inclusive + uTest -= 0x7F800001U; + if (uTest<0x007FFFFFU) { + break; // NaN found + } + ++pWork; // Next entry + } while (--i); + return (i!=0); // i == 0 if nothing matched +#elif defined(_XM_SSE_INTRINSICS_) + // Load in registers + XMVECTOR vX = M.r[0]; + XMVECTOR vY = M.r[1]; + XMVECTOR vZ = M.r[2]; + XMVECTOR vW = M.r[3]; + // Test themselves to check for NaN + vX = _mm_cmpneq_ps(vX,vX); + vY = _mm_cmpneq_ps(vY,vY); + vZ = _mm_cmpneq_ps(vZ,vZ); + vW = _mm_cmpneq_ps(vW,vW); + // Or all the results + vX = _mm_or_ps(vX,vZ); + vY = _mm_or_ps(vY,vW); + vX = _mm_or_ps(vX,vY); + // If any tested true, return true + return (_mm_movemask_ps(vX)!=0); +#else +#endif +} + +//------------------------------------------------------------------------------ + +// Return TRUE if any entry in the matrix is +/-INF +XMFINLINE BOOL XMMatrixIsInfinite +( + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + UINT i, uTest; + const UINT *pWork; + + i = 16; + pWork = (const UINT *)(&M.m[0][0]); + do { + // Fetch value into integer unit + uTest = pWork[0]; + // Remove sign + uTest &= 0x7FFFFFFFU; + // INF is 0x7F800000 + if (uTest==0x7F800000U) { + break; // INF found + } + ++pWork; // Next entry + } while (--i); + return (i!=0); // i == 0 if nothing matched +#elif defined(_XM_SSE_INTRINSICS_) + // Mask off the sign bits + XMVECTOR vTemp1 = _mm_and_ps(M.r[0],g_XMAbsMask); + XMVECTOR vTemp2 = _mm_and_ps(M.r[1],g_XMAbsMask); + XMVECTOR vTemp3 = _mm_and_ps(M.r[2],g_XMAbsMask); + XMVECTOR vTemp4 = _mm_and_ps(M.r[3],g_XMAbsMask); + // Compare to infinity + vTemp1 = _mm_cmpeq_ps(vTemp1,g_XMInfinity); + vTemp2 = _mm_cmpeq_ps(vTemp2,g_XMInfinity); + vTemp3 = _mm_cmpeq_ps(vTemp3,g_XMInfinity); + vTemp4 = _mm_cmpeq_ps(vTemp4,g_XMInfinity); + // Or the answers together + vTemp1 = _mm_or_ps(vTemp1,vTemp2); + vTemp3 = _mm_or_ps(vTemp3,vTemp4); + vTemp1 = _mm_or_ps(vTemp1,vTemp3); + // If any are infinity, the signs are true. + return (_mm_movemask_ps(vTemp1)!=0); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +// Return TRUE if the XMMatrix is equal to identity +XMFINLINE BOOL XMMatrixIsIdentity +( + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + unsigned int uOne, uZero; + const unsigned int *pWork; + + // Use the integer pipeline to reduce branching to a minimum + pWork = (const unsigned int*)(&M.m[0][0]); + // Convert 1.0f to zero and or them together + uOne = pWork[0]^0x3F800000U; + // Or all the 0.0f entries together + uZero = pWork[1]; + uZero |= pWork[2]; + uZero |= pWork[3]; + // 2nd row + uZero |= pWork[4]; + uOne |= pWork[5]^0x3F800000U; + uZero |= pWork[6]; + uZero |= pWork[7]; + // 3rd row + uZero |= pWork[8]; + uZero |= pWork[9]; + uOne |= pWork[10]^0x3F800000U; + uZero |= pWork[11]; + // 4th row + uZero |= pWork[12]; + uZero |= pWork[13]; + uZero |= pWork[14]; + uOne |= pWork[15]^0x3F800000U; + // If all zero entries are zero, the uZero==0 + uZero &= 0x7FFFFFFF; // Allow -0.0f + // If all 1.0f entries are 1.0f, then uOne==0 + uOne |= uZero; + return (uOne==0); +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp1 = _mm_cmpeq_ps(M.r[0],g_XMIdentityR0); + XMVECTOR vTemp2 = _mm_cmpeq_ps(M.r[1],g_XMIdentityR1); + XMVECTOR vTemp3 = _mm_cmpeq_ps(M.r[2],g_XMIdentityR2); + XMVECTOR vTemp4 = _mm_cmpeq_ps(M.r[3],g_XMIdentityR3); + vTemp1 = _mm_and_ps(vTemp1,vTemp2); + vTemp3 = _mm_and_ps(vTemp3,vTemp4); + vTemp1 = _mm_and_ps(vTemp1,vTemp3); + return (_mm_movemask_ps(vTemp1)==0x0f); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Computation operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ +// Perform a 4x4 matrix multiply by a 4x4 matrix +XMFINLINE XMMATRIX XMMatrixMultiply +( + CXMMATRIX M1, + CXMMATRIX M2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMMATRIX mResult; + // Cache the invariants in registers + float x = M1.m[0][0]; + float y = M1.m[0][1]; + float z = M1.m[0][2]; + float w = M1.m[0][3]; + // Perform the operation on the first row + mResult.m[0][0] = (M2.m[0][0]*x)+(M2.m[1][0]*y)+(M2.m[2][0]*z)+(M2.m[3][0]*w); + mResult.m[0][1] = (M2.m[0][1]*x)+(M2.m[1][1]*y)+(M2.m[2][1]*z)+(M2.m[3][1]*w); + mResult.m[0][2] = (M2.m[0][2]*x)+(M2.m[1][2]*y)+(M2.m[2][2]*z)+(M2.m[3][2]*w); + mResult.m[0][3] = (M2.m[0][3]*x)+(M2.m[1][3]*y)+(M2.m[2][3]*z)+(M2.m[3][3]*w); + // Repeat for all the other rows + x = M1.m[1][0]; + y = M1.m[1][1]; + z = M1.m[1][2]; + w = M1.m[1][3]; + mResult.m[1][0] = (M2.m[0][0]*x)+(M2.m[1][0]*y)+(M2.m[2][0]*z)+(M2.m[3][0]*w); + mResult.m[1][1] = (M2.m[0][1]*x)+(M2.m[1][1]*y)+(M2.m[2][1]*z)+(M2.m[3][1]*w); + mResult.m[1][2] = (M2.m[0][2]*x)+(M2.m[1][2]*y)+(M2.m[2][2]*z)+(M2.m[3][2]*w); + mResult.m[1][3] = (M2.m[0][3]*x)+(M2.m[1][3]*y)+(M2.m[2][3]*z)+(M2.m[3][3]*w); + x = M1.m[2][0]; + y = M1.m[2][1]; + z = M1.m[2][2]; + w = M1.m[2][3]; + mResult.m[2][0] = (M2.m[0][0]*x)+(M2.m[1][0]*y)+(M2.m[2][0]*z)+(M2.m[3][0]*w); + mResult.m[2][1] = (M2.m[0][1]*x)+(M2.m[1][1]*y)+(M2.m[2][1]*z)+(M2.m[3][1]*w); + mResult.m[2][2] = (M2.m[0][2]*x)+(M2.m[1][2]*y)+(M2.m[2][2]*z)+(M2.m[3][2]*w); + mResult.m[2][3] = (M2.m[0][3]*x)+(M2.m[1][3]*y)+(M2.m[2][3]*z)+(M2.m[3][3]*w); + x = M1.m[3][0]; + y = M1.m[3][1]; + z = M1.m[3][2]; + w = M1.m[3][3]; + mResult.m[3][0] = (M2.m[0][0]*x)+(M2.m[1][0]*y)+(M2.m[2][0]*z)+(M2.m[3][0]*w); + mResult.m[3][1] = (M2.m[0][1]*x)+(M2.m[1][1]*y)+(M2.m[2][1]*z)+(M2.m[3][1]*w); + mResult.m[3][2] = (M2.m[0][2]*x)+(M2.m[1][2]*y)+(M2.m[2][2]*z)+(M2.m[3][2]*w); + mResult.m[3][3] = (M2.m[0][3]*x)+(M2.m[1][3]*y)+(M2.m[2][3]*z)+(M2.m[3][3]*w); + return mResult; +#elif defined(_XM_SSE_INTRINSICS_) + XMMATRIX mResult; + // Use vW to hold the original row + XMVECTOR vW = M1.r[0]; + // Splat the component X,Y,Z then W + XMVECTOR vX = _mm_shuffle_ps(vW,vW,_MM_SHUFFLE(0,0,0,0)); + XMVECTOR vY = _mm_shuffle_ps(vW,vW,_MM_SHUFFLE(1,1,1,1)); + XMVECTOR vZ = _mm_shuffle_ps(vW,vW,_MM_SHUFFLE(2,2,2,2)); + vW = _mm_shuffle_ps(vW,vW,_MM_SHUFFLE(3,3,3,3)); + // Perform the opertion on the first row + vX = _mm_mul_ps(vX,M2.r[0]); + vY = _mm_mul_ps(vY,M2.r[1]); + vZ = _mm_mul_ps(vZ,M2.r[2]); + vW = _mm_mul_ps(vW,M2.r[3]); + // Perform a binary add to reduce cumulative errors + vX = _mm_add_ps(vX,vZ); + vY = _mm_add_ps(vY,vW); + vX = _mm_add_ps(vX,vY); + mResult.r[0] = vX; + // Repeat for the other 3 rows + vW = M1.r[1]; + vX = _mm_shuffle_ps(vW,vW,_MM_SHUFFLE(0,0,0,0)); + vY = _mm_shuffle_ps(vW,vW,_MM_SHUFFLE(1,1,1,1)); + vZ = _mm_shuffle_ps(vW,vW,_MM_SHUFFLE(2,2,2,2)); + vW = _mm_shuffle_ps(vW,vW,_MM_SHUFFLE(3,3,3,3)); + vX = _mm_mul_ps(vX,M2.r[0]); + vY = _mm_mul_ps(vY,M2.r[1]); + vZ = _mm_mul_ps(vZ,M2.r[2]); + vW = _mm_mul_ps(vW,M2.r[3]); + vX = _mm_add_ps(vX,vZ); + vY = _mm_add_ps(vY,vW); + vX = _mm_add_ps(vX,vY); + mResult.r[1] = vX; + vW = M1.r[2]; + vX = _mm_shuffle_ps(vW,vW,_MM_SHUFFLE(0,0,0,0)); + vY = _mm_shuffle_ps(vW,vW,_MM_SHUFFLE(1,1,1,1)); + vZ = _mm_shuffle_ps(vW,vW,_MM_SHUFFLE(2,2,2,2)); + vW = _mm_shuffle_ps(vW,vW,_MM_SHUFFLE(3,3,3,3)); + vX = _mm_mul_ps(vX,M2.r[0]); + vY = _mm_mul_ps(vY,M2.r[1]); + vZ = _mm_mul_ps(vZ,M2.r[2]); + vW = _mm_mul_ps(vW,M2.r[3]); + vX = _mm_add_ps(vX,vZ); + vY = _mm_add_ps(vY,vW); + vX = _mm_add_ps(vX,vY); + mResult.r[2] = vX; + vW = M1.r[3]; + vX = _mm_shuffle_ps(vW,vW,_MM_SHUFFLE(0,0,0,0)); + vY = _mm_shuffle_ps(vW,vW,_MM_SHUFFLE(1,1,1,1)); + vZ = _mm_shuffle_ps(vW,vW,_MM_SHUFFLE(2,2,2,2)); + vW = _mm_shuffle_ps(vW,vW,_MM_SHUFFLE(3,3,3,3)); + vX = _mm_mul_ps(vX,M2.r[0]); + vY = _mm_mul_ps(vY,M2.r[1]); + vZ = _mm_mul_ps(vZ,M2.r[2]); + vW = _mm_mul_ps(vW,M2.r[3]); + vX = _mm_add_ps(vX,vZ); + vY = _mm_add_ps(vY,vW); + vX = _mm_add_ps(vX,vY); + mResult.r[3] = vX; + return mResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixMultiplyTranspose +( + CXMMATRIX M1, + CXMMATRIX M2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMMATRIX mResult; + // Cache the invariants in registers + float x = M2.m[0][0]; + float y = M2.m[1][0]; + float z = M2.m[2][0]; + float w = M2.m[3][0]; + // Perform the operation on the first row + mResult.m[0][0] = (M1.m[0][0]*x)+(M1.m[0][1]*y)+(M1.m[0][2]*z)+(M1.m[0][3]*w); + mResult.m[0][1] = (M1.m[1][0]*x)+(M1.m[1][1]*y)+(M1.m[1][2]*z)+(M1.m[1][3]*w); + mResult.m[0][2] = (M1.m[2][0]*x)+(M1.m[2][1]*y)+(M1.m[2][2]*z)+(M1.m[2][3]*w); + mResult.m[0][3] = (M1.m[3][0]*x)+(M1.m[3][1]*y)+(M1.m[3][2]*z)+(M1.m[3][3]*w); + // Repeat for all the other rows + x = M2.m[0][1]; + y = M2.m[1][1]; + z = M2.m[2][1]; + w = M2.m[3][1]; + mResult.m[1][0] = (M1.m[0][0]*x)+(M1.m[0][1]*y)+(M1.m[0][2]*z)+(M1.m[0][3]*w); + mResult.m[1][1] = (M1.m[1][0]*x)+(M1.m[1][1]*y)+(M1.m[1][2]*z)+(M1.m[1][3]*w); + mResult.m[1][2] = (M1.m[2][0]*x)+(M1.m[2][1]*y)+(M1.m[2][2]*z)+(M1.m[2][3]*w); + mResult.m[1][3] = (M1.m[3][0]*x)+(M1.m[3][1]*y)+(M1.m[3][2]*z)+(M1.m[3][3]*w); + x = M2.m[0][2]; + y = M2.m[1][2]; + z = M2.m[2][2]; + w = M2.m[3][2]; + mResult.m[2][0] = (M1.m[0][0]*x)+(M1.m[0][1]*y)+(M1.m[0][2]*z)+(M1.m[0][3]*w); + mResult.m[2][1] = (M1.m[1][0]*x)+(M1.m[1][1]*y)+(M1.m[1][2]*z)+(M1.m[1][3]*w); + mResult.m[2][2] = (M1.m[2][0]*x)+(M1.m[2][1]*y)+(M1.m[2][2]*z)+(M1.m[2][3]*w); + mResult.m[2][3] = (M1.m[3][0]*x)+(M1.m[3][1]*y)+(M1.m[3][2]*z)+(M1.m[3][3]*w); + x = M2.m[0][3]; + y = M2.m[1][3]; + z = M2.m[2][3]; + w = M2.m[3][3]; + mResult.m[3][0] = (M1.m[0][0]*x)+(M1.m[0][1]*y)+(M1.m[0][2]*z)+(M1.m[0][3]*w); + mResult.m[3][1] = (M1.m[1][0]*x)+(M1.m[1][1]*y)+(M1.m[1][2]*z)+(M1.m[1][3]*w); + mResult.m[3][2] = (M1.m[2][0]*x)+(M1.m[2][1]*y)+(M1.m[2][2]*z)+(M1.m[2][3]*w); + mResult.m[3][3] = (M1.m[3][0]*x)+(M1.m[3][1]*y)+(M1.m[3][2]*z)+(M1.m[3][3]*w); + return mResult; +#elif defined(_XM_SSE_INTRINSICS_) + XMMATRIX Product; + XMMATRIX Result; + Product = XMMatrixMultiply(M1, M2); + Result = XMMatrixTranspose(Product); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixTranspose +( + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMMATRIX P; + XMMATRIX MT; + + // Original matrix: + // + // m00m01m02m03 + // m10m11m12m13 + // m20m21m22m23 + // m30m31m32m33 + + P.r[0] = XMVectorMergeXY(M.r[0], M.r[2]); // m00m20m01m21 + P.r[1] = XMVectorMergeXY(M.r[1], M.r[3]); // m10m30m11m31 + P.r[2] = XMVectorMergeZW(M.r[0], M.r[2]); // m02m22m03m23 + P.r[3] = XMVectorMergeZW(M.r[1], M.r[3]); // m12m32m13m33 + + MT.r[0] = XMVectorMergeXY(P.r[0], P.r[1]); // m00m10m20m30 + MT.r[1] = XMVectorMergeZW(P.r[0], P.r[1]); // m01m11m21m31 + MT.r[2] = XMVectorMergeXY(P.r[2], P.r[3]); // m02m12m22m32 + MT.r[3] = XMVectorMergeZW(P.r[2], P.r[3]); // m03m13m23m33 + + return MT; + +#elif defined(_XM_SSE_INTRINSICS_) + // x.x,x.y,y.x,y.y + XMVECTOR vTemp1 = _mm_shuffle_ps(M.r[0],M.r[1],_MM_SHUFFLE(1,0,1,0)); + // x.z,x.w,y.z,y.w + XMVECTOR vTemp3 = _mm_shuffle_ps(M.r[0],M.r[1],_MM_SHUFFLE(3,2,3,2)); + // z.x,z.y,w.x,w.y + XMVECTOR vTemp2 = _mm_shuffle_ps(M.r[2],M.r[3],_MM_SHUFFLE(1,0,1,0)); + // z.z,z.w,w.z,w.w + XMVECTOR vTemp4 = _mm_shuffle_ps(M.r[2],M.r[3],_MM_SHUFFLE(3,2,3,2)); + XMMATRIX mResult; + + // x.x,y.x,z.x,w.x + mResult.r[0] = _mm_shuffle_ps(vTemp1, vTemp2,_MM_SHUFFLE(2,0,2,0)); + // x.y,y.y,z.y,w.y + mResult.r[1] = _mm_shuffle_ps(vTemp1, vTemp2,_MM_SHUFFLE(3,1,3,1)); + // x.z,y.z,z.z,w.z + mResult.r[2] = _mm_shuffle_ps(vTemp3, vTemp4,_MM_SHUFFLE(2,0,2,0)); + // x.w,y.w,z.w,w.w + mResult.r[3] = _mm_shuffle_ps(vTemp3, vTemp4,_MM_SHUFFLE(3,1,3,1)); + return mResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Return the inverse and the determinant of a 4x4 matrix +XMINLINE XMMATRIX XMMatrixInverse +( + XMVECTOR* pDeterminant, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMMATRIX R; + XMMATRIX MT; + XMVECTOR D0, D1, D2; + XMVECTOR C0, C1, C2, C3, C4, C5, C6, C7; + XMVECTOR V0[4], V1[4]; + XMVECTOR Determinant; + XMVECTOR Reciprocal; + XMMATRIX Result; + static CONST XMVECTORU32 SwizzleXXYY = {XM_PERMUTE_0X, XM_PERMUTE_0X, XM_PERMUTE_0Y, XM_PERMUTE_0Y}; + static CONST XMVECTORU32 SwizzleZWZW = {XM_PERMUTE_0Z, XM_PERMUTE_0W, XM_PERMUTE_0Z, XM_PERMUTE_0W}; + static CONST XMVECTORU32 SwizzleYZXY = {XM_PERMUTE_0Y, XM_PERMUTE_0Z, XM_PERMUTE_0X, XM_PERMUTE_0Y}; + static CONST XMVECTORU32 SwizzleZWYZ = {XM_PERMUTE_0Z, XM_PERMUTE_0W, XM_PERMUTE_0Y, XM_PERMUTE_0Z}; + static CONST XMVECTORU32 SwizzleWXWX = {XM_PERMUTE_0W, XM_PERMUTE_0X, XM_PERMUTE_0W, XM_PERMUTE_0X}; + static CONST XMVECTORU32 SwizzleZXYX = {XM_PERMUTE_0Z, XM_PERMUTE_0X, XM_PERMUTE_0Y, XM_PERMUTE_0X}; + static CONST XMVECTORU32 SwizzleYWXZ = {XM_PERMUTE_0Y, XM_PERMUTE_0W, XM_PERMUTE_0X, XM_PERMUTE_0Z}; + static CONST XMVECTORU32 SwizzleWZWY = {XM_PERMUTE_0W, XM_PERMUTE_0Z, XM_PERMUTE_0W, XM_PERMUTE_0Y}; + static CONST XMVECTORU32 Permute0X0Z1X1Z = {XM_PERMUTE_0X, XM_PERMUTE_0Z, XM_PERMUTE_1X, XM_PERMUTE_1Z}; + static CONST XMVECTORU32 Permute0Y0W1Y1W = {XM_PERMUTE_0Y, XM_PERMUTE_0W, XM_PERMUTE_1Y, XM_PERMUTE_1W}; + static CONST XMVECTORU32 Permute1Y0Y0W0X = {XM_PERMUTE_1Y, XM_PERMUTE_0Y, XM_PERMUTE_0W, XM_PERMUTE_0X}; + static CONST XMVECTORU32 Permute0W0X0Y1X = {XM_PERMUTE_0W, XM_PERMUTE_0X, XM_PERMUTE_0Y, XM_PERMUTE_1X}; + static CONST XMVECTORU32 Permute0Z1Y1X0Z = {XM_PERMUTE_0Z, XM_PERMUTE_1Y, XM_PERMUTE_1X, XM_PERMUTE_0Z}; + static CONST XMVECTORU32 Permute0W1Y0Y0Z = {XM_PERMUTE_0W, XM_PERMUTE_1Y, XM_PERMUTE_0Y, XM_PERMUTE_0Z}; + static CONST XMVECTORU32 Permute0Z0Y1X0X = {XM_PERMUTE_0Z, XM_PERMUTE_0Y, XM_PERMUTE_1X, XM_PERMUTE_0X}; + static CONST XMVECTORU32 Permute1Y0X0W1X = {XM_PERMUTE_1Y, XM_PERMUTE_0X, XM_PERMUTE_0W, XM_PERMUTE_1X}; + static CONST XMVECTORU32 Permute1W0Y0W0X = {XM_PERMUTE_1W, XM_PERMUTE_0Y, XM_PERMUTE_0W, XM_PERMUTE_0X}; + static CONST XMVECTORU32 Permute0W0X0Y1Z = {XM_PERMUTE_0W, XM_PERMUTE_0X, XM_PERMUTE_0Y, XM_PERMUTE_1Z}; + static CONST XMVECTORU32 Permute0Z1W1Z0Z = {XM_PERMUTE_0Z, XM_PERMUTE_1W, XM_PERMUTE_1Z, XM_PERMUTE_0Z}; + static CONST XMVECTORU32 Permute0W1W0Y0Z = {XM_PERMUTE_0W, XM_PERMUTE_1W, XM_PERMUTE_0Y, XM_PERMUTE_0Z}; + static CONST XMVECTORU32 Permute0Z0Y1Z0X = {XM_PERMUTE_0Z, XM_PERMUTE_0Y, XM_PERMUTE_1Z, XM_PERMUTE_0X}; + static CONST XMVECTORU32 Permute1W0X0W1Z = {XM_PERMUTE_1W, XM_PERMUTE_0X, XM_PERMUTE_0W, XM_PERMUTE_1Z}; + + XMASSERT(pDeterminant); + + MT = XMMatrixTranspose(M); + + V0[0] = XMVectorPermute(MT.r[2], MT.r[2], SwizzleXXYY.v); + V1[0] = XMVectorPermute(MT.r[3], MT.r[3], SwizzleZWZW.v); + V0[1] = XMVectorPermute(MT.r[0], MT.r[0], SwizzleXXYY.v); + V1[1] = XMVectorPermute(MT.r[1], MT.r[1], SwizzleZWZW.v); + V0[2] = XMVectorPermute(MT.r[2], MT.r[0], Permute0X0Z1X1Z.v); + V1[2] = XMVectorPermute(MT.r[3], MT.r[1], Permute0Y0W1Y1W.v); + + D0 = XMVectorMultiply(V0[0], V1[0]); + D1 = XMVectorMultiply(V0[1], V1[1]); + D2 = XMVectorMultiply(V0[2], V1[2]); + + V0[0] = XMVectorPermute(MT.r[2], MT.r[2], SwizzleZWZW.v); + V1[0] = XMVectorPermute(MT.r[3], MT.r[3], SwizzleXXYY.v); + V0[1] = XMVectorPermute(MT.r[0], MT.r[0], SwizzleZWZW.v); + V1[1] = XMVectorPermute(MT.r[1], MT.r[1], SwizzleXXYY.v); + V0[2] = XMVectorPermute(MT.r[2], MT.r[0], Permute0Y0W1Y1W.v); + V1[2] = XMVectorPermute(MT.r[3], MT.r[1], Permute0X0Z1X1Z.v); + + D0 = XMVectorNegativeMultiplySubtract(V0[0], V1[0], D0); + D1 = XMVectorNegativeMultiplySubtract(V0[1], V1[1], D1); + D2 = XMVectorNegativeMultiplySubtract(V0[2], V1[2], D2); + + V0[0] = XMVectorPermute(MT.r[1], MT.r[1], SwizzleYZXY.v); + V1[0] = XMVectorPermute(D0, D2, Permute1Y0Y0W0X.v); + V0[1] = XMVectorPermute(MT.r[0], MT.r[0], SwizzleZXYX.v); + V1[1] = XMVectorPermute(D0, D2, Permute0W1Y0Y0Z.v); + V0[2] = XMVectorPermute(MT.r[3], MT.r[3], SwizzleYZXY.v); + V1[2] = XMVectorPermute(D1, D2, Permute1W0Y0W0X.v); + V0[3] = XMVectorPermute(MT.r[2], MT.r[2], SwizzleZXYX.v); + V1[3] = XMVectorPermute(D1, D2, Permute0W1W0Y0Z.v); + + C0 = XMVectorMultiply(V0[0], V1[0]); + C2 = XMVectorMultiply(V0[1], V1[1]); + C4 = XMVectorMultiply(V0[2], V1[2]); + C6 = XMVectorMultiply(V0[3], V1[3]); + + V0[0] = XMVectorPermute(MT.r[1], MT.r[1], SwizzleZWYZ.v); + V1[0] = XMVectorPermute(D0, D2, Permute0W0X0Y1X.v); + V0[1] = XMVectorPermute(MT.r[0], MT.r[0], SwizzleWZWY.v); + V1[1] = XMVectorPermute(D0, D2, Permute0Z0Y1X0X.v); + V0[2] = XMVectorPermute(MT.r[3], MT.r[3], SwizzleZWYZ.v); + V1[2] = XMVectorPermute(D1, D2, Permute0W0X0Y1Z.v); + V0[3] = XMVectorPermute(MT.r[2], MT.r[2], SwizzleWZWY.v); + V1[3] = XMVectorPermute(D1, D2, Permute0Z0Y1Z0X.v); + + C0 = XMVectorNegativeMultiplySubtract(V0[0], V1[0], C0); + C2 = XMVectorNegativeMultiplySubtract(V0[1], V1[1], C2); + C4 = XMVectorNegativeMultiplySubtract(V0[2], V1[2], C4); + C6 = XMVectorNegativeMultiplySubtract(V0[3], V1[3], C6); + + V0[0] = XMVectorPermute(MT.r[1], MT.r[1], SwizzleWXWX.v); + V1[0] = XMVectorPermute(D0, D2, Permute0Z1Y1X0Z.v); + V0[1] = XMVectorPermute(MT.r[0], MT.r[0], SwizzleYWXZ.v); + V1[1] = XMVectorPermute(D0, D2, Permute1Y0X0W1X.v); + V0[2] = XMVectorPermute(MT.r[3], MT.r[3], SwizzleWXWX.v); + V1[2] = XMVectorPermute(D1, D2, Permute0Z1W1Z0Z.v); + V0[3] = XMVectorPermute(MT.r[2], MT.r[2], SwizzleYWXZ.v); + V1[3] = XMVectorPermute(D1, D2, Permute1W0X0W1Z.v); + + C1 = XMVectorNegativeMultiplySubtract(V0[0], V1[0], C0); + C0 = XMVectorMultiplyAdd(V0[0], V1[0], C0); + C3 = XMVectorMultiplyAdd(V0[1], V1[1], C2); + C2 = XMVectorNegativeMultiplySubtract(V0[1], V1[1], C2); + C5 = XMVectorNegativeMultiplySubtract(V0[2], V1[2], C4); + C4 = XMVectorMultiplyAdd(V0[2], V1[2], C4); + C7 = XMVectorMultiplyAdd(V0[3], V1[3], C6); + C6 = XMVectorNegativeMultiplySubtract(V0[3], V1[3], C6); + + R.r[0] = XMVectorSelect(C0, C1, g_XMSelect0101.v); + R.r[1] = XMVectorSelect(C2, C3, g_XMSelect0101.v); + R.r[2] = XMVectorSelect(C4, C5, g_XMSelect0101.v); + R.r[3] = XMVectorSelect(C6, C7, g_XMSelect0101.v); + + Determinant = XMVector4Dot(R.r[0], MT.r[0]); + + *pDeterminant = Determinant; + + Reciprocal = XMVectorReciprocal(Determinant); + + Result.r[0] = XMVectorMultiply(R.r[0], Reciprocal); + Result.r[1] = XMVectorMultiply(R.r[1], Reciprocal); + Result.r[2] = XMVectorMultiply(R.r[2], Reciprocal); + Result.r[3] = XMVectorMultiply(R.r[3], Reciprocal); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pDeterminant); + XMMATRIX MT = XMMatrixTranspose(M); + XMVECTOR V00 = _mm_shuffle_ps(MT.r[2], MT.r[2],_MM_SHUFFLE(1,1,0,0)); + XMVECTOR V10 = _mm_shuffle_ps(MT.r[3], MT.r[3],_MM_SHUFFLE(3,2,3,2)); + XMVECTOR V01 = _mm_shuffle_ps(MT.r[0], MT.r[0],_MM_SHUFFLE(1,1,0,0)); + XMVECTOR V11 = _mm_shuffle_ps(MT.r[1], MT.r[1],_MM_SHUFFLE(3,2,3,2)); + XMVECTOR V02 = _mm_shuffle_ps(MT.r[2], MT.r[0],_MM_SHUFFLE(2,0,2,0)); + XMVECTOR V12 = _mm_shuffle_ps(MT.r[3], MT.r[1],_MM_SHUFFLE(3,1,3,1)); + + XMVECTOR D0 = _mm_mul_ps(V00,V10); + XMVECTOR D1 = _mm_mul_ps(V01,V11); + XMVECTOR D2 = _mm_mul_ps(V02,V12); + + V00 = _mm_shuffle_ps(MT.r[2],MT.r[2],_MM_SHUFFLE(3,2,3,2)); + V10 = _mm_shuffle_ps(MT.r[3],MT.r[3],_MM_SHUFFLE(1,1,0,0)); + V01 = _mm_shuffle_ps(MT.r[0],MT.r[0],_MM_SHUFFLE(3,2,3,2)); + V11 = _mm_shuffle_ps(MT.r[1],MT.r[1],_MM_SHUFFLE(1,1,0,0)); + V02 = _mm_shuffle_ps(MT.r[2],MT.r[0],_MM_SHUFFLE(3,1,3,1)); + V12 = _mm_shuffle_ps(MT.r[3],MT.r[1],_MM_SHUFFLE(2,0,2,0)); + + V00 = _mm_mul_ps(V00,V10); + V01 = _mm_mul_ps(V01,V11); + V02 = _mm_mul_ps(V02,V12); + D0 = _mm_sub_ps(D0,V00); + D1 = _mm_sub_ps(D1,V01); + D2 = _mm_sub_ps(D2,V02); + // V11 = D0Y,D0W,D2Y,D2Y + V11 = _mm_shuffle_ps(D0,D2,_MM_SHUFFLE(1,1,3,1)); + V00 = _mm_shuffle_ps(MT.r[1], MT.r[1],_MM_SHUFFLE(1,0,2,1)); + V10 = _mm_shuffle_ps(V11,D0,_MM_SHUFFLE(0,3,0,2)); + V01 = _mm_shuffle_ps(MT.r[0], MT.r[0],_MM_SHUFFLE(0,1,0,2)); + V11 = _mm_shuffle_ps(V11,D0,_MM_SHUFFLE(2,1,2,1)); + // V13 = D1Y,D1W,D2W,D2W + XMVECTOR V13 = _mm_shuffle_ps(D1,D2,_MM_SHUFFLE(3,3,3,1)); + V02 = _mm_shuffle_ps(MT.r[3], MT.r[3],_MM_SHUFFLE(1,0,2,1)); + V12 = _mm_shuffle_ps(V13,D1,_MM_SHUFFLE(0,3,0,2)); + XMVECTOR V03 = _mm_shuffle_ps(MT.r[2], MT.r[2],_MM_SHUFFLE(0,1,0,2)); + V13 = _mm_shuffle_ps(V13,D1,_MM_SHUFFLE(2,1,2,1)); + + XMVECTOR C0 = _mm_mul_ps(V00,V10); + XMVECTOR C2 = _mm_mul_ps(V01,V11); + XMVECTOR C4 = _mm_mul_ps(V02,V12); + XMVECTOR C6 = _mm_mul_ps(V03,V13); + + // V11 = D0X,D0Y,D2X,D2X + V11 = _mm_shuffle_ps(D0,D2,_MM_SHUFFLE(0,0,1,0)); + V00 = _mm_shuffle_ps(MT.r[1], MT.r[1],_MM_SHUFFLE(2,1,3,2)); + V10 = _mm_shuffle_ps(D0,V11,_MM_SHUFFLE(2,1,0,3)); + V01 = _mm_shuffle_ps(MT.r[0], MT.r[0],_MM_SHUFFLE(1,3,2,3)); + V11 = _mm_shuffle_ps(D0,V11,_MM_SHUFFLE(0,2,1,2)); + // V13 = D1X,D1Y,D2Z,D2Z + V13 = _mm_shuffle_ps(D1,D2,_MM_SHUFFLE(2,2,1,0)); + V02 = _mm_shuffle_ps(MT.r[3], MT.r[3],_MM_SHUFFLE(2,1,3,2)); + V12 = _mm_shuffle_ps(D1,V13,_MM_SHUFFLE(2,1,0,3)); + V03 = _mm_shuffle_ps(MT.r[2], MT.r[2],_MM_SHUFFLE(1,3,2,3)); + V13 = _mm_shuffle_ps(D1,V13,_MM_SHUFFLE(0,2,1,2)); + + V00 = _mm_mul_ps(V00,V10); + V01 = _mm_mul_ps(V01,V11); + V02 = _mm_mul_ps(V02,V12); + V03 = _mm_mul_ps(V03,V13); + C0 = _mm_sub_ps(C0,V00); + C2 = _mm_sub_ps(C2,V01); + C4 = _mm_sub_ps(C4,V02); + C6 = _mm_sub_ps(C6,V03); + + V00 = _mm_shuffle_ps(MT.r[1],MT.r[1],_MM_SHUFFLE(0,3,0,3)); + // V10 = D0Z,D0Z,D2X,D2Y + V10 = _mm_shuffle_ps(D0,D2,_MM_SHUFFLE(1,0,2,2)); + V10 = _mm_shuffle_ps(V10,V10,_MM_SHUFFLE(0,2,3,0)); + V01 = _mm_shuffle_ps(MT.r[0],MT.r[0],_MM_SHUFFLE(2,0,3,1)); + // V11 = D0X,D0W,D2X,D2Y + V11 = _mm_shuffle_ps(D0,D2,_MM_SHUFFLE(1,0,3,0)); + V11 = _mm_shuffle_ps(V11,V11,_MM_SHUFFLE(2,1,0,3)); + V02 = _mm_shuffle_ps(MT.r[3],MT.r[3],_MM_SHUFFLE(0,3,0,3)); + // V12 = D1Z,D1Z,D2Z,D2W + V12 = _mm_shuffle_ps(D1,D2,_MM_SHUFFLE(3,2,2,2)); + V12 = _mm_shuffle_ps(V12,V12,_MM_SHUFFLE(0,2,3,0)); + V03 = _mm_shuffle_ps(MT.r[2],MT.r[2],_MM_SHUFFLE(2,0,3,1)); + // V13 = D1X,D1W,D2Z,D2W + V13 = _mm_shuffle_ps(D1,D2,_MM_SHUFFLE(3,2,3,0)); + V13 = _mm_shuffle_ps(V13,V13,_MM_SHUFFLE(2,1,0,3)); + + V00 = _mm_mul_ps(V00,V10); + V01 = _mm_mul_ps(V01,V11); + V02 = _mm_mul_ps(V02,V12); + V03 = _mm_mul_ps(V03,V13); + XMVECTOR C1 = _mm_sub_ps(C0,V00); + C0 = _mm_add_ps(C0,V00); + XMVECTOR C3 = _mm_add_ps(C2,V01); + C2 = _mm_sub_ps(C2,V01); + XMVECTOR C5 = _mm_sub_ps(C4,V02); + C4 = _mm_add_ps(C4,V02); + XMVECTOR C7 = _mm_add_ps(C6,V03); + C6 = _mm_sub_ps(C6,V03); + + C0 = _mm_shuffle_ps(C0,C1,_MM_SHUFFLE(3,1,2,0)); + C2 = _mm_shuffle_ps(C2,C3,_MM_SHUFFLE(3,1,2,0)); + C4 = _mm_shuffle_ps(C4,C5,_MM_SHUFFLE(3,1,2,0)); + C6 = _mm_shuffle_ps(C6,C7,_MM_SHUFFLE(3,1,2,0)); + C0 = _mm_shuffle_ps(C0,C0,_MM_SHUFFLE(3,1,2,0)); + C2 = _mm_shuffle_ps(C2,C2,_MM_SHUFFLE(3,1,2,0)); + C4 = _mm_shuffle_ps(C4,C4,_MM_SHUFFLE(3,1,2,0)); + C6 = _mm_shuffle_ps(C6,C6,_MM_SHUFFLE(3,1,2,0)); + // Get the determinate + XMVECTOR vTemp = XMVector4Dot(C0,MT.r[0]); + *pDeterminant = vTemp; + vTemp = _mm_div_ps(g_XMOne,vTemp); + XMMATRIX mResult; + mResult.r[0] = _mm_mul_ps(C0,vTemp); + mResult.r[1] = _mm_mul_ps(C2,vTemp); + mResult.r[2] = _mm_mul_ps(C4,vTemp); + mResult.r[3] = _mm_mul_ps(C6,vTemp); + return mResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMVECTOR XMMatrixDeterminant +( + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V0, V1, V2, V3, V4, V5; + XMVECTOR P0, P1, P2, R, S; + XMVECTOR Result; + static CONST XMVECTORU32 SwizzleYXXX = {XM_PERMUTE_0Y, XM_PERMUTE_0X, XM_PERMUTE_0X, XM_PERMUTE_0X}; + static CONST XMVECTORU32 SwizzleZZYY = {XM_PERMUTE_0Z, XM_PERMUTE_0Z, XM_PERMUTE_0Y, XM_PERMUTE_0Y}; + static CONST XMVECTORU32 SwizzleWWWZ = {XM_PERMUTE_0W, XM_PERMUTE_0W, XM_PERMUTE_0W, XM_PERMUTE_0Z}; + static CONST XMVECTOR Sign = {1.0f, -1.0f, 1.0f, -1.0f}; + + V0 = XMVectorPermute(M.r[2], M.r[2], SwizzleYXXX.v); + V1 = XMVectorPermute(M.r[3], M.r[3], SwizzleZZYY.v); + V2 = XMVectorPermute(M.r[2], M.r[2], SwizzleYXXX.v); + V3 = XMVectorPermute(M.r[3], M.r[3], SwizzleWWWZ.v); + V4 = XMVectorPermute(M.r[2], M.r[2], SwizzleZZYY.v); + V5 = XMVectorPermute(M.r[3], M.r[3], SwizzleWWWZ.v); + + P0 = XMVectorMultiply(V0, V1); + P1 = XMVectorMultiply(V2, V3); + P2 = XMVectorMultiply(V4, V5); + + V0 = XMVectorPermute(M.r[2], M.r[2], SwizzleZZYY.v); + V1 = XMVectorPermute(M.r[3], M.r[3], SwizzleYXXX.v); + V2 = XMVectorPermute(M.r[2], M.r[2], SwizzleWWWZ.v); + V3 = XMVectorPermute(M.r[3], M.r[3], SwizzleYXXX.v); + V4 = XMVectorPermute(M.r[2], M.r[2], SwizzleWWWZ.v); + V5 = XMVectorPermute(M.r[3], M.r[3], SwizzleZZYY.v); + + P0 = XMVectorNegativeMultiplySubtract(V0, V1, P0); + P1 = XMVectorNegativeMultiplySubtract(V2, V3, P1); + P2 = XMVectorNegativeMultiplySubtract(V4, V5, P2); + + V0 = XMVectorPermute(M.r[1], M.r[1], SwizzleWWWZ.v); + V1 = XMVectorPermute(M.r[1], M.r[1], SwizzleZZYY.v); + V2 = XMVectorPermute(M.r[1], M.r[1], SwizzleYXXX.v); + + S = XMVectorMultiply(M.r[0], Sign); + R = XMVectorMultiply(V0, P0); + R = XMVectorNegativeMultiplySubtract(V1, P1, R); + R = XMVectorMultiplyAdd(V2, P2, R); + + Result = XMVector4Dot(S, R); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR V0, V1, V2, V3, V4, V5; + XMVECTOR P0, P1, P2, R, S; + XMVECTOR Result; + static CONST XMVECTORU32 SwizzleYXXX = {XM_PERMUTE_0Y, XM_PERMUTE_0X, XM_PERMUTE_0X, XM_PERMUTE_0X}; + static CONST XMVECTORU32 SwizzleZZYY = {XM_PERMUTE_0Z, XM_PERMUTE_0Z, XM_PERMUTE_0Y, XM_PERMUTE_0Y}; + static CONST XMVECTORU32 SwizzleWWWZ = {XM_PERMUTE_0W, XM_PERMUTE_0W, XM_PERMUTE_0W, XM_PERMUTE_0Z}; + static CONST XMVECTORF32 Sign = {1.0f, -1.0f, 1.0f, -1.0f}; + + V0 = XMVectorPermute(M.r[2], M.r[2], SwizzleYXXX); + V1 = XMVectorPermute(M.r[3], M.r[3], SwizzleZZYY); + V2 = XMVectorPermute(M.r[2], M.r[2], SwizzleYXXX); + V3 = XMVectorPermute(M.r[3], M.r[3], SwizzleWWWZ); + V4 = XMVectorPermute(M.r[2], M.r[2], SwizzleZZYY); + V5 = XMVectorPermute(M.r[3], M.r[3], SwizzleWWWZ); + + P0 = _mm_mul_ps(V0, V1); + P1 = _mm_mul_ps(V2, V3); + P2 = _mm_mul_ps(V4, V5); + + V0 = XMVectorPermute(M.r[2], M.r[2], SwizzleZZYY); + V1 = XMVectorPermute(M.r[3], M.r[3], SwizzleYXXX); + V2 = XMVectorPermute(M.r[2], M.r[2], SwizzleWWWZ); + V3 = XMVectorPermute(M.r[3], M.r[3], SwizzleYXXX); + V4 = XMVectorPermute(M.r[2], M.r[2], SwizzleWWWZ); + V5 = XMVectorPermute(M.r[3], M.r[3], SwizzleZZYY); + + P0 = XMVectorNegativeMultiplySubtract(V0, V1, P0); + P1 = XMVectorNegativeMultiplySubtract(V2, V3, P1); + P2 = XMVectorNegativeMultiplySubtract(V4, V5, P2); + + V0 = XMVectorPermute(M.r[1], M.r[1], SwizzleWWWZ); + V1 = XMVectorPermute(M.r[1], M.r[1], SwizzleZZYY); + V2 = XMVectorPermute(M.r[1], M.r[1], SwizzleYXXX); + + S = _mm_mul_ps(M.r[0], Sign); + R = _mm_mul_ps(V0, P0); + R = XMVectorNegativeMultiplySubtract(V1, P1, R); + R = XMVectorMultiplyAdd(V2, P2, R); + + Result = XMVector4Dot(S, R); + + return Result; + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +#define XMRANKDECOMPOSE(a, b, c, x, y, z) \ + if((x) < (y)) \ + { \ + if((y) < (z)) \ + { \ + (a) = 2; \ + (b) = 1; \ + (c) = 0; \ + } \ + else \ + { \ + (a) = 1; \ + \ + if((x) < (z)) \ + { \ + (b) = 2; \ + (c) = 0; \ + } \ + else \ + { \ + (b) = 0; \ + (c) = 2; \ + } \ + } \ + } \ + else \ + { \ + if((x) < (z)) \ + { \ + (a) = 2; \ + (b) = 0; \ + (c) = 1; \ + } \ + else \ + { \ + (a) = 0; \ + \ + if((y) < (z)) \ + { \ + (b) = 2; \ + (c) = 1; \ + } \ + else \ + { \ + (b) = 1; \ + (c) = 2; \ + } \ + } \ + } + +#define XM_DECOMP_EPSILON 0.0001f + +XMINLINE BOOL XMMatrixDecompose( XMVECTOR *outScale, XMVECTOR *outRotQuat, XMVECTOR *outTrans, CXMMATRIX M ) +{ + FLOAT fDet; + FLOAT *pfScales; + XMVECTOR *ppvBasis[3]; + XMMATRIX matTemp; + UINT a, b, c; + static const XMVECTOR *pvCanonicalBasis[3] = { + &g_XMIdentityR0.v, + &g_XMIdentityR1.v, + &g_XMIdentityR2.v + }; + + // Get the translation + outTrans[0] = M.r[3]; + + ppvBasis[0] = &matTemp.r[0]; + ppvBasis[1] = &matTemp.r[1]; + ppvBasis[2] = &matTemp.r[2]; + + matTemp.r[0] = M.r[0]; + matTemp.r[1] = M.r[1]; + matTemp.r[2] = M.r[2]; + matTemp.r[3] = g_XMIdentityR3.v; + + pfScales = (FLOAT *)outScale; + + XMVectorGetXPtr(&pfScales[0],XMVector3Length(ppvBasis[0][0])); + XMVectorGetXPtr(&pfScales[1],XMVector3Length(ppvBasis[1][0])); + XMVectorGetXPtr(&pfScales[2],XMVector3Length(ppvBasis[2][0])); + + XMRANKDECOMPOSE(a, b, c, pfScales[0], pfScales[1], pfScales[2]) + + if(pfScales[a] < XM_DECOMP_EPSILON) + { + ppvBasis[a][0] = pvCanonicalBasis[a][0]; + } + ppvBasis[a][0] = XMVector3Normalize(ppvBasis[a][0]); + + if(pfScales[b] < XM_DECOMP_EPSILON) + { + UINT aa, bb, cc; + FLOAT fAbsX, fAbsY, fAbsZ; + + fAbsX = fabsf(XMVectorGetX(ppvBasis[a][0])); + fAbsY = fabsf(XMVectorGetY(ppvBasis[a][0])); + fAbsZ = fabsf(XMVectorGetZ(ppvBasis[a][0])); + + XMRANKDECOMPOSE(aa, bb, cc, fAbsX, fAbsY, fAbsZ) + + ppvBasis[b][0] = XMVector3Cross(ppvBasis[a][0],pvCanonicalBasis[cc][0]); + } + + ppvBasis[b][0] = XMVector3Normalize(ppvBasis[b][0]); + + if(pfScales[c] < XM_DECOMP_EPSILON) + { + ppvBasis[c][0] = XMVector3Cross(ppvBasis[a][0],ppvBasis[b][0]); + } + + ppvBasis[c][0] = XMVector3Normalize(ppvBasis[c][0]); + + fDet = XMVectorGetX(XMMatrixDeterminant(matTemp)); + + // use Kramer's rule to check for handedness of coordinate system + if(fDet < 0.0f) + { + // switch coordinate system by negating the scale and inverting the basis vector on the x-axis + pfScales[a] = -pfScales[a]; + ppvBasis[a][0] = XMVectorNegate(ppvBasis[a][0]); + + fDet = -fDet; + } + + fDet -= 1.0f; + fDet *= fDet; + + if(XM_DECOMP_EPSILON < fDet) + { +// Non-SRT matrix encountered + return FALSE; + } + + // generate the quaternion from the matrix + outRotQuat[0] = XMQuaternionRotationMatrix(matTemp); + return TRUE; +} + +//------------------------------------------------------------------------------ +// Transformation operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixIdentity() +{ +#if defined(_XM_NO_INTRINSICS_) + + XMMATRIX M; + M.r[0] = g_XMIdentityR0.v; + M.r[1] = g_XMIdentityR1.v; + M.r[2] = g_XMIdentityR2.v; + M.r[3] = g_XMIdentityR3.v; + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMMATRIX M; + M.r[0] = g_XMIdentityR0; + M.r[1] = g_XMIdentityR1; + M.r[2] = g_XMIdentityR2; + M.r[3] = g_XMIdentityR3; + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixSet +( + FLOAT m00, FLOAT m01, FLOAT m02, FLOAT m03, + FLOAT m10, FLOAT m11, FLOAT m12, FLOAT m13, + FLOAT m20, FLOAT m21, FLOAT m22, FLOAT m23, + FLOAT m30, FLOAT m31, FLOAT m32, FLOAT m33 +) +{ + XMMATRIX M; + + M.r[0] = XMVectorSet(m00, m01, m02, m03); + M.r[1] = XMVectorSet(m10, m11, m12, m13); + M.r[2] = XMVectorSet(m20, m21, m22, m23); + M.r[3] = XMVectorSet(m30, m31, m32, m33); + + return M; +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixTranslation +( + FLOAT OffsetX, + FLOAT OffsetY, + FLOAT OffsetZ +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMMATRIX M; + + M.m[0][0] = 1.0f; + M.m[0][1] = 0.0f; + M.m[0][2] = 0.0f; + M.m[0][3] = 0.0f; + + M.m[1][0] = 0.0f; + M.m[1][1] = 1.0f; + M.m[1][2] = 0.0f; + M.m[1][3] = 0.0f; + + M.m[2][0] = 0.0f; + M.m[2][1] = 0.0f; + M.m[2][2] = 1.0f; + M.m[2][3] = 0.0f; + + M.m[3][0] = OffsetX; + M.m[3][1] = OffsetY; + M.m[3][2] = OffsetZ; + M.m[3][3] = 1.0f; + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMMATRIX M; + M.r[0] = g_XMIdentityR0; + M.r[1] = g_XMIdentityR1; + M.r[2] = g_XMIdentityR2; + M.r[3] = _mm_set_ps(1.0f,OffsetZ,OffsetY,OffsetX); + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixTranslationFromVector +( + FXMVECTOR Offset +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMMATRIX M; + M.m[0][0] = 1.0f; + M.m[0][1] = 0.0f; + M.m[0][2] = 0.0f; + M.m[0][3] = 0.0f; + + M.m[1][0] = 0.0f; + M.m[1][1] = 1.0f; + M.m[1][2] = 0.0f; + M.m[1][3] = 0.0f; + + M.m[2][0] = 0.0f; + M.m[2][1] = 0.0f; + M.m[2][2] = 1.0f; + M.m[2][3] = 0.0f; + + M.m[3][0] = Offset.vector4_f32[0]; + M.m[3][1] = Offset.vector4_f32[1]; + M.m[3][2] = Offset.vector4_f32[2]; + M.m[3][3] = 1.0f; + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_and_ps(Offset,g_XMMask3); + vTemp = _mm_or_ps(vTemp,g_XMIdentityR3); + XMMATRIX M; + M.r[0] = g_XMIdentityR0; + M.r[1] = g_XMIdentityR1; + M.r[2] = g_XMIdentityR2; + M.r[3] = vTemp; + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixScaling +( + FLOAT ScaleX, + FLOAT ScaleY, + FLOAT ScaleZ +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMMATRIX M; + + M.r[0] = XMVectorSet(ScaleX, 0.0f, 0.0f, 0.0f); + M.r[1] = XMVectorSet(0.0f, ScaleY, 0.0f, 0.0f); + M.r[2] = XMVectorSet(0.0f, 0.0f, ScaleZ, 0.0f); + + M.r[3] = g_XMIdentityR3.v; + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMMATRIX M; + M.r[0] = _mm_set_ps( 0, 0, 0, ScaleX ); + M.r[1] = _mm_set_ps( 0, 0, ScaleY, 0 ); + M.r[2] = _mm_set_ps( 0, ScaleZ, 0, 0 ); + M.r[3] = g_XMIdentityR3; + return M; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixScalingFromVector +( + FXMVECTOR Scale +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMMATRIX M; + M.m[0][0] = Scale.vector4_f32[0]; + M.m[0][1] = 0.0f; + M.m[0][2] = 0.0f; + M.m[0][3] = 0.0f; + + M.m[1][0] = 0.0f; + M.m[1][1] = Scale.vector4_f32[1]; + M.m[1][2] = 0.0f; + M.m[1][3] = 0.0f; + + M.m[2][0] = 0.0f; + M.m[2][1] = 0.0f; + M.m[2][2] = Scale.vector4_f32[2]; + M.m[2][3] = 0.0f; + + M.m[3][0] = 0.0f; + M.m[3][1] = 0.0f; + M.m[3][2] = 0.0f; + M.m[3][3] = 1.0f; + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMMATRIX M; + M.r[0] = _mm_and_ps(Scale,g_XMMaskX); + M.r[1] = _mm_and_ps(Scale,g_XMMaskY); + M.r[2] = _mm_and_ps(Scale,g_XMMaskZ); + M.r[3] = g_XMIdentityR3; + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMMATRIX XMMatrixRotationX +( + FLOAT Angle +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMMATRIX M; + + FLOAT fSinAngle = sinf(Angle); + FLOAT fCosAngle = cosf(Angle); + + M.m[0][0] = 1.0f; + M.m[0][1] = 0.0f; + M.m[0][2] = 0.0f; + M.m[0][3] = 0.0f; + + M.m[1][0] = 0.0f; + M.m[1][1] = fCosAngle; + M.m[1][2] = fSinAngle; + M.m[1][3] = 0.0f; + + M.m[2][0] = 0.0f; + M.m[2][1] = -fSinAngle; + M.m[2][2] = fCosAngle; + M.m[2][3] = 0.0f; + + M.m[3][0] = 0.0f; + M.m[3][1] = 0.0f; + M.m[3][2] = 0.0f; + M.m[3][3] = 1.0f; + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + FLOAT SinAngle = sinf(Angle); + FLOAT CosAngle = cosf(Angle); + + XMVECTOR vSin = _mm_set_ss(SinAngle); + XMVECTOR vCos = _mm_set_ss(CosAngle); + // x = 0,y = cos,z = sin, w = 0 + vCos = _mm_shuffle_ps(vCos,vSin,_MM_SHUFFLE(3,0,0,3)); + XMMATRIX M; + M.r[0] = g_XMIdentityR0; + M.r[1] = vCos; + // x = 0,y = sin,z = cos, w = 0 + vCos = _mm_shuffle_ps(vCos,vCos,_MM_SHUFFLE(3,1,2,0)); + // x = 0,y = -sin,z = cos, w = 0 + vCos = _mm_mul_ps(vCos,g_XMNegateY); + M.r[2] = vCos; + M.r[3] = g_XMIdentityR3; + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMMATRIX XMMatrixRotationY +( + FLOAT Angle +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMMATRIX M; + + FLOAT fSinAngle = sinf(Angle); + FLOAT fCosAngle = cosf(Angle); + + M.m[0][0] = fCosAngle; + M.m[0][1] = 0.0f; + M.m[0][2] = -fSinAngle; + M.m[0][3] = 0.0f; + + M.m[1][0] = 0.0f; + M.m[1][1] = 1.0f; + M.m[1][2] = 0.0f; + M.m[1][3] = 0.0f; + + M.m[2][0] = fSinAngle; + M.m[2][1] = 0.0f; + M.m[2][2] = fCosAngle; + M.m[2][3] = 0.0f; + + M.m[3][0] = 0.0f; + M.m[3][1] = 0.0f; + M.m[3][2] = 0.0f; + M.m[3][3] = 1.0f; + return M; +#elif defined(_XM_SSE_INTRINSICS_) + FLOAT SinAngle = sinf(Angle); + FLOAT CosAngle = cosf(Angle); + + XMVECTOR vSin = _mm_set_ss(SinAngle); + XMVECTOR vCos = _mm_set_ss(CosAngle); + // x = sin,y = 0,z = cos, w = 0 + vSin = _mm_shuffle_ps(vSin,vCos,_MM_SHUFFLE(3,0,3,0)); + XMMATRIX M; + M.r[2] = vSin; + M.r[1] = g_XMIdentityR1; + // x = cos,y = 0,z = sin, w = 0 + vSin = _mm_shuffle_ps(vSin,vSin,_MM_SHUFFLE(3,0,1,2)); + // x = cos,y = 0,z = -sin, w = 0 + vSin = _mm_mul_ps(vSin,g_XMNegateZ); + M.r[0] = vSin; + M.r[3] = g_XMIdentityR3; + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMMATRIX XMMatrixRotationZ +( + FLOAT Angle +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMMATRIX M; + + FLOAT fSinAngle = sinf(Angle); + FLOAT fCosAngle = cosf(Angle); + + M.m[0][0] = fCosAngle; + M.m[0][1] = fSinAngle; + M.m[0][2] = 0.0f; + M.m[0][3] = 0.0f; + + M.m[1][0] = -fSinAngle; + M.m[1][1] = fCosAngle; + M.m[1][2] = 0.0f; + M.m[1][3] = 0.0f; + + M.m[2][0] = 0.0f; + M.m[2][1] = 0.0f; + M.m[2][2] = 1.0f; + M.m[2][3] = 0.0f; + + M.m[3][0] = 0.0f; + M.m[3][1] = 0.0f; + M.m[3][2] = 0.0f; + M.m[3][3] = 1.0f; + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + FLOAT SinAngle = sinf(Angle); + FLOAT CosAngle = cosf(Angle); + + XMVECTOR vSin = _mm_set_ss(SinAngle); + XMVECTOR vCos = _mm_set_ss(CosAngle); + // x = cos,y = sin,z = 0, w = 0 + vCos = _mm_unpacklo_ps(vCos,vSin); + XMMATRIX M; + M.r[0] = vCos; + // x = sin,y = cos,z = 0, w = 0 + vCos = _mm_shuffle_ps(vCos,vCos,_MM_SHUFFLE(3,2,0,1)); + // x = cos,y = -sin,z = 0, w = 0 + vCos = _mm_mul_ps(vCos,g_XMNegateX); + M.r[1] = vCos; + M.r[2] = g_XMIdentityR2; + M.r[3] = g_XMIdentityR3; + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMMATRIX XMMatrixRotationRollPitchYaw +( + FLOAT Pitch, + FLOAT Yaw, + FLOAT Roll +) +{ + XMVECTOR Angles; + XMMATRIX M; + + Angles = XMVectorSet(Pitch, Yaw, Roll, 0.0f); + M = XMMatrixRotationRollPitchYawFromVector(Angles); + + return M; +} + +//------------------------------------------------------------------------------ + +XMINLINE XMMATRIX XMMatrixRotationRollPitchYawFromVector +( + FXMVECTOR Angles // +) +{ + XMVECTOR Q; + XMMATRIX M; + + Q = XMQuaternionRotationRollPitchYawFromVector(Angles); + M = XMMatrixRotationQuaternion(Q); + + return M; +} + +//------------------------------------------------------------------------------ + +XMINLINE XMMATRIX XMMatrixRotationNormal +( + FXMVECTOR NormalAxis, + FLOAT Angle +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR A; + XMVECTOR N0, N1; + XMVECTOR V0, V1, V2; + XMVECTOR R0, R1, R2; + XMVECTOR C0, C1, C2; + XMMATRIX M; + static CONST XMVECTORU32 SwizzleYZXW = {XM_PERMUTE_0Y, XM_PERMUTE_0Z, XM_PERMUTE_0X, XM_PERMUTE_0W}; + static CONST XMVECTORU32 SwizzleZXYW = {XM_PERMUTE_0Z, XM_PERMUTE_0X, XM_PERMUTE_0Y, XM_PERMUTE_0W}; + static CONST XMVECTORU32 Permute0Z1Y1Z0X = {XM_PERMUTE_0Z, XM_PERMUTE_1Y, XM_PERMUTE_1Z, XM_PERMUTE_0X}; + static CONST XMVECTORU32 Permute0Y1X0Y1X = {XM_PERMUTE_0Y, XM_PERMUTE_1X, XM_PERMUTE_0Y, XM_PERMUTE_1X}; + static CONST XMVECTORU32 Permute0X1X1Y0W = {XM_PERMUTE_0X, XM_PERMUTE_1X, XM_PERMUTE_1Y, XM_PERMUTE_0W}; + static CONST XMVECTORU32 Permute1Z0Y1W0W = {XM_PERMUTE_1Z, XM_PERMUTE_0Y, XM_PERMUTE_1W, XM_PERMUTE_0W}; + static CONST XMVECTORU32 Permute1X1Y0Z0W = {XM_PERMUTE_1X, XM_PERMUTE_1Y, XM_PERMUTE_0Z, XM_PERMUTE_0W}; + + FLOAT fSinAngle = sinf(Angle); + FLOAT fCosAngle = cosf(Angle); + + A = XMVectorSet(fSinAngle, fCosAngle, 1.0f - fCosAngle, 0.0f); + + C2 = XMVectorSplatZ(A); + C1 = XMVectorSplatY(A); + C0 = XMVectorSplatX(A); + + N0 = XMVectorPermute(NormalAxis, NormalAxis, SwizzleYZXW.v); + N1 = XMVectorPermute(NormalAxis, NormalAxis, SwizzleZXYW.v); + + V0 = XMVectorMultiply(C2, N0); + V0 = XMVectorMultiply(V0, N1); + + R0 = XMVectorMultiply(C2, NormalAxis); + R0 = XMVectorMultiplyAdd(R0, NormalAxis, C1); + + R1 = XMVectorMultiplyAdd(C0, NormalAxis, V0); + R2 = XMVectorNegativeMultiplySubtract(C0, NormalAxis, V0); + + V0 = XMVectorSelect(A, R0, g_XMSelect1110.v); + V1 = XMVectorPermute(R1, R2, Permute0Z1Y1Z0X.v); + V2 = XMVectorPermute(R1, R2, Permute0Y1X0Y1X.v); + + M.r[0] = XMVectorPermute(V0, V1, Permute0X1X1Y0W.v); + M.r[1] = XMVectorPermute(V0, V1, Permute1Z0Y1W0W.v); + M.r[2] = XMVectorPermute(V0, V2, Permute1X1Y0Z0W.v); + M.r[3] = g_XMIdentityR3.v; + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR N0, N1; + XMVECTOR V0, V1, V2; + XMVECTOR R0, R1, R2; + XMVECTOR C0, C1, C2; + XMMATRIX M; + + FLOAT fSinAngle = sinf(Angle); + FLOAT fCosAngle = cosf(Angle); + + C2 = _mm_set_ps1(1.0f - fCosAngle); + C1 = _mm_set_ps1(fCosAngle); + C0 = _mm_set_ps1(fSinAngle); + + N0 = _mm_shuffle_ps(NormalAxis,NormalAxis,_MM_SHUFFLE(3,0,2,1)); +// N0 = XMVectorPermute(NormalAxis, NormalAxis, SwizzleYZXW); + N1 = _mm_shuffle_ps(NormalAxis,NormalAxis,_MM_SHUFFLE(3,1,0,2)); +// N1 = XMVectorPermute(NormalAxis, NormalAxis, SwizzleZXYW); + + V0 = _mm_mul_ps(C2, N0); + V0 = _mm_mul_ps(V0, N1); + + R0 = _mm_mul_ps(C2, NormalAxis); + R0 = _mm_mul_ps(R0, NormalAxis); + R0 = _mm_add_ps(R0, C1); + + R1 = _mm_mul_ps(C0, NormalAxis); + R1 = _mm_add_ps(R1, V0); + R2 = _mm_mul_ps(C0, NormalAxis); + R2 = _mm_sub_ps(V0,R2); + + V0 = _mm_and_ps(R0,g_XMMask3); +// V0 = XMVectorSelect(A, R0, g_XMSelect1110); + V1 = _mm_shuffle_ps(R1,R2,_MM_SHUFFLE(2,1,2,0)); + V1 = _mm_shuffle_ps(V1,V1,_MM_SHUFFLE(0,3,2,1)); +// V1 = XMVectorPermute(R1, R2, Permute0Z1Y1Z0X); + V2 = _mm_shuffle_ps(R1,R2,_MM_SHUFFLE(0,0,1,1)); + V2 = _mm_shuffle_ps(V2,V2,_MM_SHUFFLE(2,0,2,0)); +// V2 = XMVectorPermute(R1, R2, Permute0Y1X0Y1X); + + R2 = _mm_shuffle_ps(V0,V1,_MM_SHUFFLE(1,0,3,0)); + R2 = _mm_shuffle_ps(R2,R2,_MM_SHUFFLE(1,3,2,0)); + M.r[0] = R2; +// M.r[0] = XMVectorPermute(V0, V1, Permute0X1X1Y0W); + R2 = _mm_shuffle_ps(V0,V1,_MM_SHUFFLE(3,2,3,1)); + R2 = _mm_shuffle_ps(R2,R2,_MM_SHUFFLE(1,3,0,2)); + M.r[1] = R2; +// M.r[1] = XMVectorPermute(V0, V1, Permute1Z0Y1W0W); + V2 = _mm_shuffle_ps(V2,V0,_MM_SHUFFLE(3,2,1,0)); +// R2 = _mm_shuffle_ps(R2,R2,_MM_SHUFFLE(3,2,1,0)); + M.r[2] = V2; +// M.r[2] = XMVectorPermute(V0, V2, Permute1X1Y0Z0W); + M.r[3] = g_XMIdentityR3; + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMMATRIX XMMatrixRotationAxis +( + FXMVECTOR Axis, + FLOAT Angle +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Normal; + XMMATRIX M; + + XMASSERT(!XMVector3Equal(Axis, XMVectorZero())); + XMASSERT(!XMVector3IsInfinite(Axis)); + + Normal = XMVector3Normalize(Axis); + M = XMMatrixRotationNormal(Normal, Angle); + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(!XMVector3Equal(Axis, XMVectorZero())); + XMASSERT(!XMVector3IsInfinite(Axis)); + XMVECTOR Normal = XMVector3Normalize(Axis); + XMMATRIX M = XMMatrixRotationNormal(Normal, Angle); + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixRotationQuaternion +( + FXMVECTOR Quaternion +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMMATRIX M; + XMVECTOR Q0, Q1; + XMVECTOR V0, V1, V2; + XMVECTOR R0, R1, R2; + static CONST XMVECTOR Constant1110 = {1.0f, 1.0f, 1.0f, 0.0f}; + static CONST XMVECTORU32 SwizzleXXYW = {XM_PERMUTE_0X, XM_PERMUTE_0X, XM_PERMUTE_0Y, XM_PERMUTE_0W}; + static CONST XMVECTORU32 SwizzleZYZW = {XM_PERMUTE_0Z, XM_PERMUTE_0Y, XM_PERMUTE_0Z, XM_PERMUTE_0W}; + static CONST XMVECTORU32 SwizzleYZXW = {XM_PERMUTE_0Y, XM_PERMUTE_0Z, XM_PERMUTE_0X, XM_PERMUTE_0W}; + static CONST XMVECTORU32 Permute0Y0X0X1W = {XM_PERMUTE_0Y, XM_PERMUTE_0X, XM_PERMUTE_0X, XM_PERMUTE_1W}; + static CONST XMVECTORU32 Permute0Z0Z0Y1W = {XM_PERMUTE_0Z, XM_PERMUTE_0Z, XM_PERMUTE_0Y, XM_PERMUTE_1W}; + static CONST XMVECTORU32 Permute0Y1X1Y0Z = {XM_PERMUTE_0Y, XM_PERMUTE_1X, XM_PERMUTE_1Y, XM_PERMUTE_0Z}; + static CONST XMVECTORU32 Permute0X1Z0X1Z = {XM_PERMUTE_0X, XM_PERMUTE_1Z, XM_PERMUTE_0X, XM_PERMUTE_1Z}; + static CONST XMVECTORU32 Permute0X1X1Y0W = {XM_PERMUTE_0X, XM_PERMUTE_1X, XM_PERMUTE_1Y, XM_PERMUTE_0W}; + static CONST XMVECTORU32 Permute1Z0Y1W0W = {XM_PERMUTE_1Z, XM_PERMUTE_0Y, XM_PERMUTE_1W, XM_PERMUTE_0W}; + static CONST XMVECTORU32 Permute1X1Y0Z0W = {XM_PERMUTE_1X, XM_PERMUTE_1Y, XM_PERMUTE_0Z, XM_PERMUTE_0W}; + + Q0 = XMVectorAdd(Quaternion, Quaternion); + Q1 = XMVectorMultiply(Quaternion, Q0); + + V0 = XMVectorPermute(Q1, Constant1110, Permute0Y0X0X1W.v); + V1 = XMVectorPermute(Q1, Constant1110, Permute0Z0Z0Y1W.v); + R0 = XMVectorSubtract(Constant1110, V0); + R0 = XMVectorSubtract(R0, V1); + + V0 = XMVectorPermute(Quaternion, Quaternion, SwizzleXXYW.v); + V1 = XMVectorPermute(Q0, Q0, SwizzleZYZW.v); + V0 = XMVectorMultiply(V0, V1); + + V1 = XMVectorSplatW(Quaternion); + V2 = XMVectorPermute(Q0, Q0, SwizzleYZXW.v); + V1 = XMVectorMultiply(V1, V2); + + R1 = XMVectorAdd(V0, V1); + R2 = XMVectorSubtract(V0, V1); + + V0 = XMVectorPermute(R1, R2, Permute0Y1X1Y0Z.v); + V1 = XMVectorPermute(R1, R2, Permute0X1Z0X1Z.v); + + M.r[0] = XMVectorPermute(R0, V0, Permute0X1X1Y0W.v); + M.r[1] = XMVectorPermute(R0, V0, Permute1Z0Y1W0W.v); + M.r[2] = XMVectorPermute(R0, V1, Permute1X1Y0Z0W.v); + M.r[3] = g_XMIdentityR3.v; + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMMATRIX M; + XMVECTOR Q0, Q1; + XMVECTOR V0, V1, V2; + XMVECTOR R0, R1, R2; + static CONST XMVECTORF32 Constant1110 = {1.0f, 1.0f, 1.0f, 0.0f}; + + Q0 = _mm_add_ps(Quaternion,Quaternion); + Q1 = _mm_mul_ps(Quaternion,Q0); + + V0 = _mm_shuffle_ps(Q1,Q1,_MM_SHUFFLE(3,0,0,1)); + V0 = _mm_and_ps(V0,g_XMMask3); +// V0 = XMVectorPermute(Q1, Constant1110,Permute0Y0X0X1W); + V1 = _mm_shuffle_ps(Q1,Q1,_MM_SHUFFLE(3,1,2,2)); + V1 = _mm_and_ps(V1,g_XMMask3); +// V1 = XMVectorPermute(Q1, Constant1110,Permute0Z0Z0Y1W); + R0 = _mm_sub_ps(Constant1110,V0); + R0 = _mm_sub_ps(R0, V1); + + V0 = _mm_shuffle_ps(Quaternion,Quaternion,_MM_SHUFFLE(3,1,0,0)); +// V0 = XMVectorPermute(Quaternion, Quaternion,SwizzleXXYW); + V1 = _mm_shuffle_ps(Q0,Q0,_MM_SHUFFLE(3,2,1,2)); +// V1 = XMVectorPermute(Q0, Q0,SwizzleZYZW); + V0 = _mm_mul_ps(V0, V1); + + V1 = _mm_shuffle_ps(Quaternion,Quaternion,_MM_SHUFFLE(3,3,3,3)); +// V1 = XMVectorSplatW(Quaternion); + V2 = _mm_shuffle_ps(Q0,Q0,_MM_SHUFFLE(3,0,2,1)); +// V2 = XMVectorPermute(Q0, Q0,SwizzleYZXW); + V1 = _mm_mul_ps(V1, V2); + + R1 = _mm_add_ps(V0, V1); + R2 = _mm_sub_ps(V0, V1); + + V0 = _mm_shuffle_ps(R1,R2,_MM_SHUFFLE(1,0,2,1)); + V0 = _mm_shuffle_ps(V0,V0,_MM_SHUFFLE(1,3,2,0)); +// V0 = XMVectorPermute(R1, R2,Permute0Y1X1Y0Z); + V1 = _mm_shuffle_ps(R1,R2,_MM_SHUFFLE(2,2,0,0)); + V1 = _mm_shuffle_ps(V1,V1,_MM_SHUFFLE(2,0,2,0)); +// V1 = XMVectorPermute(R1, R2,Permute0X1Z0X1Z); + + Q1 = _mm_shuffle_ps(R0,V0,_MM_SHUFFLE(1,0,3,0)); + Q1 = _mm_shuffle_ps(Q1,Q1,_MM_SHUFFLE(1,3,2,0)); + M.r[0] = Q1; +// M.r[0] = XMVectorPermute(R0, V0,Permute0X1X1Y0W); + Q1 = _mm_shuffle_ps(R0,V0,_MM_SHUFFLE(3,2,3,1)); + Q1 = _mm_shuffle_ps(Q1,Q1,_MM_SHUFFLE(1,3,0,2)); + M.r[1] = Q1; +// M.r[1] = XMVectorPermute(R0, V0,Permute1Z0Y1W0W); + Q1 = _mm_shuffle_ps(V1,R0,_MM_SHUFFLE(3,2,1,0)); + M.r[2] = Q1; +// M.r[2] = XMVectorPermute(R0, V1,Permute1X1Y0Z0W); + M.r[3] = g_XMIdentityR3; + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMMATRIX XMMatrixTransformation2D +( + FXMVECTOR ScalingOrigin, + FLOAT ScalingOrientation, + FXMVECTOR Scaling, + FXMVECTOR RotationOrigin, + FLOAT Rotation, + CXMVECTOR Translation +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMMATRIX M; + XMVECTOR VScaling; + XMVECTOR NegScalingOrigin; + XMVECTOR VScalingOrigin; + XMMATRIX MScalingOriginI; + XMMATRIX MScalingOrientation; + XMMATRIX MScalingOrientationT; + XMMATRIX MScaling; + XMVECTOR VRotationOrigin; + XMMATRIX MRotation; + XMVECTOR VTranslation; + + // M = Inverse(MScalingOrigin) * Transpose(MScalingOrientation) * MScaling * MScalingOrientation * + // MScalingOrigin * Inverse(MRotationOrigin) * MRotation * MRotationOrigin * MTranslation; + + VScalingOrigin = XMVectorSelect(g_XMSelect1100.v, ScalingOrigin, g_XMSelect1100.v); + NegScalingOrigin = XMVectorNegate(VScalingOrigin); + + MScalingOriginI = XMMatrixTranslationFromVector(NegScalingOrigin); + MScalingOrientation = XMMatrixRotationZ(ScalingOrientation); + MScalingOrientationT = XMMatrixTranspose(MScalingOrientation); + VScaling = XMVectorSelect(g_XMOne.v, Scaling, g_XMSelect1100.v); + MScaling = XMMatrixScalingFromVector(VScaling); + VRotationOrigin = XMVectorSelect(g_XMSelect1100.v, RotationOrigin, g_XMSelect1100.v); + MRotation = XMMatrixRotationZ(Rotation); + VTranslation = XMVectorSelect(g_XMSelect1100.v, Translation,g_XMSelect1100.v); + + M = XMMatrixMultiply(MScalingOriginI, MScalingOrientationT); + M = XMMatrixMultiply(M, MScaling); + M = XMMatrixMultiply(M, MScalingOrientation); + M.r[3] = XMVectorAdd(M.r[3], VScalingOrigin); + M.r[3] = XMVectorSubtract(M.r[3], VRotationOrigin); + M = XMMatrixMultiply(M, MRotation); + M.r[3] = XMVectorAdd(M.r[3], VRotationOrigin); + M.r[3] = XMVectorAdd(M.r[3], VTranslation); + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMMATRIX M; + XMVECTOR VScaling; + XMVECTOR NegScalingOrigin; + XMVECTOR VScalingOrigin; + XMMATRIX MScalingOriginI; + XMMATRIX MScalingOrientation; + XMMATRIX MScalingOrientationT; + XMMATRIX MScaling; + XMVECTOR VRotationOrigin; + XMMATRIX MRotation; + XMVECTOR VTranslation; + + // M = Inverse(MScalingOrigin) * Transpose(MScalingOrientation) * MScaling * MScalingOrientation * + // MScalingOrigin * Inverse(MRotationOrigin) * MRotation * MRotationOrigin * MTranslation; + static const XMVECTORU32 Mask2 = {0xFFFFFFFF,0xFFFFFFFF,0,0}; + static const XMVECTORF32 ZWOne = {0,0,1.0f,1.0f}; + + VScalingOrigin = _mm_and_ps(ScalingOrigin, Mask2); + NegScalingOrigin = XMVectorNegate(VScalingOrigin); + + MScalingOriginI = XMMatrixTranslationFromVector(NegScalingOrigin); + MScalingOrientation = XMMatrixRotationZ(ScalingOrientation); + MScalingOrientationT = XMMatrixTranspose(MScalingOrientation); + VScaling = _mm_and_ps(Scaling, Mask2); + VScaling = _mm_or_ps(VScaling,ZWOne); + MScaling = XMMatrixScalingFromVector(VScaling); + VRotationOrigin = _mm_and_ps(RotationOrigin, Mask2); + MRotation = XMMatrixRotationZ(Rotation); + VTranslation = _mm_and_ps(Translation, Mask2); + + M = XMMatrixMultiply(MScalingOriginI, MScalingOrientationT); + M = XMMatrixMultiply(M, MScaling); + M = XMMatrixMultiply(M, MScalingOrientation); + M.r[3] = XMVectorAdd(M.r[3], VScalingOrigin); + M.r[3] = XMVectorSubtract(M.r[3], VRotationOrigin); + M = XMMatrixMultiply(M, MRotation); + M.r[3] = XMVectorAdd(M.r[3], VRotationOrigin); + M.r[3] = XMVectorAdd(M.r[3], VTranslation); + + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMMATRIX XMMatrixTransformation +( + FXMVECTOR ScalingOrigin, + FXMVECTOR ScalingOrientationQuaternion, + FXMVECTOR Scaling, + CXMVECTOR RotationOrigin, + CXMVECTOR RotationQuaternion, + CXMVECTOR Translation +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMMATRIX M; + XMVECTOR NegScalingOrigin; + XMVECTOR VScalingOrigin; + XMMATRIX MScalingOriginI; + XMMATRIX MScalingOrientation; + XMMATRIX MScalingOrientationT; + XMMATRIX MScaling; + XMVECTOR VRotationOrigin; + XMMATRIX MRotation; + XMVECTOR VTranslation; + + // M = Inverse(MScalingOrigin) * Transpose(MScalingOrientation) * MScaling * MScalingOrientation * + // MScalingOrigin * Inverse(MRotationOrigin) * MRotation * MRotationOrigin * MTranslation; + + VScalingOrigin = XMVectorSelect(g_XMSelect1110.v, ScalingOrigin, g_XMSelect1110.v); + NegScalingOrigin = XMVectorNegate(ScalingOrigin); + + MScalingOriginI = XMMatrixTranslationFromVector(NegScalingOrigin); + MScalingOrientation = XMMatrixRotationQuaternion(ScalingOrientationQuaternion); + MScalingOrientationT = XMMatrixTranspose(MScalingOrientation); + MScaling = XMMatrixScalingFromVector(Scaling); + VRotationOrigin = XMVectorSelect(g_XMSelect1110.v, RotationOrigin, g_XMSelect1110.v); + MRotation = XMMatrixRotationQuaternion(RotationQuaternion); + VTranslation = XMVectorSelect(g_XMSelect1110.v, Translation, g_XMSelect1110.v); + + M = XMMatrixMultiply(MScalingOriginI, MScalingOrientationT); + M = XMMatrixMultiply(M, MScaling); + M = XMMatrixMultiply(M, MScalingOrientation); + M.r[3] = XMVectorAdd(M.r[3], VScalingOrigin); + M.r[3] = XMVectorSubtract(M.r[3], VRotationOrigin); + M = XMMatrixMultiply(M, MRotation); + M.r[3] = XMVectorAdd(M.r[3], VRotationOrigin); + M.r[3] = XMVectorAdd(M.r[3], VTranslation); + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMMATRIX M; + XMVECTOR NegScalingOrigin; + XMVECTOR VScalingOrigin; + XMMATRIX MScalingOriginI; + XMMATRIX MScalingOrientation; + XMMATRIX MScalingOrientationT; + XMMATRIX MScaling; + XMVECTOR VRotationOrigin; + XMMATRIX MRotation; + XMVECTOR VTranslation; + + // M = Inverse(MScalingOrigin) * Transpose(MScalingOrientation) * MScaling * MScalingOrientation * + // MScalingOrigin * Inverse(MRotationOrigin) * MRotation * MRotationOrigin * MTranslation; + + VScalingOrigin = _mm_and_ps(ScalingOrigin,g_XMMask3); + NegScalingOrigin = XMVectorNegate(ScalingOrigin); + + MScalingOriginI = XMMatrixTranslationFromVector(NegScalingOrigin); + MScalingOrientation = XMMatrixRotationQuaternion(ScalingOrientationQuaternion); + MScalingOrientationT = XMMatrixTranspose(MScalingOrientation); + MScaling = XMMatrixScalingFromVector(Scaling); + VRotationOrigin = _mm_and_ps(RotationOrigin,g_XMMask3); + MRotation = XMMatrixRotationQuaternion(RotationQuaternion); + VTranslation = _mm_and_ps(Translation,g_XMMask3); + + M = XMMatrixMultiply(MScalingOriginI, MScalingOrientationT); + M = XMMatrixMultiply(M, MScaling); + M = XMMatrixMultiply(M, MScalingOrientation); + M.r[3] = XMVectorAdd(M.r[3], VScalingOrigin); + M.r[3] = XMVectorSubtract(M.r[3], VRotationOrigin); + M = XMMatrixMultiply(M, MRotation); + M.r[3] = XMVectorAdd(M.r[3], VRotationOrigin); + M.r[3] = XMVectorAdd(M.r[3], VTranslation); + + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMMATRIX XMMatrixAffineTransformation2D +( + FXMVECTOR Scaling, + FXMVECTOR RotationOrigin, + FLOAT Rotation, + FXMVECTOR Translation +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMMATRIX M; + XMVECTOR VScaling; + XMMATRIX MScaling; + XMVECTOR VRotationOrigin; + XMMATRIX MRotation; + XMVECTOR VTranslation; + + // M = MScaling * Inverse(MRotationOrigin) * MRotation * MRotationOrigin * MTranslation; + + VScaling = XMVectorSelect(g_XMOne.v, Scaling, g_XMSelect1100.v); + MScaling = XMMatrixScalingFromVector(VScaling); + VRotationOrigin = XMVectorSelect(g_XMSelect1100.v, RotationOrigin, g_XMSelect1100.v); + MRotation = XMMatrixRotationZ(Rotation); + VTranslation = XMVectorSelect(g_XMSelect1100.v, Translation,g_XMSelect1100.v); + + M = MScaling; + M.r[3] = XMVectorSubtract(M.r[3], VRotationOrigin); + M = XMMatrixMultiply(M, MRotation); + M.r[3] = XMVectorAdd(M.r[3], VRotationOrigin); + M.r[3] = XMVectorAdd(M.r[3], VTranslation); + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMMATRIX M; + XMVECTOR VScaling; + XMMATRIX MScaling; + XMVECTOR VRotationOrigin; + XMMATRIX MRotation; + XMVECTOR VTranslation; + static const XMVECTORU32 Mask2 = {0xFFFFFFFFU,0xFFFFFFFFU,0,0}; + static const XMVECTORF32 ZW1 = {0,0,1.0f,1.0f}; + + // M = MScaling * Inverse(MRotationOrigin) * MRotation * MRotationOrigin * MTranslation; + + VScaling = _mm_and_ps(Scaling, Mask2); + VScaling = _mm_or_ps(VScaling, ZW1); + MScaling = XMMatrixScalingFromVector(VScaling); + VRotationOrigin = _mm_and_ps(RotationOrigin, Mask2); + MRotation = XMMatrixRotationZ(Rotation); + VTranslation = _mm_and_ps(Translation, Mask2); + + M = MScaling; + M.r[3] = _mm_sub_ps(M.r[3], VRotationOrigin); + M = XMMatrixMultiply(M, MRotation); + M.r[3] = _mm_add_ps(M.r[3], VRotationOrigin); + M.r[3] = _mm_add_ps(M.r[3], VTranslation); + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMMATRIX XMMatrixAffineTransformation +( + FXMVECTOR Scaling, + FXMVECTOR RotationOrigin, + FXMVECTOR RotationQuaternion, + CXMVECTOR Translation +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMMATRIX M; + XMMATRIX MScaling; + XMVECTOR VRotationOrigin; + XMMATRIX MRotation; + XMVECTOR VTranslation; + + // M = MScaling * Inverse(MRotationOrigin) * MRotation * MRotationOrigin * MTranslation; + + MScaling = XMMatrixScalingFromVector(Scaling); + VRotationOrigin = XMVectorSelect(g_XMSelect1110.v, RotationOrigin,g_XMSelect1110.v); + MRotation = XMMatrixRotationQuaternion(RotationQuaternion); + VTranslation = XMVectorSelect(g_XMSelect1110.v, Translation,g_XMSelect1110.v); + + M = MScaling; + M.r[3] = XMVectorSubtract(M.r[3], VRotationOrigin); + M = XMMatrixMultiply(M, MRotation); + M.r[3] = XMVectorAdd(M.r[3], VRotationOrigin); + M.r[3] = XMVectorAdd(M.r[3], VTranslation); + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMMATRIX M; + XMMATRIX MScaling; + XMVECTOR VRotationOrigin; + XMMATRIX MRotation; + XMVECTOR VTranslation; + + // M = MScaling * Inverse(MRotationOrigin) * MRotation * MRotationOrigin * MTranslation; + + MScaling = XMMatrixScalingFromVector(Scaling); + VRotationOrigin = _mm_and_ps(RotationOrigin,g_XMMask3); + MRotation = XMMatrixRotationQuaternion(RotationQuaternion); + VTranslation = _mm_and_ps(Translation,g_XMMask3); + + M = MScaling; + M.r[3] = _mm_sub_ps(M.r[3], VRotationOrigin); + M = XMMatrixMultiply(M, MRotation); + M.r[3] = _mm_add_ps(M.r[3], VRotationOrigin); + M.r[3] = _mm_add_ps(M.r[3], VTranslation); + + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixReflect +( + FXMVECTOR ReflectionPlane +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR P; + XMVECTOR S; + XMVECTOR A, B, C, D; + XMMATRIX M; + static CONST XMVECTOR NegativeTwo = {-2.0f, -2.0f, -2.0f, 0.0f}; + + XMASSERT(!XMVector3Equal(ReflectionPlane, XMVectorZero())); + XMASSERT(!XMPlaneIsInfinite(ReflectionPlane)); + + P = XMPlaneNormalize(ReflectionPlane); + S = XMVectorMultiply(P, NegativeTwo); + + A = XMVectorSplatX(P); + B = XMVectorSplatY(P); + C = XMVectorSplatZ(P); + D = XMVectorSplatW(P); + + M.r[0] = XMVectorMultiplyAdd(A, S, g_XMIdentityR0.v); + M.r[1] = XMVectorMultiplyAdd(B, S, g_XMIdentityR1.v); + M.r[2] = XMVectorMultiplyAdd(C, S, g_XMIdentityR2.v); + M.r[3] = XMVectorMultiplyAdd(D, S, g_XMIdentityR3.v); + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMMATRIX M; + static CONST XMVECTORF32 NegativeTwo = {-2.0f, -2.0f, -2.0f, 0.0f}; + + XMASSERT(!XMVector3Equal(ReflectionPlane, XMVectorZero())); + XMASSERT(!XMPlaneIsInfinite(ReflectionPlane)); + + XMVECTOR P = XMPlaneNormalize(ReflectionPlane); + XMVECTOR S = _mm_mul_ps(P,NegativeTwo); + XMVECTOR X = _mm_shuffle_ps(P,P,_MM_SHUFFLE(0,0,0,0)); + XMVECTOR Y = _mm_shuffle_ps(P,P,_MM_SHUFFLE(1,1,1,1)); + XMVECTOR Z = _mm_shuffle_ps(P,P,_MM_SHUFFLE(2,2,2,2)); + P = _mm_shuffle_ps(P,P,_MM_SHUFFLE(3,3,3,3)); + X = _mm_mul_ps(X,S); + Y = _mm_mul_ps(Y,S); + Z = _mm_mul_ps(Z,S); + P = _mm_mul_ps(P,S); + X = _mm_add_ps(X,g_XMIdentityR0); + Y = _mm_add_ps(Y,g_XMIdentityR1); + Z = _mm_add_ps(Z,g_XMIdentityR2); + P = _mm_add_ps(P,g_XMIdentityR3); + M.r[0] = X; + M.r[1] = Y; + M.r[2] = Z; + M.r[3] = P; + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixShadow +( + FXMVECTOR ShadowPlane, + FXMVECTOR LightPosition +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR P; + XMVECTOR Dot; + XMVECTOR A, B, C, D; + XMMATRIX M; + static CONST XMVECTORU32 Select0001 = {XM_SELECT_0, XM_SELECT_0, XM_SELECT_0, XM_SELECT_1}; + + XMASSERT(!XMVector3Equal(ShadowPlane, XMVectorZero())); + XMASSERT(!XMPlaneIsInfinite(ShadowPlane)); + + P = XMPlaneNormalize(ShadowPlane); + Dot = XMPlaneDot(P, LightPosition); + P = XMVectorNegate(P); + D = XMVectorSplatW(P); + C = XMVectorSplatZ(P); + B = XMVectorSplatY(P); + A = XMVectorSplatX(P); + Dot = XMVectorSelect(Select0001.v, Dot, Select0001.v); + M.r[3] = XMVectorMultiplyAdd(D, LightPosition, Dot); + Dot = XMVectorRotateLeft(Dot, 1); + M.r[2] = XMVectorMultiplyAdd(C, LightPosition, Dot); + Dot = XMVectorRotateLeft(Dot, 1); + M.r[1] = XMVectorMultiplyAdd(B, LightPosition, Dot); + Dot = XMVectorRotateLeft(Dot, 1); + M.r[0] = XMVectorMultiplyAdd(A, LightPosition, Dot); + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMMATRIX M; + XMASSERT(!XMVector3Equal(ShadowPlane, XMVectorZero())); + XMASSERT(!XMPlaneIsInfinite(ShadowPlane)); + XMVECTOR P = XMPlaneNormalize(ShadowPlane); + XMVECTOR Dot = XMPlaneDot(P,LightPosition); + // Negate + P = _mm_mul_ps(P,g_XMNegativeOne); + XMVECTOR X = _mm_shuffle_ps(P,P,_MM_SHUFFLE(0,0,0,0)); + XMVECTOR Y = _mm_shuffle_ps(P,P,_MM_SHUFFLE(1,1,1,1)); + XMVECTOR Z = _mm_shuffle_ps(P,P,_MM_SHUFFLE(2,2,2,2)); + P = _mm_shuffle_ps(P,P,_MM_SHUFFLE(3,3,3,3)); + Dot = _mm_and_ps(Dot,g_XMMaskW); + X = _mm_mul_ps(X,LightPosition); + Y = _mm_mul_ps(Y,LightPosition); + Z = _mm_mul_ps(Z,LightPosition); + P = _mm_mul_ps(P,LightPosition); + P = _mm_add_ps(P,Dot); + Dot = _mm_shuffle_ps(Dot,Dot,_MM_SHUFFLE(0,3,2,1)); + Z = _mm_add_ps(Z,Dot); + Dot = _mm_shuffle_ps(Dot,Dot,_MM_SHUFFLE(0,3,2,1)); + Y = _mm_add_ps(Y,Dot); + Dot = _mm_shuffle_ps(Dot,Dot,_MM_SHUFFLE(0,3,2,1)); + X = _mm_add_ps(X,Dot); + // Store the resulting matrix + M.r[0] = X; + M.r[1] = Y; + M.r[2] = Z; + M.r[3] = P; + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// View and projection initialization operations +//------------------------------------------------------------------------------ + + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixLookAtLH +( + FXMVECTOR EyePosition, + FXMVECTOR FocusPosition, + FXMVECTOR UpDirection +) +{ + XMVECTOR EyeDirection; + XMMATRIX M; + + EyeDirection = XMVectorSubtract(FocusPosition, EyePosition); + M = XMMatrixLookToLH(EyePosition, EyeDirection, UpDirection); + + return M; +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixLookAtRH +( + FXMVECTOR EyePosition, + FXMVECTOR FocusPosition, + FXMVECTOR UpDirection +) +{ + XMVECTOR NegEyeDirection; + XMMATRIX M; + + NegEyeDirection = XMVectorSubtract(EyePosition, FocusPosition); + M = XMMatrixLookToLH(EyePosition, NegEyeDirection, UpDirection); + + return M; +} + +//------------------------------------------------------------------------------ + +XMINLINE XMMATRIX XMMatrixLookToLH +( + FXMVECTOR EyePosition, + FXMVECTOR EyeDirection, + FXMVECTOR UpDirection +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR NegEyePosition; + XMVECTOR D0, D1, D2; + XMVECTOR R0, R1, R2; + XMMATRIX M; + + XMASSERT(!XMVector3Equal(EyeDirection, XMVectorZero())); + XMASSERT(!XMVector3IsInfinite(EyeDirection)); + XMASSERT(!XMVector3Equal(UpDirection, XMVectorZero())); + XMASSERT(!XMVector3IsInfinite(UpDirection)); + + R2 = XMVector3Normalize(EyeDirection); + + R0 = XMVector3Cross(UpDirection, R2); + R0 = XMVector3Normalize(R0); + + R1 = XMVector3Cross(R2, R0); + + NegEyePosition = XMVectorNegate(EyePosition); + + D0 = XMVector3Dot(R0, NegEyePosition); + D1 = XMVector3Dot(R1, NegEyePosition); + D2 = XMVector3Dot(R2, NegEyePosition); + + M.r[0] = XMVectorSelect(D0, R0, g_XMSelect1110.v); + M.r[1] = XMVectorSelect(D1, R1, g_XMSelect1110.v); + M.r[2] = XMVectorSelect(D2, R2, g_XMSelect1110.v); + M.r[3] = g_XMIdentityR3.v; + + M = XMMatrixTranspose(M); + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMMATRIX M; + + XMASSERT(!XMVector3Equal(EyeDirection, XMVectorZero())); + XMASSERT(!XMVector3IsInfinite(EyeDirection)); + XMASSERT(!XMVector3Equal(UpDirection, XMVectorZero())); + XMASSERT(!XMVector3IsInfinite(UpDirection)); + + XMVECTOR R2 = XMVector3Normalize(EyeDirection); + XMVECTOR R0 = XMVector3Cross(UpDirection, R2); + R0 = XMVector3Normalize(R0); + XMVECTOR R1 = XMVector3Cross(R2,R0); + XMVECTOR NegEyePosition = _mm_mul_ps(EyePosition,g_XMNegativeOne); + XMVECTOR D0 = XMVector3Dot(R0,NegEyePosition); + XMVECTOR D1 = XMVector3Dot(R1,NegEyePosition); + XMVECTOR D2 = XMVector3Dot(R2,NegEyePosition); + R0 = _mm_and_ps(R0,g_XMMask3); + R1 = _mm_and_ps(R1,g_XMMask3); + R2 = _mm_and_ps(R2,g_XMMask3); + D0 = _mm_and_ps(D0,g_XMMaskW); + D1 = _mm_and_ps(D1,g_XMMaskW); + D2 = _mm_and_ps(D2,g_XMMaskW); + D0 = _mm_or_ps(D0,R0); + D1 = _mm_or_ps(D1,R1); + D2 = _mm_or_ps(D2,R2); + M.r[0] = D0; + M.r[1] = D1; + M.r[2] = D2; + M.r[3] = g_XMIdentityR3; + M = XMMatrixTranspose(M); + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixLookToRH +( + FXMVECTOR EyePosition, + FXMVECTOR EyeDirection, + FXMVECTOR UpDirection +) +{ + XMVECTOR NegEyeDirection; + XMMATRIX M; + + NegEyeDirection = XMVectorNegate(EyeDirection); + M = XMMatrixLookToLH(EyePosition, NegEyeDirection, UpDirection); + + return M; +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixPerspectiveLH +( + FLOAT ViewWidth, + FLOAT ViewHeight, + FLOAT NearZ, + FLOAT FarZ +) +{ +#if defined(_XM_NO_INTRINSICS_) + + FLOAT TwoNearZ, fRange; + XMMATRIX M; + + XMASSERT(!XMScalarNearEqual(ViewWidth, 0.0f, 0.00001f)); + XMASSERT(!XMScalarNearEqual(ViewHeight, 0.0f, 0.00001f)); + XMASSERT(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); + + TwoNearZ = NearZ + NearZ; + fRange = FarZ / (FarZ - NearZ); + M.m[0][0] = TwoNearZ / ViewWidth; + M.m[0][1] = 0.0f; + M.m[0][2] = 0.0f; + M.m[0][3] = 0.0f; + + M.m[1][0] = 0.0f; + M.m[1][1] = TwoNearZ / ViewHeight; + M.m[1][2] = 0.0f; + M.m[1][3] = 0.0f; + + M.m[2][0] = 0.0f; + M.m[2][1] = 0.0f; + M.m[2][2] = fRange; + M.m[2][3] = 1.0f; + + M.m[3][0] = 0.0f; + M.m[3][1] = 0.0f; + M.m[3][2] = -fRange * NearZ; + M.m[3][3] = 0.0f; + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(!XMScalarNearEqual(ViewWidth, 0.0f, 0.00001f)); + XMASSERT(!XMScalarNearEqual(ViewHeight, 0.0f, 0.00001f)); + XMASSERT(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); + + XMMATRIX M; + FLOAT TwoNearZ = NearZ + NearZ; + FLOAT fRange = FarZ / (FarZ - NearZ); + // Note: This is recorded on the stack + XMVECTOR rMem = { + TwoNearZ / ViewWidth, + TwoNearZ / ViewHeight, + fRange, + -fRange * NearZ + }; + // Copy from memory to SSE register + XMVECTOR vValues = rMem; + XMVECTOR vTemp = _mm_setzero_ps(); + // Copy x only + vTemp = _mm_move_ss(vTemp,vValues); + // TwoNearZ / ViewWidth,0,0,0 + M.r[0] = vTemp; + // 0,TwoNearZ / ViewHeight,0,0 + vTemp = vValues; + vTemp = _mm_and_ps(vTemp,g_XMMaskY); + M.r[1] = vTemp; + // x=fRange,y=-fRange * NearZ,0,1.0f + vValues = _mm_shuffle_ps(vValues,g_XMIdentityR3,_MM_SHUFFLE(3,2,3,2)); + // 0,0,fRange,1.0f + vTemp = _mm_setzero_ps(); + vTemp = _mm_shuffle_ps(vTemp,vValues,_MM_SHUFFLE(3,0,0,0)); + M.r[2] = vTemp; + // 0,0,-fRange * NearZ,0 + vTemp = _mm_shuffle_ps(vTemp,vValues,_MM_SHUFFLE(2,1,0,0)); + M.r[3] = vTemp; + + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixPerspectiveRH +( + FLOAT ViewWidth, + FLOAT ViewHeight, + FLOAT NearZ, + FLOAT FarZ +) +{ +#if defined(_XM_NO_INTRINSICS_) + + FLOAT TwoNearZ, fRange; + XMMATRIX M; + + XMASSERT(!XMScalarNearEqual(ViewWidth, 0.0f, 0.00001f)); + XMASSERT(!XMScalarNearEqual(ViewHeight, 0.0f, 0.00001f)); + XMASSERT(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); + + TwoNearZ = NearZ + NearZ; + fRange = FarZ / (NearZ - FarZ); + M.m[0][0] = TwoNearZ / ViewWidth; + M.m[0][1] = 0.0f; + M.m[0][2] = 0.0f; + M.m[0][3] = 0.0f; + + M.m[1][0] = 0.0f; + M.m[1][1] = TwoNearZ / ViewHeight; + M.m[1][2] = 0.0f; + M.m[1][3] = 0.0f; + + M.m[2][0] = 0.0f; + M.m[2][1] = 0.0f; + M.m[2][2] = fRange; + M.m[2][3] = -1.0f; + + M.m[3][0] = 0.0f; + M.m[3][1] = 0.0f; + M.m[3][2] = fRange * NearZ; + M.m[3][3] = 0.0f; + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(!XMScalarNearEqual(ViewWidth, 0.0f, 0.00001f)); + XMASSERT(!XMScalarNearEqual(ViewHeight, 0.0f, 0.00001f)); + XMASSERT(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); + + XMMATRIX M; + FLOAT TwoNearZ = NearZ + NearZ; + FLOAT fRange = FarZ / (NearZ-FarZ); + // Note: This is recorded on the stack + XMVECTOR rMem = { + TwoNearZ / ViewWidth, + TwoNearZ / ViewHeight, + fRange, + fRange * NearZ + }; + // Copy from memory to SSE register + XMVECTOR vValues = rMem; + XMVECTOR vTemp = _mm_setzero_ps(); + // Copy x only + vTemp = _mm_move_ss(vTemp,vValues); + // TwoNearZ / ViewWidth,0,0,0 + M.r[0] = vTemp; + // 0,TwoNearZ / ViewHeight,0,0 + vTemp = vValues; + vTemp = _mm_and_ps(vTemp,g_XMMaskY); + M.r[1] = vTemp; + // x=fRange,y=-fRange * NearZ,0,-1.0f + vValues = _mm_shuffle_ps(vValues,g_XMNegIdentityR3,_MM_SHUFFLE(3,2,3,2)); + // 0,0,fRange,-1.0f + vTemp = _mm_setzero_ps(); + vTemp = _mm_shuffle_ps(vTemp,vValues,_MM_SHUFFLE(3,0,0,0)); + M.r[2] = vTemp; + // 0,0,-fRange * NearZ,0 + vTemp = _mm_shuffle_ps(vTemp,vValues,_MM_SHUFFLE(2,1,0,0)); + M.r[3] = vTemp; + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixPerspectiveFovLH +( + FLOAT FovAngleY, + FLOAT AspectRatio, + FLOAT NearZ, + FLOAT FarZ +) +{ +#if defined(_XM_NO_INTRINSICS_) + + FLOAT SinFov; + FLOAT CosFov; + FLOAT Height; + FLOAT Width; + XMMATRIX M; + + XMASSERT(!XMScalarNearEqual(FovAngleY, 0.0f, 0.00001f * 2.0f)); + XMASSERT(!XMScalarNearEqual(AspectRatio, 0.0f, 0.00001f)); + XMASSERT(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); + + XMScalarSinCos(&SinFov, &CosFov, 0.5f * FovAngleY); + + Height = CosFov / SinFov; + Width = Height / AspectRatio; + + M.r[0] = XMVectorSet(Width, 0.0f, 0.0f, 0.0f); + M.r[1] = XMVectorSet(0.0f, Height, 0.0f, 0.0f); + M.r[2] = XMVectorSet(0.0f, 0.0f, FarZ / (FarZ - NearZ), 1.0f); + M.r[3] = XMVectorSet(0.0f, 0.0f, -M.r[2].vector4_f32[2] * NearZ, 0.0f); + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(!XMScalarNearEqual(FovAngleY, 0.0f, 0.00001f * 2.0f)); + XMASSERT(!XMScalarNearEqual(AspectRatio, 0.0f, 0.00001f)); + XMASSERT(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); + XMMATRIX M; + FLOAT SinFov; + FLOAT CosFov; + XMScalarSinCos(&SinFov, &CosFov, 0.5f * FovAngleY); + FLOAT fRange = FarZ / (FarZ-NearZ); + // Note: This is recorded on the stack + FLOAT Height = CosFov / SinFov; + XMVECTOR rMem = { + Height / AspectRatio, + Height, + fRange, + -fRange * NearZ + }; + // Copy from memory to SSE register + XMVECTOR vValues = rMem; + XMVECTOR vTemp = _mm_setzero_ps(); + // Copy x only + vTemp = _mm_move_ss(vTemp,vValues); + // CosFov / SinFov,0,0,0 + M.r[0] = vTemp; + // 0,Height / AspectRatio,0,0 + vTemp = vValues; + vTemp = _mm_and_ps(vTemp,g_XMMaskY); + M.r[1] = vTemp; + // x=fRange,y=-fRange * NearZ,0,1.0f + vTemp = _mm_setzero_ps(); + vValues = _mm_shuffle_ps(vValues,g_XMIdentityR3,_MM_SHUFFLE(3,2,3,2)); + // 0,0,fRange,1.0f + vTemp = _mm_shuffle_ps(vTemp,vValues,_MM_SHUFFLE(3,0,0,0)); + M.r[2] = vTemp; + // 0,0,-fRange * NearZ,0.0f + vTemp = _mm_shuffle_ps(vTemp,vValues,_MM_SHUFFLE(2,1,0,0)); + M.r[3] = vTemp; + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixPerspectiveFovRH +( + FLOAT FovAngleY, + FLOAT AspectRatio, + FLOAT NearZ, + FLOAT FarZ +) +{ +#if defined(_XM_NO_INTRINSICS_) + + FLOAT SinFov; + FLOAT CosFov; + FLOAT Height; + FLOAT Width; + XMMATRIX M; + + XMASSERT(!XMScalarNearEqual(FovAngleY, 0.0f, 0.00001f * 2.0f)); + XMASSERT(!XMScalarNearEqual(AspectRatio, 0.0f, 0.00001f)); + XMASSERT(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); + + XMScalarSinCos(&SinFov, &CosFov, 0.5f * FovAngleY); + + Height = CosFov / SinFov; + Width = Height / AspectRatio; + + M.r[0] = XMVectorSet(Width, 0.0f, 0.0f, 0.0f); + M.r[1] = XMVectorSet(0.0f, Height, 0.0f, 0.0f); + M.r[2] = XMVectorSet(0.0f, 0.0f, FarZ / (NearZ - FarZ), -1.0f); + M.r[3] = XMVectorSet(0.0f, 0.0f, M.r[2].vector4_f32[2] * NearZ, 0.0f); + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(!XMScalarNearEqual(FovAngleY, 0.0f, 0.00001f * 2.0f)); + XMASSERT(!XMScalarNearEqual(AspectRatio, 0.0f, 0.00001f)); + XMASSERT(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); + XMMATRIX M; + FLOAT SinFov; + FLOAT CosFov; + XMScalarSinCos(&SinFov, &CosFov, 0.5f * FovAngleY); + FLOAT fRange = FarZ / (NearZ-FarZ); + // Note: This is recorded on the stack + FLOAT Height = CosFov / SinFov; + XMVECTOR rMem = { + Height / AspectRatio, + Height, + fRange, + fRange * NearZ + }; + // Copy from memory to SSE register + XMVECTOR vValues = rMem; + XMVECTOR vTemp = _mm_setzero_ps(); + // Copy x only + vTemp = _mm_move_ss(vTemp,vValues); + // CosFov / SinFov,0,0,0 + M.r[0] = vTemp; + // 0,Height / AspectRatio,0,0 + vTemp = vValues; + vTemp = _mm_and_ps(vTemp,g_XMMaskY); + M.r[1] = vTemp; + // x=fRange,y=-fRange * NearZ,0,-1.0f + vTemp = _mm_setzero_ps(); + vValues = _mm_shuffle_ps(vValues,g_XMNegIdentityR3,_MM_SHUFFLE(3,2,3,2)); + // 0,0,fRange,-1.0f + vTemp = _mm_shuffle_ps(vTemp,vValues,_MM_SHUFFLE(3,0,0,0)); + M.r[2] = vTemp; + // 0,0,fRange * NearZ,0.0f + vTemp = _mm_shuffle_ps(vTemp,vValues,_MM_SHUFFLE(2,1,0,0)); + M.r[3] = vTemp; + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixPerspectiveOffCenterLH +( + FLOAT ViewLeft, + FLOAT ViewRight, + FLOAT ViewBottom, + FLOAT ViewTop, + FLOAT NearZ, + FLOAT FarZ +) +{ +#if defined(_XM_NO_INTRINSICS_) + + FLOAT TwoNearZ; + FLOAT ReciprocalWidth; + FLOAT ReciprocalHeight; + XMMATRIX M; + + XMASSERT(!XMScalarNearEqual(ViewRight, ViewLeft, 0.00001f)); + XMASSERT(!XMScalarNearEqual(ViewTop, ViewBottom, 0.00001f)); + XMASSERT(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); + + TwoNearZ = NearZ + NearZ; + ReciprocalWidth = 1.0f / (ViewRight - ViewLeft); + ReciprocalHeight = 1.0f / (ViewTop - ViewBottom); + + M.r[0] = XMVectorSet(TwoNearZ * ReciprocalWidth, 0.0f, 0.0f, 0.0f); + M.r[1] = XMVectorSet(0.0f, TwoNearZ * ReciprocalHeight, 0.0f, 0.0f); + M.r[2] = XMVectorSet(-(ViewLeft + ViewRight) * ReciprocalWidth, + -(ViewTop + ViewBottom) * ReciprocalHeight, + FarZ / (FarZ - NearZ), + 1.0f); + M.r[3] = XMVectorSet(0.0f, 0.0f, -M.r[2].vector4_f32[2] * NearZ, 0.0f); + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(!XMScalarNearEqual(ViewRight, ViewLeft, 0.00001f)); + XMASSERT(!XMScalarNearEqual(ViewTop, ViewBottom, 0.00001f)); + XMASSERT(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); + XMMATRIX M; + FLOAT TwoNearZ = NearZ+NearZ; + FLOAT ReciprocalWidth = 1.0f / (ViewRight - ViewLeft); + FLOAT ReciprocalHeight = 1.0f / (ViewTop - ViewBottom); + FLOAT fRange = FarZ / (FarZ-NearZ); + // Note: This is recorded on the stack + XMVECTOR rMem = { + TwoNearZ*ReciprocalWidth, + TwoNearZ*ReciprocalHeight, + -fRange * NearZ, + 0 + }; + // Copy from memory to SSE register + XMVECTOR vValues = rMem; + XMVECTOR vTemp = _mm_setzero_ps(); + // Copy x only + vTemp = _mm_move_ss(vTemp,vValues); + // TwoNearZ*ReciprocalWidth,0,0,0 + M.r[0] = vTemp; + // 0,TwoNearZ*ReciprocalHeight,0,0 + vTemp = vValues; + vTemp = _mm_and_ps(vTemp,g_XMMaskY); + M.r[1] = vTemp; + // 0,0,fRange,1.0f + M.m[2][0] = -(ViewLeft + ViewRight) * ReciprocalWidth; + M.m[2][1] = -(ViewTop + ViewBottom) * ReciprocalHeight; + M.m[2][2] = fRange; + M.m[2][3] = 1.0f; + // 0,0,-fRange * NearZ,0.0f + vValues = _mm_and_ps(vValues,g_XMMaskZ); + M.r[3] = vValues; + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixPerspectiveOffCenterRH +( + FLOAT ViewLeft, + FLOAT ViewRight, + FLOAT ViewBottom, + FLOAT ViewTop, + FLOAT NearZ, + FLOAT FarZ +) +{ +#if defined(_XM_NO_INTRINSICS_) + + FLOAT TwoNearZ; + FLOAT ReciprocalWidth; + FLOAT ReciprocalHeight; + XMMATRIX M; + + XMASSERT(!XMScalarNearEqual(ViewRight, ViewLeft, 0.00001f)); + XMASSERT(!XMScalarNearEqual(ViewTop, ViewBottom, 0.00001f)); + XMASSERT(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); + + TwoNearZ = NearZ + NearZ; + ReciprocalWidth = 1.0f / (ViewRight - ViewLeft); + ReciprocalHeight = 1.0f / (ViewTop - ViewBottom); + + M.r[0] = XMVectorSet(TwoNearZ * ReciprocalWidth, 0.0f, 0.0f, 0.0f); + M.r[1] = XMVectorSet(0.0f, TwoNearZ * ReciprocalHeight, 0.0f, 0.0f); + M.r[2] = XMVectorSet((ViewLeft + ViewRight) * ReciprocalWidth, + (ViewTop + ViewBottom) * ReciprocalHeight, + FarZ / (NearZ - FarZ), + -1.0f); + M.r[3] = XMVectorSet(0.0f, 0.0f, M.r[2].vector4_f32[2] * NearZ, 0.0f); + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(!XMScalarNearEqual(ViewRight, ViewLeft, 0.00001f)); + XMASSERT(!XMScalarNearEqual(ViewTop, ViewBottom, 0.00001f)); + XMASSERT(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); + + XMMATRIX M; + FLOAT TwoNearZ = NearZ+NearZ; + FLOAT ReciprocalWidth = 1.0f / (ViewRight - ViewLeft); + FLOAT ReciprocalHeight = 1.0f / (ViewTop - ViewBottom); + FLOAT fRange = FarZ / (NearZ-FarZ); + // Note: This is recorded on the stack + XMVECTOR rMem = { + TwoNearZ*ReciprocalWidth, + TwoNearZ*ReciprocalHeight, + fRange * NearZ, + 0 + }; + // Copy from memory to SSE register + XMVECTOR vValues = rMem; + XMVECTOR vTemp = _mm_setzero_ps(); + // Copy x only + vTemp = _mm_move_ss(vTemp,vValues); + // TwoNearZ*ReciprocalWidth,0,0,0 + M.r[0] = vTemp; + // 0,TwoNearZ*ReciprocalHeight,0,0 + vTemp = vValues; + vTemp = _mm_and_ps(vTemp,g_XMMaskY); + M.r[1] = vTemp; + // 0,0,fRange,1.0f + M.m[2][0] = (ViewLeft + ViewRight) * ReciprocalWidth; + M.m[2][1] = (ViewTop + ViewBottom) * ReciprocalHeight; + M.m[2][2] = fRange; + M.m[2][3] = -1.0f; + // 0,0,-fRange * NearZ,0.0f + vValues = _mm_and_ps(vValues,g_XMMaskZ); + M.r[3] = vValues; + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixOrthographicLH +( + FLOAT ViewWidth, + FLOAT ViewHeight, + FLOAT NearZ, + FLOAT FarZ +) +{ +#if defined(_XM_NO_INTRINSICS_) + + FLOAT fRange; + XMMATRIX M; + + XMASSERT(!XMScalarNearEqual(ViewWidth, 0.0f, 0.00001f)); + XMASSERT(!XMScalarNearEqual(ViewHeight, 0.0f, 0.00001f)); + XMASSERT(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); + + fRange = 1.0f / (FarZ-NearZ); + M.r[0] = XMVectorSet(2.0f / ViewWidth, 0.0f, 0.0f, 0.0f); + M.r[1] = XMVectorSet(0.0f, 2.0f / ViewHeight, 0.0f, 0.0f); + M.r[2] = XMVectorSet(0.0f, 0.0f, fRange, 0.0f); + M.r[3] = XMVectorSet(0.0f, 0.0f, -fRange * NearZ, 1.0f); + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(!XMScalarNearEqual(ViewWidth, 0.0f, 0.00001f)); + XMASSERT(!XMScalarNearEqual(ViewHeight, 0.0f, 0.00001f)); + XMASSERT(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); + XMMATRIX M; + FLOAT fRange = 1.0f / (FarZ-NearZ); + // Note: This is recorded on the stack + XMVECTOR rMem = { + 2.0f / ViewWidth, + 2.0f / ViewHeight, + fRange, + -fRange * NearZ + }; + // Copy from memory to SSE register + XMVECTOR vValues = rMem; + XMVECTOR vTemp = _mm_setzero_ps(); + // Copy x only + vTemp = _mm_move_ss(vTemp,vValues); + // 2.0f / ViewWidth,0,0,0 + M.r[0] = vTemp; + // 0,2.0f / ViewHeight,0,0 + vTemp = vValues; + vTemp = _mm_and_ps(vTemp,g_XMMaskY); + M.r[1] = vTemp; + // x=fRange,y=-fRange * NearZ,0,1.0f + vTemp = _mm_setzero_ps(); + vValues = _mm_shuffle_ps(vValues,g_XMIdentityR3,_MM_SHUFFLE(3,2,3,2)); + // 0,0,fRange,0.0f + vTemp = _mm_shuffle_ps(vTemp,vValues,_MM_SHUFFLE(2,0,0,0)); + M.r[2] = vTemp; + // 0,0,-fRange * NearZ,1.0f + vTemp = _mm_shuffle_ps(vTemp,vValues,_MM_SHUFFLE(3,1,0,0)); + M.r[3] = vTemp; + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixOrthographicRH +( + FLOAT ViewWidth, + FLOAT ViewHeight, + FLOAT NearZ, + FLOAT FarZ +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMMATRIX M; + + XMASSERT(!XMScalarNearEqual(ViewWidth, 0.0f, 0.00001f)); + XMASSERT(!XMScalarNearEqual(ViewHeight, 0.0f, 0.00001f)); + XMASSERT(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); + + M.r[0] = XMVectorSet(2.0f / ViewWidth, 0.0f, 0.0f, 0.0f); + M.r[1] = XMVectorSet(0.0f, 2.0f / ViewHeight, 0.0f, 0.0f); + M.r[2] = XMVectorSet(0.0f, 0.0f, 1.0f / (NearZ - FarZ), 0.0f); + M.r[3] = XMVectorSet(0.0f, 0.0f, M.r[2].vector4_f32[2] * NearZ, 1.0f); + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(!XMScalarNearEqual(ViewWidth, 0.0f, 0.00001f)); + XMASSERT(!XMScalarNearEqual(ViewHeight, 0.0f, 0.00001f)); + XMASSERT(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); + XMMATRIX M; + FLOAT fRange = 1.0f / (NearZ-FarZ); + // Note: This is recorded on the stack + XMVECTOR rMem = { + 2.0f / ViewWidth, + 2.0f / ViewHeight, + fRange, + fRange * NearZ + }; + // Copy from memory to SSE register + XMVECTOR vValues = rMem; + XMVECTOR vTemp = _mm_setzero_ps(); + // Copy x only + vTemp = _mm_move_ss(vTemp,vValues); + // 2.0f / ViewWidth,0,0,0 + M.r[0] = vTemp; + // 0,2.0f / ViewHeight,0,0 + vTemp = vValues; + vTemp = _mm_and_ps(vTemp,g_XMMaskY); + M.r[1] = vTemp; + // x=fRange,y=fRange * NearZ,0,1.0f + vTemp = _mm_setzero_ps(); + vValues = _mm_shuffle_ps(vValues,g_XMIdentityR3,_MM_SHUFFLE(3,2,3,2)); + // 0,0,fRange,0.0f + vTemp = _mm_shuffle_ps(vTemp,vValues,_MM_SHUFFLE(2,0,0,0)); + M.r[2] = vTemp; + // 0,0,fRange * NearZ,1.0f + vTemp = _mm_shuffle_ps(vTemp,vValues,_MM_SHUFFLE(3,1,0,0)); + M.r[3] = vTemp; + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixOrthographicOffCenterLH +( + FLOAT ViewLeft, + FLOAT ViewRight, + FLOAT ViewBottom, + FLOAT ViewTop, + FLOAT NearZ, + FLOAT FarZ +) +{ +#if defined(_XM_NO_INTRINSICS_) + + FLOAT ReciprocalWidth; + FLOAT ReciprocalHeight; + XMMATRIX M; + + XMASSERT(!XMScalarNearEqual(ViewRight, ViewLeft, 0.00001f)); + XMASSERT(!XMScalarNearEqual(ViewTop, ViewBottom, 0.00001f)); + XMASSERT(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); + + ReciprocalWidth = 1.0f / (ViewRight - ViewLeft); + ReciprocalHeight = 1.0f / (ViewTop - ViewBottom); + + M.r[0] = XMVectorSet(ReciprocalWidth + ReciprocalWidth, 0.0f, 0.0f, 0.0f); + M.r[1] = XMVectorSet(0.0f, ReciprocalHeight + ReciprocalHeight, 0.0f, 0.0f); + M.r[2] = XMVectorSet(0.0f, 0.0f, 1.0f / (FarZ - NearZ), 0.0f); + M.r[3] = XMVectorSet(-(ViewLeft + ViewRight) * ReciprocalWidth, + -(ViewTop + ViewBottom) * ReciprocalHeight, + -M.r[2].vector4_f32[2] * NearZ, + 1.0f); + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMMATRIX M; + FLOAT fReciprocalWidth = 1.0f / (ViewRight - ViewLeft); + FLOAT fReciprocalHeight = 1.0f / (ViewTop - ViewBottom); + FLOAT fRange = 1.0f / (FarZ-NearZ); + // Note: This is recorded on the stack + XMVECTOR rMem = { + fReciprocalWidth, + fReciprocalHeight, + fRange, + 1.0f + }; + XMVECTOR rMem2 = { + -(ViewLeft + ViewRight), + -(ViewTop + ViewBottom), + -NearZ, + 1.0f + }; + // Copy from memory to SSE register + XMVECTOR vValues = rMem; + XMVECTOR vTemp = _mm_setzero_ps(); + // Copy x only + vTemp = _mm_move_ss(vTemp,vValues); + // fReciprocalWidth*2,0,0,0 + vTemp = _mm_add_ss(vTemp,vTemp); + M.r[0] = vTemp; + // 0,fReciprocalHeight*2,0,0 + vTemp = vValues; + vTemp = _mm_and_ps(vTemp,g_XMMaskY); + vTemp = _mm_add_ps(vTemp,vTemp); + M.r[1] = vTemp; + // 0,0,fRange,0.0f + vTemp = vValues; + vTemp = _mm_and_ps(vTemp,g_XMMaskZ); + M.r[2] = vTemp; + // -(ViewLeft + ViewRight)*fReciprocalWidth,-(ViewTop + ViewBottom)*fReciprocalHeight,fRange*-NearZ,1.0f + vValues = _mm_mul_ps(vValues,rMem2); + M.r[3] = vValues; + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMMATRIX XMMatrixOrthographicOffCenterRH +( + FLOAT ViewLeft, + FLOAT ViewRight, + FLOAT ViewBottom, + FLOAT ViewTop, + FLOAT NearZ, + FLOAT FarZ +) +{ +#if defined(_XM_NO_INTRINSICS_) + + FLOAT ReciprocalWidth; + FLOAT ReciprocalHeight; + XMMATRIX M; + + XMASSERT(!XMScalarNearEqual(ViewRight, ViewLeft, 0.00001f)); + XMASSERT(!XMScalarNearEqual(ViewTop, ViewBottom, 0.00001f)); + XMASSERT(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); + + ReciprocalWidth = 1.0f / (ViewRight - ViewLeft); + ReciprocalHeight = 1.0f / (ViewTop - ViewBottom); + + M.r[0] = XMVectorSet(ReciprocalWidth + ReciprocalWidth, 0.0f, 0.0f, 0.0f); + M.r[1] = XMVectorSet(0.0f, ReciprocalHeight + ReciprocalHeight, 0.0f, 0.0f); + M.r[2] = XMVectorSet(0.0f, 0.0f, 1.0f / (NearZ - FarZ), 0.0f); + M.r[3] = XMVectorSet(-(ViewLeft + ViewRight) * ReciprocalWidth, + -(ViewTop + ViewBottom) * ReciprocalHeight, + M.r[2].vector4_f32[2] * NearZ, + 1.0f); + + return M; + +#elif defined(_XM_SSE_INTRINSICS_) + XMMATRIX M; + FLOAT fReciprocalWidth = 1.0f / (ViewRight - ViewLeft); + FLOAT fReciprocalHeight = 1.0f / (ViewTop - ViewBottom); + FLOAT fRange = 1.0f / (NearZ-FarZ); + // Note: This is recorded on the stack + XMVECTOR rMem = { + fReciprocalWidth, + fReciprocalHeight, + fRange, + 1.0f + }; + XMVECTOR rMem2 = { + -(ViewLeft + ViewRight), + -(ViewTop + ViewBottom), + NearZ, + 1.0f + }; + // Copy from memory to SSE register + XMVECTOR vValues = rMem; + XMVECTOR vTemp = _mm_setzero_ps(); + // Copy x only + vTemp = _mm_move_ss(vTemp,vValues); + // fReciprocalWidth*2,0,0,0 + vTemp = _mm_add_ss(vTemp,vTemp); + M.r[0] = vTemp; + // 0,fReciprocalHeight*2,0,0 + vTemp = vValues; + vTemp = _mm_and_ps(vTemp,g_XMMaskY); + vTemp = _mm_add_ps(vTemp,vTemp); + M.r[1] = vTemp; + // 0,0,fRange,0.0f + vTemp = vValues; + vTemp = _mm_and_ps(vTemp,g_XMMaskZ); + M.r[2] = vTemp; + // -(ViewLeft + ViewRight)*fReciprocalWidth,-(ViewTop + ViewBottom)*fReciprocalHeight,fRange*-NearZ,1.0f + vValues = _mm_mul_ps(vValues,rMem2); + M.r[3] = vValues; + return M; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +#ifdef __cplusplus + +/**************************************************************************** + * + * XMMATRIX operators and methods + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMMATRIX::_XMMATRIX +( + FXMVECTOR R0, + FXMVECTOR R1, + FXMVECTOR R2, + CXMVECTOR R3 +) +{ + r[0] = R0; + r[1] = R1; + r[2] = R2; + r[3] = R3; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMMATRIX::_XMMATRIX +( + FLOAT m00, FLOAT m01, FLOAT m02, FLOAT m03, + FLOAT m10, FLOAT m11, FLOAT m12, FLOAT m13, + FLOAT m20, FLOAT m21, FLOAT m22, FLOAT m23, + FLOAT m30, FLOAT m31, FLOAT m32, FLOAT m33 +) +{ + r[0] = XMVectorSet(m00, m01, m02, m03); + r[1] = XMVectorSet(m10, m11, m12, m13); + r[2] = XMVectorSet(m20, m21, m22, m23); + r[3] = XMVectorSet(m30, m31, m32, m33); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMMATRIX::_XMMATRIX +( + CONST FLOAT* pArray +) +{ + r[0] = XMLoadFloat4((XMFLOAT4*)pArray); + r[1] = XMLoadFloat4((XMFLOAT4*)(pArray + 4)); + r[2] = XMLoadFloat4((XMFLOAT4*)(pArray + 8)); + r[3] = XMLoadFloat4((XMFLOAT4*)(pArray + 12)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMMATRIX& _XMMATRIX::operator= +( + CONST _XMMATRIX& M +) +{ + r[0] = M.r[0]; + r[1] = M.r[1]; + r[2] = M.r[2]; + r[3] = M.r[3]; + return *this; +} + +//------------------------------------------------------------------------------ + +#ifndef XM_NO_OPERATOR_OVERLOADS + +#if !defined(_XBOX_VER) && defined(_XM_ISVS2005_) && defined(_XM_X64_) +#pragma warning(push) +#pragma warning(disable : 4328) +#endif + +XMFINLINE _XMMATRIX& _XMMATRIX::operator*= +( + CONST _XMMATRIX& M +) +{ + *this = XMMatrixMultiply(*this, M); + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMMATRIX _XMMATRIX::operator* +( + CONST _XMMATRIX& M +) CONST +{ + return XMMatrixMultiply(*this, M); +} + +#if !defined(_XBOX_VER) && defined(_XM_ISVS2005_) && defined(_XM_X64_) +#pragma warning(pop) +#endif + +#endif // !XM_NO_OPERATOR_OVERLOADS + +/**************************************************************************** + * + * XMFLOAT3X3 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMFLOAT3X3::_XMFLOAT3X3 +( + FLOAT m00, FLOAT m01, FLOAT m02, + FLOAT m10, FLOAT m11, FLOAT m12, + FLOAT m20, FLOAT m21, FLOAT m22 +) +{ + m[0][0] = m00; + m[0][1] = m01; + m[0][2] = m02; + + m[1][0] = m10; + m[1][1] = m11; + m[1][2] = m12; + + m[2][0] = m20; + m[2][1] = m21; + m[2][2] = m22; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMFLOAT3X3::_XMFLOAT3X3 +( + CONST FLOAT* pArray +) +{ + UINT Row; + UINT Column; + + for (Row = 0; Row < 3; Row++) + { + for (Column = 0; Column < 3; Column++) + { + m[Row][Column] = pArray[Row * 3 + Column]; + } + } +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMFLOAT3X3& _XMFLOAT3X3::operator= +( + CONST _XMFLOAT3X3& Float3x3 +) +{ + _11 = Float3x3._11; + _12 = Float3x3._12; + _13 = Float3x3._13; + _21 = Float3x3._21; + _22 = Float3x3._22; + _23 = Float3x3._23; + _31 = Float3x3._31; + _32 = Float3x3._32; + _33 = Float3x3._33; + + return *this; +} + +/**************************************************************************** + * + * XMFLOAT4X3 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMFLOAT4X3::_XMFLOAT4X3 +( + FLOAT m00, FLOAT m01, FLOAT m02, + FLOAT m10, FLOAT m11, FLOAT m12, + FLOAT m20, FLOAT m21, FLOAT m22, + FLOAT m30, FLOAT m31, FLOAT m32 +) +{ + m[0][0] = m00; + m[0][1] = m01; + m[0][2] = m02; + + m[1][0] = m10; + m[1][1] = m11; + m[1][2] = m12; + + m[2][0] = m20; + m[2][1] = m21; + m[2][2] = m22; + + m[3][0] = m30; + m[3][1] = m31; + m[3][2] = m32; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMFLOAT4X3::_XMFLOAT4X3 +( + CONST FLOAT* pArray +) +{ + UINT Row; + UINT Column; + + for (Row = 0; Row < 4; Row++) + { + for (Column = 0; Column < 3; Column++) + { + m[Row][Column] = pArray[Row * 3 + Column]; + } + } +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMFLOAT4X3& _XMFLOAT4X3::operator= +( + CONST _XMFLOAT4X3& Float4x3 +) +{ + XMVECTOR V1 = XMLoadFloat4((XMFLOAT4*)&Float4x3._11); + XMVECTOR V2 = XMLoadFloat4((XMFLOAT4*)&Float4x3._22); + XMVECTOR V3 = XMLoadFloat4((XMFLOAT4*)&Float4x3._33); + + XMStoreFloat4((XMFLOAT4*)&_11, V1); + XMStoreFloat4((XMFLOAT4*)&_22, V2); + XMStoreFloat4((XMFLOAT4*)&_33, V3); + + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMFLOAT4X3A& XMFLOAT4X3A::operator= +( + CONST XMFLOAT4X3A& Float4x3 +) +{ + XMVECTOR V1 = XMLoadFloat4A((XMFLOAT4A*)&Float4x3._11); + XMVECTOR V2 = XMLoadFloat4A((XMFLOAT4A*)&Float4x3._22); + XMVECTOR V3 = XMLoadFloat4A((XMFLOAT4A*)&Float4x3._33); + + XMStoreFloat4A((XMFLOAT4A*)&_11, V1); + XMStoreFloat4A((XMFLOAT4A*)&_22, V2); + XMStoreFloat4A((XMFLOAT4A*)&_33, V3); + + return *this; +} + +/**************************************************************************** + * + * XMFLOAT4X4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMFLOAT4X4::_XMFLOAT4X4 +( + FLOAT m00, FLOAT m01, FLOAT m02, FLOAT m03, + FLOAT m10, FLOAT m11, FLOAT m12, FLOAT m13, + FLOAT m20, FLOAT m21, FLOAT m22, FLOAT m23, + FLOAT m30, FLOAT m31, FLOAT m32, FLOAT m33 +) +{ + m[0][0] = m00; + m[0][1] = m01; + m[0][2] = m02; + m[0][3] = m03; + + m[1][0] = m10; + m[1][1] = m11; + m[1][2] = m12; + m[1][3] = m13; + + m[2][0] = m20; + m[2][1] = m21; + m[2][2] = m22; + m[2][3] = m23; + + m[3][0] = m30; + m[3][1] = m31; + m[3][2] = m32; + m[3][3] = m33; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMFLOAT4X4::_XMFLOAT4X4 +( + CONST FLOAT* pArray +) +{ + UINT Row; + UINT Column; + + for (Row = 0; Row < 4; Row++) + { + for (Column = 0; Column < 4; Column++) + { + m[Row][Column] = pArray[Row * 4 + Column]; + } + } +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMFLOAT4X4& _XMFLOAT4X4::operator= +( + CONST _XMFLOAT4X4& Float4x4 +) +{ + XMVECTOR V1 = XMLoadFloat4((XMFLOAT4*)&Float4x4._11); + XMVECTOR V2 = XMLoadFloat4((XMFLOAT4*)&Float4x4._21); + XMVECTOR V3 = XMLoadFloat4((XMFLOAT4*)&Float4x4._31); + XMVECTOR V4 = XMLoadFloat4((XMFLOAT4*)&Float4x4._41); + + XMStoreFloat4((XMFLOAT4*)&_11, V1); + XMStoreFloat4((XMFLOAT4*)&_21, V2); + XMStoreFloat4((XMFLOAT4*)&_31, V3); + XMStoreFloat4((XMFLOAT4*)&_41, V4); + + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMFLOAT4X4A& XMFLOAT4X4A::operator= +( + CONST XMFLOAT4X4A& Float4x4 +) +{ + XMVECTOR V1 = XMLoadFloat4A((XMFLOAT4A*)&Float4x4._11); + XMVECTOR V2 = XMLoadFloat4A((XMFLOAT4A*)&Float4x4._21); + XMVECTOR V3 = XMLoadFloat4A((XMFLOAT4A*)&Float4x4._31); + XMVECTOR V4 = XMLoadFloat4A((XMFLOAT4A*)&Float4x4._41); + + XMStoreFloat4A((XMFLOAT4A*)&_11, V1); + XMStoreFloat4A((XMFLOAT4A*)&_21, V2); + XMStoreFloat4A((XMFLOAT4A*)&_31, V3); + XMStoreFloat4A((XMFLOAT4A*)&_41, V4); + + return *this; +} + +#endif // __cplusplus + +#endif // __XNAMATHMATRIX_INL__ + diff --git a/gfx/include/dxsdk/xnamathmisc.inl b/gfx/include/dxsdk/xnamathmisc.inl new file mode 100644 index 0000000000..c937ee1d0b --- /dev/null +++ b/gfx/include/dxsdk/xnamathmisc.inl @@ -0,0 +1,2464 @@ +/*++ + +Copyright (c) Microsoft Corporation. All rights reserved. + +Module Name: + + xnamathmisc.inl + +Abstract: + + XNA math library for Windows and Xbox 360: Quaternion, plane, and color functions. +--*/ + +#if defined(_MSC_VER) && (_MSC_VER > 1000) +#pragma once +#endif + +#ifndef __XNAMATHMISC_INL__ +#define __XNAMATHMISC_INL__ + +/**************************************************************************** + * + * Quaternion + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ +// Comparison operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMQuaternionEqual +( + FXMVECTOR Q1, + FXMVECTOR Q2 +) +{ + return XMVector4Equal(Q1, Q2); +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMQuaternionNotEqual +( + FXMVECTOR Q1, + FXMVECTOR Q2 +) +{ + return XMVector4NotEqual(Q1, Q2); +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMQuaternionIsNaN +( + FXMVECTOR Q +) +{ + return XMVector4IsNaN(Q); +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMQuaternionIsInfinite +( + FXMVECTOR Q +) +{ + return XMVector4IsInfinite(Q); +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMQuaternionIsIdentity +( + FXMVECTOR Q +) +{ +#if defined(_XM_NO_INTRINSICS_) + + return XMVector4Equal(Q, g_XMIdentityR3.v); + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmpeq_ps(Q,g_XMIdentityR3); + return (_mm_movemask_ps(vTemp)==0x0f) ? true : false; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Computation operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMQuaternionDot +( + FXMVECTOR Q1, + FXMVECTOR Q2 +) +{ + return XMVector4Dot(Q1, Q2); +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMQuaternionMultiply +( + FXMVECTOR Q1, + FXMVECTOR Q2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR NegativeQ1; + XMVECTOR Q2X; + XMVECTOR Q2Y; + XMVECTOR Q2Z; + XMVECTOR Q2W; + XMVECTOR Q1WZYX; + XMVECTOR Q1ZWXY; + XMVECTOR Q1YXWZ; + XMVECTOR Result; + CONST XMVECTORU32 ControlWZYX = {XM_PERMUTE_0W, XM_PERMUTE_1Z, XM_PERMUTE_0Y, XM_PERMUTE_1X}; + CONST XMVECTORU32 ControlZWXY = {XM_PERMUTE_0Z, XM_PERMUTE_0W, XM_PERMUTE_1X, XM_PERMUTE_1Y}; + CONST XMVECTORU32 ControlYXWZ = {XM_PERMUTE_1Y, XM_PERMUTE_0X, XM_PERMUTE_0W, XM_PERMUTE_1Z}; + + NegativeQ1 = XMVectorNegate(Q1); + + Q2W = XMVectorSplatW(Q2); + Q2X = XMVectorSplatX(Q2); + Q2Y = XMVectorSplatY(Q2); + Q2Z = XMVectorSplatZ(Q2); + + Q1WZYX = XMVectorPermute(Q1, NegativeQ1, ControlWZYX.v); + Q1ZWXY = XMVectorPermute(Q1, NegativeQ1, ControlZWXY.v); + Q1YXWZ = XMVectorPermute(Q1, NegativeQ1, ControlYXWZ.v); + + Result = XMVectorMultiply(Q1, Q2W); + Result = XMVectorMultiplyAdd(Q1WZYX, Q2X, Result); + Result = XMVectorMultiplyAdd(Q1ZWXY, Q2Y, Result); + Result = XMVectorMultiplyAdd(Q1YXWZ, Q2Z, Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + static CONST XMVECTORF32 ControlWZYX = { 1.0f,-1.0f, 1.0f,-1.0f}; + static CONST XMVECTORF32 ControlZWXY = { 1.0f, 1.0f,-1.0f,-1.0f}; + static CONST XMVECTORF32 ControlYXWZ = {-1.0f, 1.0f, 1.0f,-1.0f}; + // Copy to SSE registers and use as few as possible for x86 + XMVECTOR Q2X = Q2; + XMVECTOR Q2Y = Q2; + XMVECTOR Q2Z = Q2; + XMVECTOR vResult = Q2; + // Splat with one instruction + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(3,3,3,3)); + Q2X = _mm_shuffle_ps(Q2X,Q2X,_MM_SHUFFLE(0,0,0,0)); + Q2Y = _mm_shuffle_ps(Q2Y,Q2Y,_MM_SHUFFLE(1,1,1,1)); + Q2Z = _mm_shuffle_ps(Q2Z,Q2Z,_MM_SHUFFLE(2,2,2,2)); + // Retire Q1 and perform Q1*Q2W + vResult = _mm_mul_ps(vResult,Q1); + XMVECTOR Q1Shuffle = Q1; + // Shuffle the copies of Q1 + Q1Shuffle = _mm_shuffle_ps(Q1Shuffle,Q1Shuffle,_MM_SHUFFLE(0,1,2,3)); + // Mul by Q1WZYX + Q2X = _mm_mul_ps(Q2X,Q1Shuffle); + Q1Shuffle = _mm_shuffle_ps(Q1Shuffle,Q1Shuffle,_MM_SHUFFLE(2,3,0,1)); + // Flip the signs on y and z + Q2X = _mm_mul_ps(Q2X,ControlWZYX); + // Mul by Q1ZWXY + Q2Y = _mm_mul_ps(Q2Y,Q1Shuffle); + Q1Shuffle = _mm_shuffle_ps(Q1Shuffle,Q1Shuffle,_MM_SHUFFLE(0,1,2,3)); + // Flip the signs on z and w + Q2Y = _mm_mul_ps(Q2Y,ControlZWXY); + // Mul by Q1YXWZ + Q2Z = _mm_mul_ps(Q2Z,Q1Shuffle); + vResult = _mm_add_ps(vResult,Q2X); + // Flip the signs on x and w + Q2Z = _mm_mul_ps(Q2Z,ControlYXWZ); + Q2Y = _mm_add_ps(Q2Y,Q2Z); + vResult = _mm_add_ps(vResult,Q2Y); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMQuaternionLengthSq +( + FXMVECTOR Q +) +{ + return XMVector4LengthSq(Q); +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMQuaternionReciprocalLength +( + FXMVECTOR Q +) +{ + return XMVector4ReciprocalLength(Q); +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMQuaternionLength +( + FXMVECTOR Q +) +{ + return XMVector4Length(Q); +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMQuaternionNormalizeEst +( + FXMVECTOR Q +) +{ + return XMVector4NormalizeEst(Q); +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMQuaternionNormalize +( + FXMVECTOR Q +) +{ + return XMVector4Normalize(Q); +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMQuaternionConjugate +( + FXMVECTOR Q +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result = { + -Q.vector4_f32[0], + -Q.vector4_f32[1], + -Q.vector4_f32[2], + Q.vector4_f32[3] + }; + return Result; +#elif defined(_XM_SSE_INTRINSICS_) + static const XMVECTORF32 NegativeOne3 = {-1.0f,-1.0f,-1.0f,1.0f}; + XMVECTOR Result = _mm_mul_ps(Q,NegativeOne3); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMQuaternionInverse +( + FXMVECTOR Q +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Conjugate; + XMVECTOR L; + XMVECTOR Control; + XMVECTOR Result; + CONST XMVECTOR Zero = XMVectorZero(); + + L = XMVector4LengthSq(Q); + Conjugate = XMQuaternionConjugate(Q); + + Control = XMVectorLessOrEqual(L, g_XMEpsilon.v); + + L = XMVectorReciprocal(L); + Result = XMVectorMultiply(Conjugate, L); + + Result = XMVectorSelect(Result, Zero, Control); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR Conjugate; + XMVECTOR L; + XMVECTOR Control; + XMVECTOR Result; + XMVECTOR Zero = XMVectorZero(); + + L = XMVector4LengthSq(Q); + Conjugate = XMQuaternionConjugate(Q); + Control = XMVectorLessOrEqual(L, g_XMEpsilon); + Result = _mm_div_ps(Conjugate,L); + Result = XMVectorSelect(Result, Zero, Control); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMQuaternionLn +( + FXMVECTOR Q +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Q0; + XMVECTOR QW; + XMVECTOR Theta; + XMVECTOR SinTheta; + XMVECTOR S; + XMVECTOR ControlW; + XMVECTOR Result; + static CONST XMVECTOR OneMinusEpsilon = {1.0f - 0.00001f, 1.0f - 0.00001f, 1.0f - 0.00001f, 1.0f - 0.00001f}; + + QW = XMVectorSplatW(Q); + Q0 = XMVectorSelect(g_XMSelect1110.v, Q, g_XMSelect1110.v); + + ControlW = XMVectorInBounds(QW, OneMinusEpsilon); + + Theta = XMVectorACos(QW); + SinTheta = XMVectorSin(Theta); + + S = XMVectorReciprocal(SinTheta); + S = XMVectorMultiply(Theta, S); + + Result = XMVectorMultiply(Q0, S); + + Result = XMVectorSelect(Q0, Result, ControlW); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + static CONST XMVECTORF32 OneMinusEpsilon = {1.0f - 0.00001f, 1.0f - 0.00001f, 1.0f - 0.00001f, 1.0f - 0.00001f}; + static CONST XMVECTORF32 NegOneMinusEpsilon = {-(1.0f - 0.00001f), -(1.0f - 0.00001f),-(1.0f - 0.00001f),-(1.0f - 0.00001f)}; + // Get W only + XMVECTOR QW = _mm_shuffle_ps(Q,Q,_MM_SHUFFLE(3,3,3,3)); + // W = 0 + XMVECTOR Q0 = _mm_and_ps(Q,g_XMMask3); + // Use W if within bounds + XMVECTOR ControlW = _mm_cmple_ps(QW,OneMinusEpsilon); + XMVECTOR vTemp2 = _mm_cmpge_ps(QW,NegOneMinusEpsilon); + ControlW = _mm_and_ps(ControlW,vTemp2); + // Get theta + XMVECTOR vTheta = XMVectorACos(QW); + // Get Sine of theta + vTemp2 = XMVectorSin(vTheta); + // theta/sine of theta + vTheta = _mm_div_ps(vTheta,vTemp2); + // Here's the answer + vTheta = _mm_mul_ps(vTheta,Q0); + // Was W in bounds? If not, return input as is + vTheta = XMVectorSelect(Q0,vTheta,ControlW); + return vTheta; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMQuaternionExp +( + FXMVECTOR Q +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Theta; + XMVECTOR SinTheta; + XMVECTOR CosTheta; + XMVECTOR S; + XMVECTOR Control; + XMVECTOR Zero; + XMVECTOR Result; + + Theta = XMVector3Length(Q); + XMVectorSinCos(&SinTheta, &CosTheta, Theta); + + S = XMVectorReciprocal(Theta); + S = XMVectorMultiply(SinTheta, S); + + Result = XMVectorMultiply(Q, S); + + Zero = XMVectorZero(); + Control = XMVectorNearEqual(Theta, Zero, g_XMEpsilon.v); + Result = XMVectorSelect(Result, Q, Control); + + Result = XMVectorSelect(CosTheta, Result, g_XMSelect1110.v); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR Theta; + XMVECTOR SinTheta; + XMVECTOR CosTheta; + XMVECTOR S; + XMVECTOR Control; + XMVECTOR Zero; + XMVECTOR Result; + Theta = XMVector3Length(Q); + XMVectorSinCos(&SinTheta, &CosTheta, Theta); + S = _mm_div_ps(SinTheta,Theta); + Result = _mm_mul_ps(Q, S); + Zero = XMVectorZero(); + Control = XMVectorNearEqual(Theta, Zero, g_XMEpsilon); + Result = XMVectorSelect(Result,Q,Control); + Result = _mm_and_ps(Result,g_XMMask3); + CosTheta = _mm_and_ps(CosTheta,g_XMMaskW); + Result = _mm_or_ps(Result,CosTheta); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMVECTOR XMQuaternionSlerp +( + FXMVECTOR Q0, + FXMVECTOR Q1, + FLOAT t +) +{ + XMVECTOR T = XMVectorReplicate(t); + return XMQuaternionSlerpV(Q0, Q1, T); +} + +//------------------------------------------------------------------------------ + +XMINLINE XMVECTOR XMQuaternionSlerpV +( + FXMVECTOR Q0, + FXMVECTOR Q1, + FXMVECTOR T +) +{ +#if defined(_XM_NO_INTRINSICS_) + + // Result = Q0 * sin((1.0 - t) * Omega) / sin(Omega) + Q1 * sin(t * Omega) / sin(Omega) + XMVECTOR Omega; + XMVECTOR CosOmega; + XMVECTOR SinOmega; + XMVECTOR InvSinOmega; + XMVECTOR V01; + XMVECTOR C1000; + XMVECTOR SignMask; + XMVECTOR S0; + XMVECTOR S1; + XMVECTOR Sign; + XMVECTOR Control; + XMVECTOR Result; + XMVECTOR Zero; + CONST XMVECTOR OneMinusEpsilon = {1.0f - 0.00001f, 1.0f - 0.00001f, 1.0f - 0.00001f, 1.0f - 0.00001f}; + + XMASSERT((T.vector4_f32[1] == T.vector4_f32[0]) && (T.vector4_f32[2] == T.vector4_f32[0]) && (T.vector4_f32[3] == T.vector4_f32[0])); + + CosOmega = XMQuaternionDot(Q0, Q1); + + Zero = XMVectorZero(); + Control = XMVectorLess(CosOmega, Zero); + Sign = XMVectorSelect(g_XMOne.v, g_XMNegativeOne.v, Control); + + CosOmega = XMVectorMultiply(CosOmega, Sign); + + Control = XMVectorLess(CosOmega, OneMinusEpsilon); + + SinOmega = XMVectorNegativeMultiplySubtract(CosOmega, CosOmega, g_XMOne.v); + SinOmega = XMVectorSqrt(SinOmega); + + Omega = XMVectorATan2(SinOmega, CosOmega); + + SignMask = XMVectorSplatSignMask(); + C1000 = XMVectorSetBinaryConstant(1, 0, 0, 0); + V01 = XMVectorShiftLeft(T, Zero, 2); + SignMask = XMVectorShiftLeft(SignMask, Zero, 3); + V01 = XMVectorXorInt(V01, SignMask); + V01 = XMVectorAdd(C1000, V01); + + InvSinOmega = XMVectorReciprocal(SinOmega); + + S0 = XMVectorMultiply(V01, Omega); + S0 = XMVectorSin(S0); + S0 = XMVectorMultiply(S0, InvSinOmega); + + S0 = XMVectorSelect(V01, S0, Control); + + S1 = XMVectorSplatY(S0); + S0 = XMVectorSplatX(S0); + + S1 = XMVectorMultiply(S1, Sign); + + Result = XMVectorMultiply(Q0, S0); + Result = XMVectorMultiplyAdd(Q1, S1, Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Result = Q0 * sin((1.0 - t) * Omega) / sin(Omega) + Q1 * sin(t * Omega) / sin(Omega) + XMVECTOR Omega; + XMVECTOR CosOmega; + XMVECTOR SinOmega; + XMVECTOR V01; + XMVECTOR S0; + XMVECTOR S1; + XMVECTOR Sign; + XMVECTOR Control; + XMVECTOR Result; + XMVECTOR Zero; + static const XMVECTORF32 OneMinusEpsilon = {1.0f - 0.00001f, 1.0f - 0.00001f, 1.0f - 0.00001f, 1.0f - 0.00001f}; + static const XMVECTORI32 SignMask2 = {0x80000000,0x00000000,0x00000000,0x00000000}; + static const XMVECTORI32 MaskXY = {0xFFFFFFFF,0xFFFFFFFF,0x00000000,0x00000000}; + + XMASSERT((XMVectorGetY(T) == XMVectorGetX(T)) && (XMVectorGetZ(T) == XMVectorGetX(T)) && (XMVectorGetW(T) == XMVectorGetX(T))); + + CosOmega = XMQuaternionDot(Q0, Q1); + + Zero = XMVectorZero(); + Control = XMVectorLess(CosOmega, Zero); + Sign = XMVectorSelect(g_XMOne, g_XMNegativeOne, Control); + + CosOmega = _mm_mul_ps(CosOmega, Sign); + + Control = XMVectorLess(CosOmega, OneMinusEpsilon); + + SinOmega = _mm_mul_ps(CosOmega,CosOmega); + SinOmega = _mm_sub_ps(g_XMOne,SinOmega); + SinOmega = _mm_sqrt_ps(SinOmega); + + Omega = XMVectorATan2(SinOmega, CosOmega); + + V01 = _mm_shuffle_ps(T,T,_MM_SHUFFLE(2,3,0,1)); + V01 = _mm_and_ps(V01,MaskXY); + V01 = _mm_xor_ps(V01,SignMask2); + V01 = _mm_add_ps(g_XMIdentityR0, V01); + + S0 = _mm_mul_ps(V01, Omega); + S0 = XMVectorSin(S0); + S0 = _mm_div_ps(S0, SinOmega); + + S0 = XMVectorSelect(V01, S0, Control); + + S1 = XMVectorSplatY(S0); + S0 = XMVectorSplatX(S0); + + S1 = _mm_mul_ps(S1, Sign); + Result = _mm_mul_ps(Q0, S0); + S1 = _mm_mul_ps(S1, Q1); + Result = _mm_add_ps(Result,S1); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMQuaternionSquad +( + FXMVECTOR Q0, + FXMVECTOR Q1, + FXMVECTOR Q2, + CXMVECTOR Q3, + FLOAT t +) +{ + XMVECTOR T = XMVectorReplicate(t); + return XMQuaternionSquadV(Q0, Q1, Q2, Q3, T); +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMQuaternionSquadV +( + FXMVECTOR Q0, + FXMVECTOR Q1, + FXMVECTOR Q2, + CXMVECTOR Q3, + CXMVECTOR T +) +{ + XMVECTOR Q03; + XMVECTOR Q12; + XMVECTOR TP; + XMVECTOR Two; + XMVECTOR Result; + + XMASSERT( (XMVectorGetY(T) == XMVectorGetX(T)) && (XMVectorGetZ(T) == XMVectorGetX(T)) && (XMVectorGetW(T) == XMVectorGetX(T)) ); + + TP = T; + Two = XMVectorSplatConstant(2, 0); + + Q03 = XMQuaternionSlerpV(Q0, Q3, T); + Q12 = XMQuaternionSlerpV(Q1, Q2, T); + + TP = XMVectorNegativeMultiplySubtract(TP, TP, TP); + TP = XMVectorMultiply(TP, Two); + + Result = XMQuaternionSlerpV(Q03, Q12, TP); + + return Result; + +} + +//------------------------------------------------------------------------------ + +XMINLINE VOID XMQuaternionSquadSetup +( + XMVECTOR* pA, + XMVECTOR* pB, + XMVECTOR* pC, + FXMVECTOR Q0, + FXMVECTOR Q1, + FXMVECTOR Q2, + CXMVECTOR Q3 +) +{ + XMVECTOR SQ0, SQ2, SQ3; + XMVECTOR InvQ1, InvQ2; + XMVECTOR LnQ0, LnQ1, LnQ2, LnQ3; + XMVECTOR ExpQ02, ExpQ13; + XMVECTOR LS01, LS12, LS23; + XMVECTOR LD01, LD12, LD23; + XMVECTOR Control0, Control1, Control2; + XMVECTOR NegativeOneQuarter; + + XMASSERT(pA); + XMASSERT(pB); + XMASSERT(pC); + + LS12 = XMQuaternionLengthSq(XMVectorAdd(Q1, Q2)); + LD12 = XMQuaternionLengthSq(XMVectorSubtract(Q1, Q2)); + SQ2 = XMVectorNegate(Q2); + + Control1 = XMVectorLess(LS12, LD12); + SQ2 = XMVectorSelect(Q2, SQ2, Control1); + + LS01 = XMQuaternionLengthSq(XMVectorAdd(Q0, Q1)); + LD01 = XMQuaternionLengthSq(XMVectorSubtract(Q0, Q1)); + SQ0 = XMVectorNegate(Q0); + + LS23 = XMQuaternionLengthSq(XMVectorAdd(SQ2, Q3)); + LD23 = XMQuaternionLengthSq(XMVectorSubtract(SQ2, Q3)); + SQ3 = XMVectorNegate(Q3); + + Control0 = XMVectorLess(LS01, LD01); + Control2 = XMVectorLess(LS23, LD23); + + SQ0 = XMVectorSelect(Q0, SQ0, Control0); + SQ3 = XMVectorSelect(Q3, SQ3, Control2); + + InvQ1 = XMQuaternionInverse(Q1); + InvQ2 = XMQuaternionInverse(SQ2); + + LnQ0 = XMQuaternionLn(XMQuaternionMultiply(InvQ1, SQ0)); + LnQ2 = XMQuaternionLn(XMQuaternionMultiply(InvQ1, SQ2)); + LnQ1 = XMQuaternionLn(XMQuaternionMultiply(InvQ2, Q1)); + LnQ3 = XMQuaternionLn(XMQuaternionMultiply(InvQ2, SQ3)); + + NegativeOneQuarter = XMVectorSplatConstant(-1, 2); + + ExpQ02 = XMVectorMultiply(XMVectorAdd(LnQ0, LnQ2), NegativeOneQuarter); + ExpQ13 = XMVectorMultiply(XMVectorAdd(LnQ1, LnQ3), NegativeOneQuarter); + ExpQ02 = XMQuaternionExp(ExpQ02); + ExpQ13 = XMQuaternionExp(ExpQ13); + + *pA = XMQuaternionMultiply(Q1, ExpQ02); + *pB = XMQuaternionMultiply(SQ2, ExpQ13); + *pC = SQ2; +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMQuaternionBaryCentric +( + FXMVECTOR Q0, + FXMVECTOR Q1, + FXMVECTOR Q2, + FLOAT f, + FLOAT g +) +{ + XMVECTOR Q01; + XMVECTOR Q02; + FLOAT s; + XMVECTOR Result; + + s = f + g; + + if ((s < 0.00001f) && (s > -0.00001f)) + { + Result = Q0; + } + else + { + Q01 = XMQuaternionSlerp(Q0, Q1, s); + Q02 = XMQuaternionSlerp(Q0, Q2, s); + + Result = XMQuaternionSlerp(Q01, Q02, g / s); + } + + return Result; +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMQuaternionBaryCentricV +( + FXMVECTOR Q0, + FXMVECTOR Q1, + FXMVECTOR Q2, + CXMVECTOR F, + CXMVECTOR G +) +{ + XMVECTOR Q01; + XMVECTOR Q02; + XMVECTOR S, GS; + XMVECTOR Epsilon; + XMVECTOR Result; + + XMASSERT( (XMVectorGetY(F) == XMVectorGetX(F)) && (XMVectorGetZ(F) == XMVectorGetX(F)) && (XMVectorGetW(F) == XMVectorGetX(F)) ); + XMASSERT( (XMVectorGetY(G) == XMVectorGetX(G)) && (XMVectorGetZ(G) == XMVectorGetX(G)) && (XMVectorGetW(G) == XMVectorGetX(G)) ); + + Epsilon = XMVectorSplatConstant(1, 16); + + S = XMVectorAdd(F, G); + + if (XMVector4InBounds(S, Epsilon)) + { + Result = Q0; + } + else + { + Q01 = XMQuaternionSlerpV(Q0, Q1, S); + Q02 = XMQuaternionSlerpV(Q0, Q2, S); + GS = XMVectorReciprocal(S); + GS = XMVectorMultiply(G, GS); + + Result = XMQuaternionSlerpV(Q01, Q02, GS); + } + + return Result; +} + +//------------------------------------------------------------------------------ +// Transformation operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMQuaternionIdentity() +{ +#if defined(_XM_NO_INTRINSICS_) + return g_XMIdentityR3.v; +#elif defined(_XM_SSE_INTRINSICS_) + return g_XMIdentityR3; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMQuaternionRotationRollPitchYaw +( + FLOAT Pitch, + FLOAT Yaw, + FLOAT Roll +) +{ + XMVECTOR Angles; + XMVECTOR Q; + + Angles = XMVectorSet(Pitch, Yaw, Roll, 0.0f); + Q = XMQuaternionRotationRollPitchYawFromVector(Angles); + + return Q; +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMQuaternionRotationRollPitchYawFromVector +( + FXMVECTOR Angles // +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Q, Q0, Q1; + XMVECTOR P0, P1, Y0, Y1, R0, R1; + XMVECTOR HalfAngles; + XMVECTOR SinAngles, CosAngles; + static CONST XMVECTORU32 ControlPitch = {XM_PERMUTE_0X, XM_PERMUTE_1X, XM_PERMUTE_1X, XM_PERMUTE_1X}; + static CONST XMVECTORU32 ControlYaw = {XM_PERMUTE_1Y, XM_PERMUTE_0Y, XM_PERMUTE_1Y, XM_PERMUTE_1Y}; + static CONST XMVECTORU32 ControlRoll = {XM_PERMUTE_1Z, XM_PERMUTE_1Z, XM_PERMUTE_0Z, XM_PERMUTE_1Z}; + static CONST XMVECTOR Sign = {1.0f, -1.0f, -1.0f, 1.0f}; + + HalfAngles = XMVectorMultiply(Angles, g_XMOneHalf.v); + XMVectorSinCos(&SinAngles, &CosAngles, HalfAngles); + + P0 = XMVectorPermute(SinAngles, CosAngles, ControlPitch.v); + Y0 = XMVectorPermute(SinAngles, CosAngles, ControlYaw.v); + R0 = XMVectorPermute(SinAngles, CosAngles, ControlRoll.v); + P1 = XMVectorPermute(CosAngles, SinAngles, ControlPitch.v); + Y1 = XMVectorPermute(CosAngles, SinAngles, ControlYaw.v); + R1 = XMVectorPermute(CosAngles, SinAngles, ControlRoll.v); + + Q1 = XMVectorMultiply(P1, Sign); + Q0 = XMVectorMultiply(P0, Y0); + Q1 = XMVectorMultiply(Q1, Y1); + Q0 = XMVectorMultiply(Q0, R0); + Q = XMVectorMultiplyAdd(Q1, R1, Q0); + + return Q; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR Q, Q0, Q1; + XMVECTOR P0, P1, Y0, Y1, R0, R1; + XMVECTOR HalfAngles; + XMVECTOR SinAngles, CosAngles; + static CONST XMVECTORI32 ControlPitch = {XM_PERMUTE_0X, XM_PERMUTE_1X, XM_PERMUTE_1X, XM_PERMUTE_1X}; + static CONST XMVECTORI32 ControlYaw = {XM_PERMUTE_1Y, XM_PERMUTE_0Y, XM_PERMUTE_1Y, XM_PERMUTE_1Y}; + static CONST XMVECTORI32 ControlRoll = {XM_PERMUTE_1Z, XM_PERMUTE_1Z, XM_PERMUTE_0Z, XM_PERMUTE_1Z}; + static CONST XMVECTORF32 Sign = {1.0f, -1.0f, -1.0f, 1.0f}; + + HalfAngles = _mm_mul_ps(Angles, g_XMOneHalf); + XMVectorSinCos(&SinAngles, &CosAngles, HalfAngles); + + P0 = XMVectorPermute(SinAngles, CosAngles, ControlPitch); + Y0 = XMVectorPermute(SinAngles, CosAngles, ControlYaw); + R0 = XMVectorPermute(SinAngles, CosAngles, ControlRoll); + P1 = XMVectorPermute(CosAngles, SinAngles, ControlPitch); + Y1 = XMVectorPermute(CosAngles, SinAngles, ControlYaw); + R1 = XMVectorPermute(CosAngles, SinAngles, ControlRoll); + + Q1 = _mm_mul_ps(P1, Sign); + Q0 = _mm_mul_ps(P0, Y0); + Q1 = _mm_mul_ps(Q1, Y1); + Q0 = _mm_mul_ps(Q0, R0); + Q = _mm_mul_ps(Q1, R1); + Q = _mm_add_ps(Q,Q0); + return Q; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMQuaternionRotationNormal +( + FXMVECTOR NormalAxis, + FLOAT Angle +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Q; + XMVECTOR N; + XMVECTOR Scale; + + N = XMVectorSelect(g_XMOne.v, NormalAxis, g_XMSelect1110.v); + + XMScalarSinCos(&Scale.vector4_f32[2], &Scale.vector4_f32[3], 0.5f * Angle); + + Scale.vector4_f32[0] = Scale.vector4_f32[1] = Scale.vector4_f32[2]; + + Q = XMVectorMultiply(N, Scale); + + return Q; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR N = _mm_and_ps(NormalAxis,g_XMMask3); + N = _mm_or_ps(N,g_XMIdentityR3); + XMVECTOR Scale = _mm_set_ps1(0.5f * Angle); + XMVECTOR vSine; + XMVECTOR vCosine; + XMVectorSinCos(&vSine,&vCosine,Scale); + Scale = _mm_and_ps(vSine,g_XMMask3); + vCosine = _mm_and_ps(vCosine,g_XMMaskW); + Scale = _mm_or_ps(Scale,vCosine); + N = _mm_mul_ps(N,Scale); + return N; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMQuaternionRotationAxis +( + FXMVECTOR Axis, + FLOAT Angle +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Normal; + XMVECTOR Q; + + XMASSERT(!XMVector3Equal(Axis, XMVectorZero())); + XMASSERT(!XMVector3IsInfinite(Axis)); + + Normal = XMVector3Normalize(Axis); + Q = XMQuaternionRotationNormal(Normal, Angle); + + return Q; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR Normal; + XMVECTOR Q; + + XMASSERT(!XMVector3Equal(Axis, XMVectorZero())); + XMASSERT(!XMVector3IsInfinite(Axis)); + + Normal = XMVector3Normalize(Axis); + Q = XMQuaternionRotationNormal(Normal, Angle); + return Q; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMVECTOR XMQuaternionRotationMatrix +( + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) || defined(_XM_SSE_INTRINSICS_) + + XMVECTOR Q0, Q1, Q2; + XMVECTOR M00, M11, M22; + XMVECTOR CQ0, CQ1, C; + XMVECTOR CX, CY, CZ, CW; + XMVECTOR SQ1, Scale; + XMVECTOR Rsq, Sqrt, VEqualsNaN; + XMVECTOR A, B, P; + XMVECTOR PermuteSplat, PermuteSplatT; + XMVECTOR SignB, SignBT; + XMVECTOR PermuteControl, PermuteControlT; + XMVECTOR Result; + static CONST XMVECTORF32 OneQuarter = {0.25f, 0.25f, 0.25f, 0.25f}; + static CONST XMVECTORF32 SignPNNP = {1.0f, -1.0f, -1.0f, 1.0f}; + static CONST XMVECTORF32 SignNPNP = {-1.0f, 1.0f, -1.0f, 1.0f}; + static CONST XMVECTORF32 SignNNPP = {-1.0f, -1.0f, 1.0f, 1.0f}; + static CONST XMVECTORF32 SignPNPP = {1.0f, -1.0f, 1.0f, 1.0f}; + static CONST XMVECTORF32 SignPPNP = {1.0f, 1.0f, -1.0f, 1.0f}; + static CONST XMVECTORF32 SignNPPP = {-1.0f, 1.0f, 1.0f, 1.0f}; + static CONST XMVECTORU32 Permute0X0X0Y0W = {XM_PERMUTE_0X, XM_PERMUTE_0X, XM_PERMUTE_0Y, XM_PERMUTE_0W}; + static CONST XMVECTORU32 Permute0Y0Z0Z1W = {XM_PERMUTE_0Y, XM_PERMUTE_0Z, XM_PERMUTE_0Z, XM_PERMUTE_1W}; + static CONST XMVECTORU32 SplatX = {XM_PERMUTE_0X, XM_PERMUTE_0X, XM_PERMUTE_0X, XM_PERMUTE_0X}; + static CONST XMVECTORU32 SplatY = {XM_PERMUTE_0Y, XM_PERMUTE_0Y, XM_PERMUTE_0Y, XM_PERMUTE_0Y}; + static CONST XMVECTORU32 SplatZ = {XM_PERMUTE_0Z, XM_PERMUTE_0Z, XM_PERMUTE_0Z, XM_PERMUTE_0Z}; + static CONST XMVECTORU32 SplatW = {XM_PERMUTE_0W, XM_PERMUTE_0W, XM_PERMUTE_0W, XM_PERMUTE_0W}; + static CONST XMVECTORU32 PermuteC = {XM_PERMUTE_0X, XM_PERMUTE_0Z, XM_PERMUTE_1X, XM_PERMUTE_1Y}; + static CONST XMVECTORU32 PermuteA = {XM_PERMUTE_0Y, XM_PERMUTE_1Y, XM_PERMUTE_1Z, XM_PERMUTE_0W}; + static CONST XMVECTORU32 PermuteB = {XM_PERMUTE_1X, XM_PERMUTE_1W, XM_PERMUTE_0Z, XM_PERMUTE_0W}; + static CONST XMVECTORU32 Permute0 = {XM_PERMUTE_0X, XM_PERMUTE_1X, XM_PERMUTE_1Z, XM_PERMUTE_1Y}; + static CONST XMVECTORU32 Permute1 = {XM_PERMUTE_1X, XM_PERMUTE_0Y, XM_PERMUTE_1Y, XM_PERMUTE_1Z}; + static CONST XMVECTORU32 Permute2 = {XM_PERMUTE_1Z, XM_PERMUTE_1Y, XM_PERMUTE_0Z, XM_PERMUTE_1X}; + static CONST XMVECTORU32 Permute3 = {XM_PERMUTE_1Y, XM_PERMUTE_1Z, XM_PERMUTE_1X, XM_PERMUTE_0W}; + + M00 = XMVectorSplatX(M.r[0]); + M11 = XMVectorSplatY(M.r[1]); + M22 = XMVectorSplatZ(M.r[2]); + + Q0 = XMVectorMultiply(SignPNNP.v, M00); + Q0 = XMVectorMultiplyAdd(SignNPNP.v, M11, Q0); + Q0 = XMVectorMultiplyAdd(SignNNPP.v, M22, Q0); + + Q1 = XMVectorAdd(Q0, g_XMOne.v); + + Rsq = XMVectorReciprocalSqrt(Q1); + VEqualsNaN = XMVectorIsNaN(Rsq); + Sqrt = XMVectorMultiply(Q1, Rsq); + Q1 = XMVectorSelect(Sqrt, Q1, VEqualsNaN); + + Q1 = XMVectorMultiply(Q1, g_XMOneHalf.v); + + SQ1 = XMVectorMultiply(Rsq, g_XMOneHalf.v); + + CQ0 = XMVectorPermute(Q0, Q0, Permute0X0X0Y0W.v); + CQ1 = XMVectorPermute(Q0, g_XMEpsilon.v, Permute0Y0Z0Z1W.v); + C = XMVectorGreaterOrEqual(CQ0, CQ1); + + CX = XMVectorSplatX(C); + CY = XMVectorSplatY(C); + CZ = XMVectorSplatZ(C); + CW = XMVectorSplatW(C); + + PermuteSplat = XMVectorSelect(SplatZ.v, SplatY.v, CZ); + SignB = XMVectorSelect(SignNPPP.v, SignPPNP.v, CZ); + PermuteControl = XMVectorSelect(Permute2.v, Permute1.v, CZ); + + PermuteSplat = XMVectorSelect(PermuteSplat, SplatZ.v, CX); + SignB = XMVectorSelect(SignB, SignNPPP.v, CX); + PermuteControl = XMVectorSelect(PermuteControl, Permute2.v, CX); + + PermuteSplatT = XMVectorSelect(PermuteSplat,SplatX.v, CY); + SignBT = XMVectorSelect(SignB, SignPNPP.v, CY); + PermuteControlT = XMVectorSelect(PermuteControl,Permute0.v, CY); + + PermuteSplat = XMVectorSelect(PermuteSplat, PermuteSplatT, CX); + SignB = XMVectorSelect(SignB, SignBT, CX); + PermuteControl = XMVectorSelect(PermuteControl, PermuteControlT, CX); + + PermuteSplat = XMVectorSelect(PermuteSplat,SplatW.v, CW); + SignB = XMVectorSelect(SignB, g_XMNegativeOne.v, CW); + PermuteControl = XMVectorSelect(PermuteControl,Permute3.v, CW); + + Scale = XMVectorPermute(SQ1, SQ1, PermuteSplat); + + P = XMVectorPermute(M.r[1], M.r[2],PermuteC.v); // {M10, M12, M20, M21} + A = XMVectorPermute(M.r[0], P, PermuteA.v); // {M01, M12, M20, M03} + B = XMVectorPermute(M.r[0], P, PermuteB.v); // {M10, M21, M02, M03} + + Q2 = XMVectorMultiplyAdd(SignB, B, A); + Q2 = XMVectorMultiply(Q2, Scale); + + Result = XMVectorPermute(Q1, Q2, PermuteControl); + + return Result; + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Conversion operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMQuaternionToAxisAngle +( + XMVECTOR* pAxis, + FLOAT* pAngle, + FXMVECTOR Q +) +{ + XMASSERT(pAxis); + XMASSERT(pAngle); + + *pAxis = Q; + +#if defined(_XM_SSE_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) + *pAngle = 2.0f * acosf(XMVectorGetW(Q)); +#else + *pAngle = 2.0f * XMScalarACos(XMVectorGetW(Q)); +#endif +} + +/**************************************************************************** + * + * Plane + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ +// Comparison operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMPlaneEqual +( + FXMVECTOR P1, + FXMVECTOR P2 +) +{ + return XMVector4Equal(P1, P2); +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMPlaneNearEqual +( + FXMVECTOR P1, + FXMVECTOR P2, + FXMVECTOR Epsilon +) +{ + XMVECTOR NP1 = XMPlaneNormalize(P1); + XMVECTOR NP2 = XMPlaneNormalize(P2); + return XMVector4NearEqual(NP1, NP2, Epsilon); +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMPlaneNotEqual +( + FXMVECTOR P1, + FXMVECTOR P2 +) +{ + return XMVector4NotEqual(P1, P2); +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMPlaneIsNaN +( + FXMVECTOR P +) +{ + return XMVector4IsNaN(P); +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMPlaneIsInfinite +( + FXMVECTOR P +) +{ + return XMVector4IsInfinite(P); +} + +//------------------------------------------------------------------------------ +// Computation operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMPlaneDot +( + FXMVECTOR P, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + return XMVector4Dot(P, V); + +#elif defined(_XM_SSE_INTRINSICS_) + __m128 vTemp2 = V; + __m128 vTemp = _mm_mul_ps(P,vTemp2); + vTemp2 = _mm_shuffle_ps(vTemp2,vTemp,_MM_SHUFFLE(1,0,0,0)); // Copy X to the Z position and Y to the W position + vTemp2 = _mm_add_ps(vTemp2,vTemp); // Add Z = X+Z; W = Y+W; + vTemp = _mm_shuffle_ps(vTemp,vTemp2,_MM_SHUFFLE(0,3,0,0)); // Copy W to the Z position + vTemp = _mm_add_ps(vTemp,vTemp2); // Add Z and W together + return _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(2,2,2,2)); // Splat Z and return +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMPlaneDotCoord +( + FXMVECTOR P, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V3; + XMVECTOR Result; + + // Result = P[0] * V[0] + P[1] * V[1] + P[2] * V[2] + P[3] + V3 = XMVectorSelect(g_XMOne.v, V, g_XMSelect1110.v); + Result = XMVector4Dot(P, V3); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp2 = _mm_and_ps(V,g_XMMask3); + vTemp2 = _mm_or_ps(vTemp2,g_XMIdentityR3); + XMVECTOR vTemp = _mm_mul_ps(P,vTemp2); + vTemp2 = _mm_shuffle_ps(vTemp2,vTemp,_MM_SHUFFLE(1,0,0,0)); // Copy X to the Z position and Y to the W position + vTemp2 = _mm_add_ps(vTemp2,vTemp); // Add Z = X+Z; W = Y+W; + vTemp = _mm_shuffle_ps(vTemp,vTemp2,_MM_SHUFFLE(0,3,0,0)); // Copy W to the Z position + vTemp = _mm_add_ps(vTemp,vTemp2); // Add Z and W together + return _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(2,2,2,2)); // Splat Z and return +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMPlaneDotNormal +( + FXMVECTOR P, + FXMVECTOR V +) +{ + return XMVector3Dot(P, V); +} + +//------------------------------------------------------------------------------ +// XMPlaneNormalizeEst uses a reciprocal estimate and +// returns QNaN on zero and infinite vectors. + +XMFINLINE XMVECTOR XMPlaneNormalizeEst +( + FXMVECTOR P +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + Result = XMVector3ReciprocalLength(P); + Result = XMVectorMultiply(P, Result); + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product + XMVECTOR vDot = _mm_mul_ps(P,P); + // x=Dot.y, y=Dot.z + XMVECTOR vTemp = _mm_shuffle_ps(vDot,vDot,_MM_SHUFFLE(2,1,2,1)); + // Result.x = x+y + vDot = _mm_add_ss(vDot,vTemp); + // x=Dot.z + vTemp = _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(1,1,1,1)); + // Result.x = (x+y)+z + vDot = _mm_add_ss(vDot,vTemp); + // Splat x + vDot = _mm_shuffle_ps(vDot,vDot,_MM_SHUFFLE(0,0,0,0)); + // Get the reciprocal + vDot = _mm_rsqrt_ps(vDot); + // Get the reciprocal + vDot = _mm_mul_ps(vDot,P); + return vDot; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMPlaneNormalize +( + FXMVECTOR P +) +{ +#if defined(_XM_NO_INTRINSICS_) + FLOAT fLengthSq = sqrtf((P.vector4_f32[0]*P.vector4_f32[0])+(P.vector4_f32[1]*P.vector4_f32[1])+(P.vector4_f32[2]*P.vector4_f32[2])); + // Prevent divide by zero + if (fLengthSq) { + fLengthSq = 1.0f/fLengthSq; + } + { + XMVECTOR vResult = { + P.vector4_f32[0]*fLengthSq, + P.vector4_f32[1]*fLengthSq, + P.vector4_f32[2]*fLengthSq, + P.vector4_f32[3]*fLengthSq + }; + return vResult; + } +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product on x,y and z only + XMVECTOR vLengthSq = _mm_mul_ps(P,P); + XMVECTOR vTemp = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(2,1,2,1)); + vLengthSq = _mm_add_ss(vLengthSq,vTemp); + vTemp = _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(1,1,1,1)); + vLengthSq = _mm_add_ss(vLengthSq,vTemp); + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(0,0,0,0)); + // Prepare for the division + XMVECTOR vResult = _mm_sqrt_ps(vLengthSq); + // Failsafe on zero (Or epsilon) length planes + // If the length is infinity, set the elements to zero + vLengthSq = _mm_cmpneq_ps(vLengthSq,g_XMInfinity); + // Reciprocal mul to perform the normalization + vResult = _mm_div_ps(P,vResult); + // Any that are infinity, set to zero + vResult = _mm_and_ps(vResult,vLengthSq); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMPlaneIntersectLine +( + FXMVECTOR P, + FXMVECTOR LinePoint1, + FXMVECTOR LinePoint2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V1; + XMVECTOR V2; + XMVECTOR D; + XMVECTOR ReciprocalD; + XMVECTOR VT; + XMVECTOR Point; + XMVECTOR Zero; + XMVECTOR Control; + XMVECTOR Result; + + V1 = XMVector3Dot(P, LinePoint1); + V2 = XMVector3Dot(P, LinePoint2); + D = XMVectorSubtract(V1, V2); + + ReciprocalD = XMVectorReciprocal(D); + VT = XMPlaneDotCoord(P, LinePoint1); + VT = XMVectorMultiply(VT, ReciprocalD); + + Point = XMVectorSubtract(LinePoint2, LinePoint1); + Point = XMVectorMultiplyAdd(Point, VT, LinePoint1); + + Zero = XMVectorZero(); + Control = XMVectorNearEqual(D, Zero, g_XMEpsilon.v); + + Result = XMVectorSelect(Point, g_XMQNaN.v, Control); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR V1; + XMVECTOR V2; + XMVECTOR D; + XMVECTOR VT; + XMVECTOR Point; + XMVECTOR Zero; + XMVECTOR Control; + XMVECTOR Result; + + V1 = XMVector3Dot(P, LinePoint1); + V2 = XMVector3Dot(P, LinePoint2); + D = _mm_sub_ps(V1, V2); + + VT = XMPlaneDotCoord(P, LinePoint1); + VT = _mm_div_ps(VT, D); + + Point = _mm_sub_ps(LinePoint2, LinePoint1); + Point = _mm_mul_ps(Point,VT); + Point = _mm_add_ps(Point,LinePoint1); + Zero = XMVectorZero(); + Control = XMVectorNearEqual(D, Zero, g_XMEpsilon); + Result = XMVectorSelect(Point, g_XMQNaN, Control); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE VOID XMPlaneIntersectPlane +( + XMVECTOR* pLinePoint1, + XMVECTOR* pLinePoint2, + FXMVECTOR P1, + FXMVECTOR P2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V1; + XMVECTOR V2; + XMVECTOR V3; + XMVECTOR LengthSq; + XMVECTOR RcpLengthSq; + XMVECTOR Point; + XMVECTOR P1W; + XMVECTOR P2W; + XMVECTOR Control; + XMVECTOR LinePoint1; + XMVECTOR LinePoint2; + + XMASSERT(pLinePoint1); + XMASSERT(pLinePoint2); + + V1 = XMVector3Cross(P2, P1); + + LengthSq = XMVector3LengthSq(V1); + + V2 = XMVector3Cross(P2, V1); + + P1W = XMVectorSplatW(P1); + Point = XMVectorMultiply(V2, P1W); + + V3 = XMVector3Cross(V1, P1); + + P2W = XMVectorSplatW(P2); + Point = XMVectorMultiplyAdd(V3, P2W, Point); + + RcpLengthSq = XMVectorReciprocal(LengthSq); + LinePoint1 = XMVectorMultiply(Point, RcpLengthSq); + + LinePoint2 = XMVectorAdd(LinePoint1, V1); + + Control = XMVectorLessOrEqual(LengthSq, g_XMEpsilon.v); + *pLinePoint1 = XMVectorSelect(LinePoint1,g_XMQNaN.v, Control); + *pLinePoint2 = XMVectorSelect(LinePoint2,g_XMQNaN.v, Control); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pLinePoint1); + XMASSERT(pLinePoint2); + XMVECTOR V1; + XMVECTOR V2; + XMVECTOR V3; + XMVECTOR LengthSq; + XMVECTOR Point; + XMVECTOR P1W; + XMVECTOR P2W; + XMVECTOR Control; + XMVECTOR LinePoint1; + XMVECTOR LinePoint2; + + V1 = XMVector3Cross(P2, P1); + + LengthSq = XMVector3LengthSq(V1); + + V2 = XMVector3Cross(P2, V1); + + P1W = _mm_shuffle_ps(P1,P1,_MM_SHUFFLE(3,3,3,3)); + Point = _mm_mul_ps(V2, P1W); + + V3 = XMVector3Cross(V1, P1); + + P2W = _mm_shuffle_ps(P2,P2,_MM_SHUFFLE(3,3,3,3)); + V3 = _mm_mul_ps(V3,P2W); + Point = _mm_add_ps(Point,V3); + LinePoint1 = _mm_div_ps(Point,LengthSq); + + LinePoint2 = _mm_add_ps(LinePoint1, V1); + + Control = XMVectorLessOrEqual(LengthSq, g_XMEpsilon); + *pLinePoint1 = XMVectorSelect(LinePoint1,g_XMQNaN, Control); + *pLinePoint2 = XMVectorSelect(LinePoint2,g_XMQNaN, Control); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMPlaneTransform +( + FXMVECTOR P, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR X; + XMVECTOR Y; + XMVECTOR Z; + XMVECTOR W; + XMVECTOR Result; + + W = XMVectorSplatW(P); + Z = XMVectorSplatZ(P); + Y = XMVectorSplatY(P); + X = XMVectorSplatX(P); + + Result = XMVectorMultiply(W, M.r[3]); + Result = XMVectorMultiplyAdd(Z, M.r[2], Result); + Result = XMVectorMultiplyAdd(Y, M.r[1], Result); + Result = XMVectorMultiplyAdd(X, M.r[0], Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR X = _mm_shuffle_ps(P,P,_MM_SHUFFLE(0,0,0,0)); + XMVECTOR Y = _mm_shuffle_ps(P,P,_MM_SHUFFLE(1,1,1,1)); + XMVECTOR Z = _mm_shuffle_ps(P,P,_MM_SHUFFLE(2,2,2,2)); + XMVECTOR W = _mm_shuffle_ps(P,P,_MM_SHUFFLE(3,3,3,3)); + X = _mm_mul_ps(X, M.r[0]); + Y = _mm_mul_ps(Y, M.r[1]); + Z = _mm_mul_ps(Z, M.r[2]); + W = _mm_mul_ps(W, M.r[3]); + X = _mm_add_ps(X,Z); + Y = _mm_add_ps(Y,W); + X = _mm_add_ps(X,Y); + return X; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMFLOAT4* XMPlaneTransformStream +( + XMFLOAT4* pOutputStream, + UINT OutputStride, + CONST XMFLOAT4* pInputStream, + UINT InputStride, + UINT PlaneCount, + CXMMATRIX M +) +{ + return XMVector4TransformStream(pOutputStream, + OutputStride, + pInputStream, + InputStride, + PlaneCount, + M); +} + +//------------------------------------------------------------------------------ +// Conversion operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMPlaneFromPointNormal +( + FXMVECTOR Point, + FXMVECTOR Normal +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR W; + XMVECTOR Result; + + W = XMVector3Dot(Point, Normal); + W = XMVectorNegate(W); + Result = XMVectorSelect(W, Normal, g_XMSelect1110.v); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR W; + XMVECTOR Result; + W = XMVector3Dot(Point,Normal); + W = _mm_mul_ps(W,g_XMNegativeOne); + Result = _mm_and_ps(Normal,g_XMMask3); + W = _mm_and_ps(W,g_XMMaskW); + Result = _mm_or_ps(Result,W); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMPlaneFromPoints +( + FXMVECTOR Point1, + FXMVECTOR Point2, + FXMVECTOR Point3 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR N; + XMVECTOR D; + XMVECTOR V21; + XMVECTOR V31; + XMVECTOR Result; + + V21 = XMVectorSubtract(Point1, Point2); + V31 = XMVectorSubtract(Point1, Point3); + + N = XMVector3Cross(V21, V31); + N = XMVector3Normalize(N); + + D = XMPlaneDotNormal(N, Point1); + D = XMVectorNegate(D); + + Result = XMVectorSelect(D, N, g_XMSelect1110.v); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR N; + XMVECTOR D; + XMVECTOR V21; + XMVECTOR V31; + XMVECTOR Result; + + V21 = _mm_sub_ps(Point1, Point2); + V31 = _mm_sub_ps(Point1, Point3); + + N = XMVector3Cross(V21, V31); + N = XMVector3Normalize(N); + + D = XMPlaneDotNormal(N, Point1); + D = _mm_mul_ps(D,g_XMNegativeOne); + N = _mm_and_ps(N,g_XMMask3); + D = _mm_and_ps(D,g_XMMaskW); + Result = _mm_or_ps(D,N); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +/**************************************************************************** + * + * Color + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ +// Comparison operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMColorEqual +( + FXMVECTOR C1, + FXMVECTOR C2 +) +{ + return XMVector4Equal(C1, C2); +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMColorNotEqual +( + FXMVECTOR C1, + FXMVECTOR C2 +) +{ + return XMVector4NotEqual(C1, C2); +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMColorGreater +( + FXMVECTOR C1, + FXMVECTOR C2 +) +{ + return XMVector4Greater(C1, C2); +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMColorGreaterOrEqual +( + FXMVECTOR C1, + FXMVECTOR C2 +) +{ + return XMVector4GreaterOrEqual(C1, C2); +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMColorLess +( + FXMVECTOR C1, + FXMVECTOR C2 +) +{ + return XMVector4Less(C1, C2); +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMColorLessOrEqual +( + FXMVECTOR C1, + FXMVECTOR C2 +) +{ + return XMVector4LessOrEqual(C1, C2); +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMColorIsNaN +( + FXMVECTOR C +) +{ + return XMVector4IsNaN(C); +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMColorIsInfinite +( + FXMVECTOR C +) +{ + return XMVector4IsInfinite(C); +} + +//------------------------------------------------------------------------------ +// Computation operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMColorNegative +( + FXMVECTOR vColor +) +{ +#if defined(_XM_NO_INTRINSICS_) +// XMASSERT(XMVector4GreaterOrEqual(C, XMVectorReplicate(0.0f))); +// XMASSERT(XMVector4LessOrEqual(C, XMVectorReplicate(1.0f))); + XMVECTOR vResult = { + 1.0f - vColor.vector4_f32[0], + 1.0f - vColor.vector4_f32[1], + 1.0f - vColor.vector4_f32[2], + vColor.vector4_f32[3] + }; + return vResult; + +#elif defined(_XM_SSE_INTRINSICS_) + // Negate only x,y and z. + XMVECTOR vTemp = _mm_xor_ps(vColor,g_XMNegate3); + // Add 1,1,1,0 to -x,-y,-z,w + return _mm_add_ps(vTemp,g_XMOne3); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMColorModulate +( + FXMVECTOR C1, + FXMVECTOR C2 +) +{ + return XMVectorMultiply(C1, C2); +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMColorAdjustSaturation +( + FXMVECTOR vColor, + FLOAT fSaturation +) +{ +#if defined(_XM_NO_INTRINSICS_) + CONST XMVECTOR gvLuminance = {0.2125f, 0.7154f, 0.0721f, 0.0f}; + + // Luminance = 0.2125f * C[0] + 0.7154f * C[1] + 0.0721f * C[2]; + // Result = (C - Luminance) * Saturation + Luminance; + + FLOAT fLuminance = (vColor.vector4_f32[0]*gvLuminance.vector4_f32[0])+(vColor.vector4_f32[1]*gvLuminance.vector4_f32[1])+(vColor.vector4_f32[2]*gvLuminance.vector4_f32[2]); + XMVECTOR vResult = { + ((vColor.vector4_f32[0] - fLuminance)*fSaturation)+fLuminance, + ((vColor.vector4_f32[1] - fLuminance)*fSaturation)+fLuminance, + ((vColor.vector4_f32[2] - fLuminance)*fSaturation)+fLuminance, + vColor.vector4_f32[3]}; + return vResult; + +#elif defined(_XM_SSE_INTRINSICS_) + static const XMVECTORF32 gvLuminance = {0.2125f, 0.7154f, 0.0721f, 0.0f}; +// Mul RGB by intensity constants + XMVECTOR vLuminance = _mm_mul_ps(vColor,gvLuminance); +// vResult.x = vLuminance.y, vResult.y = vLuminance.y, +// vResult.z = vLuminance.z, vResult.w = vLuminance.z + XMVECTOR vResult = vLuminance; + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(2,2,1,1)); +// vLuminance.x += vLuminance.y + vLuminance = _mm_add_ss(vLuminance,vResult); +// Splat vLuminance.z + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(2,2,2,2)); +// vLuminance.x += vLuminance.z (Dot product) + vLuminance = _mm_add_ss(vLuminance,vResult); +// Splat vLuminance + vLuminance = _mm_shuffle_ps(vLuminance,vLuminance,_MM_SHUFFLE(0,0,0,0)); +// Splat fSaturation + XMVECTOR vSaturation = _mm_set_ps1(fSaturation); +// vResult = ((vColor-vLuminance)*vSaturation)+vLuminance; + vResult = _mm_sub_ps(vColor,vLuminance); + vResult = _mm_mul_ps(vResult,vSaturation); + vResult = _mm_add_ps(vResult,vLuminance); +// Retain w from the source color + vLuminance = _mm_shuffle_ps(vResult,vColor,_MM_SHUFFLE(3,2,2,2)); // x = vResult.z,y = vResult.z,z = vColor.z,w=vColor.w + vResult = _mm_shuffle_ps(vResult,vLuminance,_MM_SHUFFLE(3,0,1,0)); // x = vResult.x,y = vResult.y,z = vResult.z,w=vColor.w + return vResult; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMColorAdjustContrast +( + FXMVECTOR vColor, + FLOAT fContrast +) +{ +#if defined(_XM_NO_INTRINSICS_) + // Result = (vColor - 0.5f) * fContrast + 0.5f; + XMVECTOR vResult = { + ((vColor.vector4_f32[0]-0.5f) * fContrast) + 0.5f, + ((vColor.vector4_f32[1]-0.5f) * fContrast) + 0.5f, + ((vColor.vector4_f32[2]-0.5f) * fContrast) + 0.5f, + vColor.vector4_f32[3] // Leave W untouched + }; + return vResult; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vScale = _mm_set_ps1(fContrast); // Splat the scale + XMVECTOR vResult = _mm_sub_ps(vColor,g_XMOneHalf); // Subtract 0.5f from the source (Saving source) + vResult = _mm_mul_ps(vResult,vScale); // Mul by scale + vResult = _mm_add_ps(vResult,g_XMOneHalf); // Add 0.5f +// Retain w from the source color + vScale = _mm_shuffle_ps(vResult,vColor,_MM_SHUFFLE(3,2,2,2)); // x = vResult.z,y = vResult.z,z = vColor.z,w=vColor.w + vResult = _mm_shuffle_ps(vResult,vScale,_MM_SHUFFLE(3,0,1,0)); // x = vResult.x,y = vResult.y,z = vResult.z,w=vColor.w + return vResult; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +/**************************************************************************** + * + * Miscellaneous + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMINLINE BOOL XMVerifyCPUSupport() +{ +#if defined(_XM_NO_INTRINSICS_) || !defined(_XM_SSE_INTRINSICS_) + return TRUE; +#else // _XM_SSE_INTRINSICS_ + // Note that on Windows 2000 or older, SSE2 detection is not supported so this will always fail + // Detecting SSE2 on older versions of Windows would require using cpuid directly + return ( IsProcessorFeaturePresent( PF_XMMI_INSTRUCTIONS_AVAILABLE ) && IsProcessorFeaturePresent( PF_XMMI64_INSTRUCTIONS_AVAILABLE ) ); +#endif +} + + +//------------------------------------------------------------------------------ + +#define XMASSERT_LINE_STRING_SIZE 16 + +XMINLINE VOID XMAssert +( + CONST CHAR* pExpression, + CONST CHAR* pFileName, + UINT LineNumber +) +{ + CHAR aLineString[XMASSERT_LINE_STRING_SIZE]; + CHAR* pLineString; + UINT Line; + + aLineString[XMASSERT_LINE_STRING_SIZE - 2] = '0'; + aLineString[XMASSERT_LINE_STRING_SIZE - 1] = '\0'; + for (Line = LineNumber, pLineString = aLineString + XMASSERT_LINE_STRING_SIZE - 2; + Line != 0 && pLineString >= aLineString; + Line /= 10, pLineString--) + { + *pLineString = (CHAR)('0' + (Line % 10)); + } + +#ifndef NO_OUTPUT_DEBUG_STRING + OutputDebugStringA("Assertion failed: "); + OutputDebugStringA(pExpression); + OutputDebugStringA(", file "); + OutputDebugStringA(pFileName); + OutputDebugStringA(", line "); + OutputDebugStringA(pLineString + 1); + OutputDebugStringA("\r\n"); +#else + DbgPrint("Assertion failed: %s, file %s, line %d\r\n", pExpression, pFileName, LineNumber); +#endif + + __debugbreak(); +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMFresnelTerm +( + FXMVECTOR CosIncidentAngle, + FXMVECTOR RefractionIndex +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR G; + XMVECTOR D, S; + XMVECTOR V0, V1, V2, V3; + XMVECTOR Result; + + // Result = 0.5f * (g - c)^2 / (g + c)^2 * ((c * (g + c) - 1)^2 / (c * (g - c) + 1)^2 + 1) where + // c = CosIncidentAngle + // g = sqrt(c^2 + RefractionIndex^2 - 1) + + XMASSERT(!XMVector4IsInfinite(CosIncidentAngle)); + + G = XMVectorMultiplyAdd(RefractionIndex, RefractionIndex, g_XMNegativeOne.v); + G = XMVectorMultiplyAdd(CosIncidentAngle, CosIncidentAngle, G); + G = XMVectorAbs(G); + G = XMVectorSqrt(G); + + S = XMVectorAdd(G, CosIncidentAngle); + D = XMVectorSubtract(G, CosIncidentAngle); + + V0 = XMVectorMultiply(D, D); + V1 = XMVectorMultiply(S, S); + V1 = XMVectorReciprocal(V1); + V0 = XMVectorMultiply(g_XMOneHalf.v, V0); + V0 = XMVectorMultiply(V0, V1); + + V2 = XMVectorMultiplyAdd(CosIncidentAngle, S, g_XMNegativeOne.v); + V3 = XMVectorMultiplyAdd(CosIncidentAngle, D, g_XMOne.v); + V2 = XMVectorMultiply(V2, V2); + V3 = XMVectorMultiply(V3, V3); + V3 = XMVectorReciprocal(V3); + V2 = XMVectorMultiplyAdd(V2, V3, g_XMOne.v); + + Result = XMVectorMultiply(V0, V2); + + Result = XMVectorSaturate(Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Result = 0.5f * (g - c)^2 / (g + c)^2 * ((c * (g + c) - 1)^2 / (c * (g - c) + 1)^2 + 1) where + // c = CosIncidentAngle + // g = sqrt(c^2 + RefractionIndex^2 - 1) + + XMASSERT(!XMVector4IsInfinite(CosIncidentAngle)); + + // G = sqrt(abs((RefractionIndex^2-1) + CosIncidentAngle^2)) + XMVECTOR G = _mm_mul_ps(RefractionIndex,RefractionIndex); + XMVECTOR vTemp = _mm_mul_ps(CosIncidentAngle,CosIncidentAngle); + G = _mm_sub_ps(G,g_XMOne); + vTemp = _mm_add_ps(vTemp,G); + // max((0-vTemp),vTemp) == abs(vTemp) + // The abs is needed to deal with refraction and cosine being zero + G = _mm_setzero_ps(); + G = _mm_sub_ps(G,vTemp); + G = _mm_max_ps(G,vTemp); + // Last operation, the sqrt() + G = _mm_sqrt_ps(G); + + // Calc G-C and G+C + XMVECTOR GAddC = _mm_add_ps(G,CosIncidentAngle); + XMVECTOR GSubC = _mm_sub_ps(G,CosIncidentAngle); + // Perform the term (0.5f *(g - c)^2) / (g + c)^2 + XMVECTOR vResult = _mm_mul_ps(GSubC,GSubC); + vTemp = _mm_mul_ps(GAddC,GAddC); + vResult = _mm_mul_ps(vResult,g_XMOneHalf); + vResult = _mm_div_ps(vResult,vTemp); + // Perform the term ((c * (g + c) - 1)^2 / (c * (g - c) + 1)^2 + 1) + GAddC = _mm_mul_ps(GAddC,CosIncidentAngle); + GSubC = _mm_mul_ps(GSubC,CosIncidentAngle); + GAddC = _mm_sub_ps(GAddC,g_XMOne); + GSubC = _mm_add_ps(GSubC,g_XMOne); + GAddC = _mm_mul_ps(GAddC,GAddC); + GSubC = _mm_mul_ps(GSubC,GSubC); + GAddC = _mm_div_ps(GAddC,GSubC); + GAddC = _mm_add_ps(GAddC,g_XMOne); + // Multiply the two term parts + vResult = _mm_mul_ps(vResult,GAddC); + // Clamp to 0.0 - 1.0f + vResult = _mm_max_ps(vResult,g_XMZero); + vResult = _mm_min_ps(vResult,g_XMOne); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMScalarNearEqual +( + FLOAT S1, + FLOAT S2, + FLOAT Epsilon +) +{ + FLOAT Delta = S1 - S2; +#if defined(_XM_NO_INTRINSICS_) + UINT AbsDelta = *(UINT*)&Delta & 0x7FFFFFFF; + return (*(FLOAT*)&AbsDelta <= Epsilon); +#elif defined(_XM_SSE_INTRINSICS_) + return (fabsf(Delta) <= Epsilon); +#else + return (__fabs(Delta) <= Epsilon); +#endif +} + +//------------------------------------------------------------------------------ +// Modulo the range of the given angle such that -XM_PI <= Angle < XM_PI +XMFINLINE FLOAT XMScalarModAngle +( + FLOAT Angle +) +{ + // Note: The modulo is performed with unsigned math only to work + // around a precision error on numbers that are close to PI + float fTemp; +#if defined(_XM_NO_INTRINSICS_) || !defined(_XM_VMX128_INTRINSICS_) + // Normalize the range from 0.0f to XM_2PI + Angle = Angle + XM_PI; + // Perform the modulo, unsigned + fTemp = fabsf(Angle); + fTemp = fTemp - (XM_2PI * (FLOAT)((INT)(fTemp/XM_2PI))); + // Restore the number to the range of -XM_PI to XM_PI-epsilon + fTemp = fTemp - XM_PI; + // If the modulo'd value was negative, restore negation + if (Angle<0.0f) { + fTemp = -fTemp; + } + return fTemp; +#else +#endif +} + +//------------------------------------------------------------------------------ + +XMINLINE FLOAT XMScalarSin +( + FLOAT Value +) +{ +#if defined(_XM_NO_INTRINSICS_) + + FLOAT ValueMod; + FLOAT ValueSq; + XMVECTOR V0123, V0246, V1357, V9111315, V17192123; + XMVECTOR V1, V7, V8; + XMVECTOR R0, R1, R2; + + ValueMod = XMScalarModAngle(Value); + + // sin(V) ~= V - V^3 / 3! + V^5 / 5! - V^7 / 7! + V^9 / 9! - V^11 / 11! + V^13 / 13! - V^15 / 15! + + // V^17 / 17! - V^19 / 19! + V^21 / 21! - V^23 / 23! (for -PI <= V < PI) + + ValueSq = ValueMod * ValueMod; + + V0123 = XMVectorSet(1.0f, ValueMod, ValueSq, ValueSq * ValueMod); + V1 = XMVectorSplatY(V0123); + V0246 = XMVectorMultiply(V0123, V0123); + V1357 = XMVectorMultiply(V0246, V1); + V7 = XMVectorSplatW(V1357); + V8 = XMVectorMultiply(V7, V1); + V9111315 = XMVectorMultiply(V1357, V8); + V17192123 = XMVectorMultiply(V9111315, V8); + + R0 = XMVector4Dot(V1357, g_XMSinCoefficients0.v); + R1 = XMVector4Dot(V9111315, g_XMSinCoefficients1.v); + R2 = XMVector4Dot(V17192123, g_XMSinCoefficients2.v); + + return R0.vector4_f32[0] + R1.vector4_f32[0] + R2.vector4_f32[0]; + +#elif defined(_XM_SSE_INTRINSICS_) + return sinf( Value ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE FLOAT XMScalarCos +( + FLOAT Value +) +{ +#if defined(_XM_NO_INTRINSICS_) + + FLOAT ValueMod; + FLOAT ValueSq; + XMVECTOR V0123, V0246, V8101214, V16182022; + XMVECTOR V2, V6, V8; + XMVECTOR R0, R1, R2; + + ValueMod = XMScalarModAngle(Value); + + // cos(V) ~= 1 - V^2 / 2! + V^4 / 4! - V^6 / 6! + V^8 / 8! - V^10 / 10! + + // V^12 / 12! - V^14 / 14! + V^16 / 16! - V^18 / 18! + V^20 / 20! - V^22 / 22! (for -PI <= V < PI) + + ValueSq = ValueMod * ValueMod; + + V0123 = XMVectorSet(1.0f, ValueMod, ValueSq, ValueSq * ValueMod); + V0246 = XMVectorMultiply(V0123, V0123); + + V2 = XMVectorSplatZ(V0123); + V6 = XMVectorSplatW(V0246); + V8 = XMVectorMultiply(V6, V2); + + V8101214 = XMVectorMultiply(V0246, V8); + V16182022 = XMVectorMultiply(V8101214, V8); + + R0 = XMVector4Dot(V0246, g_XMCosCoefficients0.v); + R1 = XMVector4Dot(V8101214, g_XMCosCoefficients1.v); + R2 = XMVector4Dot(V16182022, g_XMCosCoefficients2.v); + + return R0.vector4_f32[0] + R1.vector4_f32[0] + R2.vector4_f32[0]; + +#elif defined(_XM_SSE_INTRINSICS_) + return cosf(Value); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE VOID XMScalarSinCos +( + FLOAT* pSin, + FLOAT* pCos, + FLOAT Value +) +{ +#if defined(_XM_NO_INTRINSICS_) + + FLOAT ValueMod; + FLOAT ValueSq; + XMVECTOR V0123, V0246, V1357, V8101214, V9111315, V16182022, V17192123; + XMVECTOR V1, V2, V6, V8; + XMVECTOR S0, S1, S2, C0, C1, C2; + + XMASSERT(pSin); + XMASSERT(pCos); + + ValueMod = XMScalarModAngle(Value); + + // sin(V) ~= V - V^3 / 3! + V^5 / 5! - V^7 / 7! + V^9 / 9! - V^11 / 11! + V^13 / 13! - V^15 / 15! + + // V^17 / 17! - V^19 / 19! + V^21 / 21! - V^23 / 23! (for -PI <= V < PI) + // cos(V) ~= 1 - V^2 / 2! + V^4 / 4! - V^6 / 6! + V^8 / 8! - V^10 / 10! + + // V^12 / 12! - V^14 / 14! + V^16 / 16! - V^18 / 18! + V^20 / 20! - V^22 / 22! (for -PI <= V < PI) + + ValueSq = ValueMod * ValueMod; + + V0123 = XMVectorSet(1.0f, ValueMod, ValueSq, ValueSq * ValueMod); + + V1 = XMVectorSplatY(V0123); + V2 = XMVectorSplatZ(V0123); + + V0246 = XMVectorMultiply(V0123, V0123); + V1357 = XMVectorMultiply(V0246, V1); + + V6 = XMVectorSplatW(V0246); + V8 = XMVectorMultiply(V6, V2); + + V8101214 = XMVectorMultiply(V0246, V8); + V9111315 = XMVectorMultiply(V1357, V8); + V16182022 = XMVectorMultiply(V8101214, V8); + V17192123 = XMVectorMultiply(V9111315, V8); + + C0 = XMVector4Dot(V0246, g_XMCosCoefficients0.v); + S0 = XMVector4Dot(V1357, g_XMSinCoefficients0.v); + C1 = XMVector4Dot(V8101214, g_XMCosCoefficients1.v); + S1 = XMVector4Dot(V9111315, g_XMSinCoefficients1.v); + C2 = XMVector4Dot(V16182022, g_XMCosCoefficients2.v); + S2 = XMVector4Dot(V17192123, g_XMSinCoefficients2.v); + + *pCos = C0.vector4_f32[0] + C1.vector4_f32[0] + C2.vector4_f32[0]; + *pSin = S0.vector4_f32[0] + S1.vector4_f32[0] + S2.vector4_f32[0]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSin); + XMASSERT(pCos); + + *pSin = sinf(Value); + *pCos = cosf(Value); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE FLOAT XMScalarASin +( + FLOAT Value +) +{ +#if defined(_XM_NO_INTRINSICS_) + + FLOAT AbsValue, Value2, Value3, D; + XMVECTOR AbsV, R0, R1, Result; + XMVECTOR V3; + + *(UINT*)&AbsValue = *(UINT*)&Value & 0x7FFFFFFF; + + Value2 = Value * AbsValue; + Value3 = Value * Value2; + D = (Value - Value2) / sqrtf(1.00000011921f - AbsValue); + + AbsV = XMVectorReplicate(AbsValue); + + V3.vector4_f32[0] = Value3; + V3.vector4_f32[1] = 1.0f; + V3.vector4_f32[2] = Value3; + V3.vector4_f32[3] = 1.0f; + + R1 = XMVectorSet(D, D, Value, Value); + R1 = XMVectorMultiply(R1, V3); + + R0 = XMVectorMultiplyAdd(AbsV, g_XMASinCoefficients0.v, g_XMASinCoefficients1.v); + R0 = XMVectorMultiplyAdd(AbsV, R0, g_XMASinCoefficients2.v); + + Result = XMVector4Dot(R0, R1); + + return Result.vector4_f32[0]; + +#elif defined(_XM_SSE_INTRINSICS_) + return asinf(Value); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE FLOAT XMScalarACos +( + FLOAT Value +) +{ +#if defined(_XM_NO_INTRINSICS_) + + return XM_PIDIV2 - XMScalarASin(Value); + +#elif defined(_XM_SSE_INTRINSICS_) + return acosf(Value); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE FLOAT XMScalarSinEst +( + FLOAT Value +) +{ +#if defined(_XM_NO_INTRINSICS_) + + FLOAT ValueSq; + XMVECTOR V; + XMVECTOR Y; + XMVECTOR Result; + + XMASSERT(Value >= -XM_PI); + XMASSERT(Value < XM_PI); + + // sin(V) ~= V - V^3 / 3! + V^5 / 5! - V^7 / 7! (for -PI <= V < PI) + + ValueSq = Value * Value; + + V = XMVectorSet(1.0f, Value, ValueSq, ValueSq * Value); + Y = XMVectorSplatY(V); + V = XMVectorMultiply(V, V); + V = XMVectorMultiply(V, Y); + + Result = XMVector4Dot(V, g_XMSinEstCoefficients.v); + + return Result.vector4_f32[0]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(Value >= -XM_PI); + XMASSERT(Value < XM_PI); + float ValueSq = Value*Value; + XMVECTOR vValue = _mm_set_ps1(Value); + XMVECTOR vTemp = _mm_set_ps(ValueSq * Value,ValueSq,Value,1.0f); + vTemp = _mm_mul_ps(vTemp,vTemp); + vTemp = _mm_mul_ps(vTemp,vValue); + // vTemp = Value,Value^3,Value^5,Value^7 + vTemp = _mm_mul_ps(vTemp,g_XMSinEstCoefficients); + vValue = _mm_shuffle_ps(vValue,vTemp,_MM_SHUFFLE(1,0,0,0)); // Copy X to the Z position and Y to the W position + vValue = _mm_add_ps(vValue,vTemp); // Add Z = X+Z; W = Y+W; + vTemp = _mm_shuffle_ps(vTemp,vValue,_MM_SHUFFLE(0,3,0,0)); // Copy W to the Z position + vTemp = _mm_add_ps(vTemp,vValue); // Add Z and W together + vTemp = _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(2,2,2,2)); // Splat Z and return +#if defined(_MSC_VER) && (_MSC_VER>=1500) + return _mm_cvtss_f32(vTemp); +#else + return vTemp.m128_f32[0]; +#endif +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE FLOAT XMScalarCosEst +( + FLOAT Value +) +{ +#if defined(_XM_NO_INTRINSICS_) + FLOAT ValueSq; + XMVECTOR V; + XMVECTOR Result; + XMASSERT(Value >= -XM_PI); + XMASSERT(Value < XM_PI); + // cos(V) ~= 1 - V^2 / 2! + V^4 / 4! - V^6 / 6! (for -PI <= V < PI) + ValueSq = Value * Value; + V = XMVectorSet(1.0f, Value, ValueSq, ValueSq * Value); + V = XMVectorMultiply(V, V); + Result = XMVector4Dot(V, g_XMCosEstCoefficients.v); + return Result.vector4_f32[0]; +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(Value >= -XM_PI); + XMASSERT(Value < XM_PI); + float ValueSq = Value*Value; + XMVECTOR vValue = _mm_setzero_ps(); + XMVECTOR vTemp = _mm_set_ps(ValueSq * Value,ValueSq,Value,1.0f); + vTemp = _mm_mul_ps(vTemp,vTemp); + // vTemp = 1.0f,Value^2,Value^4,Value^6 + vTemp = _mm_mul_ps(vTemp,g_XMCosEstCoefficients); + vValue = _mm_shuffle_ps(vValue,vTemp,_MM_SHUFFLE(1,0,0,0)); // Copy X to the Z position and Y to the W position + vValue = _mm_add_ps(vValue,vTemp); // Add Z = X+Z; W = Y+W; + vTemp = _mm_shuffle_ps(vTemp,vValue,_MM_SHUFFLE(0,3,0,0)); // Copy W to the Z position + vTemp = _mm_add_ps(vTemp,vValue); // Add Z and W together + vTemp = _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(2,2,2,2)); // Splat Z and return +#if defined(_MSC_VER) && (_MSC_VER>=1500) + return _mm_cvtss_f32(vTemp); +#else + return vTemp.m128_f32[0]; +#endif +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMScalarSinCosEst +( + FLOAT* pSin, + FLOAT* pCos, + FLOAT Value +) +{ +#if defined(_XM_NO_INTRINSICS_) + + FLOAT ValueSq; + XMVECTOR V, Sin, Cos; + XMVECTOR Y; + + XMASSERT(pSin); + XMASSERT(pCos); + XMASSERT(Value >= -XM_PI); + XMASSERT(Value < XM_PI); + + // sin(V) ~= V - V^3 / 3! + V^5 / 5! - V^7 / 7! (for -PI <= V < PI) + // cos(V) ~= 1 - V^2 / 2! + V^4 / 4! - V^6 / 6! (for -PI <= V < PI) + + ValueSq = Value * Value; + V = XMVectorSet(1.0f, Value, ValueSq, Value * ValueSq); + Y = XMVectorSplatY(V); + Cos = XMVectorMultiply(V, V); + Sin = XMVectorMultiply(Cos, Y); + + Cos = XMVector4Dot(Cos, g_XMCosEstCoefficients.v); + Sin = XMVector4Dot(Sin, g_XMSinEstCoefficients.v); + + *pCos = Cos.vector4_f32[0]; + *pSin = Sin.vector4_f32[0]; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSin); + XMASSERT(pCos); + XMASSERT(Value >= -XM_PI); + XMASSERT(Value < XM_PI); + float ValueSq = Value * Value; + XMVECTOR Cos = _mm_set_ps(Value * ValueSq,ValueSq,Value,1.0f); + XMVECTOR Sin = _mm_set_ps1(Value); + Cos = _mm_mul_ps(Cos,Cos); + Sin = _mm_mul_ps(Sin,Cos); + // Cos = 1.0f,Value^2,Value^4,Value^6 + Cos = XMVector4Dot(Cos,g_XMCosEstCoefficients); + _mm_store_ss(pCos,Cos); + // Sin = Value,Value^3,Value^5,Value^7 + Sin = XMVector4Dot(Sin, g_XMSinEstCoefficients); + _mm_store_ss(pSin,Sin); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE FLOAT XMScalarASinEst +( + FLOAT Value +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR VR, CR, CS; + XMVECTOR Result; + FLOAT AbsV, V2, D; + CONST FLOAT OnePlusEps = 1.00000011921f; + + *(UINT*)&AbsV = *(UINT*)&Value & 0x7FFFFFFF; + V2 = Value * AbsV; + D = OnePlusEps - AbsV; + + CS = XMVectorSet(Value, 1.0f, 1.0f, V2); + VR = XMVectorSet(sqrtf(D), Value, V2, D * AbsV); + CR = XMVectorMultiply(CS, g_XMASinEstCoefficients.v); + + Result = XMVector4Dot(VR, CR); + + return Result.vector4_f32[0]; + +#elif defined(_XM_SSE_INTRINSICS_) + CONST FLOAT OnePlusEps = 1.00000011921f; + FLOAT AbsV = fabsf(Value); + FLOAT V2 = Value * AbsV; // Square with sign retained + FLOAT D = OnePlusEps - AbsV; + + XMVECTOR Result = _mm_set_ps(V2,1.0f,1.0f,Value); + XMVECTOR VR = _mm_set_ps(D * AbsV,V2,Value,sqrtf(D)); + Result = _mm_mul_ps(Result, g_XMASinEstCoefficients); + Result = XMVector4Dot(VR,Result); +#if defined(_MSC_VER) && (_MSC_VER>=1500) + return _mm_cvtss_f32(Result); +#else + return Result.m128_f32[0]; +#endif +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE FLOAT XMScalarACosEst +( + FLOAT Value +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR VR, CR, CS; + XMVECTOR Result; + FLOAT AbsV, V2, D; + CONST FLOAT OnePlusEps = 1.00000011921f; + + // return XM_PIDIV2 - XMScalarASin(Value); + + *(UINT*)&AbsV = *(UINT*)&Value & 0x7FFFFFFF; + V2 = Value * AbsV; + D = OnePlusEps - AbsV; + + CS = XMVectorSet(Value, 1.0f, 1.0f, V2); + VR = XMVectorSet(sqrtf(D), Value, V2, D * AbsV); + CR = XMVectorMultiply(CS, g_XMASinEstCoefficients.v); + + Result = XMVector4Dot(VR, CR); + + return XM_PIDIV2 - Result.vector4_f32[0]; + +#elif defined(_XM_SSE_INTRINSICS_) + CONST FLOAT OnePlusEps = 1.00000011921f; + FLOAT AbsV = fabsf(Value); + FLOAT V2 = Value * AbsV; // Value^2 retaining sign + FLOAT D = OnePlusEps - AbsV; + XMVECTOR Result = _mm_set_ps(V2,1.0f,1.0f,Value); + XMVECTOR VR = _mm_set_ps(D * AbsV,V2,Value,sqrtf(D)); + Result = _mm_mul_ps(Result,g_XMASinEstCoefficients); + Result = XMVector4Dot(VR,Result); +#if defined(_MSC_VER) && (_MSC_VER>=1500) + return XM_PIDIV2 - _mm_cvtss_f32(Result); +#else + return XM_PIDIV2 - Result.m128_f32[0]; +#endif +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +#endif // __XNAMATHMISC_INL__ + diff --git a/gfx/include/dxsdk/xnamathvector.inl b/gfx/include/dxsdk/xnamathvector.inl new file mode 100644 index 0000000000..bfea1d0003 --- /dev/null +++ b/gfx/include/dxsdk/xnamathvector.inl @@ -0,0 +1,13279 @@ +/*++ + +Copyright (c) Microsoft Corporation. All rights reserved. + +Module Name: + + xnamathvector.inl + +Abstract: + + XNA math library for Windows and Xbox 360: Vector functions +--*/ + +#if defined(_MSC_VER) && (_MSC_VER > 1000) +#pragma once +#endif + +#ifndef __XNAMATHVECTOR_INL__ +#define __XNAMATHVECTOR_INL__ + +#if defined(_XM_NO_INTRINSICS_) +#define XMISNAN(x) ((*(UINT*)&(x) & 0x7F800000) == 0x7F800000 && (*(UINT*)&(x) & 0x7FFFFF) != 0) +#define XMISINF(x) ((*(UINT*)&(x) & 0x7FFFFFFF) == 0x7F800000) +#endif + +/**************************************************************************** + * + * General Vector + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ +// Assignment operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ +// Return a vector with all elements equaling zero +XMFINLINE XMVECTOR XMVectorZero() +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR vResult = {0.0f,0.0f,0.0f,0.0f}; + return vResult; +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_setzero_ps(); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Initialize a vector with four floating point values +XMFINLINE XMVECTOR XMVectorSet +( + FLOAT x, + FLOAT y, + FLOAT z, + FLOAT w +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTORF32 vResult = {x,y,z,w}; + return vResult.v; +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_set_ps( w, z, y, x ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Initialize a vector with four integer values +XMFINLINE XMVECTOR XMVectorSetInt +( + UINT x, + UINT y, + UINT z, + UINT w +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTORU32 vResult = {x,y,z,w}; + return vResult.v; +#elif defined(_XM_SSE_INTRINSICS_) + __m128i V = _mm_set_epi32( w, z, y, x ); + return reinterpret_cast<__m128 *>(&V)[0]; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Initialize a vector with a replicated floating point value +XMFINLINE XMVECTOR XMVectorReplicate +( + FLOAT Value +) +{ +#if defined(_XM_NO_INTRINSICS_) || defined(XM_NO_MISALIGNED_VECTOR_ACCESS) + XMVECTORF32 vResult = {Value,Value,Value,Value}; + return vResult.v; +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_set_ps1( Value ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Initialize a vector with a replicated floating point value passed by pointer +XMFINLINE XMVECTOR XMVectorReplicatePtr +( + CONST FLOAT *pValue +) +{ +#if defined(_XM_NO_INTRINSICS_) || defined(XM_NO_MISALIGNED_VECTOR_ACCESS) + FLOAT Value = pValue[0]; + XMVECTORF32 vResult = {Value,Value,Value,Value}; + return vResult.v; +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_load_ps1( pValue ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Initialize a vector with a replicated integer value +XMFINLINE XMVECTOR XMVectorReplicateInt +( + UINT Value +) +{ +#if defined(_XM_NO_INTRINSICS_) || defined(XM_NO_MISALIGNED_VECTOR_ACCESS) + XMVECTORU32 vResult = {Value,Value,Value,Value}; + return vResult.v; +#elif defined(_XM_SSE_INTRINSICS_) + __m128i vTemp = _mm_set1_epi32( Value ); + return reinterpret_cast(&vTemp)[0]; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Initialize a vector with a replicated integer value passed by pointer +XMFINLINE XMVECTOR XMVectorReplicateIntPtr +( + CONST UINT *pValue +) +{ +#if defined(_XM_NO_INTRINSICS_) || defined(XM_NO_MISALIGNED_VECTOR_ACCESS) + UINT Value = pValue[0]; + XMVECTORU32 vResult = {Value,Value,Value,Value}; + return vResult.v; +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_load_ps1(reinterpret_cast(pValue)); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Initialize a vector with all bits set (true mask) +XMFINLINE XMVECTOR XMVectorTrueInt() +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTORU32 vResult = {0xFFFFFFFFU,0xFFFFFFFFU,0xFFFFFFFFU,0xFFFFFFFFU}; + return vResult.v; +#elif defined(_XM_SSE_INTRINSICS_) + __m128i V = _mm_set1_epi32(-1); + return reinterpret_cast<__m128 *>(&V)[0]; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Initialize a vector with all bits clear (false mask) +XMFINLINE XMVECTOR XMVectorFalseInt() +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR vResult = {0.0f,0.0f,0.0f,0.0f}; + return vResult; +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_setzero_ps(); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Replicate the x component of the vector +XMFINLINE XMVECTOR XMVectorSplatX +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR vResult; + vResult.vector4_f32[0] = + vResult.vector4_f32[1] = + vResult.vector4_f32[2] = + vResult.vector4_f32[3] = V.vector4_f32[0]; + return vResult; +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_shuffle_ps( V, V, _MM_SHUFFLE(0, 0, 0, 0) ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Replicate the y component of the vector +XMFINLINE XMVECTOR XMVectorSplatY +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR vResult; + vResult.vector4_f32[0] = + vResult.vector4_f32[1] = + vResult.vector4_f32[2] = + vResult.vector4_f32[3] = V.vector4_f32[1]; + return vResult; +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_shuffle_ps( V, V, _MM_SHUFFLE(1, 1, 1, 1) ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Replicate the z component of the vector +XMFINLINE XMVECTOR XMVectorSplatZ +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR vResult; + vResult.vector4_f32[0] = + vResult.vector4_f32[1] = + vResult.vector4_f32[2] = + vResult.vector4_f32[3] = V.vector4_f32[2]; + return vResult; +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_shuffle_ps( V, V, _MM_SHUFFLE(2, 2, 2, 2) ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Replicate the w component of the vector +XMFINLINE XMVECTOR XMVectorSplatW +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR vResult; + vResult.vector4_f32[0] = + vResult.vector4_f32[1] = + vResult.vector4_f32[2] = + vResult.vector4_f32[3] = V.vector4_f32[3]; + return vResult; +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_shuffle_ps( V, V, _MM_SHUFFLE(3, 3, 3, 3) ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Return a vector of 1.0f,1.0f,1.0f,1.0f +XMFINLINE XMVECTOR XMVectorSplatOne() +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR vResult; + vResult.vector4_f32[0] = + vResult.vector4_f32[1] = + vResult.vector4_f32[2] = + vResult.vector4_f32[3] = 1.0f; + return vResult; +#elif defined(_XM_SSE_INTRINSICS_) + return g_XMOne; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Return a vector of INF,INF,INF,INF +XMFINLINE XMVECTOR XMVectorSplatInfinity() +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR vResult; + vResult.vector4_u32[0] = + vResult.vector4_u32[1] = + vResult.vector4_u32[2] = + vResult.vector4_u32[3] = 0x7F800000; + return vResult; +#elif defined(_XM_SSE_INTRINSICS_) + return g_XMInfinity; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Return a vector of Q_NAN,Q_NAN,Q_NAN,Q_NAN +XMFINLINE XMVECTOR XMVectorSplatQNaN() +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR vResult; + vResult.vector4_u32[0] = + vResult.vector4_u32[1] = + vResult.vector4_u32[2] = + vResult.vector4_u32[3] = 0x7FC00000; + return vResult; +#elif defined(_XM_SSE_INTRINSICS_) + return g_XMQNaN; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Return a vector of 1.192092896e-7f,1.192092896e-7f,1.192092896e-7f,1.192092896e-7f +XMFINLINE XMVECTOR XMVectorSplatEpsilon() +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR vResult; + vResult.vector4_u32[0] = + vResult.vector4_u32[1] = + vResult.vector4_u32[2] = + vResult.vector4_u32[3] = 0x34000000; + return vResult; +#elif defined(_XM_SSE_INTRINSICS_) + return g_XMEpsilon; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Return a vector of -0.0f (0x80000000),-0.0f,-0.0f,-0.0f +XMFINLINE XMVECTOR XMVectorSplatSignMask() +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR vResult; + vResult.vector4_u32[0] = + vResult.vector4_u32[1] = + vResult.vector4_u32[2] = + vResult.vector4_u32[3] = 0x80000000U; + return vResult; +#elif defined(_XM_SSE_INTRINSICS_) + __m128i V = _mm_set1_epi32( 0x80000000 ); + return reinterpret_cast<__m128*>(&V)[0]; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Return a floating point value via an index. This is not a recommended +// function to use due to performance loss. +XMFINLINE FLOAT XMVectorGetByIndex(FXMVECTOR V,UINT i) +{ + XMASSERT( i <= 3 ); +#if defined(_XM_NO_INTRINSICS_) + return V.vector4_f32[i]; +#elif defined(_XM_SSE_INTRINSICS_) + return V.m128_f32[i]; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Return the X component in an FPU register. +// This causes Load/Hit/Store on VMX targets +XMFINLINE FLOAT XMVectorGetX(FXMVECTOR V) +{ +#if defined(_XM_NO_INTRINSICS_) + return V.vector4_f32[0]; +#elif defined(_XM_SSE_INTRINSICS_) +#if defined(_MSC_VER) && (_MSC_VER>=1500) + return _mm_cvtss_f32(V); +#else + return V.m128_f32[0]; +#endif +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Return the Y component in an FPU register. +// This causes Load/Hit/Store on VMX targets +XMFINLINE FLOAT XMVectorGetY(FXMVECTOR V) +{ +#if defined(_XM_NO_INTRINSICS_) + return V.vector4_f32[1]; +#elif defined(_XM_SSE_INTRINSICS_) +#if defined(_MSC_VER) && (_MSC_VER>=1500) + XMVECTOR vTemp = _mm_shuffle_ps(V,V,_MM_SHUFFLE(1,1,1,1)); + return _mm_cvtss_f32(vTemp); +#else + return V.m128_f32[1]; +#endif +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Return the Z component in an FPU register. +// This causes Load/Hit/Store on VMX targets +XMFINLINE FLOAT XMVectorGetZ(FXMVECTOR V) +{ +#if defined(_XM_NO_INTRINSICS_) + return V.vector4_f32[2]; +#elif defined(_XM_SSE_INTRINSICS_) +#if defined(_MSC_VER) && (_MSC_VER>=1500) + XMVECTOR vTemp = _mm_shuffle_ps(V,V,_MM_SHUFFLE(2,2,2,2)); + return _mm_cvtss_f32(vTemp); +#else + return V.m128_f32[2]; +#endif +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Return the W component in an FPU register. +// This causes Load/Hit/Store on VMX targets +XMFINLINE FLOAT XMVectorGetW(FXMVECTOR V) +{ +#if defined(_XM_NO_INTRINSICS_) + return V.vector4_f32[3]; +#elif defined(_XM_SSE_INTRINSICS_) +#if defined(_MSC_VER) && (_MSC_VER>=1500) + XMVECTOR vTemp = _mm_shuffle_ps(V,V,_MM_SHUFFLE(3,3,3,3)); + return _mm_cvtss_f32(vTemp); +#else + return V.m128_f32[3]; +#endif +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +// Store a component indexed by i into a 32 bit float location in memory. +// This causes Load/Hit/Store on VMX targets +XMFINLINE VOID XMVectorGetByIndexPtr(FLOAT *f,FXMVECTOR V,UINT i) +{ + XMASSERT( f != 0 ); + XMASSERT( i < 4 ); +#if defined(_XM_NO_INTRINSICS_) + *f = V.vector4_f32[i]; +#elif defined(_XM_SSE_INTRINSICS_) + *f = V.m128_f32[i]; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +// Store the X component into a 32 bit float location in memory. +XMFINLINE VOID XMVectorGetXPtr(FLOAT *x,FXMVECTOR V) +{ + XMASSERT( x != 0 ); +#if defined(_XM_NO_INTRINSICS_) + *x = V.vector4_f32[0]; +#elif defined(_XM_SSE_INTRINSICS_) + _mm_store_ss(x,V); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Store the Y component into a 32 bit float location in memory. +XMFINLINE VOID XMVectorGetYPtr(FLOAT *y,FXMVECTOR V) +{ + XMASSERT( y != 0 ); +#if defined(_XM_NO_INTRINSICS_) + *y = V.vector4_f32[1]; +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(1,1,1,1)); + _mm_store_ss(y,vResult); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Store the Z component into a 32 bit float location in memory. +XMFINLINE VOID XMVectorGetZPtr(FLOAT *z,FXMVECTOR V) +{ + XMASSERT( z != 0 ); +#if defined(_XM_NO_INTRINSICS_) + *z = V.vector4_f32[2]; +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(2,2,2,2)); + _mm_store_ss(z,vResult); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Store the W component into a 32 bit float location in memory. +XMFINLINE VOID XMVectorGetWPtr(FLOAT *w,FXMVECTOR V) +{ + XMASSERT( w != 0 ); +#if defined(_XM_NO_INTRINSICS_) + *w = V.vector4_f32[3]; +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(3,3,3,3)); + _mm_store_ss(w,vResult); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +// Return an integer value via an index. This is not a recommended +// function to use due to performance loss. +XMFINLINE UINT XMVectorGetIntByIndex(FXMVECTOR V, UINT i) +{ + XMASSERT( i < 4 ); +#if defined(_XM_NO_INTRINSICS_) + return V.vector4_u32[i]; +#elif defined(_XM_SSE_INTRINSICS_) +#if defined(_MSC_VER) && (_MSC_VER<1400) + XMVECTORU32 tmp; + tmp.v = V; + return tmp.u[i]; +#else + return V.m128_u32[i]; +#endif +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +// Return the X component in an integer register. +// This causes Load/Hit/Store on VMX targets +XMFINLINE UINT XMVectorGetIntX(FXMVECTOR V) +{ +#if defined(_XM_NO_INTRINSICS_) + return V.vector4_u32[0]; +#elif defined(_XM_SSE_INTRINSICS_) + return static_cast(_mm_cvtsi128_si32(reinterpret_cast(&V)[0])); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Return the Y component in an integer register. +// This causes Load/Hit/Store on VMX targets +XMFINLINE UINT XMVectorGetIntY(FXMVECTOR V) +{ +#if defined(_XM_NO_INTRINSICS_) + return V.vector4_u32[1]; +#elif defined(_XM_SSE_INTRINSICS_) + __m128i vResulti = _mm_shuffle_epi32(reinterpret_cast(&V)[0],_MM_SHUFFLE(1,1,1,1)); + return static_cast(_mm_cvtsi128_si32(vResulti)); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Return the Z component in an integer register. +// This causes Load/Hit/Store on VMX targets +XMFINLINE UINT XMVectorGetIntZ(FXMVECTOR V) +{ +#if defined(_XM_NO_INTRINSICS_) + return V.vector4_u32[2]; +#elif defined(_XM_SSE_INTRINSICS_) + __m128i vResulti = _mm_shuffle_epi32(reinterpret_cast(&V)[0],_MM_SHUFFLE(2,2,2,2)); + return static_cast(_mm_cvtsi128_si32(vResulti)); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Return the W component in an integer register. +// This causes Load/Hit/Store on VMX targets +XMFINLINE UINT XMVectorGetIntW(FXMVECTOR V) +{ +#if defined(_XM_NO_INTRINSICS_) + return V.vector4_u32[3]; +#elif defined(_XM_SSE_INTRINSICS_) + __m128i vResulti = _mm_shuffle_epi32(reinterpret_cast(&V)[0],_MM_SHUFFLE(3,3,3,3)); + return static_cast(_mm_cvtsi128_si32(vResulti)); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +// Store a component indexed by i into a 32 bit integer location in memory. +// This causes Load/Hit/Store on VMX targets +XMFINLINE VOID XMVectorGetIntByIndexPtr(UINT *x,FXMVECTOR V,UINT i) +{ + XMASSERT( x != 0 ); + XMASSERT( i < 4 ); +#if defined(_XM_NO_INTRINSICS_) + *x = V.vector4_u32[i]; +#elif defined(_XM_SSE_INTRINSICS_) +#if defined(_MSC_VER) && (_MSC_VER<1400) + XMVECTORU32 tmp; + tmp.v = V; + *x = tmp.u[i]; +#else + *x = V.m128_u32[i]; +#endif +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +// Store the X component into a 32 bit integer location in memory. +XMFINLINE VOID XMVectorGetIntXPtr(UINT *x,FXMVECTOR V) +{ + XMASSERT( x != 0 ); +#if defined(_XM_NO_INTRINSICS_) + *x = V.vector4_u32[0]; +#elif defined(_XM_SSE_INTRINSICS_) + _mm_store_ss(reinterpret_cast(x),V); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Store the Y component into a 32 bit integer location in memory. +XMFINLINE VOID XMVectorGetIntYPtr(UINT *y,FXMVECTOR V) +{ + XMASSERT( y != 0 ); +#if defined(_XM_NO_INTRINSICS_) + *y = V.vector4_u32[1]; +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(1,1,1,1)); + _mm_store_ss(reinterpret_cast(y),vResult); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Store the Z component into a 32 bit integer locaCantion in memory. +XMFINLINE VOID XMVectorGetIntZPtr(UINT *z,FXMVECTOR V) +{ + XMASSERT( z != 0 ); +#if defined(_XM_NO_INTRINSICS_) + *z = V.vector4_u32[2]; +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(2,2,2,2)); + _mm_store_ss(reinterpret_cast(z),vResult); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Store the W component into a 32 bit integer location in memory. +XMFINLINE VOID XMVectorGetIntWPtr(UINT *w,FXMVECTOR V) +{ + XMASSERT( w != 0 ); +#if defined(_XM_NO_INTRINSICS_) + *w = V.vector4_u32[3]; +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(3,3,3,3)); + _mm_store_ss(reinterpret_cast(w),vResult); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +// Set a single indexed floating point component +// This causes Load/Hit/Store on VMX targets +XMFINLINE XMVECTOR XMVectorSetByIndex(FXMVECTOR V, FLOAT f,UINT i) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR U; + XMASSERT( i <= 3 ); + U = V; + U.vector4_f32[i] = f; + return U; +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT( i <= 3 ); + XMVECTOR U = V; + U.m128_f32[i] = f; + return U; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +// Sets the X component of a vector to a passed floating point value +// This causes Load/Hit/Store on VMX targets +XMFINLINE XMVECTOR XMVectorSetX(FXMVECTOR V, FLOAT x) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR U; + U.vector4_f32[0] = x; + U.vector4_f32[1] = V.vector4_f32[1]; + U.vector4_f32[2] = V.vector4_f32[2]; + U.vector4_f32[3] = V.vector4_f32[3]; + return U; +#elif defined(_XM_SSE_INTRINSICS_) +#if defined(_XM_ISVS2005_) + XMVECTOR vResult = V; + vResult.m128_f32[0] = x; + return vResult; +#else + XMVECTOR vResult = _mm_set_ss(x); + vResult = _mm_move_ss(V,vResult); + return vResult; +#endif // _XM_ISVS2005_ +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Sets the Y component of a vector to a passed floating point value +// This causes Load/Hit/Store on VMX targets +XMFINLINE XMVECTOR XMVectorSetY(FXMVECTOR V, FLOAT y) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR U; + U.vector4_f32[0] = V.vector4_f32[0]; + U.vector4_f32[1] = y; + U.vector4_f32[2] = V.vector4_f32[2]; + U.vector4_f32[3] = V.vector4_f32[3]; + return U; +#elif defined(_XM_SSE_INTRINSICS_) +#if defined(_XM_ISVS2005_) + XMVECTOR vResult = V; + vResult.m128_f32[1] = y; + return vResult; +#else + // Swap y and x + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(3,2,0,1)); + // Convert input to vector + XMVECTOR vTemp = _mm_set_ss(y); + // Replace the x component + vResult = _mm_move_ss(vResult,vTemp); + // Swap y and x again + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(3,2,0,1)); + return vResult; +#endif // _XM_ISVS2005_ +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} +// Sets the Z component of a vector to a passed floating point value +// This causes Load/Hit/Store on VMX targets +XMFINLINE XMVECTOR XMVectorSetZ(FXMVECTOR V, FLOAT z) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR U; + U.vector4_f32[0] = V.vector4_f32[0]; + U.vector4_f32[1] = V.vector4_f32[1]; + U.vector4_f32[2] = z; + U.vector4_f32[3] = V.vector4_f32[3]; + return U; +#elif defined(_XM_SSE_INTRINSICS_) +#if defined(_XM_ISVS2005_) + XMVECTOR vResult = V; + vResult.m128_f32[2] = z; + return vResult; +#else + // Swap z and x + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(3,0,1,2)); + // Convert input to vector + XMVECTOR vTemp = _mm_set_ss(z); + // Replace the x component + vResult = _mm_move_ss(vResult,vTemp); + // Swap z and x again + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(3,0,1,2)); + return vResult; +#endif // _XM_ISVS2005_ +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Sets the W component of a vector to a passed floating point value +// This causes Load/Hit/Store on VMX targets +XMFINLINE XMVECTOR XMVectorSetW(FXMVECTOR V, FLOAT w) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR U; + U.vector4_f32[0] = V.vector4_f32[0]; + U.vector4_f32[1] = V.vector4_f32[1]; + U.vector4_f32[2] = V.vector4_f32[2]; + U.vector4_f32[3] = w; + return U; +#elif defined(_XM_SSE_INTRINSICS_) +#if defined(_XM_ISVS2005_) + XMVECTOR vResult = V; + vResult.m128_f32[3] = w; + return vResult; +#else + // Swap w and x + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(0,2,1,3)); + // Convert input to vector + XMVECTOR vTemp = _mm_set_ss(w); + // Replace the x component + vResult = _mm_move_ss(vResult,vTemp); + // Swap w and x again + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(0,2,1,3)); + return vResult; +#endif // _XM_ISVS2005_ +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +// Sets a component of a vector to a floating point value passed by pointer +// This causes Load/Hit/Store on VMX targets +XMFINLINE XMVECTOR XMVectorSetByIndexPtr(FXMVECTOR V,CONST FLOAT *f,UINT i) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR U; + XMASSERT( f != 0 ); + XMASSERT( i <= 3 ); + U = V; + U.vector4_f32[i] = *f; + return U; +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT( f != 0 ); + XMASSERT( i <= 3 ); + XMVECTOR U = V; + U.m128_f32[i] = *f; + return U; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +// Sets the X component of a vector to a floating point value passed by pointer +XMFINLINE XMVECTOR XMVectorSetXPtr(FXMVECTOR V,CONST FLOAT *x) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR U; + XMASSERT( x != 0 ); + U.vector4_f32[0] = *x; + U.vector4_f32[1] = V.vector4_f32[1]; + U.vector4_f32[2] = V.vector4_f32[2]; + U.vector4_f32[3] = V.vector4_f32[3]; + return U; +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT( x != 0 ); + XMVECTOR vResult = _mm_load_ss(x); + vResult = _mm_move_ss(V,vResult); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Sets the Y component of a vector to a floating point value passed by pointer +XMFINLINE XMVECTOR XMVectorSetYPtr(FXMVECTOR V,CONST FLOAT *y) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR U; + XMASSERT( y != 0 ); + U.vector4_f32[0] = V.vector4_f32[0]; + U.vector4_f32[1] = *y; + U.vector4_f32[2] = V.vector4_f32[2]; + U.vector4_f32[3] = V.vector4_f32[3]; + return U; +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT( y != 0 ); + // Swap y and x + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(3,2,0,1)); + // Convert input to vector + XMVECTOR vTemp = _mm_load_ss(y); + // Replace the x component + vResult = _mm_move_ss(vResult,vTemp); + // Swap y and x again + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(3,2,0,1)); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Sets the Z component of a vector to a floating point value passed by pointer +XMFINLINE XMVECTOR XMVectorSetZPtr(FXMVECTOR V,CONST FLOAT *z) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR U; + XMASSERT( z != 0 ); + U.vector4_f32[0] = V.vector4_f32[0]; + U.vector4_f32[1] = V.vector4_f32[1]; + U.vector4_f32[2] = *z; + U.vector4_f32[3] = V.vector4_f32[3]; + return U; +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT( z != 0 ); + // Swap z and x + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(3,0,1,2)); + // Convert input to vector + XMVECTOR vTemp = _mm_load_ss(z); + // Replace the x component + vResult = _mm_move_ss(vResult,vTemp); + // Swap z and x again + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(3,0,1,2)); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Sets the W component of a vector to a floating point value passed by pointer +XMFINLINE XMVECTOR XMVectorSetWPtr(FXMVECTOR V,CONST FLOAT *w) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR U; + XMASSERT( w != 0 ); + U.vector4_f32[0] = V.vector4_f32[0]; + U.vector4_f32[1] = V.vector4_f32[1]; + U.vector4_f32[2] = V.vector4_f32[2]; + U.vector4_f32[3] = *w; + return U; +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT( w != 0 ); + // Swap w and x + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(0,2,1,3)); + // Convert input to vector + XMVECTOR vTemp = _mm_load_ss(w); + // Replace the x component + vResult = _mm_move_ss(vResult,vTemp); + // Swap w and x again + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(0,2,1,3)); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +// Sets a component of a vector to an integer passed by value +// This causes Load/Hit/Store on VMX targets +XMFINLINE XMVECTOR XMVectorSetIntByIndex(FXMVECTOR V, UINT x, UINT i) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR U; + XMASSERT( i <= 3 ); + U = V; + U.vector4_u32[i] = x; + return U; +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT( i <= 3 ); + XMVECTORU32 tmp; + tmp.v = V; + tmp.u[i] = x; + return tmp; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +// Sets the X component of a vector to an integer passed by value +// This causes Load/Hit/Store on VMX targets +XMFINLINE XMVECTOR XMVectorSetIntX(FXMVECTOR V, UINT x) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR U; + U.vector4_u32[0] = x; + U.vector4_u32[1] = V.vector4_u32[1]; + U.vector4_u32[2] = V.vector4_u32[2]; + U.vector4_u32[3] = V.vector4_u32[3]; + return U; +#elif defined(_XM_SSE_INTRINSICS_) +#if defined(_XM_ISVS2005_) + XMVECTOR vResult = V; + vResult.m128_i32[0] = x; + return vResult; +#else + __m128i vTemp = _mm_cvtsi32_si128(x); + XMVECTOR vResult = _mm_move_ss(V,reinterpret_cast(&vTemp)[0]); + return vResult; +#endif // _XM_ISVS2005_ +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Sets the Y component of a vector to an integer passed by value +// This causes Load/Hit/Store on VMX targets +XMFINLINE XMVECTOR XMVectorSetIntY(FXMVECTOR V, UINT y) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR U; + U.vector4_u32[0] = V.vector4_u32[0]; + U.vector4_u32[1] = y; + U.vector4_u32[2] = V.vector4_u32[2]; + U.vector4_u32[3] = V.vector4_u32[3]; + return U; +#elif defined(_XM_SSE_INTRINSICS_) +#if defined(_XM_ISVS2005_) + XMVECTOR vResult = V; + vResult.m128_i32[1] = y; + return vResult; +#else // Swap y and x + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(3,2,0,1)); + // Convert input to vector + __m128i vTemp = _mm_cvtsi32_si128(y); + // Replace the x component + vResult = _mm_move_ss(vResult,reinterpret_cast(&vTemp)[0]); + // Swap y and x again + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(3,2,0,1)); + return vResult; +#endif // _XM_ISVS2005_ +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Sets the Z component of a vector to an integer passed by value +// This causes Load/Hit/Store on VMX targets +XMFINLINE XMVECTOR XMVectorSetIntZ(FXMVECTOR V, UINT z) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR U; + U.vector4_u32[0] = V.vector4_u32[0]; + U.vector4_u32[1] = V.vector4_u32[1]; + U.vector4_u32[2] = z; + U.vector4_u32[3] = V.vector4_u32[3]; + return U; +#elif defined(_XM_SSE_INTRINSICS_) +#if defined(_XM_ISVS2005_) + XMVECTOR vResult = V; + vResult.m128_i32[2] = z; + return vResult; +#else + // Swap z and x + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(3,0,1,2)); + // Convert input to vector + __m128i vTemp = _mm_cvtsi32_si128(z); + // Replace the x component + vResult = _mm_move_ss(vResult,reinterpret_cast(&vTemp)[0]); + // Swap z and x again + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(3,0,1,2)); + return vResult; +#endif // _XM_ISVS2005_ +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Sets the W component of a vector to an integer passed by value +// This causes Load/Hit/Store on VMX targets +XMFINLINE XMVECTOR XMVectorSetIntW(FXMVECTOR V, UINT w) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR U; + U.vector4_u32[0] = V.vector4_u32[0]; + U.vector4_u32[1] = V.vector4_u32[1]; + U.vector4_u32[2] = V.vector4_u32[2]; + U.vector4_u32[3] = w; + return U; +#elif defined(_XM_SSE_INTRINSICS_) +#if defined(_XM_ISVS2005_) + XMVECTOR vResult = V; + vResult.m128_i32[3] = w; + return vResult; +#else + // Swap w and x + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(0,2,1,3)); + // Convert input to vector + __m128i vTemp = _mm_cvtsi32_si128(w); + // Replace the x component + vResult = _mm_move_ss(vResult,reinterpret_cast(&vTemp)[0]); + // Swap w and x again + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(0,2,1,3)); + return vResult; +#endif // _XM_ISVS2005_ +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +// Sets a component of a vector to an integer value passed by pointer +// This causes Load/Hit/Store on VMX targets +XMFINLINE XMVECTOR XMVectorSetIntByIndexPtr(FXMVECTOR V, CONST UINT *x,UINT i) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR U; + XMASSERT( x != 0 ); + XMASSERT( i <= 3 ); + U = V; + U.vector4_u32[i] = *x; + return U; +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT( x != 0 ); + XMASSERT( i <= 3 ); + XMVECTORU32 tmp; + tmp.v = V; + tmp.u[i] = *x; + return tmp; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +// Sets the X component of a vector to an integer value passed by pointer +XMFINLINE XMVECTOR XMVectorSetIntXPtr(FXMVECTOR V,CONST UINT *x) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR U; + XMASSERT( x != 0 ); + U.vector4_u32[0] = *x; + U.vector4_u32[1] = V.vector4_u32[1]; + U.vector4_u32[2] = V.vector4_u32[2]; + U.vector4_u32[3] = V.vector4_u32[3]; + return U; +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT( x != 0 ); + XMVECTOR vTemp = _mm_load_ss(reinterpret_cast(x)); + XMVECTOR vResult = _mm_move_ss(V,vTemp); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Sets the Y component of a vector to an integer value passed by pointer +XMFINLINE XMVECTOR XMVectorSetIntYPtr(FXMVECTOR V,CONST UINT *y) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR U; + XMASSERT( y != 0 ); + U.vector4_u32[0] = V.vector4_u32[0]; + U.vector4_u32[1] = *y; + U.vector4_u32[2] = V.vector4_u32[2]; + U.vector4_u32[3] = V.vector4_u32[3]; + return U; +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT( y != 0 ); + // Swap y and x + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(3,2,0,1)); + // Convert input to vector + XMVECTOR vTemp = _mm_load_ss(reinterpret_cast(y)); + // Replace the x component + vResult = _mm_move_ss(vResult,vTemp); + // Swap y and x again + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(3,2,0,1)); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Sets the Z component of a vector to an integer value passed by pointer +XMFINLINE XMVECTOR XMVectorSetIntZPtr(FXMVECTOR V,CONST UINT *z) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR U; + XMASSERT( z != 0 ); + U.vector4_u32[0] = V.vector4_u32[0]; + U.vector4_u32[1] = V.vector4_u32[1]; + U.vector4_u32[2] = *z; + U.vector4_u32[3] = V.vector4_u32[3]; + return U; +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT( z != 0 ); + // Swap z and x + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(3,0,1,2)); + // Convert input to vector + XMVECTOR vTemp = _mm_load_ss(reinterpret_cast(z)); + // Replace the x component + vResult = _mm_move_ss(vResult,vTemp); + // Swap z and x again + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(3,0,1,2)); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +// Sets the W component of a vector to an integer value passed by pointer +XMFINLINE XMVECTOR XMVectorSetIntWPtr(FXMVECTOR V,CONST UINT *w) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR U; + XMASSERT( w != 0 ); + U.vector4_u32[0] = V.vector4_u32[0]; + U.vector4_u32[1] = V.vector4_u32[1]; + U.vector4_u32[2] = V.vector4_u32[2]; + U.vector4_u32[3] = *w; + return U; +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT( w != 0 ); + // Swap w and x + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(0,2,1,3)); + // Convert input to vector + XMVECTOR vTemp = _mm_load_ss(reinterpret_cast(w)); + // Replace the x component + vResult = _mm_move_ss(vResult,vTemp); + // Swap w and x again + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(0,2,1,3)); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Define a control vector to be used in XMVectorPermute +// operations. Visualize the two vectors V1 and V2 given +// in a permute as arranged back to back in a linear fashion, +// such that they form an array of 8 floating point values. +// The four integers specified in XMVectorPermuteControl +// will serve as indices into the array to select components +// from the two vectors. ElementIndex0 is used to select +// an element from the vectors to be placed in the first +// component of the resulting vector, ElementIndex1 is used +// to select an element for the second component, etc. + +XMFINLINE XMVECTOR XMVectorPermuteControl +( + UINT ElementIndex0, + UINT ElementIndex1, + UINT ElementIndex2, + UINT ElementIndex3 +) +{ +#if defined(_XM_SSE_INTRINSICS_) || defined(_XM_NO_INTRINSICS_) + XMVECTORU32 vControl; + static CONST UINT ControlElement[] = { + XM_PERMUTE_0X, + XM_PERMUTE_0Y, + XM_PERMUTE_0Z, + XM_PERMUTE_0W, + XM_PERMUTE_1X, + XM_PERMUTE_1Y, + XM_PERMUTE_1Z, + XM_PERMUTE_1W + }; + XMASSERT(ElementIndex0 < 8); + XMASSERT(ElementIndex1 < 8); + XMASSERT(ElementIndex2 < 8); + XMASSERT(ElementIndex3 < 8); + + vControl.u[0] = ControlElement[ElementIndex0]; + vControl.u[1] = ControlElement[ElementIndex1]; + vControl.u[2] = ControlElement[ElementIndex2]; + vControl.u[3] = ControlElement[ElementIndex3]; + return vControl.v; +#else +#endif +} + +//------------------------------------------------------------------------------ + +// Using a control vector made up of 16 bytes from 0-31, remap V1 and V2's byte +// entries into a single 16 byte vector and return it. Index 0-15 = V1, +// 16-31 = V2 +XMFINLINE XMVECTOR XMVectorPermute +( + FXMVECTOR V1, + FXMVECTOR V2, + FXMVECTOR Control +) +{ +#if defined(_XM_NO_INTRINSICS_) + const BYTE *aByte[2]; + XMVECTOR Result; + UINT i, uIndex, VectorIndex; + const BYTE *pControl; + BYTE *pWork; + + // Indices must be in range from 0 to 31 + XMASSERT((Control.vector4_u32[0] & 0xE0E0E0E0) == 0); + XMASSERT((Control.vector4_u32[1] & 0xE0E0E0E0) == 0); + XMASSERT((Control.vector4_u32[2] & 0xE0E0E0E0) == 0); + XMASSERT((Control.vector4_u32[3] & 0xE0E0E0E0) == 0); + + // 0-15 = V1, 16-31 = V2 + aByte[0] = (const BYTE*)(&V1); + aByte[1] = (const BYTE*)(&V2); + i = 16; + pControl = (const BYTE *)(&Control); + pWork = (BYTE *)(&Result); + do { + // Get the byte to map from + uIndex = pControl[0]; + ++pControl; + VectorIndex = (uIndex>>4)&1; + uIndex &= 0x0F; +#if defined(_XM_LITTLEENDIAN_) + uIndex ^= 3; // Swap byte ordering on little endian machines +#endif + pWork[0] = aByte[VectorIndex][uIndex]; + ++pWork; + } while (--i); + return Result; +#elif defined(_XM_SSE_INTRINSICS_) +#if defined(_PREFAST_) || defined(XMDEBUG) + // Indices must be in range from 0 to 31 + static const XMVECTORI32 PremuteTest = {0xE0E0E0E0,0xE0E0E0E0,0xE0E0E0E0,0xE0E0E0E0}; + XMVECTOR vAssert = _mm_and_ps(Control,PremuteTest); + __m128i vAsserti = _mm_cmpeq_epi32(reinterpret_cast(&vAssert)[0],g_XMZero); + XMASSERT(_mm_movemask_ps(*reinterpret_cast(&vAsserti)) == 0xf); +#endif + // Store the vectors onto local memory on the stack + XMVECTOR Array[2]; + Array[0] = V1; + Array[1] = V2; + // Output vector, on the stack + XMVECTORU8 vResult; + // Get pointer to the two vectors on the stack + const BYTE *pInput = reinterpret_cast(Array); + // Store the Control vector on the stack to access the bytes + // don't use Control, it can cause a register variable to spill on the stack. + XMVECTORU8 vControl; + vControl.v = Control; // Write to memory + UINT i = 0; + do { + UINT ComponentIndex = vControl.u[i] & 0x1FU; + ComponentIndex ^= 3; // Swap byte ordering + vResult.u[i] = pInput[ComponentIndex]; + } while (++i<16); + return vResult; +#else // _XM_SSE_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Define a control vector to be used in XMVectorSelect +// operations. The four integers specified in XMVectorSelectControl +// serve as indices to select between components in two vectors. +// The first index controls selection for the first component of +// the vectors involved in a select operation, the second index +// controls selection for the second component etc. A value of +// zero for an index causes the corresponding component from the first +// vector to be selected whereas a one causes the component from the +// second vector to be selected instead. + +XMFINLINE XMVECTOR XMVectorSelectControl +( + UINT VectorIndex0, + UINT VectorIndex1, + UINT VectorIndex2, + UINT VectorIndex3 +) +{ +#if defined(_XM_SSE_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) + // x=Index0,y=Index1,z=Index2,w=Index3 + __m128i vTemp = _mm_set_epi32(VectorIndex3,VectorIndex2,VectorIndex1,VectorIndex0); + // Any non-zero entries become 0xFFFFFFFF else 0 + vTemp = _mm_cmpgt_epi32(vTemp,g_XMZero); + return reinterpret_cast<__m128 *>(&vTemp)[0]; +#else + XMVECTOR ControlVector; + CONST UINT ControlElement[] = + { + XM_SELECT_0, + XM_SELECT_1 + }; + + XMASSERT(VectorIndex0 < 2); + XMASSERT(VectorIndex1 < 2); + XMASSERT(VectorIndex2 < 2); + XMASSERT(VectorIndex3 < 2); + + ControlVector.vector4_u32[0] = ControlElement[VectorIndex0]; + ControlVector.vector4_u32[1] = ControlElement[VectorIndex1]; + ControlVector.vector4_u32[2] = ControlElement[VectorIndex2]; + ControlVector.vector4_u32[3] = ControlElement[VectorIndex3]; + + return ControlVector; + +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorSelect +( + FXMVECTOR V1, + FXMVECTOR V2, + FXMVECTOR Control +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result.vector4_u32[0] = (V1.vector4_u32[0] & ~Control.vector4_u32[0]) | (V2.vector4_u32[0] & Control.vector4_u32[0]); + Result.vector4_u32[1] = (V1.vector4_u32[1] & ~Control.vector4_u32[1]) | (V2.vector4_u32[1] & Control.vector4_u32[1]); + Result.vector4_u32[2] = (V1.vector4_u32[2] & ~Control.vector4_u32[2]) | (V2.vector4_u32[2] & Control.vector4_u32[2]); + Result.vector4_u32[3] = (V1.vector4_u32[3] & ~Control.vector4_u32[3]) | (V2.vector4_u32[3] & Control.vector4_u32[3]); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp1 = _mm_andnot_ps(Control,V1); + XMVECTOR vTemp2 = _mm_and_ps(V2,Control); + return _mm_or_ps(vTemp1,vTemp2); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorMergeXY +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result.vector4_u32[0] = V1.vector4_u32[0]; + Result.vector4_u32[1] = V2.vector4_u32[0]; + Result.vector4_u32[2] = V1.vector4_u32[1]; + Result.vector4_u32[3] = V2.vector4_u32[1]; + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_unpacklo_ps( V1, V2 ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorMergeZW +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result.vector4_u32[0] = V1.vector4_u32[2]; + Result.vector4_u32[1] = V2.vector4_u32[2]; + Result.vector4_u32[2] = V1.vector4_u32[3]; + Result.vector4_u32[3] = V2.vector4_u32[3]; + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_unpackhi_ps( V1, V2 ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Comparison operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorEqual +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Control; + + Control.vector4_u32[0] = (V1.vector4_f32[0] == V2.vector4_f32[0]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[1] = (V1.vector4_f32[1] == V2.vector4_f32[1]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[2] = (V1.vector4_f32[2] == V2.vector4_f32[2]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[3] = (V1.vector4_f32[3] == V2.vector4_f32[3]) ? 0xFFFFFFFF : 0; + + return Control; + +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_cmpeq_ps( V1, V2 ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorEqualR +( + UINT* pCR, + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + UINT ux, uy, uz, uw, CR; + XMVECTOR Control; + + XMASSERT( pCR ); + + ux = (V1.vector4_f32[0] == V2.vector4_f32[0]) ? 0xFFFFFFFFU : 0; + uy = (V1.vector4_f32[1] == V2.vector4_f32[1]) ? 0xFFFFFFFFU : 0; + uz = (V1.vector4_f32[2] == V2.vector4_f32[2]) ? 0xFFFFFFFFU : 0; + uw = (V1.vector4_f32[3] == V2.vector4_f32[3]) ? 0xFFFFFFFFU : 0; + CR = 0; + if (ux&uy&uz&uw) + { + // All elements are greater + CR = XM_CRMASK_CR6TRUE; + } + else if (!(ux|uy|uz|uw)) + { + // All elements are not greater + CR = XM_CRMASK_CR6FALSE; + } + *pCR = CR; + Control.vector4_u32[0] = ux; + Control.vector4_u32[1] = uy; + Control.vector4_u32[2] = uz; + Control.vector4_u32[3] = uw; + return Control; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT( pCR ); + XMVECTOR vTemp = _mm_cmpeq_ps(V1,V2); + UINT CR = 0; + int iTest = _mm_movemask_ps(vTemp); + if (iTest==0xf) + { + CR = XM_CRMASK_CR6TRUE; + } + else if (!iTest) + { + // All elements are not greater + CR = XM_CRMASK_CR6FALSE; + } + *pCR = CR; + return vTemp; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Treat the components of the vectors as unsigned integers and +// compare individual bits between the two. This is useful for +// comparing control vectors and result vectors returned from +// other comparison operations. + +XMFINLINE XMVECTOR XMVectorEqualInt +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Control; + + Control.vector4_u32[0] = (V1.vector4_u32[0] == V2.vector4_u32[0]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[1] = (V1.vector4_u32[1] == V2.vector4_u32[1]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[2] = (V1.vector4_u32[2] == V2.vector4_u32[2]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[3] = (V1.vector4_u32[3] == V2.vector4_u32[3]) ? 0xFFFFFFFF : 0; + + return Control; + +#elif defined(_XM_SSE_INTRINSICS_) + __m128i V = _mm_cmpeq_epi32( reinterpret_cast(&V1)[0],reinterpret_cast(&V2)[0] ); + return reinterpret_cast<__m128 *>(&V)[0]; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorEqualIntR +( + UINT* pCR, + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Control; + + XMASSERT(pCR); + + Control = XMVectorEqualInt(V1, V2); + + *pCR = 0; + + if (XMVector4EqualInt(Control, XMVectorTrueInt())) + { + // All elements are equal + *pCR |= XM_CRMASK_CR6TRUE; + } + else if (XMVector4EqualInt(Control, XMVectorFalseInt())) + { + // All elements are not equal + *pCR |= XM_CRMASK_CR6FALSE; + } + + return Control; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pCR); + __m128i V = _mm_cmpeq_epi32( reinterpret_cast(&V1)[0],reinterpret_cast(&V2)[0] ); + int iTemp = _mm_movemask_ps(reinterpret_cast(&V)[0]); + UINT CR = 0; + if (iTemp==0x0F) + { + CR = XM_CRMASK_CR6TRUE; + } + else if (!iTemp) + { + CR = XM_CRMASK_CR6FALSE; + } + *pCR = CR; + return reinterpret_cast<__m128 *>(&V)[0]; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorNearEqual +( + FXMVECTOR V1, + FXMVECTOR V2, + FXMVECTOR Epsilon +) +{ +#if defined(_XM_NO_INTRINSICS_) + + FLOAT fDeltax, fDeltay, fDeltaz, fDeltaw; + XMVECTOR Control; + + fDeltax = V1.vector4_f32[0]-V2.vector4_f32[0]; + fDeltay = V1.vector4_f32[1]-V2.vector4_f32[1]; + fDeltaz = V1.vector4_f32[2]-V2.vector4_f32[2]; + fDeltaw = V1.vector4_f32[3]-V2.vector4_f32[3]; + + fDeltax = fabsf(fDeltax); + fDeltay = fabsf(fDeltay); + fDeltaz = fabsf(fDeltaz); + fDeltaw = fabsf(fDeltaw); + + Control.vector4_u32[0] = (fDeltax <= Epsilon.vector4_f32[0]) ? 0xFFFFFFFFU : 0; + Control.vector4_u32[1] = (fDeltay <= Epsilon.vector4_f32[1]) ? 0xFFFFFFFFU : 0; + Control.vector4_u32[2] = (fDeltaz <= Epsilon.vector4_f32[2]) ? 0xFFFFFFFFU : 0; + Control.vector4_u32[3] = (fDeltaw <= Epsilon.vector4_f32[3]) ? 0xFFFFFFFFU : 0; + + return Control; + +#elif defined(_XM_SSE_INTRINSICS_) + // Get the difference + XMVECTOR vDelta = _mm_sub_ps(V1,V2); + // Get the absolute value of the difference + XMVECTOR vTemp = _mm_setzero_ps(); + vTemp = _mm_sub_ps(vTemp,vDelta); + vTemp = _mm_max_ps(vTemp,vDelta); + vTemp = _mm_cmple_ps(vTemp,Epsilon); + return vTemp; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorNotEqual +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Control; + Control.vector4_u32[0] = (V1.vector4_f32[0] != V2.vector4_f32[0]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[1] = (V1.vector4_f32[1] != V2.vector4_f32[1]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[2] = (V1.vector4_f32[2] != V2.vector4_f32[2]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[3] = (V1.vector4_f32[3] != V2.vector4_f32[3]) ? 0xFFFFFFFF : 0; + return Control; + +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_cmpneq_ps( V1, V2 ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorNotEqualInt +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Control; + Control.vector4_u32[0] = (V1.vector4_u32[0] != V2.vector4_u32[0]) ? 0xFFFFFFFFU : 0; + Control.vector4_u32[1] = (V1.vector4_u32[1] != V2.vector4_u32[1]) ? 0xFFFFFFFFU : 0; + Control.vector4_u32[2] = (V1.vector4_u32[2] != V2.vector4_u32[2]) ? 0xFFFFFFFFU : 0; + Control.vector4_u32[3] = (V1.vector4_u32[3] != V2.vector4_u32[3]) ? 0xFFFFFFFFU : 0; + return Control; + +#elif defined(_XM_SSE_INTRINSICS_) + __m128i V = _mm_cmpeq_epi32( reinterpret_cast(&V1)[0],reinterpret_cast(&V2)[0] ); + return _mm_xor_ps(reinterpret_cast<__m128 *>(&V)[0],g_XMNegOneMask); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorGreater +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Control; + Control.vector4_u32[0] = (V1.vector4_f32[0] > V2.vector4_f32[0]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[1] = (V1.vector4_f32[1] > V2.vector4_f32[1]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[2] = (V1.vector4_f32[2] > V2.vector4_f32[2]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[3] = (V1.vector4_f32[3] > V2.vector4_f32[3]) ? 0xFFFFFFFF : 0; + return Control; + +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_cmpgt_ps( V1, V2 ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorGreaterR +( + UINT* pCR, + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + UINT ux, uy, uz, uw, CR; + XMVECTOR Control; + + XMASSERT( pCR ); + + ux = (V1.vector4_f32[0] > V2.vector4_f32[0]) ? 0xFFFFFFFFU : 0; + uy = (V1.vector4_f32[1] > V2.vector4_f32[1]) ? 0xFFFFFFFFU : 0; + uz = (V1.vector4_f32[2] > V2.vector4_f32[2]) ? 0xFFFFFFFFU : 0; + uw = (V1.vector4_f32[3] > V2.vector4_f32[3]) ? 0xFFFFFFFFU : 0; + CR = 0; + if (ux&uy&uz&uw) + { + // All elements are greater + CR = XM_CRMASK_CR6TRUE; + } + else if (!(ux|uy|uz|uw)) + { + // All elements are not greater + CR = XM_CRMASK_CR6FALSE; + } + *pCR = CR; + Control.vector4_u32[0] = ux; + Control.vector4_u32[1] = uy; + Control.vector4_u32[2] = uz; + Control.vector4_u32[3] = uw; + return Control; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT( pCR ); + XMVECTOR vTemp = _mm_cmpgt_ps(V1,V2); + UINT CR = 0; + int iTest = _mm_movemask_ps(vTemp); + if (iTest==0xf) + { + CR = XM_CRMASK_CR6TRUE; + } + else if (!iTest) + { + // All elements are not greater + CR = XM_CRMASK_CR6FALSE; + } + *pCR = CR; + return vTemp; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorGreaterOrEqual +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Control; + Control.vector4_u32[0] = (V1.vector4_f32[0] >= V2.vector4_f32[0]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[1] = (V1.vector4_f32[1] >= V2.vector4_f32[1]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[2] = (V1.vector4_f32[2] >= V2.vector4_f32[2]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[3] = (V1.vector4_f32[3] >= V2.vector4_f32[3]) ? 0xFFFFFFFF : 0; + return Control; + +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_cmpge_ps( V1, V2 ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorGreaterOrEqualR +( + UINT* pCR, + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + UINT ux, uy, uz, uw, CR; + XMVECTOR Control; + + XMASSERT( pCR ); + + ux = (V1.vector4_f32[0] >= V2.vector4_f32[0]) ? 0xFFFFFFFFU : 0; + uy = (V1.vector4_f32[1] >= V2.vector4_f32[1]) ? 0xFFFFFFFFU : 0; + uz = (V1.vector4_f32[2] >= V2.vector4_f32[2]) ? 0xFFFFFFFFU : 0; + uw = (V1.vector4_f32[3] >= V2.vector4_f32[3]) ? 0xFFFFFFFFU : 0; + CR = 0; + if (ux&uy&uz&uw) + { + // All elements are greater + CR = XM_CRMASK_CR6TRUE; + } + else if (!(ux|uy|uz|uw)) + { + // All elements are not greater + CR = XM_CRMASK_CR6FALSE; + } + *pCR = CR; + Control.vector4_u32[0] = ux; + Control.vector4_u32[1] = uy; + Control.vector4_u32[2] = uz; + Control.vector4_u32[3] = uw; + return Control; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT( pCR ); + XMVECTOR vTemp = _mm_cmpge_ps(V1,V2); + UINT CR = 0; + int iTest = _mm_movemask_ps(vTemp); + if (iTest==0xf) + { + CR = XM_CRMASK_CR6TRUE; + } + else if (!iTest) + { + // All elements are not greater + CR = XM_CRMASK_CR6FALSE; + } + *pCR = CR; + return vTemp; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorLess +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Control; + Control.vector4_u32[0] = (V1.vector4_f32[0] < V2.vector4_f32[0]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[1] = (V1.vector4_f32[1] < V2.vector4_f32[1]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[2] = (V1.vector4_f32[2] < V2.vector4_f32[2]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[3] = (V1.vector4_f32[3] < V2.vector4_f32[3]) ? 0xFFFFFFFF : 0; + return Control; + +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_cmplt_ps( V1, V2 ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorLessOrEqual +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Control; + Control.vector4_u32[0] = (V1.vector4_f32[0] <= V2.vector4_f32[0]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[1] = (V1.vector4_f32[1] <= V2.vector4_f32[1]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[2] = (V1.vector4_f32[2] <= V2.vector4_f32[2]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[3] = (V1.vector4_f32[3] <= V2.vector4_f32[3]) ? 0xFFFFFFFF : 0; + return Control; + +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_cmple_ps( V1, V2 ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorInBounds +( + FXMVECTOR V, + FXMVECTOR Bounds +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Control; + Control.vector4_u32[0] = (V.vector4_f32[0] <= Bounds.vector4_f32[0] && V.vector4_f32[0] >= -Bounds.vector4_f32[0]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[1] = (V.vector4_f32[1] <= Bounds.vector4_f32[1] && V.vector4_f32[1] >= -Bounds.vector4_f32[1]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[2] = (V.vector4_f32[2] <= Bounds.vector4_f32[2] && V.vector4_f32[2] >= -Bounds.vector4_f32[2]) ? 0xFFFFFFFF : 0; + Control.vector4_u32[3] = (V.vector4_f32[3] <= Bounds.vector4_f32[3] && V.vector4_f32[3] >= -Bounds.vector4_f32[3]) ? 0xFFFFFFFF : 0; + return Control; + +#elif defined(_XM_SSE_INTRINSICS_) + // Test if less than or equal + XMVECTOR vTemp1 = _mm_cmple_ps(V,Bounds); + // Negate the bounds + XMVECTOR vTemp2 = _mm_mul_ps(Bounds,g_XMNegativeOne); + // Test if greater or equal (Reversed) + vTemp2 = _mm_cmple_ps(vTemp2,V); + // Blend answers + vTemp1 = _mm_and_ps(vTemp1,vTemp2); + return vTemp1; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorInBoundsR +( + UINT* pCR, + FXMVECTOR V, + FXMVECTOR Bounds +) +{ +#if defined(_XM_NO_INTRINSICS_) + UINT ux, uy, uz, uw, CR; + XMVECTOR Control; + + XMASSERT( pCR != 0 ); + + ux = (V.vector4_f32[0] <= Bounds.vector4_f32[0] && V.vector4_f32[0] >= -Bounds.vector4_f32[0]) ? 0xFFFFFFFFU : 0; + uy = (V.vector4_f32[1] <= Bounds.vector4_f32[1] && V.vector4_f32[1] >= -Bounds.vector4_f32[1]) ? 0xFFFFFFFFU : 0; + uz = (V.vector4_f32[2] <= Bounds.vector4_f32[2] && V.vector4_f32[2] >= -Bounds.vector4_f32[2]) ? 0xFFFFFFFFU : 0; + uw = (V.vector4_f32[3] <= Bounds.vector4_f32[3] && V.vector4_f32[3] >= -Bounds.vector4_f32[3]) ? 0xFFFFFFFFU : 0; + + CR = 0; + + if (ux&uy&uz&uw) + { + // All elements are in bounds + CR = XM_CRMASK_CR6BOUNDS; + } + *pCR = CR; + Control.vector4_u32[0] = ux; + Control.vector4_u32[1] = uy; + Control.vector4_u32[2] = uz; + Control.vector4_u32[3] = uw; + return Control; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT( pCR != 0 ); + // Test if less than or equal + XMVECTOR vTemp1 = _mm_cmple_ps(V,Bounds); + // Negate the bounds + XMVECTOR vTemp2 = _mm_mul_ps(Bounds,g_XMNegativeOne); + // Test if greater or equal (Reversed) + vTemp2 = _mm_cmple_ps(vTemp2,V); + // Blend answers + vTemp1 = _mm_and_ps(vTemp1,vTemp2); + + UINT CR = 0; + if (_mm_movemask_ps(vTemp1)==0xf) { + // All elements are in bounds + CR = XM_CRMASK_CR6BOUNDS; + } + *pCR = CR; + return vTemp1; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorIsNaN +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Control; + Control.vector4_u32[0] = XMISNAN(V.vector4_f32[0]) ? 0xFFFFFFFFU : 0; + Control.vector4_u32[1] = XMISNAN(V.vector4_f32[1]) ? 0xFFFFFFFFU : 0; + Control.vector4_u32[2] = XMISNAN(V.vector4_f32[2]) ? 0xFFFFFFFFU : 0; + Control.vector4_u32[3] = XMISNAN(V.vector4_f32[3]) ? 0xFFFFFFFFU : 0; + return Control; + +#elif defined(_XM_SSE_INTRINSICS_) + // Mask off the exponent + __m128i vTempInf = _mm_and_si128(reinterpret_cast(&V)[0],g_XMInfinity); + // Mask off the mantissa + __m128i vTempNan = _mm_and_si128(reinterpret_cast(&V)[0],g_XMQNaNTest); + // Are any of the exponents == 0x7F800000? + vTempInf = _mm_cmpeq_epi32(vTempInf,g_XMInfinity); + // Are any of the mantissa's zero? (SSE2 doesn't have a neq test) + vTempNan = _mm_cmpeq_epi32(vTempNan,g_XMZero); + // Perform a not on the NaN test to be true on NON-zero mantissas + vTempNan = _mm_andnot_si128(vTempNan,vTempInf); + // If any are NaN, the signs are true after the merge above + return reinterpret_cast(&vTempNan)[0]; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorIsInfinite +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Control; + Control.vector4_u32[0] = XMISINF(V.vector4_f32[0]) ? 0xFFFFFFFFU : 0; + Control.vector4_u32[1] = XMISINF(V.vector4_f32[1]) ? 0xFFFFFFFFU : 0; + Control.vector4_u32[2] = XMISINF(V.vector4_f32[2]) ? 0xFFFFFFFFU : 0; + Control.vector4_u32[3] = XMISINF(V.vector4_f32[3]) ? 0xFFFFFFFFU : 0; + return Control; + +#elif defined(_XM_SSE_INTRINSICS_) + // Mask off the sign bit + __m128 vTemp = _mm_and_ps(V,g_XMAbsMask); + // Compare to infinity + vTemp = _mm_cmpeq_ps(vTemp,g_XMInfinity); + // If any are infinity, the signs are true. + return vTemp; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Rounding and clamping operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorMin +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + Result.vector4_f32[0] = (V1.vector4_f32[0] < V2.vector4_f32[0]) ? V1.vector4_f32[0] : V2.vector4_f32[0]; + Result.vector4_f32[1] = (V1.vector4_f32[1] < V2.vector4_f32[1]) ? V1.vector4_f32[1] : V2.vector4_f32[1]; + Result.vector4_f32[2] = (V1.vector4_f32[2] < V2.vector4_f32[2]) ? V1.vector4_f32[2] : V2.vector4_f32[2]; + Result.vector4_f32[3] = (V1.vector4_f32[3] < V2.vector4_f32[3]) ? V1.vector4_f32[3] : V2.vector4_f32[3]; + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_min_ps( V1, V2 ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorMax +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + Result.vector4_f32[0] = (V1.vector4_f32[0] > V2.vector4_f32[0]) ? V1.vector4_f32[0] : V2.vector4_f32[0]; + Result.vector4_f32[1] = (V1.vector4_f32[1] > V2.vector4_f32[1]) ? V1.vector4_f32[1] : V2.vector4_f32[1]; + Result.vector4_f32[2] = (V1.vector4_f32[2] > V2.vector4_f32[2]) ? V1.vector4_f32[2] : V2.vector4_f32[2]; + Result.vector4_f32[3] = (V1.vector4_f32[3] > V2.vector4_f32[3]) ? V1.vector4_f32[3] : V2.vector4_f32[3]; + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_max_ps( V1, V2 ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorRound +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + XMVECTOR Bias; + CONST XMVECTOR Zero = XMVectorZero(); + CONST XMVECTOR BiasPos = XMVectorReplicate(0.5f); + CONST XMVECTOR BiasNeg = XMVectorReplicate(-0.5f); + + Bias = XMVectorLess(V, Zero); + Bias = XMVectorSelect(BiasPos, BiasNeg, Bias); + Result = XMVectorAdd(V, Bias); + Result = XMVectorTruncate(Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // To handle NAN, INF and numbers greater than 8388608, use masking + // Get the abs value + __m128i vTest = _mm_and_si128(reinterpret_cast(&V)[0],g_XMAbsMask); + // Test for greater than 8388608 (All floats with NO fractionals, NAN and INF + vTest = _mm_cmplt_epi32(vTest,g_XMNoFraction); + // Convert to int and back to float for rounding + __m128i vInt = _mm_cvtps_epi32(V); + // Convert back to floats + XMVECTOR vResult = _mm_cvtepi32_ps(vInt); + // All numbers less than 8388608 will use the round to int + vResult = _mm_and_ps(vResult,reinterpret_cast(&vTest)[0]); + // All others, use the ORIGINAL value + vTest = _mm_andnot_si128(vTest,reinterpret_cast(&V)[0]); + vResult = _mm_or_ps(vResult,reinterpret_cast(&vTest)[0]); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorTruncate +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR Result; + UINT i; + + // Avoid C4701 + Result.vector4_f32[0] = 0.0f; + + for (i = 0; i < 4; i++) + { + if (XMISNAN(V.vector4_f32[i])) + { + Result.vector4_u32[i] = 0x7FC00000; + } + else if (fabsf(V.vector4_f32[i]) < 8388608.0f) + { + Result.vector4_f32[i] = (FLOAT)((INT)V.vector4_f32[i]); + } + else + { + Result.vector4_f32[i] = V.vector4_f32[i]; + } + } + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // To handle NAN, INF and numbers greater than 8388608, use masking + // Get the abs value + __m128i vTest = _mm_and_si128(reinterpret_cast(&V)[0],g_XMAbsMask); + // Test for greater than 8388608 (All floats with NO fractionals, NAN and INF + vTest = _mm_cmplt_epi32(vTest,g_XMNoFraction); + // Convert to int and back to float for rounding with truncation + __m128i vInt = _mm_cvttps_epi32(V); + // Convert back to floats + XMVECTOR vResult = _mm_cvtepi32_ps(vInt); + // All numbers less than 8388608 will use the round to int + vResult = _mm_and_ps(vResult,reinterpret_cast(&vTest)[0]); + // All others, use the ORIGINAL value + vTest = _mm_andnot_si128(vTest,reinterpret_cast(&V)[0]); + vResult = _mm_or_ps(vResult,reinterpret_cast(&vTest)[0]); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorFloor +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR vResult = { + floorf(V.vector4_f32[0]), + floorf(V.vector4_f32[1]), + floorf(V.vector4_f32[2]), + floorf(V.vector4_f32[3]) + }; + return vResult; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_sub_ps(V,g_XMOneHalfMinusEpsilon); + __m128i vInt = _mm_cvtps_epi32(vResult); + vResult = _mm_cvtepi32_ps(vInt); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorCeiling +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR vResult = { + ceilf(V.vector4_f32[0]), + ceilf(V.vector4_f32[1]), + ceilf(V.vector4_f32[2]), + ceilf(V.vector4_f32[3]) + }; + return vResult; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_add_ps(V,g_XMOneHalfMinusEpsilon); + __m128i vInt = _mm_cvtps_epi32(vResult); + vResult = _mm_cvtepi32_ps(vInt); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorClamp +( + FXMVECTOR V, + FXMVECTOR Min, + FXMVECTOR Max +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + XMASSERT(XMVector4LessOrEqual(Min, Max)); + + Result = XMVectorMax(Min, V); + Result = XMVectorMin(Max, Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult; + XMASSERT(XMVector4LessOrEqual(Min, Max)); + vResult = _mm_max_ps(Min,V); + vResult = _mm_min_ps(vResult,Max); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorSaturate +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + CONST XMVECTOR Zero = XMVectorZero(); + + return XMVectorClamp(V, Zero, g_XMOne.v); + +#elif defined(_XM_SSE_INTRINSICS_) + // Set <0 to 0 + XMVECTOR vResult = _mm_max_ps(V,g_XMZero); + // Set>1 to 1 + return _mm_min_ps(vResult,g_XMOne); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Bitwise logical operations +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorAndInt +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result.vector4_u32[0] = V1.vector4_u32[0] & V2.vector4_u32[0]; + Result.vector4_u32[1] = V1.vector4_u32[1] & V2.vector4_u32[1]; + Result.vector4_u32[2] = V1.vector4_u32[2] & V2.vector4_u32[2]; + Result.vector4_u32[3] = V1.vector4_u32[3] & V2.vector4_u32[3]; + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_and_ps(V1,V2); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorAndCInt +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result.vector4_u32[0] = V1.vector4_u32[0] & ~V2.vector4_u32[0]; + Result.vector4_u32[1] = V1.vector4_u32[1] & ~V2.vector4_u32[1]; + Result.vector4_u32[2] = V1.vector4_u32[2] & ~V2.vector4_u32[2]; + Result.vector4_u32[3] = V1.vector4_u32[3] & ~V2.vector4_u32[3]; + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + __m128i V = _mm_andnot_si128( reinterpret_cast(&V2)[0], reinterpret_cast(&V1)[0] ); + return reinterpret_cast<__m128 *>(&V)[0]; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorOrInt +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result.vector4_u32[0] = V1.vector4_u32[0] | V2.vector4_u32[0]; + Result.vector4_u32[1] = V1.vector4_u32[1] | V2.vector4_u32[1]; + Result.vector4_u32[2] = V1.vector4_u32[2] | V2.vector4_u32[2]; + Result.vector4_u32[3] = V1.vector4_u32[3] | V2.vector4_u32[3]; + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + __m128i V = _mm_or_si128( reinterpret_cast(&V1)[0], reinterpret_cast(&V2)[0] ); + return reinterpret_cast<__m128 *>(&V)[0]; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorNorInt +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result.vector4_u32[0] = ~(V1.vector4_u32[0] | V2.vector4_u32[0]); + Result.vector4_u32[1] = ~(V1.vector4_u32[1] | V2.vector4_u32[1]); + Result.vector4_u32[2] = ~(V1.vector4_u32[2] | V2.vector4_u32[2]); + Result.vector4_u32[3] = ~(V1.vector4_u32[3] | V2.vector4_u32[3]); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + __m128i Result; + Result = _mm_or_si128( reinterpret_cast(&V1)[0], reinterpret_cast(&V2)[0] ); + Result = _mm_andnot_si128( Result,g_XMNegOneMask); + return reinterpret_cast<__m128 *>(&Result)[0]; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorXorInt +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result.vector4_u32[0] = V1.vector4_u32[0] ^ V2.vector4_u32[0]; + Result.vector4_u32[1] = V1.vector4_u32[1] ^ V2.vector4_u32[1]; + Result.vector4_u32[2] = V1.vector4_u32[2] ^ V2.vector4_u32[2]; + Result.vector4_u32[3] = V1.vector4_u32[3] ^ V2.vector4_u32[3]; + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + __m128i V = _mm_xor_si128( reinterpret_cast(&V1)[0], reinterpret_cast(&V2)[0] ); + return reinterpret_cast<__m128 *>(&V)[0]; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Computation operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorNegate +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result.vector4_f32[0] = -V.vector4_f32[0]; + Result.vector4_f32[1] = -V.vector4_f32[1]; + Result.vector4_f32[2] = -V.vector4_f32[2]; + Result.vector4_f32[3] = -V.vector4_f32[3]; + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR Z; + + Z = _mm_setzero_ps(); + + return _mm_sub_ps( Z, V ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorAdd +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result.vector4_f32[0] = V1.vector4_f32[0] + V2.vector4_f32[0]; + Result.vector4_f32[1] = V1.vector4_f32[1] + V2.vector4_f32[1]; + Result.vector4_f32[2] = V1.vector4_f32[2] + V2.vector4_f32[2]; + Result.vector4_f32[3] = V1.vector4_f32[3] + V2.vector4_f32[3]; + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_add_ps( V1, V2 ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorAddAngles +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Mask; + XMVECTOR Offset; + XMVECTOR Result; + CONST XMVECTOR Zero = XMVectorZero(); + + // Add the given angles together. If the range of V1 is such + // that -Pi <= V1 < Pi and the range of V2 is such that + // -2Pi <= V2 <= 2Pi, then the range of the resulting angle + // will be -Pi <= Result < Pi. + Result = XMVectorAdd(V1, V2); + + Mask = XMVectorLess(Result, g_XMNegativePi.v); + Offset = XMVectorSelect(Zero, g_XMTwoPi.v, Mask); + + Mask = XMVectorGreaterOrEqual(Result, g_XMPi.v); + Offset = XMVectorSelect(Offset, g_XMNegativeTwoPi.v, Mask); + + Result = XMVectorAdd(Result, Offset); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Adjust the angles + XMVECTOR vResult = _mm_add_ps(V1,V2); + // Less than Pi? + XMVECTOR vOffset = _mm_cmplt_ps(vResult,g_XMNegativePi); + vOffset = _mm_and_ps(vOffset,g_XMTwoPi); + // Add 2Pi to all entries less than -Pi + vResult = _mm_add_ps(vResult,vOffset); + // Greater than or equal to Pi? + vOffset = _mm_cmpge_ps(vResult,g_XMPi); + vOffset = _mm_and_ps(vOffset,g_XMTwoPi); + // Sub 2Pi to all entries greater than Pi + vResult = _mm_sub_ps(vResult,vOffset); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorSubtract +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result.vector4_f32[0] = V1.vector4_f32[0] - V2.vector4_f32[0]; + Result.vector4_f32[1] = V1.vector4_f32[1] - V2.vector4_f32[1]; + Result.vector4_f32[2] = V1.vector4_f32[2] - V2.vector4_f32[2]; + Result.vector4_f32[3] = V1.vector4_f32[3] - V2.vector4_f32[3]; + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_sub_ps( V1, V2 ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorSubtractAngles +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Mask; + XMVECTOR Offset; + XMVECTOR Result; + CONST XMVECTOR Zero = XMVectorZero(); + + // Subtract the given angles. If the range of V1 is such + // that -Pi <= V1 < Pi and the range of V2 is such that + // -2Pi <= V2 <= 2Pi, then the range of the resulting angle + // will be -Pi <= Result < Pi. + Result = XMVectorSubtract(V1, V2); + + Mask = XMVectorLess(Result, g_XMNegativePi.v); + Offset = XMVectorSelect(Zero, g_XMTwoPi.v, Mask); + + Mask = XMVectorGreaterOrEqual(Result, g_XMPi.v); + Offset = XMVectorSelect(Offset, g_XMNegativeTwoPi.v, Mask); + + Result = XMVectorAdd(Result, Offset); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Adjust the angles + XMVECTOR vResult = _mm_sub_ps(V1,V2); + // Less than Pi? + XMVECTOR vOffset = _mm_cmplt_ps(vResult,g_XMNegativePi); + vOffset = _mm_and_ps(vOffset,g_XMTwoPi); + // Add 2Pi to all entries less than -Pi + vResult = _mm_add_ps(vResult,vOffset); + // Greater than or equal to Pi? + vOffset = _mm_cmpge_ps(vResult,g_XMPi); + vOffset = _mm_and_ps(vOffset,g_XMTwoPi); + // Sub 2Pi to all entries greater than Pi + vResult = _mm_sub_ps(vResult,vOffset); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorMultiply +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR Result = { + V1.vector4_f32[0] * V2.vector4_f32[0], + V1.vector4_f32[1] * V2.vector4_f32[1], + V1.vector4_f32[2] * V2.vector4_f32[2], + V1.vector4_f32[3] * V2.vector4_f32[3] + }; + return Result; +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_mul_ps( V1, V2 ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorMultiplyAdd +( + FXMVECTOR V1, + FXMVECTOR V2, + FXMVECTOR V3 +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR vResult = { + (V1.vector4_f32[0] * V2.vector4_f32[0]) + V3.vector4_f32[0], + (V1.vector4_f32[1] * V2.vector4_f32[1]) + V3.vector4_f32[1], + (V1.vector4_f32[2] * V2.vector4_f32[2]) + V3.vector4_f32[2], + (V1.vector4_f32[3] * V2.vector4_f32[3]) + V3.vector4_f32[3] + }; + return vResult; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_mul_ps( V1, V2 ); + return _mm_add_ps(vResult, V3 ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorDivide +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR Result; + Result.vector4_f32[0] = V1.vector4_f32[0] / V2.vector4_f32[0]; + Result.vector4_f32[1] = V1.vector4_f32[1] / V2.vector4_f32[1]; + Result.vector4_f32[2] = V1.vector4_f32[2] / V2.vector4_f32[2]; + Result.vector4_f32[3] = V1.vector4_f32[3] / V2.vector4_f32[3]; + return Result; +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_div_ps( V1, V2 ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorNegativeMultiplySubtract +( + FXMVECTOR V1, + FXMVECTOR V2, + FXMVECTOR V3 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR vResult = { + V3.vector4_f32[0] - (V1.vector4_f32[0] * V2.vector4_f32[0]), + V3.vector4_f32[1] - (V1.vector4_f32[1] * V2.vector4_f32[1]), + V3.vector4_f32[2] - (V1.vector4_f32[2] * V2.vector4_f32[2]), + V3.vector4_f32[3] - (V1.vector4_f32[3] * V2.vector4_f32[3]) + }; + return vResult; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR R = _mm_mul_ps( V1, V2 ); + return _mm_sub_ps( V3, R ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorScale +( + FXMVECTOR V, + FLOAT ScaleFactor +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR vResult = { + V.vector4_f32[0] * ScaleFactor, + V.vector4_f32[1] * ScaleFactor, + V.vector4_f32[2] * ScaleFactor, + V.vector4_f32[3] * ScaleFactor + }; + return vResult; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_set_ps1(ScaleFactor); + return _mm_mul_ps(vResult,V); +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorReciprocalEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR Result; + UINT i; + + // Avoid C4701 + Result.vector4_f32[0] = 0.0f; + + for (i = 0; i < 4; i++) + { + if (XMISNAN(V.vector4_f32[i])) + { + Result.vector4_u32[i] = 0x7FC00000; + } + else if (V.vector4_f32[i] == 0.0f || V.vector4_f32[i] == -0.0f) + { + Result.vector4_u32[i] = 0x7F800000 | (V.vector4_u32[i] & 0x80000000); + } + else + { + Result.vector4_f32[i] = 1.f / V.vector4_f32[i]; + } + } + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_rcp_ps(V); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorReciprocal +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + return XMVectorReciprocalEst(V); + +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_div_ps(g_XMOne,V); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Return an estimated square root +XMFINLINE XMVECTOR XMVectorSqrtEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR Select; + + // if (x == +Infinity) sqrt(x) = +Infinity + // if (x == +0.0f) sqrt(x) = +0.0f + // if (x == -0.0f) sqrt(x) = -0.0f + // if (x < 0.0f) sqrt(x) = QNaN + + XMVECTOR Result = XMVectorReciprocalSqrtEst(V); + XMVECTOR Zero = XMVectorZero(); + XMVECTOR VEqualsInfinity = XMVectorEqualInt(V, g_XMInfinity.v); + XMVECTOR VEqualsZero = XMVectorEqual(V, Zero); + Result = XMVectorMultiply(V, Result); + Select = XMVectorEqualInt(VEqualsInfinity, VEqualsZero); + Result = XMVectorSelect(V, Result, Select); + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_sqrt_ps(V); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorSqrt +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Zero; + XMVECTOR VEqualsInfinity, VEqualsZero; + XMVECTOR Select; + XMVECTOR Result; + + // if (x == +Infinity) sqrt(x) = +Infinity + // if (x == +0.0f) sqrt(x) = +0.0f + // if (x == -0.0f) sqrt(x) = -0.0f + // if (x < 0.0f) sqrt(x) = QNaN + + Result = XMVectorReciprocalSqrt(V); + Zero = XMVectorZero(); + VEqualsInfinity = XMVectorEqualInt(V, g_XMInfinity.v); + VEqualsZero = XMVectorEqual(V, Zero); + Result = XMVectorMultiply(V, Result); + Select = XMVectorEqualInt(VEqualsInfinity, VEqualsZero); + Result = XMVectorSelect(V, Result, Select); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_sqrt_ps(V); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorReciprocalSqrtEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + // if (x == +Infinity) rsqrt(x) = 0 + // if (x == +0.0f) rsqrt(x) = +Infinity + // if (x == -0.0f) rsqrt(x) = -Infinity + // if (x < 0.0f) rsqrt(x) = QNaN + + XMVECTOR Result; + UINT i; + + // Avoid C4701 + Result.vector4_f32[0] = 0.0f; + + for (i = 0; i < 4; i++) + { + if (XMISNAN(V.vector4_f32[i])) + { + Result.vector4_u32[i] = 0x7FC00000; + } + else if (V.vector4_f32[i] == 0.0f || V.vector4_f32[i] == -0.0f) + { + Result.vector4_u32[i] = 0x7F800000 | (V.vector4_u32[i] & 0x80000000); + } + else if (V.vector4_f32[i] < 0.0f) + { + Result.vector4_u32[i] = 0x7FFFFFFF; + } + else if (XMISINF(V.vector4_f32[i])) + { + Result.vector4_f32[i] = 0.0f; + } + else + { + Result.vector4_f32[i] = 1.0f / sqrtf(V.vector4_f32[i]); + } + } + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + return _mm_rsqrt_ps(V); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorReciprocalSqrt +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + return XMVectorReciprocalSqrtEst(V); + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_sqrt_ps(V); + vResult = _mm_div_ps(g_XMOne,vResult); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorExpEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + Result.vector4_f32[0] = powf(2.0f, V.vector4_f32[0]); + Result.vector4_f32[1] = powf(2.0f, V.vector4_f32[1]); + Result.vector4_f32[2] = powf(2.0f, V.vector4_f32[2]); + Result.vector4_f32[3] = powf(2.0f, V.vector4_f32[3]); + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_setr_ps( + powf(2.0f,XMVectorGetX(V)), + powf(2.0f,XMVectorGetY(V)), + powf(2.0f,XMVectorGetZ(V)), + powf(2.0f,XMVectorGetW(V))); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMVECTOR XMVectorExp +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR E, S; + XMVECTOR R, R2, R3, R4; + XMVECTOR V0, V1; + XMVECTOR C0X, C0Y, C0Z, C0W; + XMVECTOR C1X, C1Y, C1Z, C1W; + XMVECTOR Result; + static CONST XMVECTOR C0 = {1.0f, -6.93147182e-1f, 2.40226462e-1f, -5.55036440e-2f}; + static CONST XMVECTOR C1 = {9.61597636e-3f, -1.32823968e-3f, 1.47491097e-4f, -1.08635004e-5f}; + + R = XMVectorFloor(V); + E = XMVectorExpEst(R); + R = XMVectorSubtract(V, R); + R2 = XMVectorMultiply(R, R); + R3 = XMVectorMultiply(R, R2); + R4 = XMVectorMultiply(R2, R2); + + C0X = XMVectorSplatX(C0); + C0Y = XMVectorSplatY(C0); + C0Z = XMVectorSplatZ(C0); + C0W = XMVectorSplatW(C0); + + C1X = XMVectorSplatX(C1); + C1Y = XMVectorSplatY(C1); + C1Z = XMVectorSplatZ(C1); + C1W = XMVectorSplatW(C1); + + V0 = XMVectorMultiplyAdd(R, C0Y, C0X); + V0 = XMVectorMultiplyAdd(R2, C0Z, V0); + V0 = XMVectorMultiplyAdd(R3, C0W, V0); + + V1 = XMVectorMultiplyAdd(R, C1Y, C1X); + V1 = XMVectorMultiplyAdd(R2, C1Z, V1); + V1 = XMVectorMultiplyAdd(R3, C1W, V1); + + S = XMVectorMultiplyAdd(R4, V1, V0); + + S = XMVectorReciprocal(S); + Result = XMVectorMultiply(E, S); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + static CONST XMVECTORF32 C0 = {1.0f, -6.93147182e-1f, 2.40226462e-1f, -5.55036440e-2f}; + static CONST XMVECTORF32 C1 = {9.61597636e-3f, -1.32823968e-3f, 1.47491097e-4f, -1.08635004e-5f}; + + // Get the integer of the input + XMVECTOR R = XMVectorFloor(V); + // Get the exponent estimate + XMVECTOR E = XMVectorExpEst(R); + // Get the fractional only + R = _mm_sub_ps(V,R); + // Get R^2 + XMVECTOR R2 = _mm_mul_ps(R,R); + // And R^3 + XMVECTOR R3 = _mm_mul_ps(R,R2); + + XMVECTOR V0 = _mm_load_ps1(&C0.f[1]); + V0 = _mm_mul_ps(V0,R); + XMVECTOR vConstants = _mm_load_ps1(&C0.f[0]); + V0 = _mm_add_ps(V0,vConstants); + vConstants = _mm_load_ps1(&C0.f[2]); + vConstants = _mm_mul_ps(vConstants,R2); + V0 = _mm_add_ps(V0,vConstants); + vConstants = _mm_load_ps1(&C0.f[3]); + vConstants = _mm_mul_ps(vConstants,R3); + V0 = _mm_add_ps(V0,vConstants); + + XMVECTOR V1 = _mm_load_ps1(&C1.f[1]); + V1 = _mm_mul_ps(V1,R); + vConstants = _mm_load_ps1(&C1.f[0]); + V1 = _mm_add_ps(V1,vConstants); + vConstants = _mm_load_ps1(&C1.f[2]); + vConstants = _mm_mul_ps(vConstants,R2); + V1 = _mm_add_ps(V1,vConstants); + vConstants = _mm_load_ps1(&C1.f[3]); + vConstants = _mm_mul_ps(vConstants,R3); + V1 = _mm_add_ps(V1,vConstants); + // R2 = R^4 + R2 = _mm_mul_ps(R2,R2); + R2 = _mm_mul_ps(R2,V1); + R2 = _mm_add_ps(R2,V0); + E = _mm_div_ps(E,R2); + return E; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorLogEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + FLOAT fScale = (1.0f / logf(2.0f)); + XMVECTOR Result; + + Result.vector4_f32[0] = logf(V.vector4_f32[0])*fScale; + Result.vector4_f32[1] = logf(V.vector4_f32[1])*fScale; + Result.vector4_f32[2] = logf(V.vector4_f32[2])*fScale; + Result.vector4_f32[3] = logf(V.vector4_f32[3])*fScale; + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vScale = _mm_set_ps1(1.0f / logf(2.0f)); + XMVECTOR vResult = _mm_setr_ps( + logf(XMVectorGetX(V)), + logf(XMVectorGetY(V)), + logf(XMVectorGetZ(V)), + logf(XMVectorGetW(V))); + vResult = _mm_mul_ps(vResult,vScale); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMVECTOR XMVectorLog +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + FLOAT fScale = (1.0f / logf(2.0f)); + XMVECTOR Result; + + Result.vector4_f32[0] = logf(V.vector4_f32[0])*fScale; + Result.vector4_f32[1] = logf(V.vector4_f32[1])*fScale; + Result.vector4_f32[2] = logf(V.vector4_f32[2])*fScale; + Result.vector4_f32[3] = logf(V.vector4_f32[3])*fScale; + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vScale = _mm_set_ps1(1.0f / logf(2.0f)); + XMVECTOR vResult = _mm_setr_ps( + logf(XMVectorGetX(V)), + logf(XMVectorGetY(V)), + logf(XMVectorGetZ(V)), + logf(XMVectorGetW(V))); + vResult = _mm_mul_ps(vResult,vScale); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorPowEst +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result.vector4_f32[0] = powf(V1.vector4_f32[0], V2.vector4_f32[0]); + Result.vector4_f32[1] = powf(V1.vector4_f32[1], V2.vector4_f32[1]); + Result.vector4_f32[2] = powf(V1.vector4_f32[2], V2.vector4_f32[2]); + Result.vector4_f32[3] = powf(V1.vector4_f32[3], V2.vector4_f32[3]); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_setr_ps( + powf(XMVectorGetX(V1),XMVectorGetX(V2)), + powf(XMVectorGetY(V1),XMVectorGetY(V2)), + powf(XMVectorGetZ(V1),XMVectorGetZ(V2)), + powf(XMVectorGetW(V1),XMVectorGetW(V2))); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorPow +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) || defined(_XM_SSE_INTRINSICS_) + + return XMVectorPowEst(V1, V2); + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorAbs +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR vResult = { + fabsf(V.vector4_f32[0]), + fabsf(V.vector4_f32[1]), + fabsf(V.vector4_f32[2]), + fabsf(V.vector4_f32[3]) + }; + return vResult; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_setzero_ps(); + vResult = _mm_sub_ps(vResult,V); + vResult = _mm_max_ps(vResult,V); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorMod +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Reciprocal; + XMVECTOR Quotient; + XMVECTOR Result; + + // V1 % V2 = V1 - V2 * truncate(V1 / V2) + Reciprocal = XMVectorReciprocal(V2); + Quotient = XMVectorMultiply(V1, Reciprocal); + Quotient = XMVectorTruncate(Quotient); + Result = XMVectorNegativeMultiplySubtract(V2, Quotient, V1); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_div_ps(V1, V2); + vResult = XMVectorTruncate(vResult); + vResult = _mm_mul_ps(vResult,V2); + vResult = _mm_sub_ps(V1,vResult); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorModAngles +( + FXMVECTOR Angles +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + XMVECTOR Result; + + // Modulo the range of the given angles such that -XM_PI <= Angles < XM_PI + V = XMVectorMultiply(Angles, g_XMReciprocalTwoPi.v); + V = XMVectorRound(V); + Result = XMVectorNegativeMultiplySubtract(g_XMTwoPi.v, V, Angles); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Modulo the range of the given angles such that -XM_PI <= Angles < XM_PI + XMVECTOR vResult = _mm_mul_ps(Angles,g_XMReciprocalTwoPi); + // Use the inline function due to complexity for rounding + vResult = XMVectorRound(vResult); + vResult = _mm_mul_ps(vResult,g_XMTwoPi); + vResult = _mm_sub_ps(Angles,vResult); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMVECTOR XMVectorSin +( + FXMVECTOR V +) +{ + +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V1, V2, V3, V5, V7, V9, V11, V13, V15, V17, V19, V21, V23; + XMVECTOR S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11; + XMVECTOR Result; + + V1 = XMVectorModAngles(V); + + // sin(V) ~= V - V^3 / 3! + V^5 / 5! - V^7 / 7! + V^9 / 9! - V^11 / 11! + V^13 / 13! - + // V^15 / 15! + V^17 / 17! - V^19 / 19! + V^21 / 21! - V^23 / 23! (for -PI <= V < PI) + V2 = XMVectorMultiply(V1, V1); + V3 = XMVectorMultiply(V2, V1); + V5 = XMVectorMultiply(V3, V2); + V7 = XMVectorMultiply(V5, V2); + V9 = XMVectorMultiply(V7, V2); + V11 = XMVectorMultiply(V9, V2); + V13 = XMVectorMultiply(V11, V2); + V15 = XMVectorMultiply(V13, V2); + V17 = XMVectorMultiply(V15, V2); + V19 = XMVectorMultiply(V17, V2); + V21 = XMVectorMultiply(V19, V2); + V23 = XMVectorMultiply(V21, V2); + + S1 = XMVectorSplatY(g_XMSinCoefficients0.v); + S2 = XMVectorSplatZ(g_XMSinCoefficients0.v); + S3 = XMVectorSplatW(g_XMSinCoefficients0.v); + S4 = XMVectorSplatX(g_XMSinCoefficients1.v); + S5 = XMVectorSplatY(g_XMSinCoefficients1.v); + S6 = XMVectorSplatZ(g_XMSinCoefficients1.v); + S7 = XMVectorSplatW(g_XMSinCoefficients1.v); + S8 = XMVectorSplatX(g_XMSinCoefficients2.v); + S9 = XMVectorSplatY(g_XMSinCoefficients2.v); + S10 = XMVectorSplatZ(g_XMSinCoefficients2.v); + S11 = XMVectorSplatW(g_XMSinCoefficients2.v); + + Result = XMVectorMultiplyAdd(S1, V3, V1); + Result = XMVectorMultiplyAdd(S2, V5, Result); + Result = XMVectorMultiplyAdd(S3, V7, Result); + Result = XMVectorMultiplyAdd(S4, V9, Result); + Result = XMVectorMultiplyAdd(S5, V11, Result); + Result = XMVectorMultiplyAdd(S6, V13, Result); + Result = XMVectorMultiplyAdd(S7, V15, Result); + Result = XMVectorMultiplyAdd(S8, V17, Result); + Result = XMVectorMultiplyAdd(S9, V19, Result); + Result = XMVectorMultiplyAdd(S10, V21, Result); + Result = XMVectorMultiplyAdd(S11, V23, Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Force the value within the bounds of pi + XMVECTOR vResult = XMVectorModAngles(V); + // Each on is V to the "num" power + // V2 = V1^2 + XMVECTOR V2 = _mm_mul_ps(vResult,vResult); + // V1^3 + XMVECTOR vPower = _mm_mul_ps(vResult,V2); + XMVECTOR vConstants = _mm_load_ps1(&g_XMSinCoefficients0.f[1]); + vConstants = _mm_mul_ps(vConstants,vPower); + vResult = _mm_add_ps(vResult,vConstants); + + // V^5 + vPower = _mm_mul_ps(vPower,V2); + vConstants = _mm_load_ps1(&g_XMSinCoefficients0.f[2]); + vConstants = _mm_mul_ps(vConstants,vPower); + vResult = _mm_add_ps(vResult,vConstants); + + // V^7 + vPower = _mm_mul_ps(vPower,V2); + vConstants = _mm_load_ps1(&g_XMSinCoefficients0.f[3]); + vConstants = _mm_mul_ps(vConstants,vPower); + vResult = _mm_add_ps(vResult,vConstants); + + // V^9 + vPower = _mm_mul_ps(vPower,V2); + vConstants = _mm_load_ps1(&g_XMSinCoefficients1.f[0]); + vConstants = _mm_mul_ps(vConstants,vPower); + vResult = _mm_add_ps(vResult,vConstants); + + // V^11 + vPower = _mm_mul_ps(vPower,V2); + vConstants = _mm_load_ps1(&g_XMSinCoefficients1.f[1]); + vConstants = _mm_mul_ps(vConstants,vPower); + vResult = _mm_add_ps(vResult,vConstants); + + // V^13 + vPower = _mm_mul_ps(vPower,V2); + vConstants = _mm_load_ps1(&g_XMSinCoefficients1.f[2]); + vConstants = _mm_mul_ps(vConstants,vPower); + vResult = _mm_add_ps(vResult,vConstants); + + // V^15 + vPower = _mm_mul_ps(vPower,V2); + vConstants = _mm_load_ps1(&g_XMSinCoefficients1.f[3]); + vConstants = _mm_mul_ps(vConstants,vPower); + vResult = _mm_add_ps(vResult,vConstants); + + // V^17 + vPower = _mm_mul_ps(vPower,V2); + vConstants = _mm_load_ps1(&g_XMSinCoefficients2.f[0]); + vConstants = _mm_mul_ps(vConstants,vPower); + vResult = _mm_add_ps(vResult,vConstants); + + // V^19 + vPower = _mm_mul_ps(vPower,V2); + vConstants = _mm_load_ps1(&g_XMSinCoefficients2.f[1]); + vConstants = _mm_mul_ps(vConstants,vPower); + vResult = _mm_add_ps(vResult,vConstants); + + // V^21 + vPower = _mm_mul_ps(vPower,V2); + vConstants = _mm_load_ps1(&g_XMSinCoefficients2.f[2]); + vConstants = _mm_mul_ps(vConstants,vPower); + vResult = _mm_add_ps(vResult,vConstants); + + // V^23 + vPower = _mm_mul_ps(vPower,V2); + vConstants = _mm_load_ps1(&g_XMSinCoefficients2.f[3]); + vConstants = _mm_mul_ps(vConstants,vPower); + vResult = _mm_add_ps(vResult,vConstants); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMVECTOR XMVectorCos +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V1, V2, V4, V6, V8, V10, V12, V14, V16, V18, V20, V22; + XMVECTOR C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11; + XMVECTOR Result; + + V1 = XMVectorModAngles(V); + + // cos(V) ~= 1 - V^2 / 2! + V^4 / 4! - V^6 / 6! + V^8 / 8! - V^10 / 10! + V^12 / 12! - + // V^14 / 14! + V^16 / 16! - V^18 / 18! + V^20 / 20! - V^22 / 22! (for -PI <= V < PI) + V2 = XMVectorMultiply(V1, V1); + V4 = XMVectorMultiply(V2, V2); + V6 = XMVectorMultiply(V4, V2); + V8 = XMVectorMultiply(V4, V4); + V10 = XMVectorMultiply(V6, V4); + V12 = XMVectorMultiply(V6, V6); + V14 = XMVectorMultiply(V8, V6); + V16 = XMVectorMultiply(V8, V8); + V18 = XMVectorMultiply(V10, V8); + V20 = XMVectorMultiply(V10, V10); + V22 = XMVectorMultiply(V12, V10); + + C1 = XMVectorSplatY(g_XMCosCoefficients0.v); + C2 = XMVectorSplatZ(g_XMCosCoefficients0.v); + C3 = XMVectorSplatW(g_XMCosCoefficients0.v); + C4 = XMVectorSplatX(g_XMCosCoefficients1.v); + C5 = XMVectorSplatY(g_XMCosCoefficients1.v); + C6 = XMVectorSplatZ(g_XMCosCoefficients1.v); + C7 = XMVectorSplatW(g_XMCosCoefficients1.v); + C8 = XMVectorSplatX(g_XMCosCoefficients2.v); + C9 = XMVectorSplatY(g_XMCosCoefficients2.v); + C10 = XMVectorSplatZ(g_XMCosCoefficients2.v); + C11 = XMVectorSplatW(g_XMCosCoefficients2.v); + + Result = XMVectorMultiplyAdd(C1, V2, g_XMOne.v); + Result = XMVectorMultiplyAdd(C2, V4, Result); + Result = XMVectorMultiplyAdd(C3, V6, Result); + Result = XMVectorMultiplyAdd(C4, V8, Result); + Result = XMVectorMultiplyAdd(C5, V10, Result); + Result = XMVectorMultiplyAdd(C6, V12, Result); + Result = XMVectorMultiplyAdd(C7, V14, Result); + Result = XMVectorMultiplyAdd(C8, V16, Result); + Result = XMVectorMultiplyAdd(C9, V18, Result); + Result = XMVectorMultiplyAdd(C10, V20, Result); + Result = XMVectorMultiplyAdd(C11, V22, Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Force the value within the bounds of pi + XMVECTOR V2 = XMVectorModAngles(V); + // Each on is V to the "num" power + // V2 = V1^2 + V2 = _mm_mul_ps(V2,V2); + // V^2 + XMVECTOR vConstants = _mm_load_ps1(&g_XMCosCoefficients0.f[1]); + vConstants = _mm_mul_ps(vConstants,V2); + XMVECTOR vResult = _mm_add_ps(vConstants,g_XMOne); + + // V^4 + XMVECTOR vPower = _mm_mul_ps(V2,V2); + vConstants = _mm_load_ps1(&g_XMCosCoefficients0.f[2]); + vConstants = _mm_mul_ps(vConstants,vPower); + vResult = _mm_add_ps(vResult,vConstants); + + // V^6 + vPower = _mm_mul_ps(vPower,V2); + vConstants = _mm_load_ps1(&g_XMCosCoefficients0.f[3]); + vConstants = _mm_mul_ps(vConstants,vPower); + vResult = _mm_add_ps(vResult,vConstants); + + // V^8 + vPower = _mm_mul_ps(vPower,V2); + vConstants = _mm_load_ps1(&g_XMCosCoefficients1.f[0]); + vConstants = _mm_mul_ps(vConstants,vPower); + vResult = _mm_add_ps(vResult,vConstants); + + // V^10 + vPower = _mm_mul_ps(vPower,V2); + vConstants = _mm_load_ps1(&g_XMCosCoefficients1.f[1]); + vConstants = _mm_mul_ps(vConstants,vPower); + vResult = _mm_add_ps(vResult,vConstants); + + // V^12 + vPower = _mm_mul_ps(vPower,V2); + vConstants = _mm_load_ps1(&g_XMCosCoefficients1.f[2]); + vConstants = _mm_mul_ps(vConstants,vPower); + vResult = _mm_add_ps(vResult,vConstants); + + // V^14 + vPower = _mm_mul_ps(vPower,V2); + vConstants = _mm_load_ps1(&g_XMCosCoefficients1.f[3]); + vConstants = _mm_mul_ps(vConstants,vPower); + vResult = _mm_add_ps(vResult,vConstants); + + // V^16 + vPower = _mm_mul_ps(vPower,V2); + vConstants = _mm_load_ps1(&g_XMCosCoefficients2.f[0]); + vConstants = _mm_mul_ps(vConstants,vPower); + vResult = _mm_add_ps(vResult,vConstants); + + // V^18 + vPower = _mm_mul_ps(vPower,V2); + vConstants = _mm_load_ps1(&g_XMCosCoefficients2.f[1]); + vConstants = _mm_mul_ps(vConstants,vPower); + vResult = _mm_add_ps(vResult,vConstants); + + // V^20 + vPower = _mm_mul_ps(vPower,V2); + vConstants = _mm_load_ps1(&g_XMCosCoefficients2.f[2]); + vConstants = _mm_mul_ps(vConstants,vPower); + vResult = _mm_add_ps(vResult,vConstants); + + // V^22 + vPower = _mm_mul_ps(vPower,V2); + vConstants = _mm_load_ps1(&g_XMCosCoefficients2.f[3]); + vConstants = _mm_mul_ps(vConstants,vPower); + vResult = _mm_add_ps(vResult,vConstants); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE VOID XMVectorSinCos +( + XMVECTOR* pSin, + XMVECTOR* pCos, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13; + XMVECTOR V14, V15, V16, V17, V18, V19, V20, V21, V22, V23; + XMVECTOR S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11; + XMVECTOR C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11; + XMVECTOR Sin, Cos; + + XMASSERT(pSin); + XMASSERT(pCos); + + V1 = XMVectorModAngles(V); + + // sin(V) ~= V - V^3 / 3! + V^5 / 5! - V^7 / 7! + V^9 / 9! - V^11 / 11! + V^13 / 13! - + // V^15 / 15! + V^17 / 17! - V^19 / 19! + V^21 / 21! - V^23 / 23! (for -PI <= V < PI) + // cos(V) ~= 1 - V^2 / 2! + V^4 / 4! - V^6 / 6! + V^8 / 8! - V^10 / 10! + V^12 / 12! - + // V^14 / 14! + V^16 / 16! - V^18 / 18! + V^20 / 20! - V^22 / 22! (for -PI <= V < PI) + + V2 = XMVectorMultiply(V1, V1); + V3 = XMVectorMultiply(V2, V1); + V4 = XMVectorMultiply(V2, V2); + V5 = XMVectorMultiply(V3, V2); + V6 = XMVectorMultiply(V3, V3); + V7 = XMVectorMultiply(V4, V3); + V8 = XMVectorMultiply(V4, V4); + V9 = XMVectorMultiply(V5, V4); + V10 = XMVectorMultiply(V5, V5); + V11 = XMVectorMultiply(V6, V5); + V12 = XMVectorMultiply(V6, V6); + V13 = XMVectorMultiply(V7, V6); + V14 = XMVectorMultiply(V7, V7); + V15 = XMVectorMultiply(V8, V7); + V16 = XMVectorMultiply(V8, V8); + V17 = XMVectorMultiply(V9, V8); + V18 = XMVectorMultiply(V9, V9); + V19 = XMVectorMultiply(V10, V9); + V20 = XMVectorMultiply(V10, V10); + V21 = XMVectorMultiply(V11, V10); + V22 = XMVectorMultiply(V11, V11); + V23 = XMVectorMultiply(V12, V11); + + S1 = XMVectorSplatY(g_XMSinCoefficients0.v); + S2 = XMVectorSplatZ(g_XMSinCoefficients0.v); + S3 = XMVectorSplatW(g_XMSinCoefficients0.v); + S4 = XMVectorSplatX(g_XMSinCoefficients1.v); + S5 = XMVectorSplatY(g_XMSinCoefficients1.v); + S6 = XMVectorSplatZ(g_XMSinCoefficients1.v); + S7 = XMVectorSplatW(g_XMSinCoefficients1.v); + S8 = XMVectorSplatX(g_XMSinCoefficients2.v); + S9 = XMVectorSplatY(g_XMSinCoefficients2.v); + S10 = XMVectorSplatZ(g_XMSinCoefficients2.v); + S11 = XMVectorSplatW(g_XMSinCoefficients2.v); + + C1 = XMVectorSplatY(g_XMCosCoefficients0.v); + C2 = XMVectorSplatZ(g_XMCosCoefficients0.v); + C3 = XMVectorSplatW(g_XMCosCoefficients0.v); + C4 = XMVectorSplatX(g_XMCosCoefficients1.v); + C5 = XMVectorSplatY(g_XMCosCoefficients1.v); + C6 = XMVectorSplatZ(g_XMCosCoefficients1.v); + C7 = XMVectorSplatW(g_XMCosCoefficients1.v); + C8 = XMVectorSplatX(g_XMCosCoefficients2.v); + C9 = XMVectorSplatY(g_XMCosCoefficients2.v); + C10 = XMVectorSplatZ(g_XMCosCoefficients2.v); + C11 = XMVectorSplatW(g_XMCosCoefficients2.v); + + Sin = XMVectorMultiplyAdd(S1, V3, V1); + Sin = XMVectorMultiplyAdd(S2, V5, Sin); + Sin = XMVectorMultiplyAdd(S3, V7, Sin); + Sin = XMVectorMultiplyAdd(S4, V9, Sin); + Sin = XMVectorMultiplyAdd(S5, V11, Sin); + Sin = XMVectorMultiplyAdd(S6, V13, Sin); + Sin = XMVectorMultiplyAdd(S7, V15, Sin); + Sin = XMVectorMultiplyAdd(S8, V17, Sin); + Sin = XMVectorMultiplyAdd(S9, V19, Sin); + Sin = XMVectorMultiplyAdd(S10, V21, Sin); + Sin = XMVectorMultiplyAdd(S11, V23, Sin); + + Cos = XMVectorMultiplyAdd(C1, V2, g_XMOne.v); + Cos = XMVectorMultiplyAdd(C2, V4, Cos); + Cos = XMVectorMultiplyAdd(C3, V6, Cos); + Cos = XMVectorMultiplyAdd(C4, V8, Cos); + Cos = XMVectorMultiplyAdd(C5, V10, Cos); + Cos = XMVectorMultiplyAdd(C6, V12, Cos); + Cos = XMVectorMultiplyAdd(C7, V14, Cos); + Cos = XMVectorMultiplyAdd(C8, V16, Cos); + Cos = XMVectorMultiplyAdd(C9, V18, Cos); + Cos = XMVectorMultiplyAdd(C10, V20, Cos); + Cos = XMVectorMultiplyAdd(C11, V22, Cos); + + *pSin = Sin; + *pCos = Cos; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSin); + XMASSERT(pCos); + XMVECTOR V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13; + XMVECTOR V14, V15, V16, V17, V18, V19, V20, V21, V22, V23; + XMVECTOR S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11; + XMVECTOR C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11; + XMVECTOR Sin, Cos; + + V1 = XMVectorModAngles(V); + + // sin(V) ~= V - V^3 / 3! + V^5 / 5! - V^7 / 7! + V^9 / 9! - V^11 / 11! + V^13 / 13! - + // V^15 / 15! + V^17 / 17! - V^19 / 19! + V^21 / 21! - V^23 / 23! (for -PI <= V < PI) + // cos(V) ~= 1 - V^2 / 2! + V^4 / 4! - V^6 / 6! + V^8 / 8! - V^10 / 10! + V^12 / 12! - + // V^14 / 14! + V^16 / 16! - V^18 / 18! + V^20 / 20! - V^22 / 22! (for -PI <= V < PI) + + V2 = XMVectorMultiply(V1, V1); + V3 = XMVectorMultiply(V2, V1); + V4 = XMVectorMultiply(V2, V2); + V5 = XMVectorMultiply(V3, V2); + V6 = XMVectorMultiply(V3, V3); + V7 = XMVectorMultiply(V4, V3); + V8 = XMVectorMultiply(V4, V4); + V9 = XMVectorMultiply(V5, V4); + V10 = XMVectorMultiply(V5, V5); + V11 = XMVectorMultiply(V6, V5); + V12 = XMVectorMultiply(V6, V6); + V13 = XMVectorMultiply(V7, V6); + V14 = XMVectorMultiply(V7, V7); + V15 = XMVectorMultiply(V8, V7); + V16 = XMVectorMultiply(V8, V8); + V17 = XMVectorMultiply(V9, V8); + V18 = XMVectorMultiply(V9, V9); + V19 = XMVectorMultiply(V10, V9); + V20 = XMVectorMultiply(V10, V10); + V21 = XMVectorMultiply(V11, V10); + V22 = XMVectorMultiply(V11, V11); + V23 = XMVectorMultiply(V12, V11); + + S1 = _mm_load_ps1(&g_XMSinCoefficients0.f[1]); + S2 = _mm_load_ps1(&g_XMSinCoefficients0.f[2]); + S3 = _mm_load_ps1(&g_XMSinCoefficients0.f[3]); + S4 = _mm_load_ps1(&g_XMSinCoefficients1.f[0]); + S5 = _mm_load_ps1(&g_XMSinCoefficients1.f[1]); + S6 = _mm_load_ps1(&g_XMSinCoefficients1.f[2]); + S7 = _mm_load_ps1(&g_XMSinCoefficients1.f[3]); + S8 = _mm_load_ps1(&g_XMSinCoefficients2.f[0]); + S9 = _mm_load_ps1(&g_XMSinCoefficients2.f[1]); + S10 = _mm_load_ps1(&g_XMSinCoefficients2.f[2]); + S11 = _mm_load_ps1(&g_XMSinCoefficients2.f[3]); + + C1 = _mm_load_ps1(&g_XMCosCoefficients0.f[1]); + C2 = _mm_load_ps1(&g_XMCosCoefficients0.f[2]); + C3 = _mm_load_ps1(&g_XMCosCoefficients0.f[3]); + C4 = _mm_load_ps1(&g_XMCosCoefficients1.f[0]); + C5 = _mm_load_ps1(&g_XMCosCoefficients1.f[1]); + C6 = _mm_load_ps1(&g_XMCosCoefficients1.f[2]); + C7 = _mm_load_ps1(&g_XMCosCoefficients1.f[3]); + C8 = _mm_load_ps1(&g_XMCosCoefficients2.f[0]); + C9 = _mm_load_ps1(&g_XMCosCoefficients2.f[1]); + C10 = _mm_load_ps1(&g_XMCosCoefficients2.f[2]); + C11 = _mm_load_ps1(&g_XMCosCoefficients2.f[3]); + + S1 = _mm_mul_ps(S1,V3); + Sin = _mm_add_ps(S1,V1); + Sin = XMVectorMultiplyAdd(S2, V5, Sin); + Sin = XMVectorMultiplyAdd(S3, V7, Sin); + Sin = XMVectorMultiplyAdd(S4, V9, Sin); + Sin = XMVectorMultiplyAdd(S5, V11, Sin); + Sin = XMVectorMultiplyAdd(S6, V13, Sin); + Sin = XMVectorMultiplyAdd(S7, V15, Sin); + Sin = XMVectorMultiplyAdd(S8, V17, Sin); + Sin = XMVectorMultiplyAdd(S9, V19, Sin); + Sin = XMVectorMultiplyAdd(S10, V21, Sin); + Sin = XMVectorMultiplyAdd(S11, V23, Sin); + + Cos = _mm_mul_ps(C1,V2); + Cos = _mm_add_ps(Cos,g_XMOne); + Cos = XMVectorMultiplyAdd(C2, V4, Cos); + Cos = XMVectorMultiplyAdd(C3, V6, Cos); + Cos = XMVectorMultiplyAdd(C4, V8, Cos); + Cos = XMVectorMultiplyAdd(C5, V10, Cos); + Cos = XMVectorMultiplyAdd(C6, V12, Cos); + Cos = XMVectorMultiplyAdd(C7, V14, Cos); + Cos = XMVectorMultiplyAdd(C8, V16, Cos); + Cos = XMVectorMultiplyAdd(C9, V18, Cos); + Cos = XMVectorMultiplyAdd(C10, V20, Cos); + Cos = XMVectorMultiplyAdd(C11, V22, Cos); + + *pSin = Sin; + *pCos = Cos; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMVECTOR XMVectorTan +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + // Cody and Waite algorithm to compute tangent. + + XMVECTOR VA, VB, VC, VC2; + XMVECTOR T0, T1, T2, T3, T4, T5, T6, T7; + XMVECTOR C0, C1, TwoDivPi, Epsilon; + XMVECTOR N, D; + XMVECTOR R0, R1; + XMVECTOR VIsZero, VCNearZero, VBIsEven; + XMVECTOR Zero; + XMVECTOR Result; + UINT i; + static CONST XMVECTOR TanCoefficients0 = {1.0f, -4.667168334e-1f, 2.566383229e-2f, -3.118153191e-4f}; + static CONST XMVECTOR TanCoefficients1 = {4.981943399e-7f, -1.333835001e-1f, 3.424887824e-3f, -1.786170734e-5f}; + static CONST XMVECTOR TanConstants = {1.570796371f, 6.077100628e-11f, 0.000244140625f, 2.0f / XM_PI}; + static CONST XMVECTORU32 Mask = {0x1, 0x1, 0x1, 0x1}; + + TwoDivPi = XMVectorSplatW(TanConstants); + + Zero = XMVectorZero(); + + C0 = XMVectorSplatX(TanConstants); + C1 = XMVectorSplatY(TanConstants); + Epsilon = XMVectorSplatZ(TanConstants); + + VA = XMVectorMultiply(V, TwoDivPi); + + VA = XMVectorRound(VA); + + VC = XMVectorNegativeMultiplySubtract(VA, C0, V); + + VB = XMVectorAbs(VA); + + VC = XMVectorNegativeMultiplySubtract(VA, C1, VC); + + for (i = 0; i < 4; i++) + { + VB.vector4_u32[i] = (UINT)VB.vector4_f32[i]; + } + + VC2 = XMVectorMultiply(VC, VC); + + T7 = XMVectorSplatW(TanCoefficients1); + T6 = XMVectorSplatZ(TanCoefficients1); + T4 = XMVectorSplatX(TanCoefficients1); + T3 = XMVectorSplatW(TanCoefficients0); + T5 = XMVectorSplatY(TanCoefficients1); + T2 = XMVectorSplatZ(TanCoefficients0); + T1 = XMVectorSplatY(TanCoefficients0); + T0 = XMVectorSplatX(TanCoefficients0); + + VBIsEven = XMVectorAndInt(VB, Mask.v); + VBIsEven = XMVectorEqualInt(VBIsEven, Zero); + + N = XMVectorMultiplyAdd(VC2, T7, T6); + D = XMVectorMultiplyAdd(VC2, T4, T3); + N = XMVectorMultiplyAdd(VC2, N, T5); + D = XMVectorMultiplyAdd(VC2, D, T2); + N = XMVectorMultiply(VC2, N); + D = XMVectorMultiplyAdd(VC2, D, T1); + N = XMVectorMultiplyAdd(VC, N, VC); + VCNearZero = XMVectorInBounds(VC, Epsilon); + D = XMVectorMultiplyAdd(VC2, D, T0); + + N = XMVectorSelect(N, VC, VCNearZero); + D = XMVectorSelect(D, g_XMOne.v, VCNearZero); + + R0 = XMVectorNegate(N); + R1 = XMVectorReciprocal(D); + R0 = XMVectorReciprocal(R0); + R1 = XMVectorMultiply(N, R1); + R0 = XMVectorMultiply(D, R0); + + VIsZero = XMVectorEqual(V, Zero); + + Result = XMVectorSelect(R0, R1, VBIsEven); + + Result = XMVectorSelect(Result, Zero, VIsZero); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Cody and Waite algorithm to compute tangent. + + XMVECTOR VA, VB, VC, VC2; + XMVECTOR T0, T1, T2, T3, T4, T5, T6, T7; + XMVECTOR C0, C1, TwoDivPi, Epsilon; + XMVECTOR N, D; + XMVECTOR R0, R1; + XMVECTOR VIsZero, VCNearZero, VBIsEven; + XMVECTOR Zero; + XMVECTOR Result; + static CONST XMVECTORF32 TanCoefficients0 = {1.0f, -4.667168334e-1f, 2.566383229e-2f, -3.118153191e-4f}; + static CONST XMVECTORF32 TanCoefficients1 = {4.981943399e-7f, -1.333835001e-1f, 3.424887824e-3f, -1.786170734e-5f}; + static CONST XMVECTORF32 TanConstants = {1.570796371f, 6.077100628e-11f, 0.000244140625f, 2.0f / XM_PI}; + static CONST XMVECTORI32 Mask = {0x1, 0x1, 0x1, 0x1}; + + TwoDivPi = XMVectorSplatW(TanConstants); + + Zero = XMVectorZero(); + + C0 = XMVectorSplatX(TanConstants); + C1 = XMVectorSplatY(TanConstants); + Epsilon = XMVectorSplatZ(TanConstants); + + VA = XMVectorMultiply(V, TwoDivPi); + + VA = XMVectorRound(VA); + + VC = XMVectorNegativeMultiplySubtract(VA, C0, V); + + VB = XMVectorAbs(VA); + + VC = XMVectorNegativeMultiplySubtract(VA, C1, VC); + + reinterpret_cast<__m128i *>(&VB)[0] = _mm_cvttps_epi32(VB); + + VC2 = XMVectorMultiply(VC, VC); + + T7 = XMVectorSplatW(TanCoefficients1); + T6 = XMVectorSplatZ(TanCoefficients1); + T4 = XMVectorSplatX(TanCoefficients1); + T3 = XMVectorSplatW(TanCoefficients0); + T5 = XMVectorSplatY(TanCoefficients1); + T2 = XMVectorSplatZ(TanCoefficients0); + T1 = XMVectorSplatY(TanCoefficients0); + T0 = XMVectorSplatX(TanCoefficients0); + + VBIsEven = XMVectorAndInt(VB,Mask); + VBIsEven = XMVectorEqualInt(VBIsEven, Zero); + + N = XMVectorMultiplyAdd(VC2, T7, T6); + D = XMVectorMultiplyAdd(VC2, T4, T3); + N = XMVectorMultiplyAdd(VC2, N, T5); + D = XMVectorMultiplyAdd(VC2, D, T2); + N = XMVectorMultiply(VC2, N); + D = XMVectorMultiplyAdd(VC2, D, T1); + N = XMVectorMultiplyAdd(VC, N, VC); + VCNearZero = XMVectorInBounds(VC, Epsilon); + D = XMVectorMultiplyAdd(VC2, D, T0); + + N = XMVectorSelect(N, VC, VCNearZero); + D = XMVectorSelect(D, g_XMOne, VCNearZero); + R0 = XMVectorNegate(N); + R1 = _mm_div_ps(N,D); + R0 = _mm_div_ps(D,R0); + VIsZero = XMVectorEqual(V, Zero); + Result = XMVectorSelect(R0, R1, VBIsEven); + Result = XMVectorSelect(Result, Zero, VIsZero); + + return Result; + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMVECTOR XMVectorSinH +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V1, V2; + XMVECTOR E1, E2; + XMVECTOR Result; + static CONST XMVECTORF32 Scale = {1.442695040888963f, 1.442695040888963f, 1.442695040888963f, 1.442695040888963f}; // 1.0f / ln(2.0f) + + V1 = XMVectorMultiplyAdd(V, Scale.v, g_XMNegativeOne.v); + V2 = XMVectorNegativeMultiplySubtract(V, Scale.v, g_XMNegativeOne.v); + + E1 = XMVectorExp(V1); + E2 = XMVectorExp(V2); + + Result = XMVectorSubtract(E1, E2); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR V1, V2; + XMVECTOR E1, E2; + XMVECTOR Result; + static CONST XMVECTORF32 Scale = {1.442695040888963f, 1.442695040888963f, 1.442695040888963f, 1.442695040888963f}; // 1.0f / ln(2.0f) + + V1 = _mm_mul_ps(V, Scale); + V1 = _mm_add_ps(V1,g_XMNegativeOne); + V2 = _mm_mul_ps(V, Scale); + V2 = _mm_sub_ps(g_XMNegativeOne,V2); + E1 = XMVectorExp(V1); + E2 = XMVectorExp(V2); + + Result = _mm_sub_ps(E1, E2); + + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMVECTOR XMVectorCosH +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V1, V2; + XMVECTOR E1, E2; + XMVECTOR Result; + static CONST XMVECTOR Scale = {1.442695040888963f, 1.442695040888963f, 1.442695040888963f, 1.442695040888963f}; // 1.0f / ln(2.0f) + + V1 = XMVectorMultiplyAdd(V, Scale, g_XMNegativeOne.v); + V2 = XMVectorNegativeMultiplySubtract(V, Scale, g_XMNegativeOne.v); + + E1 = XMVectorExp(V1); + E2 = XMVectorExp(V2); + + Result = XMVectorAdd(E1, E2); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR V1, V2; + XMVECTOR E1, E2; + XMVECTOR Result; + static CONST XMVECTORF32 Scale = {1.442695040888963f, 1.442695040888963f, 1.442695040888963f, 1.442695040888963f}; // 1.0f / ln(2.0f) + + V1 = _mm_mul_ps(V,Scale); + V1 = _mm_add_ps(V1,g_XMNegativeOne); + V2 = _mm_mul_ps(V, Scale); + V2 = _mm_sub_ps(g_XMNegativeOne,V2); + E1 = XMVectorExp(V1); + E2 = XMVectorExp(V2); + Result = _mm_add_ps(E1, E2); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMVECTOR XMVectorTanH +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR E; + XMVECTOR Result; + static CONST XMVECTORF32 Scale = {2.8853900817779268f, 2.8853900817779268f, 2.8853900817779268f, 2.8853900817779268f}; // 2.0f / ln(2.0f) + + E = XMVectorMultiply(V, Scale.v); + E = XMVectorExp(E); + E = XMVectorMultiplyAdd(E, g_XMOneHalf.v, g_XMOneHalf.v); + E = XMVectorReciprocal(E); + + Result = XMVectorSubtract(g_XMOne.v, E); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + static CONST XMVECTORF32 Scale = {2.8853900817779268f, 2.8853900817779268f, 2.8853900817779268f, 2.8853900817779268f}; // 2.0f / ln(2.0f) + + XMVECTOR E = _mm_mul_ps(V, Scale); + E = XMVectorExp(E); + E = _mm_mul_ps(E,g_XMOneHalf); + E = _mm_add_ps(E,g_XMOneHalf); + E = XMVectorReciprocal(E); + E = _mm_sub_ps(g_XMOne, E); + return E; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMVECTOR XMVectorASin +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V2, V3, AbsV; + XMVECTOR C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11; + XMVECTOR R0, R1, R2, R3, R4; + XMVECTOR OneMinusAbsV; + XMVECTOR Rsq; + XMVECTOR Result; + static CONST XMVECTOR OnePlusEpsilon = {1.00000011921f, 1.00000011921f, 1.00000011921f, 1.00000011921f}; + + // asin(V) = V * (C0 + C1 * V + C2 * V^2 + C3 * V^3 + C4 * V^4 + C5 * V^5) + (1 - V) * rsq(1 - V) * + // V * (C6 + C7 * V + C8 * V^2 + C9 * V^3 + C10 * V^4 + C11 * V^5) + + AbsV = XMVectorAbs(V); + + V2 = XMVectorMultiply(V, V); + V3 = XMVectorMultiply(V2, AbsV); + + R4 = XMVectorNegativeMultiplySubtract(AbsV, V, V); + + OneMinusAbsV = XMVectorSubtract(OnePlusEpsilon, AbsV); + Rsq = XMVectorReciprocalSqrt(OneMinusAbsV); + + C0 = XMVectorSplatX(g_XMASinCoefficients0.v); + C1 = XMVectorSplatY(g_XMASinCoefficients0.v); + C2 = XMVectorSplatZ(g_XMASinCoefficients0.v); + C3 = XMVectorSplatW(g_XMASinCoefficients0.v); + + C4 = XMVectorSplatX(g_XMASinCoefficients1.v); + C5 = XMVectorSplatY(g_XMASinCoefficients1.v); + C6 = XMVectorSplatZ(g_XMASinCoefficients1.v); + C7 = XMVectorSplatW(g_XMASinCoefficients1.v); + + C8 = XMVectorSplatX(g_XMASinCoefficients2.v); + C9 = XMVectorSplatY(g_XMASinCoefficients2.v); + C10 = XMVectorSplatZ(g_XMASinCoefficients2.v); + C11 = XMVectorSplatW(g_XMASinCoefficients2.v); + + R0 = XMVectorMultiplyAdd(C3, AbsV, C7); + R1 = XMVectorMultiplyAdd(C1, AbsV, C5); + R2 = XMVectorMultiplyAdd(C2, AbsV, C6); + R3 = XMVectorMultiplyAdd(C0, AbsV, C4); + + R0 = XMVectorMultiplyAdd(R0, AbsV, C11); + R1 = XMVectorMultiplyAdd(R1, AbsV, C9); + R2 = XMVectorMultiplyAdd(R2, AbsV, C10); + R3 = XMVectorMultiplyAdd(R3, AbsV, C8); + + R0 = XMVectorMultiplyAdd(R2, V3, R0); + R1 = XMVectorMultiplyAdd(R3, V3, R1); + + R0 = XMVectorMultiply(V, R0); + R1 = XMVectorMultiply(R4, R1); + + Result = XMVectorMultiplyAdd(R1, Rsq, R0); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + static CONST XMVECTORF32 OnePlusEpsilon = {1.00000011921f, 1.00000011921f, 1.00000011921f, 1.00000011921f}; + + // asin(V) = V * (C0 + C1 * V + C2 * V^2 + C3 * V^3 + C4 * V^4 + C5 * V^5) + (1 - V) * rsq(1 - V) * + // V * (C6 + C7 * V + C8 * V^2 + C9 * V^3 + C10 * V^4 + C11 * V^5) + // Get abs(V) + XMVECTOR vAbsV = _mm_setzero_ps(); + vAbsV = _mm_sub_ps(vAbsV,V); + vAbsV = _mm_max_ps(vAbsV,V); + + XMVECTOR R0 = vAbsV; + XMVECTOR vConstants = _mm_load_ps1(&g_XMASinCoefficients0.f[3]); + R0 = _mm_mul_ps(R0,vConstants); + vConstants = _mm_load_ps1(&g_XMASinCoefficients1.f[3]); + R0 = _mm_add_ps(R0,vConstants); + + XMVECTOR R1 = vAbsV; + vConstants = _mm_load_ps1(&g_XMASinCoefficients0.f[1]); + R1 = _mm_mul_ps(R1,vConstants); + vConstants = _mm_load_ps1(&g_XMASinCoefficients1.f[1]); + R1 = _mm_add_ps(R1, vConstants); + + XMVECTOR R2 = vAbsV; + vConstants = _mm_load_ps1(&g_XMASinCoefficients0.f[2]); + R2 = _mm_mul_ps(R2,vConstants); + vConstants = _mm_load_ps1(&g_XMASinCoefficients1.f[2]); + R2 = _mm_add_ps(R2, vConstants); + + XMVECTOR R3 = vAbsV; + vConstants = _mm_load_ps1(&g_XMASinCoefficients0.f[0]); + R3 = _mm_mul_ps(R3,vConstants); + vConstants = _mm_load_ps1(&g_XMASinCoefficients1.f[0]); + R3 = _mm_add_ps(R3, vConstants); + + vConstants = _mm_load_ps1(&g_XMASinCoefficients2.f[3]); + R0 = _mm_mul_ps(R0,vAbsV); + R0 = _mm_add_ps(R0,vConstants); + + vConstants = _mm_load_ps1(&g_XMASinCoefficients2.f[1]); + R1 = _mm_mul_ps(R1,vAbsV); + R1 = _mm_add_ps(R1,vConstants); + + vConstants = _mm_load_ps1(&g_XMASinCoefficients2.f[2]); + R2 = _mm_mul_ps(R2,vAbsV); + R2 = _mm_add_ps(R2,vConstants); + + vConstants = _mm_load_ps1(&g_XMASinCoefficients2.f[0]); + R3 = _mm_mul_ps(R3,vAbsV); + R3 = _mm_add_ps(R3,vConstants); + + // V3 = V^3 + vConstants = _mm_mul_ps(V,V); + vConstants = _mm_mul_ps(vConstants, vAbsV); + // Mul by V^3 + R2 = _mm_mul_ps(R2,vConstants); + R3 = _mm_mul_ps(R3,vConstants); + // Merge the results + R0 = _mm_add_ps(R0,R2); + R1 = _mm_add_ps(R1,R3); + + R0 = _mm_mul_ps(R0,V); + // vConstants = V-(V^2 retaining sign) + vConstants = _mm_mul_ps(vAbsV, V); + vConstants = _mm_sub_ps(V,vConstants); + R1 = _mm_mul_ps(R1,vConstants); + vConstants = _mm_sub_ps(OnePlusEpsilon,vAbsV); + // Do NOT use rsqrt/mul. This needs the precision + vConstants = _mm_sqrt_ps(vConstants); + R1 = _mm_div_ps(R1,vConstants); + R0 = _mm_add_ps(R0,R1); + return R0; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMVECTOR XMVectorACos +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V2, V3, AbsV; + XMVECTOR C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11; + XMVECTOR R0, R1, R2, R3, R4; + XMVECTOR OneMinusAbsV; + XMVECTOR Rsq; + XMVECTOR Result; + static CONST XMVECTOR OnePlusEpsilon = {1.00000011921f, 1.00000011921f, 1.00000011921f, 1.00000011921f}; + + // acos(V) = PI / 2 - asin(V) + + AbsV = XMVectorAbs(V); + + V2 = XMVectorMultiply(V, V); + V3 = XMVectorMultiply(V2, AbsV); + + R4 = XMVectorNegativeMultiplySubtract(AbsV, V, V); + + OneMinusAbsV = XMVectorSubtract(OnePlusEpsilon, AbsV); + Rsq = XMVectorReciprocalSqrt(OneMinusAbsV); + + C0 = XMVectorSplatX(g_XMASinCoefficients0.v); + C1 = XMVectorSplatY(g_XMASinCoefficients0.v); + C2 = XMVectorSplatZ(g_XMASinCoefficients0.v); + C3 = XMVectorSplatW(g_XMASinCoefficients0.v); + + C4 = XMVectorSplatX(g_XMASinCoefficients1.v); + C5 = XMVectorSplatY(g_XMASinCoefficients1.v); + C6 = XMVectorSplatZ(g_XMASinCoefficients1.v); + C7 = XMVectorSplatW(g_XMASinCoefficients1.v); + + C8 = XMVectorSplatX(g_XMASinCoefficients2.v); + C9 = XMVectorSplatY(g_XMASinCoefficients2.v); + C10 = XMVectorSplatZ(g_XMASinCoefficients2.v); + C11 = XMVectorSplatW(g_XMASinCoefficients2.v); + + R0 = XMVectorMultiplyAdd(C3, AbsV, C7); + R1 = XMVectorMultiplyAdd(C1, AbsV, C5); + R2 = XMVectorMultiplyAdd(C2, AbsV, C6); + R3 = XMVectorMultiplyAdd(C0, AbsV, C4); + + R0 = XMVectorMultiplyAdd(R0, AbsV, C11); + R1 = XMVectorMultiplyAdd(R1, AbsV, C9); + R2 = XMVectorMultiplyAdd(R2, AbsV, C10); + R3 = XMVectorMultiplyAdd(R3, AbsV, C8); + + R0 = XMVectorMultiplyAdd(R2, V3, R0); + R1 = XMVectorMultiplyAdd(R3, V3, R1); + + R0 = XMVectorMultiply(V, R0); + R1 = XMVectorMultiply(R4, R1); + + Result = XMVectorMultiplyAdd(R1, Rsq, R0); + + Result = XMVectorSubtract(g_XMHalfPi.v, Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + static CONST XMVECTORF32 OnePlusEpsilon = {1.00000011921f, 1.00000011921f, 1.00000011921f, 1.00000011921f}; + // Uses only 6 registers for good code on x86 targets + // acos(V) = PI / 2 - asin(V) + // Get abs(V) + XMVECTOR vAbsV = _mm_setzero_ps(); + vAbsV = _mm_sub_ps(vAbsV,V); + vAbsV = _mm_max_ps(vAbsV,V); + // Perform the series in precision groups to + // retain precision across 20 bits. (3 bits of imprecision due to operations) + XMVECTOR R0 = vAbsV; + XMVECTOR vConstants = _mm_load_ps1(&g_XMASinCoefficients0.f[3]); + R0 = _mm_mul_ps(R0,vConstants); + vConstants = _mm_load_ps1(&g_XMASinCoefficients1.f[3]); + R0 = _mm_add_ps(R0,vConstants); + R0 = _mm_mul_ps(R0,vAbsV); + vConstants = _mm_load_ps1(&g_XMASinCoefficients2.f[3]); + R0 = _mm_add_ps(R0,vConstants); + + XMVECTOR R1 = vAbsV; + vConstants = _mm_load_ps1(&g_XMASinCoefficients0.f[1]); + R1 = _mm_mul_ps(R1,vConstants); + vConstants = _mm_load_ps1(&g_XMASinCoefficients1.f[1]); + R1 = _mm_add_ps(R1,vConstants); + R1 = _mm_mul_ps(R1, vAbsV); + vConstants = _mm_load_ps1(&g_XMASinCoefficients2.f[1]); + R1 = _mm_add_ps(R1,vConstants); + + XMVECTOR R2 = vAbsV; + vConstants = _mm_load_ps1(&g_XMASinCoefficients0.f[2]); + R2 = _mm_mul_ps(R2,vConstants); + vConstants = _mm_load_ps1(&g_XMASinCoefficients1.f[2]); + R2 = _mm_add_ps(R2,vConstants); + R2 = _mm_mul_ps(R2, vAbsV); + vConstants = _mm_load_ps1(&g_XMASinCoefficients2.f[2]); + R2 = _mm_add_ps(R2,vConstants); + + XMVECTOR R3 = vAbsV; + vConstants = _mm_load_ps1(&g_XMASinCoefficients0.f[0]); + R3 = _mm_mul_ps(R3,vConstants); + vConstants = _mm_load_ps1(&g_XMASinCoefficients1.f[0]); + R3 = _mm_add_ps(R3,vConstants); + R3 = _mm_mul_ps(R3, vAbsV); + vConstants = _mm_load_ps1(&g_XMASinCoefficients2.f[0]); + R3 = _mm_add_ps(R3,vConstants); + + // vConstants = V^3 + vConstants = _mm_mul_ps(V,V); + vConstants = _mm_mul_ps(vConstants,vAbsV); + R2 = _mm_mul_ps(R2,vConstants); + R3 = _mm_mul_ps(R3,vConstants); + // Add the pair of values together here to retain + // as much precision as possible + R0 = _mm_add_ps(R0,R2); + R1 = _mm_add_ps(R1,R3); + + R0 = _mm_mul_ps(R0,V); + // vConstants = V-(V*abs(V)) + vConstants = _mm_mul_ps(V,vAbsV); + vConstants = _mm_sub_ps(V,vConstants); + R1 = _mm_mul_ps(R1,vConstants); + // Episilon exists to allow 1.0 as an answer + vConstants = _mm_sub_ps(OnePlusEpsilon, vAbsV); + // Use sqrt instead of rsqrt for precision + vConstants = _mm_sqrt_ps(vConstants); + R1 = _mm_div_ps(R1,vConstants); + R1 = _mm_add_ps(R1,R0); + vConstants = _mm_sub_ps(g_XMHalfPi,R1); + return vConstants; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMVECTOR XMVectorATan +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + // Cody and Waite algorithm to compute inverse tangent. + + XMVECTOR N, D; + XMVECTOR VF, G, ReciprocalF, AbsF, FA, FB; + XMVECTOR Sqrt3, Sqrt3MinusOne, TwoMinusSqrt3; + XMVECTOR HalfPi, OneThirdPi, OneSixthPi, Epsilon, MinV, MaxV; + XMVECTOR Zero; + XMVECTOR NegativeHalfPi; + XMVECTOR Angle1, Angle2; + XMVECTOR F_GT_One, F_GT_TwoMinusSqrt3, AbsF_LT_Epsilon, V_LT_Zero, V_GT_MaxV, V_LT_MinV; + XMVECTOR NegativeResult, Result; + XMVECTOR P0, P1, P2, P3, Q0, Q1, Q2, Q3; + static CONST XMVECTOR ATanConstants0 = {-1.3688768894e+1f, -2.0505855195e+1f, -8.4946240351f, -8.3758299368e-1f}; + static CONST XMVECTOR ATanConstants1 = {4.1066306682e+1f, 8.6157349597e+1f, 5.9578436142e+1f, 1.5024001160e+1f}; + static CONST XMVECTOR ATanConstants2 = {1.732050808f, 7.320508076e-1f, 2.679491924e-1f, 0.000244140625f}; // + static CONST XMVECTOR ATanConstants3 = {XM_PIDIV2, XM_PI / 3.0f, XM_PI / 6.0f, 8.507059173e+37f}; // + + Zero = XMVectorZero(); + + P0 = XMVectorSplatX(ATanConstants0); + P1 = XMVectorSplatY(ATanConstants0); + P2 = XMVectorSplatZ(ATanConstants0); + P3 = XMVectorSplatW(ATanConstants0); + + Q0 = XMVectorSplatX(ATanConstants1); + Q1 = XMVectorSplatY(ATanConstants1); + Q2 = XMVectorSplatZ(ATanConstants1); + Q3 = XMVectorSplatW(ATanConstants1); + + Sqrt3 = XMVectorSplatX(ATanConstants2); + Sqrt3MinusOne = XMVectorSplatY(ATanConstants2); + TwoMinusSqrt3 = XMVectorSplatZ(ATanConstants2); + Epsilon = XMVectorSplatW(ATanConstants2); + + HalfPi = XMVectorSplatX(ATanConstants3); + OneThirdPi = XMVectorSplatY(ATanConstants3); + OneSixthPi = XMVectorSplatZ(ATanConstants3); + MaxV = XMVectorSplatW(ATanConstants3); + + VF = XMVectorAbs(V); + ReciprocalF = XMVectorReciprocal(VF); + + F_GT_One = XMVectorGreater(VF, g_XMOne.v); + + VF = XMVectorSelect(VF, ReciprocalF, F_GT_One); + Angle1 = XMVectorSelect(Zero, HalfPi, F_GT_One); + Angle2 = XMVectorSelect(OneSixthPi, OneThirdPi, F_GT_One); + + F_GT_TwoMinusSqrt3 = XMVectorGreater(VF, TwoMinusSqrt3); + + FA = XMVectorMultiplyAdd(Sqrt3MinusOne, VF, VF); + FA = XMVectorAdd(FA, g_XMNegativeOne.v); + FB = XMVectorAdd(VF, Sqrt3); + FB = XMVectorReciprocal(FB); + FA = XMVectorMultiply(FA, FB); + + VF = XMVectorSelect(VF, FA, F_GT_TwoMinusSqrt3); + Angle1 = XMVectorSelect(Angle1, Angle2, F_GT_TwoMinusSqrt3); + + AbsF = XMVectorAbs(VF); + AbsF_LT_Epsilon = XMVectorLess(AbsF, Epsilon); + + G = XMVectorMultiply(VF, VF); + + D = XMVectorAdd(G, Q3); + D = XMVectorMultiplyAdd(D, G, Q2); + D = XMVectorMultiplyAdd(D, G, Q1); + D = XMVectorMultiplyAdd(D, G, Q0); + D = XMVectorReciprocal(D); + + N = XMVectorMultiplyAdd(P3, G, P2); + N = XMVectorMultiplyAdd(N, G, P1); + N = XMVectorMultiplyAdd(N, G, P0); + N = XMVectorMultiply(N, G); + Result = XMVectorMultiply(N, D); + + Result = XMVectorMultiplyAdd(Result, VF, VF); + + Result = XMVectorSelect(Result, VF, AbsF_LT_Epsilon); + + NegativeResult = XMVectorNegate(Result); + Result = XMVectorSelect(Result, NegativeResult, F_GT_One); + + Result = XMVectorAdd(Result, Angle1); + + V_LT_Zero = XMVectorLess(V, Zero); + NegativeResult = XMVectorNegate(Result); + Result = XMVectorSelect(Result, NegativeResult, V_LT_Zero); + + MinV = XMVectorNegate(MaxV); + NegativeHalfPi = XMVectorNegate(HalfPi); + V_GT_MaxV = XMVectorGreater(V, MaxV); + V_LT_MinV = XMVectorLess(V, MinV); + Result = XMVectorSelect(Result, g_XMHalfPi.v, V_GT_MaxV); + Result = XMVectorSelect(Result, NegativeHalfPi, V_LT_MinV); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + static CONST XMVECTORF32 ATanConstants0 = {-1.3688768894e+1f, -2.0505855195e+1f, -8.4946240351f, -8.3758299368e-1f}; + static CONST XMVECTORF32 ATanConstants1 = {4.1066306682e+1f, 8.6157349597e+1f, 5.9578436142e+1f, 1.5024001160e+1f}; + static CONST XMVECTORF32 ATanConstants2 = {1.732050808f, 7.320508076e-1f, 2.679491924e-1f, 0.000244140625f}; // + static CONST XMVECTORF32 ATanConstants3 = {XM_PIDIV2, XM_PI / 3.0f, XM_PI / 6.0f, 8.507059173e+37f}; // + + XMVECTOR VF = XMVectorAbs(V); + XMVECTOR F_GT_One = _mm_cmpgt_ps(VF,g_XMOne); + XMVECTOR ReciprocalF = XMVectorReciprocal(VF); + VF = XMVectorSelect(VF, ReciprocalF, F_GT_One); + XMVECTOR Zero = XMVectorZero(); + XMVECTOR HalfPi = _mm_load_ps1(&ATanConstants3.f[0]); + XMVECTOR Angle1 = XMVectorSelect(Zero, HalfPi, F_GT_One); + // Pi/3 + XMVECTOR vConstants = _mm_load_ps1(&ATanConstants3.f[1]); + // Pi/6 + XMVECTOR Angle2 = _mm_load_ps1(&ATanConstants3.f[2]); + Angle2 = XMVectorSelect(Angle2, vConstants, F_GT_One); + + // 1-sqrt(3) + XMVECTOR FA = _mm_load_ps1(&ATanConstants2.f[1]); + FA = _mm_mul_ps(FA,VF); + FA = _mm_add_ps(FA,VF); + FA = _mm_add_ps(FA,g_XMNegativeOne); + // sqrt(3) + vConstants = _mm_load_ps1(&ATanConstants2.f[0]); + vConstants = _mm_add_ps(vConstants,VF); + FA = _mm_div_ps(FA,vConstants); + + // 2-sqrt(3) + vConstants = _mm_load_ps1(&ATanConstants2.f[2]); + // >2-sqrt(3)? + vConstants = _mm_cmpgt_ps(VF,vConstants); + VF = XMVectorSelect(VF, FA, vConstants); + Angle1 = XMVectorSelect(Angle1, Angle2, vConstants); + + XMVECTOR AbsF = XMVectorAbs(VF); + + XMVECTOR G = _mm_mul_ps(VF,VF); + XMVECTOR D = _mm_load_ps1(&ATanConstants1.f[3]); + D = _mm_add_ps(D,G); + D = _mm_mul_ps(D,G); + vConstants = _mm_load_ps1(&ATanConstants1.f[2]); + D = _mm_add_ps(D,vConstants); + D = _mm_mul_ps(D,G); + vConstants = _mm_load_ps1(&ATanConstants1.f[1]); + D = _mm_add_ps(D,vConstants); + D = _mm_mul_ps(D,G); + vConstants = _mm_load_ps1(&ATanConstants1.f[0]); + D = _mm_add_ps(D,vConstants); + + XMVECTOR N = _mm_load_ps1(&ATanConstants0.f[3]); + N = _mm_mul_ps(N,G); + vConstants = _mm_load_ps1(&ATanConstants0.f[2]); + N = _mm_add_ps(N,vConstants); + N = _mm_mul_ps(N,G); + vConstants = _mm_load_ps1(&ATanConstants0.f[1]); + N = _mm_add_ps(N,vConstants); + N = _mm_mul_ps(N,G); + vConstants = _mm_load_ps1(&ATanConstants0.f[0]); + N = _mm_add_ps(N,vConstants); + N = _mm_mul_ps(N,G); + XMVECTOR Result = _mm_div_ps(N,D); + + Result = _mm_mul_ps(Result,VF); + Result = _mm_add_ps(Result,VF); + // Epsilon + vConstants = _mm_load_ps1(&ATanConstants2.f[3]); + vConstants = _mm_cmpge_ps(vConstants,AbsF); + Result = XMVectorSelect(Result,VF,vConstants); + + XMVECTOR NegativeResult = _mm_mul_ps(Result,g_XMNegativeOne); + Result = XMVectorSelect(Result,NegativeResult,F_GT_One); + Result = _mm_add_ps(Result,Angle1); + + Zero = _mm_cmpge_ps(Zero,V); + NegativeResult = _mm_mul_ps(Result,g_XMNegativeOne); + Result = XMVectorSelect(Result,NegativeResult,Zero); + + XMVECTOR MaxV = _mm_load_ps1(&ATanConstants3.f[3]); + XMVECTOR MinV = _mm_mul_ps(MaxV,g_XMNegativeOne); + // Negate HalfPi + HalfPi = _mm_mul_ps(HalfPi,g_XMNegativeOne); + MaxV = _mm_cmple_ps(MaxV,V); + MinV = _mm_cmpge_ps(MinV,V); + Result = XMVectorSelect(Result,g_XMHalfPi,MaxV); + // HalfPi = -HalfPi + Result = XMVectorSelect(Result,HalfPi,MinV); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMVECTOR XMVectorATan2 +( + FXMVECTOR Y, + FXMVECTOR X +) +{ +#if defined(_XM_NO_INTRINSICS_) + + // Return the inverse tangent of Y / X in the range of -Pi to Pi with the following exceptions: + + // Y == 0 and X is Negative -> Pi with the sign of Y + // y == 0 and x is positive -> 0 with the sign of y + // Y != 0 and X == 0 -> Pi / 2 with the sign of Y + // Y != 0 and X is Negative -> atan(y/x) + (PI with the sign of Y) + // X == -Infinity and Finite Y -> Pi with the sign of Y + // X == +Infinity and Finite Y -> 0 with the sign of Y + // Y == Infinity and X is Finite -> Pi / 2 with the sign of Y + // Y == Infinity and X == -Infinity -> 3Pi / 4 with the sign of Y + // Y == Infinity and X == +Infinity -> Pi / 4 with the sign of Y + + XMVECTOR Reciprocal; + XMVECTOR V; + XMVECTOR YSign; + XMVECTOR Pi, PiOverTwo, PiOverFour, ThreePiOverFour; + XMVECTOR YEqualsZero, XEqualsZero, XIsPositive, YEqualsInfinity, XEqualsInfinity; + XMVECTOR ATanResultValid; + XMVECTOR R0, R1, R2, R3, R4, R5; + XMVECTOR Zero; + XMVECTOR Result; + static CONST XMVECTOR ATan2Constants = {XM_PI, XM_PIDIV2, XM_PIDIV4, XM_PI * 3.0f / 4.0f}; + + Zero = XMVectorZero(); + ATanResultValid = XMVectorTrueInt(); + + Pi = XMVectorSplatX(ATan2Constants); + PiOverTwo = XMVectorSplatY(ATan2Constants); + PiOverFour = XMVectorSplatZ(ATan2Constants); + ThreePiOverFour = XMVectorSplatW(ATan2Constants); + + YEqualsZero = XMVectorEqual(Y, Zero); + XEqualsZero = XMVectorEqual(X, Zero); + XIsPositive = XMVectorAndInt(X, g_XMNegativeZero.v); + XIsPositive = XMVectorEqualInt(XIsPositive, Zero); + YEqualsInfinity = XMVectorIsInfinite(Y); + XEqualsInfinity = XMVectorIsInfinite(X); + + YSign = XMVectorAndInt(Y, g_XMNegativeZero.v); + Pi = XMVectorOrInt(Pi, YSign); + PiOverTwo = XMVectorOrInt(PiOverTwo, YSign); + PiOverFour = XMVectorOrInt(PiOverFour, YSign); + ThreePiOverFour = XMVectorOrInt(ThreePiOverFour, YSign); + + R1 = XMVectorSelect(Pi, YSign, XIsPositive); + R2 = XMVectorSelect(ATanResultValid, PiOverTwo, XEqualsZero); + R3 = XMVectorSelect(R2, R1, YEqualsZero); + R4 = XMVectorSelect(ThreePiOverFour, PiOverFour, XIsPositive); + R5 = XMVectorSelect(PiOverTwo, R4, XEqualsInfinity); + Result = XMVectorSelect(R3, R5, YEqualsInfinity); + ATanResultValid = XMVectorEqualInt(Result, ATanResultValid); + + Reciprocal = XMVectorReciprocal(X); + V = XMVectorMultiply(Y, Reciprocal); + R0 = XMVectorATan(V); + + R1 = XMVectorSelect( Pi, Zero, XIsPositive ); + R2 = XMVectorAdd(R0, R1); + + Result = XMVectorSelect(Result, R2, ATanResultValid); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + static CONST XMVECTORF32 ATan2Constants = {XM_PI, XM_PIDIV2, XM_PIDIV4, XM_PI * 3.0f / 4.0f}; + + // Mask if Y>0 && Y!=INF + XMVECTOR YEqualsInfinity = XMVectorIsInfinite(Y); + // Get the sign of (Y&0x80000000) + XMVECTOR YSign = _mm_and_ps(Y, g_XMNegativeZero); + // Get the sign bits of X + XMVECTOR XIsPositive = _mm_and_ps(X,g_XMNegativeZero); + // Change them to masks + XIsPositive = XMVectorEqualInt(XIsPositive,g_XMZero); + // Get Pi + XMVECTOR Pi = _mm_load_ps1(&ATan2Constants.f[0]); + // Copy the sign of Y + Pi = _mm_or_ps(Pi,YSign); + XMVECTOR R1 = XMVectorSelect(Pi,YSign,XIsPositive); + // Mask for X==0 + XMVECTOR vConstants = _mm_cmpeq_ps(X,g_XMZero); + // Get Pi/2 with with sign of Y + XMVECTOR PiOverTwo = _mm_load_ps1(&ATan2Constants.f[1]); + PiOverTwo = _mm_or_ps(PiOverTwo,YSign); + XMVECTOR R2 = XMVectorSelect(g_XMNegOneMask,PiOverTwo,vConstants); + // Mask for Y==0 + vConstants = _mm_cmpeq_ps(Y,g_XMZero); + R2 = XMVectorSelect(R2,R1,vConstants); + // Get Pi/4 with sign of Y + XMVECTOR PiOverFour = _mm_load_ps1(&ATan2Constants.f[2]); + PiOverFour = _mm_or_ps(PiOverFour,YSign); + // Get (Pi*3)/4 with sign of Y + XMVECTOR ThreePiOverFour = _mm_load_ps1(&ATan2Constants.f[3]); + ThreePiOverFour = _mm_or_ps(ThreePiOverFour,YSign); + vConstants = XMVectorSelect(ThreePiOverFour, PiOverFour, XIsPositive); + XMVECTOR XEqualsInfinity = XMVectorIsInfinite(X); + vConstants = XMVectorSelect(PiOverTwo,vConstants,XEqualsInfinity); + + XMVECTOR vResult = XMVectorSelect(R2,vConstants,YEqualsInfinity); + vConstants = XMVectorSelect(R1,vResult,YEqualsInfinity); + // At this point, any entry that's zero will get the result + // from XMVectorATan(), otherwise, return the failsafe value + vResult = XMVectorSelect(vResult,vConstants,XEqualsInfinity); + // Any entries not 0xFFFFFFFF, are considered precalculated + XMVECTOR ATanResultValid = XMVectorEqualInt(vResult,g_XMNegOneMask); + // Let's do the ATan2 function + vConstants = _mm_div_ps(Y,X); + vConstants = XMVectorATan(vConstants); + // Discard entries that have been declared void + + XMVECTOR R3 = XMVectorSelect( Pi, g_XMZero, XIsPositive ); + vConstants = _mm_add_ps( vConstants, R3 ); + + vResult = XMVectorSelect(vResult,vConstants,ATanResultValid); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorSinEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V2, V3, V5, V7; + XMVECTOR S1, S2, S3; + XMVECTOR Result; + + // sin(V) ~= V - V^3 / 3! + V^5 / 5! - V^7 / 7! (for -PI <= V < PI) + V2 = XMVectorMultiply(V, V); + V3 = XMVectorMultiply(V2, V); + V5 = XMVectorMultiply(V3, V2); + V7 = XMVectorMultiply(V5, V2); + + S1 = XMVectorSplatY(g_XMSinEstCoefficients.v); + S2 = XMVectorSplatZ(g_XMSinEstCoefficients.v); + S3 = XMVectorSplatW(g_XMSinEstCoefficients.v); + + Result = XMVectorMultiplyAdd(S1, V3, V); + Result = XMVectorMultiplyAdd(S2, V5, Result); + Result = XMVectorMultiplyAdd(S3, V7, Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // sin(V) ~= V - V^3 / 3! + V^5 / 5! - V^7 / 7! (for -PI <= V < PI) + XMVECTOR V2 = _mm_mul_ps(V,V); + XMVECTOR V3 = _mm_mul_ps(V2,V); + XMVECTOR vResult = _mm_load_ps1(&g_XMSinEstCoefficients.f[1]); + vResult = _mm_mul_ps(vResult,V3); + vResult = _mm_add_ps(vResult,V); + XMVECTOR vConstants = _mm_load_ps1(&g_XMSinEstCoefficients.f[2]); + // V^5 + V3 = _mm_mul_ps(V3,V2); + vConstants = _mm_mul_ps(vConstants,V3); + vResult = _mm_add_ps(vResult,vConstants); + vConstants = _mm_load_ps1(&g_XMSinEstCoefficients.f[3]); + // V^7 + V3 = _mm_mul_ps(V3,V2); + vConstants = _mm_mul_ps(vConstants,V3); + vResult = _mm_add_ps(vResult,vConstants); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorCosEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V2, V4, V6; + XMVECTOR C0, C1, C2, C3; + XMVECTOR Result; + + V2 = XMVectorMultiply(V, V); + V4 = XMVectorMultiply(V2, V2); + V6 = XMVectorMultiply(V4, V2); + + C0 = XMVectorSplatX(g_XMCosEstCoefficients.v); + C1 = XMVectorSplatY(g_XMCosEstCoefficients.v); + C2 = XMVectorSplatZ(g_XMCosEstCoefficients.v); + C3 = XMVectorSplatW(g_XMCosEstCoefficients.v); + + Result = XMVectorMultiplyAdd(C1, V2, C0); + Result = XMVectorMultiplyAdd(C2, V4, Result); + Result = XMVectorMultiplyAdd(C3, V6, Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Get V^2 + XMVECTOR V2 = _mm_mul_ps(V,V); + XMVECTOR vResult = _mm_load_ps1(&g_XMCosEstCoefficients.f[1]); + vResult = _mm_mul_ps(vResult,V2); + XMVECTOR vConstants = _mm_load_ps1(&g_XMCosEstCoefficients.f[0]); + vResult = _mm_add_ps(vResult,vConstants); + vConstants = _mm_load_ps1(&g_XMCosEstCoefficients.f[2]); + // Get V^4 + XMVECTOR V4 = _mm_mul_ps(V2, V2); + vConstants = _mm_mul_ps(vConstants,V4); + vResult = _mm_add_ps(vResult,vConstants); + vConstants = _mm_load_ps1(&g_XMCosEstCoefficients.f[3]); + // It's really V^6 + V4 = _mm_mul_ps(V4,V2); + vConstants = _mm_mul_ps(vConstants,V4); + vResult = _mm_add_ps(vResult,vConstants); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMVectorSinCosEst +( + XMVECTOR* pSin, + XMVECTOR* pCos, + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V2, V3, V4, V5, V6, V7; + XMVECTOR S1, S2, S3; + XMVECTOR C0, C1, C2, C3; + XMVECTOR Sin, Cos; + + XMASSERT(pSin); + XMASSERT(pCos); + + // sin(V) ~= V - V^3 / 3! + V^5 / 5! - V^7 / 7! (for -PI <= V < PI) + // cos(V) ~= 1 - V^2 / 2! + V^4 / 4! - V^6 / 6! (for -PI <= V < PI) + V2 = XMVectorMultiply(V, V); + V3 = XMVectorMultiply(V2, V); + V4 = XMVectorMultiply(V2, V2); + V5 = XMVectorMultiply(V3, V2); + V6 = XMVectorMultiply(V3, V3); + V7 = XMVectorMultiply(V4, V3); + + S1 = XMVectorSplatY(g_XMSinEstCoefficients.v); + S2 = XMVectorSplatZ(g_XMSinEstCoefficients.v); + S3 = XMVectorSplatW(g_XMSinEstCoefficients.v); + + C0 = XMVectorSplatX(g_XMCosEstCoefficients.v); + C1 = XMVectorSplatY(g_XMCosEstCoefficients.v); + C2 = XMVectorSplatZ(g_XMCosEstCoefficients.v); + C3 = XMVectorSplatW(g_XMCosEstCoefficients.v); + + Sin = XMVectorMultiplyAdd(S1, V3, V); + Sin = XMVectorMultiplyAdd(S2, V5, Sin); + Sin = XMVectorMultiplyAdd(S3, V7, Sin); + + Cos = XMVectorMultiplyAdd(C1, V2, C0); + Cos = XMVectorMultiplyAdd(C2, V4, Cos); + Cos = XMVectorMultiplyAdd(C3, V6, Cos); + + *pSin = Sin; + *pCos = Cos; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pSin); + XMASSERT(pCos); + XMVECTOR V2, V3, V4, V5, V6, V7; + XMVECTOR S1, S2, S3; + XMVECTOR C0, C1, C2, C3; + XMVECTOR Sin, Cos; + + // sin(V) ~= V - V^3 / 3! + V^5 / 5! - V^7 / 7! (for -PI <= V < PI) + // cos(V) ~= 1 - V^2 / 2! + V^4 / 4! - V^6 / 6! (for -PI <= V < PI) + V2 = XMVectorMultiply(V, V); + V3 = XMVectorMultiply(V2, V); + V4 = XMVectorMultiply(V2, V2); + V5 = XMVectorMultiply(V3, V2); + V6 = XMVectorMultiply(V3, V3); + V7 = XMVectorMultiply(V4, V3); + + S1 = _mm_load_ps1(&g_XMSinEstCoefficients.f[1]); + S2 = _mm_load_ps1(&g_XMSinEstCoefficients.f[2]); + S3 = _mm_load_ps1(&g_XMSinEstCoefficients.f[3]); + + C0 = _mm_load_ps1(&g_XMCosEstCoefficients.f[0]); + C1 = _mm_load_ps1(&g_XMCosEstCoefficients.f[1]); + C2 = _mm_load_ps1(&g_XMCosEstCoefficients.f[2]); + C3 = _mm_load_ps1(&g_XMCosEstCoefficients.f[3]); + + Sin = XMVectorMultiplyAdd(S1, V3, V); + Sin = XMVectorMultiplyAdd(S2, V5, Sin); + Sin = XMVectorMultiplyAdd(S3, V7, Sin); + + Cos = XMVectorMultiplyAdd(C1, V2, C0); + Cos = XMVectorMultiplyAdd(C2, V4, Cos); + Cos = XMVectorMultiplyAdd(C3, V6, Cos); + + *pSin = Sin; + *pCos = Cos; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorTanEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V1, V2, V1T0, V1T1, V2T2; + XMVECTOR T0, T1, T2; + XMVECTOR N, D; + XMVECTOR OneOverPi; + XMVECTOR Result; + + OneOverPi = XMVectorSplatW(g_XMTanEstCoefficients.v); + + V1 = XMVectorMultiply(V, OneOverPi); + V1 = XMVectorRound(V1); + + V1 = XMVectorNegativeMultiplySubtract(g_XMPi.v, V1, V); + + T0 = XMVectorSplatX(g_XMTanEstCoefficients.v); + T1 = XMVectorSplatY(g_XMTanEstCoefficients.v); + T2 = XMVectorSplatZ(g_XMTanEstCoefficients.v); + + V2T2 = XMVectorNegativeMultiplySubtract(V1, V1, T2); + V2 = XMVectorMultiply(V1, V1); + V1T0 = XMVectorMultiply(V1, T0); + V1T1 = XMVectorMultiply(V1, T1); + + D = XMVectorReciprocalEst(V2T2); + N = XMVectorMultiplyAdd(V2, V1T1, V1T0); + + Result = XMVectorMultiply(N, D); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR V1, V2, V1T0, V1T1, V2T2; + XMVECTOR T0, T1, T2; + XMVECTOR N, D; + XMVECTOR OneOverPi; + XMVECTOR Result; + + OneOverPi = XMVectorSplatW(g_XMTanEstCoefficients); + + V1 = XMVectorMultiply(V, OneOverPi); + V1 = XMVectorRound(V1); + + V1 = XMVectorNegativeMultiplySubtract(g_XMPi, V1, V); + + T0 = XMVectorSplatX(g_XMTanEstCoefficients); + T1 = XMVectorSplatY(g_XMTanEstCoefficients); + T2 = XMVectorSplatZ(g_XMTanEstCoefficients); + + V2T2 = XMVectorNegativeMultiplySubtract(V1, V1, T2); + V2 = XMVectorMultiply(V1, V1); + V1T0 = XMVectorMultiply(V1, T0); + V1T1 = XMVectorMultiply(V1, T1); + + D = XMVectorReciprocalEst(V2T2); + N = XMVectorMultiplyAdd(V2, V1T1, V1T0); + + Result = XMVectorMultiply(N, D); + + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorSinHEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V1, V2; + XMVECTOR E1, E2; + XMVECTOR Result; + static CONST XMVECTORF32 Scale = {1.442695040888963f, 1.442695040888963f, 1.442695040888963f, 1.442695040888963f}; // 1.0f / ln(2.0f) + + V1 = XMVectorMultiplyAdd(V, Scale.v, g_XMNegativeOne.v); + V2 = XMVectorNegativeMultiplySubtract(V, Scale.v, g_XMNegativeOne.v); + + E1 = XMVectorExpEst(V1); + E2 = XMVectorExpEst(V2); + + Result = XMVectorSubtract(E1, E2); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR V1, V2; + XMVECTOR E1, E2; + XMVECTOR Result; + static CONST XMVECTORF32 Scale = {1.442695040888963f, 1.442695040888963f, 1.442695040888963f, 1.442695040888963f}; // 1.0f / ln(2.0f) + + V1 = _mm_mul_ps(V,Scale); + V1 = _mm_add_ps(V1,g_XMNegativeOne); + V2 = _mm_mul_ps(V,Scale); + V2 = _mm_sub_ps(g_XMNegativeOne,V2); + E1 = XMVectorExpEst(V1); + E2 = XMVectorExpEst(V2); + Result = _mm_sub_ps(E1, E2); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorCosHEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V1, V2; + XMVECTOR E1, E2; + XMVECTOR Result; + static CONST XMVECTOR Scale = {1.442695040888963f, 1.442695040888963f, 1.442695040888963f, 1.442695040888963f}; // 1.0f / ln(2.0f) + + V1 = XMVectorMultiplyAdd(V, Scale, g_XMNegativeOne.v); + V2 = XMVectorNegativeMultiplySubtract(V, Scale, g_XMNegativeOne.v); + + E1 = XMVectorExpEst(V1); + E2 = XMVectorExpEst(V2); + + Result = XMVectorAdd(E1, E2); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR V1, V2; + XMVECTOR E1, E2; + XMVECTOR Result; + static CONST XMVECTORF32 Scale = {1.442695040888963f, 1.442695040888963f, 1.442695040888963f, 1.442695040888963f}; // 1.0f / ln(2.0f) + + V1 = _mm_mul_ps(V,Scale); + V1 = _mm_add_ps(V1,g_XMNegativeOne); + V2 = _mm_mul_ps(V, Scale); + V2 = _mm_sub_ps(g_XMNegativeOne,V2); + E1 = XMVectorExpEst(V1); + E2 = XMVectorExpEst(V2); + Result = _mm_add_ps(E1, E2); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorTanHEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR E; + XMVECTOR Result; + static CONST XMVECTOR Scale = {2.8853900817779268f, 2.8853900817779268f, 2.8853900817779268f, 2.8853900817779268f}; // 2.0f / ln(2.0f) + + E = XMVectorMultiply(V, Scale); + E = XMVectorExpEst(E); + E = XMVectorMultiplyAdd(E, g_XMOneHalf.v, g_XMOneHalf.v); + E = XMVectorReciprocalEst(E); + + Result = XMVectorSubtract(g_XMOne.v, E); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + static CONST XMVECTORF32 Scale = {2.8853900817779268f, 2.8853900817779268f, 2.8853900817779268f, 2.8853900817779268f}; // 2.0f / ln(2.0f) + + XMVECTOR E = _mm_mul_ps(V, Scale); + E = XMVectorExpEst(E); + E = _mm_mul_ps(E,g_XMOneHalf); + E = _mm_add_ps(E,g_XMOneHalf); + E = XMVectorReciprocalEst(E); + E = _mm_sub_ps(g_XMOne, E); + return E; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorASinEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR AbsV, V2, VD, VC0, V2C3; + XMVECTOR C0, C1, C2, C3; + XMVECTOR D, Rsq, SqrtD; + XMVECTOR OnePlusEps; + XMVECTOR Result; + + AbsV = XMVectorAbs(V); + + OnePlusEps = XMVectorSplatX(g_XMASinEstConstants.v); + + C0 = XMVectorSplatX(g_XMASinEstCoefficients.v); + C1 = XMVectorSplatY(g_XMASinEstCoefficients.v); + C2 = XMVectorSplatZ(g_XMASinEstCoefficients.v); + C3 = XMVectorSplatW(g_XMASinEstCoefficients.v); + + D = XMVectorSubtract(OnePlusEps, AbsV); + + Rsq = XMVectorReciprocalSqrtEst(D); + SqrtD = XMVectorMultiply(D, Rsq); + + V2 = XMVectorMultiply(V, AbsV); + V2C3 = XMVectorMultiply(V2, C3); + VD = XMVectorMultiply(D, AbsV); + VC0 = XMVectorMultiply(V, C0); + + Result = XMVectorMultiply(V, C1); + Result = XMVectorMultiplyAdd(V2, C2, Result); + Result = XMVectorMultiplyAdd(V2C3, VD, Result); + Result = XMVectorMultiplyAdd(VC0, SqrtD, Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Get abs(V) + XMVECTOR vAbsV = _mm_setzero_ps(); + vAbsV = _mm_sub_ps(vAbsV,V); + vAbsV = _mm_max_ps(vAbsV,V); + + XMVECTOR D = _mm_load_ps1(&g_XMASinEstConstants.f[0]); + D = _mm_sub_ps(D,vAbsV); + // Since this is an estimate, rqsrt is okay + XMVECTOR vConstants = _mm_rsqrt_ps(D); + XMVECTOR SqrtD = _mm_mul_ps(D,vConstants); + // V2 = V^2 retaining sign + XMVECTOR V2 = _mm_mul_ps(V,vAbsV); + D = _mm_mul_ps(D,vAbsV); + + XMVECTOR vResult = _mm_load_ps1(&g_XMASinEstCoefficients.f[1]); + vResult = _mm_mul_ps(vResult,V); + vConstants = _mm_load_ps1(&g_XMASinEstCoefficients.f[2]); + vConstants = _mm_mul_ps(vConstants,V2); + vResult = _mm_add_ps(vResult,vConstants); + + vConstants = _mm_load_ps1(&g_XMASinEstCoefficients.f[3]); + vConstants = _mm_mul_ps(vConstants,V2); + vConstants = _mm_mul_ps(vConstants,D); + vResult = _mm_add_ps(vResult,vConstants); + + vConstants = _mm_load_ps1(&g_XMASinEstCoefficients.f[0]); + vConstants = _mm_mul_ps(vConstants,V); + vConstants = _mm_mul_ps(vConstants,SqrtD); + vResult = _mm_add_ps(vResult,vConstants); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorACosEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR AbsV, V2, VD, VC0, V2C3; + XMVECTOR C0, C1, C2, C3; + XMVECTOR D, Rsq, SqrtD; + XMVECTOR OnePlusEps, HalfPi; + XMVECTOR Result; + + // acos(V) = PI / 2 - asin(V) + + AbsV = XMVectorAbs(V); + + OnePlusEps = XMVectorSplatX(g_XMASinEstConstants.v); + HalfPi = XMVectorSplatY(g_XMASinEstConstants.v); + + C0 = XMVectorSplatX(g_XMASinEstCoefficients.v); + C1 = XMVectorSplatY(g_XMASinEstCoefficients.v); + C2 = XMVectorSplatZ(g_XMASinEstCoefficients.v); + C3 = XMVectorSplatW(g_XMASinEstCoefficients.v); + + D = XMVectorSubtract(OnePlusEps, AbsV); + + Rsq = XMVectorReciprocalSqrtEst(D); + SqrtD = XMVectorMultiply(D, Rsq); + + V2 = XMVectorMultiply(V, AbsV); + V2C3 = XMVectorMultiply(V2, C3); + VD = XMVectorMultiply(D, AbsV); + VC0 = XMVectorMultiply(V, C0); + + Result = XMVectorMultiply(V, C1); + Result = XMVectorMultiplyAdd(V2, C2, Result); + Result = XMVectorMultiplyAdd(V2C3, VD, Result); + Result = XMVectorMultiplyAdd(VC0, SqrtD, Result); + Result = XMVectorSubtract(HalfPi, Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // acos(V) = PI / 2 - asin(V) + // Get abs(V) + XMVECTOR vAbsV = _mm_setzero_ps(); + vAbsV = _mm_sub_ps(vAbsV,V); + vAbsV = _mm_max_ps(vAbsV,V); + // Calc D + XMVECTOR D = _mm_load_ps1(&g_XMASinEstConstants.f[0]); + D = _mm_sub_ps(D,vAbsV); + // SqrtD = sqrt(D-abs(V)) estimated + XMVECTOR vConstants = _mm_rsqrt_ps(D); + XMVECTOR SqrtD = _mm_mul_ps(D,vConstants); + // V2 = V^2 while retaining sign + XMVECTOR V2 = _mm_mul_ps(V, vAbsV); + // Drop vAbsV here. D = (Const-abs(V))*abs(V) + D = _mm_mul_ps(D, vAbsV); + + XMVECTOR vResult = _mm_load_ps1(&g_XMASinEstCoefficients.f[1]); + vResult = _mm_mul_ps(vResult,V); + vConstants = _mm_load_ps1(&g_XMASinEstCoefficients.f[2]); + vConstants = _mm_mul_ps(vConstants,V2); + vResult = _mm_add_ps(vResult,vConstants); + + vConstants = _mm_load_ps1(&g_XMASinEstCoefficients.f[3]); + vConstants = _mm_mul_ps(vConstants,V2); + vConstants = _mm_mul_ps(vConstants,D); + vResult = _mm_add_ps(vResult,vConstants); + + vConstants = _mm_load_ps1(&g_XMASinEstCoefficients.f[0]); + vConstants = _mm_mul_ps(vConstants,V); + vConstants = _mm_mul_ps(vConstants,SqrtD); + vResult = _mm_add_ps(vResult,vConstants); + + vConstants = _mm_load_ps1(&g_XMASinEstConstants.f[1]); + vResult = _mm_sub_ps(vConstants,vResult); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorATanEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR AbsV, V2S2, N, D; + XMVECTOR S0, S1, S2; + XMVECTOR HalfPi; + XMVECTOR Result; + + S0 = XMVectorSplatX(g_XMATanEstCoefficients.v); + S1 = XMVectorSplatY(g_XMATanEstCoefficients.v); + S2 = XMVectorSplatZ(g_XMATanEstCoefficients.v); + HalfPi = XMVectorSplatW(g_XMATanEstCoefficients.v); + + AbsV = XMVectorAbs(V); + + V2S2 = XMVectorMultiplyAdd(V, V, S2); + N = XMVectorMultiplyAdd(AbsV, HalfPi, S0); + D = XMVectorMultiplyAdd(AbsV, S1, V2S2); + N = XMVectorMultiply(N, V); + D = XMVectorReciprocalEst(D); + + Result = XMVectorMultiply(N, D); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Get abs(V) + XMVECTOR vAbsV = _mm_setzero_ps(); + vAbsV = _mm_sub_ps(vAbsV,V); + vAbsV = _mm_max_ps(vAbsV,V); + + XMVECTOR vResult = _mm_load_ps1(&g_XMATanEstCoefficients.f[3]); + vResult = _mm_mul_ps(vResult,vAbsV); + XMVECTOR vConstants = _mm_load_ps1(&g_XMATanEstCoefficients.f[0]); + vResult = _mm_add_ps(vResult,vConstants); + vResult = _mm_mul_ps(vResult,V); + + XMVECTOR D = _mm_mul_ps(V,V); + vConstants = _mm_load_ps1(&g_XMATanEstCoefficients.f[2]); + D = _mm_add_ps(D,vConstants); + vConstants = _mm_load_ps1(&g_XMATanEstCoefficients.f[1]); + vConstants = _mm_mul_ps(vConstants,vAbsV); + D = _mm_add_ps(D,vConstants); + vResult = _mm_div_ps(vResult,D); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorATan2Est +( + FXMVECTOR Y, + FXMVECTOR X +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Reciprocal; + XMVECTOR V; + XMVECTOR YSign; + XMVECTOR Pi, PiOverTwo, PiOverFour, ThreePiOverFour; + XMVECTOR YEqualsZero, XEqualsZero, XIsPositive, YEqualsInfinity, XEqualsInfinity; + XMVECTOR ATanResultValid; + XMVECTOR R0, R1, R2, R3, R4, R5; + XMVECTOR Zero; + XMVECTOR Result; + static CONST XMVECTOR ATan2Constants = {XM_PI, XM_PIDIV2, XM_PIDIV4, XM_PI * 3.0f / 4.0f}; + + Zero = XMVectorZero(); + ATanResultValid = XMVectorTrueInt(); + + Pi = XMVectorSplatX(ATan2Constants); + PiOverTwo = XMVectorSplatY(ATan2Constants); + PiOverFour = XMVectorSplatZ(ATan2Constants); + ThreePiOverFour = XMVectorSplatW(ATan2Constants); + + YEqualsZero = XMVectorEqual(Y, Zero); + XEqualsZero = XMVectorEqual(X, Zero); + XIsPositive = XMVectorAndInt(X, g_XMNegativeZero.v); + XIsPositive = XMVectorEqualInt(XIsPositive, Zero); + YEqualsInfinity = XMVectorIsInfinite(Y); + XEqualsInfinity = XMVectorIsInfinite(X); + + YSign = XMVectorAndInt(Y, g_XMNegativeZero.v); + Pi = XMVectorOrInt(Pi, YSign); + PiOverTwo = XMVectorOrInt(PiOverTwo, YSign); + PiOverFour = XMVectorOrInt(PiOverFour, YSign); + ThreePiOverFour = XMVectorOrInt(ThreePiOverFour, YSign); + + R1 = XMVectorSelect(Pi, YSign, XIsPositive); + R2 = XMVectorSelect(ATanResultValid, PiOverTwo, XEqualsZero); + R3 = XMVectorSelect(R2, R1, YEqualsZero); + R4 = XMVectorSelect(ThreePiOverFour, PiOverFour, XIsPositive); + R5 = XMVectorSelect(PiOverTwo, R4, XEqualsInfinity); + Result = XMVectorSelect(R3, R5, YEqualsInfinity); + ATanResultValid = XMVectorEqualInt(Result, ATanResultValid); + + Reciprocal = XMVectorReciprocalEst(X); + V = XMVectorMultiply(Y, Reciprocal); + R0 = XMVectorATanEst(V); + + R1 = XMVectorSelect( Pi, Zero, XIsPositive ); + R2 = XMVectorAdd(R0, R1); + + Result = XMVectorSelect(Result, R2, ATanResultValid); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + static CONST XMVECTORF32 ATan2Constants = {XM_PI, XM_PIDIV2, XM_PIDIV4, XM_PI * 3.0f / 4.0f}; + + // Mask if Y>0 && Y!=INF + XMVECTOR YEqualsInfinity = XMVectorIsInfinite(Y); + // Get the sign of (Y&0x80000000) + XMVECTOR YSign = _mm_and_ps(Y, g_XMNegativeZero); + // Get the sign bits of X + XMVECTOR XIsPositive = _mm_and_ps(X,g_XMNegativeZero); + // Change them to masks + XIsPositive = XMVectorEqualInt(XIsPositive,g_XMZero); + // Get Pi + XMVECTOR Pi = _mm_load_ps1(&ATan2Constants.f[0]); + // Copy the sign of Y + Pi = _mm_or_ps(Pi,YSign); + XMVECTOR R1 = XMVectorSelect(Pi,YSign,XIsPositive); + // Mask for X==0 + XMVECTOR vConstants = _mm_cmpeq_ps(X,g_XMZero); + // Get Pi/2 with with sign of Y + XMVECTOR PiOverTwo = _mm_load_ps1(&ATan2Constants.f[1]); + PiOverTwo = _mm_or_ps(PiOverTwo,YSign); + XMVECTOR R2 = XMVectorSelect(g_XMNegOneMask,PiOverTwo,vConstants); + // Mask for Y==0 + vConstants = _mm_cmpeq_ps(Y,g_XMZero); + R2 = XMVectorSelect(R2,R1,vConstants); + // Get Pi/4 with sign of Y + XMVECTOR PiOverFour = _mm_load_ps1(&ATan2Constants.f[2]); + PiOverFour = _mm_or_ps(PiOverFour,YSign); + // Get (Pi*3)/4 with sign of Y + XMVECTOR ThreePiOverFour = _mm_load_ps1(&ATan2Constants.f[3]); + ThreePiOverFour = _mm_or_ps(ThreePiOverFour,YSign); + vConstants = XMVectorSelect(ThreePiOverFour, PiOverFour, XIsPositive); + XMVECTOR XEqualsInfinity = XMVectorIsInfinite(X); + vConstants = XMVectorSelect(PiOverTwo,vConstants,XEqualsInfinity); + + XMVECTOR vResult = XMVectorSelect(R2,vConstants,YEqualsInfinity); + vConstants = XMVectorSelect(R1,vResult,YEqualsInfinity); + // At this point, any entry that's zero will get the result + // from XMVectorATan(), otherwise, return the failsafe value + vResult = XMVectorSelect(vResult,vConstants,XEqualsInfinity); + // Any entries not 0xFFFFFFFF, are considered precalculated + XMVECTOR ATanResultValid = XMVectorEqualInt(vResult,g_XMNegOneMask); + // Let's do the ATan2 function + XMVECTOR Reciprocal = _mm_rcp_ps(X); + vConstants = _mm_mul_ps(Y, Reciprocal); + vConstants = XMVectorATanEst(vConstants); + // Discard entries that have been declared void + + XMVECTOR R3 = XMVectorSelect( Pi, g_XMZero, XIsPositive ); + vConstants = _mm_add_ps( vConstants, R3 ); + + vResult = XMVectorSelect(vResult,vConstants,ATanResultValid); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorLerp +( + FXMVECTOR V0, + FXMVECTOR V1, + FLOAT t +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Scale; + XMVECTOR Length; + XMVECTOR Result; + + // V0 + t * (V1 - V0) + Scale = XMVectorReplicate(t); + Length = XMVectorSubtract(V1, V0); + Result = XMVectorMultiplyAdd(Length, Scale, V0); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR L, S; + XMVECTOR Result; + + L = _mm_sub_ps( V1, V0 ); + + S = _mm_set_ps1( t ); + + Result = _mm_mul_ps( L, S ); + + return _mm_add_ps( Result, V0 ); +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorLerpV +( + FXMVECTOR V0, + FXMVECTOR V1, + FXMVECTOR T +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Length; + XMVECTOR Result; + + // V0 + T * (V1 - V0) + Length = XMVectorSubtract(V1, V0); + Result = XMVectorMultiplyAdd(Length, T, V0); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR Length; + XMVECTOR Result; + + Length = _mm_sub_ps( V1, V0 ); + + Result = _mm_mul_ps( Length, T ); + + return _mm_add_ps( Result, V0 ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorHermite +( + FXMVECTOR Position0, + FXMVECTOR Tangent0, + FXMVECTOR Position1, + CXMVECTOR Tangent1, + FLOAT t +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR P0; + XMVECTOR T0; + XMVECTOR P1; + XMVECTOR T1; + XMVECTOR Result; + FLOAT t2; + FLOAT t3; + + // Result = (2 * t^3 - 3 * t^2 + 1) * Position0 + + // (t^3 - 2 * t^2 + t) * Tangent0 + + // (-2 * t^3 + 3 * t^2) * Position1 + + // (t^3 - t^2) * Tangent1 + t2 = t * t; + t3 = t * t2; + + P0 = XMVectorReplicate(2.0f * t3 - 3.0f * t2 + 1.0f); + T0 = XMVectorReplicate(t3 - 2.0f * t2 + t); + P1 = XMVectorReplicate(-2.0f * t3 + 3.0f * t2); + T1 = XMVectorReplicate(t3 - t2); + + Result = XMVectorMultiply(P0, Position0); + Result = XMVectorMultiplyAdd(T0, Tangent0, Result); + Result = XMVectorMultiplyAdd(P1, Position1, Result); + Result = XMVectorMultiplyAdd(T1, Tangent1, Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + FLOAT t2 = t * t; + FLOAT t3 = t * t2; + + XMVECTOR P0 = _mm_set_ps1(2.0f * t3 - 3.0f * t2 + 1.0f); + XMVECTOR T0 = _mm_set_ps1(t3 - 2.0f * t2 + t); + XMVECTOR P1 = _mm_set_ps1(-2.0f * t3 + 3.0f * t2); + XMVECTOR T1 = _mm_set_ps1(t3 - t2); + + XMVECTOR vResult = _mm_mul_ps(P0, Position0); + XMVECTOR vTemp = _mm_mul_ps(T0, Tangent0); + vResult = _mm_add_ps(vResult,vTemp); + vTemp = _mm_mul_ps(P1, Position1); + vResult = _mm_add_ps(vResult,vTemp); + vTemp = _mm_mul_ps(T1, Tangent1); + vResult = _mm_add_ps(vResult,vTemp); + return vResult; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorHermiteV +( + FXMVECTOR Position0, + FXMVECTOR Tangent0, + FXMVECTOR Position1, + CXMVECTOR Tangent1, + CXMVECTOR T +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR P0; + XMVECTOR T0; + XMVECTOR P1; + XMVECTOR T1; + XMVECTOR Result; + XMVECTOR T2; + XMVECTOR T3; + + // Result = (2 * t^3 - 3 * t^2 + 1) * Position0 + + // (t^3 - 2 * t^2 + t) * Tangent0 + + // (-2 * t^3 + 3 * t^2) * Position1 + + // (t^3 - t^2) * Tangent1 + T2 = XMVectorMultiply(T, T); + T3 = XMVectorMultiply(T , T2); + + P0 = XMVectorReplicate(2.0f * T3.vector4_f32[0] - 3.0f * T2.vector4_f32[0] + 1.0f); + T0 = XMVectorReplicate(T3.vector4_f32[1] - 2.0f * T2.vector4_f32[1] + T.vector4_f32[1]); + P1 = XMVectorReplicate(-2.0f * T3.vector4_f32[2] + 3.0f * T2.vector4_f32[2]); + T1 = XMVectorReplicate(T3.vector4_f32[3] - T2.vector4_f32[3]); + + Result = XMVectorMultiply(P0, Position0); + Result = XMVectorMultiplyAdd(T0, Tangent0, Result); + Result = XMVectorMultiplyAdd(P1, Position1, Result); + Result = XMVectorMultiplyAdd(T1, Tangent1, Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + static const XMVECTORF32 CatMulT2 = {-3.0f,-2.0f,3.0f,-1.0f}; + static const XMVECTORF32 CatMulT3 = {2.0f,1.0f,-2.0f,1.0f}; + + // Result = (2 * t^3 - 3 * t^2 + 1) * Position0 + + // (t^3 - 2 * t^2 + t) * Tangent0 + + // (-2 * t^3 + 3 * t^2) * Position1 + + // (t^3 - t^2) * Tangent1 + XMVECTOR T2 = _mm_mul_ps(T,T); + XMVECTOR T3 = _mm_mul_ps(T,T2); + // Mul by the constants against t^2 + T2 = _mm_mul_ps(T2,CatMulT2); + // Mul by the constants against t^3 + T3 = _mm_mul_ps(T3,CatMulT3); + // T3 now has the pre-result. + T3 = _mm_add_ps(T3,T2); + // I need to add t.y only + T2 = _mm_and_ps(T,g_XMMaskY); + T3 = _mm_add_ps(T3,T2); + // Add 1.0f to x + T3 = _mm_add_ps(T3,g_XMIdentityR0); + // Now, I have the constants created + // Mul the x constant to Position0 + XMVECTOR vResult = _mm_shuffle_ps(T3,T3,_MM_SHUFFLE(0,0,0,0)); + vResult = _mm_mul_ps(vResult,Position0); + // Mul the y constant to Tangent0 + T2 = _mm_shuffle_ps(T3,T3,_MM_SHUFFLE(1,1,1,1)); + T2 = _mm_mul_ps(T2,Tangent0); + vResult = _mm_add_ps(vResult,T2); + // Mul the z constant to Position1 + T2 = _mm_shuffle_ps(T3,T3,_MM_SHUFFLE(2,2,2,2)); + T2 = _mm_mul_ps(T2,Position1); + vResult = _mm_add_ps(vResult,T2); + // Mul the w constant to Tangent1 + T3 = _mm_shuffle_ps(T3,T3,_MM_SHUFFLE(3,3,3,3)); + T3 = _mm_mul_ps(T3,Tangent1); + vResult = _mm_add_ps(vResult,T3); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorCatmullRom +( + FXMVECTOR Position0, + FXMVECTOR Position1, + FXMVECTOR Position2, + CXMVECTOR Position3, + FLOAT t +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR P0; + XMVECTOR P1; + XMVECTOR P2; + XMVECTOR P3; + XMVECTOR Result; + FLOAT t2; + FLOAT t3; + + // Result = ((-t^3 + 2 * t^2 - t) * Position0 + + // (3 * t^3 - 5 * t^2 + 2) * Position1 + + // (-3 * t^3 + 4 * t^2 + t) * Position2 + + // (t^3 - t^2) * Position3) * 0.5 + t2 = t * t; + t3 = t * t2; + + P0 = XMVectorReplicate((-t3 + 2.0f * t2 - t) * 0.5f); + P1 = XMVectorReplicate((3.0f * t3 - 5.0f * t2 + 2.0f) * 0.5f); + P2 = XMVectorReplicate((-3.0f * t3 + 4.0f * t2 + t) * 0.5f); + P3 = XMVectorReplicate((t3 - t2) * 0.5f); + + Result = XMVectorMultiply(P0, Position0); + Result = XMVectorMultiplyAdd(P1, Position1, Result); + Result = XMVectorMultiplyAdd(P2, Position2, Result); + Result = XMVectorMultiplyAdd(P3, Position3, Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + FLOAT t2 = t * t; + FLOAT t3 = t * t2; + + XMVECTOR P0 = _mm_set_ps1((-t3 + 2.0f * t2 - t) * 0.5f); + XMVECTOR P1 = _mm_set_ps1((3.0f * t3 - 5.0f * t2 + 2.0f) * 0.5f); + XMVECTOR P2 = _mm_set_ps1((-3.0f * t3 + 4.0f * t2 + t) * 0.5f); + XMVECTOR P3 = _mm_set_ps1((t3 - t2) * 0.5f); + + P0 = _mm_mul_ps(P0, Position0); + P1 = _mm_mul_ps(P1, Position1); + P2 = _mm_mul_ps(P2, Position2); + P3 = _mm_mul_ps(P3, Position3); + P0 = _mm_add_ps(P0,P1); + P2 = _mm_add_ps(P2,P3); + P0 = _mm_add_ps(P0,P2); + return P0; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorCatmullRomV +( + FXMVECTOR Position0, + FXMVECTOR Position1, + FXMVECTOR Position2, + CXMVECTOR Position3, + CXMVECTOR T +) +{ +#if defined(_XM_NO_INTRINSICS_) + float fx = T.vector4_f32[0]; + float fy = T.vector4_f32[1]; + float fz = T.vector4_f32[2]; + float fw = T.vector4_f32[3]; + XMVECTOR vResult = { + 0.5f*((-fx*fx*fx+2*fx*fx-fx)*Position0.vector4_f32[0]+ + (3*fx*fx*fx-5*fx*fx+2)*Position1.vector4_f32[0]+ + (-3*fx*fx*fx+4*fx*fx+fx)*Position2.vector4_f32[0]+ + (fx*fx*fx-fx*fx)*Position3.vector4_f32[0]), + 0.5f*((-fy*fy*fy+2*fy*fy-fy)*Position0.vector4_f32[1]+ + (3*fy*fy*fy-5*fy*fy+2)*Position1.vector4_f32[1]+ + (-3*fy*fy*fy+4*fy*fy+fy)*Position2.vector4_f32[1]+ + (fy*fy*fy-fy*fy)*Position3.vector4_f32[1]), + 0.5f*((-fz*fz*fz+2*fz*fz-fz)*Position0.vector4_f32[2]+ + (3*fz*fz*fz-5*fz*fz+2)*Position1.vector4_f32[2]+ + (-3*fz*fz*fz+4*fz*fz+fz)*Position2.vector4_f32[2]+ + (fz*fz*fz-fz*fz)*Position3.vector4_f32[2]), + 0.5f*((-fw*fw*fw+2*fw*fw-fw)*Position0.vector4_f32[3]+ + (3*fw*fw*fw-5*fw*fw+2)*Position1.vector4_f32[3]+ + (-3*fw*fw*fw+4*fw*fw+fw)*Position2.vector4_f32[3]+ + (fw*fw*fw-fw*fw)*Position3.vector4_f32[3]) + }; + return vResult; +#elif defined(_XM_SSE_INTRINSICS_) + static const XMVECTORF32 Catmul2 = {2.0f,2.0f,2.0f,2.0f}; + static const XMVECTORF32 Catmul3 = {3.0f,3.0f,3.0f,3.0f}; + static const XMVECTORF32 Catmul4 = {4.0f,4.0f,4.0f,4.0f}; + static const XMVECTORF32 Catmul5 = {5.0f,5.0f,5.0f,5.0f}; + // Cache T^2 and T^3 + XMVECTOR T2 = _mm_mul_ps(T,T); + XMVECTOR T3 = _mm_mul_ps(T,T2); + // Perform the Position0 term + XMVECTOR vResult = _mm_add_ps(T2,T2); + vResult = _mm_sub_ps(vResult,T); + vResult = _mm_sub_ps(vResult,T3); + vResult = _mm_mul_ps(vResult,Position0); + // Perform the Position1 term and add + XMVECTOR vTemp = _mm_mul_ps(T3,Catmul3); + XMVECTOR vTemp2 = _mm_mul_ps(T2,Catmul5); + vTemp = _mm_sub_ps(vTemp,vTemp2); + vTemp = _mm_add_ps(vTemp,Catmul2); + vTemp = _mm_mul_ps(vTemp,Position1); + vResult = _mm_add_ps(vResult,vTemp); + // Perform the Position2 term and add + vTemp = _mm_mul_ps(T2,Catmul4); + vTemp2 = _mm_mul_ps(T3,Catmul3); + vTemp = _mm_sub_ps(vTemp,vTemp2); + vTemp = _mm_add_ps(vTemp,T); + vTemp = _mm_mul_ps(vTemp,Position2); + vResult = _mm_add_ps(vResult,vTemp); + // Position3 is the last term + T3 = _mm_sub_ps(T3,T2); + T3 = _mm_mul_ps(T3,Position3); + vResult = _mm_add_ps(vResult,T3); + // Multiply by 0.5f and exit + vResult = _mm_mul_ps(vResult,g_XMOneHalf); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorBaryCentric +( + FXMVECTOR Position0, + FXMVECTOR Position1, + FXMVECTOR Position2, + FLOAT f, + FLOAT g +) +{ +#if defined(_XM_NO_INTRINSICS_) + + // Result = Position0 + f * (Position1 - Position0) + g * (Position2 - Position0) + XMVECTOR P10; + XMVECTOR P20; + XMVECTOR ScaleF; + XMVECTOR ScaleG; + XMVECTOR Result; + + P10 = XMVectorSubtract(Position1, Position0); + ScaleF = XMVectorReplicate(f); + + P20 = XMVectorSubtract(Position2, Position0); + ScaleG = XMVectorReplicate(g); + + Result = XMVectorMultiplyAdd(P10, ScaleF, Position0); + Result = XMVectorMultiplyAdd(P20, ScaleG, Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR R1 = _mm_sub_ps(Position1,Position0); + XMVECTOR SF = _mm_set_ps1(f); + XMVECTOR R2 = _mm_sub_ps(Position2,Position0); + XMVECTOR SG = _mm_set_ps1(g); + R1 = _mm_mul_ps(R1,SF); + R2 = _mm_mul_ps(R2,SG); + R1 = _mm_add_ps(R1,Position0); + R1 = _mm_add_ps(R1,R2); + return R1; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVectorBaryCentricV +( + FXMVECTOR Position0, + FXMVECTOR Position1, + FXMVECTOR Position2, + CXMVECTOR F, + CXMVECTOR G +) +{ +#if defined(_XM_NO_INTRINSICS_) + + // Result = Position0 + f * (Position1 - Position0) + g * (Position2 - Position0) + XMVECTOR P10; + XMVECTOR P20; + XMVECTOR Result; + + P10 = XMVectorSubtract(Position1, Position0); + P20 = XMVectorSubtract(Position2, Position0); + + Result = XMVectorMultiplyAdd(P10, F, Position0); + Result = XMVectorMultiplyAdd(P20, G, Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR R1 = _mm_sub_ps(Position1,Position0); + XMVECTOR R2 = _mm_sub_ps(Position2,Position0); + R1 = _mm_mul_ps(R1,F); + R2 = _mm_mul_ps(R2,G); + R1 = _mm_add_ps(R1,Position0); + R1 = _mm_add_ps(R1,R2); + return R1; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +/**************************************************************************** + * + * 2D Vector + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ +// Comparison operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector2Equal +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_f32[0] == V2.vector4_f32[0]) && (V1.vector4_f32[1] == V2.vector4_f32[1])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmpeq_ps(V1,V2); +// z and w are don't care + return (((_mm_movemask_ps(vTemp)&3)==3) != 0); +#else // _XM_VMX128_INTRINSICS_ + return XMComparisonAllTrue(XMVector2EqualR(V1, V2)); +#endif +} + + +//------------------------------------------------------------------------------ + +XMFINLINE UINT XMVector2EqualR +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + UINT CR = 0; + + if ((V1.vector4_f32[0] == V2.vector4_f32[0]) && + (V1.vector4_f32[1] == V2.vector4_f32[1])) + { + CR = XM_CRMASK_CR6TRUE; + } + else if ((V1.vector4_f32[0] != V2.vector4_f32[0]) && + (V1.vector4_f32[1] != V2.vector4_f32[1])) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmpeq_ps(V1,V2); +// z and w are don't care + int iTest = _mm_movemask_ps(vTemp)&3; + UINT CR = 0; + if (iTest==3) + { + CR = XM_CRMASK_CR6TRUE; + } + else if (!iTest) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector2EqualInt +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_u32[0] == V2.vector4_u32[0]) && (V1.vector4_u32[1] == V2.vector4_u32[1])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + __m128i vTemp = _mm_cmpeq_epi32(reinterpret_cast(&V1)[0],reinterpret_cast(&V2)[0]); + return (((_mm_movemask_ps(reinterpret_cast(&vTemp)[0])&3)==3) != 0); +#else // _XM_VMX128_INTRINSICS_ + return XMComparisonAllTrue(XMVector2EqualIntR(V1, V2)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE UINT XMVector2EqualIntR +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + UINT CR = 0; + if ((V1.vector4_u32[0] == V2.vector4_u32[0]) && + (V1.vector4_u32[1] == V2.vector4_u32[1])) + { + CR = XM_CRMASK_CR6TRUE; + } + else if ((V1.vector4_u32[0] != V2.vector4_u32[0]) && + (V1.vector4_u32[1] != V2.vector4_u32[1])) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; + +#elif defined(_XM_SSE_INTRINSICS_) + __m128i vTemp = _mm_cmpeq_epi32(reinterpret_cast(&V1)[0],reinterpret_cast(&V2)[0]); + int iTest = _mm_movemask_ps(reinterpret_cast(&vTemp)[0])&3; + UINT CR = 0; + if (iTest==3) + { + CR = XM_CRMASK_CR6TRUE; + } + else if (!iTest) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector2NearEqual +( + FXMVECTOR V1, + FXMVECTOR V2, + FXMVECTOR Epsilon +) +{ +#if defined(_XM_NO_INTRINSICS_) + FLOAT dx, dy; + dx = fabsf(V1.vector4_f32[0]-V2.vector4_f32[0]); + dy = fabsf(V1.vector4_f32[1]-V2.vector4_f32[1]); + return ((dx <= Epsilon.vector4_f32[0]) && + (dy <= Epsilon.vector4_f32[1])); +#elif defined(_XM_SSE_INTRINSICS_) + // Get the difference + XMVECTOR vDelta = _mm_sub_ps(V1,V2); + // Get the absolute value of the difference + XMVECTOR vTemp = _mm_setzero_ps(); + vTemp = _mm_sub_ps(vTemp,vDelta); + vTemp = _mm_max_ps(vTemp,vDelta); + vTemp = _mm_cmple_ps(vTemp,Epsilon); + // z and w are don't care + return (((_mm_movemask_ps(vTemp)&3)==0x3) != 0); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector2NotEqual +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_f32[0] != V2.vector4_f32[0]) || (V1.vector4_f32[1] != V2.vector4_f32[1])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmpeq_ps(V1,V2); +// z and w are don't care + return (((_mm_movemask_ps(vTemp)&3)!=3) != 0); +#else // _XM_VMX128_INTRINSICS_ + return XMComparisonAnyFalse(XMVector2EqualR(V1, V2)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector2NotEqualInt +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_u32[0] != V2.vector4_u32[0]) || (V1.vector4_u32[1] != V2.vector4_u32[1])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + __m128i vTemp = _mm_cmpeq_epi32(reinterpret_cast(&V1)[0],reinterpret_cast(&V2)[0]); + return (((_mm_movemask_ps(reinterpret_cast(&vTemp)[0])&3)!=3) != 0); +#else // _XM_VMX128_INTRINSICS_ + return XMComparisonAnyFalse(XMVector2EqualIntR(V1, V2)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector2Greater +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_f32[0] > V2.vector4_f32[0]) && (V1.vector4_f32[1] > V2.vector4_f32[1])) != 0); + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmpgt_ps(V1,V2); +// z and w are don't care + return (((_mm_movemask_ps(vTemp)&3)==3) != 0); +#else // _XM_VMX128_INTRINSICS_ + return XMComparisonAllTrue(XMVector2GreaterR(V1, V2)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE UINT XMVector2GreaterR +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + UINT CR = 0; + if ((V1.vector4_f32[0] > V2.vector4_f32[0]) && + (V1.vector4_f32[1] > V2.vector4_f32[1])) + { + CR = XM_CRMASK_CR6TRUE; + } + else if ((V1.vector4_f32[0] <= V2.vector4_f32[0]) && + (V1.vector4_f32[1] <= V2.vector4_f32[1])) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmpgt_ps(V1,V2); + int iTest = _mm_movemask_ps(vTemp)&3; + UINT CR = 0; + if (iTest==3) + { + CR = XM_CRMASK_CR6TRUE; + } + else if (!iTest) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector2GreaterOrEqual +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_f32[0] >= V2.vector4_f32[0]) && (V1.vector4_f32[1] >= V2.vector4_f32[1])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmpge_ps(V1,V2); + return (((_mm_movemask_ps(vTemp)&3)==3) != 0); +#else // _XM_VMX128_INTRINSICS_ + return XMComparisonAllTrue(XMVector2GreaterOrEqualR(V1, V2)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE UINT XMVector2GreaterOrEqualR +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + UINT CR = 0; + if ((V1.vector4_f32[0] >= V2.vector4_f32[0]) && + (V1.vector4_f32[1] >= V2.vector4_f32[1])) + { + CR = XM_CRMASK_CR6TRUE; + } + else if ((V1.vector4_f32[0] < V2.vector4_f32[0]) && + (V1.vector4_f32[1] < V2.vector4_f32[1])) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmpge_ps(V1,V2); + int iTest = _mm_movemask_ps(vTemp)&3; + UINT CR = 0; + if (iTest == 3) + { + CR = XM_CRMASK_CR6TRUE; + } + else if (!iTest) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector2Less +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_f32[0] < V2.vector4_f32[0]) && (V1.vector4_f32[1] < V2.vector4_f32[1])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmplt_ps(V1,V2); + return (((_mm_movemask_ps(vTemp)&3)==3) != 0); +#else // _XM_VMX128_INTRINSICS_ + return XMComparisonAllTrue(XMVector2GreaterR(V2, V1)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector2LessOrEqual +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_f32[0] <= V2.vector4_f32[0]) && (V1.vector4_f32[1] <= V2.vector4_f32[1])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmple_ps(V1,V2); + return (((_mm_movemask_ps(vTemp)&3)==3) != 0); +#else // _XM_VMX128_INTRINSICS_ + return XMComparisonAllTrue(XMVector2GreaterOrEqualR(V2, V1)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector2InBounds +( + FXMVECTOR V, + FXMVECTOR Bounds +) +{ + #if defined(_XM_NO_INTRINSICS_) + return (((V.vector4_f32[0] <= Bounds.vector4_f32[0] && V.vector4_f32[0] >= -Bounds.vector4_f32[0]) && + (V.vector4_f32[1] <= Bounds.vector4_f32[1] && V.vector4_f32[1] >= -Bounds.vector4_f32[1])) != 0); + #elif defined(_XM_SSE_INTRINSICS_) + // Test if less than or equal + XMVECTOR vTemp1 = _mm_cmple_ps(V,Bounds); + // Negate the bounds + XMVECTOR vTemp2 = _mm_mul_ps(Bounds,g_XMNegativeOne); + // Test if greater or equal (Reversed) + vTemp2 = _mm_cmple_ps(vTemp2,V); + // Blend answers + vTemp1 = _mm_and_ps(vTemp1,vTemp2); + // x and y in bounds? (z and w are don't care) + return (((_mm_movemask_ps(vTemp1)&0x3)==0x3) != 0); +#else // _XM_VMX128_INTRINSICS_ + return XMComparisonAllInBounds(XMVector2InBoundsR(V, Bounds)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE UINT XMVector2InBoundsR +( + FXMVECTOR V, + FXMVECTOR Bounds +) +{ +#if defined(_XM_NO_INTRINSICS_) + UINT CR = 0; + if ((V.vector4_f32[0] <= Bounds.vector4_f32[0] && V.vector4_f32[0] >= -Bounds.vector4_f32[0]) && + (V.vector4_f32[1] <= Bounds.vector4_f32[1] && V.vector4_f32[1] >= -Bounds.vector4_f32[1])) + { + CR = XM_CRMASK_CR6BOUNDS; + } + return CR; + +#elif defined(_XM_SSE_INTRINSICS_) + // Test if less than or equal + XMVECTOR vTemp1 = _mm_cmple_ps(V,Bounds); + // Negate the bounds + XMVECTOR vTemp2 = _mm_mul_ps(Bounds,g_XMNegativeOne); + // Test if greater or equal (Reversed) + vTemp2 = _mm_cmple_ps(vTemp2,V); + // Blend answers + vTemp1 = _mm_and_ps(vTemp1,vTemp2); + // x and y in bounds? (z and w are don't care) + return ((_mm_movemask_ps(vTemp1)&0x3)==0x3) ? XM_CRMASK_CR6BOUNDS : 0; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector2IsNaN +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (XMISNAN(V.vector4_f32[0]) || + XMISNAN(V.vector4_f32[1])); +#elif defined(_XM_SSE_INTRINSICS_) + // Mask off the exponent + __m128i vTempInf = _mm_and_si128(reinterpret_cast(&V)[0],g_XMInfinity); + // Mask off the mantissa + __m128i vTempNan = _mm_and_si128(reinterpret_cast(&V)[0],g_XMQNaNTest); + // Are any of the exponents == 0x7F800000? + vTempInf = _mm_cmpeq_epi32(vTempInf,g_XMInfinity); + // Are any of the mantissa's zero? (SSE2 doesn't have a neq test) + vTempNan = _mm_cmpeq_epi32(vTempNan,g_XMZero); + // Perform a not on the NaN test to be true on NON-zero mantissas + vTempNan = _mm_andnot_si128(vTempNan,vTempInf); + // If x or y are NaN, the signs are true after the merge above + return ((_mm_movemask_ps(reinterpret_cast(&vTempNan)[0])&3) != 0); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector2IsInfinite +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + return (XMISINF(V.vector4_f32[0]) || + XMISINF(V.vector4_f32[1])); +#elif defined(_XM_SSE_INTRINSICS_) + // Mask off the sign bit + __m128 vTemp = _mm_and_ps(V,g_XMAbsMask); + // Compare to infinity + vTemp = _mm_cmpeq_ps(vTemp,g_XMInfinity); + // If x or z are infinity, the signs are true. + return ((_mm_movemask_ps(vTemp)&3) != 0); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Computation operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector2Dot +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result.vector4_f32[0] = + Result.vector4_f32[1] = + Result.vector4_f32[2] = + Result.vector4_f32[3] = V1.vector4_f32[0] * V2.vector4_f32[0] + V1.vector4_f32[1] * V2.vector4_f32[1]; + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product on x and y + XMVECTOR vLengthSq = _mm_mul_ps(V1,V2); + // vTemp has y splatted + XMVECTOR vTemp = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(1,1,1,1)); + // x+y + vLengthSq = _mm_add_ss(vLengthSq,vTemp); + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(0,0,0,0)); + return vLengthSq; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector2Cross +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + FLOAT fCross = (V1.vector4_f32[0] * V2.vector4_f32[1]) - (V1.vector4_f32[1] * V2.vector4_f32[0]); + XMVECTOR vResult = { + fCross, + fCross, + fCross, + fCross + }; + return vResult; +#elif defined(_XM_SSE_INTRINSICS_) + // Swap x and y + XMVECTOR vResult = _mm_shuffle_ps(V2,V2,_MM_SHUFFLE(0,1,0,1)); + // Perform the muls + vResult = _mm_mul_ps(vResult,V1); + // Splat y + XMVECTOR vTemp = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(1,1,1,1)); + // Sub the values + vResult = _mm_sub_ss(vResult,vTemp); + // Splat the cross product + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(0,0,0,0)); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector2LengthSq +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + return XMVector2Dot(V, V); +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product on x and y + XMVECTOR vLengthSq = _mm_mul_ps(V,V); + // vTemp has y splatted + XMVECTOR vTemp = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(1,1,1,1)); + // x+y + vLengthSq = _mm_add_ss(vLengthSq,vTemp); + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(0,0,0,0)); + return vLengthSq; +#else + return XMVector2Dot(V, V); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector2ReciprocalLengthEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result = XMVector2LengthSq(V); + Result = XMVectorReciprocalSqrtEst(Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product on x and y + XMVECTOR vLengthSq = _mm_mul_ps(V,V); + // vTemp has y splatted + XMVECTOR vTemp = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(1,1,1,1)); + // x+y + vLengthSq = _mm_add_ss(vLengthSq,vTemp); + vLengthSq = _mm_rsqrt_ss(vLengthSq); + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(0,0,0,0)); + return vLengthSq; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector2ReciprocalLength +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result = XMVector2LengthSq(V); + Result = XMVectorReciprocalSqrt(Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product on x and y + XMVECTOR vLengthSq = _mm_mul_ps(V,V); + // vTemp has y splatted + XMVECTOR vTemp = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(1,1,1,1)); + // x+y + vLengthSq = _mm_add_ss(vLengthSq,vTemp); + vLengthSq = _mm_sqrt_ss(vLengthSq); + vLengthSq = _mm_div_ss(g_XMOne,vLengthSq); + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(0,0,0,0)); + return vLengthSq; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector2LengthEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR Result; + Result = XMVector2LengthSq(V); + Result = XMVectorSqrtEst(Result); + return Result; +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product on x and y + XMVECTOR vLengthSq = _mm_mul_ps(V,V); + // vTemp has y splatted + XMVECTOR vTemp = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(1,1,1,1)); + // x+y + vLengthSq = _mm_add_ss(vLengthSq,vTemp); + vLengthSq = _mm_sqrt_ss(vLengthSq); + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(0,0,0,0)); + return vLengthSq; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector2Length +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + Result = XMVector2LengthSq(V); + Result = XMVectorSqrt(Result); + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product on x and y + XMVECTOR vLengthSq = _mm_mul_ps(V,V); + // vTemp has y splatted + XMVECTOR vTemp = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(1,1,1,1)); + // x+y + vLengthSq = _mm_add_ss(vLengthSq,vTemp); + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(0,0,0,0)); + vLengthSq = _mm_sqrt_ps(vLengthSq); + return vLengthSq; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// XMVector2NormalizeEst uses a reciprocal estimate and +// returns QNaN on zero and infinite vectors. + +XMFINLINE XMVECTOR XMVector2NormalizeEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + Result = XMVector2ReciprocalLength(V); + Result = XMVectorMultiply(V, Result); + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product on x and y + XMVECTOR vLengthSq = _mm_mul_ps(V,V); + // vTemp has y splatted + XMVECTOR vTemp = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(1,1,1,1)); + // x+y + vLengthSq = _mm_add_ss(vLengthSq,vTemp); + vLengthSq = _mm_rsqrt_ss(vLengthSq); + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(0,0,0,0)); + vLengthSq = _mm_mul_ps(vLengthSq,V); + return vLengthSq; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector2Normalize +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + FLOAT fLength; + XMVECTOR vResult; + + vResult = XMVector2Length( V ); + fLength = vResult.vector4_f32[0]; + + // Prevent divide by zero + if (fLength > 0) { + fLength = 1.0f/fLength; + } + + vResult.vector4_f32[0] = V.vector4_f32[0]*fLength; + vResult.vector4_f32[1] = V.vector4_f32[1]*fLength; + vResult.vector4_f32[2] = V.vector4_f32[2]*fLength; + vResult.vector4_f32[3] = V.vector4_f32[3]*fLength; + return vResult; + +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product on x and y only + XMVECTOR vLengthSq = _mm_mul_ps(V,V); + XMVECTOR vTemp = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(1,1,1,1)); + vLengthSq = _mm_add_ss(vLengthSq,vTemp); + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(0,0,0,0)); + // Prepare for the division + XMVECTOR vResult = _mm_sqrt_ps(vLengthSq); + // Create zero with a single instruction + XMVECTOR vZeroMask = _mm_setzero_ps(); + // Test for a divide by zero (Must be FP to detect -0.0) + vZeroMask = _mm_cmpneq_ps(vZeroMask,vResult); + // Failsafe on zero (Or epsilon) length planes + // If the length is infinity, set the elements to zero + vLengthSq = _mm_cmpneq_ps(vLengthSq,g_XMInfinity); + // Reciprocal mul to perform the normalization + vResult = _mm_div_ps(V,vResult); + // Any that are infinity, set to zero + vResult = _mm_and_ps(vResult,vZeroMask); + // Select qnan or result based on infinite length + XMVECTOR vTemp1 = _mm_andnot_ps(vLengthSq,g_XMQNaN); + XMVECTOR vTemp2 = _mm_and_ps(vResult,vLengthSq); + vResult = _mm_or_ps(vTemp1,vTemp2); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector2ClampLength +( + FXMVECTOR V, + FLOAT LengthMin, + FLOAT LengthMax +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR ClampMax; + XMVECTOR ClampMin; + + ClampMax = XMVectorReplicate(LengthMax); + ClampMin = XMVectorReplicate(LengthMin); + + return XMVector2ClampLengthV(V, ClampMin, ClampMax); + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR ClampMax = _mm_set_ps1(LengthMax); + XMVECTOR ClampMin = _mm_set_ps1(LengthMin); + return XMVector2ClampLengthV(V, ClampMin, ClampMax); +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector2ClampLengthV +( + FXMVECTOR V, + FXMVECTOR LengthMin, + FXMVECTOR LengthMax +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR ClampLength; + XMVECTOR LengthSq; + XMVECTOR RcpLength; + XMVECTOR Length; + XMVECTOR Normal; + XMVECTOR Zero; + XMVECTOR InfiniteLength; + XMVECTOR ZeroLength; + XMVECTOR Select; + XMVECTOR ControlMax; + XMVECTOR ControlMin; + XMVECTOR Control; + XMVECTOR Result; + + XMASSERT((LengthMin.vector4_f32[1] == LengthMin.vector4_f32[0])); + XMASSERT((LengthMax.vector4_f32[1] == LengthMax.vector4_f32[0])); + XMASSERT(XMVector2GreaterOrEqual(LengthMin, XMVectorZero())); + XMASSERT(XMVector2GreaterOrEqual(LengthMax, XMVectorZero())); + XMASSERT(XMVector2GreaterOrEqual(LengthMax, LengthMin)); + + LengthSq = XMVector2LengthSq(V); + + Zero = XMVectorZero(); + + RcpLength = XMVectorReciprocalSqrt(LengthSq); + + InfiniteLength = XMVectorEqualInt(LengthSq, g_XMInfinity.v); + ZeroLength = XMVectorEqual(LengthSq, Zero); + + Length = XMVectorMultiply(LengthSq, RcpLength); + + Normal = XMVectorMultiply(V, RcpLength); + + Select = XMVectorEqualInt(InfiniteLength, ZeroLength); + Length = XMVectorSelect(LengthSq, Length, Select); + Normal = XMVectorSelect(LengthSq, Normal, Select); + + ControlMax = XMVectorGreater(Length, LengthMax); + ControlMin = XMVectorLess(Length, LengthMin); + + ClampLength = XMVectorSelect(Length, LengthMax, ControlMax); + ClampLength = XMVectorSelect(ClampLength, LengthMin, ControlMin); + + Result = XMVectorMultiply(Normal, ClampLength); + + // Preserve the original vector (with no precision loss) if the length falls within the given range + Control = XMVectorEqualInt(ControlMax, ControlMin); + Result = XMVectorSelect(Result, V, Control); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR ClampLength; + XMVECTOR LengthSq; + XMVECTOR RcpLength; + XMVECTOR Length; + XMVECTOR Normal; + XMVECTOR InfiniteLength; + XMVECTOR ZeroLength; + XMVECTOR Select; + XMVECTOR ControlMax; + XMVECTOR ControlMin; + XMVECTOR Control; + XMVECTOR Result; + + XMASSERT((XMVectorGetY(LengthMin) == XMVectorGetX(LengthMin))); + XMASSERT((XMVectorGetY(LengthMax) == XMVectorGetX(LengthMax))); + XMASSERT(XMVector2GreaterOrEqual(LengthMin, g_XMZero)); + XMASSERT(XMVector2GreaterOrEqual(LengthMax, g_XMZero)); + XMASSERT(XMVector2GreaterOrEqual(LengthMax, LengthMin)); + LengthSq = XMVector2LengthSq(V); + RcpLength = XMVectorReciprocalSqrt(LengthSq); + InfiniteLength = XMVectorEqualInt(LengthSq, g_XMInfinity); + ZeroLength = XMVectorEqual(LengthSq, g_XMZero); + Length = _mm_mul_ps(LengthSq, RcpLength); + Normal = _mm_mul_ps(V, RcpLength); + Select = XMVectorEqualInt(InfiniteLength, ZeroLength); + Length = XMVectorSelect(LengthSq, Length, Select); + Normal = XMVectorSelect(LengthSq, Normal, Select); + ControlMax = XMVectorGreater(Length, LengthMax); + ControlMin = XMVectorLess(Length, LengthMin); + ClampLength = XMVectorSelect(Length, LengthMax, ControlMax); + ClampLength = XMVectorSelect(ClampLength, LengthMin, ControlMin); + Result = _mm_mul_ps(Normal, ClampLength); + // Preserve the original vector (with no precision loss) if the length falls within the given range + Control = XMVectorEqualInt(ControlMax, ControlMin); + Result = XMVectorSelect(Result, V, Control); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector2Reflect +( + FXMVECTOR Incident, + FXMVECTOR Normal +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + // Result = Incident - (2 * dot(Incident, Normal)) * Normal + Result = XMVector2Dot(Incident, Normal); + Result = XMVectorAdd(Result, Result); + Result = XMVectorNegativeMultiplySubtract(Result, Normal, Incident); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Result = Incident - (2 * dot(Incident, Normal)) * Normal + XMVECTOR Result = XMVector2Dot(Incident,Normal); + Result = _mm_add_ps(Result, Result); + Result = _mm_mul_ps(Result, Normal); + Result = _mm_sub_ps(Incident,Result); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector2Refract +( + FXMVECTOR Incident, + FXMVECTOR Normal, + FLOAT RefractionIndex +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR Index; + Index = XMVectorReplicate(RefractionIndex); + return XMVector2RefractV(Incident, Normal, Index); + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR Index = _mm_set_ps1(RefractionIndex); + return XMVector2RefractV(Incident,Normal,Index); +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +// Return the refraction of a 2D vector +XMFINLINE XMVECTOR XMVector2RefractV +( + FXMVECTOR Incident, + FXMVECTOR Normal, + FXMVECTOR RefractionIndex +) +{ +#if defined(_XM_NO_INTRINSICS_) + float IDotN; + float RX,RY; + XMVECTOR vResult; + // Result = RefractionIndex * Incident - Normal * (RefractionIndex * dot(Incident, Normal) + + // sqrt(1 - RefractionIndex * RefractionIndex * (1 - dot(Incident, Normal) * dot(Incident, Normal)))) + IDotN = (Incident.vector4_f32[0]*Normal.vector4_f32[0])+(Incident.vector4_f32[1]*Normal.vector4_f32[1]); + // R = 1.0f - RefractionIndex * RefractionIndex * (1.0f - IDotN * IDotN) + RY = 1.0f-(IDotN*IDotN); + RX = 1.0f-(RY*RefractionIndex.vector4_f32[0]*RefractionIndex.vector4_f32[0]); + RY = 1.0f-(RY*RefractionIndex.vector4_f32[1]*RefractionIndex.vector4_f32[1]); + if (RX>=0.0f) { + RX = (RefractionIndex.vector4_f32[0]*Incident.vector4_f32[0])-(Normal.vector4_f32[0]*((RefractionIndex.vector4_f32[0]*IDotN)+sqrtf(RX))); + } else { + RX = 0.0f; + } + if (RY>=0.0f) { + RY = (RefractionIndex.vector4_f32[1]*Incident.vector4_f32[1])-(Normal.vector4_f32[1]*((RefractionIndex.vector4_f32[1]*IDotN)+sqrtf(RY))); + } else { + RY = 0.0f; + } + vResult.vector4_f32[0] = RX; + vResult.vector4_f32[1] = RY; + vResult.vector4_f32[2] = 0.0f; + vResult.vector4_f32[3] = 0.0f; + return vResult; +#elif defined(_XM_SSE_INTRINSICS_) + // Result = RefractionIndex * Incident - Normal * (RefractionIndex * dot(Incident, Normal) + + // sqrt(1 - RefractionIndex * RefractionIndex * (1 - dot(Incident, Normal) * dot(Incident, Normal)))) + // Get the 2D Dot product of Incident-Normal + XMVECTOR IDotN = _mm_mul_ps(Incident,Normal); + XMVECTOR vTemp = _mm_shuffle_ps(IDotN,IDotN,_MM_SHUFFLE(1,1,1,1)); + IDotN = _mm_add_ss(IDotN,vTemp); + IDotN = _mm_shuffle_ps(IDotN,IDotN,_MM_SHUFFLE(0,0,0,0)); + // vTemp = 1.0f - RefractionIndex * RefractionIndex * (1.0f - IDotN * IDotN) + vTemp = _mm_mul_ps(IDotN,IDotN); + vTemp = _mm_sub_ps(g_XMOne,vTemp); + vTemp = _mm_mul_ps(vTemp,RefractionIndex); + vTemp = _mm_mul_ps(vTemp,RefractionIndex); + vTemp = _mm_sub_ps(g_XMOne,vTemp); + // If any terms are <=0, sqrt() will fail, punt to zero + XMVECTOR vMask = _mm_cmpgt_ps(vTemp,g_XMZero); + // R = RefractionIndex * IDotN + sqrt(R) + vTemp = _mm_sqrt_ps(vTemp); + XMVECTOR vResult = _mm_mul_ps(RefractionIndex,IDotN); + vTemp = _mm_add_ps(vTemp,vResult); + // Result = RefractionIndex * Incident - Normal * R + vResult = _mm_mul_ps(RefractionIndex,Incident); + vTemp = _mm_mul_ps(vTemp,Normal); + vResult = _mm_sub_ps(vResult,vTemp); + vResult = _mm_and_ps(vResult,vMask); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector2Orthogonal +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result.vector4_f32[0] = -V.vector4_f32[1]; + Result.vector4_f32[1] = V.vector4_f32[0]; + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(3,2,0,1)); + vResult = _mm_mul_ps(vResult,g_XMNegateX); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector2AngleBetweenNormalsEst +( + FXMVECTOR N1, + FXMVECTOR N2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR NegativeOne; + XMVECTOR One; + XMVECTOR Result; + + Result = XMVector2Dot(N1, N2); + NegativeOne = XMVectorSplatConstant(-1, 0); + One = XMVectorSplatOne(); + Result = XMVectorClamp(Result, NegativeOne, One); + Result = XMVectorACosEst(Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = XMVector2Dot(N1,N2); + // Clamp to -1.0f to 1.0f + vResult = _mm_max_ps(vResult,g_XMNegativeOne); + vResult = _mm_min_ps(vResult,g_XMOne);; + vResult = XMVectorACosEst(vResult); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector2AngleBetweenNormals +( + FXMVECTOR N1, + FXMVECTOR N2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR NegativeOne; + XMVECTOR One; + XMVECTOR Result; + + Result = XMVector2Dot(N1, N2); + NegativeOne = XMVectorSplatConstant(-1, 0); + One = XMVectorSplatOne(); + Result = XMVectorClamp(Result, NegativeOne, One); + Result = XMVectorACos(Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = XMVector2Dot(N1,N2); + // Clamp to -1.0f to 1.0f + vResult = _mm_max_ps(vResult,g_XMNegativeOne); + vResult = _mm_min_ps(vResult,g_XMOne);; + vResult = XMVectorACos(vResult); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector2AngleBetweenVectors +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR L1; + XMVECTOR L2; + XMVECTOR Dot; + XMVECTOR CosAngle; + XMVECTOR NegativeOne; + XMVECTOR One; + XMVECTOR Result; + + L1 = XMVector2ReciprocalLength(V1); + L2 = XMVector2ReciprocalLength(V2); + + Dot = XMVector2Dot(V1, V2); + + L1 = XMVectorMultiply(L1, L2); + + CosAngle = XMVectorMultiply(Dot, L1); + NegativeOne = XMVectorSplatConstant(-1, 0); + One = XMVectorSplatOne(); + CosAngle = XMVectorClamp(CosAngle, NegativeOne, One); + + Result = XMVectorACos(CosAngle); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR L1; + XMVECTOR L2; + XMVECTOR Dot; + XMVECTOR CosAngle; + XMVECTOR Result; + L1 = XMVector2ReciprocalLength(V1); + L2 = XMVector2ReciprocalLength(V2); + Dot = XMVector2Dot(V1, V2); + L1 = _mm_mul_ps(L1, L2); + CosAngle = _mm_mul_ps(Dot, L1); + CosAngle = XMVectorClamp(CosAngle, g_XMNegativeOne,g_XMOne); + Result = XMVectorACos(CosAngle); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector2LinePointDistance +( + FXMVECTOR LinePoint1, + FXMVECTOR LinePoint2, + FXMVECTOR Point +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR PointVector; + XMVECTOR LineVector; + XMVECTOR ReciprocalLengthSq; + XMVECTOR PointProjectionScale; + XMVECTOR DistanceVector; + XMVECTOR Result; + + // Given a vector PointVector from LinePoint1 to Point and a vector + // LineVector from LinePoint1 to LinePoint2, the scaled distance + // PointProjectionScale from LinePoint1 to the perpendicular projection + // of PointVector onto the line is defined as: + // + // PointProjectionScale = dot(PointVector, LineVector) / LengthSq(LineVector) + + PointVector = XMVectorSubtract(Point, LinePoint1); + LineVector = XMVectorSubtract(LinePoint2, LinePoint1); + + ReciprocalLengthSq = XMVector2LengthSq(LineVector); + ReciprocalLengthSq = XMVectorReciprocal(ReciprocalLengthSq); + + PointProjectionScale = XMVector2Dot(PointVector, LineVector); + PointProjectionScale = XMVectorMultiply(PointProjectionScale, ReciprocalLengthSq); + + DistanceVector = XMVectorMultiply(LineVector, PointProjectionScale); + DistanceVector = XMVectorSubtract(PointVector, DistanceVector); + + Result = XMVector2Length(DistanceVector); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR PointVector = _mm_sub_ps(Point,LinePoint1); + XMVECTOR LineVector = _mm_sub_ps(LinePoint2,LinePoint1); + XMVECTOR ReciprocalLengthSq = XMVector2LengthSq(LineVector); + XMVECTOR vResult = XMVector2Dot(PointVector,LineVector); + vResult = _mm_div_ps(vResult,ReciprocalLengthSq); + vResult = _mm_mul_ps(vResult,LineVector); + vResult = _mm_sub_ps(PointVector,vResult); + vResult = XMVector2Length(vResult); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector2IntersectLine +( + FXMVECTOR Line1Point1, + FXMVECTOR Line1Point2, + FXMVECTOR Line2Point1, + CXMVECTOR Line2Point2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V1; + XMVECTOR V2; + XMVECTOR V3; + XMVECTOR C1; + XMVECTOR C2; + XMVECTOR Result; + CONST XMVECTOR Zero = XMVectorZero(); + + V1 = XMVectorSubtract(Line1Point2, Line1Point1); + V2 = XMVectorSubtract(Line2Point2, Line2Point1); + V3 = XMVectorSubtract(Line1Point1, Line2Point1); + + C1 = XMVector2Cross(V1, V2); + C2 = XMVector2Cross(V2, V3); + + if (XMVector2NearEqual(C1, Zero, g_XMEpsilon.v)) + { + if (XMVector2NearEqual(C2, Zero, g_XMEpsilon.v)) + { + // Coincident + Result = g_XMInfinity.v; + } + else + { + // Parallel + Result = g_XMQNaN.v; + } + } + else + { + // Intersection point = Line1Point1 + V1 * (C2 / C1) + XMVECTOR Scale; + Scale = XMVectorReciprocal(C1); + Scale = XMVectorMultiply(C2, Scale); + Result = XMVectorMultiplyAdd(V1, Scale, Line1Point1); + } + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR V1 = _mm_sub_ps(Line1Point2, Line1Point1); + XMVECTOR V2 = _mm_sub_ps(Line2Point2, Line2Point1); + XMVECTOR V3 = _mm_sub_ps(Line1Point1, Line2Point1); + // Generate the cross products + XMVECTOR C1 = XMVector2Cross(V1, V2); + XMVECTOR C2 = XMVector2Cross(V2, V3); + // If C1 is not close to epsilon, use the calculated value + XMVECTOR vResultMask = _mm_setzero_ps(); + vResultMask = _mm_sub_ps(vResultMask,C1); + vResultMask = _mm_max_ps(vResultMask,C1); + // 0xFFFFFFFF if the calculated value is to be used + vResultMask = _mm_cmpgt_ps(vResultMask,g_XMEpsilon); + // If C1 is close to epsilon, which fail type is it? INFINITY or NAN? + XMVECTOR vFailMask = _mm_setzero_ps(); + vFailMask = _mm_sub_ps(vFailMask,C2); + vFailMask = _mm_max_ps(vFailMask,C2); + vFailMask = _mm_cmple_ps(vFailMask,g_XMEpsilon); + XMVECTOR vFail = _mm_and_ps(vFailMask,g_XMInfinity); + vFailMask = _mm_andnot_ps(vFailMask,g_XMQNaN); + // vFail is NAN or INF + vFail = _mm_or_ps(vFail,vFailMask); + // Intersection point = Line1Point1 + V1 * (C2 / C1) + XMVECTOR vResult = _mm_div_ps(C2,C1); + vResult = _mm_mul_ps(vResult,V1); + vResult = _mm_add_ps(vResult,Line1Point1); + // Use result, or failure value + vResult = _mm_and_ps(vResult,vResultMask); + vResultMask = _mm_andnot_ps(vResultMask,vFail); + vResult = _mm_or_ps(vResult,vResultMask); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector2Transform +( + FXMVECTOR V, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR X; + XMVECTOR Y; + XMVECTOR Result; + + Y = XMVectorSplatY(V); + X = XMVectorSplatX(V); + + Result = XMVectorMultiplyAdd(Y, M.r[1], M.r[3]); + Result = XMVectorMultiplyAdd(X, M.r[0], Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(0,0,0,0)); + vResult = _mm_mul_ps(vResult,M.r[0]); + XMVECTOR vTemp = _mm_shuffle_ps(V,V,_MM_SHUFFLE(1,1,1,1)); + vTemp = _mm_mul_ps(vTemp,M.r[1]); + vResult = _mm_add_ps(vResult,vTemp); + vResult = _mm_add_ps(vResult,M.r[3]); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMFLOAT4* XMVector2TransformStream +( + XMFLOAT4* pOutputStream, + UINT OutputStride, + CONST XMFLOAT2* pInputStream, + UINT InputStride, + UINT VectorCount, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + XMVECTOR X; + XMVECTOR Y; + XMVECTOR Result; + UINT i; + BYTE* pInputVector = (BYTE*)pInputStream; + BYTE* pOutputVector = (BYTE*)pOutputStream; + + XMASSERT(pOutputStream); + XMASSERT(pInputStream); + + for (i = 0; i < VectorCount; i++) + { + V = XMLoadFloat2((XMFLOAT2*)pInputVector); + Y = XMVectorSplatY(V); + X = XMVectorSplatX(V); +// Y = XMVectorReplicate(((XMFLOAT2*)pInputVector)->y); +// X = XMVectorReplicate(((XMFLOAT2*)pInputVector)->x); + + Result = XMVectorMultiplyAdd(Y, M.r[1], M.r[3]); + Result = XMVectorMultiplyAdd(X, M.r[0], Result); + + XMStoreFloat4((XMFLOAT4*)pOutputVector, Result); + + pInputVector += InputStride; + pOutputVector += OutputStride; + } + + return pOutputStream; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pOutputStream); + XMASSERT(pInputStream); + UINT i; + const BYTE* pInputVector = (const BYTE*)pInputStream; + BYTE* pOutputVector = (BYTE*)pOutputStream; + + for (i = 0; i < VectorCount; i++) + { + XMVECTOR X = _mm_load_ps1(&reinterpret_cast(pInputVector)->x); + XMVECTOR vResult = _mm_load_ps1(&reinterpret_cast(pInputVector)->y); + vResult = _mm_mul_ps(vResult,M.r[1]); + vResult = _mm_add_ps(vResult,M.r[3]); + X = _mm_mul_ps(X,M.r[0]); + vResult = _mm_add_ps(vResult,X); + _mm_storeu_ps(reinterpret_cast(pOutputVector),vResult); + pInputVector += InputStride; + pOutputVector += OutputStride; + } + return pOutputStream; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMFLOAT4* XMVector2TransformStreamNC +( + XMFLOAT4* pOutputStream, + UINT OutputStride, + CONST XMFLOAT2* pInputStream, + UINT InputStride, + UINT VectorCount, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) || defined(XM_NO_MISALIGNED_VECTOR_ACCESS) || defined(_XM_SSE_INTRINSICS_) + return XMVector2TransformStream( pOutputStream, OutputStride, pInputStream, InputStride, VectorCount, M ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector2TransformCoord +( + FXMVECTOR V, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR X; + XMVECTOR Y; + XMVECTOR InverseW; + XMVECTOR Result; + + Y = XMVectorSplatY(V); + X = XMVectorSplatX(V); + + Result = XMVectorMultiplyAdd(Y, M.r[1], M.r[3]); + Result = XMVectorMultiplyAdd(X, M.r[0], Result); + + InverseW = XMVectorSplatW(Result); + InverseW = XMVectorReciprocal(InverseW); + + Result = XMVectorMultiply(Result, InverseW); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(0,0,0,0)); + vResult = _mm_mul_ps(vResult,M.r[0]); + XMVECTOR vTemp = _mm_shuffle_ps(V,V,_MM_SHUFFLE(1,1,1,1)); + vTemp = _mm_mul_ps(vTemp,M.r[1]); + vResult = _mm_add_ps(vResult,vTemp); + vResult = _mm_add_ps(vResult,M.r[3]); + vTemp = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(3,3,3,3)); + vResult = _mm_div_ps(vResult,vTemp); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMFLOAT2* XMVector2TransformCoordStream +( + XMFLOAT2* pOutputStream, + UINT OutputStride, + CONST XMFLOAT2* pInputStream, + UINT InputStride, + UINT VectorCount, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + XMVECTOR X; + XMVECTOR Y; + XMVECTOR InverseW; + XMVECTOR Result; + UINT i; + BYTE* pInputVector = (BYTE*)pInputStream; + BYTE* pOutputVector = (BYTE*)pOutputStream; + + XMASSERT(pOutputStream); + XMASSERT(pInputStream); + + for (i = 0; i < VectorCount; i++) + { + V = XMLoadFloat2((XMFLOAT2*)pInputVector); + Y = XMVectorSplatY(V); + X = XMVectorSplatX(V); +// Y = XMVectorReplicate(((XMFLOAT2*)pInputVector)->y); +// X = XMVectorReplicate(((XMFLOAT2*)pInputVector)->x); + + Result = XMVectorMultiplyAdd(Y, M.r[1], M.r[3]); + Result = XMVectorMultiplyAdd(X, M.r[0], Result); + + InverseW = XMVectorSplatW(Result); + InverseW = XMVectorReciprocal(InverseW); + + Result = XMVectorMultiply(Result, InverseW); + + XMStoreFloat2((XMFLOAT2*)pOutputVector, Result); + + pInputVector += InputStride; + pOutputVector += OutputStride; + } + + return pOutputStream; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pOutputStream); + XMASSERT(pInputStream); + UINT i; + const BYTE *pInputVector = (BYTE*)pInputStream; + BYTE *pOutputVector = (BYTE*)pOutputStream; + + for (i = 0; i < VectorCount; i++) + { + XMVECTOR X = _mm_load_ps1(&reinterpret_cast(pInputVector)->x); + XMVECTOR vResult = _mm_load_ps1(&reinterpret_cast(pInputVector)->y); + vResult = _mm_mul_ps(vResult,M.r[1]); + vResult = _mm_add_ps(vResult,M.r[3]); + X = _mm_mul_ps(X,M.r[0]); + vResult = _mm_add_ps(vResult,X); + X = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(3,3,3,3)); + vResult = _mm_div_ps(vResult,X); + _mm_store_sd(reinterpret_cast(pOutputVector),reinterpret_cast<__m128d *>(&vResult)[0]); + pInputVector += InputStride; + pOutputVector += OutputStride; + } + return pOutputStream; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector2TransformNormal +( + FXMVECTOR V, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR X; + XMVECTOR Y; + XMVECTOR Result; + + Y = XMVectorSplatY(V); + X = XMVectorSplatX(V); + + Result = XMVectorMultiply(Y, M.r[1]); + Result = XMVectorMultiplyAdd(X, M.r[0], Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(0,0,0,0)); + vResult = _mm_mul_ps(vResult,M.r[0]); + XMVECTOR vTemp = _mm_shuffle_ps(V,V,_MM_SHUFFLE(1,1,1,1)); + vTemp = _mm_mul_ps(vTemp,M.r[1]); + vResult = _mm_add_ps(vResult,vTemp); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMFLOAT2* XMVector2TransformNormalStream +( + XMFLOAT2* pOutputStream, + UINT OutputStride, + CONST XMFLOAT2* pInputStream, + UINT InputStride, + UINT VectorCount, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + XMVECTOR X; + XMVECTOR Y; + XMVECTOR Result; + UINT i; + BYTE* pInputVector = (BYTE*)pInputStream; + BYTE* pOutputVector = (BYTE*)pOutputStream; + + XMASSERT(pOutputStream); + XMASSERT(pInputStream); + + for (i = 0; i < VectorCount; i++) + { + V = XMLoadFloat2((XMFLOAT2*)pInputVector); + Y = XMVectorSplatY(V); + X = XMVectorSplatX(V); +// Y = XMVectorReplicate(((XMFLOAT2*)pInputVector)->y); +// X = XMVectorReplicate(((XMFLOAT2*)pInputVector)->x); + + Result = XMVectorMultiply(Y, M.r[1]); + Result = XMVectorMultiplyAdd(X, M.r[0], Result); + + XMStoreFloat2((XMFLOAT2*)pOutputVector, Result); + + pInputVector += InputStride; + pOutputVector += OutputStride; + } + + return pOutputStream; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pOutputStream); + XMASSERT(pInputStream); + UINT i; + const BYTE*pInputVector = (const BYTE*)pInputStream; + BYTE *pOutputVector = (BYTE*)pOutputStream; + for (i = 0; i < VectorCount; i++) + { + XMVECTOR X = _mm_load_ps1(&reinterpret_cast(pInputVector)->x); + XMVECTOR vResult = _mm_load_ps1(&reinterpret_cast(pInputVector)->y); + vResult = _mm_mul_ps(vResult,M.r[1]); + X = _mm_mul_ps(X,M.r[0]); + vResult = _mm_add_ps(vResult,X); + _mm_store_sd(reinterpret_cast(pOutputVector),reinterpret_cast(&vResult)[0]); + + pInputVector += InputStride; + pOutputVector += OutputStride; + } + + return pOutputStream; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +/**************************************************************************** + * + * 3D Vector + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ +// Comparison operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector3Equal +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_f32[0] == V2.vector4_f32[0]) && (V1.vector4_f32[1] == V2.vector4_f32[1]) && (V1.vector4_f32[2] == V2.vector4_f32[2])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmpeq_ps(V1,V2); + return (((_mm_movemask_ps(vTemp)&7)==7) != 0); +#else // _XM_VMX128_INTRINSICS_ + return XMComparisonAllTrue(XMVector3EqualR(V1, V2)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE UINT XMVector3EqualR +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + UINT CR = 0; + if ((V1.vector4_f32[0] == V2.vector4_f32[0]) && + (V1.vector4_f32[1] == V2.vector4_f32[1]) && + (V1.vector4_f32[2] == V2.vector4_f32[2])) + { + CR = XM_CRMASK_CR6TRUE; + } + else if ((V1.vector4_f32[0] != V2.vector4_f32[0]) && + (V1.vector4_f32[1] != V2.vector4_f32[1]) && + (V1.vector4_f32[2] != V2.vector4_f32[2])) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmpeq_ps(V1,V2); + int iTest = _mm_movemask_ps(vTemp)&7; + UINT CR = 0; + if (iTest==7) + { + CR = XM_CRMASK_CR6TRUE; + } + else if (!iTest) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector3EqualInt +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_u32[0] == V2.vector4_u32[0]) && (V1.vector4_u32[1] == V2.vector4_u32[1]) && (V1.vector4_u32[2] == V2.vector4_u32[2])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + __m128i vTemp = _mm_cmpeq_epi32(reinterpret_cast(&V1)[0],reinterpret_cast(&V2)[0]); + return (((_mm_movemask_ps(reinterpret_cast(&vTemp)[0])&7)==7) != 0); +#else // _XM_VMX128_INTRINSICS_ + return XMComparisonAllTrue(XMVector3EqualIntR(V1, V2)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE UINT XMVector3EqualIntR +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + UINT CR = 0; + if ((V1.vector4_u32[0] == V2.vector4_u32[0]) && + (V1.vector4_u32[1] == V2.vector4_u32[1]) && + (V1.vector4_u32[2] == V2.vector4_u32[2])) + { + CR = XM_CRMASK_CR6TRUE; + } + else if ((V1.vector4_u32[0] != V2.vector4_u32[0]) && + (V1.vector4_u32[1] != V2.vector4_u32[1]) && + (V1.vector4_u32[2] != V2.vector4_u32[2])) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; +#elif defined(_XM_SSE_INTRINSICS_) + __m128i vTemp = _mm_cmpeq_epi32(reinterpret_cast(&V1)[0],reinterpret_cast(&V2)[0]); + int iTemp = _mm_movemask_ps(reinterpret_cast(&vTemp)[0])&7; + UINT CR = 0; + if (iTemp==7) + { + CR = XM_CRMASK_CR6TRUE; + } + else if (!iTemp) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector3NearEqual +( + FXMVECTOR V1, + FXMVECTOR V2, + FXMVECTOR Epsilon +) +{ +#if defined(_XM_NO_INTRINSICS_) + FLOAT dx, dy, dz; + + dx = fabsf(V1.vector4_f32[0]-V2.vector4_f32[0]); + dy = fabsf(V1.vector4_f32[1]-V2.vector4_f32[1]); + dz = fabsf(V1.vector4_f32[2]-V2.vector4_f32[2]); + return (((dx <= Epsilon.vector4_f32[0]) && + (dy <= Epsilon.vector4_f32[1]) && + (dz <= Epsilon.vector4_f32[2])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + // Get the difference + XMVECTOR vDelta = _mm_sub_ps(V1,V2); + // Get the absolute value of the difference + XMVECTOR vTemp = _mm_setzero_ps(); + vTemp = _mm_sub_ps(vTemp,vDelta); + vTemp = _mm_max_ps(vTemp,vDelta); + vTemp = _mm_cmple_ps(vTemp,Epsilon); + // w is don't care + return (((_mm_movemask_ps(vTemp)&7)==0x7) != 0); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector3NotEqual +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_f32[0] != V2.vector4_f32[0]) || (V1.vector4_f32[1] != V2.vector4_f32[1]) || (V1.vector4_f32[2] != V2.vector4_f32[2])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmpeq_ps(V1,V2); + return (((_mm_movemask_ps(vTemp)&7)!=7) != 0); +#else // _XM_VMX128_INTRINSICS_ + return XMComparisonAnyFalse(XMVector3EqualR(V1, V2)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector3NotEqualInt +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_u32[0] != V2.vector4_u32[0]) || (V1.vector4_u32[1] != V2.vector4_u32[1]) || (V1.vector4_u32[2] != V2.vector4_u32[2])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + __m128i vTemp = _mm_cmpeq_epi32(reinterpret_cast(&V1)[0],reinterpret_cast(&V2)[0]); + return (((_mm_movemask_ps(reinterpret_cast(&vTemp)[0])&7)!=7) != 0); +#else // _XM_VMX128_INTRINSICS_ + return XMComparisonAnyFalse(XMVector3EqualIntR(V1, V2)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector3Greater +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_f32[0] > V2.vector4_f32[0]) && (V1.vector4_f32[1] > V2.vector4_f32[1]) && (V1.vector4_f32[2] > V2.vector4_f32[2])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmpgt_ps(V1,V2); + return (((_mm_movemask_ps(vTemp)&7)==7) != 0); +#else // _XM_VMX128_INTRINSICS_ + return XMComparisonAllTrue(XMVector3GreaterR(V1, V2)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE UINT XMVector3GreaterR +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + UINT CR = 0; + if ((V1.vector4_f32[0] > V2.vector4_f32[0]) && + (V1.vector4_f32[1] > V2.vector4_f32[1]) && + (V1.vector4_f32[2] > V2.vector4_f32[2])) + { + CR = XM_CRMASK_CR6TRUE; + } + else if ((V1.vector4_f32[0] <= V2.vector4_f32[0]) && + (V1.vector4_f32[1] <= V2.vector4_f32[1]) && + (V1.vector4_f32[2] <= V2.vector4_f32[2])) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmpgt_ps(V1,V2); + UINT CR = 0; + int iTest = _mm_movemask_ps(vTemp)&7; + if (iTest==7) + { + CR = XM_CRMASK_CR6TRUE; + } + else if (!iTest) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector3GreaterOrEqual +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_f32[0] >= V2.vector4_f32[0]) && (V1.vector4_f32[1] >= V2.vector4_f32[1]) && (V1.vector4_f32[2] >= V2.vector4_f32[2])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmpge_ps(V1,V2); + return (((_mm_movemask_ps(vTemp)&7)==7) != 0); +#else // _XM_VMX128_INTRINSICS_ + return XMComparisonAllTrue(XMVector3GreaterOrEqualR(V1, V2)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE UINT XMVector3GreaterOrEqualR +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + UINT CR = 0; + if ((V1.vector4_f32[0] >= V2.vector4_f32[0]) && + (V1.vector4_f32[1] >= V2.vector4_f32[1]) && + (V1.vector4_f32[2] >= V2.vector4_f32[2])) + { + CR = XM_CRMASK_CR6TRUE; + } + else if ((V1.vector4_f32[0] < V2.vector4_f32[0]) && + (V1.vector4_f32[1] < V2.vector4_f32[1]) && + (V1.vector4_f32[2] < V2.vector4_f32[2])) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmpge_ps(V1,V2); + UINT CR = 0; + int iTest = _mm_movemask_ps(vTemp)&7; + if (iTest==7) + { + CR = XM_CRMASK_CR6TRUE; + } + else if (!iTest) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector3Less +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_f32[0] < V2.vector4_f32[0]) && (V1.vector4_f32[1] < V2.vector4_f32[1]) && (V1.vector4_f32[2] < V2.vector4_f32[2])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmplt_ps(V1,V2); + return (((_mm_movemask_ps(vTemp)&7)==7) != 0); +#else // _XM_VMX128_INTRINSICS_ + return XMComparisonAllTrue(XMVector3GreaterR(V2, V1)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector3LessOrEqual +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_f32[0] <= V2.vector4_f32[0]) && (V1.vector4_f32[1] <= V2.vector4_f32[1]) && (V1.vector4_f32[2] <= V2.vector4_f32[2])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmple_ps(V1,V2); + return (((_mm_movemask_ps(vTemp)&7)==7) != 0); +#else // _XM_VMX128_INTRINSICS_ + return XMComparisonAllTrue(XMVector3GreaterOrEqualR(V2, V1)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector3InBounds +( + FXMVECTOR V, + FXMVECTOR Bounds +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V.vector4_f32[0] <= Bounds.vector4_f32[0] && V.vector4_f32[0] >= -Bounds.vector4_f32[0]) && + (V.vector4_f32[1] <= Bounds.vector4_f32[1] && V.vector4_f32[1] >= -Bounds.vector4_f32[1]) && + (V.vector4_f32[2] <= Bounds.vector4_f32[2] && V.vector4_f32[2] >= -Bounds.vector4_f32[2])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + // Test if less than or equal + XMVECTOR vTemp1 = _mm_cmple_ps(V,Bounds); + // Negate the bounds + XMVECTOR vTemp2 = _mm_mul_ps(Bounds,g_XMNegativeOne); + // Test if greater or equal (Reversed) + vTemp2 = _mm_cmple_ps(vTemp2,V); + // Blend answers + vTemp1 = _mm_and_ps(vTemp1,vTemp2); + // x,y and z in bounds? (w is don't care) + return (((_mm_movemask_ps(vTemp1)&0x7)==0x7) != 0); +#else + return XMComparisonAllInBounds(XMVector3InBoundsR(V, Bounds)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE UINT XMVector3InBoundsR +( + FXMVECTOR V, + FXMVECTOR Bounds +) +{ +#if defined(_XM_NO_INTRINSICS_) + UINT CR = 0; + if ((V.vector4_f32[0] <= Bounds.vector4_f32[0] && V.vector4_f32[0] >= -Bounds.vector4_f32[0]) && + (V.vector4_f32[1] <= Bounds.vector4_f32[1] && V.vector4_f32[1] >= -Bounds.vector4_f32[1]) && + (V.vector4_f32[2] <= Bounds.vector4_f32[2] && V.vector4_f32[2] >= -Bounds.vector4_f32[2])) + { + CR = XM_CRMASK_CR6BOUNDS; + } + return CR; + +#elif defined(_XM_SSE_INTRINSICS_) + // Test if less than or equal + XMVECTOR vTemp1 = _mm_cmple_ps(V,Bounds); + // Negate the bounds + XMVECTOR vTemp2 = _mm_mul_ps(Bounds,g_XMNegativeOne); + // Test if greater or equal (Reversed) + vTemp2 = _mm_cmple_ps(vTemp2,V); + // Blend answers + vTemp1 = _mm_and_ps(vTemp1,vTemp2); + // x,y and z in bounds? (w is don't care) + return ((_mm_movemask_ps(vTemp1)&0x7)==0x7) ? XM_CRMASK_CR6BOUNDS : 0; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector3IsNaN +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + return (XMISNAN(V.vector4_f32[0]) || + XMISNAN(V.vector4_f32[1]) || + XMISNAN(V.vector4_f32[2])); + +#elif defined(_XM_SSE_INTRINSICS_) + // Mask off the exponent + __m128i vTempInf = _mm_and_si128(reinterpret_cast(&V)[0],g_XMInfinity); + // Mask off the mantissa + __m128i vTempNan = _mm_and_si128(reinterpret_cast(&V)[0],g_XMQNaNTest); + // Are any of the exponents == 0x7F800000? + vTempInf = _mm_cmpeq_epi32(vTempInf,g_XMInfinity); + // Are any of the mantissa's zero? (SSE2 doesn't have a neq test) + vTempNan = _mm_cmpeq_epi32(vTempNan,g_XMZero); + // Perform a not on the NaN test to be true on NON-zero mantissas + vTempNan = _mm_andnot_si128(vTempNan,vTempInf); + // If x, y or z are NaN, the signs are true after the merge above + return ((_mm_movemask_ps(reinterpret_cast(&vTempNan)[0])&7) != 0); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector3IsInfinite +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (XMISINF(V.vector4_f32[0]) || + XMISINF(V.vector4_f32[1]) || + XMISINF(V.vector4_f32[2])); +#elif defined(_XM_SSE_INTRINSICS_) + // Mask off the sign bit + __m128 vTemp = _mm_and_ps(V,g_XMAbsMask); + // Compare to infinity + vTemp = _mm_cmpeq_ps(vTemp,g_XMInfinity); + // If x,y or z are infinity, the signs are true. + return ((_mm_movemask_ps(vTemp)&7) != 0); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Computation operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3Dot +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + FLOAT fValue = V1.vector4_f32[0] * V2.vector4_f32[0] + V1.vector4_f32[1] * V2.vector4_f32[1] + V1.vector4_f32[2] * V2.vector4_f32[2]; + XMVECTOR vResult = { + fValue, + fValue, + fValue, + fValue + }; + return vResult; + +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product + XMVECTOR vDot = _mm_mul_ps(V1,V2); + // x=Dot.vector4_f32[1], y=Dot.vector4_f32[2] + XMVECTOR vTemp = _mm_shuffle_ps(vDot,vDot,_MM_SHUFFLE(2,1,2,1)); + // Result.vector4_f32[0] = x+y + vDot = _mm_add_ss(vDot,vTemp); + // x=Dot.vector4_f32[2] + vTemp = _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(1,1,1,1)); + // Result.vector4_f32[0] = (x+y)+z + vDot = _mm_add_ss(vDot,vTemp); + // Splat x + return _mm_shuffle_ps(vDot,vDot,_MM_SHUFFLE(0,0,0,0)); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3Cross +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR vResult = { + (V1.vector4_f32[1] * V2.vector4_f32[2]) - (V1.vector4_f32[2] * V2.vector4_f32[1]), + (V1.vector4_f32[2] * V2.vector4_f32[0]) - (V1.vector4_f32[0] * V2.vector4_f32[2]), + (V1.vector4_f32[0] * V2.vector4_f32[1]) - (V1.vector4_f32[1] * V2.vector4_f32[0]), + 0.0f + }; + return vResult; + +#elif defined(_XM_SSE_INTRINSICS_) + // y1,z1,x1,w1 + XMVECTOR vTemp1 = _mm_shuffle_ps(V1,V1,_MM_SHUFFLE(3,0,2,1)); + // z2,x2,y2,w2 + XMVECTOR vTemp2 = _mm_shuffle_ps(V2,V2,_MM_SHUFFLE(3,1,0,2)); + // Perform the left operation + XMVECTOR vResult = _mm_mul_ps(vTemp1,vTemp2); + // z1,x1,y1,w1 + vTemp1 = _mm_shuffle_ps(vTemp1,vTemp1,_MM_SHUFFLE(3,0,2,1)); + // y2,z2,x2,w2 + vTemp2 = _mm_shuffle_ps(vTemp2,vTemp2,_MM_SHUFFLE(3,1,0,2)); + // Perform the right operation + vTemp1 = _mm_mul_ps(vTemp1,vTemp2); + // Subract the right from left, and return answer + vResult = _mm_sub_ps(vResult,vTemp1); + // Set w to zero + return _mm_and_ps(vResult,g_XMMask3); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3LengthSq +( + FXMVECTOR V +) +{ + return XMVector3Dot(V, V); +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3ReciprocalLengthEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result = XMVector3LengthSq(V); + Result = XMVectorReciprocalSqrtEst(Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product on x,y and z + XMVECTOR vLengthSq = _mm_mul_ps(V,V); + // vTemp has z and y + XMVECTOR vTemp = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(1,2,1,2)); + // x+z, y + vLengthSq = _mm_add_ss(vLengthSq,vTemp); + // y,y,y,y + vTemp = _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(1,1,1,1)); + // x+z+y,??,??,?? + vLengthSq = _mm_add_ss(vLengthSq,vTemp); + // Splat the length squared + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(0,0,0,0)); + // Get the reciprocal + vLengthSq = _mm_rsqrt_ps(vLengthSq); + return vLengthSq; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3ReciprocalLength +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result = XMVector3LengthSq(V); + Result = XMVectorReciprocalSqrt(Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product + XMVECTOR vDot = _mm_mul_ps(V,V); + // x=Dot.y, y=Dot.z + XMVECTOR vTemp = _mm_shuffle_ps(vDot,vDot,_MM_SHUFFLE(2,1,2,1)); + // Result.x = x+y + vDot = _mm_add_ss(vDot,vTemp); + // x=Dot.z + vTemp = _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(1,1,1,1)); + // Result.x = (x+y)+z + vDot = _mm_add_ss(vDot,vTemp); + // Splat x + vDot = _mm_shuffle_ps(vDot,vDot,_MM_SHUFFLE(0,0,0,0)); + // Get the reciprocal + vDot = _mm_sqrt_ps(vDot); + // Get the reciprocal + vDot = _mm_div_ps(g_XMOne,vDot); + return vDot; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3LengthEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result = XMVector3LengthSq(V); + Result = XMVectorSqrtEst(Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product on x,y and z + XMVECTOR vLengthSq = _mm_mul_ps(V,V); + // vTemp has z and y + XMVECTOR vTemp = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(1,2,1,2)); + // x+z, y + vLengthSq = _mm_add_ss(vLengthSq,vTemp); + // y,y,y,y + vTemp = _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(1,1,1,1)); + // x+z+y,??,??,?? + vLengthSq = _mm_add_ss(vLengthSq,vTemp); + // Splat the length squared + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(0,0,0,0)); + // Get the length + vLengthSq = _mm_sqrt_ps(vLengthSq); + return vLengthSq; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3Length +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result = XMVector3LengthSq(V); + Result = XMVectorSqrt(Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product on x,y and z + XMVECTOR vLengthSq = _mm_mul_ps(V,V); + // vTemp has z and y + XMVECTOR vTemp = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(1,2,1,2)); + // x+z, y + vLengthSq = _mm_add_ss(vLengthSq,vTemp); + // y,y,y,y + vTemp = _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(1,1,1,1)); + // x+z+y,??,??,?? + vLengthSq = _mm_add_ss(vLengthSq,vTemp); + // Splat the length squared + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(0,0,0,0)); + // Get the length + vLengthSq = _mm_sqrt_ps(vLengthSq); + return vLengthSq; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// XMVector3NormalizeEst uses a reciprocal estimate and +// returns QNaN on zero and infinite vectors. + +XMFINLINE XMVECTOR XMVector3NormalizeEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + Result = XMVector3ReciprocalLength(V); + Result = XMVectorMultiply(V, Result); + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product + XMVECTOR vDot = _mm_mul_ps(V,V); + // x=Dot.y, y=Dot.z + XMVECTOR vTemp = _mm_shuffle_ps(vDot,vDot,_MM_SHUFFLE(2,1,2,1)); + // Result.x = x+y + vDot = _mm_add_ss(vDot,vTemp); + // x=Dot.z + vTemp = _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(1,1,1,1)); + // Result.x = (x+y)+z + vDot = _mm_add_ss(vDot,vTemp); + // Splat x + vDot = _mm_shuffle_ps(vDot,vDot,_MM_SHUFFLE(0,0,0,0)); + // Get the reciprocal + vDot = _mm_rsqrt_ps(vDot); + // Perform the normalization + vDot = _mm_mul_ps(vDot,V); + return vDot; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3Normalize +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + FLOAT fLength; + XMVECTOR vResult; + + vResult = XMVector3Length( V ); + fLength = vResult.vector4_f32[0]; + + // Prevent divide by zero + if (fLength > 0) { + fLength = 1.0f/fLength; + } + + vResult.vector4_f32[0] = V.vector4_f32[0]*fLength; + vResult.vector4_f32[1] = V.vector4_f32[1]*fLength; + vResult.vector4_f32[2] = V.vector4_f32[2]*fLength; + vResult.vector4_f32[3] = V.vector4_f32[3]*fLength; + return vResult; + +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product on x,y and z only + XMVECTOR vLengthSq = _mm_mul_ps(V,V); + XMVECTOR vTemp = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(2,1,2,1)); + vLengthSq = _mm_add_ss(vLengthSq,vTemp); + vTemp = _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(1,1,1,1)); + vLengthSq = _mm_add_ss(vLengthSq,vTemp); + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(0,0,0,0)); + // Prepare for the division + XMVECTOR vResult = _mm_sqrt_ps(vLengthSq); + // Create zero with a single instruction + XMVECTOR vZeroMask = _mm_setzero_ps(); + // Test for a divide by zero (Must be FP to detect -0.0) + vZeroMask = _mm_cmpneq_ps(vZeroMask,vResult); + // Failsafe on zero (Or epsilon) length planes + // If the length is infinity, set the elements to zero + vLengthSq = _mm_cmpneq_ps(vLengthSq,g_XMInfinity); + // Divide to perform the normalization + vResult = _mm_div_ps(V,vResult); + // Any that are infinity, set to zero + vResult = _mm_and_ps(vResult,vZeroMask); + // Select qnan or result based on infinite length + XMVECTOR vTemp1 = _mm_andnot_ps(vLengthSq,g_XMQNaN); + XMVECTOR vTemp2 = _mm_and_ps(vResult,vLengthSq); + vResult = _mm_or_ps(vTemp1,vTemp2); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3ClampLength +( + FXMVECTOR V, + FLOAT LengthMin, + FLOAT LengthMax +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR ClampMax; + XMVECTOR ClampMin; + + ClampMax = XMVectorReplicate(LengthMax); + ClampMin = XMVectorReplicate(LengthMin); + + return XMVector3ClampLengthV(V, ClampMin, ClampMax); + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR ClampMax = _mm_set_ps1(LengthMax); + XMVECTOR ClampMin = _mm_set_ps1(LengthMin); + return XMVector3ClampLengthV(V,ClampMin,ClampMax); +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3ClampLengthV +( + FXMVECTOR V, + FXMVECTOR LengthMin, + FXMVECTOR LengthMax +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR ClampLength; + XMVECTOR LengthSq; + XMVECTOR RcpLength; + XMVECTOR Length; + XMVECTOR Normal; + XMVECTOR Zero; + XMVECTOR InfiniteLength; + XMVECTOR ZeroLength; + XMVECTOR Select; + XMVECTOR ControlMax; + XMVECTOR ControlMin; + XMVECTOR Control; + XMVECTOR Result; + + XMASSERT((LengthMin.vector4_f32[1] == LengthMin.vector4_f32[0]) && (LengthMin.vector4_f32[2] == LengthMin.vector4_f32[0])); + XMASSERT((LengthMax.vector4_f32[1] == LengthMax.vector4_f32[0]) && (LengthMax.vector4_f32[2] == LengthMax.vector4_f32[0])); + XMASSERT(XMVector3GreaterOrEqual(LengthMin, XMVectorZero())); + XMASSERT(XMVector3GreaterOrEqual(LengthMax, XMVectorZero())); + XMASSERT(XMVector3GreaterOrEqual(LengthMax, LengthMin)); + + LengthSq = XMVector3LengthSq(V); + + Zero = XMVectorZero(); + + RcpLength = XMVectorReciprocalSqrt(LengthSq); + + InfiniteLength = XMVectorEqualInt(LengthSq, g_XMInfinity.v); + ZeroLength = XMVectorEqual(LengthSq, Zero); + + Normal = XMVectorMultiply(V, RcpLength); + + Length = XMVectorMultiply(LengthSq, RcpLength); + + Select = XMVectorEqualInt(InfiniteLength, ZeroLength); + Length = XMVectorSelect(LengthSq, Length, Select); + Normal = XMVectorSelect(LengthSq, Normal, Select); + + ControlMax = XMVectorGreater(Length, LengthMax); + ControlMin = XMVectorLess(Length, LengthMin); + + ClampLength = XMVectorSelect(Length, LengthMax, ControlMax); + ClampLength = XMVectorSelect(ClampLength, LengthMin, ControlMin); + + Result = XMVectorMultiply(Normal, ClampLength); + + // Preserve the original vector (with no precision loss) if the length falls within the given range + Control = XMVectorEqualInt(ControlMax, ControlMin); + Result = XMVectorSelect(Result, V, Control); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR ClampLength; + XMVECTOR LengthSq; + XMVECTOR RcpLength; + XMVECTOR Length; + XMVECTOR Normal; + XMVECTOR InfiniteLength; + XMVECTOR ZeroLength; + XMVECTOR Select; + XMVECTOR ControlMax; + XMVECTOR ControlMin; + XMVECTOR Control; + XMVECTOR Result; + + XMASSERT((XMVectorGetY(LengthMin) == XMVectorGetX(LengthMin)) && (XMVectorGetZ(LengthMin) == XMVectorGetX(LengthMin))); + XMASSERT((XMVectorGetY(LengthMax) == XMVectorGetX(LengthMax)) && (XMVectorGetZ(LengthMax) == XMVectorGetX(LengthMax))); + XMASSERT(XMVector3GreaterOrEqual(LengthMin, g_XMZero)); + XMASSERT(XMVector3GreaterOrEqual(LengthMax, g_XMZero)); + XMASSERT(XMVector3GreaterOrEqual(LengthMax, LengthMin)); + + LengthSq = XMVector3LengthSq(V); + RcpLength = XMVectorReciprocalSqrt(LengthSq); + InfiniteLength = XMVectorEqualInt(LengthSq, g_XMInfinity); + ZeroLength = XMVectorEqual(LengthSq,g_XMZero); + Normal = _mm_mul_ps(V, RcpLength); + Length = _mm_mul_ps(LengthSq, RcpLength); + Select = XMVectorEqualInt(InfiniteLength, ZeroLength); + Length = XMVectorSelect(LengthSq, Length, Select); + Normal = XMVectorSelect(LengthSq, Normal, Select); + ControlMax = XMVectorGreater(Length, LengthMax); + ControlMin = XMVectorLess(Length, LengthMin); + ClampLength = XMVectorSelect(Length, LengthMax, ControlMax); + ClampLength = XMVectorSelect(ClampLength, LengthMin, ControlMin); + Result = _mm_mul_ps(Normal, ClampLength); + // Preserve the original vector (with no precision loss) if the length falls within the given range + Control = XMVectorEqualInt(ControlMax, ControlMin); + Result = XMVectorSelect(Result, V, Control); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3Reflect +( + FXMVECTOR Incident, + FXMVECTOR Normal +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + // Result = Incident - (2 * dot(Incident, Normal)) * Normal + Result = XMVector3Dot(Incident, Normal); + Result = XMVectorAdd(Result, Result); + Result = XMVectorNegativeMultiplySubtract(Result, Normal, Incident); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Result = Incident - (2 * dot(Incident, Normal)) * Normal + XMVECTOR Result = XMVector3Dot(Incident, Normal); + Result = _mm_add_ps(Result, Result); + Result = _mm_mul_ps(Result, Normal); + Result = _mm_sub_ps(Incident,Result); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3Refract +( + FXMVECTOR Incident, + FXMVECTOR Normal, + FLOAT RefractionIndex +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Index; + Index = XMVectorReplicate(RefractionIndex); + return XMVector3RefractV(Incident, Normal, Index); + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR Index = _mm_set_ps1(RefractionIndex); + return XMVector3RefractV(Incident,Normal,Index); +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3RefractV +( + FXMVECTOR Incident, + FXMVECTOR Normal, + FXMVECTOR RefractionIndex +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR IDotN; + XMVECTOR R; + CONST XMVECTOR Zero = XMVectorZero(); + + // Result = RefractionIndex * Incident - Normal * (RefractionIndex * dot(Incident, Normal) + + // sqrt(1 - RefractionIndex * RefractionIndex * (1 - dot(Incident, Normal) * dot(Incident, Normal)))) + + IDotN = XMVector3Dot(Incident, Normal); + + // R = 1.0f - RefractionIndex * RefractionIndex * (1.0f - IDotN * IDotN) + R = XMVectorNegativeMultiplySubtract(IDotN, IDotN, g_XMOne.v); + R = XMVectorMultiply(R, RefractionIndex); + R = XMVectorNegativeMultiplySubtract(R, RefractionIndex, g_XMOne.v); + + if (XMVector4LessOrEqual(R, Zero)) + { + // Total internal reflection + return Zero; + } + else + { + XMVECTOR Result; + + // R = RefractionIndex * IDotN + sqrt(R) + R = XMVectorSqrt(R); + R = XMVectorMultiplyAdd(RefractionIndex, IDotN, R); + + // Result = RefractionIndex * Incident - Normal * R + Result = XMVectorMultiply(RefractionIndex, Incident); + Result = XMVectorNegativeMultiplySubtract(Normal, R, Result); + + return Result; + } + +#elif defined(_XM_SSE_INTRINSICS_) + // Result = RefractionIndex * Incident - Normal * (RefractionIndex * dot(Incident, Normal) + + // sqrt(1 - RefractionIndex * RefractionIndex * (1 - dot(Incident, Normal) * dot(Incident, Normal)))) + XMVECTOR IDotN = XMVector3Dot(Incident, Normal); + // R = 1.0f - RefractionIndex * RefractionIndex * (1.0f - IDotN * IDotN) + XMVECTOR R = _mm_mul_ps(IDotN, IDotN); + R = _mm_sub_ps(g_XMOne,R); + R = _mm_mul_ps(R, RefractionIndex); + R = _mm_mul_ps(R, RefractionIndex); + R = _mm_sub_ps(g_XMOne,R); + + XMVECTOR vResult = _mm_cmple_ps(R,g_XMZero); + if (_mm_movemask_ps(vResult)==0x0f) + { + // Total internal reflection + vResult = g_XMZero; + } + else + { + // R = RefractionIndex * IDotN + sqrt(R) + R = _mm_sqrt_ps(R); + vResult = _mm_mul_ps(RefractionIndex,IDotN); + R = _mm_add_ps(R,vResult); + // Result = RefractionIndex * Incident - Normal * R + vResult = _mm_mul_ps(RefractionIndex, Incident); + R = _mm_mul_ps(R,Normal); + vResult = _mm_sub_ps(vResult,R); + } + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3Orthogonal +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR NegativeV; + XMVECTOR Z, YZYY; + XMVECTOR ZIsNegative, YZYYIsNegative; + XMVECTOR S, D; + XMVECTOR R0, R1; + XMVECTOR Select; + XMVECTOR Zero; + XMVECTOR Result; + static CONST XMVECTORU32 Permute1X0X0X0X = {XM_PERMUTE_1X, XM_PERMUTE_0X, XM_PERMUTE_0X, XM_PERMUTE_0X}; + static CONST XMVECTORU32 Permute0Y0Z0Y0Y= {XM_PERMUTE_0Y, XM_PERMUTE_0Z, XM_PERMUTE_0Y, XM_PERMUTE_0Y}; + + Zero = XMVectorZero(); + Z = XMVectorSplatZ(V); + YZYY = XMVectorPermute(V, V, Permute0Y0Z0Y0Y.v); + + NegativeV = XMVectorSubtract(Zero, V); + + ZIsNegative = XMVectorLess(Z, Zero); + YZYYIsNegative = XMVectorLess(YZYY, Zero); + + S = XMVectorAdd(YZYY, Z); + D = XMVectorSubtract(YZYY, Z); + + Select = XMVectorEqualInt(ZIsNegative, YZYYIsNegative); + + R0 = XMVectorPermute(NegativeV, S, Permute1X0X0X0X.v); + R1 = XMVectorPermute(V, D, Permute1X0X0X0X.v); + + Result = XMVectorSelect(R1, R0, Select); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR NegativeV; + XMVECTOR Z, YZYY; + XMVECTOR ZIsNegative, YZYYIsNegative; + XMVECTOR S, D; + XMVECTOR R0, R1; + XMVECTOR Select; + XMVECTOR Zero; + XMVECTOR Result; + static CONST XMVECTORI32 Permute1X0X0X0X = {XM_PERMUTE_1X, XM_PERMUTE_0X, XM_PERMUTE_0X, XM_PERMUTE_0X}; + static CONST XMVECTORI32 Permute0Y0Z0Y0Y= {XM_PERMUTE_0Y, XM_PERMUTE_0Z, XM_PERMUTE_0Y, XM_PERMUTE_0Y}; + + Zero = XMVectorZero(); + Z = XMVectorSplatZ(V); + YZYY = XMVectorPermute(V, V, Permute0Y0Z0Y0Y); + + NegativeV = _mm_sub_ps(Zero, V); + + ZIsNegative = XMVectorLess(Z, Zero); + YZYYIsNegative = XMVectorLess(YZYY, Zero); + + S = _mm_add_ps(YZYY, Z); + D = _mm_sub_ps(YZYY, Z); + + Select = XMVectorEqualInt(ZIsNegative, YZYYIsNegative); + + R0 = XMVectorPermute(NegativeV, S, Permute1X0X0X0X); + R1 = XMVectorPermute(V, D,Permute1X0X0X0X); + Result = XMVectorSelect(R1, R0, Select); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3AngleBetweenNormalsEst +( + FXMVECTOR N1, + FXMVECTOR N2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + XMVECTOR NegativeOne; + XMVECTOR One; + + Result = XMVector3Dot(N1, N2); + NegativeOne = XMVectorSplatConstant(-1, 0); + One = XMVectorSplatOne(); + Result = XMVectorClamp(Result, NegativeOne, One); + Result = XMVectorACosEst(Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = XMVector3Dot(N1,N2); + // Clamp to -1.0f to 1.0f + vResult = _mm_max_ps(vResult,g_XMNegativeOne); + vResult = _mm_min_ps(vResult,g_XMOne); + vResult = XMVectorACosEst(vResult); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3AngleBetweenNormals +( + FXMVECTOR N1, + FXMVECTOR N2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + XMVECTOR NegativeOne; + XMVECTOR One; + + Result = XMVector3Dot(N1, N2); + NegativeOne = XMVectorSplatConstant(-1, 0); + One = XMVectorSplatOne(); + Result = XMVectorClamp(Result, NegativeOne, One); + Result = XMVectorACos(Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = XMVector3Dot(N1,N2); + // Clamp to -1.0f to 1.0f + vResult = _mm_max_ps(vResult,g_XMNegativeOne); + vResult = _mm_min_ps(vResult,g_XMOne); + vResult = XMVectorACos(vResult); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3AngleBetweenVectors +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR L1; + XMVECTOR L2; + XMVECTOR Dot; + XMVECTOR CosAngle; + XMVECTOR NegativeOne; + XMVECTOR One; + XMVECTOR Result; + + L1 = XMVector3ReciprocalLength(V1); + L2 = XMVector3ReciprocalLength(V2); + + Dot = XMVector3Dot(V1, V2); + + L1 = XMVectorMultiply(L1, L2); + + NegativeOne = XMVectorSplatConstant(-1, 0); + One = XMVectorSplatOne(); + + CosAngle = XMVectorMultiply(Dot, L1); + + CosAngle = XMVectorClamp(CosAngle, NegativeOne, One); + + Result = XMVectorACos(CosAngle); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR L1; + XMVECTOR L2; + XMVECTOR Dot; + XMVECTOR CosAngle; + XMVECTOR Result; + + L1 = XMVector3ReciprocalLength(V1); + L2 = XMVector3ReciprocalLength(V2); + Dot = XMVector3Dot(V1, V2); + L1 = _mm_mul_ps(L1, L2); + CosAngle = _mm_mul_ps(Dot, L1); + CosAngle = XMVectorClamp(CosAngle,g_XMNegativeOne,g_XMOne); + Result = XMVectorACos(CosAngle); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3LinePointDistance +( + FXMVECTOR LinePoint1, + FXMVECTOR LinePoint2, + FXMVECTOR Point +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR PointVector; + XMVECTOR LineVector; + XMVECTOR ReciprocalLengthSq; + XMVECTOR PointProjectionScale; + XMVECTOR DistanceVector; + XMVECTOR Result; + + // Given a vector PointVector from LinePoint1 to Point and a vector + // LineVector from LinePoint1 to LinePoint2, the scaled distance + // PointProjectionScale from LinePoint1 to the perpendicular projection + // of PointVector onto the line is defined as: + // + // PointProjectionScale = dot(PointVector, LineVector) / LengthSq(LineVector) + + PointVector = XMVectorSubtract(Point, LinePoint1); + LineVector = XMVectorSubtract(LinePoint2, LinePoint1); + + ReciprocalLengthSq = XMVector3LengthSq(LineVector); + ReciprocalLengthSq = XMVectorReciprocal(ReciprocalLengthSq); + + PointProjectionScale = XMVector3Dot(PointVector, LineVector); + PointProjectionScale = XMVectorMultiply(PointProjectionScale, ReciprocalLengthSq); + + DistanceVector = XMVectorMultiply(LineVector, PointProjectionScale); + DistanceVector = XMVectorSubtract(PointVector, DistanceVector); + + Result = XMVector3Length(DistanceVector); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR PointVector = _mm_sub_ps(Point,LinePoint1); + XMVECTOR LineVector = _mm_sub_ps(LinePoint2,LinePoint1); + XMVECTOR ReciprocalLengthSq = XMVector3LengthSq(LineVector); + XMVECTOR vResult = XMVector3Dot(PointVector,LineVector); + vResult = _mm_div_ps(vResult,ReciprocalLengthSq); + vResult = _mm_mul_ps(vResult,LineVector); + vResult = _mm_sub_ps(PointVector,vResult); + vResult = XMVector3Length(vResult); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE VOID XMVector3ComponentsFromNormal +( + XMVECTOR* pParallel, + XMVECTOR* pPerpendicular, + FXMVECTOR V, + FXMVECTOR Normal +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Parallel; + XMVECTOR Scale; + + XMASSERT(pParallel); + XMASSERT(pPerpendicular); + + Scale = XMVector3Dot(V, Normal); + + Parallel = XMVectorMultiply(Normal, Scale); + + *pParallel = Parallel; + *pPerpendicular = XMVectorSubtract(V, Parallel); + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pParallel); + XMASSERT(pPerpendicular); + XMVECTOR Scale = XMVector3Dot(V, Normal); + XMVECTOR Parallel = _mm_mul_ps(Normal,Scale); + *pParallel = Parallel; + *pPerpendicular = _mm_sub_ps(V,Parallel); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Transform a vector using a rotation expressed as a unit quaternion + +XMFINLINE XMVECTOR XMVector3Rotate +( + FXMVECTOR V, + FXMVECTOR RotationQuaternion +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR A; + XMVECTOR Q; + XMVECTOR Result; + + A = XMVectorSelect(g_XMSelect1110.v, V, g_XMSelect1110.v); + Q = XMQuaternionConjugate(RotationQuaternion); + Result = XMQuaternionMultiply(Q, A); + Result = XMQuaternionMultiply(Result, RotationQuaternion); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR A; + XMVECTOR Q; + XMVECTOR Result; + + A = _mm_and_ps(V,g_XMMask3); + Q = XMQuaternionConjugate(RotationQuaternion); + Result = XMQuaternionMultiply(Q, A); + Result = XMQuaternionMultiply(Result, RotationQuaternion); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Transform a vector using the inverse of a rotation expressed as a unit quaternion + +XMFINLINE XMVECTOR XMVector3InverseRotate +( + FXMVECTOR V, + FXMVECTOR RotationQuaternion +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR A; + XMVECTOR Q; + XMVECTOR Result; + + A = XMVectorSelect(g_XMSelect1110.v, V, g_XMSelect1110.v); + Result = XMQuaternionMultiply(RotationQuaternion, A); + Q = XMQuaternionConjugate(RotationQuaternion); + Result = XMQuaternionMultiply(Result, Q); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR A; + XMVECTOR Q; + XMVECTOR Result; + A = _mm_and_ps(V,g_XMMask3); + Result = XMQuaternionMultiply(RotationQuaternion, A); + Q = XMQuaternionConjugate(RotationQuaternion); + Result = XMQuaternionMultiply(Result, Q); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3Transform +( + FXMVECTOR V, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR X; + XMVECTOR Y; + XMVECTOR Z; + XMVECTOR Result; + + Z = XMVectorSplatZ(V); + Y = XMVectorSplatY(V); + X = XMVectorSplatX(V); + + Result = XMVectorMultiplyAdd(Z, M.r[2], M.r[3]); + Result = XMVectorMultiplyAdd(Y, M.r[1], Result); + Result = XMVectorMultiplyAdd(X, M.r[0], Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(0,0,0,0)); + vResult = _mm_mul_ps(vResult,M.r[0]); + XMVECTOR vTemp = _mm_shuffle_ps(V,V,_MM_SHUFFLE(1,1,1,1)); + vTemp = _mm_mul_ps(vTemp,M.r[1]); + vResult = _mm_add_ps(vResult,vTemp); + vTemp = _mm_shuffle_ps(V,V,_MM_SHUFFLE(2,2,2,2)); + vTemp = _mm_mul_ps(vTemp,M.r[2]); + vResult = _mm_add_ps(vResult,vTemp); + vResult = _mm_add_ps(vResult,M.r[3]); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMFLOAT4* XMVector3TransformStream +( + XMFLOAT4* pOutputStream, + UINT OutputStride, + CONST XMFLOAT3* pInputStream, + UINT InputStride, + UINT VectorCount, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + XMVECTOR X; + XMVECTOR Y; + XMVECTOR Z; + XMVECTOR Result; + UINT i; + BYTE* pInputVector = (BYTE*)pInputStream; + BYTE* pOutputVector = (BYTE*)pOutputStream; + + XMASSERT(pOutputStream); + XMASSERT(pInputStream); + + for (i = 0; i < VectorCount; i++) + { + V = XMLoadFloat3((XMFLOAT3*)pInputVector); + Z = XMVectorSplatZ(V); + Y = XMVectorSplatY(V); + X = XMVectorSplatX(V); + + Result = XMVectorMultiplyAdd(Z, M.r[2], M.r[3]); + Result = XMVectorMultiplyAdd(Y, M.r[1], Result); + Result = XMVectorMultiplyAdd(X, M.r[0], Result); + + XMStoreFloat4((XMFLOAT4*)pOutputVector, Result); + + pInputVector += InputStride; + pOutputVector += OutputStride; + } + + return pOutputStream; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pOutputStream); + XMASSERT(pInputStream); + UINT i; + const BYTE* pInputVector = (const BYTE*)pInputStream; + BYTE* pOutputVector = (BYTE*)pOutputStream; + + for (i = 0; i < VectorCount; i++) + { + XMVECTOR X = _mm_load_ps1(&reinterpret_cast(pInputVector)->x); + XMVECTOR Y = _mm_load_ps1(&reinterpret_cast(pInputVector)->y); + XMVECTOR vResult = _mm_load_ps1(&reinterpret_cast(pInputVector)->z); + vResult = _mm_mul_ps(vResult,M.r[2]); + vResult = _mm_add_ps(vResult,M.r[3]); + Y = _mm_mul_ps(Y,M.r[1]); + vResult = _mm_add_ps(vResult,Y); + X = _mm_mul_ps(X,M.r[0]); + vResult = _mm_add_ps(vResult,X); + _mm_storeu_ps(reinterpret_cast(pOutputVector),vResult); + pInputVector += InputStride; + pOutputVector += OutputStride; + } + + return pOutputStream; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMFLOAT4* XMVector3TransformStreamNC +( + XMFLOAT4* pOutputStream, + UINT OutputStride, + CONST XMFLOAT3* pInputStream, + UINT InputStride, + UINT VectorCount, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) || defined(XM_NO_MISALIGNED_VECTOR_ACCESS) || defined(_XM_SSE_INTRINSICS_) + return XMVector3TransformStream( pOutputStream, OutputStride, pInputStream, InputStride, VectorCount, M ); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3TransformCoord +( + FXMVECTOR V, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR X; + XMVECTOR Y; + XMVECTOR Z; + XMVECTOR InverseW; + XMVECTOR Result; + + Z = XMVectorSplatZ(V); + Y = XMVectorSplatY(V); + X = XMVectorSplatX(V); + + Result = XMVectorMultiplyAdd(Z, M.r[2], M.r[3]); + Result = XMVectorMultiplyAdd(Y, M.r[1], Result); + Result = XMVectorMultiplyAdd(X, M.r[0], Result); + + InverseW = XMVectorSplatW(Result); + InverseW = XMVectorReciprocal(InverseW); + + Result = XMVectorMultiply(Result, InverseW); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(0,0,0,0)); + vResult = _mm_mul_ps(vResult,M.r[0]); + XMVECTOR vTemp = _mm_shuffle_ps(V,V,_MM_SHUFFLE(1,1,1,1)); + vTemp = _mm_mul_ps(vTemp,M.r[1]); + vResult = _mm_add_ps(vResult,vTemp); + vTemp = _mm_shuffle_ps(V,V,_MM_SHUFFLE(2,2,2,2)); + vTemp = _mm_mul_ps(vTemp,M.r[2]); + vResult = _mm_add_ps(vResult,vTemp); + vResult = _mm_add_ps(vResult,M.r[3]); + vTemp = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(3,3,3,3)); + vResult = _mm_div_ps(vResult,vTemp); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMFLOAT3* XMVector3TransformCoordStream +( + XMFLOAT3* pOutputStream, + UINT OutputStride, + CONST XMFLOAT3* pInputStream, + UINT InputStride, + UINT VectorCount, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + XMVECTOR X; + XMVECTOR Y; + XMVECTOR Z; + XMVECTOR InverseW; + XMVECTOR Result; + UINT i; + BYTE* pInputVector = (BYTE*)pInputStream; + BYTE* pOutputVector = (BYTE*)pOutputStream; + + XMASSERT(pOutputStream); + XMASSERT(pInputStream); + + for (i = 0; i < VectorCount; i++) + { + V = XMLoadFloat3((XMFLOAT3*)pInputVector); + Z = XMVectorSplatZ(V); + Y = XMVectorSplatY(V); + X = XMVectorSplatX(V); +// Z = XMVectorReplicate(((XMFLOAT3*)pInputVector)->z); +// Y = XMVectorReplicate(((XMFLOAT3*)pInputVector)->y); +// X = XMVectorReplicate(((XMFLOAT3*)pInputVector)->x); + + Result = XMVectorMultiplyAdd(Z, M.r[2], M.r[3]); + Result = XMVectorMultiplyAdd(Y, M.r[1], Result); + Result = XMVectorMultiplyAdd(X, M.r[0], Result); + + InverseW = XMVectorSplatW(Result); + InverseW = XMVectorReciprocal(InverseW); + + Result = XMVectorMultiply(Result, InverseW); + + XMStoreFloat3((XMFLOAT3*)pOutputVector, Result); + + pInputVector += InputStride; + pOutputVector += OutputStride; + } + + return pOutputStream; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pOutputStream); + XMASSERT(pInputStream); + + UINT i; + const BYTE *pInputVector = (BYTE*)pInputStream; + BYTE *pOutputVector = (BYTE*)pOutputStream; + + for (i = 0; i < VectorCount; i++) + { + XMVECTOR X = _mm_load_ps1(&reinterpret_cast(pInputVector)->x); + XMVECTOR Y = _mm_load_ps1(&reinterpret_cast(pInputVector)->y); + XMVECTOR vResult = _mm_load_ps1(&reinterpret_cast(pInputVector)->z); + vResult = _mm_mul_ps(vResult,M.r[2]); + vResult = _mm_add_ps(vResult,M.r[3]); + Y = _mm_mul_ps(Y,M.r[1]); + vResult = _mm_add_ps(vResult,Y); + X = _mm_mul_ps(X,M.r[0]); + vResult = _mm_add_ps(vResult,X); + + X = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(3,3,3,3)); + vResult = _mm_div_ps(vResult,X); + _mm_store_ss(&reinterpret_cast(pOutputVector)->x,vResult); + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(0,3,2,1)); + _mm_store_ss(&reinterpret_cast(pOutputVector)->y,vResult); + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(0,3,2,1)); + _mm_store_ss(&reinterpret_cast(pOutputVector)->z,vResult); + pInputVector += InputStride; + pOutputVector += OutputStride; + } + + return pOutputStream; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3TransformNormal +( + FXMVECTOR V, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR X; + XMVECTOR Y; + XMVECTOR Z; + XMVECTOR Result; + + Z = XMVectorSplatZ(V); + Y = XMVectorSplatY(V); + X = XMVectorSplatX(V); + + Result = XMVectorMultiply(Z, M.r[2]); + Result = XMVectorMultiplyAdd(Y, M.r[1], Result); + Result = XMVectorMultiplyAdd(X, M.r[0], Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(0,0,0,0)); + vResult = _mm_mul_ps(vResult,M.r[0]); + XMVECTOR vTemp = _mm_shuffle_ps(V,V,_MM_SHUFFLE(1,1,1,1)); + vTemp = _mm_mul_ps(vTemp,M.r[1]); + vResult = _mm_add_ps(vResult,vTemp); + vTemp = _mm_shuffle_ps(V,V,_MM_SHUFFLE(2,2,2,2)); + vTemp = _mm_mul_ps(vTemp,M.r[2]); + vResult = _mm_add_ps(vResult,vTemp); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMFLOAT3* XMVector3TransformNormalStream +( + XMFLOAT3* pOutputStream, + UINT OutputStride, + CONST XMFLOAT3* pInputStream, + UINT InputStride, + UINT VectorCount, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + XMVECTOR X; + XMVECTOR Y; + XMVECTOR Z; + XMVECTOR Result; + UINT i; + BYTE* pInputVector = (BYTE*)pInputStream; + BYTE* pOutputVector = (BYTE*)pOutputStream; + + XMASSERT(pOutputStream); + XMASSERT(pInputStream); + + for (i = 0; i < VectorCount; i++) + { + V = XMLoadFloat3((XMFLOAT3*)pInputVector); + Z = XMVectorSplatZ(V); + Y = XMVectorSplatY(V); + X = XMVectorSplatX(V); +// Z = XMVectorReplicate(((XMFLOAT3*)pInputVector)->z); +// Y = XMVectorReplicate(((XMFLOAT3*)pInputVector)->y); +// X = XMVectorReplicate(((XMFLOAT3*)pInputVector)->x); + + Result = XMVectorMultiply(Z, M.r[2]); + Result = XMVectorMultiplyAdd(Y, M.r[1], Result); + Result = XMVectorMultiplyAdd(X, M.r[0], Result); + + XMStoreFloat3((XMFLOAT3*)pOutputVector, Result); + + pInputVector += InputStride; + pOutputVector += OutputStride; + } + + return pOutputStream; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pOutputStream); + XMASSERT(pInputStream); + + UINT i; + const BYTE *pInputVector = (BYTE*)pInputStream; + BYTE *pOutputVector = (BYTE*)pOutputStream; + + for (i = 0; i < VectorCount; i++) + { + XMVECTOR X = _mm_load_ps1(&reinterpret_cast(pInputVector)->x); + XMVECTOR Y = _mm_load_ps1(&reinterpret_cast(pInputVector)->y); + XMVECTOR vResult = _mm_load_ps1(&reinterpret_cast(pInputVector)->z); + vResult = _mm_mul_ps(vResult,M.r[2]); + Y = _mm_mul_ps(Y,M.r[1]); + vResult = _mm_add_ps(vResult,Y); + X = _mm_mul_ps(X,M.r[0]); + vResult = _mm_add_ps(vResult,X); + _mm_store_ss(&reinterpret_cast(pOutputVector)->x,vResult); + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(0,3,2,1)); + _mm_store_ss(&reinterpret_cast(pOutputVector)->y,vResult); + vResult = _mm_shuffle_ps(vResult,vResult,_MM_SHUFFLE(0,3,2,1)); + _mm_store_ss(&reinterpret_cast(pOutputVector)->z,vResult); + pInputVector += InputStride; + pOutputVector += OutputStride; + } + + return pOutputStream; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMVECTOR XMVector3Project +( + FXMVECTOR V, + FLOAT ViewportX, + FLOAT ViewportY, + FLOAT ViewportWidth, + FLOAT ViewportHeight, + FLOAT ViewportMinZ, + FLOAT ViewportMaxZ, + CXMMATRIX Projection, + CXMMATRIX View, + CXMMATRIX World +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMMATRIX Transform; + XMVECTOR Scale; + XMVECTOR Offset; + XMVECTOR Result; + FLOAT HalfViewportWidth = ViewportWidth * 0.5f; + FLOAT HalfViewportHeight = ViewportHeight * 0.5f; + + Scale = XMVectorSet(HalfViewportWidth, + -HalfViewportHeight, + ViewportMaxZ - ViewportMinZ, + 0.0f); + + Offset = XMVectorSet(ViewportX + HalfViewportWidth, + ViewportY + HalfViewportHeight, + ViewportMinZ, + 0.0f); + + Transform = XMMatrixMultiply(World, View); + Transform = XMMatrixMultiply(Transform, Projection); + + Result = XMVector3TransformCoord(V, Transform); + + Result = XMVectorMultiplyAdd(Result, Scale, Offset); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMMATRIX Transform; + XMVECTOR Scale; + XMVECTOR Offset; + XMVECTOR Result; + FLOAT HalfViewportWidth = ViewportWidth * 0.5f; + FLOAT HalfViewportHeight = ViewportHeight * 0.5f; + + Scale = XMVectorSet(HalfViewportWidth, + -HalfViewportHeight, + ViewportMaxZ - ViewportMinZ, + 0.0f); + + Offset = XMVectorSet(ViewportX + HalfViewportWidth, + ViewportY + HalfViewportHeight, + ViewportMinZ, + 0.0f); + Transform = XMMatrixMultiply(World, View); + Transform = XMMatrixMultiply(Transform, Projection); + Result = XMVector3TransformCoord(V, Transform); + Result = _mm_mul_ps(Result,Scale); + Result = _mm_add_ps(Result,Offset); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMFLOAT3* XMVector3ProjectStream +( + XMFLOAT3* pOutputStream, + UINT OutputStride, + CONST XMFLOAT3* pInputStream, + UINT InputStride, + UINT VectorCount, + FLOAT ViewportX, + FLOAT ViewportY, + FLOAT ViewportWidth, + FLOAT ViewportHeight, + FLOAT ViewportMinZ, + FLOAT ViewportMaxZ, + CXMMATRIX Projection, + CXMMATRIX View, + CXMMATRIX World +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMMATRIX Transform; + XMVECTOR V; + XMVECTOR Scale; + XMVECTOR Offset; + XMVECTOR Result; + UINT i; + FLOAT HalfViewportWidth = ViewportWidth * 0.5f; + FLOAT HalfViewportHeight = ViewportHeight * 0.5f; + BYTE* pInputVector = (BYTE*)pInputStream; + BYTE* pOutputVector = (BYTE*)pOutputStream; + + XMASSERT(pOutputStream); + XMASSERT(pInputStream); + + Scale = XMVectorSet(HalfViewportWidth, + -HalfViewportHeight, + ViewportMaxZ - ViewportMinZ, + 1.0f); + + Offset = XMVectorSet(ViewportX + HalfViewportWidth, + ViewportY + HalfViewportHeight, + ViewportMinZ, + 0.0f); + + Transform = XMMatrixMultiply(World, View); + Transform = XMMatrixMultiply(Transform, Projection); + + for (i = 0; i < VectorCount; i++) + { + V = XMLoadFloat3((XMFLOAT3*)pInputVector); + + Result = XMVector3TransformCoord(V, Transform); + + Result = XMVectorMultiplyAdd(Result, Scale, Offset); + + XMStoreFloat3((XMFLOAT3*)pOutputVector, Result); + + pInputVector += InputStride; + pOutputVector += OutputStride; + } + + return pOutputStream; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pOutputStream); + XMASSERT(pInputStream); + XMMATRIX Transform; + XMVECTOR V; + XMVECTOR Scale; + XMVECTOR Offset; + XMVECTOR Result; + UINT i; + FLOAT HalfViewportWidth = ViewportWidth * 0.5f; + FLOAT HalfViewportHeight = ViewportHeight * 0.5f; + BYTE* pInputVector = (BYTE*)pInputStream; + BYTE* pOutputVector = (BYTE*)pOutputStream; + + Scale = XMVectorSet(HalfViewportWidth, + -HalfViewportHeight, + ViewportMaxZ - ViewportMinZ, + 1.0f); + + Offset = XMVectorSet(ViewportX + HalfViewportWidth, + ViewportY + HalfViewportHeight, + ViewportMinZ, + 0.0f); + + Transform = XMMatrixMultiply(World, View); + Transform = XMMatrixMultiply(Transform, Projection); + + for (i = 0; i < VectorCount; i++) + { + V = XMLoadFloat3((XMFLOAT3*)pInputVector); + + Result = XMVector3TransformCoord(V, Transform); + + Result = _mm_mul_ps(Result,Scale); + Result = _mm_add_ps(Result,Offset); + XMStoreFloat3((XMFLOAT3*)pOutputVector, Result); + pInputVector += InputStride; + pOutputVector += OutputStride; + } + return pOutputStream; + +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector3Unproject +( + FXMVECTOR V, + FLOAT ViewportX, + FLOAT ViewportY, + FLOAT ViewportWidth, + FLOAT ViewportHeight, + FLOAT ViewportMinZ, + FLOAT ViewportMaxZ, + CXMMATRIX Projection, + CXMMATRIX View, + CXMMATRIX World +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMMATRIX Transform; + XMVECTOR Scale; + XMVECTOR Offset; + XMVECTOR Determinant; + XMVECTOR Result; + CONST XMVECTOR D = XMVectorSet(-1.0f, 1.0f, 0.0f, 0.0f); + + Scale = XMVectorSet(ViewportWidth * 0.5f, + -ViewportHeight * 0.5f, + ViewportMaxZ - ViewportMinZ, + 1.0f); + Scale = XMVectorReciprocal(Scale); + + Offset = XMVectorSet(-ViewportX, + -ViewportY, + -ViewportMinZ, + 0.0f); + Offset = XMVectorMultiplyAdd(Scale, Offset, D); + + Transform = XMMatrixMultiply(World, View); + Transform = XMMatrixMultiply(Transform, Projection); + Transform = XMMatrixInverse(&Determinant, Transform); + + Result = XMVectorMultiplyAdd(V, Scale, Offset); + + Result = XMVector3TransformCoord(Result, Transform); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMMATRIX Transform; + XMVECTOR Scale; + XMVECTOR Offset; + XMVECTOR Determinant; + XMVECTOR Result; + CONST XMVECTORF32 D = {-1.0f, 1.0f, 0.0f, 0.0f}; + + Scale = XMVectorSet(ViewportWidth * 0.5f, + -ViewportHeight * 0.5f, + ViewportMaxZ - ViewportMinZ, + 1.0f); + Scale = XMVectorReciprocal(Scale); + + Offset = XMVectorSet(-ViewportX, + -ViewportY, + -ViewportMinZ, + 0.0f); + Offset = _mm_mul_ps(Offset,Scale); + Offset = _mm_add_ps(Offset,D); + + Transform = XMMatrixMultiply(World, View); + Transform = XMMatrixMultiply(Transform, Projection); + Transform = XMMatrixInverse(&Determinant, Transform); + + Result = _mm_mul_ps(V,Scale); + Result = _mm_add_ps(Result,Offset); + + Result = XMVector3TransformCoord(Result, Transform); + + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMFLOAT3* XMVector3UnprojectStream +( + XMFLOAT3* pOutputStream, + UINT OutputStride, + CONST XMFLOAT3* pInputStream, + UINT InputStride, + UINT VectorCount, + FLOAT ViewportX, + FLOAT ViewportY, + FLOAT ViewportWidth, + FLOAT ViewportHeight, + FLOAT ViewportMinZ, + FLOAT ViewportMaxZ, + CXMMATRIX Projection, + CXMMATRIX View, + CXMMATRIX World) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMMATRIX Transform; + XMVECTOR Scale; + XMVECTOR Offset; + XMVECTOR V; + XMVECTOR Determinant; + XMVECTOR Result; + UINT i; + BYTE* pInputVector = (BYTE*)pInputStream; + BYTE* pOutputVector = (BYTE*)pOutputStream; + CONST XMVECTOR D = XMVectorSet(-1.0f, 1.0f, 0.0f, 0.0f); + + XMASSERT(pOutputStream); + XMASSERT(pInputStream); + + Scale = XMVectorSet(ViewportWidth * 0.5f, + -ViewportHeight * 0.5f, + ViewportMaxZ - ViewportMinZ, + 1.0f); + Scale = XMVectorReciprocal(Scale); + + Offset = XMVectorSet(-ViewportX, + -ViewportY, + -ViewportMinZ, + 0.0f); + Offset = XMVectorMultiplyAdd(Scale, Offset, D); + + Transform = XMMatrixMultiply(World, View); + Transform = XMMatrixMultiply(Transform, Projection); + Transform = XMMatrixInverse(&Determinant, Transform); + + for (i = 0; i < VectorCount; i++) + { + V = XMLoadFloat3((XMFLOAT3*)pInputVector); + + Result = XMVectorMultiplyAdd(V, Scale, Offset); + + Result = XMVector3TransformCoord(Result, Transform); + + XMStoreFloat3((XMFLOAT3*)pOutputVector, Result); + + pInputVector += InputStride; + pOutputVector += OutputStride; + } + + return pOutputStream; + +#elif defined(_XM_SSE_INTRINSICS_) + XMASSERT(pOutputStream); + XMASSERT(pInputStream); + XMMATRIX Transform; + XMVECTOR Scale; + XMVECTOR Offset; + XMVECTOR V; + XMVECTOR Determinant; + XMVECTOR Result; + UINT i; + BYTE* pInputVector = (BYTE*)pInputStream; + BYTE* pOutputVector = (BYTE*)pOutputStream; + CONST XMVECTORF32 D = {-1.0f, 1.0f, 0.0f, 0.0f}; + + Scale = XMVectorSet(ViewportWidth * 0.5f, + -ViewportHeight * 0.5f, + ViewportMaxZ - ViewportMinZ, + 1.0f); + Scale = XMVectorReciprocal(Scale); + + Offset = XMVectorSet(-ViewportX, + -ViewportY, + -ViewportMinZ, + 0.0f); + Offset = _mm_mul_ps(Offset,Scale); + Offset = _mm_add_ps(Offset,D); + + Transform = XMMatrixMultiply(World, View); + Transform = XMMatrixMultiply(Transform, Projection); + Transform = XMMatrixInverse(&Determinant, Transform); + + for (i = 0; i < VectorCount; i++) + { + V = XMLoadFloat3((XMFLOAT3*)pInputVector); + + Result = XMVectorMultiplyAdd(V, Scale, Offset); + + Result = XMVector3TransformCoord(Result, Transform); + + XMStoreFloat3((XMFLOAT3*)pOutputVector, Result); + + pInputVector += InputStride; + pOutputVector += OutputStride; + } + + return pOutputStream; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +/**************************************************************************** + * + * 4D Vector + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ +// Comparison operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector4Equal +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_f32[0] == V2.vector4_f32[0]) && (V1.vector4_f32[1] == V2.vector4_f32[1]) && (V1.vector4_f32[2] == V2.vector4_f32[2]) && (V1.vector4_f32[3] == V2.vector4_f32[3])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmpeq_ps(V1,V2); + return ((_mm_movemask_ps(vTemp)==0x0f) != 0); +#else + return XMComparisonAllTrue(XMVector4EqualR(V1, V2)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE UINT XMVector4EqualR +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + UINT CR = 0; + + if ((V1.vector4_f32[0] == V2.vector4_f32[0]) && + (V1.vector4_f32[1] == V2.vector4_f32[1]) && + (V1.vector4_f32[2] == V2.vector4_f32[2]) && + (V1.vector4_f32[3] == V2.vector4_f32[3])) + { + CR = XM_CRMASK_CR6TRUE; + } + else if ((V1.vector4_f32[0] != V2.vector4_f32[0]) && + (V1.vector4_f32[1] != V2.vector4_f32[1]) && + (V1.vector4_f32[2] != V2.vector4_f32[2]) && + (V1.vector4_f32[3] != V2.vector4_f32[3])) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmpeq_ps(V1,V2); + int iTest = _mm_movemask_ps(vTemp); + UINT CR = 0; + if (iTest==0xf) // All equal? + { + CR = XM_CRMASK_CR6TRUE; + } + else if (iTest==0) // All not equal? + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector4EqualInt +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_u32[0] == V2.vector4_u32[0]) && (V1.vector4_u32[1] == V2.vector4_u32[1]) && (V1.vector4_u32[2] == V2.vector4_u32[2]) && (V1.vector4_u32[3] == V2.vector4_u32[3])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + __m128i vTemp = _mm_cmpeq_epi32(reinterpret_cast(&V1)[0],reinterpret_cast(&V2)[0]); + return ((_mm_movemask_ps(reinterpret_cast(&vTemp)[0])==0xf) != 0); +#else + return XMComparisonAllTrue(XMVector4EqualIntR(V1, V2)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE UINT XMVector4EqualIntR +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + UINT CR = 0; + if (V1.vector4_u32[0] == V2.vector4_u32[0] && + V1.vector4_u32[1] == V2.vector4_u32[1] && + V1.vector4_u32[2] == V2.vector4_u32[2] && + V1.vector4_u32[3] == V2.vector4_u32[3]) + { + CR = XM_CRMASK_CR6TRUE; + } + else if (V1.vector4_u32[0] != V2.vector4_u32[0] && + V1.vector4_u32[1] != V2.vector4_u32[1] && + V1.vector4_u32[2] != V2.vector4_u32[2] && + V1.vector4_u32[3] != V2.vector4_u32[3]) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; + +#elif defined(_XM_SSE_INTRINSICS_) + __m128i vTemp = _mm_cmpeq_epi32(reinterpret_cast(&V1)[0],reinterpret_cast(&V2)[0]); + int iTest = _mm_movemask_ps(reinterpret_cast(&vTemp)[0]); + UINT CR = 0; + if (iTest==0xf) // All equal? + { + CR = XM_CRMASK_CR6TRUE; + } + else if (iTest==0) // All not equal? + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +XMFINLINE BOOL XMVector4NearEqual +( + FXMVECTOR V1, + FXMVECTOR V2, + FXMVECTOR Epsilon +) +{ +#if defined(_XM_NO_INTRINSICS_) + FLOAT dx, dy, dz, dw; + + dx = fabsf(V1.vector4_f32[0]-V2.vector4_f32[0]); + dy = fabsf(V1.vector4_f32[1]-V2.vector4_f32[1]); + dz = fabsf(V1.vector4_f32[2]-V2.vector4_f32[2]); + dw = fabsf(V1.vector4_f32[3]-V2.vector4_f32[3]); + return (((dx <= Epsilon.vector4_f32[0]) && + (dy <= Epsilon.vector4_f32[1]) && + (dz <= Epsilon.vector4_f32[2]) && + (dw <= Epsilon.vector4_f32[3])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + // Get the difference + XMVECTOR vDelta = _mm_sub_ps(V1,V2); + // Get the absolute value of the difference + XMVECTOR vTemp = _mm_setzero_ps(); + vTemp = _mm_sub_ps(vTemp,vDelta); + vTemp = _mm_max_ps(vTemp,vDelta); + vTemp = _mm_cmple_ps(vTemp,Epsilon); + return ((_mm_movemask_ps(vTemp)==0xf) != 0); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector4NotEqual +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_f32[0] != V2.vector4_f32[0]) || (V1.vector4_f32[1] != V2.vector4_f32[1]) || (V1.vector4_f32[2] != V2.vector4_f32[2]) || (V1.vector4_f32[3] != V2.vector4_f32[3])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmpneq_ps(V1,V2); + return ((_mm_movemask_ps(vTemp)) != 0); +#else + return XMComparisonAnyFalse(XMVector4EqualR(V1, V2)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector4NotEqualInt +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_u32[0] != V2.vector4_u32[0]) || (V1.vector4_u32[1] != V2.vector4_u32[1]) || (V1.vector4_u32[2] != V2.vector4_u32[2]) || (V1.vector4_u32[3] != V2.vector4_u32[3])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + __m128i vTemp = _mm_cmpeq_epi32(reinterpret_cast(&V1)[0],reinterpret_cast(&V2)[0]); + return ((_mm_movemask_ps(reinterpret_cast(&vTemp)[0])!=0xF) != 0); +#else + return XMComparisonAnyFalse(XMVector4EqualIntR(V1, V2)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector4Greater +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_f32[0] > V2.vector4_f32[0]) && (V1.vector4_f32[1] > V2.vector4_f32[1]) && (V1.vector4_f32[2] > V2.vector4_f32[2]) && (V1.vector4_f32[3] > V2.vector4_f32[3])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmpgt_ps(V1,V2); + return ((_mm_movemask_ps(vTemp)==0x0f) != 0); +#else + return XMComparisonAllTrue(XMVector4GreaterR(V1, V2)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE UINT XMVector4GreaterR +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + UINT CR = 0; + if (V1.vector4_f32[0] > V2.vector4_f32[0] && + V1.vector4_f32[1] > V2.vector4_f32[1] && + V1.vector4_f32[2] > V2.vector4_f32[2] && + V1.vector4_f32[3] > V2.vector4_f32[3]) + { + CR = XM_CRMASK_CR6TRUE; + } + else if (V1.vector4_f32[0] <= V2.vector4_f32[0] && + V1.vector4_f32[1] <= V2.vector4_f32[1] && + V1.vector4_f32[2] <= V2.vector4_f32[2] && + V1.vector4_f32[3] <= V2.vector4_f32[3]) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; + +#elif defined(_XM_SSE_INTRINSICS_) + UINT CR = 0; + XMVECTOR vTemp = _mm_cmpgt_ps(V1,V2); + int iTest = _mm_movemask_ps(vTemp); + if (iTest==0xf) { + CR = XM_CRMASK_CR6TRUE; + } + else if (!iTest) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector4GreaterOrEqual +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_f32[0] >= V2.vector4_f32[0]) && (V1.vector4_f32[1] >= V2.vector4_f32[1]) && (V1.vector4_f32[2] >= V2.vector4_f32[2]) && (V1.vector4_f32[3] >= V2.vector4_f32[3])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmpge_ps(V1,V2); + return ((_mm_movemask_ps(vTemp)==0x0f) != 0); +#else + return XMComparisonAllTrue(XMVector4GreaterOrEqualR(V1, V2)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE UINT XMVector4GreaterOrEqualR +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + UINT CR = 0; + if ((V1.vector4_f32[0] >= V2.vector4_f32[0]) && + (V1.vector4_f32[1] >= V2.vector4_f32[1]) && + (V1.vector4_f32[2] >= V2.vector4_f32[2]) && + (V1.vector4_f32[3] >= V2.vector4_f32[3])) + { + CR = XM_CRMASK_CR6TRUE; + } + else if ((V1.vector4_f32[0] < V2.vector4_f32[0]) && + (V1.vector4_f32[1] < V2.vector4_f32[1]) && + (V1.vector4_f32[2] < V2.vector4_f32[2]) && + (V1.vector4_f32[3] < V2.vector4_f32[3])) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; + +#elif defined(_XM_SSE_INTRINSICS_) + UINT CR = 0; + XMVECTOR vTemp = _mm_cmpge_ps(V1,V2); + int iTest = _mm_movemask_ps(vTemp); + if (iTest==0x0f) + { + CR = XM_CRMASK_CR6TRUE; + } + else if (!iTest) + { + CR = XM_CRMASK_CR6FALSE; + } + return CR; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector4Less +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_f32[0] < V2.vector4_f32[0]) && (V1.vector4_f32[1] < V2.vector4_f32[1]) && (V1.vector4_f32[2] < V2.vector4_f32[2]) && (V1.vector4_f32[3] < V2.vector4_f32[3])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmplt_ps(V1,V2); + return ((_mm_movemask_ps(vTemp)==0x0f) != 0); +#else + return XMComparisonAllTrue(XMVector4GreaterR(V2, V1)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector4LessOrEqual +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V1.vector4_f32[0] <= V2.vector4_f32[0]) && (V1.vector4_f32[1] <= V2.vector4_f32[1]) && (V1.vector4_f32[2] <= V2.vector4_f32[2]) && (V1.vector4_f32[3] <= V2.vector4_f32[3])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp = _mm_cmple_ps(V1,V2); + return ((_mm_movemask_ps(vTemp)==0x0f) != 0); +#else + return XMComparisonAllTrue(XMVector4GreaterOrEqualR(V2, V1)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector4InBounds +( + FXMVECTOR V, + FXMVECTOR Bounds +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (((V.vector4_f32[0] <= Bounds.vector4_f32[0] && V.vector4_f32[0] >= -Bounds.vector4_f32[0]) && + (V.vector4_f32[1] <= Bounds.vector4_f32[1] && V.vector4_f32[1] >= -Bounds.vector4_f32[1]) && + (V.vector4_f32[2] <= Bounds.vector4_f32[2] && V.vector4_f32[2] >= -Bounds.vector4_f32[2]) && + (V.vector4_f32[3] <= Bounds.vector4_f32[3] && V.vector4_f32[3] >= -Bounds.vector4_f32[3])) != 0); +#elif defined(_XM_SSE_INTRINSICS_) + // Test if less than or equal + XMVECTOR vTemp1 = _mm_cmple_ps(V,Bounds); + // Negate the bounds + XMVECTOR vTemp2 = _mm_mul_ps(Bounds,g_XMNegativeOne); + // Test if greater or equal (Reversed) + vTemp2 = _mm_cmple_ps(vTemp2,V); + // Blend answers + vTemp1 = _mm_and_ps(vTemp1,vTemp2); + // All in bounds? + return ((_mm_movemask_ps(vTemp1)==0x0f) != 0); +#else + return XMComparisonAllInBounds(XMVector4InBoundsR(V, Bounds)); +#endif +} + +//------------------------------------------------------------------------------ + +XMFINLINE UINT XMVector4InBoundsR +( + FXMVECTOR V, + FXMVECTOR Bounds +) +{ +#if defined(_XM_NO_INTRINSICS_) + + UINT CR = 0; + if ((V.vector4_f32[0] <= Bounds.vector4_f32[0] && V.vector4_f32[0] >= -Bounds.vector4_f32[0]) && + (V.vector4_f32[1] <= Bounds.vector4_f32[1] && V.vector4_f32[1] >= -Bounds.vector4_f32[1]) && + (V.vector4_f32[2] <= Bounds.vector4_f32[2] && V.vector4_f32[2] >= -Bounds.vector4_f32[2]) && + (V.vector4_f32[3] <= Bounds.vector4_f32[3] && V.vector4_f32[3] >= -Bounds.vector4_f32[3])) + { + CR = XM_CRMASK_CR6BOUNDS; + } + return CR; + +#elif defined(_XM_SSE_INTRINSICS_) + // Test if less than or equal + XMVECTOR vTemp1 = _mm_cmple_ps(V,Bounds); + // Negate the bounds + XMVECTOR vTemp2 = _mm_mul_ps(Bounds,g_XMNegativeOne); + // Test if greater or equal (Reversed) + vTemp2 = _mm_cmple_ps(vTemp2,V); + // Blend answers + vTemp1 = _mm_and_ps(vTemp1,vTemp2); + // All in bounds? + return (_mm_movemask_ps(vTemp1)==0x0f) ? XM_CRMASK_CR6BOUNDS : 0; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector4IsNaN +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + return (XMISNAN(V.vector4_f32[0]) || + XMISNAN(V.vector4_f32[1]) || + XMISNAN(V.vector4_f32[2]) || + XMISNAN(V.vector4_f32[3])); +#elif defined(_XM_SSE_INTRINSICS_) + // Test against itself. NaN is always not equal + XMVECTOR vTempNan = _mm_cmpneq_ps(V,V); + // If any are NaN, the mask is non-zero + return (_mm_movemask_ps(vTempNan)!=0); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE BOOL XMVector4IsInfinite +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + return (XMISINF(V.vector4_f32[0]) || + XMISINF(V.vector4_f32[1]) || + XMISINF(V.vector4_f32[2]) || + XMISINF(V.vector4_f32[3])); + +#elif defined(_XM_SSE_INTRINSICS_) + // Mask off the sign bit + XMVECTOR vTemp = _mm_and_ps(V,g_XMAbsMask); + // Compare to infinity + vTemp = _mm_cmpeq_ps(vTemp,g_XMInfinity); + // If any are infinity, the signs are true. + return (_mm_movemask_ps(vTemp) != 0); +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// Computation operations +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector4Dot +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result.vector4_f32[0] = + Result.vector4_f32[1] = + Result.vector4_f32[2] = + Result.vector4_f32[3] = V1.vector4_f32[0] * V2.vector4_f32[0] + V1.vector4_f32[1] * V2.vector4_f32[1] + V1.vector4_f32[2] * V2.vector4_f32[2] + V1.vector4_f32[3] * V2.vector4_f32[3]; + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vTemp2 = V2; + XMVECTOR vTemp = _mm_mul_ps(V1,vTemp2); + vTemp2 = _mm_shuffle_ps(vTemp2,vTemp,_MM_SHUFFLE(1,0,0,0)); // Copy X to the Z position and Y to the W position + vTemp2 = _mm_add_ps(vTemp2,vTemp); // Add Z = X+Z; W = Y+W; + vTemp = _mm_shuffle_ps(vTemp,vTemp2,_MM_SHUFFLE(0,3,0,0)); // Copy W to the Z position + vTemp = _mm_add_ps(vTemp,vTemp2); // Add Z and W together + return _mm_shuffle_ps(vTemp,vTemp,_MM_SHUFFLE(2,2,2,2)); // Splat Z and return +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector4Cross +( + FXMVECTOR V1, + FXMVECTOR V2, + FXMVECTOR V3 +) +{ +#if defined(_XM_NO_INTRINSICS_) + XMVECTOR Result; + + Result.vector4_f32[0] = (((V2.vector4_f32[2]*V3.vector4_f32[3])-(V2.vector4_f32[3]*V3.vector4_f32[2]))*V1.vector4_f32[1])-(((V2.vector4_f32[1]*V3.vector4_f32[3])-(V2.vector4_f32[3]*V3.vector4_f32[1]))*V1.vector4_f32[2])+(((V2.vector4_f32[1]*V3.vector4_f32[2])-(V2.vector4_f32[2]*V3.vector4_f32[1]))*V1.vector4_f32[3]); + Result.vector4_f32[1] = (((V2.vector4_f32[3]*V3.vector4_f32[2])-(V2.vector4_f32[2]*V3.vector4_f32[3]))*V1.vector4_f32[0])-(((V2.vector4_f32[3]*V3.vector4_f32[0])-(V2.vector4_f32[0]*V3.vector4_f32[3]))*V1.vector4_f32[2])+(((V2.vector4_f32[2]*V3.vector4_f32[0])-(V2.vector4_f32[0]*V3.vector4_f32[2]))*V1.vector4_f32[3]); + Result.vector4_f32[2] = (((V2.vector4_f32[1]*V3.vector4_f32[3])-(V2.vector4_f32[3]*V3.vector4_f32[1]))*V1.vector4_f32[0])-(((V2.vector4_f32[0]*V3.vector4_f32[3])-(V2.vector4_f32[3]*V3.vector4_f32[0]))*V1.vector4_f32[1])+(((V2.vector4_f32[0]*V3.vector4_f32[1])-(V2.vector4_f32[1]*V3.vector4_f32[0]))*V1.vector4_f32[3]); + Result.vector4_f32[3] = (((V2.vector4_f32[2]*V3.vector4_f32[1])-(V2.vector4_f32[1]*V3.vector4_f32[2]))*V1.vector4_f32[0])-(((V2.vector4_f32[2]*V3.vector4_f32[0])-(V2.vector4_f32[0]*V3.vector4_f32[2]))*V1.vector4_f32[1])+(((V2.vector4_f32[1]*V3.vector4_f32[0])-(V2.vector4_f32[0]*V3.vector4_f32[1]))*V1.vector4_f32[2]); + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // V2zwyz * V3wzwy + XMVECTOR vResult = _mm_shuffle_ps(V2,V2,_MM_SHUFFLE(2,1,3,2)); + XMVECTOR vTemp3 = _mm_shuffle_ps(V3,V3,_MM_SHUFFLE(1,3,2,3)); + vResult = _mm_mul_ps(vResult,vTemp3); + // - V2wzwy * V3zwyz + XMVECTOR vTemp2 = _mm_shuffle_ps(V2,V2,_MM_SHUFFLE(1,3,2,3)); + vTemp3 = _mm_shuffle_ps(vTemp3,vTemp3,_MM_SHUFFLE(1,3,0,1)); + vTemp2 = _mm_mul_ps(vTemp2,vTemp3); + vResult = _mm_sub_ps(vResult,vTemp2); + // term1 * V1yxxx + XMVECTOR vTemp1 = _mm_shuffle_ps(V1,V1,_MM_SHUFFLE(0,0,0,1)); + vResult = _mm_mul_ps(vResult,vTemp1); + + // V2ywxz * V3wxwx + vTemp2 = _mm_shuffle_ps(V2,V2,_MM_SHUFFLE(2,0,3,1)); + vTemp3 = _mm_shuffle_ps(V3,V3,_MM_SHUFFLE(0,3,0,3)); + vTemp3 = _mm_mul_ps(vTemp3,vTemp2); + // - V2wxwx * V3ywxz + vTemp2 = _mm_shuffle_ps(vTemp2,vTemp2,_MM_SHUFFLE(2,1,2,1)); + vTemp1 = _mm_shuffle_ps(V3,V3,_MM_SHUFFLE(2,0,3,1)); + vTemp2 = _mm_mul_ps(vTemp2,vTemp1); + vTemp3 = _mm_sub_ps(vTemp3,vTemp2); + // vResult - temp * V1zzyy + vTemp1 = _mm_shuffle_ps(V1,V1,_MM_SHUFFLE(1,1,2,2)); + vTemp1 = _mm_mul_ps(vTemp1,vTemp3); + vResult = _mm_sub_ps(vResult,vTemp1); + + // V2yzxy * V3zxyx + vTemp2 = _mm_shuffle_ps(V2,V2,_MM_SHUFFLE(1,0,2,1)); + vTemp3 = _mm_shuffle_ps(V3,V3,_MM_SHUFFLE(0,1,0,2)); + vTemp3 = _mm_mul_ps(vTemp3,vTemp2); + // - V2zxyx * V3yzxy + vTemp2 = _mm_shuffle_ps(vTemp2,vTemp2,_MM_SHUFFLE(2,0,2,1)); + vTemp1 = _mm_shuffle_ps(V3,V3,_MM_SHUFFLE(1,0,2,1)); + vTemp1 = _mm_mul_ps(vTemp1,vTemp2); + vTemp3 = _mm_sub_ps(vTemp3,vTemp1); + // vResult + term * V1wwwz + vTemp1 = _mm_shuffle_ps(V1,V1,_MM_SHUFFLE(2,3,3,3)); + vTemp3 = _mm_mul_ps(vTemp3,vTemp1); + vResult = _mm_add_ps(vResult,vTemp3); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector4LengthSq +( + FXMVECTOR V +) +{ + return XMVector4Dot(V, V); +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector4ReciprocalLengthEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result = XMVector4LengthSq(V); + Result = XMVectorReciprocalSqrtEst(Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product on x,y,z and w + XMVECTOR vLengthSq = _mm_mul_ps(V,V); + // vTemp has z and w + XMVECTOR vTemp = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(3,2,3,2)); + // x+z, y+w + vLengthSq = _mm_add_ps(vLengthSq,vTemp); + // x+z,x+z,x+z,y+w + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(1,0,0,0)); + // ??,??,y+w,y+w + vTemp = _mm_shuffle_ps(vTemp,vLengthSq,_MM_SHUFFLE(3,3,0,0)); + // ??,??,x+z+y+w,?? + vLengthSq = _mm_add_ps(vLengthSq,vTemp); + // Splat the length + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(2,2,2,2)); + // Get the reciprocal + vLengthSq = _mm_rsqrt_ps(vLengthSq); + return vLengthSq; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector4ReciprocalLength +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result = XMVector4LengthSq(V); + Result = XMVectorReciprocalSqrt(Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product on x,y,z and w + XMVECTOR vLengthSq = _mm_mul_ps(V,V); + // vTemp has z and w + XMVECTOR vTemp = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(3,2,3,2)); + // x+z, y+w + vLengthSq = _mm_add_ps(vLengthSq,vTemp); + // x+z,x+z,x+z,y+w + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(1,0,0,0)); + // ??,??,y+w,y+w + vTemp = _mm_shuffle_ps(vTemp,vLengthSq,_MM_SHUFFLE(3,3,0,0)); + // ??,??,x+z+y+w,?? + vLengthSq = _mm_add_ps(vLengthSq,vTemp); + // Splat the length + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(2,2,2,2)); + // Get the reciprocal + vLengthSq = _mm_sqrt_ps(vLengthSq); + // Accurate! + vLengthSq = _mm_div_ps(g_XMOne,vLengthSq); + return vLengthSq; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector4LengthEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result = XMVector4LengthSq(V); + Result = XMVectorSqrtEst(Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product on x,y,z and w + XMVECTOR vLengthSq = _mm_mul_ps(V,V); + // vTemp has z and w + XMVECTOR vTemp = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(3,2,3,2)); + // x+z, y+w + vLengthSq = _mm_add_ps(vLengthSq,vTemp); + // x+z,x+z,x+z,y+w + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(1,0,0,0)); + // ??,??,y+w,y+w + vTemp = _mm_shuffle_ps(vTemp,vLengthSq,_MM_SHUFFLE(3,3,0,0)); + // ??,??,x+z+y+w,?? + vLengthSq = _mm_add_ps(vLengthSq,vTemp); + // Splat the length + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(2,2,2,2)); + // Prepare for the division + vLengthSq = _mm_sqrt_ps(vLengthSq); + return vLengthSq; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector4Length +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + Result = XMVector4LengthSq(V); + Result = XMVectorSqrt(Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product on x,y,z and w + XMVECTOR vLengthSq = _mm_mul_ps(V,V); + // vTemp has z and w + XMVECTOR vTemp = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(3,2,3,2)); + // x+z, y+w + vLengthSq = _mm_add_ps(vLengthSq,vTemp); + // x+z,x+z,x+z,y+w + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(1,0,0,0)); + // ??,??,y+w,y+w + vTemp = _mm_shuffle_ps(vTemp,vLengthSq,_MM_SHUFFLE(3,3,0,0)); + // ??,??,x+z+y+w,?? + vLengthSq = _mm_add_ps(vLengthSq,vTemp); + // Splat the length + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(2,2,2,2)); + // Prepare for the division + vLengthSq = _mm_sqrt_ps(vLengthSq); + return vLengthSq; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ +// XMVector4NormalizeEst uses a reciprocal estimate and +// returns QNaN on zero and infinite vectors. + +XMFINLINE XMVECTOR XMVector4NormalizeEst +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + Result = XMVector4ReciprocalLength(V); + Result = XMVectorMultiply(V, Result); + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product on x,y,z and w + XMVECTOR vLengthSq = _mm_mul_ps(V,V); + // vTemp has z and w + XMVECTOR vTemp = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(3,2,3,2)); + // x+z, y+w + vLengthSq = _mm_add_ps(vLengthSq,vTemp); + // x+z,x+z,x+z,y+w + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(1,0,0,0)); + // ??,??,y+w,y+w + vTemp = _mm_shuffle_ps(vTemp,vLengthSq,_MM_SHUFFLE(3,3,0,0)); + // ??,??,x+z+y+w,?? + vLengthSq = _mm_add_ps(vLengthSq,vTemp); + // Splat the length + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(2,2,2,2)); + // Get the reciprocal + XMVECTOR vResult = _mm_rsqrt_ps(vLengthSq); + // Reciprocal mul to perform the normalization + vResult = _mm_mul_ps(vResult,V); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector4Normalize +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + FLOAT fLength; + XMVECTOR vResult; + + vResult = XMVector4Length( V ); + fLength = vResult.vector4_f32[0]; + + // Prevent divide by zero + if (fLength > 0) { + fLength = 1.0f/fLength; + } + + vResult.vector4_f32[0] = V.vector4_f32[0]*fLength; + vResult.vector4_f32[1] = V.vector4_f32[1]*fLength; + vResult.vector4_f32[2] = V.vector4_f32[2]*fLength; + vResult.vector4_f32[3] = V.vector4_f32[3]*fLength; + return vResult; + +#elif defined(_XM_SSE_INTRINSICS_) + // Perform the dot product on x,y,z and w + XMVECTOR vLengthSq = _mm_mul_ps(V,V); + // vTemp has z and w + XMVECTOR vTemp = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(3,2,3,2)); + // x+z, y+w + vLengthSq = _mm_add_ps(vLengthSq,vTemp); + // x+z,x+z,x+z,y+w + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(1,0,0,0)); + // ??,??,y+w,y+w + vTemp = _mm_shuffle_ps(vTemp,vLengthSq,_MM_SHUFFLE(3,3,0,0)); + // ??,??,x+z+y+w,?? + vLengthSq = _mm_add_ps(vLengthSq,vTemp); + // Splat the length + vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(2,2,2,2)); + // Prepare for the division + XMVECTOR vResult = _mm_sqrt_ps(vLengthSq); + // Create zero with a single instruction + XMVECTOR vZeroMask = _mm_setzero_ps(); + // Test for a divide by zero (Must be FP to detect -0.0) + vZeroMask = _mm_cmpneq_ps(vZeroMask,vResult); + // Failsafe on zero (Or epsilon) length planes + // If the length is infinity, set the elements to zero + vLengthSq = _mm_cmpneq_ps(vLengthSq,g_XMInfinity); + // Divide to perform the normalization + vResult = _mm_div_ps(V,vResult); + // Any that are infinity, set to zero + vResult = _mm_and_ps(vResult,vZeroMask); + // Select qnan or result based on infinite length + XMVECTOR vTemp1 = _mm_andnot_ps(vLengthSq,g_XMQNaN); + XMVECTOR vTemp2 = _mm_and_ps(vResult,vLengthSq); + vResult = _mm_or_ps(vTemp1,vTemp2); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector4ClampLength +( + FXMVECTOR V, + FLOAT LengthMin, + FLOAT LengthMax +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR ClampMax; + XMVECTOR ClampMin; + + ClampMax = XMVectorReplicate(LengthMax); + ClampMin = XMVectorReplicate(LengthMin); + + return XMVector4ClampLengthV(V, ClampMin, ClampMax); + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR ClampMax = _mm_set_ps1(LengthMax); + XMVECTOR ClampMin = _mm_set_ps1(LengthMin); + return XMVector4ClampLengthV(V, ClampMin, ClampMax); +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector4ClampLengthV +( + FXMVECTOR V, + FXMVECTOR LengthMin, + FXMVECTOR LengthMax +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR ClampLength; + XMVECTOR LengthSq; + XMVECTOR RcpLength; + XMVECTOR Length; + XMVECTOR Normal; + XMVECTOR Zero; + XMVECTOR InfiniteLength; + XMVECTOR ZeroLength; + XMVECTOR Select; + XMVECTOR ControlMax; + XMVECTOR ControlMin; + XMVECTOR Control; + XMVECTOR Result; + + XMASSERT((LengthMin.vector4_f32[1] == LengthMin.vector4_f32[0]) && (LengthMin.vector4_f32[2] == LengthMin.vector4_f32[0]) && (LengthMin.vector4_f32[3] == LengthMin.vector4_f32[0])); + XMASSERT((LengthMax.vector4_f32[1] == LengthMax.vector4_f32[0]) && (LengthMax.vector4_f32[2] == LengthMax.vector4_f32[0]) && (LengthMax.vector4_f32[3] == LengthMax.vector4_f32[0])); + XMASSERT(XMVector4GreaterOrEqual(LengthMin, XMVectorZero())); + XMASSERT(XMVector4GreaterOrEqual(LengthMax, XMVectorZero())); + XMASSERT(XMVector4GreaterOrEqual(LengthMax, LengthMin)); + + LengthSq = XMVector4LengthSq(V); + + Zero = XMVectorZero(); + + RcpLength = XMVectorReciprocalSqrt(LengthSq); + + InfiniteLength = XMVectorEqualInt(LengthSq, g_XMInfinity.v); + ZeroLength = XMVectorEqual(LengthSq, Zero); + + Normal = XMVectorMultiply(V, RcpLength); + + Length = XMVectorMultiply(LengthSq, RcpLength); + + Select = XMVectorEqualInt(InfiniteLength, ZeroLength); + Length = XMVectorSelect(LengthSq, Length, Select); + Normal = XMVectorSelect(LengthSq, Normal, Select); + + ControlMax = XMVectorGreater(Length, LengthMax); + ControlMin = XMVectorLess(Length, LengthMin); + + ClampLength = XMVectorSelect(Length, LengthMax, ControlMax); + ClampLength = XMVectorSelect(ClampLength, LengthMin, ControlMin); + + Result = XMVectorMultiply(Normal, ClampLength); + + // Preserve the original vector (with no precision loss) if the length falls within the given range + Control = XMVectorEqualInt(ControlMax, ControlMin); + Result = XMVectorSelect(Result, V, Control); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR ClampLength; + XMVECTOR LengthSq; + XMVECTOR RcpLength; + XMVECTOR Length; + XMVECTOR Normal; + XMVECTOR Zero; + XMVECTOR InfiniteLength; + XMVECTOR ZeroLength; + XMVECTOR Select; + XMVECTOR ControlMax; + XMVECTOR ControlMin; + XMVECTOR Control; + XMVECTOR Result; + + XMASSERT((XMVectorGetY(LengthMin) == XMVectorGetX(LengthMin)) && (XMVectorGetZ(LengthMin) == XMVectorGetX(LengthMin)) && (XMVectorGetW(LengthMin) == XMVectorGetX(LengthMin))); + XMASSERT((XMVectorGetY(LengthMax) == XMVectorGetX(LengthMax)) && (XMVectorGetZ(LengthMax) == XMVectorGetX(LengthMax)) && (XMVectorGetW(LengthMax) == XMVectorGetX(LengthMax))); + XMASSERT(XMVector4GreaterOrEqual(LengthMin, g_XMZero)); + XMASSERT(XMVector4GreaterOrEqual(LengthMax, g_XMZero)); + XMASSERT(XMVector4GreaterOrEqual(LengthMax, LengthMin)); + + LengthSq = XMVector4LengthSq(V); + Zero = XMVectorZero(); + RcpLength = XMVectorReciprocalSqrt(LengthSq); + InfiniteLength = XMVectorEqualInt(LengthSq, g_XMInfinity); + ZeroLength = XMVectorEqual(LengthSq, Zero); + Normal = _mm_mul_ps(V, RcpLength); + Length = _mm_mul_ps(LengthSq, RcpLength); + Select = XMVectorEqualInt(InfiniteLength, ZeroLength); + Length = XMVectorSelect(LengthSq, Length, Select); + Normal = XMVectorSelect(LengthSq, Normal, Select); + ControlMax = XMVectorGreater(Length, LengthMax); + ControlMin = XMVectorLess(Length, LengthMin); + ClampLength = XMVectorSelect(Length, LengthMax, ControlMax); + ClampLength = XMVectorSelect(ClampLength, LengthMin, ControlMin); + Result = _mm_mul_ps(Normal, ClampLength); + // Preserve the original vector (with no precision loss) if the length falls within the given range + Control = XMVectorEqualInt(ControlMax,ControlMin); + Result = XMVectorSelect(Result,V,Control); + return Result; + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector4Reflect +( + FXMVECTOR Incident, + FXMVECTOR Normal +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + + // Result = Incident - (2 * dot(Incident, Normal)) * Normal + Result = XMVector4Dot(Incident, Normal); + Result = XMVectorAdd(Result, Result); + Result = XMVectorNegativeMultiplySubtract(Result, Normal, Incident); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + // Result = Incident - (2 * dot(Incident, Normal)) * Normal + XMVECTOR Result = XMVector4Dot(Incident,Normal); + Result = _mm_add_ps(Result,Result); + Result = _mm_mul_ps(Result,Normal); + Result = _mm_sub_ps(Incident,Result); + return Result; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector4Refract +( + FXMVECTOR Incident, + FXMVECTOR Normal, + FLOAT RefractionIndex +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Index; + Index = XMVectorReplicate(RefractionIndex); + return XMVector4RefractV(Incident, Normal, Index); + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR Index = _mm_set_ps1(RefractionIndex); + return XMVector4RefractV(Incident,Normal,Index); +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector4RefractV +( + FXMVECTOR Incident, + FXMVECTOR Normal, + FXMVECTOR RefractionIndex +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR IDotN; + XMVECTOR R; + CONST XMVECTOR Zero = XMVectorZero(); + + // Result = RefractionIndex * Incident - Normal * (RefractionIndex * dot(Incident, Normal) + + // sqrt(1 - RefractionIndex * RefractionIndex * (1 - dot(Incident, Normal) * dot(Incident, Normal)))) + + IDotN = XMVector4Dot(Incident, Normal); + + // R = 1.0f - RefractionIndex * RefractionIndex * (1.0f - IDotN * IDotN) + R = XMVectorNegativeMultiplySubtract(IDotN, IDotN, g_XMOne.v); + R = XMVectorMultiply(R, RefractionIndex); + R = XMVectorNegativeMultiplySubtract(R, RefractionIndex, g_XMOne.v); + + if (XMVector4LessOrEqual(R, Zero)) + { + // Total internal reflection + return Zero; + } + else + { + XMVECTOR Result; + + // R = RefractionIndex * IDotN + sqrt(R) + R = XMVectorSqrt(R); + R = XMVectorMultiplyAdd(RefractionIndex, IDotN, R); + + // Result = RefractionIndex * Incident - Normal * R + Result = XMVectorMultiply(RefractionIndex, Incident); + Result = XMVectorNegativeMultiplySubtract(Normal, R, Result); + + return Result; + } + +#elif defined(_XM_SSE_INTRINSICS_) + // Result = RefractionIndex * Incident - Normal * (RefractionIndex * dot(Incident, Normal) + + // sqrt(1 - RefractionIndex * RefractionIndex * (1 - dot(Incident, Normal) * dot(Incident, Normal)))) + + XMVECTOR IDotN = XMVector4Dot(Incident,Normal); + + // R = 1.0f - RefractionIndex * RefractionIndex * (1.0f - IDotN * IDotN) + XMVECTOR R = _mm_mul_ps(IDotN,IDotN); + R = _mm_sub_ps(g_XMOne,R); + R = _mm_mul_ps(R, RefractionIndex); + R = _mm_mul_ps(R, RefractionIndex); + R = _mm_sub_ps(g_XMOne,R); + + XMVECTOR vResult = _mm_cmple_ps(R,g_XMZero); + if (_mm_movemask_ps(vResult)==0x0f) + { + // Total internal reflection + vResult = g_XMZero; + } + else + { + // R = RefractionIndex * IDotN + sqrt(R) + R = _mm_sqrt_ps(R); + vResult = _mm_mul_ps(RefractionIndex, IDotN); + R = _mm_add_ps(R,vResult); + // Result = RefractionIndex * Incident - Normal * R + vResult = _mm_mul_ps(RefractionIndex, Incident); + R = _mm_mul_ps(R,Normal); + vResult = _mm_sub_ps(vResult,R); + } + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector4Orthogonal +( + FXMVECTOR V +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR Result; + Result.vector4_f32[0] = V.vector4_f32[2]; + Result.vector4_f32[1] = V.vector4_f32[3]; + Result.vector4_f32[2] = -V.vector4_f32[0]; + Result.vector4_f32[3] = -V.vector4_f32[1]; + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + static const XMVECTORF32 FlipZW = {1.0f,1.0f,-1.0f,-1.0f}; + XMVECTOR vResult = _mm_shuffle_ps(V,V,_MM_SHUFFLE(1,0,3,2)); + vResult = _mm_mul_ps(vResult,FlipZW); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector4AngleBetweenNormalsEst +( + FXMVECTOR N1, + FXMVECTOR N2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR NegativeOne; + XMVECTOR One; + XMVECTOR Result; + + Result = XMVector4Dot(N1, N2); + NegativeOne = XMVectorSplatConstant(-1, 0); + One = XMVectorSplatOne(); + Result = XMVectorClamp(Result, NegativeOne, One); + Result = XMVectorACosEst(Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = XMVector4Dot(N1,N2); + // Clamp to -1.0f to 1.0f + vResult = _mm_max_ps(vResult,g_XMNegativeOne); + vResult = _mm_min_ps(vResult,g_XMOne);; + vResult = XMVectorACosEst(vResult); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector4AngleBetweenNormals +( + FXMVECTOR N1, + FXMVECTOR N2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR NegativeOne; + XMVECTOR One; + XMVECTOR Result; + + Result = XMVector4Dot(N1, N2); + NegativeOne = XMVectorSplatConstant(-1, 0); + One = XMVectorSplatOne(); + Result = XMVectorClamp(Result, NegativeOne, One); + Result = XMVectorACos(Result); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR vResult = XMVector4Dot(N1,N2); + // Clamp to -1.0f to 1.0f + vResult = _mm_max_ps(vResult,g_XMNegativeOne); + vResult = _mm_min_ps(vResult,g_XMOne);; + vResult = XMVectorACos(vResult); + return vResult; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector4AngleBetweenVectors +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR L1; + XMVECTOR L2; + XMVECTOR Dot; + XMVECTOR CosAngle; + XMVECTOR NegativeOne; + XMVECTOR One; + XMVECTOR Result; + + L1 = XMVector4ReciprocalLength(V1); + L2 = XMVector4ReciprocalLength(V2); + + Dot = XMVector4Dot(V1, V2); + + L1 = XMVectorMultiply(L1, L2); + + CosAngle = XMVectorMultiply(Dot, L1); + NegativeOne = XMVectorSplatConstant(-1, 0); + One = XMVectorSplatOne(); + CosAngle = XMVectorClamp(CosAngle, NegativeOne, One); + + Result = XMVectorACos(CosAngle); + + return Result; + +#elif defined(_XM_SSE_INTRINSICS_) + XMVECTOR L1; + XMVECTOR L2; + XMVECTOR Dot; + XMVECTOR CosAngle; + XMVECTOR Result; + + L1 = XMVector4ReciprocalLength(V1); + L2 = XMVector4ReciprocalLength(V2); + Dot = XMVector4Dot(V1, V2); + L1 = _mm_mul_ps(L1,L2); + CosAngle = _mm_mul_ps(Dot,L1); + CosAngle = XMVectorClamp(CosAngle, g_XMNegativeOne, g_XMOne); + Result = XMVectorACos(CosAngle); + return Result; + +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR XMVector4Transform +( + FXMVECTOR V, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + FLOAT fX = (M.m[0][0]*V.vector4_f32[0])+(M.m[1][0]*V.vector4_f32[1])+(M.m[2][0]*V.vector4_f32[2])+(M.m[3][0]*V.vector4_f32[3]); + FLOAT fY = (M.m[0][1]*V.vector4_f32[0])+(M.m[1][1]*V.vector4_f32[1])+(M.m[2][1]*V.vector4_f32[2])+(M.m[3][1]*V.vector4_f32[3]); + FLOAT fZ = (M.m[0][2]*V.vector4_f32[0])+(M.m[1][2]*V.vector4_f32[1])+(M.m[2][2]*V.vector4_f32[2])+(M.m[3][2]*V.vector4_f32[3]); + FLOAT fW = (M.m[0][3]*V.vector4_f32[0])+(M.m[1][3]*V.vector4_f32[1])+(M.m[2][3]*V.vector4_f32[2])+(M.m[3][3]*V.vector4_f32[3]); + XMVECTOR vResult = { + fX, + fY, + fZ, + fW + }; + return vResult; + +#elif defined(_XM_SSE_INTRINSICS_) + // Splat x,y,z and w + XMVECTOR vTempX = _mm_shuffle_ps(V,V,_MM_SHUFFLE(0,0,0,0)); + XMVECTOR vTempY = _mm_shuffle_ps(V,V,_MM_SHUFFLE(1,1,1,1)); + XMVECTOR vTempZ = _mm_shuffle_ps(V,V,_MM_SHUFFLE(2,2,2,2)); + XMVECTOR vTempW = _mm_shuffle_ps(V,V,_MM_SHUFFLE(3,3,3,3)); + // Mul by the matrix + vTempX = _mm_mul_ps(vTempX,M.r[0]); + vTempY = _mm_mul_ps(vTempY,M.r[1]); + vTempZ = _mm_mul_ps(vTempZ,M.r[2]); + vTempW = _mm_mul_ps(vTempW,M.r[3]); + // Add them all together + vTempX = _mm_add_ps(vTempX,vTempY); + vTempZ = _mm_add_ps(vTempZ,vTempW); + vTempX = _mm_add_ps(vTempX,vTempZ); + return vTempX; +#else // _XM_VMX128_INTRINSICS_ +#endif // _XM_VMX128_INTRINSICS_ +} + +//------------------------------------------------------------------------------ + +XMINLINE XMFLOAT4* XMVector4TransformStream +( + XMFLOAT4* pOutputStream, + UINT OutputStride, + CONST XMFLOAT4* pInputStream, + UINT InputStride, + UINT VectorCount, + CXMMATRIX M +) +{ +#if defined(_XM_NO_INTRINSICS_) + + XMVECTOR V; + XMVECTOR X; + XMVECTOR Y; + XMVECTOR Z; + XMVECTOR W; + XMVECTOR Result; + UINT i; + BYTE* pInputVector = (BYTE*)pInputStream; + BYTE* pOutputVector = (BYTE*)pOutputStream; + + XMASSERT(pOutputStream); + XMASSERT(pInputStream); + + for (i = 0; i < VectorCount; i++) + { + V = XMLoadFloat4((XMFLOAT4*)pInputVector); + W = XMVectorSplatW(V); + Z = XMVectorSplatZ(V); + Y = XMVectorSplatY(V); + X = XMVectorSplatX(V); +// W = XMVectorReplicate(((XMFLOAT4*)pInputVector)->w); +// Z = XMVectorReplicate(((XMFLOAT4*)pInputVector)->z); +// Y = XMVectorReplicate(((XMFLOAT4*)pInputVector)->y); +// X = XMVectorReplicate(((XMFLOAT4*)pInputVector)->x); + + Result = XMVectorMultiply(W, M.r[3]); + Result = XMVectorMultiplyAdd(Z, M.r[2], Result); + Result = XMVectorMultiplyAdd(Y, M.r[1], Result); + Result = XMVectorMultiplyAdd(X, M.r[0], Result); + + XMStoreFloat4((XMFLOAT4*)pOutputVector, Result); + + pInputVector += InputStride; + pOutputVector += OutputStride; + } + + return pOutputStream; + +#elif defined(_XM_SSE_INTRINSICS_) + UINT i; + + XMASSERT(pOutputStream); + XMASSERT(pInputStream); + + const BYTE*pInputVector = reinterpret_cast(pInputStream); + BYTE* pOutputVector = reinterpret_cast(pOutputStream); + for (i = 0; i < VectorCount; i++) + { + // Fetch the row and splat it + XMVECTOR vTempx = _mm_loadu_ps(reinterpret_cast(pInputVector)); + XMVECTOR vTempy = _mm_shuffle_ps(vTempx,vTempx,_MM_SHUFFLE(1,1,1,1)); + XMVECTOR vTempz = _mm_shuffle_ps(vTempx,vTempx,_MM_SHUFFLE(2,2,2,2)); + XMVECTOR vTempw = _mm_shuffle_ps(vTempx,vTempx,_MM_SHUFFLE(3,3,3,3)); + vTempx = _mm_shuffle_ps(vTempx,vTempx,_MM_SHUFFLE(0,0,0,0)); + vTempx = _mm_mul_ps(vTempx,M.r[0]); + vTempy = _mm_mul_ps(vTempy,M.r[1]); + vTempz = _mm_mul_ps(vTempz,M.r[2]); + vTempw = _mm_mul_ps(vTempw,M.r[3]); + vTempx = _mm_add_ps(vTempx,vTempy); + vTempw = _mm_add_ps(vTempw,vTempz); + vTempw = _mm_add_ps(vTempw,vTempx); + // Store the transformed vector + _mm_storeu_ps(reinterpret_cast(pOutputVector),vTempw); + + pInputVector += InputStride; + pOutputVector += OutputStride; + } + return pOutputStream; +#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS) +#endif // _XM_VMX128_INTRINSICS_ +} + +#ifdef __cplusplus + +/**************************************************************************** + * + * XMVECTOR operators + * + ****************************************************************************/ + +#ifndef XM_NO_OPERATOR_OVERLOADS + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR operator+ (FXMVECTOR V) +{ + return V; +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR operator- (FXMVECTOR V) +{ + return XMVectorNegate(V); +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR& operator+= +( + XMVECTOR& V1, + FXMVECTOR V2 +) +{ + V1 = XMVectorAdd(V1, V2); + return V1; +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR& operator-= +( + XMVECTOR& V1, + FXMVECTOR V2 +) +{ + V1 = XMVectorSubtract(V1, V2); + return V1; +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR& operator*= +( + XMVECTOR& V1, + FXMVECTOR V2 +) +{ + V1 = XMVectorMultiply(V1, V2); + return V1; +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR& operator/= +( + XMVECTOR& V1, + FXMVECTOR V2 +) +{ + V1 = XMVectorDivide(V1,V2); + return V1; +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR& operator*= +( + XMVECTOR& V, + CONST FLOAT S +) +{ + V = XMVectorScale(V, S); + return V; +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR& operator/= +( + XMVECTOR& V, + CONST FLOAT S +) +{ + V = XMVectorScale(V, 1.0f / S); + return V; +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR operator+ +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ + return XMVectorAdd(V1, V2); +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR operator- +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ + return XMVectorSubtract(V1, V2); +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR operator* +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ + return XMVectorMultiply(V1, V2); +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR operator/ +( + FXMVECTOR V1, + FXMVECTOR V2 +) +{ + return XMVectorDivide(V1,V2); +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR operator* +( + FXMVECTOR V, + CONST FLOAT S +) +{ + return XMVectorScale(V, S); +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR operator/ +( + FXMVECTOR V, + CONST FLOAT S +) +{ + return XMVectorScale(V, 1.0f / S); +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMVECTOR operator* +( + FLOAT S, + FXMVECTOR V +) +{ + return XMVectorScale(V, S); +} + +#endif // !XM_NO_OPERATOR_OVERLOADS + +/**************************************************************************** + * + * XMFLOAT2 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMFLOAT2::_XMFLOAT2 +( + CONST FLOAT* pArray +) +{ + x = pArray[0]; + y = pArray[1]; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMFLOAT2& _XMFLOAT2::operator= +( + CONST _XMFLOAT2& Float2 +) +{ + x = Float2.x; + y = Float2.y; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMFLOAT2A& XMFLOAT2A::operator= +( + CONST XMFLOAT2A& Float2 +) +{ + x = Float2.x; + y = Float2.y; + return *this; +} + +/**************************************************************************** + * + * XMHALF2 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMHALF2::_XMHALF2 +( + CONST HALF* pArray +) +{ + x = pArray[0]; + y = pArray[1]; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMHALF2::_XMHALF2 +( + FLOAT _x, + FLOAT _y +) +{ + x = XMConvertFloatToHalf(_x); + y = XMConvertFloatToHalf(_y); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMHALF2::_XMHALF2 +( + CONST FLOAT* pArray +) +{ + x = XMConvertFloatToHalf(pArray[0]); + y = XMConvertFloatToHalf(pArray[1]); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMHALF2& _XMHALF2::operator= +( + CONST _XMHALF2& Half2 +) +{ + x = Half2.x; + y = Half2.y; + return *this; +} + +/**************************************************************************** + * + * XMSHORTN2 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMSHORTN2::_XMSHORTN2 +( + CONST SHORT* pArray +) +{ + x = pArray[0]; + y = pArray[1]; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMSHORTN2::_XMSHORTN2 +( + FLOAT _x, + FLOAT _y +) +{ + XMStoreShortN2(this, XMVectorSet(_x, _y, 0.0f, 0.0f)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMSHORTN2::_XMSHORTN2 +( + CONST FLOAT* pArray +) +{ + XMStoreShortN2(this, XMLoadFloat2((XMFLOAT2*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMSHORTN2& _XMSHORTN2::operator= +( + CONST _XMSHORTN2& ShortN2 +) +{ + x = ShortN2.x; + y = ShortN2.y; + return *this; +} + +/**************************************************************************** + * + * XMSHORT2 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMSHORT2::_XMSHORT2 +( + CONST SHORT* pArray +) +{ + x = pArray[0]; + y = pArray[1]; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMSHORT2::_XMSHORT2 +( + FLOAT _x, + FLOAT _y +) +{ + XMStoreShort2(this, XMVectorSet(_x, _y, 0.0f, 0.0f)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMSHORT2::_XMSHORT2 +( + CONST FLOAT* pArray +) +{ + XMStoreShort2(this, XMLoadFloat2((XMFLOAT2*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMSHORT2& _XMSHORT2::operator= +( + CONST _XMSHORT2& Short2 +) +{ + x = Short2.x; + y = Short2.y; + return *this; +} + +/**************************************************************************** + * + * XMUSHORTN2 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUSHORTN2::_XMUSHORTN2 +( + CONST USHORT* pArray +) +{ + x = pArray[0]; + y = pArray[1]; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUSHORTN2::_XMUSHORTN2 +( + FLOAT _x, + FLOAT _y +) +{ + XMStoreUShortN2(this, XMVectorSet(_x, _y, 0.0f, 0.0f)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUSHORTN2::_XMUSHORTN2 +( + CONST FLOAT* pArray +) +{ + XMStoreUShortN2(this, XMLoadFloat2((XMFLOAT2*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUSHORTN2& _XMUSHORTN2::operator= +( + CONST _XMUSHORTN2& UShortN2 +) +{ + x = UShortN2.x; + y = UShortN2.y; + return *this; +} + +/**************************************************************************** + * + * XMUSHORT2 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUSHORT2::_XMUSHORT2 +( + CONST USHORT* pArray +) +{ + x = pArray[0]; + y = pArray[1]; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUSHORT2::_XMUSHORT2 +( + FLOAT _x, + FLOAT _y +) +{ + XMStoreUShort2(this, XMVectorSet(_x, _y, 0.0f, 0.0f)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUSHORT2::_XMUSHORT2 +( + CONST FLOAT* pArray +) +{ + XMStoreUShort2(this, XMLoadFloat2((XMFLOAT2*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUSHORT2& _XMUSHORT2::operator= +( + CONST _XMUSHORT2& UShort2 +) +{ + x = UShort2.x; + y = UShort2.y; + return *this; +} + +/**************************************************************************** + * + * XMFLOAT3 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMFLOAT3::_XMFLOAT3 +( + CONST FLOAT* pArray +) +{ + x = pArray[0]; + y = pArray[1]; + z = pArray[2]; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMFLOAT3& _XMFLOAT3::operator= +( + CONST _XMFLOAT3& Float3 +) +{ + x = Float3.x; + y = Float3.y; + z = Float3.z; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMFLOAT3A& XMFLOAT3A::operator= +( + CONST XMFLOAT3A& Float3 +) +{ + x = Float3.x; + y = Float3.y; + z = Float3.z; + return *this; +} + +/**************************************************************************** + * + * XMHENDN3 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMHENDN3::_XMHENDN3 +( + FLOAT _x, + FLOAT _y, + FLOAT _z +) +{ + XMStoreHenDN3(this, XMVectorSet(_x, _y, _z, 0.0f)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMHENDN3::_XMHENDN3 +( + CONST FLOAT* pArray +) +{ + XMStoreHenDN3(this, XMLoadFloat3((XMFLOAT3*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMHENDN3& _XMHENDN3::operator= +( + CONST _XMHENDN3& HenDN3 +) +{ + v = HenDN3.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMHENDN3& _XMHENDN3::operator= +( + CONST UINT Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMHEND3 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMHEND3::_XMHEND3 +( + FLOAT _x, + FLOAT _y, + FLOAT _z +) +{ + XMStoreHenD3(this, XMVectorSet(_x, _y, _z, 0.0f)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMHEND3::_XMHEND3 +( + CONST FLOAT* pArray +) +{ + XMStoreHenD3(this, XMLoadFloat3((XMFLOAT3*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMHEND3& _XMHEND3::operator= +( + CONST _XMHEND3& HenD3 +) +{ + v = HenD3.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMHEND3& _XMHEND3::operator= +( + CONST UINT Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMUHENDN3 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUHENDN3::_XMUHENDN3 +( + FLOAT _x, + FLOAT _y, + FLOAT _z +) +{ + XMStoreUHenDN3(this, XMVectorSet(_x, _y, _z, 0.0f)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUHENDN3::_XMUHENDN3 +( + CONST FLOAT* pArray +) +{ + XMStoreUHenDN3(this, XMLoadFloat3((XMFLOAT3*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUHENDN3& _XMUHENDN3::operator= +( + CONST _XMUHENDN3& UHenDN3 +) +{ + v = UHenDN3.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUHENDN3& _XMUHENDN3::operator= +( + CONST UINT Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMUHEND3 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUHEND3::_XMUHEND3 +( + FLOAT _x, + FLOAT _y, + FLOAT _z +) +{ + XMStoreUHenD3(this, XMVectorSet(_x, _y, _z, 0.0f)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUHEND3::_XMUHEND3 +( + CONST FLOAT* pArray +) +{ + XMStoreUHenD3(this, XMLoadFloat3((XMFLOAT3*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUHEND3& _XMUHEND3::operator= +( + CONST _XMUHEND3& UHenD3 +) +{ + v = UHenD3.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUHEND3& _XMUHEND3::operator= +( + CONST UINT Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMDHENN3 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMDHENN3::_XMDHENN3 +( + FLOAT _x, + FLOAT _y, + FLOAT _z +) +{ + XMStoreDHenN3(this, XMVectorSet(_x, _y, _z, 0.0f)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMDHENN3::_XMDHENN3 +( + CONST FLOAT* pArray +) +{ + XMStoreDHenN3(this, XMLoadFloat3((XMFLOAT3*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMDHENN3& _XMDHENN3::operator= +( + CONST _XMDHENN3& DHenN3 +) +{ + v = DHenN3.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMDHENN3& _XMDHENN3::operator= +( + CONST UINT Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMDHEN3 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMDHEN3::_XMDHEN3 +( + FLOAT _x, + FLOAT _y, + FLOAT _z +) +{ + XMStoreDHen3(this, XMVectorSet(_x, _y, _z, 0.0f)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMDHEN3::_XMDHEN3 +( + CONST FLOAT* pArray +) +{ + XMStoreDHen3(this, XMLoadFloat3((XMFLOAT3*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMDHEN3& _XMDHEN3::operator= +( + CONST _XMDHEN3& DHen3 +) +{ + v = DHen3.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMDHEN3& _XMDHEN3::operator= +( + CONST UINT Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMUDHENN3 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUDHENN3::_XMUDHENN3 +( + FLOAT _x, + FLOAT _y, + FLOAT _z +) +{ + XMStoreUDHenN3(this, XMVectorSet(_x, _y, _z, 0.0f)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUDHENN3::_XMUDHENN3 +( + CONST FLOAT* pArray +) +{ + XMStoreUDHenN3(this, XMLoadFloat3((XMFLOAT3*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUDHENN3& _XMUDHENN3::operator= +( + CONST _XMUDHENN3& UDHenN3 +) +{ + v = UDHenN3.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUDHENN3& _XMUDHENN3::operator= +( + CONST UINT Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMUDHEN3 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUDHEN3::_XMUDHEN3 +( + FLOAT _x, + FLOAT _y, + FLOAT _z +) +{ + XMStoreUDHen3(this, XMVectorSet(_x, _y, _z, 0.0f)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUDHEN3::_XMUDHEN3 +( + CONST FLOAT* pArray +) +{ + XMStoreUDHen3(this, XMLoadFloat3((XMFLOAT3*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUDHEN3& _XMUDHEN3::operator= +( + CONST _XMUDHEN3& UDHen3 +) +{ + v = UDHen3.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUDHEN3& _XMUDHEN3::operator= +( + CONST UINT Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMU565 operators + * + ****************************************************************************/ + +XMFINLINE _XMU565::_XMU565 +( + CONST CHAR *pArray +) +{ + x = pArray[0]; + y = pArray[1]; + z = pArray[2]; +} + +XMFINLINE _XMU565::_XMU565 +( + FLOAT _x, + FLOAT _y, + FLOAT _z +) +{ + XMStoreU565(this, XMVectorSet( _x, _y, _z, 0.0f )); +} + +XMFINLINE _XMU565::_XMU565 +( + CONST FLOAT *pArray +) +{ + XMStoreU565(this, XMLoadFloat3((XMFLOAT3*)pArray )); +} + +XMFINLINE _XMU565& _XMU565::operator= +( + CONST _XMU565& U565 +) +{ + v = U565.v; + return *this; +} + +XMFINLINE _XMU565& _XMU565::operator= +( + CONST USHORT Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMFLOAT3PK operators + * + ****************************************************************************/ + +XMFINLINE _XMFLOAT3PK::_XMFLOAT3PK +( + FLOAT _x, + FLOAT _y, + FLOAT _z +) +{ + XMStoreFloat3PK(this, XMVectorSet( _x, _y, _z, 0.0f )); +} + +XMFINLINE _XMFLOAT3PK::_XMFLOAT3PK +( + CONST FLOAT *pArray +) +{ + XMStoreFloat3PK(this, XMLoadFloat3((XMFLOAT3*)pArray )); +} + +XMFINLINE _XMFLOAT3PK& _XMFLOAT3PK::operator= +( + CONST _XMFLOAT3PK& float3pk +) +{ + v = float3pk.v; + return *this; +} + +XMFINLINE _XMFLOAT3PK& _XMFLOAT3PK::operator= +( + CONST UINT Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMFLOAT3SE operators + * + ****************************************************************************/ + +XMFINLINE _XMFLOAT3SE::_XMFLOAT3SE +( + FLOAT _x, + FLOAT _y, + FLOAT _z +) +{ + XMStoreFloat3SE(this, XMVectorSet( _x, _y, _z, 0.0f )); +} + +XMFINLINE _XMFLOAT3SE::_XMFLOAT3SE +( + CONST FLOAT *pArray +) +{ + XMStoreFloat3SE(this, XMLoadFloat3((XMFLOAT3*)pArray )); +} + +XMFINLINE _XMFLOAT3SE& _XMFLOAT3SE::operator= +( + CONST _XMFLOAT3SE& float3se +) +{ + v = float3se.v; + return *this; +} + +XMFINLINE _XMFLOAT3SE& _XMFLOAT3SE::operator= +( + CONST UINT Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMFLOAT4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMFLOAT4::_XMFLOAT4 +( + CONST FLOAT* pArray +) +{ + x = pArray[0]; + y = pArray[1]; + z = pArray[2]; + w = pArray[3]; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMFLOAT4& _XMFLOAT4::operator= +( + CONST _XMFLOAT4& Float4 +) +{ + x = Float4.x; + y = Float4.y; + z = Float4.z; + w = Float4.w; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE XMFLOAT4A& XMFLOAT4A::operator= +( + CONST XMFLOAT4A& Float4 +) +{ + x = Float4.x; + y = Float4.y; + z = Float4.z; + w = Float4.w; + return *this; +} + +/**************************************************************************** + * + * XMHALF4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMHALF4::_XMHALF4 +( + CONST HALF* pArray +) +{ + x = pArray[0]; + y = pArray[1]; + z = pArray[2]; + w = pArray[3]; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMHALF4::_XMHALF4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + x = XMConvertFloatToHalf(_x); + y = XMConvertFloatToHalf(_y); + z = XMConvertFloatToHalf(_z); + w = XMConvertFloatToHalf(_w); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMHALF4::_XMHALF4 +( + CONST FLOAT* pArray +) +{ + XMConvertFloatToHalfStream(&x, sizeof(HALF), pArray, sizeof(FLOAT), 4); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMHALF4& _XMHALF4::operator= +( + CONST _XMHALF4& Half4 +) +{ + x = Half4.x; + y = Half4.y; + z = Half4.z; + w = Half4.w; + return *this; +} + +/**************************************************************************** + * + * XMSHORTN4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMSHORTN4::_XMSHORTN4 +( + CONST SHORT* pArray +) +{ + x = pArray[0]; + y = pArray[1]; + z = pArray[2]; + w = pArray[3]; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMSHORTN4::_XMSHORTN4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + XMStoreShortN4(this, XMVectorSet(_x, _y, _z, _w)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMSHORTN4::_XMSHORTN4 +( + CONST FLOAT* pArray +) +{ + XMStoreShortN4(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMSHORTN4& _XMSHORTN4::operator= +( + CONST _XMSHORTN4& ShortN4 +) +{ + x = ShortN4.x; + y = ShortN4.y; + z = ShortN4.z; + w = ShortN4.w; + return *this; +} + +/**************************************************************************** + * + * XMSHORT4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMSHORT4::_XMSHORT4 +( + CONST SHORT* pArray +) +{ + x = pArray[0]; + y = pArray[1]; + z = pArray[2]; + w = pArray[3]; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMSHORT4::_XMSHORT4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + XMStoreShort4(this, XMVectorSet(_x, _y, _z, _w)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMSHORT4::_XMSHORT4 +( + CONST FLOAT* pArray +) +{ + XMStoreShort4(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMSHORT4& _XMSHORT4::operator= +( + CONST _XMSHORT4& Short4 +) +{ + x = Short4.x; + y = Short4.y; + z = Short4.z; + w = Short4.w; + return *this; +} + +/**************************************************************************** + * + * XMUSHORTN4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUSHORTN4::_XMUSHORTN4 +( + CONST USHORT* pArray +) +{ + x = pArray[0]; + y = pArray[1]; + z = pArray[2]; + w = pArray[3]; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUSHORTN4::_XMUSHORTN4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + XMStoreUShortN4(this, XMVectorSet(_x, _y, _z, _w)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUSHORTN4::_XMUSHORTN4 +( + CONST FLOAT* pArray +) +{ + XMStoreUShortN4(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUSHORTN4& _XMUSHORTN4::operator= +( + CONST _XMUSHORTN4& UShortN4 +) +{ + x = UShortN4.x; + y = UShortN4.y; + z = UShortN4.z; + w = UShortN4.w; + return *this; +} + +/**************************************************************************** + * + * XMUSHORT4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUSHORT4::_XMUSHORT4 +( + CONST USHORT* pArray +) +{ + x = pArray[0]; + y = pArray[1]; + z = pArray[2]; + w = pArray[3]; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUSHORT4::_XMUSHORT4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + XMStoreUShort4(this, XMVectorSet(_x, _y, _z, _w)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUSHORT4::_XMUSHORT4 +( + CONST FLOAT* pArray +) +{ + XMStoreUShort4(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUSHORT4& _XMUSHORT4::operator= +( + CONST _XMUSHORT4& UShort4 +) +{ + x = UShort4.x; + y = UShort4.y; + z = UShort4.z; + w = UShort4.w; + return *this; +} + +/**************************************************************************** + * + * XMXDECN4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMXDECN4::_XMXDECN4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + XMStoreXDecN4(this, XMVectorSet(_x, _y, _z, _w)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMXDECN4::_XMXDECN4 +( + CONST FLOAT* pArray +) +{ + XMStoreXDecN4(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMXDECN4& _XMXDECN4::operator= +( + CONST _XMXDECN4& XDecN4 +) +{ + v = XDecN4.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMXDECN4& _XMXDECN4::operator= +( + CONST UINT Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMXDEC4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMXDEC4::_XMXDEC4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + XMStoreXDec4(this, XMVectorSet(_x, _y, _z, _w)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMXDEC4::_XMXDEC4 +( + CONST FLOAT* pArray +) +{ + XMStoreXDec4(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMXDEC4& _XMXDEC4::operator= +( + CONST _XMXDEC4& XDec4 +) +{ + v = XDec4.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMXDEC4& _XMXDEC4::operator= +( + CONST UINT Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMDECN4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMDECN4::_XMDECN4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + XMStoreDecN4(this, XMVectorSet(_x, _y, _z, _w)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMDECN4::_XMDECN4 +( + CONST FLOAT* pArray +) +{ + XMStoreDecN4(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMDECN4& _XMDECN4::operator= +( + CONST _XMDECN4& DecN4 +) +{ + v = DecN4.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMDECN4& _XMDECN4::operator= +( + CONST UINT Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMDEC4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMDEC4::_XMDEC4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + XMStoreDec4(this, XMVectorSet(_x, _y, _z, _w)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMDEC4::_XMDEC4 +( + CONST FLOAT* pArray +) +{ + XMStoreDec4(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMDEC4& _XMDEC4::operator= +( + CONST _XMDEC4& Dec4 +) +{ + v = Dec4.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMDEC4& _XMDEC4::operator= +( + CONST UINT Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMUDECN4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUDECN4::_XMUDECN4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + XMStoreUDecN4(this, XMVectorSet(_x, _y, _z, _w)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUDECN4::_XMUDECN4 +( + CONST FLOAT* pArray +) +{ + XMStoreUDecN4(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUDECN4& _XMUDECN4::operator= +( + CONST _XMUDECN4& UDecN4 +) +{ + v = UDecN4.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUDECN4& _XMUDECN4::operator= +( + CONST UINT Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMUDEC4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUDEC4::_XMUDEC4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + XMStoreUDec4(this, XMVectorSet(_x, _y, _z, _w)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUDEC4::_XMUDEC4 +( + CONST FLOAT* pArray +) +{ + XMStoreUDec4(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUDEC4& _XMUDEC4::operator= +( + CONST _XMUDEC4& UDec4 +) +{ + v = UDec4.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUDEC4& _XMUDEC4::operator= +( + CONST UINT Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMXICON4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMXICON4::_XMXICON4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + XMStoreXIcoN4(this, XMVectorSet(_x, _y, _z, _w)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMXICON4::_XMXICON4 +( + CONST FLOAT* pArray +) +{ + XMStoreXIcoN4(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMXICON4& _XMXICON4::operator= +( + CONST _XMXICON4& XIcoN4 +) +{ + v = XIcoN4.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMXICON4& _XMXICON4::operator= +( + CONST UINT64 Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMXICO4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMXICO4::_XMXICO4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + XMStoreXIco4(this, XMVectorSet(_x, _y, _z, _w)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMXICO4::_XMXICO4 +( + CONST FLOAT* pArray +) +{ + XMStoreXIco4(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMXICO4& _XMXICO4::operator= +( + CONST _XMXICO4& XIco4 +) +{ + v = XIco4.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMXICO4& _XMXICO4::operator= +( + CONST UINT64 Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMICON4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMICON4::_XMICON4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + XMStoreIcoN4(this, XMVectorSet(_x, _y, _z, _w)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMICON4::_XMICON4 +( + CONST FLOAT* pArray +) +{ + XMStoreIcoN4(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMICON4& _XMICON4::operator= +( + CONST _XMICON4& IcoN4 +) +{ + v = IcoN4.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMICON4& _XMICON4::operator= +( + CONST UINT64 Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMICO4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMICO4::_XMICO4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + XMStoreIco4(this, XMVectorSet(_x, _y, _z, _w)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMICO4::_XMICO4 +( + CONST FLOAT* pArray +) +{ + XMStoreIco4(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMICO4& _XMICO4::operator= +( + CONST _XMICO4& Ico4 +) +{ + v = Ico4.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMICO4& _XMICO4::operator= +( + CONST UINT64 Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMUICON4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUICON4::_XMUICON4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + XMStoreUIcoN4(this, XMVectorSet(_x, _y, _z, _w)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUICON4::_XMUICON4 +( + CONST FLOAT* pArray +) +{ + XMStoreUIcoN4(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUICON4& _XMUICON4::operator= +( + CONST _XMUICON4& UIcoN4 +) +{ + v = UIcoN4.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUICON4& _XMUICON4::operator= +( + CONST UINT64 Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMUICO4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUICO4::_XMUICO4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + XMStoreUIco4(this, XMVectorSet(_x, _y, _z, _w)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUICO4::_XMUICO4 +( + CONST FLOAT* pArray +) +{ + XMStoreUIco4(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUICO4& _XMUICO4::operator= +( + CONST _XMUICO4& UIco4 +) +{ + v = UIco4.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUICO4& _XMUICO4::operator= +( + CONST UINT64 Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMCOLOR4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMCOLOR::_XMCOLOR +( + FLOAT _r, + FLOAT _g, + FLOAT _b, + FLOAT _a +) +{ + XMStoreColor(this, XMVectorSet(_r, _g, _b, _a)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMCOLOR::_XMCOLOR +( + CONST FLOAT* pArray +) +{ + XMStoreColor(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMCOLOR& _XMCOLOR::operator= +( + CONST _XMCOLOR& Color +) +{ + c = Color.c; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMCOLOR& _XMCOLOR::operator= +( + CONST UINT Color +) +{ + c = Color; + return *this; +} + +/**************************************************************************** + * + * XMBYTEN4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMBYTEN4::_XMBYTEN4 +( + CONST CHAR* pArray +) +{ + x = pArray[0]; + y = pArray[1]; + z = pArray[2]; + w = pArray[3]; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMBYTEN4::_XMBYTEN4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + XMStoreByteN4(this, XMVectorSet(_x, _y, _z, _w)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMBYTEN4::_XMBYTEN4 +( + CONST FLOAT* pArray +) +{ + XMStoreByteN4(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMBYTEN4& _XMBYTEN4::operator= +( + CONST _XMBYTEN4& ByteN4 +) +{ + x = ByteN4.x; + y = ByteN4.y; + z = ByteN4.z; + w = ByteN4.w; + return *this; +} + +/**************************************************************************** + * + * XMBYTE4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMBYTE4::_XMBYTE4 +( + CONST CHAR* pArray +) +{ + x = pArray[0]; + y = pArray[1]; + z = pArray[2]; + w = pArray[3]; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMBYTE4::_XMBYTE4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + XMStoreByte4(this, XMVectorSet(_x, _y, _z, _w)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMBYTE4::_XMBYTE4 +( + CONST FLOAT* pArray +) +{ + XMStoreByte4(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMBYTE4& _XMBYTE4::operator= +( + CONST _XMBYTE4& Byte4 +) +{ + x = Byte4.x; + y = Byte4.y; + z = Byte4.z; + w = Byte4.w; + return *this; +} + +/**************************************************************************** + * + * XMUBYTEN4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUBYTEN4::_XMUBYTEN4 +( + CONST BYTE* pArray +) +{ + x = pArray[0]; + y = pArray[1]; + z = pArray[2]; + w = pArray[3]; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUBYTEN4::_XMUBYTEN4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + XMStoreUByteN4(this, XMVectorSet(_x, _y, _z, _w)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUBYTEN4::_XMUBYTEN4 +( + CONST FLOAT* pArray +) +{ + XMStoreUByteN4(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUBYTEN4& _XMUBYTEN4::operator= +( + CONST _XMUBYTEN4& UByteN4 +) +{ + x = UByteN4.x; + y = UByteN4.y; + z = UByteN4.z; + w = UByteN4.w; + return *this; +} + +/**************************************************************************** + * + * XMUBYTE4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUBYTE4::_XMUBYTE4 +( + CONST BYTE* pArray +) +{ + x = pArray[0]; + y = pArray[1]; + z = pArray[2]; + w = pArray[3]; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUBYTE4::_XMUBYTE4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + XMStoreUByte4(this, XMVectorSet(_x, _y, _z, _w)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUBYTE4::_XMUBYTE4 +( + CONST FLOAT* pArray +) +{ + XMStoreUByte4(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUBYTE4& _XMUBYTE4::operator= +( + CONST _XMUBYTE4& UByte4 +) +{ + x = UByte4.x; + y = UByte4.y; + z = UByte4.z; + w = UByte4.w; + return *this; +} + +/**************************************************************************** + * + * XMUNIBBLE4 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUNIBBLE4::_XMUNIBBLE4 +( + CONST CHAR *pArray +) +{ + x = pArray[0]; + y = pArray[1]; + z = pArray[2]; + w = pArray[3]; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUNIBBLE4::_XMUNIBBLE4 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + FLOAT _w +) +{ + XMStoreUNibble4(this, XMVectorSet( _x, _y, _z, _w )); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUNIBBLE4::_XMUNIBBLE4 +( + CONST FLOAT *pArray +) +{ + XMStoreUNibble4(this, XMLoadFloat4((XMFLOAT4*)pArray)); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUNIBBLE4& _XMUNIBBLE4::operator= +( + CONST _XMUNIBBLE4& UNibble4 +) +{ + v = UNibble4.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMUNIBBLE4& _XMUNIBBLE4::operator= +( + CONST USHORT Packed +) +{ + v = Packed; + return *this; +} + +/**************************************************************************** + * + * XMU555 operators + * + ****************************************************************************/ + +//------------------------------------------------------------------------------ + +XMFINLINE _XMU555::_XMU555 +( + CONST CHAR *pArray, + BOOL _w +) +{ + x = pArray[0]; + y = pArray[1]; + z = pArray[2]; + w = _w; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMU555::_XMU555 +( + FLOAT _x, + FLOAT _y, + FLOAT _z, + BOOL _w +) +{ + XMStoreU555(this, XMVectorSet(_x, _y, _z, ((_w) ? 1.0f : 0.0f) )); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMU555::_XMU555 +( + CONST FLOAT *pArray, + BOOL _w +) +{ + XMVECTOR V = XMLoadFloat3((XMFLOAT3*)pArray); + XMStoreU555(this, XMVectorSetW(V, ((_w) ? 1.0f : 0.0f) )); +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMU555& _XMU555::operator= +( + CONST _XMU555& U555 +) +{ + v = U555.v; + return *this; +} + +//------------------------------------------------------------------------------ + +XMFINLINE _XMU555& _XMU555::operator= +( + CONST USHORT Packed +) +{ + v = Packed; + return *this; +} + +#endif // __cplusplus + +#if defined(_XM_NO_INTRINSICS_) +#undef XMISNAN +#undef XMISINF +#endif + +#endif // __XNAMATHVECTOR_INL__ + diff --git a/qb/config.params.sh b/qb/config.params.sh index 3ee8480855..2df105f1b6 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -36,6 +36,7 @@ HAVE_MINIUPNPC=auto # Mini UPnP client library (for NAT traversal) HAVE_BUILTINMINIUPNPC=yes # Bake in Mini UPnP client library (for NAT traversal) C89_BUILTINMINIUPNPC=no HAVE_D3D9=yes # Direct3D 9 support +HAVE_D3D10=no # Direct3D 10 support HAVE_D3D11=no # Direct3D 11 support HAVE_D3D12=no # Direct3D 11 support HAVE_D3DX=yes # Direct3DX support