kodi
d3dx11effect.h
1 //--------------------------------------------------------------------------------------
2 // File: D3DX11Effect.h
3 //
4 // Direct3D 11 Effect Types & APIs Header
5 //
6 // Copyright (c) Microsoft Corporation.
7 // Licensed under the MIT License.
8 //
9 // http://go.microsoft.com/fwlink/p/?LinkId=271568
10 //--------------------------------------------------------------------------------------
11 
12 #pragma once
13 
14 #define D3DX11_EFFECTS_VERSION 1128
15 
16 #if defined(_XBOX_ONE) && defined(_TITLE)
17 #include <d3d11_x.h>
18 #define NO_D3D11_DEBUG_NAME
19 #else
20 #include <d3d11_1.h>
21 #include <d3d11shader.h>
22 #endif
23 
24 #pragma comment( lib, "d3dcompiler.lib" )
25 #pragma comment( lib, "dxguid.lib" )
26 
27 #include <stdint.h>
28 
30 // File contents:
31 //
32 // 1) Stateblock enums, structs, interfaces, flat APIs
33 // 2) Effect enums, structs, interfaces, flat APIs
35 
36 #ifndef D3DX11_BYTES_FROM_BITS
37 #define D3DX11_BYTES_FROM_BITS(x) (((x) + 7) / 8)
38 #endif // D3DX11_BYTES_FROM_BITS
39 
40 #ifndef D3DERR_INVALIDCALL
41 #define D3DERR_INVALIDCALL MAKE_HRESULT( 1, 0x876, 2156 )
42 #endif
43 
45 {
46  uint8_t VS;
47  uint8_t VSSamplers[D3DX11_BYTES_FROM_BITS(D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT)];
48  uint8_t VSShaderResources[D3DX11_BYTES_FROM_BITS(D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT)];
49  uint8_t VSConstantBuffers[D3DX11_BYTES_FROM_BITS(D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT)];
50  uint8_t VSInterfaces[D3DX11_BYTES_FROM_BITS(D3D11_SHADER_MAX_INTERFACES)];
51 
52  uint8_t HS;
53  uint8_t HSSamplers[D3DX11_BYTES_FROM_BITS(D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT)];
54  uint8_t HSShaderResources[D3DX11_BYTES_FROM_BITS(D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT)];
55  uint8_t HSConstantBuffers[D3DX11_BYTES_FROM_BITS(D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT)];
56  uint8_t HSInterfaces[D3DX11_BYTES_FROM_BITS(D3D11_SHADER_MAX_INTERFACES)];
57 
58  uint8_t DS;
59  uint8_t DSSamplers[D3DX11_BYTES_FROM_BITS(D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT)];
60  uint8_t DSShaderResources[D3DX11_BYTES_FROM_BITS(D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT)];
61  uint8_t DSConstantBuffers[D3DX11_BYTES_FROM_BITS(D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT)];
62  uint8_t DSInterfaces[D3DX11_BYTES_FROM_BITS(D3D11_SHADER_MAX_INTERFACES)];
63 
64  uint8_t GS;
65  uint8_t GSSamplers[D3DX11_BYTES_FROM_BITS(D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT)];
66  uint8_t GSShaderResources[D3DX11_BYTES_FROM_BITS(D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT)];
67  uint8_t GSConstantBuffers[D3DX11_BYTES_FROM_BITS(D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT)];
68  uint8_t GSInterfaces[D3DX11_BYTES_FROM_BITS(D3D11_SHADER_MAX_INTERFACES)];
69 
70  uint8_t PS;
71  uint8_t PSSamplers[D3DX11_BYTES_FROM_BITS(D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT)];
72  uint8_t PSShaderResources[D3DX11_BYTES_FROM_BITS(D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT)];
73  uint8_t PSConstantBuffers[D3DX11_BYTES_FROM_BITS(D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT)];
74  uint8_t PSInterfaces[D3DX11_BYTES_FROM_BITS(D3D11_SHADER_MAX_INTERFACES)];
75  uint8_t PSUnorderedAccessViews;
76 
77  uint8_t CS;
78  uint8_t CSSamplers[D3DX11_BYTES_FROM_BITS(D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT)];
79  uint8_t CSShaderResources[D3DX11_BYTES_FROM_BITS(D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT)];
80  uint8_t CSConstantBuffers[D3DX11_BYTES_FROM_BITS(D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT)];
81  uint8_t CSInterfaces[D3DX11_BYTES_FROM_BITS(D3D11_SHADER_MAX_INTERFACES)];
82  uint8_t CSUnorderedAccessViews;
83 
84  uint8_t IAVertexBuffers[D3DX11_BYTES_FROM_BITS(D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT)];
85  uint8_t IAIndexBuffer;
86  uint8_t IAInputLayout;
87  uint8_t IAPrimitiveTopology;
88 
89  uint8_t OMRenderTargets;
90  uint8_t OMDepthStencilState;
91  uint8_t OMBlendState;
92 
93  uint8_t RSViewports;
94  uint8_t RSScissorRects;
95  uint8_t RSRasterizerState;
96 
97  uint8_t SOBuffers;
98 
99  uint8_t Predication;
100 };
101 
102 //----------------------------------------------------------------------------
103 // D3DX11_EFFECT flags:
104 // -------------------------------------
105 //
106 // These flags are passed in when creating an effect, and affect
107 // the runtime effect behavior:
108 //
109 // (Currently none)
110 //
111 //
112 // These flags are set by the effect runtime:
113 //
114 // D3DX11_EFFECT_OPTIMIZED
115 // This effect has been optimized. Reflection functions that rely on
116 // names/semantics/strings should fail. This is set when Optimize() is
117 // called, but CEffect::IsOptimized() should be used to test for this.
118 //
119 // D3DX11_EFFECT_CLONE
120 // This effect is a clone of another effect. Single CBs will never be
121 // updated when internal variable values are changed.
122 // This flag is not set when the D3DX11_EFFECT_CLONE_FORCE_NONSINGLE flag
123 // is used in cloning.
124 //
125 //----------------------------------------------------------------------------
126 
127 #define D3DX11_EFFECT_OPTIMIZED (1 << 21)
128 #define D3DX11_EFFECT_CLONE (1 << 22)
129 
130 // Mask of valid D3DCOMPILE_EFFECT flags for D3DX11CreateEffect*
131 #define D3DX11_EFFECT_RUNTIME_VALID_FLAGS (0)
132 
133 //----------------------------------------------------------------------------
134 // D3DX11_EFFECT_VARIABLE flags:
135 // ----------------------------
136 //
137 // These flags describe an effect variable (global or annotation),
138 // and are returned in D3DX11_EFFECT_VARIABLE_DESC::Flags.
139 //
140 // D3DX11_EFFECT_VARIABLE_ANNOTATION
141 // Indicates that this is an annotation on a technique, pass, or global
142 // variable. Otherwise, this is a global variable. Annotations cannot
143 // be shared.
144 //
145 // D3DX11_EFFECT_VARIABLE_EXPLICIT_BIND_POINT
146 // Indicates that the variable has been explicitly bound using the
147 // register keyword.
148 //----------------------------------------------------------------------------
149 
150 #define D3DX11_EFFECT_VARIABLE_ANNOTATION (1 << 1)
151 #define D3DX11_EFFECT_VARIABLE_EXPLICIT_BIND_POINT (1 << 2)
152 
153 //----------------------------------------------------------------------------
154 // D3DX11_EFFECT_CLONE flags:
155 // ----------------------------
156 //
157 // These flags modify the effect cloning process and are passed into Clone.
158 //
159 // D3DX11_EFFECT_CLONE_FORCE_NONSINGLE
160 // Ignore all "single" qualifiers on cbuffers. All cbuffers will have their
161 // own ID3D11Buffer's created in the cloned effect.
162 //----------------------------------------------------------------------------
163 
164 #define D3DX11_EFFECT_CLONE_FORCE_NONSINGLE (1 << 0)
165 
166 
168 // ID3DX11EffectType //////////////////////////////////////////////////////////
170 
171 //----------------------------------------------------------------------------
172 // D3DX11_EFFECT_TYPE_DESC:
173 //
174 // Retrieved by ID3DX11EffectType::GetDesc()
175 //----------------------------------------------------------------------------
176 
178 {
179  LPCSTR TypeName; // Name of the type
180  // (e.g. "float4" or "MyStruct")
181 
182  D3D_SHADER_VARIABLE_CLASS Class; // (e.g. scalar, vector, object, etc.)
183  D3D_SHADER_VARIABLE_TYPE Type; // (e.g. float, texture, vertexshader, etc.)
184 
185  uint32_t Elements; // Number of elements in this type
186  // (0 if not an array)
187  uint32_t Members; // Number of members
188  // (0 if not a structure)
189  uint32_t Rows; // Number of rows in this type
190  // (0 if not a numeric primitive)
191  uint32_t Columns; // Number of columns in this type
192  // (0 if not a numeric primitive)
193 
194  uint32_t PackedSize; // Number of bytes required to represent
195  // this data type, when tightly packed
196  uint32_t UnpackedSize; // Number of bytes occupied by this data
197  // type, when laid out in a constant buffer
198  uint32_t Stride; // Number of bytes to seek between elements,
199  // when laid out in a constant buffer
200 };
201 
202 typedef interface ID3DX11EffectType ID3DX11EffectType;
203 typedef interface ID3DX11EffectType *LPD3D11EFFECTTYPE;
204 
205 // {4250D721-D5E5-491F-B62B-587C43186285}
206 DEFINE_GUID(IID_ID3DX11EffectType,
207  0x4250d721, 0xd5e5, 0x491f, 0xb6, 0x2b, 0x58, 0x7c, 0x43, 0x18, 0x62, 0x85);
208 
209 #undef INTERFACE
210 #define INTERFACE ID3DX11EffectType
211 
212 DECLARE_INTERFACE_(ID3DX11EffectType, IUnknown)
213 {
214  // IUnknown
215 
216  // ID3DX11EffectType
217  STDMETHOD_(bool, IsValid)(THIS) PURE;
218  STDMETHOD(GetDesc)(THIS_ _Out_ D3DX11_EFFECT_TYPE_DESC *pDesc) PURE;
219  STDMETHOD_(ID3DX11EffectType*, GetMemberTypeByIndex)(THIS_ _In_ uint32_t Index) PURE;
220  STDMETHOD_(ID3DX11EffectType*, GetMemberTypeByName)(THIS_ _In_z_ LPCSTR Name) PURE;
221  STDMETHOD_(ID3DX11EffectType*, GetMemberTypeBySemantic)(THIS_ _In_z_ LPCSTR Semantic) PURE;
222  STDMETHOD_(LPCSTR, GetMemberName)(THIS_ _In_ uint32_t Index) PURE;
223  STDMETHOD_(LPCSTR, GetMemberSemantic)(THIS_ _In_ uint32_t Index) PURE;
224 };
225 
227 // ID3DX11EffectVariable //////////////////////////////////////////////////////
229 
230 //----------------------------------------------------------------------------
231 // D3DX11_EFFECT_VARIABLE_DESC:
232 //
233 // Retrieved by ID3DX11EffectVariable::GetDesc()
234 //----------------------------------------------------------------------------
235 
237 {
238  LPCSTR Name; // Name of this variable, annotation,
239  // or structure member
240  LPCSTR Semantic; // Semantic string of this variable
241  // or structure member (nullptr for
242  // annotations or if not present)
243 
244  uint32_t Flags; // D3DX11_EFFECT_VARIABLE_* flags
245  uint32_t Annotations; // Number of annotations on this variable
246  // (always 0 for annotations)
247 
248  uint32_t BufferOffset; // Offset into containing cbuffer or tbuffer
249  // (always 0 for annotations or variables
250  // not in constant buffers)
251 
252  uint32_t ExplicitBindPoint; // Used if the variable has been explicitly bound
253  // using the register keyword. Check Flags for
254  // D3DX11_EFFECT_VARIABLE_EXPLICIT_BIND_POINT;
255 };
256 
257 typedef interface ID3DX11EffectVariable ID3DX11EffectVariable;
258 typedef interface ID3DX11EffectVariable *LPD3D11EFFECTVARIABLE;
259 
260 // {036A777D-B56E-4B25-B313-CC3DDAB71873}
261 DEFINE_GUID(IID_ID3DX11EffectVariable,
262  0x036a777d, 0xb56e, 0x4b25, 0xb3, 0x13, 0xcc, 0x3d, 0xda, 0xb7, 0x18, 0x73);
263 
264 #undef INTERFACE
265 #define INTERFACE ID3DX11EffectVariable
266 
267 // Forward defines
268 typedef interface ID3DX11EffectScalarVariable ID3DX11EffectScalarVariable;
269 typedef interface ID3DX11EffectVectorVariable ID3DX11EffectVectorVariable;
270 typedef interface ID3DX11EffectMatrixVariable ID3DX11EffectMatrixVariable;
271 typedef interface ID3DX11EffectStringVariable ID3DX11EffectStringVariable;
272 typedef interface ID3DX11EffectClassInstanceVariable ID3DX11EffectClassInstanceVariable;
273 typedef interface ID3DX11EffectInterfaceVariable ID3DX11EffectInterfaceVariable;
274 typedef interface ID3DX11EffectShaderResourceVariable ID3DX11EffectShaderResourceVariable;
275 typedef interface ID3DX11EffectUnorderedAccessViewVariable ID3DX11EffectUnorderedAccessViewVariable;
276 typedef interface ID3DX11EffectRenderTargetViewVariable ID3DX11EffectRenderTargetViewVariable;
277 typedef interface ID3DX11EffectDepthStencilViewVariable ID3DX11EffectDepthStencilViewVariable;
278 typedef interface ID3DX11EffectConstantBuffer ID3DX11EffectConstantBuffer;
279 typedef interface ID3DX11EffectShaderVariable ID3DX11EffectShaderVariable;
280 typedef interface ID3DX11EffectBlendVariable ID3DX11EffectBlendVariable;
281 typedef interface ID3DX11EffectDepthStencilVariable ID3DX11EffectDepthStencilVariable;
282 typedef interface ID3DX11EffectRasterizerVariable ID3DX11EffectRasterizerVariable;
283 typedef interface ID3DX11EffectSamplerVariable ID3DX11EffectSamplerVariable;
284 
285 DECLARE_INTERFACE_(ID3DX11EffectVariable, IUnknown)
286 {
287  // IUnknown
288 
289  // ID3DX11EffectVariable
290  STDMETHOD_(bool, IsValid)(THIS) PURE;
291  STDMETHOD_(ID3DX11EffectType*, GetType)(THIS) PURE;
292  STDMETHOD(GetDesc)(THIS_ _Out_ D3DX11_EFFECT_VARIABLE_DESC *pDesc) PURE;
293 
294  STDMETHOD_(ID3DX11EffectVariable*, GetAnnotationByIndex)(THIS_ _In_ uint32_t Index) PURE;
295  STDMETHOD_(ID3DX11EffectVariable*, GetAnnotationByName)(THIS_ _In_z_ LPCSTR Name) PURE;
296 
297  STDMETHOD_(ID3DX11EffectVariable*, GetMemberByIndex)(THIS_ _In_ uint32_t Index) PURE;
298  STDMETHOD_(ID3DX11EffectVariable*, GetMemberByName)(THIS_ _In_z_ LPCSTR Name) PURE;
299  STDMETHOD_(ID3DX11EffectVariable*, GetMemberBySemantic)(THIS_ _In_z_ LPCSTR Semantic) PURE;
300 
301  STDMETHOD_(ID3DX11EffectVariable*, GetElement)(THIS_ _In_ uint32_t Index) PURE;
302 
303  STDMETHOD_(ID3DX11EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE;
304 
305  STDMETHOD_(ID3DX11EffectScalarVariable*, AsScalar)(THIS) PURE;
306  STDMETHOD_(ID3DX11EffectVectorVariable*, AsVector)(THIS) PURE;
307  STDMETHOD_(ID3DX11EffectMatrixVariable*, AsMatrix)(THIS) PURE;
308  STDMETHOD_(ID3DX11EffectStringVariable*, AsString)(THIS) PURE;
309  STDMETHOD_(ID3DX11EffectClassInstanceVariable*, AsClassInstance)(THIS) PURE;
310  STDMETHOD_(ID3DX11EffectInterfaceVariable*, AsInterface)(THIS) PURE;
311  STDMETHOD_(ID3DX11EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE;
312  STDMETHOD_(ID3DX11EffectUnorderedAccessViewVariable*, AsUnorderedAccessView)(THIS) PURE;
313  STDMETHOD_(ID3DX11EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE;
314  STDMETHOD_(ID3DX11EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE;
315  STDMETHOD_(ID3DX11EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE;
316  STDMETHOD_(ID3DX11EffectShaderVariable*, AsShader)(THIS) PURE;
317  STDMETHOD_(ID3DX11EffectBlendVariable*, AsBlend)(THIS) PURE;
318  STDMETHOD_(ID3DX11EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE;
319  STDMETHOD_(ID3DX11EffectRasterizerVariable*, AsRasterizer)(THIS) PURE;
320  STDMETHOD_(ID3DX11EffectSamplerVariable*, AsSampler)(THIS) PURE;
321 
322  STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) const void *pData, _In_ uint32_t ByteOffset, _In_ uint32_t ByteCount) PURE;
323  STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, _In_ uint32_t ByteOffset, _In_ uint32_t ByteCount) PURE;
324 };
325 
327 // ID3DX11EffectScalarVariable ////////////////////////////////////////////////
329 
330 typedef interface ID3DX11EffectScalarVariable ID3DX11EffectScalarVariable;
331 typedef interface ID3DX11EffectScalarVariable *LPD3D11EFFECTSCALARVARIABLE;
332 
333 // {921EF2E5-A65D-4E92-9FC6-4E9CC09A4ADE}
334 DEFINE_GUID(IID_ID3DX11EffectScalarVariable,
335  0x921ef2e5, 0xa65d, 0x4e92, 0x9f, 0xc6, 0x4e, 0x9c, 0xc0, 0x9a, 0x4a, 0xde);
336 
337 #undef INTERFACE
338 #define INTERFACE ID3DX11EffectScalarVariable
339 
340 DECLARE_INTERFACE_(ID3DX11EffectScalarVariable, ID3DX11EffectVariable)
341 {
342  // IUnknown
343  // ID3DX11EffectVariable
344 
345  // ID3DX11EffectScalarVariable
346  STDMETHOD(SetFloat)(THIS_ _In_ const float Value) PURE;
347  STDMETHOD(GetFloat)(THIS_ _Out_ float *pValue) PURE;
348 
349  STDMETHOD(SetFloatArray)(THIS_ _In_reads_(Count) const float *pData, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
350  STDMETHOD(GetFloatArray)(THIS_ _Out_writes_(Count) float *pData, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
351 
352  STDMETHOD(SetInt)(THIS_ _In_ const int Value) PURE;
353  STDMETHOD(GetInt)(THIS_ _Out_ int *pValue) PURE;
354 
355  STDMETHOD(SetIntArray)(THIS_ _In_reads_(Count) const int *pData, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
356  STDMETHOD(GetIntArray)(THIS_ _Out_writes_(Count) int *pData, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
357 
358  STDMETHOD(SetBool)(THIS_ _In_ const bool Value) PURE;
359  STDMETHOD(GetBool)(THIS_ _Out_ bool *pValue) PURE;
360 
361  STDMETHOD(SetBoolArray)(THIS_ _In_reads_(Count) const bool *pData, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
362  STDMETHOD(GetBoolArray)(THIS_ _Out_writes_(Count) bool *pData, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
363 };
364 
366 // ID3DX11EffectVectorVariable ////////////////////////////////////////////////
368 
369 typedef interface ID3DX11EffectVectorVariable ID3DX11EffectVectorVariable;
370 typedef interface ID3DX11EffectVectorVariable *LPD3D11EFFECTVECTORVARIABLE;
371 
372 // {5E785D4A-D87B-48D8-B6E6-0F8CA7E7467A}
373 DEFINE_GUID(IID_ID3DX11EffectVectorVariable,
374  0x5e785d4a, 0xd87b, 0x48d8, 0xb6, 0xe6, 0x0f, 0x8c, 0xa7, 0xe7, 0x46, 0x7a);
375 
376 #undef INTERFACE
377 #define INTERFACE ID3DX11EffectVectorVariable
378 
379 DECLARE_INTERFACE_(ID3DX11EffectVectorVariable, ID3DX11EffectVariable)
380 {
381  // IUnknown
382  // ID3DX11EffectVariable
383 
384  // ID3DX11EffectVectorVariable
385  STDMETHOD(SetBoolVector) (THIS_ _In_reads_(4) const bool *pData) PURE;
386  STDMETHOD(SetIntVector) (THIS_ _In_reads_(4) const int *pData) PURE;
387  STDMETHOD(SetFloatVector)(THIS_ _In_reads_(4) const float *pData) PURE;
388 
389  STDMETHOD(GetBoolVector) (THIS_ _Out_writes_(4) bool *pData) PURE;
390  STDMETHOD(GetIntVector) (THIS_ _Out_writes_(4) int *pData) PURE;
391  STDMETHOD(GetFloatVector)(THIS_ _Out_writes_(4) float *pData) PURE;
392 
393  STDMETHOD(SetBoolVectorArray) (THIS_ _In_reads_(Count*4) const bool *pData, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
394  STDMETHOD(SetIntVectorArray) (THIS_ _In_reads_(Count*4) const int *pData, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
395  STDMETHOD(SetFloatVectorArray)(THIS_ _In_reads_(Count*4) const float *pData, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
396 
397  STDMETHOD(GetBoolVectorArray) (THIS_ _Out_writes_(Count*4) bool *pData, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
398  STDMETHOD(GetIntVectorArray) (THIS_ _Out_writes_(Count*4) int *pData, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
399  STDMETHOD(GetFloatVectorArray)(THIS_ _Out_writes_(Count*4) float *pData, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
400 };
401 
403 // ID3DX11EffectMatrixVariable ////////////////////////////////////////////////
405 
406 typedef interface ID3DX11EffectMatrixVariable ID3DX11EffectMatrixVariable;
407 typedef interface ID3DX11EffectMatrixVariable *LPD3D11EFFECTMATRIXVARIABLE;
408 
409 // {E1096CF4-C027-419A-8D86-D29173DC803E}
410 DEFINE_GUID(IID_ID3DX11EffectMatrixVariable,
411  0xe1096cf4, 0xc027, 0x419a, 0x8d, 0x86, 0xd2, 0x91, 0x73, 0xdc, 0x80, 0x3e);
412 
413 #undef INTERFACE
414 #define INTERFACE ID3DX11EffectMatrixVariable
415 
416 DECLARE_INTERFACE_(ID3DX11EffectMatrixVariable, ID3DX11EffectVariable)
417 {
418  // IUnknown
419  // ID3DX11EffectVariable
420 
421  // ID3DX11EffectMatrixVariable
422  STDMETHOD(SetMatrix)(THIS_ _In_reads_(16) const float *pData) PURE;
423  STDMETHOD(GetMatrix)(THIS_ _Out_writes_(16) float *pData) PURE;
424 
425  STDMETHOD(SetMatrixArray)(THIS_ _In_reads_(Count*16) const float *pData, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
426  STDMETHOD(GetMatrixArray)(THIS_ _Out_writes_(Count*16) float *pData, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
427 
428  STDMETHOD(SetMatrixPointerArray)(_In_reads_(Count*16) const float **ppData, uint32_t Offset, uint32_t Count) PURE;
429  STDMETHOD(GetMatrixPointerArray)(_Out_writes_(Count*16) float **ppData, uint32_t Offset, uint32_t Count) PURE;
430 
431  STDMETHOD(SetMatrixTranspose)(THIS_ _In_reads_(16) const float *pData) PURE;
432  STDMETHOD(GetMatrixTranspose)(THIS_ _Out_writes_(16) float *pData) PURE;
433 
434  STDMETHOD(SetMatrixTransposeArray)(THIS_ _In_reads_(Count*16) const float *pData, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
435  STDMETHOD(GetMatrixTransposeArray)(THIS_ _Out_writes_(Count*16) float *pData, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
436 
437  STDMETHOD(SetMatrixTransposePointerArray)(_In_reads_(Count*16) const float **ppData, uint32_t Offset, uint32_t Count) PURE;
438  STDMETHOD(GetMatrixTransposePointerArray)(_Out_writes_(Count*16) float **ppData, uint32_t Offset, uint32_t Count) PURE;
439 };
440 
442 // ID3DX11EffectStringVariable ////////////////////////////////////////////////
444 
445 typedef interface ID3DX11EffectStringVariable ID3DX11EffectStringVariable;
446 typedef interface ID3DX11EffectStringVariable *LPD3D11EFFECTSTRINGVARIABLE;
447 
448 // {F355C818-01BE-4653-A7CC-60FFFEDDC76D}
449 DEFINE_GUID(IID_ID3DX11EffectStringVariable,
450  0xf355c818, 0x01be, 0x4653, 0xa7, 0xcc, 0x60, 0xff, 0xfe, 0xdd, 0xc7, 0x6d);
451 
452 #undef INTERFACE
453 #define INTERFACE ID3DX11EffectStringVariable
454 
455 DECLARE_INTERFACE_(ID3DX11EffectStringVariable, ID3DX11EffectVariable)
456 {
457  // IUnknown
458  // ID3DX11EffectVariable
459 
460  // ID3DX11EffectStringVariable
461  STDMETHOD(GetString)(THIS_ _Outptr_result_z_ LPCSTR *ppString) PURE;
462  STDMETHOD(GetStringArray)(THIS_ _Out_writes_(Count) LPCSTR *ppStrings, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
463 };
464 
466 // ID3DX11EffectClassInstanceVariable ////////////////////////////////////////
468 
469 typedef interface ID3DX11EffectClassInstanceVariable ID3DX11EffectClassInstanceVariable;
470 typedef interface ID3DX11EffectClassInstanceVariable *LPD3D11EFFECTCLASSINSTANCEVARIABLE;
471 
472 // {926A8053-2A39-4DB4-9BDE-CF649ADEBDC1}
473 DEFINE_GUID(IID_ID3DX11EffectClassInstanceVariable,
474  0x926a8053, 0x2a39, 0x4db4, 0x9b, 0xde, 0xcf, 0x64, 0x9a, 0xde, 0xbd, 0xc1);
475 
476 #undef INTERFACE
477 #define INTERFACE ID3DX11EffectClassInstanceVariable
478 
479 DECLARE_INTERFACE_(ID3DX11EffectClassInstanceVariable, ID3DX11EffectVariable)
480 {
481  // IUnknown
482  // ID3DX11EffectVariable
483 
484  // ID3DX11EffectClassInstanceVariable
485  STDMETHOD(GetClassInstance)(_Outptr_ ID3D11ClassInstance** ppClassInstance) PURE;
486 };
487 
489 // ID3DX11EffectInterfaceVariable ////////////////////////////////////////
491 
492 typedef interface ID3DX11EffectInterfaceVariable ID3DX11EffectInterfaceVariable;
493 typedef interface ID3DX11EffectInterfaceVariable *LPD3D11EFFECTINTERFACEVARIABLE;
494 
495 // {516C8CD8-1C80-40A4-B19B-0688792F11A5}
496 DEFINE_GUID(IID_ID3DX11EffectInterfaceVariable,
497  0x516c8cd8, 0x1c80, 0x40a4, 0xb1, 0x9b, 0x06, 0x88, 0x79, 0x2f, 0x11, 0xa5);
498 
499 #undef INTERFACE
500 #define INTERFACE ID3DX11EffectInterfaceVariable
501 
502 DECLARE_INTERFACE_(ID3DX11EffectInterfaceVariable, ID3DX11EffectVariable)
503 {
504  // IUnknown
505  // ID3DX11EffectVariable
506 
507  // ID3DX11EffectInterfaceVariable
508  STDMETHOD(SetClassInstance)(_In_ ID3DX11EffectClassInstanceVariable *pEffectClassInstance) PURE;
509  STDMETHOD(GetClassInstance)(_Outptr_ ID3DX11EffectClassInstanceVariable **ppEffectClassInstance) PURE;
510 };
511 
513 // ID3DX11EffectShaderResourceVariable ////////////////////////////////////////
515 
516 typedef interface ID3DX11EffectShaderResourceVariable ID3DX11EffectShaderResourceVariable;
517 typedef interface ID3DX11EffectShaderResourceVariable *LPD3D11EFFECTSHADERRESOURCEVARIABLE;
518 
519 // {350DB233-BBE0-485C-9BFE-C0026B844F89}
520 DEFINE_GUID(IID_ID3DX11EffectShaderResourceVariable,
521  0x350db233, 0xbbe0, 0x485c, 0x9b, 0xfe, 0xc0, 0x02, 0x6b, 0x84, 0x4f, 0x89);
522 
523 #undef INTERFACE
524 #define INTERFACE ID3DX11EffectShaderResourceVariable
525 
526 DECLARE_INTERFACE_(ID3DX11EffectShaderResourceVariable, ID3DX11EffectVariable)
527 {
528  // IUnknown
529  // ID3DX11EffectVariable
530 
531  // ID3DX11EffectShaderResourceVariable
532  STDMETHOD(SetResource)(THIS_ _In_ ID3D11ShaderResourceView *pResource) PURE;
533  STDMETHOD(GetResource)(THIS_ _Outptr_ ID3D11ShaderResourceView **ppResource) PURE;
534 
535  STDMETHOD(SetResourceArray)(THIS_ _In_reads_(Count) ID3D11ShaderResourceView **ppResources, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
536  STDMETHOD(GetResourceArray)(THIS_ _Out_writes_(Count) ID3D11ShaderResourceView **ppResources, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
537 };
538 
540 // ID3DX11EffectUnorderedAccessViewVariable ////////////////////////////////////////
542 
543 typedef interface ID3DX11EffectUnorderedAccessViewVariable ID3DX11EffectUnorderedAccessViewVariable;
544 typedef interface ID3DX11EffectUnorderedAccessViewVariable *LPD3D11EFFECTUNORDEREDACCESSVIEWVARIABLE;
545 
546 // {79B4AC8C-870A-47D2-B05A-8BD5CC3EE6C9}
547 DEFINE_GUID(IID_ID3DX11EffectUnorderedAccessViewVariable,
548  0x79b4ac8c, 0x870a, 0x47d2, 0xb0, 0x5a, 0x8b, 0xd5, 0xcc, 0x3e, 0xe6, 0xc9);
549 
550 #undef INTERFACE
551 #define INTERFACE ID3DX11EffectUnorderedAccessViewVariable
552 
553 DECLARE_INTERFACE_(ID3DX11EffectUnorderedAccessViewVariable, ID3DX11EffectVariable)
554 {
555  // IUnknown
556  // ID3DX11EffectVariable
557 
558  // ID3DX11EffectUnorderedAccessViewVariable
559  STDMETHOD(SetUnorderedAccessView)(THIS_ _In_ ID3D11UnorderedAccessView *pResource) PURE;
560  STDMETHOD(GetUnorderedAccessView)(THIS_ _Outptr_ ID3D11UnorderedAccessView **ppResource) PURE;
561 
562  STDMETHOD(SetUnorderedAccessViewArray)(THIS_ _In_reads_(Count) ID3D11UnorderedAccessView **ppResources, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
563  STDMETHOD(GetUnorderedAccessViewArray)(THIS_ _Out_writes_(Count) ID3D11UnorderedAccessView **ppResources, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
564 };
565 
567 // ID3DX11EffectRenderTargetViewVariable //////////////////////////////////////
569 
570 typedef interface ID3DX11EffectRenderTargetViewVariable ID3DX11EffectRenderTargetViewVariable;
571 typedef interface ID3DX11EffectRenderTargetViewVariable *LPD3D11EFFECTRENDERTARGETVIEWVARIABLE;
572 
573 // {D5066909-F40C-43F8-9DB5-057C2A208552}
574 DEFINE_GUID(IID_ID3DX11EffectRenderTargetViewVariable,
575  0xd5066909, 0xf40c, 0x43f8, 0x9d, 0xb5, 0x05, 0x7c, 0x2a, 0x20, 0x85, 0x52);
576 
577 #undef INTERFACE
578 #define INTERFACE ID3DX11EffectRenderTargetViewVariable
579 
580 DECLARE_INTERFACE_(ID3DX11EffectRenderTargetViewVariable, ID3DX11EffectVariable)
581 {
582  // IUnknown
583  // ID3DX11EffectVariable
584 
585  // ID3DX11EffectRenderTargetViewVariable
586  STDMETHOD(SetRenderTarget)(THIS_ _In_ ID3D11RenderTargetView *pResource) PURE;
587  STDMETHOD(GetRenderTarget)(THIS_ _Outptr_ ID3D11RenderTargetView **ppResource) PURE;
588 
589  STDMETHOD(SetRenderTargetArray)(THIS_ _In_reads_(Count) ID3D11RenderTargetView **ppResources, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
590  STDMETHOD(GetRenderTargetArray)(THIS_ _Out_writes_(Count) ID3D11RenderTargetView **ppResources, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
591 };
592 
594 // ID3DX11EffectDepthStencilViewVariable //////////////////////////////////////
596 
597 typedef interface ID3DX11EffectDepthStencilViewVariable ID3DX11EffectDepthStencilViewVariable;
598 typedef interface ID3DX11EffectDepthStencilViewVariable *LPD3D11EFFECTDEPTHSTENCILVIEWVARIABLE;
599 
600 // {33C648AC-2E9E-4A2E-9CD6-DE31ACC5B347}
601 DEFINE_GUID(IID_ID3DX11EffectDepthStencilViewVariable,
602  0x33c648ac, 0x2e9e, 0x4a2e, 0x9c, 0xd6, 0xde, 0x31, 0xac, 0xc5, 0xb3, 0x47);
603 
604 #undef INTERFACE
605 #define INTERFACE ID3DX11EffectDepthStencilViewVariable
606 
607 DECLARE_INTERFACE_(ID3DX11EffectDepthStencilViewVariable, ID3DX11EffectVariable)
608 {
609  // IUnknown
610  // ID3DX11EffectVariable
611 
612  // ID3DX11EffectDepthStencilViewVariable
613  STDMETHOD(SetDepthStencil)(THIS_ _In_ ID3D11DepthStencilView *pResource) PURE;
614  STDMETHOD(GetDepthStencil)(THIS_ _Outptr_ ID3D11DepthStencilView **ppResource) PURE;
615 
616  STDMETHOD(SetDepthStencilArray)(THIS_ _In_reads_(Count) ID3D11DepthStencilView **ppResources, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
617  STDMETHOD(GetDepthStencilArray)(THIS_ _Out_writes_(Count) ID3D11DepthStencilView **ppResources, _In_ uint32_t Offset, _In_ uint32_t Count) PURE;
618 };
619 
621 // ID3DX11EffectConstantBuffer ////////////////////////////////////////////////
623 
624 typedef interface ID3DX11EffectConstantBuffer ID3DX11EffectConstantBuffer;
625 typedef interface ID3DX11EffectConstantBuffer *LPD3D11EFFECTCONSTANTBUFFER;
626 
627 // {2CB6C733-82D2-4000-B3DA-6219D9A99BF2}
628 DEFINE_GUID(IID_ID3DX11EffectConstantBuffer,
629  0x2cb6c733, 0x82d2, 0x4000, 0xb3, 0xda, 0x62, 0x19, 0xd9, 0xa9, 0x9b, 0xf2);
630 
631 #undef INTERFACE
632 #define INTERFACE ID3DX11EffectConstantBuffer
633 
634 DECLARE_INTERFACE_(ID3DX11EffectConstantBuffer, ID3DX11EffectVariable)
635 {
636  // IUnknown
637  // ID3DX11EffectVariable
638 
639  // ID3DX11EffectConstantBuffer
640  STDMETHOD(SetConstantBuffer)(THIS_ _In_ ID3D11Buffer *pConstantBuffer) PURE;
641  STDMETHOD(UndoSetConstantBuffer)(THIS) PURE;
642  STDMETHOD(GetConstantBuffer)(THIS_ _Outptr_ ID3D11Buffer **ppConstantBuffer) PURE;
643 
644  STDMETHOD(SetTextureBuffer)(THIS_ _In_ ID3D11ShaderResourceView *pTextureBuffer) PURE;
645  STDMETHOD(UndoSetTextureBuffer)(THIS) PURE;
646  STDMETHOD(GetTextureBuffer)(THIS_ _Outptr_ ID3D11ShaderResourceView **ppTextureBuffer) PURE;
647 };
648 
650 // ID3DX11EffectShaderVariable ////////////////////////////////////////////////
652 
653 //----------------------------------------------------------------------------
654 // D3DX11_EFFECT_SHADER_DESC:
655 //
656 // Retrieved by ID3DX11EffectShaderVariable::GetShaderDesc()
657 //----------------------------------------------------------------------------
658 
660 {
661  const uint8_t *pInputSignature; // Passed into CreateInputLayout,
662  // valid on VS and GS only
663 
664  bool IsInline; // Is this an anonymous shader variable
665  // resulting from an inline shader assignment?
666 
667 
668  // -- The following fields are not valid after Optimize() --
669  const uint8_t *pBytecode; // Shader bytecode
670  uint32_t BytecodeLength;
671 
672  LPCSTR SODecls[D3D11_SO_STREAM_COUNT]; // Stream out declaration string (for GS with SO)
673  uint32_t RasterizedStream;
674 
675  uint32_t NumInputSignatureEntries; // Number of entries in the input signature
676  uint32_t NumOutputSignatureEntries; // Number of entries in the output signature
677  uint32_t NumPatchConstantSignatureEntries; // Number of entries in the patch constant signature
678 };
679 
680 
681 typedef interface ID3DX11EffectShaderVariable ID3DX11EffectShaderVariable;
682 typedef interface ID3DX11EffectShaderVariable *LPD3D11EFFECTSHADERVARIABLE;
683 
684 // {7508B344-020A-4EC7-9118-62CDD36C88D7}
685 DEFINE_GUID(IID_ID3DX11EffectShaderVariable,
686  0x7508b344, 0x020a, 0x4ec7, 0x91, 0x18, 0x62, 0xcd, 0xd3, 0x6c, 0x88, 0xd7);
687 
688 #undef INTERFACE
689 #define INTERFACE ID3DX11EffectShaderVariable
690 
691 DECLARE_INTERFACE_(ID3DX11EffectShaderVariable, ID3DX11EffectVariable)
692 {
693  // IUnknown
694  // ID3DX11EffectVariable
695 
696  // ID3DX11EffectShaderVariable
697  STDMETHOD(GetShaderDesc)(THIS_ _In_ uint32_t ShaderIndex, _Out_ D3DX11_EFFECT_SHADER_DESC *pDesc) PURE;
698 
699  STDMETHOD(GetVertexShader)(THIS_ _In_ uint32_t ShaderIndex, _Outptr_ ID3D11VertexShader **ppVS) PURE;
700  STDMETHOD(GetGeometryShader)(THIS_ _In_ uint32_t ShaderIndex, _Outptr_ ID3D11GeometryShader **ppGS) PURE;
701  STDMETHOD(GetPixelShader)(THIS_ _In_ uint32_t ShaderIndex, _Outptr_ ID3D11PixelShader **ppPS) PURE;
702  STDMETHOD(GetHullShader)(THIS_ _In_ uint32_t ShaderIndex, _Outptr_ ID3D11HullShader **ppHS) PURE;
703  STDMETHOD(GetDomainShader)(THIS_ _In_ uint32_t ShaderIndex, _Outptr_ ID3D11DomainShader **ppDS) PURE;
704  STDMETHOD(GetComputeShader)(THIS_ _In_ uint32_t ShaderIndex, _Outptr_ ID3D11ComputeShader **ppCS) PURE;
705 
706  STDMETHOD(GetInputSignatureElementDesc)(THIS_ _In_ uint32_t ShaderIndex, _In_ uint32_t Element, _Out_ D3D11_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
707  STDMETHOD(GetOutputSignatureElementDesc)(THIS_ _In_ uint32_t ShaderIndex, _In_ uint32_t Element, _Out_ D3D11_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
708  STDMETHOD(GetPatchConstantSignatureElementDesc)(THIS_ _In_ uint32_t ShaderIndex, _In_ uint32_t Element, _Out_ D3D11_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
709 };
710 
712 // ID3DX11EffectBlendVariable /////////////////////////////////////////////////
714 
715 typedef interface ID3DX11EffectBlendVariable ID3DX11EffectBlendVariable;
716 typedef interface ID3DX11EffectBlendVariable *LPD3D11EFFECTBLENDVARIABLE;
717 
718 // {D664F4D7-3B81-4805-B277-C1DF58C39F53}
719 DEFINE_GUID(IID_ID3DX11EffectBlendVariable,
720  0xd664f4d7, 0x3b81, 0x4805, 0xb2, 0x77, 0xc1, 0xdf, 0x58, 0xc3, 0x9f, 0x53);
721 
722 #undef INTERFACE
723 #define INTERFACE ID3DX11EffectBlendVariable
724 
725 DECLARE_INTERFACE_(ID3DX11EffectBlendVariable, ID3DX11EffectVariable)
726 {
727  // IUnknown
728  // ID3DX11EffectVariable
729 
730  // ID3DX11EffectBlendVariable
731  STDMETHOD(GetBlendState)(THIS_ _In_ uint32_t Index, _Outptr_ ID3D11BlendState **ppState) PURE;
732  STDMETHOD(SetBlendState)(THIS_ _In_ uint32_t Index, _In_ ID3D11BlendState *pState) PURE;
733  STDMETHOD(UndoSetBlendState)(THIS_ _In_ uint32_t Index) PURE;
734  STDMETHOD(GetBackingStore)(THIS_ _In_ uint32_t Index, _Out_ D3D11_BLEND_DESC *pDesc) PURE;
735 };
736 
738 // ID3DX11EffectDepthStencilVariable //////////////////////////////////////////
740 
741 typedef interface ID3DX11EffectDepthStencilVariable ID3DX11EffectDepthStencilVariable;
742 typedef interface ID3DX11EffectDepthStencilVariable *LPD3D11EFFECTDEPTHSTENCILVARIABLE;
743 
744 // {69B5751B-61A5-48E5-BD41-D93988111563}
745 DEFINE_GUID(IID_ID3DX11EffectDepthStencilVariable,
746  0x69b5751b, 0x61a5, 0x48e5, 0xbd, 0x41, 0xd9, 0x39, 0x88, 0x11, 0x15, 0x63);
747 
748 #undef INTERFACE
749 #define INTERFACE ID3DX11EffectDepthStencilVariable
750 
751 DECLARE_INTERFACE_(ID3DX11EffectDepthStencilVariable, ID3DX11EffectVariable)
752 {
753  // IUnknown
754  // ID3DX11EffectVariable
755 
756  // ID3DX11EffectDepthStencilVariable
757  STDMETHOD(GetDepthStencilState)(THIS_ _In_ uint32_t Index, _Outptr_ ID3D11DepthStencilState **ppState) PURE;
758  STDMETHOD(SetDepthStencilState)(THIS_ _In_ uint32_t Index, _In_ ID3D11DepthStencilState *pState) PURE;
759  STDMETHOD(UndoSetDepthStencilState)(THIS_ _In_ uint32_t Index) PURE;
760  STDMETHOD(GetBackingStore)(THIS_ _In_ uint32_t Index, _Out_ D3D11_DEPTH_STENCIL_DESC *pDesc) PURE;
761 };
762 
764 // ID3DX11EffectRasterizerVariable ////////////////////////////////////////////
766 
767 typedef interface ID3DX11EffectRasterizerVariable ID3DX11EffectRasterizerVariable;
768 typedef interface ID3DX11EffectRasterizerVariable *LPD3D11EFFECTRASTERIZERVARIABLE;
769 
770 // {53A262F6-5F74-4151-A132-E3DD19A62C9D}
771 DEFINE_GUID(IID_ID3DX11EffectRasterizerVariable,
772  0x53a262f6, 0x5f74, 0x4151, 0xa1, 0x32, 0xe3, 0xdd, 0x19, 0xa6, 0x2c, 0x9d);
773 
774 #undef INTERFACE
775 #define INTERFACE ID3DX11EffectRasterizerVariable
776 
777 DECLARE_INTERFACE_(ID3DX11EffectRasterizerVariable, ID3DX11EffectVariable)
778 {
779  // IUnknown
780  // ID3DX11EffectVariable
781 
782  // ID3DX11EffectRasterizerVariable
783  STDMETHOD(GetRasterizerState)(THIS_ _In_ uint32_t Index, _Outptr_ ID3D11RasterizerState **ppState) PURE;
784  STDMETHOD(SetRasterizerState)(THIS_ _In_ uint32_t Index, _In_ ID3D11RasterizerState *pState) PURE;
785  STDMETHOD(UndoSetRasterizerState)(THIS_ _In_ uint32_t Index) PURE;
786  STDMETHOD(GetBackingStore)(THIS_ _In_ uint32_t Index, _Out_ D3D11_RASTERIZER_DESC *pDesc) PURE;
787 };
788 
790 // ID3DX11EffectSamplerVariable ///////////////////////////////////////////////
792 
793 typedef interface ID3DX11EffectSamplerVariable ID3DX11EffectSamplerVariable;
794 typedef interface ID3DX11EffectSamplerVariable *LPD3D11EFFECTSAMPLERVARIABLE;
795 
796 // {C6402E55-1095-4D95-8931-F92660513DD9}
797 DEFINE_GUID(IID_ID3DX11EffectSamplerVariable,
798  0xc6402e55, 0x1095, 0x4d95, 0x89, 0x31, 0xf9, 0x26, 0x60, 0x51, 0x3d, 0xd9);
799 
800 #undef INTERFACE
801 #define INTERFACE ID3DX11EffectSamplerVariable
802 
803 DECLARE_INTERFACE_(ID3DX11EffectSamplerVariable, ID3DX11EffectVariable)
804 {
805  // IUnknown
806  // ID3DX11EffectVariable
807 
808  // ID3DX11EffectSamplerVariable
809  STDMETHOD(GetSampler)(THIS_ _In_ uint32_t Index, _Outptr_ ID3D11SamplerState **ppSampler) PURE;
810  STDMETHOD(SetSampler)(THIS_ _In_ uint32_t Index, _In_ ID3D11SamplerState *pSampler) PURE;
811  STDMETHOD(UndoSetSampler)(THIS_ _In_ uint32_t Index) PURE;
812  STDMETHOD(GetBackingStore)(THIS_ _In_ uint32_t Index, _Out_ D3D11_SAMPLER_DESC *pDesc) PURE;
813 };
814 
816 // ID3DX11EffectPass //////////////////////////////////////////////////////////
818 
819 //----------------------------------------------------------------------------
820 // D3DX11_PASS_DESC:
821 //
822 // Retrieved by ID3DX11EffectPass::GetDesc()
823 //----------------------------------------------------------------------------
824 
826 {
827  LPCSTR Name; // Name of this pass (nullptr if not anonymous)
828  uint32_t Annotations; // Number of annotations on this pass
829 
830  uint8_t *pIAInputSignature; // Signature from VS or GS (if there is no VS)
831  // or nullptr if neither exists
832  size_t IAInputSignatureSize; // Singature size in bytes
833 
834  uint32_t StencilRef; // Specified in SetDepthStencilState()
835  uint32_t SampleMask; // Specified in SetBlendState()
836  FLOAT BlendFactor[4]; // Specified in SetBlendState()
837 };
838 
839 //----------------------------------------------------------------------------
840 // D3DX11_PASS_SHADER_DESC:
841 //
842 // Retrieved by ID3DX11EffectPass::Get**ShaderDesc()
843 //----------------------------------------------------------------------------
844 
846 {
847  ID3DX11EffectShaderVariable *pShaderVariable; // The variable that this shader came from.
848  // If this is an inline shader assignment,
849  // the returned interface will be an
850  // anonymous shader variable, which is
851  // not retrievable any other way. It's
852  // name in the variable description will
853  // be "$Anonymous".
854  // If there is no assignment of this type in
855  // the pass block, pShaderVariable != nullptr,
856  // but pShaderVariable->IsValid() == false.
857 
858  uint32_t ShaderIndex; // The element of pShaderVariable (if an array)
859  // or 0 if not applicable
860 };
861 
862 typedef interface ID3DX11EffectPass ID3DX11EffectPass;
863 typedef interface ID3DX11EffectPass *LPD3D11EFFECTPASS;
864 
865 // {3437CEC4-4AC1-4D87-8916-F4BD5A41380C}
866 DEFINE_GUID(IID_ID3DX11EffectPass,
867  0x3437cec4, 0x4ac1, 0x4d87, 0x89, 0x16, 0xf4, 0xbd, 0x5a, 0x41, 0x38, 0x0c);
868 
869 #undef INTERFACE
870 #define INTERFACE ID3DX11EffectPass
871 
872 DECLARE_INTERFACE_(ID3DX11EffectPass, IUnknown)
873 {
874  // IUnknown
875 
876  // ID3DX11EffectPass
877  STDMETHOD_(bool, IsValid)(THIS) PURE;
878  STDMETHOD(GetDesc)(THIS_ _Out_ D3DX11_PASS_DESC *pDesc) PURE;
879 
880  STDMETHOD(GetVertexShaderDesc)(THIS_ _Out_ D3DX11_PASS_SHADER_DESC *pDesc) PURE;
881  STDMETHOD(GetGeometryShaderDesc)(THIS_ _Out_ D3DX11_PASS_SHADER_DESC *pDesc) PURE;
882  STDMETHOD(GetPixelShaderDesc)(THIS_ _Out_ D3DX11_PASS_SHADER_DESC *pDesc) PURE;
883  STDMETHOD(GetHullShaderDesc)(THIS_ _Out_ D3DX11_PASS_SHADER_DESC *pDesc) PURE;
884  STDMETHOD(GetDomainShaderDesc)(THIS_ _Out_ D3DX11_PASS_SHADER_DESC *pDesc) PURE;
885  STDMETHOD(GetComputeShaderDesc)(THIS_ _Out_ D3DX11_PASS_SHADER_DESC *pDesc) PURE;
886 
887  STDMETHOD_(ID3DX11EffectVariable*, GetAnnotationByIndex)(THIS_ _In_ uint32_t Index) PURE;
888  STDMETHOD_(ID3DX11EffectVariable*, GetAnnotationByName)(THIS_ _In_z_ LPCSTR Name) PURE;
889 
890  STDMETHOD(Apply)(THIS_ _In_ uint32_t Flags, _In_ ID3D11DeviceContext* pContext) PURE;
891 
892  STDMETHOD(ComputeStateBlockMask)(THIS_ _Inout_ D3DX11_STATE_BLOCK_MASK *pStateBlockMask) PURE;
893 };
894 
896 // ID3DX11EffectTechnique /////////////////////////////////////////////////////
898 
899 //----------------------------------------------------------------------------
900 // D3DX11_TECHNIQUE_DESC:
901 //
902 // Retrieved by ID3DX11EffectTechnique::GetDesc()
903 //----------------------------------------------------------------------------
904 
906 {
907  LPCSTR Name; // Name of this technique (nullptr if not anonymous)
908  uint32_t Passes; // Number of passes contained within
909  uint32_t Annotations; // Number of annotations on this technique
910 };
911 
912 typedef interface ID3DX11EffectTechnique ID3DX11EffectTechnique;
913 typedef interface ID3DX11EffectTechnique *LPD3D11EFFECTTECHNIQUE;
914 
915 // {51198831-1F1D-4F47-BD76-41CB0835B1DE}
916 DEFINE_GUID(IID_ID3DX11EffectTechnique,
917  0x51198831, 0x1f1d, 0x4f47, 0xbd, 0x76, 0x41, 0xcb, 0x08, 0x35, 0xb1, 0xde);
918 
919 #undef INTERFACE
920 #define INTERFACE ID3DX11EffectTechnique
921 
922 DECLARE_INTERFACE_(ID3DX11EffectTechnique, IUnknown)
923 {
924  // IUnknown
925 
926  // ID3DX11EffectTechnique
927  STDMETHOD_(bool, IsValid)(THIS) PURE;
928  STDMETHOD(GetDesc)(THIS_ _Out_ D3DX11_TECHNIQUE_DESC *pDesc) PURE;
929 
930  STDMETHOD_(ID3DX11EffectVariable*, GetAnnotationByIndex)(THIS_ _In_ uint32_t Index) PURE;
931  STDMETHOD_(ID3DX11EffectVariable*, GetAnnotationByName)(THIS_ _In_z_ LPCSTR Name) PURE;
932 
933  STDMETHOD_(ID3DX11EffectPass*, GetPassByIndex)(THIS_ _In_ uint32_t Index) PURE;
934  STDMETHOD_(ID3DX11EffectPass*, GetPassByName)(THIS_ _In_z_ LPCSTR Name) PURE;
935 
936  STDMETHOD(ComputeStateBlockMask)(THIS_ _Inout_ D3DX11_STATE_BLOCK_MASK *pStateBlockMask) PURE;
937 };
938 
940 // ID3DX11EffectTechnique /////////////////////////////////////////////////////
942 
943 //----------------------------------------------------------------------------
944 // D3DX11_GROUP_DESC:
945 //
946 // Retrieved by ID3DX11EffectTechnique::GetDesc()
947 //----------------------------------------------------------------------------
948 
950 {
951  LPCSTR Name; // Name of this group (only nullptr if global)
952  uint32_t Techniques; // Number of techniques contained within
953  uint32_t Annotations; // Number of annotations on this group
954 };
955 
956 typedef interface ID3DX11EffectGroup ID3DX11EffectGroup;
957 typedef interface ID3DX11EffectGroup *LPD3D11EFFECTGROUP;
958 
959 // {03074acf-97de-485f-b201-cb775264afd6}
960 DEFINE_GUID(IID_ID3DX11EffectGroup,
961  0x03074acf, 0x97de, 0x485f, 0xb2, 0x01, 0xcb, 0x77, 0x52, 0x64, 0xaf, 0xd6);
962 
963 #undef INTERFACE
964 #define INTERFACE ID3DX11EffectGroup
965 
966 DECLARE_INTERFACE_(ID3DX11EffectGroup, IUnknown)
967 {
968  // IUnknown
969 
970  // ID3DX11EffectGroup
971  STDMETHOD_(bool, IsValid)(THIS) PURE;
972  STDMETHOD(GetDesc)(THIS_ _Out_ D3DX11_GROUP_DESC *pDesc) PURE;
973 
974  STDMETHOD_(ID3DX11EffectVariable*, GetAnnotationByIndex)(THIS_ _In_ uint32_t Index) PURE;
975  STDMETHOD_(ID3DX11EffectVariable*, GetAnnotationByName)(THIS_ _In_z_ LPCSTR Name) PURE;
976 
977  STDMETHOD_(ID3DX11EffectTechnique*, GetTechniqueByIndex)(THIS_ _In_ uint32_t Index) PURE;
978  STDMETHOD_(ID3DX11EffectTechnique*, GetTechniqueByName)(THIS_ _In_z_ LPCSTR Name) PURE;
979 };
980 
982 // ID3DX11Effect //////////////////////////////////////////////////////////////
984 
985 //----------------------------------------------------------------------------
986 // D3DX11_EFFECT_DESC:
987 //
988 // Retrieved by ID3DX11Effect::GetDesc()
989 //----------------------------------------------------------------------------
990 
992 {
993  uint32_t ConstantBuffers; // Number of constant buffers in this effect
994  uint32_t GlobalVariables; // Number of global variables in this effect
995  uint32_t InterfaceVariables; // Number of global interfaces in this effect
996  uint32_t Techniques; // Number of techniques in this effect
997  uint32_t Groups; // Number of groups in this effect
998 };
999 
1000 typedef interface ID3DX11Effect ID3DX11Effect;
1001 typedef interface ID3DX11Effect *LPD3D11EFFECT;
1002 
1003 // {FA61CA24-E4BA-4262-9DB8-B132E8CAE319}
1004 DEFINE_GUID(IID_ID3DX11Effect,
1005  0xfa61ca24, 0xe4ba, 0x4262, 0x9d, 0xb8, 0xb1, 0x32, 0xe8, 0xca, 0xe3, 0x19);
1006 
1007 #undef INTERFACE
1008 #define INTERFACE ID3DX11Effect
1009 
1010 DECLARE_INTERFACE_(ID3DX11Effect, IUnknown)
1011 {
1012  // IUnknown
1013 
1014  // ID3DX11Effect
1015  STDMETHOD_(bool, IsValid)(THIS) PURE;
1016 
1017  STDMETHOD(GetDevice)(THIS_ _Outptr_ ID3D11Device** ppDevice) PURE;
1018 
1019  STDMETHOD(GetDesc)(THIS_ _Out_ D3DX11_EFFECT_DESC *pDesc) PURE;
1020 
1021  STDMETHOD_(ID3DX11EffectConstantBuffer*, GetConstantBufferByIndex)(THIS_ _In_ uint32_t Index) PURE;
1022  STDMETHOD_(ID3DX11EffectConstantBuffer*, GetConstantBufferByName)(THIS_ _In_z_ LPCSTR Name) PURE;
1023 
1024  STDMETHOD_(ID3DX11EffectVariable*, GetVariableByIndex)(THIS_ _In_ uint32_t Index) PURE;
1025  STDMETHOD_(ID3DX11EffectVariable*, GetVariableByName)(THIS_ _In_z_ LPCSTR Name) PURE;
1026  STDMETHOD_(ID3DX11EffectVariable*, GetVariableBySemantic)(THIS_ _In_z_ LPCSTR Semantic) PURE;
1027 
1028  STDMETHOD_(ID3DX11EffectGroup*, GetGroupByIndex)(THIS_ _In_ uint32_t Index) PURE;
1029  STDMETHOD_(ID3DX11EffectGroup*, GetGroupByName)(THIS_ _In_z_ LPCSTR Name) PURE;
1030 
1031  STDMETHOD_(ID3DX11EffectTechnique*, GetTechniqueByIndex)(THIS_ _In_ uint32_t Index) PURE;
1032  STDMETHOD_(ID3DX11EffectTechnique*, GetTechniqueByName)(THIS_ _In_z_ LPCSTR Name) PURE;
1033 
1034  STDMETHOD_(ID3D11ClassLinkage*, GetClassLinkage)(THIS) PURE;
1035 
1036  STDMETHOD(CloneEffect)(THIS_ _In_ uint32_t Flags, _Outptr_ ID3DX11Effect** ppClonedEffect ) PURE;
1037  STDMETHOD(Optimize)(THIS) PURE;
1038  STDMETHOD_(bool, IsOptimized)(THIS) PURE;
1039 };
1040 
1042 // APIs //////////////////////////////////////////////////////////////////////
1044 
1045 #ifdef __cplusplus
1046 extern "C" {
1047 #endif //__cplusplus
1048 
1049 //----------------------------------------------------------------------------
1050 // D3DX11CreateEffectFromMemory
1051 //
1052 // Creates an effect instance from a compiled effect in memory
1053 //
1054 // Parameters:
1055 //
1056 // [in]
1057 //
1058 // pData
1059 // Blob of compiled effect data
1060 // DataLength
1061 // Length of the data blob
1062 // FXFlags
1063 // Flags pertaining to Effect creation
1064 // pDevice
1065 // Pointer to the D3D11 device on which to create Effect resources
1066 // srcName [optional]
1067 // ASCII string to use for debug object naming
1068 //
1069 // [out]
1070 //
1071 // ppEffect
1072 // Address of the newly created Effect interface
1073 //
1074 //----------------------------------------------------------------------------
1075 
1076 HRESULT WINAPI D3DX11CreateEffectFromMemory( _In_reads_bytes_(DataLength) LPCVOID pData,
1077  _In_ SIZE_T DataLength,
1078  _In_ UINT FXFlags,
1079  _In_ ID3D11Device *pDevice,
1080  _Outptr_ ID3DX11Effect **ppEffect,
1081  _In_opt_z_ LPCSTR srcName = nullptr );
1082 
1083 //----------------------------------------------------------------------------
1084 // D3DX11CreateEffectFromFile
1085 //
1086 // Creates an effect instance from a compiled effect data file
1087 //
1088 // Parameters:
1089 //
1090 // [in]
1091 //
1092 // pFileName
1093 // Compiled effect file
1094 // FXFlags
1095 // Flags pertaining to Effect creation
1096 // pDevice
1097 // Pointer to the D3D11 device on which to create Effect resources
1098 //
1099 // [out]
1100 //
1101 // ppEffect
1102 // Address of the newly created Effect interface
1103 //
1104 //----------------------------------------------------------------------------
1105 
1106 HRESULT WINAPI D3DX11CreateEffectFromFile( _In_z_ LPCWSTR pFileName,
1107  _In_ UINT FXFlags,
1108  _In_ ID3D11Device *pDevice,
1109  _Outptr_ ID3DX11Effect **ppEffect );
1110 
1111 //----------------------------------------------------------------------------
1112 // D3DX11CompileEffectFromMemory
1113 //
1114 // Complies an effect shader source file in memory and then creates an effect instance
1115 //
1116 // Parameters:
1117 //
1118 // [in]
1119 //
1120 // pData
1121 // Pointer to FX shader as an ASCII string
1122 // DataLength
1123 // Length of the FX shader ASCII string
1124 // srcName [optional]
1125 // ASCII string to use for debug object naming
1126 // pDefines [optional]
1127 // A NULL-terminated array of shader macros
1128 // pInclude [optional]
1129 // A pointer to an include interface
1130 // HLSLFlags
1131 // HLSL compile options (see D3DCOMPILE flags)
1132 // FXFlags
1133 // Flags pertaining to Effect compilation (see D3DCOMPILE_EFFECT flags)
1134 // pDevice
1135 // Pointer to the D3D11 device on which to create Effect resources
1136 //
1137 // [out]
1138 //
1139 // ppEffect
1140 // Address of the newly created Effect interface
1141 //
1142 //----------------------------------------------------------------------------
1143 
1144 HRESULT D3DX11CompileEffectFromMemory( _In_reads_bytes_(DataLength) LPCVOID pData,
1145  _In_ SIZE_T DataLength,
1146  _In_opt_z_ LPCSTR srcName,
1147  _In_opt_ const D3D_SHADER_MACRO *pDefines,
1148  _In_opt_ ID3DInclude *pInclude,
1149  _In_ UINT HLSLFlags,
1150  _In_ UINT FXFlags,
1151  _In_ ID3D11Device *pDevice,
1152  _Out_ ID3DX11Effect **ppEffect,
1153  _Outptr_opt_result_maybenull_ ID3DBlob **ppErrors );
1154 
1155 //----------------------------------------------------------------------------
1156 // D3DX11CompileEffectFromFile
1157 //
1158 // Complies an effect shader source file and then creates an effect instance
1159 //
1160 // Parameters:
1161 //
1162 // [in]
1163 //
1164 // pFileName
1165 // FX shader source file
1166 // pDefines [optional]
1167 // A NULL-terminated array of shader macros
1168 // pInclude [optional]
1169 // A pointer to an include interface
1170 // HLSLFlags
1171 // HLSL compile options (see D3DCOMPILE flags)
1172 // FXFlags
1173 // Flags pertaining to Effect compilation (see D3DCOMPILE_EFFECT flags)
1174 // pDevice
1175 // Pointer to the D3D11 device on which to create Effect resources
1176 //
1177 // [out]
1178 //
1179 // ppEffect
1180 // Address of the newly created Effect interface
1181 //
1182 //----------------------------------------------------------------------------
1183 
1184 HRESULT D3DX11CompileEffectFromFile( _In_z_ LPCWSTR pFileName,
1185  _In_opt_ const D3D_SHADER_MACRO *pDefines,
1186  _In_opt_ ID3DInclude *pInclude,
1187  _In_ UINT HLSLFlags,
1188  _In_ UINT FXFlags,
1189  _In_ ID3D11Device *pDevice,
1190  _Out_ ID3DX11Effect **ppEffect,
1191  _Outptr_opt_result_maybenull_ ID3DBlob **ppErrors );
1192 
1193 
1194 //----------------------------------------------------------------------------
1195 // D3DX11DebugMute
1196 //
1197 // Controls the output of diagnostic information in DEBUG builds. No effect
1198 // in RELEASE builds.
1199 //
1200 // Returns the previous state so you can do temporary suppression like:
1201 //
1202 // bool oldmute = D3DX11DebugMute(true);
1203 // ...
1204 // D3DX11DebugMute(oldmute);
1205 //
1206 //----------------------------------------------------------------------------
1207 
1208 bool D3DX11DebugMute(bool mute);
1209 
1210 #ifdef __cplusplus
1211 }
1212 #endif //__cplusplus
Definition: d3dx11effect.h:825
Definition: d3dx11effect.h:236
Definition: d3dx11effect.h:905
Definition: d3dx11effect.h:949
Definition: d3dx11effect.h:659
Definition: d3dx11effect.h:845
Definition: d3dx11effect.h:44
Definition: d3dx11effect.h:177
Definition: d3dx11effect.h:991
Definition: TestJobManager.cpp:22