VirtualBox

source: vbox/trunk/src/VBox/Devices/Graphics/shaderlib/wine/include/d3d10shader.h@ 53206

Last change on this file since 53206 was 53206, checked in by vboxsync, 10 years ago

Devices/vmsvga: header fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 9.0 KB
Line 
1/*
2 * Copyright 2009 Henri Verbeet 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/*
21 * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
22 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
23 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
24 * a choice of LGPL license versions is made available with the language indicating
25 * that LGPLv2 or any later version may be used, or where a choice of which version
26 * of the LGPL is applied is otherwise unspecified.
27 */
28
29#ifndef __WINE_D3D10SHADER_H
30#define __WINE_D3D10SHADER_H
31
32#include "d3d10.h"
33
34#define D3D10_SHADER_DEBUG 0x0001
35#define D3D10_SHADER_SKIP_VALIDATION 0x0002
36#define D3D10_SHADER_SKIP_OPTIMIZATION 0x0004
37#define D3D10_SHADER_PACK_MATRIX_ROW_MAJOR 0x0008
38#define D3D10_SHADER_PACK_MATRIX_COLUMN_MAJOR 0x0010
39#define D3D10_SHADER_PARTIAL_PRECISION 0x0020
40#define D3D10_SHADER_FORCE_VS_SOFTWARE_NO_OPT 0x0040
41#define D3D10_SHADER_FORCE_PS_SOFTWARE_NO_OPT 0x0080
42#define D3D10_SHADER_NO_PRESHADER 0x0100
43#define D3D10_SHADER_AVOID_FLOW_CONTROL 0x0200
44#define D3D10_SHADER_PREFER_FLOW_CONTROL 0x0400
45#define D3D10_SHADER_ENABLE_STRICTNESS 0x0800
46#define D3D10_SHADER_ENABLE_BACKWARDS_COMPATIBILITY 0x1000
47#define D3D10_SHADER_IEEE_STRICTNESS 0x2000
48#define D3D10_SHADER_WARNINGS_ARE_ERRORS 0x40000
49
50#define D3D10_SHADER_OPTIMIZATION_LEVEL0 0x4000
51#define D3D10_SHADER_OPTIMIZATION_LEVEL1 0x0000
52#define D3D10_SHADER_OPTIMIZATION_LEVEL2 0xC000
53#define D3D10_SHADER_OPTIMIZATION_LEVEL3 0x8000
54
55/* These are defined as version-neutral in d3dcommon.h */
56typedef D3D_SHADER_MACRO D3D10_SHADER_MACRO;
57typedef D3D_SHADER_MACRO *LPD3D10_SHADER_MACRO;
58
59typedef D3D_SHADER_VARIABLE_CLASS D3D10_SHADER_VARIABLE_CLASS;
60typedef D3D_SHADER_VARIABLE_CLASS *LPD3D10_SHADER_VARIABLE_CLASS;
61
62typedef D3D_CBUFFER_TYPE D3D10_CBUFFER_TYPE;
63typedef D3D_CBUFFER_TYPE *LPD3D10_CBUFFER_TYPE;
64
65typedef D3D_REGISTER_COMPONENT_TYPE D3D10_REGISTER_COMPONENT_TYPE;
66
67typedef D3D_RESOURCE_RETURN_TYPE D3D10_RESOURCE_RETURN_TYPE;
68
69typedef D3D_NAME D3D10_NAME;
70
71typedef D3D_SHADER_INPUT_TYPE D3D10_SHADER_INPUT_TYPE;
72typedef D3D_SHADER_INPUT_TYPE *LPD3D10_SHADER_INPUT_TYPE;
73
74typedef D3D_SHADER_VARIABLE_TYPE D3D10_SHADER_VARIABLE_TYPE;
75typedef D3D_SHADER_VARIABLE_TYPE *LPD3D10_SHADER_VARIABLE_TYPE;
76
77typedef D3D_INCLUDE_TYPE D3D10_INCLUDE_TYPE;
78typedef ID3DInclude ID3D10Include;
79typedef ID3DInclude *LPD3D10INCLUDE;
80#define IID_ID3D10Include IID_ID3DInclude
81
82typedef struct _D3D10_SHADER_INPUT_BIND_DESC
83{
84 const char *Name;
85 D3D10_SHADER_INPUT_TYPE Type;
86 UINT BindPoint;
87 UINT BindCount;
88 UINT uFlags;
89 D3D10_RESOURCE_RETURN_TYPE ReturnType;
90 D3D10_SRV_DIMENSION Dimension;
91 UINT NumSamples;
92} D3D10_SHADER_INPUT_BIND_DESC;
93
94typedef struct _D3D10_SIGNATURE_PARAMETER_DESC
95{
96 const char *SemanticName;
97 UINT SemanticIndex;
98 UINT Register;
99 D3D10_NAME SystemValueType;
100 D3D10_REGISTER_COMPONENT_TYPE ComponentType;
101 BYTE Mask;
102 BYTE ReadWriteMask;
103} D3D10_SIGNATURE_PARAMETER_DESC;
104
105typedef struct _D3D10_SHADER_DESC
106{
107 UINT Version;
108 const char *Creator;
109 UINT Flags;
110 UINT ConstantBuffers;
111 UINT BoundResources;
112 UINT InputParameters;
113 UINT OutputParameters;
114 UINT InstructionCount;
115 UINT TempRegisterCount;
116 UINT TempArrayCount;
117 UINT DefCount;
118 UINT DclCount;
119 UINT TextureNormalInstructions;
120 UINT TextureLoadInstructions;
121 UINT TextureCompInstructions;
122 UINT TextureBiasInstructions;
123 UINT TextureGradientInstructions;
124 UINT FloatInstructionCount;
125 UINT IntInstructionCount;
126 UINT UintInstructionCount;
127 UINT StaticFlowControlCount;
128 UINT DynamicFlowControlCount;
129 UINT MacroInstructionCount;
130 UINT ArrayInstructionCount;
131 UINT CutInstructionCount;
132 UINT EmitInstructionCount;
133 D3D10_PRIMITIVE_TOPOLOGY GSOutputTopology;
134 UINT GSMaxOutputVertexCount;
135} D3D10_SHADER_DESC;
136
137typedef struct _D3D10_SHADER_BUFFER_DESC
138{
139 const char *Name;
140 D3D10_CBUFFER_TYPE Type;
141 UINT Variables;
142 UINT Size;
143 UINT uFlags;
144} D3D10_SHADER_BUFFER_DESC;
145
146typedef struct _D3D10_SHADER_VARIABLE_DESC
147{
148 const char *Name;
149 UINT StartOffset;
150 UINT Size;
151 UINT uFlags;
152 void *DefaultValue;
153} D3D10_SHADER_VARIABLE_DESC;
154
155typedef struct _D3D10_SHADER_TYPE_DESC
156{
157 D3D10_SHADER_VARIABLE_CLASS Class;
158 D3D10_SHADER_VARIABLE_TYPE Type;
159 UINT Rows;
160 UINT Columns;
161 UINT Elements;
162 UINT Members;
163 UINT Offset;
164} D3D10_SHADER_TYPE_DESC;
165
166DEFINE_GUID(IID_ID3D10ShaderReflectionType, 0xc530ad7d, 0x9b16, 0x4395, 0xa9, 0x79, 0xba, 0x2e, 0xcf, 0xf8, 0x3a, 0xdd);
167
168#define INTERFACE ID3D10ShaderReflectionType
169DECLARE_INTERFACE(ID3D10ShaderReflectionType)
170{
171 STDMETHOD(GetDesc)(THIS_ D3D10_SHADER_TYPE_DESC *desc) PURE;
172 STDMETHOD_(struct ID3D10ShaderReflectionType *, GetMemberTypeByIndex)(THIS_ UINT index) PURE;
173 STDMETHOD_(struct ID3D10ShaderReflectionType *, GetMemberTypeByName)(THIS_ const char *name) PURE;
174 STDMETHOD_(const char *, GetMemberTypeName)(THIS_ UINT index) PURE;
175};
176#undef INTERFACE
177
178DEFINE_GUID(IID_ID3D10ShaderReflectionVariable, 0x1bf63c95, 0x2650, 0x405d, 0x99, 0xc1, 0x36, 0x36, 0xbd, 0x1d, 0xa0, 0xa1);
179
180#define INTERFACE ID3D10ShaderReflectionVariable
181DECLARE_INTERFACE(ID3D10ShaderReflectionVariable)
182{
183 STDMETHOD(GetDesc)(THIS_ D3D10_SHADER_VARIABLE_DESC *desc) PURE;
184 STDMETHOD_(struct ID3D10ShaderReflectionType *, GetType)(THIS) PURE;
185};
186#undef INTERFACE
187
188DEFINE_GUID(IID_ID3D10ShaderReflectionConstantBuffer, 0x66c66a94, 0xdddd, 0x4b62, 0xa6, 0x6a, 0xf0, 0xda, 0x33, 0xc2, 0xb4, 0xd0);
189
190#define INTERFACE ID3D10ShaderReflectionConstantBuffer
191DECLARE_INTERFACE(ID3D10ShaderReflectionConstantBuffer)
192{
193 STDMETHOD(GetDesc)(THIS_ D3D10_SHADER_BUFFER_DESC *desc) PURE;
194 STDMETHOD_(struct ID3D10ShaderReflectionVariable *, GetVariableByIndex)(THIS_ UINT index) PURE;
195 STDMETHOD_(struct ID3D10ShaderReflectionVariable *, GetVariableByName)(THIS_ const char *name) PURE;
196};
197#undef INTERFACE
198
199DEFINE_GUID(IID_ID3D10ShaderReflection, 0xd40e20b6, 0xf8f7, 0x42ad, 0xab, 0x20, 0x4b, 0xaf, 0x8f, 0x15, 0xdf, 0xaa);
200
201#define INTERFACE ID3D10ShaderReflection
202DECLARE_INTERFACE_(ID3D10ShaderReflection, IUnknown)
203{
204 /* IUnknown methods */
205 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE;
206 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
207 STDMETHOD_(ULONG, Release)(THIS) PURE;
208 /* ID3D10ShaderReflection methods */
209 STDMETHOD(GetDesc)(THIS_ D3D10_SHADER_DESC *desc) PURE;
210 STDMETHOD_(struct ID3D10ShaderReflectionConstantBuffer *, GetConstantBufferByIndex)(THIS_ UINT index) PURE;
211 STDMETHOD_(struct ID3D10ShaderReflectionConstantBuffer *, GetConstantBufferByName)(THIS_ const char *name) PURE;
212 STDMETHOD(GetResourceBindingDesc)(THIS_ UINT index, D3D10_SHADER_INPUT_BIND_DESC *desc) PURE;
213 STDMETHOD(GetInputParameterDesc)(THIS_ UINT index, D3D10_SIGNATURE_PARAMETER_DESC *desc) PURE;
214 STDMETHOD(GetOutputParameterDesc)(THIS_ UINT index, D3D10_SIGNATURE_PARAMETER_DESC *desc) PURE;
215};
216#undef INTERFACE
217
218
219#ifdef __cplusplus
220extern "C" {
221#endif
222
223HRESULT WINAPI D3D10CompileShader(const char *data, SIZE_T data_size, const char *filename,
224 const D3D10_SHADER_MACRO *defines, ID3D10Include *include, const char *entrypoint,
225 const char *profile, UINT flags, ID3D10Blob **shader, ID3D10Blob **error_messages);
226HRESULT WINAPI D3D10DisassembleShader(const void *data, SIZE_T data_size,
227 BOOL color_code, const char *comments, ID3D10Blob **disassembly);
228const char * WINAPI D3D10GetVertexShaderProfile(ID3D10Device *device);
229const char * WINAPI D3D10GetGeometryShaderProfile(ID3D10Device *device);
230const char * WINAPI D3D10GetPixelShaderProfile(ID3D10Device *device);
231
232HRESULT WINAPI D3D10ReflectShader(const void *data, SIZE_T data_size, ID3D10ShaderReflection **reflector);
233HRESULT WINAPI D3D10GetInputSignatureBlob(const void *data, SIZE_T data_size, ID3D10Blob **blob);
234HRESULT WINAPI D3D10GetOutputSignatureBlob(const void *data, SIZE_T data_size, ID3D10Blob **blob);
235HRESULT WINAPI D3D10GetInputAndOutputSignatureBlob(const void *data, SIZE_T data_size, ID3D10Blob **blob);
236HRESULT WINAPI D3D10GetShaderDebugInfo(const void *data, SIZE_T data_size, ID3D10Blob **blob);
237
238#ifdef __cplusplus
239}
240#endif
241
242#endif /* __WINE_D3D10SHADER_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette