aboutsummaryrefslogtreecommitdiff
path: root/contrib/DirectX-Headers/include/directx/d3d12shader.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/DirectX-Headers/include/directx/d3d12shader.h')
-rw-r--r--contrib/DirectX-Headers/include/directx/d3d12shader.h474
1 files changed, 474 insertions, 0 deletions
diff --git a/contrib/DirectX-Headers/include/directx/d3d12shader.h b/contrib/DirectX-Headers/include/directx/d3d12shader.h
new file mode 100644
index 0000000..4ff639b
--- /dev/null
+++ b/contrib/DirectX-Headers/include/directx/d3d12shader.h
@@ -0,0 +1,474 @@
1//////////////////////////////////////////////////////////////////////////////
2//
3// Copyright (c) Microsoft Corporation.
4// Licensed under the MIT license.
5//
6// File: D3D12Shader.h
7// Content: D3D12 Shader Types and APIs
8//
9//////////////////////////////////////////////////////////////////////////////
10
11#ifndef __D3D12SHADER_H__
12#define __D3D12SHADER_H__
13
14#include "d3dcommon.h"
15
16typedef enum D3D12_SHADER_VERSION_TYPE
17{
18 D3D12_SHVER_PIXEL_SHADER = 0,
19 D3D12_SHVER_VERTEX_SHADER = 1,
20 D3D12_SHVER_GEOMETRY_SHADER = 2,
21
22 // D3D11 Shaders
23 D3D12_SHVER_HULL_SHADER = 3,
24 D3D12_SHVER_DOMAIN_SHADER = 4,
25 D3D12_SHVER_COMPUTE_SHADER = 5,
26
27 D3D12_SHVER_RESERVED0 = 0xFFF0,
28} D3D12_SHADER_VERSION_TYPE;
29
30#define D3D12_SHVER_GET_TYPE(_Version) \
31 (((_Version) >> 16) & 0xffff)
32#define D3D12_SHVER_GET_MAJOR(_Version) \
33 (((_Version) >> 4) & 0xf)
34#define D3D12_SHVER_GET_MINOR(_Version) \
35 (((_Version) >> 0) & 0xf)
36
37// Slot ID for library function return
38#define D3D_RETURN_PARAMETER_INDEX (-1)
39
40typedef D3D_RESOURCE_RETURN_TYPE D3D12_RESOURCE_RETURN_TYPE;
41
42typedef D3D_CBUFFER_TYPE D3D12_CBUFFER_TYPE;
43
44
45typedef struct _D3D12_SIGNATURE_PARAMETER_DESC
46{
47 LPCSTR SemanticName; // Name of the semantic
48 UINT SemanticIndex; // Index of the semantic
49 UINT Register; // Number of member variables
50 D3D_NAME SystemValueType;// A predefined system value, or D3D_NAME_UNDEFINED if not applicable
51 D3D_REGISTER_COMPONENT_TYPE ComponentType; // Scalar type (e.g. uint, float, etc.)
52 BYTE Mask; // Mask to indicate which components of the register
53 // are used (combination of D3D10_COMPONENT_MASK values)
54 BYTE ReadWriteMask; // Mask to indicate whether a given component is
55 // never written (if this is an output signature) or
56 // always read (if this is an input signature).
57 // (combination of D3D_MASK_* values)
58 UINT Stream; // Stream index
59 D3D_MIN_PRECISION MinPrecision; // Minimum desired interpolation precision
60} D3D12_SIGNATURE_PARAMETER_DESC;
61
62typedef struct _D3D12_SHADER_BUFFER_DESC
63{
64 LPCSTR Name; // Name of the constant buffer
65 D3D_CBUFFER_TYPE Type; // Indicates type of buffer content
66 UINT Variables; // Number of member variables
67 UINT Size; // Size of CB (in bytes)
68 UINT uFlags; // Buffer description flags
69} D3D12_SHADER_BUFFER_DESC;
70
71typedef struct _D3D12_SHADER_VARIABLE_DESC
72{
73 LPCSTR Name; // Name of the variable
74 UINT StartOffset; // Offset in constant buffer's backing store
75 UINT Size; // Size of variable (in bytes)
76 UINT uFlags; // Variable flags
77 LPVOID DefaultValue; // Raw pointer to default value
78 UINT StartTexture; // First texture index (or -1 if no textures used)
79 UINT TextureSize; // Number of texture slots possibly used.
80 UINT StartSampler; // First sampler index (or -1 if no textures used)
81 UINT SamplerSize; // Number of sampler slots possibly used.
82} D3D12_SHADER_VARIABLE_DESC;
83
84typedef struct _D3D12_SHADER_TYPE_DESC
85{
86 D3D_SHADER_VARIABLE_CLASS Class; // Variable class (e.g. object, matrix, etc.)
87 D3D_SHADER_VARIABLE_TYPE Type; // Variable type (e.g. float, sampler, etc.)
88 UINT Rows; // Number of rows (for matrices, 1 for other numeric, 0 if not applicable)
89 UINT Columns; // Number of columns (for vectors & matrices, 1 for other numeric, 0 if not applicable)
90 UINT Elements; // Number of elements (0 if not an array)
91 UINT Members; // Number of members (0 if not a structure)
92 UINT Offset; // Offset from the start of structure (0 if not a structure member)
93 LPCSTR Name; // Name of type, can be NULL
94} D3D12_SHADER_TYPE_DESC;
95
96typedef D3D_TESSELLATOR_DOMAIN D3D12_TESSELLATOR_DOMAIN;
97
98typedef D3D_TESSELLATOR_PARTITIONING D3D12_TESSELLATOR_PARTITIONING;
99
100typedef D3D_TESSELLATOR_OUTPUT_PRIMITIVE D3D12_TESSELLATOR_OUTPUT_PRIMITIVE;
101
102typedef struct _D3D12_SHADER_DESC
103{
104 UINT Version; // Shader version
105 LPCSTR Creator; // Creator string
106 UINT Flags; // Shader compilation/parse flags
107
108 UINT ConstantBuffers; // Number of constant buffers
109 UINT BoundResources; // Number of bound resources
110 UINT InputParameters; // Number of parameters in the input signature
111 UINT OutputParameters; // Number of parameters in the output signature
112
113 UINT InstructionCount; // Number of emitted instructions
114 UINT TempRegisterCount; // Number of temporary registers used
115 UINT TempArrayCount; // Number of temporary arrays used
116 UINT DefCount; // Number of constant defines
117 UINT DclCount; // Number of declarations (input + output)
118 UINT TextureNormalInstructions; // Number of non-categorized texture instructions
119 UINT TextureLoadInstructions; // Number of texture load instructions
120 UINT TextureCompInstructions; // Number of texture comparison instructions
121 UINT TextureBiasInstructions; // Number of texture bias instructions
122 UINT TextureGradientInstructions; // Number of texture gradient instructions
123 UINT FloatInstructionCount; // Number of floating point arithmetic instructions used
124 UINT IntInstructionCount; // Number of signed integer arithmetic instructions used
125 UINT UintInstructionCount; // Number of unsigned integer arithmetic instructions used
126 UINT StaticFlowControlCount; // Number of static flow control instructions used
127 UINT DynamicFlowControlCount; // Number of dynamic flow control instructions used
128 UINT MacroInstructionCount; // Number of macro instructions used
129 UINT ArrayInstructionCount; // Number of array instructions used
130 UINT CutInstructionCount; // Number of cut instructions used
131 UINT EmitInstructionCount; // Number of emit instructions used
132 D3D_PRIMITIVE_TOPOLOGY GSOutputTopology; // Geometry shader output topology
133 UINT GSMaxOutputVertexCount; // Geometry shader maximum output vertex count
134 D3D_PRIMITIVE InputPrimitive; // GS/HS input primitive
135 UINT PatchConstantParameters; // Number of parameters in the patch constant signature
136 UINT cGSInstanceCount; // Number of Geometry shader instances
137 UINT cControlPoints; // Number of control points in the HS->DS stage
138 D3D_TESSELLATOR_OUTPUT_PRIMITIVE HSOutputPrimitive; // Primitive output by the tessellator
139 D3D_TESSELLATOR_PARTITIONING HSPartitioning; // Partitioning mode of the tessellator
140 D3D_TESSELLATOR_DOMAIN TessellatorDomain; // Domain of the tessellator (quad, tri, isoline)
141 // instruction counts
142 UINT cBarrierInstructions; // Number of barrier instructions in a compute shader
143 UINT cInterlockedInstructions; // Number of interlocked instructions
144 UINT cTextureStoreInstructions; // Number of texture writes
145} D3D12_SHADER_DESC;
146
147typedef struct _D3D12_SHADER_INPUT_BIND_DESC
148{
149 LPCSTR Name; // Name of the resource
150 D3D_SHADER_INPUT_TYPE Type; // Type of resource (e.g. texture, cbuffer, etc.)
151 UINT BindPoint; // Starting bind point
152 UINT BindCount; // Number of contiguous bind points (for arrays)
153
154 UINT uFlags; // Input binding flags
155 D3D_RESOURCE_RETURN_TYPE ReturnType; // Return type (if texture)
156 D3D_SRV_DIMENSION Dimension; // Dimension (if texture)
157 UINT NumSamples; // Number of samples (0 if not MS texture)
158 UINT Space; // Register space
159 UINT uID; // Range ID in the bytecode
160} D3D12_SHADER_INPUT_BIND_DESC;
161
162#define D3D_SHADER_REQUIRES_DOUBLES 0x00000001
163#define D3D_SHADER_REQUIRES_EARLY_DEPTH_STENCIL 0x00000002
164#define D3D_SHADER_REQUIRES_UAVS_AT_EVERY_STAGE 0x00000004
165#define D3D_SHADER_REQUIRES_64_UAVS 0x00000008
166#define D3D_SHADER_REQUIRES_MINIMUM_PRECISION 0x00000010
167#define D3D_SHADER_REQUIRES_11_1_DOUBLE_EXTENSIONS 0x00000020
168#define D3D_SHADER_REQUIRES_11_1_SHADER_EXTENSIONS 0x00000040
169#define D3D_SHADER_REQUIRES_LEVEL_9_COMPARISON_FILTERING 0x00000080
170#define D3D_SHADER_REQUIRES_TILED_RESOURCES 0x00000100
171#define D3D_SHADER_REQUIRES_STENCIL_REF 0x00000200
172#define D3D_SHADER_REQUIRES_INNER_COVERAGE 0x00000400
173#define D3D_SHADER_REQUIRES_TYPED_UAV_LOAD_ADDITIONAL_FORMATS 0x00000800
174#define D3D_SHADER_REQUIRES_ROVS 0x00001000
175#define D3D_SHADER_REQUIRES_VIEWPORT_AND_RT_ARRAY_INDEX_FROM_ANY_SHADER_FEEDING_RASTERIZER 0x00002000
176#define D3D_SHADER_REQUIRES_WAVE_OPS 0x00004000
177#define D3D_SHADER_REQUIRES_INT64_OPS 0x00008000
178#define D3D_SHADER_REQUIRES_VIEW_ID 0x00010000
179#define D3D_SHADER_REQUIRES_BARYCENTRICS 0x00020000
180#define D3D_SHADER_REQUIRES_NATIVE_16BIT_OPS 0x00040000
181#define D3D_SHADER_REQUIRES_SHADING_RATE 0x00080000
182#define D3D_SHADER_REQUIRES_RAYTRACING_TIER_1_1 0x00100000
183#define D3D_SHADER_REQUIRES_SAMPLER_FEEDBACK 0x00200000
184#define D3D_SHADER_REQUIRES_ATOMIC_INT64_ON_TYPED_RESOURCE 0x00400000
185#define D3D_SHADER_REQUIRES_ATOMIC_INT64_ON_GROUP_SHARED 0x00800000
186#define D3D_SHADER_REQUIRES_DERIVATIVES_IN_MESH_AND_AMPLIFICATION_SHADERS 0x01000000
187#define D3D_SHADER_REQUIRES_RESOURCE_DESCRIPTOR_HEAP_INDEXING 0x02000000
188#define D3D_SHADER_REQUIRES_SAMPLER_DESCRIPTOR_HEAP_INDEXING 0x04000000
189#define D3D_SHADER_REQUIRES_WAVE_MMA 0x08000000
190#define D3D_SHADER_REQUIRES_ATOMIC_INT64_ON_DESCRIPTOR_HEAP_RESOURCE 0x10000000
191
192typedef struct _D3D12_LIBRARY_DESC
193{
194 LPCSTR Creator; // The name of the originator of the library.
195 UINT Flags; // Compilation flags.
196 UINT FunctionCount; // Number of functions exported from the library.
197} D3D12_LIBRARY_DESC;
198
199typedef struct _D3D12_FUNCTION_DESC
200{
201 UINT Version; // Shader version
202 LPCSTR Creator; // Creator string
203 UINT Flags; // Shader compilation/parse flags
204
205 UINT ConstantBuffers; // Number of constant buffers
206 UINT BoundResources; // Number of bound resources
207
208 UINT InstructionCount; // Number of emitted instructions
209 UINT TempRegisterCount; // Number of temporary registers used
210 UINT TempArrayCount; // Number of temporary arrays used
211 UINT DefCount; // Number of constant defines
212 UINT DclCount; // Number of declarations (input + output)
213 UINT TextureNormalInstructions; // Number of non-categorized texture instructions
214 UINT TextureLoadInstructions; // Number of texture load instructions
215 UINT TextureCompInstructions; // Number of texture comparison instructions
216 UINT TextureBiasInstructions; // Number of texture bias instructions
217 UINT TextureGradientInstructions; // Number of texture gradient instructions
218 UINT FloatInstructionCount; // Number of floating point arithmetic instructions used
219 UINT IntInstructionCount; // Number of signed integer arithmetic instructions used
220 UINT UintInstructionCount; // Number of unsigned integer arithmetic instructions used
221 UINT StaticFlowControlCount; // Number of static flow control instructions used
222 UINT DynamicFlowControlCount; // Number of dynamic flow control instructions used
223 UINT MacroInstructionCount; // Number of macro instructions used
224 UINT ArrayInstructionCount; // Number of array instructions used
225 UINT MovInstructionCount; // Number of mov instructions used
226 UINT MovcInstructionCount; // Number of movc instructions used
227 UINT ConversionInstructionCount; // Number of type conversion instructions used
228 UINT BitwiseInstructionCount; // Number of bitwise arithmetic instructions used
229 D3D_FEATURE_LEVEL MinFeatureLevel; // Min target of the function byte code
230 UINT64 RequiredFeatureFlags; // Required feature flags
231
232 LPCSTR Name; // Function name
233 INT FunctionParameterCount; // Number of logical parameters in the function signature (not including return)
234 BOOL HasReturn; // TRUE, if function returns a value, false - it is a subroutine
235 BOOL Has10Level9VertexShader; // TRUE, if there is a 10L9 VS blob
236 BOOL Has10Level9PixelShader; // TRUE, if there is a 10L9 PS blob
237} D3D12_FUNCTION_DESC;
238
239typedef struct _D3D12_PARAMETER_DESC
240{
241 LPCSTR Name; // Parameter name.
242 LPCSTR SemanticName; // Parameter semantic name (+index).
243 D3D_SHADER_VARIABLE_TYPE Type; // Element type.
244 D3D_SHADER_VARIABLE_CLASS Class; // Scalar/Vector/Matrix.
245 UINT Rows; // Rows are for matrix parameters.
246 UINT Columns; // Components or Columns in matrix.
247 D3D_INTERPOLATION_MODE InterpolationMode; // Interpolation mode.
248 D3D_PARAMETER_FLAGS Flags; // Parameter modifiers.
249
250 UINT FirstInRegister; // The first input register for this parameter.
251 UINT FirstInComponent; // The first input register component for this parameter.
252 UINT FirstOutRegister; // The first output register for this parameter.
253 UINT FirstOutComponent; // The first output register component for this parameter.
254} D3D12_PARAMETER_DESC;
255
256
257//////////////////////////////////////////////////////////////////////////////
258// Interfaces ////////////////////////////////////////////////////////////////
259//////////////////////////////////////////////////////////////////////////////
260
261typedef interface ID3D12ShaderReflectionType ID3D12ShaderReflectionType;
262typedef interface ID3D12ShaderReflectionType *LPD3D12SHADERREFLECTIONTYPE;
263
264typedef interface ID3D12ShaderReflectionVariable ID3D12ShaderReflectionVariable;
265typedef interface ID3D12ShaderReflectionVariable *LPD3D12SHADERREFLECTIONVARIABLE;
266
267typedef interface ID3D12ShaderReflectionConstantBuffer ID3D12ShaderReflectionConstantBuffer;
268typedef interface ID3D12ShaderReflectionConstantBuffer *LPD3D12SHADERREFLECTIONCONSTANTBUFFER;
269
270typedef interface ID3D12ShaderReflection ID3D12ShaderReflection;
271typedef interface ID3D12ShaderReflection *LPD3D12SHADERREFLECTION;
272
273typedef interface ID3D12LibraryReflection ID3D12LibraryReflection;
274typedef interface ID3D12LibraryReflection *LPD3D12LIBRARYREFLECTION;
275
276typedef interface ID3D12FunctionReflection ID3D12FunctionReflection;
277typedef interface ID3D12FunctionReflection *LPD3D12FUNCTIONREFLECTION;
278
279typedef interface ID3D12FunctionParameterReflection ID3D12FunctionParameterReflection;
280typedef interface ID3D12FunctionParameterReflection *LPD3D12FUNCTIONPARAMETERREFLECTION;
281
282
283// {E913C351-783D-48CA-A1D1-4F306284AD56}
284interface DECLSPEC_UUID("E913C351-783D-48CA-A1D1-4F306284AD56") ID3D12ShaderReflectionType;
285DEFINE_GUID(IID_ID3D12ShaderReflectionType,
2860xe913c351, 0x783d, 0x48ca, 0xa1, 0xd1, 0x4f, 0x30, 0x62, 0x84, 0xad, 0x56);
287
288#undef INTERFACE
289#define INTERFACE ID3D12ShaderReflectionType
290
291DECLARE_INTERFACE(ID3D12ShaderReflectionType)
292{
293 STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_SHADER_TYPE_DESC *pDesc) PURE;
294
295 STDMETHOD_(ID3D12ShaderReflectionType*, GetMemberTypeByIndex)(THIS_ _In_ UINT Index) PURE;
296 STDMETHOD_(ID3D12ShaderReflectionType*, GetMemberTypeByName)(THIS_ _In_ LPCSTR Name) PURE;
297 STDMETHOD_(LPCSTR, GetMemberTypeName)(THIS_ _In_ UINT Index) PURE;
298
299 STDMETHOD(IsEqual)(THIS_ _In_ ID3D12ShaderReflectionType* pType) PURE;
300 STDMETHOD_(ID3D12ShaderReflectionType*, GetSubType)(THIS) PURE;
301 STDMETHOD_(ID3D12ShaderReflectionType*, GetBaseClass)(THIS) PURE;
302 STDMETHOD_(UINT, GetNumInterfaces)(THIS) PURE;
303 STDMETHOD_(ID3D12ShaderReflectionType*, GetInterfaceByIndex)(THIS_ _In_ UINT uIndex) PURE;
304 STDMETHOD(IsOfType)(THIS_ _In_ ID3D12ShaderReflectionType* pType) PURE;
305 STDMETHOD(ImplementsInterface)(THIS_ _In_ ID3D12ShaderReflectionType* pBase) PURE;
306};
307
308// {8337A8A6-A216-444A-B2F4-314733A73AEA}
309interface DECLSPEC_UUID("8337A8A6-A216-444A-B2F4-314733A73AEA") ID3D12ShaderReflectionVariable;
310DEFINE_GUID(IID_ID3D12ShaderReflectionVariable,
3110x8337a8a6, 0xa216, 0x444a, 0xb2, 0xf4, 0x31, 0x47, 0x33, 0xa7, 0x3a, 0xea);
312
313#undef INTERFACE
314#define INTERFACE ID3D12ShaderReflectionVariable
315
316DECLARE_INTERFACE(ID3D12ShaderReflectionVariable)
317{
318 STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_SHADER_VARIABLE_DESC *pDesc) PURE;
319
320 STDMETHOD_(ID3D12ShaderReflectionType*, GetType)(THIS) PURE;
321 STDMETHOD_(ID3D12ShaderReflectionConstantBuffer*, GetBuffer)(THIS) PURE;
322
323 STDMETHOD_(UINT, GetInterfaceSlot)(THIS_ _In_ UINT uArrayIndex) PURE;
324};
325
326// {C59598B4-48B3-4869-B9B1-B1618B14A8B7}
327interface DECLSPEC_UUID("C59598B4-48B3-4869-B9B1-B1618B14A8B7") ID3D12ShaderReflectionConstantBuffer;
328DEFINE_GUID(IID_ID3D12ShaderReflectionConstantBuffer,
3290xc59598b4, 0x48b3, 0x4869, 0xb9, 0xb1, 0xb1, 0x61, 0x8b, 0x14, 0xa8, 0xb7);
330
331#undef INTERFACE
332#define INTERFACE ID3D12ShaderReflectionConstantBuffer
333
334DECLARE_INTERFACE(ID3D12ShaderReflectionConstantBuffer)
335{
336 STDMETHOD(GetDesc)(THIS_ D3D12_SHADER_BUFFER_DESC *pDesc) PURE;
337
338 STDMETHOD_(ID3D12ShaderReflectionVariable*, GetVariableByIndex)(THIS_ _In_ UINT Index) PURE;
339 STDMETHOD_(ID3D12ShaderReflectionVariable*, GetVariableByName)(THIS_ _In_ LPCSTR Name) PURE;
340};
341
342// The ID3D12ShaderReflection IID may change from SDK version to SDK version
343// if the reflection API changes. This prevents new code with the new API
344// from working with an old binary. Recompiling with the new header
345// will pick up the new IID.
346
347// {5A58797D-A72C-478D-8BA2-EFC6B0EFE88E}
348interface DECLSPEC_UUID("5A58797D-A72C-478D-8BA2-EFC6B0EFE88E") ID3D12ShaderReflection;
349DEFINE_GUID(IID_ID3D12ShaderReflection,
3500x5a58797d, 0xa72c, 0x478d, 0x8b, 0xa2, 0xef, 0xc6, 0xb0, 0xef, 0xe8, 0x8e);
351
352#undef INTERFACE
353#define INTERFACE ID3D12ShaderReflection
354
355DECLARE_INTERFACE_(ID3D12ShaderReflection, IUnknown)
356{
357 STDMETHOD(QueryInterface)(THIS_ _In_ REFIID iid,
358 _Out_ LPVOID *ppv) PURE;
359 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
360 STDMETHOD_(ULONG, Release)(THIS) PURE;
361
362 STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_SHADER_DESC *pDesc) PURE;
363
364 STDMETHOD_(ID3D12ShaderReflectionConstantBuffer*, GetConstantBufferByIndex)(THIS_ _In_ UINT Index) PURE;
365 STDMETHOD_(ID3D12ShaderReflectionConstantBuffer*, GetConstantBufferByName)(THIS_ _In_ LPCSTR Name) PURE;
366
367 STDMETHOD(GetResourceBindingDesc)(THIS_ _In_ UINT ResourceIndex,
368 _Out_ D3D12_SHADER_INPUT_BIND_DESC *pDesc) PURE;
369
370 STDMETHOD(GetInputParameterDesc)(THIS_ _In_ UINT ParameterIndex,
371 _Out_ D3D12_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
372 STDMETHOD(GetOutputParameterDesc)(THIS_ _In_ UINT ParameterIndex,
373 _Out_ D3D12_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
374 STDMETHOD(GetPatchConstantParameterDesc)(THIS_ _In_ UINT ParameterIndex,
375 _Out_ D3D12_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
376
377 STDMETHOD_(ID3D12ShaderReflectionVariable*, GetVariableByName)(THIS_ _In_ LPCSTR Name) PURE;
378
379 STDMETHOD(GetResourceBindingDescByName)(THIS_ _In_ LPCSTR Name,
380 _Out_ D3D12_SHADER_INPUT_BIND_DESC *pDesc) PURE;
381
382 STDMETHOD_(UINT, GetMovInstructionCount)(THIS) PURE;
383 STDMETHOD_(UINT, GetMovcInstructionCount)(THIS) PURE;
384 STDMETHOD_(UINT, GetConversionInstructionCount)(THIS) PURE;
385 STDMETHOD_(UINT, GetBitwiseInstructionCount)(THIS) PURE;
386
387 STDMETHOD_(D3D_PRIMITIVE, GetGSInputPrimitive)(THIS) PURE;
388 STDMETHOD_(BOOL, IsSampleFrequencyShader)(THIS) PURE;
389
390 STDMETHOD_(UINT, GetNumInterfaceSlots)(THIS) PURE;
391 STDMETHOD(GetMinFeatureLevel)(THIS_ _Out_ enum D3D_FEATURE_LEVEL* pLevel) PURE;
392
393 STDMETHOD_(UINT, GetThreadGroupSize)(THIS_
394 _Out_opt_ UINT* pSizeX,
395 _Out_opt_ UINT* pSizeY,
396 _Out_opt_ UINT* pSizeZ) PURE;
397
398 STDMETHOD_(UINT64, GetRequiresFlags)(THIS) PURE;
399};
400
401// {8E349D19-54DB-4A56-9DC9-119D87BDB804}
402interface DECLSPEC_UUID("8E349D19-54DB-4A56-9DC9-119D87BDB804") ID3D12LibraryReflection;
403DEFINE_GUID(IID_ID3D12LibraryReflection,
4040x8e349d19, 0x54db, 0x4a56, 0x9d, 0xc9, 0x11, 0x9d, 0x87, 0xbd, 0xb8, 0x4);
405
406#undef INTERFACE
407#define INTERFACE ID3D12LibraryReflection
408
409DECLARE_INTERFACE_(ID3D12LibraryReflection, IUnknown)
410{
411 STDMETHOD(QueryInterface)(THIS_ _In_ REFIID iid, _Out_ LPVOID * ppv) PURE;
412 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
413 STDMETHOD_(ULONG, Release)(THIS) PURE;
414
415 STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_LIBRARY_DESC * pDesc) PURE;
416
417 STDMETHOD_(ID3D12FunctionReflection *, GetFunctionByIndex)(THIS_ _In_ INT FunctionIndex) PURE;
418};
419
420// {1108795C-2772-4BA9-B2A8-D464DC7E2799}
421interface DECLSPEC_UUID("1108795C-2772-4BA9-B2A8-D464DC7E2799") ID3D12FunctionReflection;
422DEFINE_GUID(IID_ID3D12FunctionReflection,
4230x1108795c, 0x2772, 0x4ba9, 0xb2, 0xa8, 0xd4, 0x64, 0xdc, 0x7e, 0x27, 0x99);
424
425#undef INTERFACE
426#define INTERFACE ID3D12FunctionReflection
427
428DECLARE_INTERFACE(ID3D12FunctionReflection)
429{
430 STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_FUNCTION_DESC * pDesc) PURE;
431
432 STDMETHOD_(ID3D12ShaderReflectionConstantBuffer *, GetConstantBufferByIndex)(THIS_ _In_ UINT BufferIndex) PURE;
433 STDMETHOD_(ID3D12ShaderReflectionConstantBuffer *, GetConstantBufferByName)(THIS_ _In_ LPCSTR Name) PURE;
434
435 STDMETHOD(GetResourceBindingDesc)(THIS_ _In_ UINT ResourceIndex,
436 _Out_ D3D12_SHADER_INPUT_BIND_DESC * pDesc) PURE;
437
438 STDMETHOD_(ID3D12ShaderReflectionVariable *, GetVariableByName)(THIS_ _In_ LPCSTR Name) PURE;
439
440 STDMETHOD(GetResourceBindingDescByName)(THIS_ _In_ LPCSTR Name,
441 _Out_ D3D12_SHADER_INPUT_BIND_DESC * pDesc) PURE;
442
443 // Use D3D_RETURN_PARAMETER_INDEX to get description of the return value.
444 STDMETHOD_(ID3D12FunctionParameterReflection *, GetFunctionParameter)(THIS_ _In_ INT ParameterIndex) PURE;
445};
446
447// {EC25F42D-7006-4F2B-B33E-02CC3375733F}
448interface DECLSPEC_UUID("EC25F42D-7006-4F2B-B33E-02CC3375733F") ID3D12FunctionParameterReflection;
449DEFINE_GUID(IID_ID3D12FunctionParameterReflection,
4500xec25f42d, 0x7006, 0x4f2b, 0xb3, 0x3e, 0x2, 0xcc, 0x33, 0x75, 0x73, 0x3f);
451
452#undef INTERFACE
453#define INTERFACE ID3D12FunctionParameterReflection
454
455DECLARE_INTERFACE(ID3D12FunctionParameterReflection)
456{
457 STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_PARAMETER_DESC * pDesc) PURE;
458};
459
460
461//////////////////////////////////////////////////////////////////////////////
462// APIs //////////////////////////////////////////////////////////////////////
463//////////////////////////////////////////////////////////////////////////////
464
465#ifdef __cplusplus
466extern "C" {
467#endif //__cplusplus
468
469#ifdef __cplusplus
470}
471#endif //__cplusplus
472
473#endif //__D3D12SHADER_H__
474