//////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                          //
// D3D10SDKLayers.idl                                                                       //
//                                                                                          //
// Contains interface definitions for the D3D10 SDK Layers .                                //
//                                                                                          //
// Copyright (c) Microsoft Corporation.                                                     //
//                                                                                          //
//////////////////////////////////////////////////////////////////////////////////////////////

import "oaidl.idl";
import "ocidl.idl";
import "dxgi.idl";

const UINT D3D10_SDK_LAYERS_VERSION = 11;

//==================================================================================================================================
//
// Debugging Layer
//
//==================================================================================================================================
const UINT D3D10_DEBUG_FEATURE_FLUSH_PER_RENDER_OP = 0x1;
const UINT D3D10_DEBUG_FEATURE_FINISH_PER_RENDER_OP = 0x2;
const UINT D3D10_DEBUG_FEATURE_PRESENT_PER_RENDER_OP = 0x4;


[ uuid( 9B7E4E01-342C-4106-A19F-4F2704F689F0 ), object, local, pointer_default( unique ) ]
interface ID3D10Debug
    : IUnknown
{
    HRESULT SetFeatureMask( UINT Mask );
    UINT GetFeatureMask();
    HRESULT SetPresentPerRenderOpDelay( UINT Milliseconds );
    UINT GetPresentPerRenderOpDelay();
    HRESULT SetSwapChain( [ annotation( "__in_opt" ) ] IDXGISwapChain* pSwapChain );
    HRESULT GetSwapChain( [ annotation( "__out" ) ] IDXGISwapChain** ppSwapChain );
    HRESULT Validate();
};

[ uuid( 9B7E4E02-342C-4106-A19F-4F2704F689F0 ), object, local, pointer_default( unique ) ]
interface ID3D10SwitchToRef
    : IUnknown
{
    BOOL SetUseRef( BOOL UseRef );
    BOOL GetUseRef();
};


//==================================================================================================================================
//
// Info Queue
//
//==================================================================================================================================
typedef enum D3D10_MESSAGE_CATEGORY {
    D3D10_MESSAGE_CATEGORY_APPLICATION_DEFINED,
    D3D10_MESSAGE_CATEGORY_MISCELLANEOUS,
    D3D10_MESSAGE_CATEGORY_INITIALIZATION,
    D3D10_MESSAGE_CATEGORY_CLEANUP,
    D3D10_MESSAGE_CATEGORY_COMPILATION,
    D3D10_MESSAGE_CATEGORY_STATE_CREATION,
    D3D10_MESSAGE_CATEGORY_STATE_SETTING,
    D3D10_MESSAGE_CATEGORY_STATE_GETTING,
    D3D10_MESSAGE_CATEGORY_RESOURCE_MANIPULATION,
    D3D10_MESSAGE_CATEGORY_EXECUTION
} D3D10_MESSAGE_CATEGORY;

typedef enum D3D10_MESSAGE_SEVERITY {
    D3D10_MESSAGE_SEVERITY_CORRUPTION,
    D3D10_MESSAGE_SEVERITY_ERROR,
    D3D10_MESSAGE_SEVERITY_WARNING,
    D3D10_MESSAGE_SEVERITY_INFO
} D3D10_MESSAGE_SEVERITY;

// Unique ID for every error
typedef enum D3D10_MESSAGE_ID {
    D3D10_MESSAGE_ID_UNKNOWN    = 0,

    //--------------------------------------------------------------------------
    // Messages Used by Core
    // Message IDs generated from core are at the beginning
    // since the core changes less frequently than the debug layer.

    // hazard checking
    D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_HAZARD,
    D3D10_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_HAZARD,
    D3D10_MESSAGE_ID_DEVICE_VSSETSHADERRESOURCES_HAZARD,
    D3D10_MESSAGE_ID_DEVICE_VSSETCONSTANTBUFFERS_HAZARD,
    D3D10_MESSAGE_ID_DEVICE_GSSETSHADERRESOURCES_HAZARD,
    D3D10_MESSAGE_ID_DEVICE_GSSETCONSTANTBUFFERS_HAZARD,
    D3D10_MESSAGE_ID_DEVICE_PSSETSHADERRESOURCES_HAZARD,
    D3D10_MESSAGE_ID_DEVICE_PSSETCONSTANTBUFFERS_HAZARD,
    D3D10_MESSAGE_ID_DEVICE_OMSETRENDERTARGETS_HAZARD,
    D3D10_MESSAGE_ID_DEVICE_SOSETTARGETS_HAZARD,

    // End of Messages used by Core
    // ------------------------------------------------------------------------
    D3D10_MESSAGE_ID_STRING_FROM_APPLICATION,
    D3D10_MESSAGE_ID_CORRUPTED_THIS,
    D3D10_MESSAGE_ID_CORRUPTED_PARAMETER1,
    D3D10_MESSAGE_ID_CORRUPTED_PARAMETER2,
    D3D10_MESSAGE_ID_CORRUPTED_PARAMETER3,
    D3D10_MESSAGE_ID_CORRUPTED_PARAMETER4,
    D3D10_MESSAGE_ID_CORRUPTED_PARAMETER5,
    D3D10_MESSAGE_ID_CORRUPTED_PARAMETER6,
    D3D10_MESSAGE_ID_CORRUPTED_PARAMETER7,
    D3D10_MESSAGE_ID_CORRUPTED_PARAMETER8,
    D3D10_MESSAGE_ID_CORRUPTED_PARAMETER9,
    D3D10_MESSAGE_ID_CORRUPTED_PARAMETER10,
    D3D10_MESSAGE_ID_CORRUPTED_PARAMETER11,
    D3D10_MESSAGE_ID_CORRUPTED_PARAMETER12,
    D3D10_MESSAGE_ID_CORRUPTED_PARAMETER13,
    D3D10_MESSAGE_ID_CORRUPTED_PARAMETER14,
    D3D10_MESSAGE_ID_CORRUPTED_PARAMETER15,
    D3D10_MESSAGE_ID_CORRUPTED_MULTITHREADING,
    D3D10_MESSAGE_ID_MESSAGE_REPORTING_OUTOFMEMORY,

    D3D10_MESSAGE_ID_IASETINPUTLAYOUT_UNBINDDELETINGOBJECT,
    D3D10_MESSAGE_ID_IASETVERTEXBUFFERS_UNBINDDELETINGOBJECT,
    D3D10_MESSAGE_ID_IASETINDEXBUFFER_UNBINDDELETINGOBJECT,
    D3D10_MESSAGE_ID_VSSETSHADER_UNBINDDELETINGOBJECT,
    D3D10_MESSAGE_ID_VSSETSHADERRESOURCES_UNBINDDELETINGOBJECT,
    D3D10_MESSAGE_ID_VSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT,
    D3D10_MESSAGE_ID_VSSETSAMPLERS_UNBINDDELETINGOBJECT,
    D3D10_MESSAGE_ID_GSSETSHADER_UNBINDDELETINGOBJECT,
    D3D10_MESSAGE_ID_GSSETSHADERRESOURCES_UNBINDDELETINGOBJECT,
    D3D10_MESSAGE_ID_GSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT,
    D3D10_MESSAGE_ID_GSSETSAMPLERS_UNBINDDELETINGOBJECT,
    D3D10_MESSAGE_ID_SOSETTARGETS_UNBINDDELETINGOBJECT,
    D3D10_MESSAGE_ID_PSSETSHADER_UNBINDDELETINGOBJECT,
    D3D10_MESSAGE_ID_PSSETSHADERRESOURCES_UNBINDDELETINGOBJECT,
    D3D10_MESSAGE_ID_PSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT,
    D3D10_MESSAGE_ID_PSSETSAMPLERS_UNBINDDELETINGOBJECT,
    D3D10_MESSAGE_ID_RSSETSTATE_UNBINDDELETINGOBJECT,
    D3D10_MESSAGE_ID_OMSETBLENDSTATE_UNBINDDELETINGOBJECT,
    D3D10_MESSAGE_ID_OMSETDEPTHSTENCILSTATE_UNBINDDELETINGOBJECT,
    D3D10_MESSAGE_ID_OMSETRENDERTARGETS_UNBINDDELETINGOBJECT,
    D3D10_MESSAGE_ID_SETPREDICATION_UNBINDDELETINGOBJECT,

    D3D10_MESSAGE_ID_GETPRIVATEDATA_MOREDATA,
    D3D10_MESSAGE_ID_SETPRIVATEDATA_INVALIDFREEDATA,
    D3D10_MESSAGE_ID_SETPRIVATEDATA_INVALIDIUNKNOWN,
    D3D10_MESSAGE_ID_SETPRIVATEDATA_INVALIDFLAGS,
    D3D10_MESSAGE_ID_SETPRIVATEDATA_CHANGINGPARAMS,
    D3D10_MESSAGE_ID_SETPRIVATEDATA_OUTOFMEMORY,

    D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDFORMAT,
    D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDSAMPLES,
    D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDUSAGE,
    D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDBINDFLAGS,
    D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDCPUACCESSFLAGS,
    D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDMISCFLAGS,
    D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDCPUACCESSFLAGS,
    D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDBINDFLAGS,
    D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDINITIALDATA,
    D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDDIMENSIONS,
    D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDMIPLEVELS,
    D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDMISCFLAGS,
    D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDARG_RETURN,
    D3D10_MESSAGE_ID_CREATEBUFFER_OUTOFMEMORY_RETURN,
    D3D10_MESSAGE_ID_CREATEBUFFER_NULLDESC,
    D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDCONSTANTBUFFERBINDINGS,
    D3D10_MESSAGE_ID_CREATEBUFFER_LARGEALLOCATION,

    D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDFORMAT,
    D3D10_MESSAGE_ID_CREATETEXTURE1D_UNSUPPORTEDFORMAT,
    D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDSAMPLES,
    D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDUSAGE,
    D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDBINDFLAGS,
    D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDCPUACCESSFLAGS,
    D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDMISCFLAGS,
    D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDCPUACCESSFLAGS,
    D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDBINDFLAGS,
    D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDINITIALDATA,
    D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDDIMENSIONS,
    D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDMIPLEVELS,
    D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDMISCFLAGS,
    D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDARG_RETURN,
    D3D10_MESSAGE_ID_CREATETEXTURE1D_OUTOFMEMORY_RETURN,
    D3D10_MESSAGE_ID_CREATETEXTURE1D_NULLDESC,
    D3D10_MESSAGE_ID_CREATETEXTURE1D_LARGEALLOCATION,

    D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDFORMAT,
    D3D10_MESSAGE_ID_CREATETEXTURE2D_UNSUPPORTEDFORMAT,
    D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDSAMPLES,
    D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDUSAGE,
    D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDBINDFLAGS,
    D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDCPUACCESSFLAGS,
    D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDMISCFLAGS,
    D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDCPUACCESSFLAGS,
    D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDBINDFLAGS,
    D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDINITIALDATA,
    D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDDIMENSIONS,
    D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDMIPLEVELS,
    D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDMISCFLAGS,
    D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDARG_RETURN,
    D3D10_MESSAGE_ID_CREATETEXTURE2D_OUTOFMEMORY_RETURN,
    D3D10_MESSAGE_ID_CREATETEXTURE2D_NULLDESC,
    D3D10_MESSAGE_ID_CREATETEXTURE2D_LARGEALLOCATION,

    D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDFORMAT,
    D3D10_MESSAGE_ID_CREATETEXTURE3D_UNSUPPORTEDFORMAT,
    D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDSAMPLES,
    D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDUSAGE,
    D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDBINDFLAGS,
    D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDCPUACCESSFLAGS,
    D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDMISCFLAGS,
    D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDCPUACCESSFLAGS,
    D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDBINDFLAGS,
    D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDINITIALDATA,
    D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDDIMENSIONS,
    D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDMIPLEVELS,
    D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDMISCFLAGS,
    D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDARG_RETURN,
    D3D10_MESSAGE_ID_CREATETEXTURE3D_OUTOFMEMORY_RETURN,
    D3D10_MESSAGE_ID_CREATETEXTURE3D_NULLDESC,
    D3D10_MESSAGE_ID_CREATETEXTURE3D_LARGEALLOCATION,

    D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_UNRECOGNIZEDFORMAT,
    D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDESC,
    D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDFORMAT,
    D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDIMENSIONS,
    D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDRESOURCE,
    D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_TOOMANYOBJECTS,
    D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDARG_RETURN,
    D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_OUTOFMEMORY_RETURN,

    D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_UNRECOGNIZEDFORMAT,
    D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_UNSUPPORTEDFORMAT,
    D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDESC,
    D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDFORMAT,
    D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDIMENSIONS,
    D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDRESOURCE,
    D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_TOOMANYOBJECTS,
    D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDARG_RETURN,
    D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_OUTOFMEMORY_RETURN,

    D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_UNRECOGNIZEDFORMAT,
    D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDESC,
    D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDFORMAT,
    D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDIMENSIONS,
    D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDRESOURCE,
    D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_TOOMANYOBJECTS,
    D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDARG_RETURN,
    D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_OUTOFMEMORY_RETURN,

    D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_OUTOFMEMORY,
    D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_TOOMANYELEMENTS,
    D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDFORMAT,
    D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INCOMPATIBLEFORMAT,
    D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOT,
    D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDINPUTSLOTCLASS,
    D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_STEPRATESLOTCLASSMISMATCH,
    D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOTCLASSCHANGE,
    D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSTEPRATECHANGE,
    D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDALIGNMENT,
    D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_DUPLICATESEMANTIC,
    D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_UNPARSEABLEINPUTSIGNATURE,
    D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_NULLSEMANTIC,
    D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_MISSINGELEMENT,
    D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_NULLDESC,

    D3D10_MESSAGE_ID_CREATEVERTEXSHADER_OUTOFMEMORY,
    D3D10_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERBYTECODE,
    D3D10_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERTYPE,

    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADER_OUTOFMEMORY,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERBYTECODE,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERTYPE,

    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTOFMEMORY,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERBYTECODE,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERTYPE,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMENTRIES,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSTREAMSTRIDEUNUSED,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDDECL,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_EXPECTEDDECL,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSLOT0EXPECTED,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSLOT,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_ONLYONEELEMENTPERSLOT,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDCOMPONENTCOUNT,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTARTCOMPONENTANDCOMPONENTCOUNT,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDGAPDEFINITION,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_REPEATEDOUTPUT,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSTREAMSTRIDE,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGSEMANTIC,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MASKMISMATCH,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_CANTHAVEONLYGAPS,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DECLTOOCOMPLEX,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGOUTPUTSIGNATURE,

    D3D10_MESSAGE_ID_CREATEPIXELSHADER_OUTOFMEMORY,
    D3D10_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERBYTECODE,
    D3D10_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERTYPE,

    D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDFILLMODE,
    D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDCULLMODE,
    D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDDEPTHBIASCLAMP,
    D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDSLOPESCALEDDEPTHBIAS,
    D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_TOOMANYOBJECTS,
    D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_NULLDESC,

    D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHWRITEMASK,
    D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHFUNC,
    D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFAILOP,
    D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILZFAILOP,
    D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILPASSOP,
    D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFUNC,
    D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFAILOP,
    D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILZFAILOP,
    D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILPASSOP,
    D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFUNC,
    D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_TOOMANYOBJECTS,
    D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_NULLDESC,

    D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLEND,
    D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLEND,
    D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOP,
    D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLENDALPHA,
    D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLENDALPHA,
    D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOPALPHA,
    D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDRENDERTARGETWRITEMASK,
    D3D10_MESSAGE_ID_CREATEBLENDSTATE_TOOMANYOBJECTS,
    D3D10_MESSAGE_ID_CREATEBLENDSTATE_NULLDESC,

    D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDFILTER,
    D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSU,
    D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSV,
    D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSW,
    D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMIPLODBIAS,
    D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXANISOTROPY,
    D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDCOMPARISONFUNC,
    D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMINLOD,
    D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXLOD,
    D3D10_MESSAGE_ID_CREATESAMPLERSTATE_TOOMANYOBJECTS,
    D3D10_MESSAGE_ID_CREATESAMPLERSTATE_NULLDESC,

    D3D10_MESSAGE_ID_CREATEQUERYORPREDICATE_INVALIDQUERY,
    D3D10_MESSAGE_ID_CREATEQUERYORPREDICATE_INVALIDMISCFLAGS,
    D3D10_MESSAGE_ID_CREATEQUERYORPREDICATE_UNEXPECTEDMISCFLAG,
    D3D10_MESSAGE_ID_CREATEQUERYORPREDICATE_NULLDESC,

    D3D10_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNRECOGNIZED,
    D3D10_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNDEFINED,

    D3D10_MESSAGE_ID_IASETVERTEXBUFFERS_INVALIDBUFFER,
    D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_OFFSET_TOO_LARGE,
    D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_BUFFERS_EMPTY,

    D3D10_MESSAGE_ID_IASETINDEXBUFFER_INVALIDBUFFER,
    D3D10_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_FORMAT_INVALID,
    D3D10_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_OFFSET_TOO_LARGE,
    D3D10_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_OFFSET_UNALIGNED,

    D3D10_MESSAGE_ID_DEVICE_VSSETSHADERRESOURCES_VIEWS_EMPTY,

    D3D10_MESSAGE_ID_VSSETCONSTANTBUFFERS_INVALIDBUFFER,
    D3D10_MESSAGE_ID_DEVICE_VSSETCONSTANTBUFFERS_BUFFERS_EMPTY,

    D3D10_MESSAGE_ID_DEVICE_VSSETSAMPLERS_SAMPLERS_EMPTY,

    D3D10_MESSAGE_ID_DEVICE_GSSETSHADERRESOURCES_VIEWS_EMPTY,

    D3D10_MESSAGE_ID_GSSETCONSTANTBUFFERS_INVALIDBUFFER,
    D3D10_MESSAGE_ID_DEVICE_GSSETCONSTANTBUFFERS_BUFFERS_EMPTY,

    D3D10_MESSAGE_ID_DEVICE_GSSETSAMPLERS_SAMPLERS_EMPTY,

    D3D10_MESSAGE_ID_SOSETTARGETS_INVALIDBUFFER,
    D3D10_MESSAGE_ID_DEVICE_SOSETTARGETS_OFFSET_UNALIGNED,

    D3D10_MESSAGE_ID_DEVICE_PSSETSHADERRESOURCES_VIEWS_EMPTY,

    D3D10_MESSAGE_ID_PSSETCONSTANTBUFFERS_INVALIDBUFFER,
    D3D10_MESSAGE_ID_DEVICE_PSSETCONSTANTBUFFERS_BUFFERS_EMPTY,

    D3D10_MESSAGE_ID_DEVICE_PSSETSAMPLERS_SAMPLERS_EMPTY,

    D3D10_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_INVALIDVIEWPORT,

    D3D10_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_INVALIDSCISSOR,

    D3D10_MESSAGE_ID_CLEARRENDERTARGETVIEW_DENORMFLUSH,
    D3D10_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_DENORMFLUSH,
    D3D10_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_INVALID,

    D3D10_MESSAGE_ID_DEVICE_IAGETVERTEXBUFFERS_BUFFERS_EMPTY,

    D3D10_MESSAGE_ID_DEVICE_VSGETSHADERRESOURCES_VIEWS_EMPTY,

    D3D10_MESSAGE_ID_DEVICE_VSGETCONSTANTBUFFERS_BUFFERS_EMPTY,

    D3D10_MESSAGE_ID_DEVICE_VSGETSAMPLERS_SAMPLERS_EMPTY,

    D3D10_MESSAGE_ID_DEVICE_GSGETSHADERRESOURCES_VIEWS_EMPTY,

    D3D10_MESSAGE_ID_DEVICE_GSGETCONSTANTBUFFERS_BUFFERS_EMPTY,

    D3D10_MESSAGE_ID_DEVICE_GSGETSAMPLERS_SAMPLERS_EMPTY,

    D3D10_MESSAGE_ID_DEVICE_SOGETTARGETS_BUFFERS_EMPTY,

    D3D10_MESSAGE_ID_DEVICE_PSGETSHADERRESOURCES_VIEWS_EMPTY,

    D3D10_MESSAGE_ID_DEVICE_PSGETCONSTANTBUFFERS_BUFFERS_EMPTY,

    D3D10_MESSAGE_ID_DEVICE_PSGETSAMPLERS_SAMPLERS_EMPTY,

    D3D10_MESSAGE_ID_DEVICE_RSGETVIEWPORTS_VIEWPORTS_EMPTY,

    D3D10_MESSAGE_ID_DEVICE_RSGETSCISSORRECTS_RECTS_EMPTY,

    D3D10_MESSAGE_ID_DEVICE_GENERATEMIPS_RESOURCE_INVALID,

    D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDDESTINATIONSUBRESOURCE,
    D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCESUBRESOURCE,
    D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCEBOX,
    D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCE,
    D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDDESTINATIONSTATE,
    D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCESTATE,

    D3D10_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCE,
    D3D10_MESSAGE_ID_COPYRESOURCE_INVALIDDESTINATIONSTATE,
    D3D10_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCESTATE,

    D3D10_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSUBRESOURCE,
    D3D10_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONBOX,
    D3D10_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSTATE,

    D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_INVALID,
    D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_SUBRESOURCE_INVALID,
    D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_INVALID,
    D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_SUBRESOURCE_INVALID,
    D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_FORMAT_INVALID,

    D3D10_MESSAGE_ID_BUFFER_MAP_INVALIDMAPTYPE,
    D3D10_MESSAGE_ID_BUFFER_MAP_INVALIDFLAGS,
    D3D10_MESSAGE_ID_BUFFER_MAP_ALREADYMAPPED,
    D3D10_MESSAGE_ID_BUFFER_MAP_DEVICEREMOVED_RETURN,
    D3D10_MESSAGE_ID_BUFFER_UNMAP_NOTMAPPED,

    D3D10_MESSAGE_ID_TEXTURE1D_MAP_INVALIDMAPTYPE,
    D3D10_MESSAGE_ID_TEXTURE1D_MAP_INVALIDSUBRESOURCE,
    D3D10_MESSAGE_ID_TEXTURE1D_MAP_INVALIDFLAGS,
    D3D10_MESSAGE_ID_TEXTURE1D_MAP_ALREADYMAPPED,
    D3D10_MESSAGE_ID_TEXTURE1D_MAP_DEVICEREMOVED_RETURN,
    D3D10_MESSAGE_ID_TEXTURE1D_UNMAP_INVALIDSUBRESOURCE,
    D3D10_MESSAGE_ID_TEXTURE1D_UNMAP_NOTMAPPED,

    D3D10_MESSAGE_ID_TEXTURE2D_MAP_INVALIDMAPTYPE,
    D3D10_MESSAGE_ID_TEXTURE2D_MAP_INVALIDSUBRESOURCE,
    D3D10_MESSAGE_ID_TEXTURE2D_MAP_INVALIDFLAGS,
    D3D10_MESSAGE_ID_TEXTURE2D_MAP_ALREADYMAPPED,
    D3D10_MESSAGE_ID_TEXTURE2D_MAP_DEVICEREMOVED_RETURN,
    D3D10_MESSAGE_ID_TEXTURE2D_UNMAP_INVALIDSUBRESOURCE,
    D3D10_MESSAGE_ID_TEXTURE2D_UNMAP_NOTMAPPED,

    D3D10_MESSAGE_ID_TEXTURE3D_MAP_INVALIDMAPTYPE,
    D3D10_MESSAGE_ID_TEXTURE3D_MAP_INVALIDSUBRESOURCE,
    D3D10_MESSAGE_ID_TEXTURE3D_MAP_INVALIDFLAGS,
    D3D10_MESSAGE_ID_TEXTURE3D_MAP_ALREADYMAPPED,
    D3D10_MESSAGE_ID_TEXTURE3D_MAP_DEVICEREMOVED_RETURN,
    D3D10_MESSAGE_ID_TEXTURE3D_UNMAP_INVALIDSUBRESOURCE,
    D3D10_MESSAGE_ID_TEXTURE3D_UNMAP_NOTMAPPED,

    D3D10_MESSAGE_ID_CHECKFORMATSUPPORT_FORMAT_DEPRECATED,
    D3D10_MESSAGE_ID_CHECKMULTISAMPLEQUALITYLEVELS_FORMAT_DEPRECATED,

    D3D10_MESSAGE_ID_SETEXCEPTIONMODE_UNRECOGNIZEDFLAGS,
    D3D10_MESSAGE_ID_SETEXCEPTIONMODE_INVALIDARG_RETURN,
    D3D10_MESSAGE_ID_SETEXCEPTIONMODE_DEVICEREMOVED_RETURN,

    D3D10_MESSAGE_ID_REF_SIMULATING_INFINITELY_FAST_HARDWARE,
    D3D10_MESSAGE_ID_REF_THREADING_MODE,
    D3D10_MESSAGE_ID_REF_UMDRIVER_EXCEPTION,
    D3D10_MESSAGE_ID_REF_KMDRIVER_EXCEPTION,
    D3D10_MESSAGE_ID_REF_HARDWARE_EXCEPTION,
    D3D10_MESSAGE_ID_REF_ACCESSING_INDEXABLE_TEMP_OUT_OF_RANGE,
    D3D10_MESSAGE_ID_REF_PROBLEM_PARSING_SHADER,
    D3D10_MESSAGE_ID_REF_OUT_OF_MEMORY,
    D3D10_MESSAGE_ID_REF_INFO,

    //drawtime validation
    D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEXPOS_OVERFLOW,
    D3D10_MESSAGE_ID_DEVICE_DRAWINDEXED_INDEXPOS_OVERFLOW,
    D3D10_MESSAGE_ID_DEVICE_DRAWINSTANCED_VERTEXPOS_OVERFLOW,
    D3D10_MESSAGE_ID_DEVICE_DRAWINSTANCED_INSTANCEPOS_OVERFLOW,

    D3D10_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INSTANCEPOS_OVERFLOW,
    D3D10_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INDEXPOS_OVERFLOW,

    D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_SHADER_NOT_SET,
    D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND,
    D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERINDEX,
    D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_COMPONENTTYPE,
    D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERMASK,
    D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SYSTEMVALUE,
    D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_NEVERWRITTEN_ALWAYSREADS,

    D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_BUFFER_NOT_SET,
    D3D10_MESSAGE_ID_DEVICE_DRAW_INPUTLAYOUT_NOT_SET,
    D3D10_MESSAGE_ID_DEVICE_DRAW_CONSTANT_BUFFER_NOT_SET,
    D3D10_MESSAGE_ID_DEVICE_DRAW_CONSTANT_BUFFER_TOO_SMALL,
    D3D10_MESSAGE_ID_DEVICE_DRAW_SAMPLER_NOT_SET,
    D3D10_MESSAGE_ID_DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET,
    D3D10_MESSAGE_ID_DEVICE_DRAW_VIEW_DIMENSION_MISMATCH,
    D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_BUFFER_STRIDE_TOO_SMALL,
    D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_BUFFER_TOO_SMALL,
    D3D10_MESSAGE_ID_DEVICE_DRAW_INDEX_BUFFER_NOT_SET,
    D3D10_MESSAGE_ID_DEVICE_DRAW_INDEX_BUFFER_FORMAT_INVALID,
    D3D10_MESSAGE_ID_DEVICE_DRAW_INDEX_BUFFER_TOO_SMALL,
    D3D10_MESSAGE_ID_DEVICE_DRAW_GS_INPUT_PRIMITIVE_MISMATCH,
    D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_RETURN_TYPE_MISMATCH,
    D3D10_MESSAGE_ID_DEVICE_DRAW_POSITION_NOT_PRESENT,
    D3D10_MESSAGE_ID_DEVICE_DRAW_OUTPUT_STREAM_NOT_SET,
    D3D10_MESSAGE_ID_DEVICE_DRAW_BOUND_RESOURCE_MAPPED,
    D3D10_MESSAGE_ID_DEVICE_DRAW_INVALID_PRIMITIVETOPOLOGY,
    D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_OFFSET_UNALIGNED,
    D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_STRIDE_UNALIGNED,
    D3D10_MESSAGE_ID_DEVICE_DRAW_INDEX_OFFSET_UNALIGNED,
    D3D10_MESSAGE_ID_DEVICE_DRAW_OUTPUT_STREAM_OFFSET_UNALIGNED,
    D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_LD_UNSUPPORTED,
    D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_SAMPLE_UNSUPPORTED,
    D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_SAMPLE_C_UNSUPPORTED,
    D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_MULTISAMPLE_UNSUPPORTED,
    D3D10_MESSAGE_ID_DEVICE_DRAW_SO_TARGETS_BOUND_WITHOUT_SOURCE,
    D3D10_MESSAGE_ID_DEVICE_DRAW_SO_STRIDE_LARGER_THAN_BUFFER,
    D3D10_MESSAGE_ID_DEVICE_DRAW_OM_RENDER_TARGET_DOES_NOT_SUPPORT_BLENDING,
    D3D10_MESSAGE_ID_DEVICE_DRAW_OM_DUAL_SOURCE_BLENDING_CAN_ONLY_HAVE_RENDER_TARGET_0,
    D3D10_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_AT_FAULT,
    D3D10_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_POSSIBLY_AT_FAULT,
    D3D10_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_NOT_AT_FAULT,

    D3D10_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_INVALIDARG_RETURN,
    D3D10_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_OUTOFMEMORY_RETURN,
    D3D10_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_BADINTERFACE_RETURN,

    D3D10_MESSAGE_ID_DEVICE_DRAW_VIEWPORT_NOT_SET,
    D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_TRAILING_DIGIT_IN_SEMANTIC,
    D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_TRAILING_DIGIT_IN_SEMANTIC,
    D3D10_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_DENORMFLUSH,
    D3D10_MESSAGE_ID_OMSETRENDERTARGETS_INVALIDVIEW,
    D3D10_MESSAGE_ID_DEVICE_SETTEXTFILTERSIZE_INVALIDDIMENSIONS,
    D3D10_MESSAGE_ID_DEVICE_DRAW_SAMPLER_MISMATCH,
    D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_TYPE_MISMATCH,

    D3D10_MESSAGE_ID_BLENDSTATE_GETDESC_LEGACY,
    D3D10_MESSAGE_ID_SHADERRESOURCEVIEW_GETDESC_LEGACY,

    D3D10_MESSAGE_ID_CREATEQUERY_OUTOFMEMORY_RETURN,
    D3D10_MESSAGE_ID_CREATEPREDICATE_OUTOFMEMORY_RETURN,
    D3D10_MESSAGE_ID_CREATECOUNTER_OUTOFRANGE_COUNTER,
    D3D10_MESSAGE_ID_CREATECOUNTER_SIMULTANEOUS_ACTIVE_COUNTERS_EXHAUSTED,
    D3D10_MESSAGE_ID_CREATECOUNTER_UNSUPPORTED_WELLKNOWN_COUNTER,
    D3D10_MESSAGE_ID_CREATECOUNTER_OUTOFMEMORY_RETURN,
    D3D10_MESSAGE_ID_CREATECOUNTER_NONEXCLUSIVE_RETURN,
    D3D10_MESSAGE_ID_CREATECOUNTER_NULLDESC,
    D3D10_MESSAGE_ID_CHECKCOUNTER_OUTOFRANGE_COUNTER,
    D3D10_MESSAGE_ID_CHECKCOUNTER_UNSUPPORTED_WELLKNOWN_COUNTER,
    D3D10_MESSAGE_ID_SETPREDICATION_INVALID_PREDICATE_STATE,
    D3D10_MESSAGE_ID_QUERY_BEGIN_UNSUPPORTED,
    D3D10_MESSAGE_ID_PREDICATE_BEGIN_DURING_PREDICATION,
    D3D10_MESSAGE_ID_QUERY_BEGIN_DUPLICATE,
    D3D10_MESSAGE_ID_QUERY_BEGIN_ABANDONING_PREVIOUS_RESULTS,
    D3D10_MESSAGE_ID_PREDICATE_END_DURING_PREDICATION,
    D3D10_MESSAGE_ID_QUERY_END_ABANDONING_PREVIOUS_RESULTS,
    D3D10_MESSAGE_ID_QUERY_END_WITHOUT_BEGIN,
    D3D10_MESSAGE_ID_QUERY_GETDATA_INVALID_DATASIZE,
    D3D10_MESSAGE_ID_QUERY_GETDATA_INVALID_FLAGS,
    D3D10_MESSAGE_ID_QUERY_GETDATA_INVALID_CALL,

    D3D10_MESSAGE_ID_DEVICE_DRAW_PS_OUTPUT_TYPE_MISMATCH,
    D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_GATHER_UNSUPPORTED,
    D3D10_MESSAGE_ID_DEVICE_DRAW_INVALID_USE_OF_CENTER_MULTISAMPLE_PATTERN,
    D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_STRIDE_TOO_LARGE,
    D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_INVALIDRANGE,
    D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_EMPTY_LAYOUT,
    D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_SAMPLE_COUNT_MISMATCH,
    D3D10_MESSAGE_ID_D3D10_MESSAGES_END,

    //10on9 messages:
    D3D10_MESSAGE_ID_D3D10L9_MESSAGES_START = 0x00100000,
    D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_STENCIL_NO_TWO_SIDED,
    D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_DepthBiasClamp_NOT_SUPPORTED,
    D3D10_MESSAGE_ID_CREATESAMPLERSTATE_NO_COMPARISON_SUPPORT,
    D3D10_MESSAGE_ID_CREATESAMPLERSTATE_EXCESSIVE_ANISOTROPY,
    D3D10_MESSAGE_ID_CREATESAMPLERSTATE_BORDER_OUT_OF_RANGE,
    D3D10_MESSAGE_ID_VSSETSAMPLERS_NOT_SUPPORTED,
    D3D10_MESSAGE_ID_VSSETSAMPLERS_TOO_MANY_SAMPLERS,
    D3D10_MESSAGE_ID_PSSETSAMPLERS_TOO_MANY_SAMPLERS,
    D3D10_MESSAGE_ID_CREATERESOURCE_NO_ARRAYS,
    D3D10_MESSAGE_ID_CREATERESOURCE_NO_VB_AND_IB_BIND,
    D3D10_MESSAGE_ID_CREATERESOURCE_NO_TEXTURE_1D,
    D3D10_MESSAGE_ID_CREATERESOURCE_DIMENSION_OUT_OF_RANGE,
    D3D10_MESSAGE_ID_CREATERESOURCE_NOT_BINDABLE_AS_SHADER_RESOURCE,
    D3D10_MESSAGE_ID_OMSETRENDERTARGETS_TOO_MANY_RENDER_TARGETS,
    D3D10_MESSAGE_ID_OMSETRENDERTARGETS_NO_DIFFERING_BIT_DEPTHS,
    D3D10_MESSAGE_ID_IASETVERTEXBUFFERS_BAD_BUFFER_INDEX,
    D3D10_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_TOO_MANY_VIEWPORTS,
    D3D10_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_ADJACENCY_UNSUPPORTED,
    D3D10_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_TOO_MANY_SCISSORS,
    D3D10_MESSAGE_ID_COPYRESOURCE_ONLY_TEXTURE_2D_WITHIN_GPU_MEMORY,
    D3D10_MESSAGE_ID_COPYRESOURCE_NO_TEXTURE_3D_READBACK,
    D3D10_MESSAGE_ID_COPYRESOURCE_NO_TEXTURE_ONLY_READBACK,
    D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_UNSUPPORTED_FORMAT,
    D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_ALPHA_TO_COVERAGE,
    D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_DepthClipEnable_MUST_BE_TRUE,
    D3D10_MESSAGE_ID_DRAWINDEXED_STARTINDEXLOCATION_MUST_BE_POSITIVE,
    D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_MUST_USE_LOWEST_LOD,
    D3D10_MESSAGE_ID_CREATESAMPLERSTATE_MINLOD_MUST_NOT_BE_FRACTIONAL,
    D3D10_MESSAGE_ID_CREATESAMPLERSTATE_MAXLOD_MUST_BE_FLT_MAX,
    D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_FIRSTARRAYSLICE_MUST_BE_ZERO,
    D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_CUBES_MUST_HAVE_6_SIDES,
    D3D10_MESSAGE_ID_CREATERESOURCE_NOT_BINDABLE_AS_RENDER_TARGET,
    D3D10_MESSAGE_ID_CREATERESOURCE_NO_DWORD_INDEX_BUFFER,
    D3D10_MESSAGE_ID_CREATERESOURCE_MSAA_PRECLUDES_SHADER_RESOURCE,
    D3D10_MESSAGE_ID_CREATERESOURCE_PRESENTATION_PRECLUDES_SHADER_RESOURCE,
    D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_INDEPENDENT_BLEND_ENABLE,
    D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_INDEPENDENT_WRITE_MASKS,
    D3D10_MESSAGE_ID_CREATERESOURCE_NO_STREAM_OUT,
    D3D10_MESSAGE_ID_CREATERESOURCE_ONLY_VB_IB_FOR_BUFFERS,
    D3D10_MESSAGE_ID_CREATERESOURCE_NO_AUTOGEN_FOR_VOLUMES,
    D3D10_MESSAGE_ID_CREATERESOURCE_DXGI_FORMAT_R8G8B8A8_CANNOT_BE_SHARED,
    D3D10_MESSAGE_ID_VSSHADERRESOURCES_NOT_SUPPORTED,
    D3D10_MESSAGE_ID_GEOMETRY_SHADER_NOT_SUPPORTED,
    D3D10_MESSAGE_ID_STREAM_OUT_NOT_SUPPORTED,
    D3D10_MESSAGE_ID_TEXT_FILTER_NOT_SUPPORTED,
    D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_SEPARATE_ALPHA_BLEND,
    D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_MRT_BLEND,
    D3D10_MESSAGE_ID_CREATEBLENDSTATE_OPERATION_NOT_SUPPORTED,
    D3D10_MESSAGE_ID_CREATESAMPLERSTATE_NO_MIRRORONCE,
    D3D10_MESSAGE_ID_DRAWINSTANCED_NOT_SUPPORTED,
    D3D10_MESSAGE_ID_DRAWINDEXEDINSTANCED_NOT_SUPPORTED_BELOW_9_3,
    D3D10_MESSAGE_ID_DRAWINDEXED_POINTLIST_UNSUPPORTED,
    D3D10_MESSAGE_ID_SETBLENDSTATE_SAMPLE_MASK_CANNOT_BE_ZERO,
    D3D10_MESSAGE_ID_CREATERESOURCE_DIMENSION_EXCEEDS_FEATURE_LEVEL_DEFINITION,
    D3D10_MESSAGE_ID_CREATERESOURCE_ONLY_SINGLE_MIP_LEVEL_DEPTH_STENCIL_SUPPORTED,
    D3D10_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_NEGATIVESCISSOR,
    D3D10_MESSAGE_ID_SLOT_ZERO_MUST_BE_D3D10_INPUT_PER_VERTEX_DATA,
    D3D10_MESSAGE_ID_CREATERESOURCE_NON_POW_2_MIPMAP,
    D3D10_MESSAGE_ID_CREATESAMPLERSTATE_BORDER_NOT_SUPPORTED,
    D3D10_MESSAGE_ID_OMSETRENDERTARGETS_NO_SRGB_MRT,
    D3D10_MESSAGE_ID_D3D10L9_MESSAGES_END,

} D3D10_MESSAGE_ID;

typedef struct D3D10_MESSAGE
{
    D3D10_MESSAGE_CATEGORY  Category;
    D3D10_MESSAGE_SEVERITY  Severity;
    D3D10_MESSAGE_ID        ID;
    const char*             pDescription;
    SIZE_T                  DescriptionByteLength;
} D3D10_MESSAGE;

typedef struct D3D10_INFO_QUEUE_FILTER_DESC
{
    UINT                    NumCategories;
    D3D10_MESSAGE_CATEGORY* pCategoryList;
    UINT                    NumSeverities;
    D3D10_MESSAGE_SEVERITY* pSeverityList;
    UINT                    NumIDs;
    D3D10_MESSAGE_ID*       pIDList;
} D3D10_INFO_QUEUE_FILTER_DESC;

// To use, memset to 0, then fill in what you need.
typedef struct D3D10_INFO_QUEUE_FILTER
{
    D3D10_INFO_QUEUE_FILTER_DESC AllowList;
    D3D10_INFO_QUEUE_FILTER_DESC DenyList;
} D3D10_INFO_QUEUE_FILTER;

//=============================================================================
// ID3D10InfoQueue
//
// Logs D3D10 Messages.
// This interface can be queried from ID3D10Device, as long as the device
// was created with the debug layer.
//
//
cpp_quote("#define D3D10_INFO_QUEUE_DEFAULT_MESSAGE_COUNT_LIMIT 1024")
[ uuid( 1b940b17-2642-4d1f-ab1f-b99bad0c395f ), object, local, pointer_default( unique ) ]
interface ID3D10InfoQueue
    : IUnknown
{
    //=========================================================================
    // Methods for configuring how much data is stored in the queue.

    // SetMessageCountLimit()
    // This sets how many messages are stored.  When the queue is full,
    // new messages coming in push old messages out.
    // Passing -1 to SetMessageCountLimit means the queue has
    // unlimited size (go until out of memory or ClearStoredMessages()).
    // The default message count size is
    // D3D10_INFO_QUEUE_DEFAULT_MESSAGE_COUNT_LIMIT
    // Returns S_OK or E_INVALIDARG.
    HRESULT SetMessageCountLimit( [annotation("__in")]  UINT64 MessageCountLimit );

    // ClearStoredMessages
    void    ClearStoredMessages();

    //=========================================================================
    // Methods for retrieving data or statistics from the queue.

    // GetMessage()
    // Retrieves messages, one at a time, from the queue which pass any
    // retrieval filter currently defined.  If there is no retrieval filter,
    // all messages can be retrieved.
    // The MessageIndex parameter is a 0 based index into the results passing
    // the filter.  The number of results is returned by
    // GetNumStoredMessagesAllowedByRetrievalFilter().
    //
    // Note this does not remove the message from the queue.
    //
    // pMessageByteLength inputs the size of the buffer passed in via
    // pMessage, and outputs the size of the message.  pMessage can be NULL
    // when the size of the required buffer is being queried (return S_FALSE).
    //
    // NOTE: The returned buffer pMessage is NOT just the size of D3D10_MESSAGE,
    // it includes extra memory after the D3D10_MESSAGE for storing the string
    // description, which is pointed to from within D3D10_MESSAGE.  Therefore
    // applications should check the size needed for pMessage as described above.
    //
    // Watch out for thread safety when making consecutive calls first to
    // determine the buffer size required and then to pass in the buffer and
    // retrieve the message, and also between calling
    // GetNumStoredMessagesAllowedByRetrievalFilter() and enumerating through
    // the results via GetMessagE().
    //
    // Returns: S_OK, S_FALSE, E_INVALIDARG or E_OUTOFMEMORY.
    HRESULT GetMessage(
        [annotation("__in")]    UINT64  MessageIndex,
        [annotation("__out_bcount_opt(*pMessageByteLength)")] D3D10_MESSAGE* pMessage,
        [annotation("__inout")] SIZE_T*  pMessageByteLength );

    // GetNumMessagesAllowedByStorageFilter()
    // Returns how many messages sent to the queue passed
    // whatever storage filter was active upon receipt of
    // the message.
    // This can be a larger value than the message count limit,
    // returned by GetMessageCountLimit(), since old messages are discarded
    // when the queue is full to prevent overflow.
    UINT64  GetNumMessagesAllowedByStorageFilter();

    // GetNumMessagesDeniedByStorageFilter()
    UINT64  GetNumMessagesDeniedByStorageFilter();

    // GetNumStoredMessages()
    // Returns how many messages are currently stored in the queue.
    UINT64  GetNumStoredMessages();

    // GetNumStoredMessagesAllowedByRetrievalFilter()
    // Returns how many messages that are currently in the queue
    // pass any retrieval filter that is currently set.
    // The MessageIndex parameter to GetMessage() indexes
    // an array of this many results.
    UINT64  GetNumStoredMessagesAllowedByRetrievalFilter();

    // GetNumMessagesDiscardedByMessageCountLimit()
    UINT64  GetNumMessagesDiscardedByMessageCountLimit();

    // GetMessageCountLimit
    // This is how many messages can be stored in the queue.
    // When the queue is full, new messages coming in push old messages out.
    // -1 means there is no limit.
    UINT64  GetMessageCountLimit();

    //=========================================================================
    // Methods for filtering what gets stored in the queue

    // AddStorageFilterEntries()
    // Adds to the existing entries at top of stack
    // Returns: S_OK, E_INVALIDARG or E_OUTOFMEMORY.
    HRESULT AddStorageFilterEntries(
        [annotation("__in")]   D3D10_INFO_QUEUE_FILTER* pFilter );

    // GetStorageFilter()
    // Gets all entries at top of stack.
    // The application must allocate the output buffer.  The size required can be
    // queried by passing null for pFilter and looking at the returned
    // pFilterByteLength (HRESULT is S_FALSE). Note that D3D10_INFO_QUEUE_FILTER contains
    // pointers - these will point to locations within the same
    // contiguous buffer - *pFilterByteLength is the total storage needed for all
    // data.  So the application needs to only allocate/free the memory for pFilter.
    // Returns S_OK, S_FALSE, E_INVALIDARG or E_OUTOFMEMORY
    HRESULT GetStorageFilter(
        [annotation("__out_bcount_opt(*pFilterByteLength)")] D3D10_INFO_QUEUE_FILTER* pFilter,
        [annotation("__inout")] SIZE_T* pFilterByteLength );

    // ClearStorageFilter()
    // Clears filter at the top of the stack (if there is one)
    void    ClearStorageFilter();

    // PushEmptyStorageFilter()
    // Push an empty storage filter on the stack to allow local filtering changes.
    // For convenience, this is automatically called by SetStorageFilter()
    // if the stack is empty.  Thus if the stack is not needed, filters can be
    // defined without ever bothering to push or pop.
    // Returns S_OK or E_OUTOFMEMORY
    HRESULT PushEmptyStorageFilter();

    // PushCopyOfStorageFilter()
    // Push a copy of the current filter so that local modifications can be made
    // starting from what currently exists.
    // Returns S_OK or E_OUTOFMEMORY
    HRESULT PushCopyOfStorageFilter();

    // PushStorageFilter()
    // Push a filter passed as a parameter onto the stack.  This is
    // just a helper for calling PushEmptyStorageFilter() followed
    // by AddStorageFilterEntries()
    // Returns S_OK, E_INVALIDARG or E_OUTOFMEMORY.
    HRESULT PushStorageFilter(
        [annotation("__in")] D3D10_INFO_QUEUE_FILTER* pFilter );

    // PopStorageFilter()
    // Pop the current storage filter off the stack (if there is one)
    void    PopStorageFilter();

    // GetStorageFilterStackSize()
    UINT    GetStorageFilterStackSize();

    //=========================================================================
    // Methods for filtering what gets read out of the queue by GetMessage().

    // AddRetrievalFilterEntries()
    // Adds to the existing entries at top of stack
    // Returns: S_OK, E_INVALIDARG or E_OUTOFMEMORY.
    HRESULT AddRetrievalFilterEntries(
        [annotation("__in")]   D3D10_INFO_QUEUE_FILTER* pFilter );

    // GetRetrievalFilter()
    // Gets all entries at top of stack.
    // The application must allocate the output buffer.  The size required can be
    // queried by passing null for pFilter and looking at the returned
    // pFilterByteLength (HRESULT is S_FALSE).  Note that D3D10_INFO_QUEUE_FILTER contains
    // pointers - these will point to locations within the same
    // contiguous buffer - *pFilterByteLength is the total storage needed for all
    // data.  So the application needs to only allocate/free the memory for pFilter.
    // Returns S_OK, S_FALSE, E_INVALIDARG or E_OUTOFMEMORY
    HRESULT GetRetrievalFilter(
        [annotation("__out_bcount_opt(*pFilterByteLength)")] D3D10_INFO_QUEUE_FILTER* pFilter,
        [annotation("__inout")] SIZE_T* pFilterByteLength );

    // ClearRetrievalFilter()
    // Clears filter at the top of the stack (if there is one)
    void    ClearRetrievalFilter();

    // PushEmptyRetrievalFilter()
    // Push an empty storage filter on the stack to allow local filtering changes.
    // For convenience, this is automatically called by SetRetrievalFilter()
    // if the stack is empty.  Thus if the stack is not needed, filters can be
    // defined without ever bothering to push or pop.
    // Returns S_OK or E_OUTOFMEMORY
    HRESULT PushEmptyRetrievalFilter();

    // PushCopyOfRetrievalFilter()
    // Push a copy of the current filter so that local modifications can be made
    // starting from what currently exists.
    // Returns S_OK or E_OUTOFMEMORY
    HRESULT PushCopyOfRetrievalFilter();

    // PushRetrievalFilter()
    // Push a filter passed as a parameter onto the stack.  This is
    // just a helper for calling PushEmptyRetrievalFilter() followed
    // by AddRetrievalFilterEntries()
    // Returns S_OK, E_INVALIDARG or E_OUTOFMEMORY.
    HRESULT PushRetrievalFilter(
        [annotation("__in")] D3D10_INFO_QUEUE_FILTER* pFilter );

    // PopRetrievalFilter()
    // Pop the current storage filter off the stack (if there is one)
    void    PopRetrievalFilter();

    // GetRetrievalFilterStackSize()
    UINT    GetRetrievalFilterStackSize();

    //=========================================================================
    //  Methods for adding entries to the queue.

    // AddMessage()
    // This is used by D3D10 components to log messages.  Nothing stops
    // applications from calling this, but it isn’t particularly useful.
    // If an application wishes to insert custom strings into the queue,
    // AddApplicationMessage() below is suggested.  See below.
    //
    // Returns S_OK, E_INVALIDARG or E_OUTOFMEMORY
    HRESULT AddMessage(
        [annotation("__in")]    D3D10_MESSAGE_CATEGORY Category,
        [annotation("__in")]    D3D10_MESSAGE_SEVERITY Severity,
        [annotation("__in")]    D3D10_MESSAGE_ID       ID,
        [annotation("__in")]    LPCSTR                pDescription);

    // AddApplicationMessage()
    // This is a convenience for applications that want
    // to insert strings of their own into the queue, perhaps to log issues
    // of its own, or to mark out points in time in the queue.  This
    // has the same effect as calling AddMessage() above with the
    // following settings:
    //          Category = D3D10_MESSAGE_CATEGORY_APPLICATION_DEFINED
    //          Severity = <app selects from D3D10_MESSAGE_SEVERITY>
    //          ID       = D3D10_MESSAGE_ID_STRING_FROM_APPLICATION
    //          pDescription = <application provided string>
    //
    // Returns S_OK, E_INVALIDARG or E_OUTOFMEMORY
    HRESULT AddApplicationMessage(
        [annotation("__in")] D3D10_MESSAGE_SEVERITY Severity,
        [annotation("__in")] LPCSTR                pDescription);

    //=========================================================================
    //  Methods for breaking on errors that pass the storage filter.
    HRESULT SetBreakOnCategory(
        [annotation("__in")]    D3D10_MESSAGE_CATEGORY Category,
        [annotation("__in")]    BOOL bEnable );
    HRESULT SetBreakOnSeverity(
        [annotation("__in")]    D3D10_MESSAGE_SEVERITY Severity,
        [annotation("__in")]    BOOL bEnable );
    HRESULT SetBreakOnID(
        [annotation("__in")]    D3D10_MESSAGE_ID ID,
        [annotation("__in")]    BOOL bEnable );

    BOOL GetBreakOnCategory(
        [annotation("__in")]    D3D10_MESSAGE_CATEGORY Category );
    BOOL GetBreakOnSeverity(
        [annotation("__in")]    D3D10_MESSAGE_SEVERITY Severity );
    BOOL GetBreakOnID(
        [annotation("__in")]    D3D10_MESSAGE_ID ID );

    //=========================================================================
    //  Methods for globally muting debug spte from the InfoQueue
    void SetMuteDebugOutput(
        [annotation("__in")]    BOOL bMute );
    BOOL GetMuteDebugOutput();


};


// Some D3D10 Registry path and keys
cpp_quote( "#define D3D10_REGKEY_PATH __TEXT(\"Software\\\\Microsoft\\\\Direct3D\")" )
cpp_quote( "#define D3D10_MUTE_DEBUG_OUTPUT __TEXT(\"MuteDebugOutput\")" )
cpp_quote( "#define D3D10_ENABLE_BREAK_ON_MESSAGE __TEXT(\"EnableBreakOnMessage\")" )
cpp_quote( "#define D3D10_INFOQUEUE_STORAGE_FILTER_OVERRIDE __TEXT(\"InfoQueueStorageFilterOverride\")" )
cpp_quote( "#define D3D10_MUTE_CATEGORY __TEXT(\"Mute_CATEGORY_%s\")" )
cpp_quote( "#define D3D10_MUTE_SEVERITY __TEXT(\"Mute_SEVERITY_%s\")" )
cpp_quote( "#define D3D10_MUTE_ID_STRING __TEXT(\"Mute_ID_%s\")" )
cpp_quote( "#define D3D10_MUTE_ID_DECIMAL __TEXT(\"Mute_ID_%d\")" )
cpp_quote( "#define D3D10_UNMUTE_SEVERITY_INFO __TEXT(\"Unmute_SEVERITY_INFO\")" )
cpp_quote( "#define D3D10_BREAKON_CATEGORY __TEXT(\"BreakOn_CATEGORY_%s\")" )
cpp_quote( "#define D3D10_BREAKON_SEVERITY __TEXT(\"BreakOn_SEVERITY_%s\")" )
cpp_quote( "#define D3D10_BREAKON_ID_STRING __TEXT(\"BreakOn_ID_%s\")" )
cpp_quote( "#define D3D10_BREAKON_ID_DECIMAL __TEXT(\"BreakOn_ID_%d\")" )
cpp_quote( "#define D3D10_APPSIZE_STRING __TEXT(\"Size\")" )
cpp_quote( "#define D3D10_APPNAME_STRING __TEXT(\"Name\")" )



cpp_quote( "DEFINE_GUID(IID_ID3D10Debug,0x9B7E4E01,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0);" )
cpp_quote( "DEFINE_GUID(IID_ID3D10SwitchToRef,0x9B7E4E02,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0);" )
cpp_quote( "DEFINE_GUID(IID_ID3D10InfoQueue,0x1b940b17,0x2642,0x4d1f,0xab,0x1f,0xb9,0x9b,0xad,0x0c,0x39,0x5f);" )

