1 | /*
|
---|
2 | * Copyright 2010 Matteo Bruni for CodeWeavers
|
---|
3 | *
|
---|
4 | * This library is free software; you can redistribute it and/or
|
---|
5 | * modify it under the terms of the GNU Lesser General Public
|
---|
6 | * License as published by the Free Software Foundation; either
|
---|
7 | * version 2.1 of the License, or (at your option) any later version.
|
---|
8 | *
|
---|
9 | * This library is distributed in the hope that it will be useful,
|
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
12 | * Lesser General Public License for more details.
|
---|
13 | *
|
---|
14 | * You should have received a copy of the GNU Lesser General Public
|
---|
15 | * License along with this library; if not, write to the Free Software
|
---|
16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
17 | */
|
---|
18 |
|
---|
19 | /*
|
---|
20 | * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
21 | * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
|
---|
22 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
23 | * a choice of LGPL license versions is made available with the language indicating
|
---|
24 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
25 | * of the LGPL is applied is otherwise unspecified.
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef __D3DCOMPILER_H__
|
---|
29 | #define __D3DCOMPILER_H__
|
---|
30 |
|
---|
31 | #include "d3d11shader.h"
|
---|
32 |
|
---|
33 | #ifdef __cplusplus
|
---|
34 | extern "C" {
|
---|
35 | #endif
|
---|
36 |
|
---|
37 | #if defined(__GNUC__)
|
---|
38 | #define D3DCOMPILER_DLL_W (const WCHAR[]){'d','3','d','c','o','m','p','i','l','e','r','_','4','3','.','d','l','l',0}
|
---|
39 | #elif defined(_MSC_VER)
|
---|
40 | #define D3DCOMPILER_DLL_W L"d3dcompiler_43.dll"
|
---|
41 | #else
|
---|
42 | static const WCHAR D3DCOMPILER_DLL_W[] = {'d','3','d','c','o','m','p','i','l','e','r','_','4','3','.','d','l','l',0};
|
---|
43 | #endif
|
---|
44 |
|
---|
45 | #define D3DCOMPILER_DLL_A "d3dcompiler_43.dll"
|
---|
46 | #define D3DCOMPILER_DLL WINELIB_NAME_AW(D3DCOMPILER_DLL_)
|
---|
47 |
|
---|
48 | #define D3DCOMPILE_DEBUG 0x00000001
|
---|
49 | #define D3DCOMPILE_SKIP_VALIDATION 0x00000002
|
---|
50 | #define D3DCOMPILE_SKIP_OPTIMIZATION 0x00000004
|
---|
51 | #define D3DCOMPILE_PACK_MATRIX_ROW_MAJOR 0x00000008
|
---|
52 | #define D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR 0x00000010
|
---|
53 | #define D3DCOMPILE_PARTIAL_PRECISION 0x00000020
|
---|
54 | #define D3DCOMPILE_FORCE_VS_SOFTWARE_NO_OPT 0x00000040
|
---|
55 | #define D3DCOMPILE_FORCE_PS_SOFTWARE_NO_OPT 0x00000080
|
---|
56 | #define D3DCOMPILE_NO_PRESHADER 0x00000100
|
---|
57 | #define D3DCOMPILE_AVOID_FLOW_CONTROL 0x00000200
|
---|
58 | #define D3DCOMPILE_PREFER_FLOW_CONTROL 0x00000400
|
---|
59 | #define D3DCOMPILE_ENABLE_STRICTNESS 0x00000800
|
---|
60 | #define D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY 0x00001000
|
---|
61 | #define D3DCOMPILE_IEEE_STRICTNESS 0x00002000
|
---|
62 | #define D3DCOMPILE_OPTIMIZATION_LEVEL0 0x00004000
|
---|
63 | #define D3DCOMPILE_OPTIMIZATION_LEVEL1 0x00000000
|
---|
64 | #define D3DCOMPILE_OPTIMIZATION_LEVEL2 0x0000c000
|
---|
65 | #define D3DCOMPILE_OPTIMIZATION_LEVEL3 0x00008000
|
---|
66 | #define D3DCOMPILE_WARNINGS_ARE_ERRORS 0x00040000
|
---|
67 |
|
---|
68 | #define D3D_DISASM_ENABLE_COLOR_CODE 0x00000001
|
---|
69 | #define D3D_DISASM_ENABLE_DEFAULT_VALUE_PRINTS 0x00000002
|
---|
70 | #define D3D_DISASM_ENABLE_INSTRUCTION_NUMBERING 0x00000004
|
---|
71 | #define D3D_DISASM_ENABLE_INSTRUCTION_CYCLE 0x00000008
|
---|
72 | #define D3D_DISASM_DISABLE_DEBUG_INFO 0x00000010
|
---|
73 |
|
---|
74 | HRESULT WINAPI D3DCompile(const void *data, SIZE_T data_size, const char *filename,
|
---|
75 | const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint,
|
---|
76 | const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages);
|
---|
77 | typedef HRESULT (WINAPI *pD3DCompile)(const void *data, SIZE_T data_size, const char *filename,
|
---|
78 | const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint,
|
---|
79 | const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages);
|
---|
80 |
|
---|
81 | typedef enum D3DCOMPILER_STRIP_FLAGS
|
---|
82 | {
|
---|
83 | D3DCOMPILER_STRIP_REFLECTION_DATA = 1,
|
---|
84 | D3DCOMPILER_STRIP_DEBUG_INFO = 2,
|
---|
85 | D3DCOMPILER_STRIP_TEST_BLOBS = 4,
|
---|
86 | D3DCOMPILER_STRIP_FORCE_DWORD = 0x7fffffff
|
---|
87 | } D3DCOMPILER_STRIP_FLAGS;
|
---|
88 |
|
---|
89 | HRESULT WINAPI D3DStripShader(const void *data, SIZE_T data_size, UINT flags, ID3DBlob **blob);
|
---|
90 |
|
---|
91 | typedef enum D3D_BLOB_PART
|
---|
92 | {
|
---|
93 | D3D_BLOB_INPUT_SIGNATURE_BLOB,
|
---|
94 | D3D_BLOB_OUTPUT_SIGNATURE_BLOB,
|
---|
95 | D3D_BLOB_INPUT_AND_OUTPUT_SIGNATURE_BLOB,
|
---|
96 | D3D_BLOB_PATCH_CONSTANT_SIGNATURE_BLOB,
|
---|
97 | D3D_BLOB_ALL_SIGNATURE_BLOB,
|
---|
98 | D3D_BLOB_DEBUG_INFO,
|
---|
99 | D3D_BLOB_LEGACY_SHADER,
|
---|
100 | D3D_BLOB_XNA_PREPASS_SHADER,
|
---|
101 | D3D_BLOB_XNA_SHADER,
|
---|
102 | D3D_BLOB_TEST_ALTERNATE_SHADER = 0x8000,
|
---|
103 | D3D_BLOB_TEST_COMPILE_DETAILS,
|
---|
104 | D3D_BLOB_TEST_COMPILE_PERF
|
---|
105 | } D3D_BLOB_PART;
|
---|
106 |
|
---|
107 | HRESULT WINAPI D3DDisassemble(const void *data, SIZE_T data_size,
|
---|
108 | UINT flags, const char *comments, ID3DBlob **disassembly);
|
---|
109 | typedef HRESULT (WINAPI *pD3DDisassemble)(const void *data, SIZE_T data_size,
|
---|
110 | UINT flags, const char *comments, ID3DBlob **disassembly);
|
---|
111 | HRESULT WINAPI D3DGetBlobPart(const void *data, SIZE_T data_size, D3D_BLOB_PART part, UINT flags, ID3DBlob **blob);
|
---|
112 | HRESULT WINAPI D3DGetInputSignatureBlob(const void *data, SIZE_T data_size, ID3DBlob **blob);
|
---|
113 | HRESULT WINAPI D3DGetOutputSignatureBlob(const void *data, SIZE_T data_size, ID3DBlob **blob);
|
---|
114 | HRESULT WINAPI D3DGetInputAndOutputSignatureBlob(const void *data, SIZE_T data_size, ID3DBlob **blob);
|
---|
115 | HRESULT WINAPI D3DGetDebugInfo(const void *data, SIZE_T data_size, ID3DBlob **blob);
|
---|
116 |
|
---|
117 | HRESULT WINAPI D3DReflect(const void *data, SIZE_T data_size, REFIID riid, void **reflector);
|
---|
118 |
|
---|
119 | HRESULT WINAPI D3DCreateBlob(SIZE_T data_size, ID3DBlob **blob);
|
---|
120 |
|
---|
121 | HRESULT WINAPI D3DPreprocess(const void *data, SIZE_T size, const char *filename,
|
---|
122 | const D3D_SHADER_MACRO *defines, ID3DInclude *include,
|
---|
123 | ID3DBlob **shader, ID3DBlob **error_messages);
|
---|
124 | typedef HRESULT (WINAPI *pD3DPreprocess)(const void *data, SIZE_T size, const char *filename,
|
---|
125 | const D3D_SHADER_MACRO *defines, ID3DInclude *include,
|
---|
126 | ID3DBlob **shader, ID3DBlob **error_messages);
|
---|
127 |
|
---|
128 | #ifdef __cplusplus
|
---|
129 | }
|
---|
130 | #endif
|
---|
131 |
|
---|
132 | #endif
|
---|