ifndef __D3DCOMPILER_H__
define __D3DCOMPILER_H__
.pragma list(push, 0)
include d3d11shader.inc

.pragma comment(lib, d3dcompiler_47)

D3DCOMPILER_DLL_W       equ <L"d3dcompiler_47.dll">
D3DCOMPILER_DLL_A       equ <"d3dcompiler_47.dll">

D3DCOMPILE_DEBUG        equ 0x00000001
D3DCOMPILE_SKIP_VALIDATION equ 0x00000002
D3DCOMPILE_SKIP_OPTIMIZATION equ 0x00000004
D3DCOMPILE_PACK_MATRIX_ROW_MAJOR equ 0x00000008
D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR equ 0x00000010
D3DCOMPILE_PARTIAL_PRECISION equ 0x00000020
D3DCOMPILE_FORCE_VS_SOFTWARE_NO_OPT equ 0x00000040
D3DCOMPILE_FORCE_PS_SOFTWARE_NO_OPT equ 0x00000080
D3DCOMPILE_NO_PRESHADER equ 0x00000100
D3DCOMPILE_AVOID_FLOW_CONTROL equ 0x00000200
D3DCOMPILE_PREFER_FLOW_CONTROL equ 0x00000400
D3DCOMPILE_ENABLE_STRICTNESS equ 0x00000800
D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY equ 0x00001000
D3DCOMPILE_IEEE_STRICTNESS equ 0x00002000
D3DCOMPILE_OPTIMIZATION_LEVEL0 equ 0x00004000
D3DCOMPILE_OPTIMIZATION_LEVEL1 equ 0x00000000
D3DCOMPILE_OPTIMIZATION_LEVEL2 equ 0x0000c000
D3DCOMPILE_OPTIMIZATION_LEVEL3 equ 0x00008000
D3DCOMPILE_RESERVED16   equ 0x00010000
D3DCOMPILE_RESERVED17   equ 0x00020000
D3DCOMPILE_WARNINGS_ARE_ERRORS equ 0x00040000
D3DCOMPILE_RESOURCES_MAY_ALIAS equ 0x00080000

D3D_DISASM_ENABLE_COLOR_CODE equ 0x00000001
D3D_DISASM_ENABLE_DEFAULT_VALUE_PRINTS equ 0x00000002
D3D_DISASM_ENABLE_INSTRUCTION_NUMBERING equ 0x00000004
D3D_DISASM_ENABLE_INSTRUCTION_CYCLE equ 0x00000008
D3D_DISASM_DISABLE_DEBUG_INFO equ 0x00000010

D3DCompileFromFile proto WINAPI :LPCWSTR, :ptr, :ptr, :LPCSTR, :LPCSTR, :UINT, :UINT, :ptr, :ptr
D3DCompile proto WINAPI :ptr, :SIZE_T, :ptr, :ptr, :ptr, :ptr, :ptr, :UINT, :UINT, :ptr, :ptr

CALLBACK(pD3DCompile, :ptr, :SIZE_T, :ptr, :ptr, :ptr, :ptr, :ptr, :UINT, :UINT, :ptr, :ptr)

D3DCOMPILER_STRIP_FLAGS typedef SDWORD
D3DCOMPILER_STRIP_REFLECTION_DATA equ 1
D3DCOMPILER_STRIP_DEBUG_INFO equ 2
D3DCOMPILER_STRIP_TEST_BLOBS equ 4
D3DCOMPILER_STRIP_FORCE_DWORD equ 0x7fffffff

D3DStripShader proto WINAPI :ptr, :SIZE_T, :UINT, :ptr

D3D_BLOB_PART           typedef SDWORD
D3D_BLOB_INPUT_SIGNATURE_BLOB equ 0
D3D_BLOB_OUTPUT_SIGNATURE_BLOB equ 1
D3D_BLOB_INPUT_AND_OUTPUT_SIGNATURE_BLOB equ 2
D3D_BLOB_PATCH_CONSTANT_SIGNATURE_BLOB equ 3
D3D_BLOB_ALL_SIGNATURE_BLOB equ 4
D3D_BLOB_DEBUG_INFO     equ 5
D3D_BLOB_LEGACY_SHADER  equ 6
D3D_BLOB_XNA_PREPASS_SHADER equ 7
D3D_BLOB_XNA_SHADER     equ 8
D3D_BLOB_TEST_ALTERNATE_SHADER equ 0x8000
D3D_BLOB_TEST_COMPILE_DETAILS equ 10
D3D_BLOB_TEST_COMPILE_PERF equ 11

D3DDisassemble proto WINAPI :ptr, :SIZE_T, :UINT, :LPSTR, :ptr

CALLBACK(pD3DDisassemble, :ptr, :SIZE_T, :UINT, :ptr, :ptr)

D3DGetBlobPart proto WINAPI :ptr, :SIZE_T, :D3D_BLOB_PART, :UINT, :ptr
D3DGetInputSignatureBlob proto WINAPI :ptr, :SIZE_T, :ptr
D3DGetOutputSignatureBlob proto WINAPI :ptr, :SIZE_T, :ptr
D3DGetInputAndOutputSignatureBlob proto WINAPI :ptr, :SIZE_T, :ptr
D3DGetDebugInfo proto WINAPI :ptr, :SIZE_T, :ptr
D3DReadFileToBlob proto WINAPI :ptr, :ptr
D3DWriteBlobToFile proto WINAPI :ptr, :ptr, :BOOL
D3DReflect proto WINAPI :ptr, :SIZE_T, :REFIID, :ptr
D3DCreateBlob proto WINAPI :SIZE_T, :ptr
D3DPreprocess proto WINAPI :ptr, :SIZE_T, :LPSTR, :ptr, :ptr, :ptr, :ptr

CALLBACK(pD3DPreprocess, :ptr, :SIZE_T, :ptr, :ptr, :ptr, :ptr, :ptr)

.pragma list(pop)
endif
