ReactOS 0.4.17-dev-966-gf06eace
d3d11shader.h
Go to the documentation of this file.
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#ifndef __D3D11SHADER_H__
20#define __D3D11SHADER_H__
21
22#include "d3dcommon.h"
23
24/* If not defined set d3dcompiler_47 by default. */
25#ifndef D3D_COMPILER_VERSION
26#define D3D_COMPILER_VERSION 47
27#endif
28
29#define D3D_SHADER_REQUIRES_DOUBLES 0x00000001
30#define D3D_SHADER_REQUIRES_EARLY_DEPTH_STENCIL 0x00000002
31#define D3D_SHADER_REQUIRES_UAVS_AT_EVERY_STAGE 0x00000004
32#define D3D_SHADER_REQUIRES_64_UAVS 0x00000008
33#define D3D_SHADER_REQUIRES_MINIMUM_PRECISION 0x00000010
34#define D3D_SHADER_REQUIRES_11_1_DOUBLE_EXTENSIONS 0x00000020
35#define D3D_SHADER_REQUIRES_11_1_SHADER_EXTENSIONS 0x00000040
36#define D3D_SHADER_REQUIRES_LEVEL_9_COMPARISON_FILTERING 0x00000080
37#define D3D_SHADER_REQUIRES_TILED_RESOURCES 0x00000100
38
39/* These are defined as version-neutral in d3dcommon.h */
41
43
45
47
49
50typedef struct _D3D11_SHADER_DESC
51{
53 const char *Creator;
91
93{
94 const char *Name;
104
106{
114 const char *Name;
116
118{
119 const char *Name;
125
127{
128 const char *Name;
137
139{
140 const char *SemanticName;
148#if D3D_COMPILER_VERSION >= 46
150#endif
152
153DEFINE_GUID(IID_ID3D11ShaderReflectionType, 0x6e6ffa6a, 0x9bae, 0x4613, 0xa5, 0x1e, 0x91, 0x65, 0x2d, 0x50, 0x8c, 0x21);
154
155#define INTERFACE ID3D11ShaderReflectionType
157{
159 STDMETHOD_(struct ID3D11ShaderReflectionType *, GetMemberTypeByIndex)(THIS_ UINT index) PURE;
160 STDMETHOD_(struct ID3D11ShaderReflectionType *, GetMemberTypeByName)(THIS_ const char *name) PURE;
161 STDMETHOD_(const char *, GetMemberTypeName)(THIS_ UINT index) PURE;
163 STDMETHOD_(struct ID3D11ShaderReflectionType *, GetSubType)(THIS) PURE;
164 STDMETHOD_(struct ID3D11ShaderReflectionType *, GetBaseClass)(THIS) PURE;
166 STDMETHOD_(struct ID3D11ShaderReflectionType *, GetInterfaceByIndex)(THIS_ UINT index) PURE;
168 STDMETHOD(ImplementsInterface)(THIS_ ID3D11ShaderReflectionType *base) PURE;
169};
170#undef INTERFACE
171
172DEFINE_GUID(IID_ID3D11ShaderReflectionVariable, 0x51f23923, 0xf3e5, 0x4bd1, 0x91, 0xcb, 0x60, 0x61, 0x77, 0xd8, 0xdb, 0x4c);
173
174#define INTERFACE ID3D11ShaderReflectionVariable
176{
180 STDMETHOD_(UINT, GetInterfaceSlot)(THIS_ UINT index) PURE;
181};
182#undef INTERFACE
183
184DEFINE_GUID(IID_ID3D11ShaderReflectionConstantBuffer, 0xeb62d63d, 0x93dd, 0x4318, 0x8a, 0xe8, 0xc6, 0xf8, 0x3a, 0xd3, 0x71, 0xb8);
185
186#define INTERFACE ID3D11ShaderReflectionConstantBuffer
188{
190 STDMETHOD_(struct ID3D11ShaderReflectionVariable *, GetVariableByIndex)(THIS_ UINT index) PURE;
191 STDMETHOD_(struct ID3D11ShaderReflectionVariable *, GetVariableByName)(THIS_ const char *name) PURE;
192};
193#undef INTERFACE
194
195#if D3D_COMPILER_VERSION <= 42
196DEFINE_GUID(IID_ID3D11ShaderReflection, 0x17f27486, 0xa342, 0x4d10, 0x88, 0x42, 0xab, 0x08, 0x74, 0xe7, 0xf6, 0x70);
197#elif D3D_COMPILER_VERSION == 43
198DEFINE_GUID(IID_ID3D11ShaderReflection, 0x0a233719, 0x3960, 0x4578, 0x9d, 0x7c, 0x20, 0x3b, 0x8b, 0x1d, 0x9c, 0xc1);
199#else
200DEFINE_GUID(IID_ID3D11ShaderReflection, 0x8d536ca1, 0x0cca, 0x4956, 0xa8, 0x37, 0x78, 0x69, 0x63, 0x75, 0x55, 0x84);
201#endif
202
203#define INTERFACE ID3D11ShaderReflection
205{
206 /* IUnknown methods */
210 /* ID3D11ShaderReflection methods */
212 STDMETHOD_(struct ID3D11ShaderReflectionConstantBuffer *, GetConstantBufferByIndex)(THIS_ UINT index) PURE;
213 STDMETHOD_(struct ID3D11ShaderReflectionConstantBuffer *, GetConstantBufferByName)(THIS_ const char *name) PURE;
217 STDMETHOD(GetPatchConstantParameterDesc)(THIS_ UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc) PURE;
218 STDMETHOD_(struct ID3D11ShaderReflectionVariable *, GetVariableByName)(THIS_ const char *name) PURE;
219 STDMETHOD(GetResourceBindingDescByName)(THIS_ const char *name, D3D11_SHADER_INPUT_BIND_DESC *desc) PURE;
220 STDMETHOD_(UINT, GetMovInstructionCount)(THIS) PURE;
221 STDMETHOD_(UINT, GetMovcInstructionCount)(THIS) PURE;
222 STDMETHOD_(UINT, GetConversionInstructionCount)(THIS) PURE;
223 STDMETHOD_(UINT, GetBitwiseInstructionCount)(THIS) PURE;
224 STDMETHOD_(D3D_PRIMITIVE, GetGSInputPrimitive)(THIS) PURE;
225 STDMETHOD_(BOOL, IsSampleFrequencyShader)(THIS) PURE;
226 STDMETHOD_(UINT, GetNumInterfaceSlots)(THIS) PURE;
227 STDMETHOD(GetMinFeatureLevel)(THIS_ enum D3D_FEATURE_LEVEL *level) PURE;
228 STDMETHOD_(UINT, GetThreadGroupSize)(THIS_ UINT *sizex, UINT *sizey, UINT *sizez) PURE;
229 STDMETHOD_(UINT64, GetRequiresFlags)(THIS) PURE;
230};
231#undef INTERFACE
232
233DEFINE_GUID(IID_ID3D11ModuleInstance, 0x469e07f7, 0x45a, 0x48d5, 0xaa, 0x12, 0x68, 0xa4, 0x78, 0xcd, 0xf7, 0x5d);
234
235#define INTERFACE ID3D11ModuleInstance
236DECLARE_INTERFACE_(ID3D11ModuleInstance, IUnknown)
237{
241
242 /* ID3D11ModuleInstance methods */
243 STDMETHOD(BindConstantBuffer)(THIS_ UINT srcslot, UINT dstslot, UINT dstoffset) PURE;
244 STDMETHOD(BindConstantBufferByName)(THIS_ const char *name, UINT dstslot, UINT dstoffset) PURE;
245
246 STDMETHOD(BindResource)(THIS_ UINT srcslot, UINT dstslot, UINT count) PURE;
247 STDMETHOD(BindResourceByName)(THIS_ const char *name, UINT dstslot, UINT count) PURE;
248
249 STDMETHOD(BindSampler)(THIS_ UINT srcslot, UINT dstslot, UINT count) PURE;
250 STDMETHOD(BindSamplerByName)(THIS_ const char *name, UINT dstslot, UINT count) PURE;
251
252 STDMETHOD(BindUnorderedAccessView)(THIS_ UINT srcslot, UINT dstslot, UINT count) PURE;
253 STDMETHOD(BindUnorderedAccessViewByName)(THIS_ const char *name, UINT dstslot, UINT count) PURE;
254
255 STDMETHOD(BindResourceAsUnorderedAccessView)(THIS_ UINT srcslot, UINT dstslot, UINT count) PURE;
256 STDMETHOD(BindResourceAsUnorderedAccessViewByName)(THIS_ const char *name, UINT dstslot, UINT count) PURE;
257};
258#undef INTERFACE
259
260DEFINE_GUID(IID_ID3D11Module, 0xcac701ee, 0x80fc, 0x4122, 0x82, 0x42, 0x10, 0xb3, 0x9c, 0x8c, 0xec, 0x34);
261
262#define INTERFACE ID3D11Module
264{
268
269 /* ID3D11Module methods */
270 STDMETHOD(CreateInstance)(THIS_ const char *instnamespace, ID3D11ModuleInstance **moduleinstance) PURE;
271};
272#undef INTERFACE
273
274DEFINE_GUID(IID_ID3D11Linker, 0x59a6cd0e, 0xe10d, 0x4c1f, 0x88, 0xc0, 0x63, 0xab, 0xa1, 0xda, 0xf3, 0x0e);
275
276#define INTERFACE ID3D11Linker
278{
282
283 /* ID3D11Linker methods */
284 STDMETHOD(Link)(THIS_ ID3D11ModuleInstance *instance, LPCSTR instname, LPCSTR targetname, UINT flags, ID3DBlob **shader, ID3DBlob **error) PURE;
285 STDMETHOD(UseLibrary)(THIS_ ID3D11ModuleInstance *libinstance) PURE;
286 STDMETHOD(AddClipPlaneFromCBuffer)(THIS_ UINT bufferslot, UINT bufferentry) PURE;
287};
288#undef INTERFACE
289
290#endif
COMPILER_DEPENDENT_UINT64 UINT64
Definition: actypes.h:131
#define index(s, c)
Definition: various.h:29
#define DECLARE_INTERFACE_(i, b)
Definition: basetyps.h:78
#define PURE
Definition: basetyps.h:64
#define THIS_
Definition: basetyps.h:65
#define THIS
Definition: basetyps.h:66
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
#define STDMETHOD(m)
Definition: basetyps.h:62
#define DECLARE_INTERFACE(i)
Definition: basetyps.h:73
_In_ BOOLEAN Release
Definition: cdrom.h:920
D3D_TESSELLATOR_OUTPUT_PRIMITIVE D3D11_TESSELLATOR_OUTPUT_PRIMITIVE
Definition: d3d11shader.h:48
struct _D3D11_SHADER_TYPE_DESC D3D11_SHADER_TYPE_DESC
D3D_CBUFFER_TYPE D3D11_CBUFFER_TYPE
Definition: d3d11shader.h:40
D3D_RESOURCE_RETURN_TYPE D3D11_RESOURCE_RETURN_TYPE
Definition: d3d11shader.h:42
struct _D3D11_SHADER_INPUT_BIND_DESC D3D11_SHADER_INPUT_BIND_DESC
struct _D3D11_SHADER_BUFFER_DESC D3D11_SHADER_BUFFER_DESC
D3D_TESSELLATOR_DOMAIN D3D11_TESSELLATOR_DOMAIN
Definition: d3d11shader.h:44
struct _D3D11_SHADER_DESC D3D11_SHADER_DESC
D3D_TESSELLATOR_PARTITIONING D3D11_TESSELLATOR_PARTITIONING
Definition: d3d11shader.h:46
struct _D3D11_SHADER_VARIABLE_DESC D3D11_SHADER_VARIABLE_DESC
struct _D3D11_SIGNATURE_PARAMETER_DESC D3D11_SIGNATURE_PARAMETER_DESC
D3D_FEATURE_LEVEL
Definition: d3dcommon.idl:102
D3D_TESSELLATOR_OUTPUT_PRIMITIVE
Definition: d3dcommon.idl:508
enum _D3D_SHADER_VARIABLE_CLASS D3D_SHADER_VARIABLE_CLASS
enum _D3D_SHADER_INPUT_TYPE D3D_SHADER_INPUT_TYPE
D3D_TESSELLATOR_PARTITIONING
Definition: d3dcommon.idl:494
D3D_TESSELLATOR_DOMAIN
Definition: d3dcommon.idl:482
D3D_SRV_DIMENSION
Definition: d3dcommon.idl:548
D3D_NAME
Definition: d3dcommon.idl:635
D3D_RESOURCE_RETURN_TYPE
Definition: d3dcommon.idl:609
D3D_MIN_PRECISION
Definition: d3dcommon.idl:522
enum _D3D_SHADER_VARIABLE_TYPE D3D_SHADER_VARIABLE_TYPE
D3D_CBUFFER_TYPE
Definition: d3dcommon.idl:534
D3D_PRIMITIVE
Definition: d3dcommon.idl:298
D3D_REGISTER_COMPONENT_TYPE
Definition: d3dcommon.idl:597
D3D_PRIMITIVE_TOPOLOGY
Definition: d3dcommon.idl:384
_Check_return_ _In_ PQUERY_INTERFACE QueryInterface
Definition: dispmprt.h:1318
#define ID3D11ShaderReflectionType
Definition: reflection.c:30
#define ID3D11ShaderReflectionConstantBuffer
Definition: reflection.c:28
#define ID3D11ShaderReflection
Definition: reflection.c:26
#define ID3D11ShaderReflectionVariable
Definition: reflection.c:32
#define IID_ID3D11ShaderReflection
Definition: reflection.c:34
static HINSTANCE instance
Definition: main.c:35
@ IsEqual
Definition: fatprocs.h:1887
unsigned int BOOL
Definition: ntddk_ex.h:94
return pMemory GetBuffer()
return pUsbDevice GetNumInterfaces()
GLint level
Definition: gl.h:1546
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint shader
Definition: glext.h:6030
GLbitfield flags
Definition: glext.h:7161
unsigned int UINT
Definition: sysinfo.c:13
REFIID riid
Definition: atlbase.h:39
static CInternetFolder * CreateInstance(void)
Definition: inetfolder.c:330
#define error(str)
Definition: mkdosfs.c:1605
D3D11_SHADER_VARIABLE_DESC desc
Definition: reflection.c:1683
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:83
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: guiddef.h:68
#define REFIID
Definition: guiddef.h:118
D3D_CBUFFER_TYPE Type
Definition: d3d11shader.h:120
UINT TextureCompInstructions
Definition: d3d11shader.h:66
D3D_TESSELLATOR_PARTITIONING HSPartitioning
Definition: d3d11shader.h:85
UINT GSMaxOutputVertexCount
Definition: d3d11shader.h:79
UINT TextureGradientInstructions
Definition: d3d11shader.h:68
UINT PatchConstantParameters
Definition: d3d11shader.h:81
const char * Creator
Definition: d3d11shader.h:53
UINT TextureBiasInstructions
Definition: d3d11shader.h:67
UINT StaticFlowControlCount
Definition: d3d11shader.h:72
D3D_PRIMITIVE InputPrimitive
Definition: d3d11shader.h:80
D3D_PRIMITIVE_TOPOLOGY GSOutputTopology
Definition: d3d11shader.h:78
D3D_TESSELLATOR_DOMAIN TessellatorDomain
Definition: d3d11shader.h:86
UINT cInterlockedInstructions
Definition: d3d11shader.h:88
UINT TextureLoadInstructions
Definition: d3d11shader.h:65
UINT DynamicFlowControlCount
Definition: d3d11shader.h:73
D3D_TESSELLATOR_OUTPUT_PRIMITIVE HSOutputPrimitive
Definition: d3d11shader.h:84
UINT cTextureStoreInstructions
Definition: d3d11shader.h:89
UINT TextureNormalInstructions
Definition: d3d11shader.h:64
UINT MacroInstructionCount
Definition: d3d11shader.h:74
UINT FloatInstructionCount
Definition: d3d11shader.h:69
UINT ArrayInstructionCount
Definition: d3d11shader.h:75
D3D_SRV_DIMENSION Dimension
Definition: d3d11shader.h:134
D3D_SHADER_INPUT_TYPE Type
Definition: d3d11shader.h:129
D3D_RESOURCE_RETURN_TYPE ReturnType
Definition: d3d11shader.h:133
D3D_SHADER_VARIABLE_CLASS Class
Definition: d3d11shader.h:107
D3D_SHADER_VARIABLE_TYPE Type
Definition: d3d11shader.h:108
D3D_MIN_PRECISION MinPrecision
Definition: d3d11shader.h:149
D3D_REGISTER_COMPONENT_TYPE ComponentType
Definition: d3d11shader.h:144
Definition: name.c:39
const char * LPCSTR
Definition: typedefs.h:52
uint32_t ULONG
Definition: typedefs.h:59
static int Link(const char **args)
Definition: vfdcmd.c:2414
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
#define GetType(This)
Definition: conio.h:54
unsigned char BYTE
Definition: xxhash.c:193