#ifndef __D3D10SHADER_H__
#define __D3D10SHADER_H__
#include "d3d10.h"
#include <winapifamily.h>
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#define D3D10_TX_VERSION(_Major,_Minor) (('T' << 24) | ('X' << 16) | ((_Major) << 8) | (_Minor))
#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)
#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)
#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
;
typedef
*
;
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
D3D10_SHADER_VARIABLE_TYPE
;
typedef
D3D10_SHADER_VARIABLE_TYPE
*
LPD3D10_SHADER_VARIABLE_TYPE
;
typedef
;
typedef
*
;
typedef
;
typedef
*
;
typedef
D3D10_SHADER_CBUFFER_FLAGS
;
typedef
D3D10_SHADER_CBUFFER_FLAGS
*
LPD3D10_SHADER_CBUFFER_FLAGS
;
typedef
;
typedef
*
;
typedef
;
typedef
D3D10_RESOURCE_RETURN_TYPE
;
typedef
D3D_REGISTER_COMPONENT_TYPE
D3D10_REGISTER_COMPONENT_TYPE
;
typedef
;
typedef interface ID3DInclude ID3D10Include;
typedef interface ID3DInclude* LPD3D10INCLUDE;
#define IID_ID3D10Include IID_ID3DInclude
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
;
;
TextureNormalInstructions
;
;
;
;
TextureGradientInstructions
;
;
;
;
;
;
;
;
;
;
;
;
}
;
typedef
struct
_D3D10_SHADER_BUFFER_DESC
{
;
;
;
;
;
}
;
typedef
struct
_D3D10_SHADER_VARIABLE_DESC
{
;
;
;
;
;
}
D3D10_SHADER_VARIABLE_DESC
;
typedef
struct
{
D3D10_SHADER_VARIABLE_CLASS
;
D3D10_SHADER_VARIABLE_TYPE
;
;
;
;
;
;
}
;
typedef
struct
{
;
;
;
;
;
D3D10_RESOURCE_RETURN_TYPE
;
;
;
}
;
typedef
struct
_D3D10_SIGNATURE_PARAMETER_DESC
{
;
;
;
;
D3D10_REGISTER_COMPONENT_TYPE
;
;
;
}
D3D10_SIGNATURE_PARAMETER_DESC
;
typedef interface ID3D10ShaderReflectionType ID3D10ShaderReflectionType;
typedef
struct
ID3D10ShaderReflectionType
ID3D10ShaderReflectionType
;
typedef interface ID3D10ShaderReflectionType *LPD3D10SHADERREFLECTIONTYPE;
typedef
struct
ID3D10ShaderReflectionType
*
LPD3D10SHADERREFLECTIONTYPE
;
interface DECLSPEC_UUID("C530AD7D-9B16-4395-A979-BA2ECFF83ADD") ID3D10ShaderReflectionType;
struct
__declspec
(uuid(
"C530AD7D-9B16-4395-A979-BA2ECFF83ADD"
))
ID3D10ShaderReflectionType
;
DEFINE_GUID(IID_ID3D10ShaderReflectionType,
0xc530ad7d, 0x9b16, 0x4395, 0xa9, 0x79, 0xba, 0x2e, 0xcf, 0xf8, 0x3a, 0xdd);
extern
"C"
const
IID_ID3D10ShaderReflectionType
;
#undef INTERFACE
#define INTERFACE ID3D10ShaderReflectionType
DECLARE_INTERFACE(ID3D10ShaderReflectionType)
struct
__declspec
(novtable)
ID3D10ShaderReflectionType
{
STDMETHOD(GetDesc)(THIS_ D3D10_SHADER_TYPE_DESC *pDesc) PURE;
virtual
__declspec
(nothrow)
__stdcall
(
*
) =
0
;
STDMETHOD_(ID3D10ShaderReflectionType*, GetMemberTypeByIndex)(THIS_ UINT Index) PURE;
virtual
__declspec
(nothrow)
ID3D10ShaderReflectionType
*
__stdcall
(
) =
0
;
STDMETHOD_(ID3D10ShaderReflectionType*, GetMemberTypeByName)(THIS_ LPCSTR Name) PURE;
virtual
__declspec
(nothrow)
ID3D10ShaderReflectionType
*
__stdcall
(
) =
0
;
STDMETHOD_(LPCSTR, GetMemberTypeName)(THIS_ UINT Index) PURE;
virtual
__declspec
(nothrow)
__stdcall
(
) =
0
;
};
typedef interface ID3D10ShaderReflectionVariable ID3D10ShaderReflectionVariable;
typedef
struct
ID3D10ShaderReflectionVariable
ID3D10ShaderReflectionVariable
;
typedef interface ID3D10ShaderReflectionVariable *LPD3D10SHADERREFLECTIONVARIABLE;
typedef
struct
ID3D10ShaderReflectionVariable
*
LPD3D10SHADERREFLECTIONVARIABLE
;
interface DECLSPEC_UUID("1BF63C95-2650-405d-99C1-3636BD1DA0A1") ID3D10ShaderReflectionVariable;
struct
__declspec
(uuid(
"1BF63C95-2650-405d-99C1-3636BD1DA0A1"
))
ID3D10ShaderReflectionVariable
;
DEFINE_GUID(IID_ID3D10ShaderReflectionVariable,
0x1bf63c95, 0x2650, 0x405d, 0x99, 0xc1, 0x36, 0x36, 0xbd, 0x1d, 0xa0, 0xa1);
extern
"C"
const
IID_ID3D10ShaderReflectionVariable
;
#undef INTERFACE
#define INTERFACE ID3D10ShaderReflectionVariable
DECLARE_INTERFACE(ID3D10ShaderReflectionVariable)
struct
__declspec
(novtable)
ID3D10ShaderReflectionVariable
{
STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_SHADER_VARIABLE_DESC *pDesc) PURE;
virtual
__declspec
(nothrow)
__stdcall
(
D3D10_SHADER_VARIABLE_DESC
*
) =
0
;
STDMETHOD_(ID3D10ShaderReflectionType*, GetType)(THIS) PURE;
virtual
__declspec
(nothrow)
ID3D10ShaderReflectionType
*
__stdcall
(
void
) =
0
;
};
typedef interface ID3D10ShaderReflectionConstantBuffer ID3D10ShaderReflectionConstantBuffer;
typedef
struct
ID3D10ShaderReflectionConstantBuffer
ID3D10ShaderReflectionConstantBuffer
;
typedef interface ID3D10ShaderReflectionConstantBuffer *LPD3D10SHADERREFLECTIONCONSTANTBUFFER;
typedef
struct
ID3D10ShaderReflectionConstantBuffer
*
LPD3D10SHADERREFLECTIONCONSTANTBUFFER
;
interface DECLSPEC_UUID("66C66A94-DDDD-4b62-A66A-F0DA33C2B4D0") ID3D10ShaderReflectionConstantBuffer;
struct
__declspec
(uuid(
"66C66A94-DDDD-4b62-A66A-F0DA33C2B4D0"
))
ID3D10ShaderReflectionConstantBuffer
;
DEFINE_GUID(IID_ID3D10ShaderReflectionConstantBuffer,
0x66c66a94, 0xdddd, 0x4b62, 0xa6, 0x6a, 0xf0, 0xda, 0x33, 0xc2, 0xb4, 0xd0);
extern
"C"
const
IID_ID3D10ShaderReflectionConstantBuffer
;
#undef INTERFACE
#define INTERFACE ID3D10ShaderReflectionConstantBuffer
DECLARE_INTERFACE(ID3D10ShaderReflectionConstantBuffer)
struct
__declspec
(novtable)
ID3D10ShaderReflectionConstantBuffer
{
STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_SHADER_BUFFER_DESC *pDesc) PURE;
virtual
__declspec
(nothrow)
__stdcall
(
*
) =
0
;
STDMETHOD_(ID3D10ShaderReflectionVariable*, GetVariableByIndex)(THIS_ UINT Index) PURE;
virtual
__declspec
(nothrow)
ID3D10ShaderReflectionVariable
*
__stdcall
(
) =
0
;
STDMETHOD_(ID3D10ShaderReflectionVariable*, GetVariableByName)(THIS_ LPCSTR Name) PURE;
virtual
__declspec
(nothrow)
ID3D10ShaderReflectionVariable
*
__stdcall
(
) =
0
;
};
typedef interface ID3D10ShaderReflection ID3D10ShaderReflection;
typedef
struct
ID3D10ShaderReflection
;
typedef interface ID3D10ShaderReflection *LPD3D10SHADERREFLECTION;
interface DECLSPEC_UUID("D40E20B6-F8F7-42ad-AB20-4BAF8F15DFAA") ID3D10ShaderReflection;
struct
__declspec
(uuid(
"D40E20B6-F8F7-42ad-AB20-4BAF8F15DFAA"
))
;
DEFINE_GUID(IID_ID3D10ShaderReflection,
0xd40e20b6, 0xf8f7, 0x42ad, 0xab, 0x20, 0x4b, 0xaf, 0x8f, 0x15, 0xdf, 0xaa);
extern
"C"
const
IID_ID3D10ShaderReflection
;
#undef INTERFACE
#define INTERFACE ID3D10ShaderReflection
DECLARE_INTERFACE_(ID3D10ShaderReflection, IUnknown)
struct
__declspec
(novtable)
:
public
{
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
virtual
__declspec
(nothrow)
__stdcall
(
const
&
,
*
) =
0
;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
virtual
__declspec
(nothrow)
__stdcall
(
void
) =
0
;
STDMETHOD_(ULONG, Release)(THIS) PURE;
virtual
__declspec
(nothrow)
__stdcall
(
void
) =
0
;
STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_SHADER_DESC *pDesc) PURE;
virtual
__declspec
(nothrow)
__stdcall
(
*
) =
0
;
STDMETHOD_(ID3D10ShaderReflectionConstantBuffer*, GetConstantBufferByIndex)(THIS_ UINT Index) PURE;
virtual
__declspec
(nothrow)
ID3D10ShaderReflectionConstantBuffer
*
__stdcall
(
) =
0
;
STDMETHOD_(ID3D10ShaderReflectionConstantBuffer*, GetConstantBufferByName)(THIS_ LPCSTR Name) PURE;
virtual
__declspec
(nothrow)
ID3D10ShaderReflectionConstantBuffer
*
__stdcall
(
) =
0
;
STDMETHOD(GetResourceBindingDesc)(THIS_ UINT ResourceIndex, _Out_ D3D10_SHADER_INPUT_BIND_DESC *pDesc) PURE;
virtual
__declspec
(nothrow)
__stdcall
(
,
D3D10_SHADER_INPUT_BIND_DESC
*
) =
0
;
STDMETHOD(GetInputParameterDesc)(THIS_ UINT ParameterIndex, _Out_ D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
virtual
__declspec
(nothrow)
__stdcall
(
,
D3D10_SIGNATURE_PARAMETER_DESC
*
) =
0
;
STDMETHOD(GetOutputParameterDesc)(THIS_ UINT ParameterIndex, _Out_ D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
virtual
__declspec
(nothrow)
__stdcall
(
,
D3D10_SIGNATURE_PARAMETER_DESC
*
) =
0
;
};
#ifdef __cplusplus
extern
"C"
{
#endif //__cplusplus
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,
__stdcall
(
,
,
,
const
*
,
,
LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags, _Out_ ID3D10Blob** ppShader, _Out_opt_ ID3D10Blob** ppErrorMsgs);
HRESULT WINAPI D3D10DisassembleShader(_In_reads_bytes_(BytecodeLength) CONST void *pShader, SIZE_T BytecodeLength, BOOL EnableColorCode, _In_opt_ LPCSTR pComments, _Out_ ID3D10Blob** ppDisassembly);
__stdcall
(
const
void
*
,
,
,
,
**
);
LPCSTR WINAPI D3D10GetPixelShaderProfile(_In_ ID3D10Device *pDevice);
__stdcall
D3D10GetPixelShaderProfile
(
*
);
LPCSTR WINAPI D3D10GetVertexShaderProfile(_In_ ID3D10Device *pDevice);
__stdcall
D3D10GetVertexShaderProfile
(
*
);
LPCSTR WINAPI D3D10GetGeometryShaderProfile(_In_ ID3D10Device *pDevice);
__stdcall
D3D10GetGeometryShaderProfile
(
*
);
HRESULT WINAPI D3D10ReflectShader(_In_reads_bytes_(BytecodeLength) CONST void *pShaderBytecode, SIZE_T BytecodeLength, _Out_ ID3D10ShaderReflection **ppReflector);
__stdcall
(
const
void
*
,
,
**
);
HRESULT WINAPI D3D10PreprocessShader(_In_reads_bytes_(SrcDataSize) LPCSTR pSrcData, SIZE_T SrcDataSize, _In_opt_ LPCSTR pFileName, _In_opt_ CONST D3D10_SHADER_MACRO* pDefines,
__stdcall
(
,
,
,
const
*
,
_In_opt_ LPD3D10INCLUDE pInclude, _Out_ ID3D10Blob** ppShaderText, _Out_opt_ ID3D10Blob** ppErrorMsgs);
HRESULT WINAPI D3D10GetInputSignatureBlob(_In_reads_bytes_(BytecodeLength) CONST void *pShaderBytecode, SIZE_T BytecodeLength, _Out_ ID3D10Blob **ppSignatureBlob);
__stdcall
(
const
void
*
,
,
**
);
HRESULT WINAPI D3D10GetOutputSignatureBlob(_In_reads_bytes_(BytecodeLength) CONST void *pShaderBytecode, SIZE_T BytecodeLength, _Out_ ID3D10Blob **ppSignatureBlob);
__stdcall
D3D10GetOutputSignatureBlob
(
const
void
*
,
,
**
);
HRESULT WINAPI D3D10GetInputAndOutputSignatureBlob(_In_reads_bytes_(BytecodeLength) CONST void *pShaderBytecode, SIZE_T BytecodeLength, _Out_ ID3D10Blob **ppSignatureBlob);
__stdcall
(
const
void
*
,
,
**
);
HRESULT WINAPI D3D10GetShaderDebugInfo(_In_reads_bytes_(BytecodeLength) CONST void *pShaderBytecode, SIZE_T BytecodeLength, _Out_ ID3D10Blob** ppDebugInfo);
__stdcall
(
const
void
*
,
,
**
);
#ifdef __cplusplus
}
#endif //__cplusplus
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#endif //__D3D10SHADER_H__