ReactOS  0.4.15-dev-985-gd905dd5
d3d10shader.h
Go to the documentation of this file.
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 #ifndef __WINE_D3D10SHADER_H
21 #define __WINE_D3D10SHADER_H
22 
23 #include "d3d10.h"
24 
25 #define D3D10_SHADER_DEBUG 0x0001
26 #define D3D10_SHADER_SKIP_VALIDATION 0x0002
27 #define D3D10_SHADER_SKIP_OPTIMIZATION 0x0004
28 #define D3D10_SHADER_PACK_MATRIX_ROW_MAJOR 0x0008
29 #define D3D10_SHADER_PACK_MATRIX_COLUMN_MAJOR 0x0010
30 #define D3D10_SHADER_PARTIAL_PRECISION 0x0020
31 #define D3D10_SHADER_FORCE_VS_SOFTWARE_NO_OPT 0x0040
32 #define D3D10_SHADER_FORCE_PS_SOFTWARE_NO_OPT 0x0080
33 #define D3D10_SHADER_NO_PRESHADER 0x0100
34 #define D3D10_SHADER_AVOID_FLOW_CONTROL 0x0200
35 #define D3D10_SHADER_PREFER_FLOW_CONTROL 0x0400
36 #define D3D10_SHADER_ENABLE_STRICTNESS 0x0800
37 #define D3D10_SHADER_ENABLE_BACKWARDS_COMPATIBILITY 0x1000
38 #define D3D10_SHADER_IEEE_STRICTNESS 0x2000
39 #define D3D10_SHADER_WARNINGS_ARE_ERRORS 0x40000
40 
41 #define D3D10_SHADER_OPTIMIZATION_LEVEL0 0x4000
42 #define D3D10_SHADER_OPTIMIZATION_LEVEL1 0x0000
43 #define D3D10_SHADER_OPTIMIZATION_LEVEL2 0xC000
44 #define D3D10_SHADER_OPTIMIZATION_LEVEL3 0x8000
45 
46 /* These are defined as version-neutral in d3dcommon.h */
49 
52 
55 
57 
59 
61 
64 
67 
71 #define IID_ID3D10Include IID_ID3DInclude
72 
74 {
75  const char *Name;
84 
86 {
87  const char *SemanticName;
95 
96 typedef struct _D3D10_SHADER_DESC
97 {
99  const char *Creator;
127 
129 {
130  const char *Name;
136 
138 {
139  const char *Name;
145 
147 {
156 
157 DEFINE_GUID(IID_ID3D10ShaderReflectionType, 0xc530ad7d, 0x9b16, 0x4395, 0xa9, 0x79, 0xba, 0x2e, 0xcf, 0xf8, 0x3a, 0xdd);
158 
159 #define INTERFACE ID3D10ShaderReflectionType
160 DECLARE_INTERFACE(ID3D10ShaderReflectionType)
161 {
163  STDMETHOD_(struct ID3D10ShaderReflectionType *, GetMemberTypeByIndex)(THIS_ UINT index) PURE;
164  STDMETHOD_(struct ID3D10ShaderReflectionType *, GetMemberTypeByName)(THIS_ const char *name) PURE;
165  STDMETHOD_(const char *, GetMemberTypeName)(THIS_ UINT index) PURE;
166 };
167 #undef INTERFACE
168 
169 DEFINE_GUID(IID_ID3D10ShaderReflectionVariable, 0x1bf63c95, 0x2650, 0x405d, 0x99, 0xc1, 0x36, 0x36, 0xbd, 0x1d, 0xa0, 0xa1);
170 
171 #define INTERFACE ID3D10ShaderReflectionVariable
172 DECLARE_INTERFACE(ID3D10ShaderReflectionVariable)
173 {
175  STDMETHOD_(struct ID3D10ShaderReflectionType *, GetType)(THIS) PURE;
176 };
177 #undef INTERFACE
178 
179 DEFINE_GUID(IID_ID3D10ShaderReflectionConstantBuffer, 0x66c66a94, 0xdddd, 0x4b62, 0xa6, 0x6a, 0xf0, 0xda, 0x33, 0xc2, 0xb4, 0xd0);
180 
181 #define INTERFACE ID3D10ShaderReflectionConstantBuffer
182 DECLARE_INTERFACE(ID3D10ShaderReflectionConstantBuffer)
183 {
185  STDMETHOD_(struct ID3D10ShaderReflectionVariable *, GetVariableByIndex)(THIS_ UINT index) PURE;
186  STDMETHOD_(struct ID3D10ShaderReflectionVariable *, GetVariableByName)(THIS_ const char *name) PURE;
187 };
188 #undef INTERFACE
189 
190 DEFINE_GUID(IID_ID3D10ShaderReflection, 0xd40e20b6, 0xf8f7, 0x42ad, 0xab, 0x20, 0x4b, 0xaf, 0x8f, 0x15, 0xdf, 0xaa);
191 
192 #define INTERFACE ID3D10ShaderReflection
193 DECLARE_INTERFACE_(ID3D10ShaderReflection, IUnknown)
194 {
195  /* IUnknown methods */
199  /* ID3D10ShaderReflection methods */
201  STDMETHOD_(struct ID3D10ShaderReflectionConstantBuffer *, GetConstantBufferByIndex)(THIS_ UINT index) PURE;
202  STDMETHOD_(struct ID3D10ShaderReflectionConstantBuffer *, GetConstantBufferByName)(THIS_ const char *name) PURE;
203  STDMETHOD(GetResourceBindingDesc)(THIS_ UINT index, D3D10_SHADER_INPUT_BIND_DESC *desc) PURE;
205  STDMETHOD(GetOutputParameterDesc)(THIS_ UINT index, D3D10_SIGNATURE_PARAMETER_DESC *desc) PURE;
206 };
207 #undef INTERFACE
208 
209 
210 #ifdef __cplusplus
211 extern "C" {
212 #endif
213 
214 HRESULT WINAPI D3D10CompileShader(const char *data, SIZE_T data_size, const char *filename,
215  const D3D10_SHADER_MACRO *defines, ID3D10Include *include, const char *entrypoint,
217 HRESULT WINAPI D3D10DisassembleShader(const void *data, SIZE_T data_size,
218  BOOL color_code, const char *comments, ID3D10Blob **disassembly);
222 
223 HRESULT WINAPI D3D10ReflectShader(const void *data, SIZE_T data_size, ID3D10ShaderReflection **reflector);
227 HRESULT WINAPI D3D10GetShaderDebugInfo(const void *data, SIZE_T data_size, ID3D10Blob **blob);
228 
229 #ifdef __cplusplus
230 }
231 #endif
232 
233 #endif /* __WINE_D3D10SHADER_H */
D3D_RESOURCE_RETURN_TYPE
Definition: d3dcommon.idl:566
struct _D3D10_SHADER_VARIABLE_DESC D3D10_SHADER_VARIABLE_DESC
IID_ID3DBlob enum _D3D_INCLUDE_TYPE D3D_INCLUDE_TYPE
#define REFIID
Definition: guiddef.h:118
D3D_CBUFFER_TYPE D3D10_CBUFFER_TYPE
Definition: d3d10shader.h:53
#define THIS_
Definition: basetyps.h:65
_In_ BOOLEAN Release
Definition: classpnp.h:1122
Definition: image.c:133
#define THIS
Definition: basetyps.h:66
REFIID riid
Definition: precomp.h:44
D3D_NAME D3D10_NAME
Definition: d3d10shader.h:60
UINT TextureLoadInstructions
Definition: d3d10shader.h:111
D3D_SHADER_MACRO D3D10_SHADER_MACRO
Definition: d3d10shader.h:47
D3D10_SHADER_VARIABLE_TYPE Type
Definition: d3d10shader.h:149
static HRESULT QueryInterface(REFIID, void **)
Definition: events.c:2587
D3D_SHADER_VARIABLE_TYPE * LPD3D10_SHADER_VARIABLE_TYPE
Definition: d3d10shader.h:66
D3D10_RESOURCE_RETURN_TYPE ReturnType
Definition: d3d10shader.h:80
D3D_FL9_3_MAX_TEXTURE_REPEAT enum _D3D_SHADER_VARIABLE_CLASS D3D_SHADER_VARIABLE_CLASS
enum _D3D_SHADER_VARIABLE_TYPE D3D_SHADER_VARIABLE_TYPE
D3D10_CBUFFER_TYPE Type
Definition: d3d10shader.h:131
HRESULT WINAPI D3D10GetInputAndOutputSignatureBlob(const void *data, SIZE_T data_size, ID3D10Blob **blob)
const char *WINAPI D3D10GetGeometryShaderProfile(ID3D10Device *device)
const char *WINAPI D3D10GetVertexShaderProfile(ID3D10Device *device)
struct _D3D10_SHADER_TYPE_DESC D3D10_SHADER_TYPE_DESC
const char * filename
Definition: ioapi.h:135
D3D_INCLUDE_TYPE D3D10_INCLUDE_TYPE
Definition: d3d10shader.h:68
#define STDMETHOD(m)
Definition: basetyps.h:62
DECLARE_INTERFACE(ID3D10ShaderReflectionType)
Definition: d3d10shader.h:160
struct _D3D10_SHADER_DESC D3D10_SHADER_DESC
UINT TextureGradientInstructions
Definition: d3d10shader.h:114
D3D10_PRIMITIVE_TOPOLOGY GSOutputTopology
Definition: d3d10shader.h:124
D3D_CBUFFER_TYPE
Definition: d3dcommon.idl:491
unsigned int BOOL
Definition: ntddk_ex.h:94
Definition: devices.h:37
static const WCHAR desc[]
Definition: protectdata.c:36
D3D_RESOURCE_RETURN_TYPE D3D10_RESOURCE_RETURN_TYPE
Definition: d3d10shader.h:58
const char * Creator
Definition: d3d10shader.h:99
UINT TextureCompInstructions
Definition: d3d10shader.h:112
D3D_SHADER_INPUT_TYPE * LPD3D10_SHADER_INPUT_TYPE
Definition: d3d10shader.h:63
D3D_SHADER_VARIABLE_CLASS D3D10_SHADER_VARIABLE_CLASS
Definition: d3d10shader.h:50
D3D10_SRV_DIMENSION Dimension
Definition: d3d10shader.h:81
const char *WINAPI D3D10GetPixelShaderProfile(ID3D10Device *device)
D3D10_SHADER_INPUT_TYPE Type
Definition: d3d10shader.h:76
UINT TextureNormalInstructions
Definition: d3d10shader.h:110
D3D10_REGISTER_COMPONENT_TYPE ComponentType
Definition: d3d10shader.h:91
D3D_SRV_DIMENSION
Definition: d3dcommon.idl:505
GLuint shader
Definition: glext.h:6030
static SIZE_T const char const D3D_SHADER_MACRO ID3DInclude * include
Definition: asm.c:30
ID3DInclude ID3D10Include
Definition: d3d10shader.h:69
D3D_NAME
Definition: d3dcommon.idl:592
LONG HRESULT
Definition: typedefs.h:79
HRESULT WINAPI D3D10CompileShader(const char *data, SIZE_T data_size, const char *filename, const D3D10_SHADER_MACRO *defines, ID3D10Include *include, const char *entrypoint, const char *profile, UINT flags, ID3D10Blob **shader, ID3D10Blob **error_messages)
#define WINAPI
Definition: msvc.h:6
static FILE * out
Definition: regtests2xml.c:44
static SIZE_T const char const D3D_SHADER_MACRO ID3DInclude UINT ID3DBlob ID3DBlob ** error_messages
Definition: asm.c:30
D3D10_SHADER_VARIABLE_CLASS Class
Definition: d3d10shader.h:148
D3D_CBUFFER_TYPE * LPD3D10_CBUFFER_TYPE
Definition: d3d10shader.h:54
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLbitfield flags
Definition: glext.h:7161
ID3DInclude * LPD3D10INCLUDE
Definition: d3d10shader.h:70
INT GetType(BOOL bLocal, LPOSVERSIONINFOEX osvi, LPSERVER_INFO_102 pBuf102)
Definition: gettype.c:129
#define index(s, c)
Definition: various.h:29
enum _D3D_SHADER_INPUT_TYPE D3D_SHADER_INPUT_TYPE
D3D_SHADER_VARIABLE_TYPE D3D10_SHADER_VARIABLE_TYPE
Definition: d3d10shader.h:65
char comments[4096]
unsigned char BYTE
Definition: xxhash.c:193
HRESULT WINAPI D3D10GetInputSignatureBlob(const void *data, SIZE_T data_size, ID3D10Blob **blob)
HRESULT WINAPI D3D10DisassembleShader(const void *data, SIZE_T data_size, BOOL color_code, const char *comments, ID3D10Blob **disassembly)
struct _D3D10_SIGNATURE_PARAMETER_DESC D3D10_SIGNATURE_PARAMETER_DESC
ULONG_PTR SIZE_T
Definition: typedefs.h:80
UINT TextureBiasInstructions
Definition: d3d10shader.h:113
D3D_SHADER_MACRO * LPD3D10_SHADER_MACRO
Definition: d3d10shader.h:48
struct _D3D10_SHADER_BUFFER_DESC D3D10_SHADER_BUFFER_DESC
D3D_REGISTER_COMPONENT_TYPE D3D10_REGISTER_COMPONENT_TYPE
Definition: d3d10shader.h:56
D3D_SHADER_INPUT_TYPE D3D10_SHADER_INPUT_TYPE
Definition: d3d10shader.h:62
#define PURE
Definition: basetyps.h:64
HRESULT WINAPI D3D10ReflectShader(const void *data, SIZE_T data_size, ID3D10ShaderReflection **reflector)
unsigned int UINT
Definition: ndis.h:50
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:90
HRESULT WINAPI D3D10GetShaderDebugInfo(const void *data, SIZE_T data_size, ID3D10Blob **blob)
struct _D3D10_SHADER_INPUT_BIND_DESC D3D10_SHADER_INPUT_BIND_DESC
static SIZE_T const char const D3D_SHADER_MACRO * defines
Definition: asm.c:30
DECLARE_INTERFACE_(ID3D10ShaderReflection, IUnknown)
Definition: d3d10shader.h:193
unsigned int ULONG
Definition: retypes.h:1
DEFINE_GUID(IID_ID3D10ShaderReflectionType, 0xc530ad7d, 0x9b16, 0x4395, 0xa9, 0x79, 0xba, 0x2e, 0xcf, 0xf8, 0x3a, 0xdd)
#define profile
Definition: kernel32.h:12
D3D_PRIMITIVE_TOPOLOGY
Definition: d3dcommon.idl:353
HRESULT WINAPI D3D10GetOutputSignatureBlob(const void *data, SIZE_T data_size, ID3D10Blob **blob)
UINT DynamicFlowControlCount
Definition: d3d10shader.h:119
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
D3D_SHADER_VARIABLE_CLASS * LPD3D10_SHADER_VARIABLE_CLASS
Definition: d3d10shader.h:51
D3D_REGISTER_COMPONENT_TYPE
Definition: d3dcommon.idl:554
GLuint const GLchar * name
Definition: glext.h:6031