RetroArch
d3d10shader.h
Go to the documentation of this file.
1 //
3 // Copyright (c) Microsoft Corporation. All rights reserved.
4 //
5 // File: D3D10Shader.h
6 // Content: D3D10 Shader Types and APIs
7 //
9 
10 #ifndef __D3D10SHADER_H__
11 #define __D3D10SHADER_H__
12 
13 
14 #include "d3d10.h"
15 
16 /*#include <winapifamily.h>*/
17 
18 /*#pragma region Desktop Family*/
19 /*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/
20 
21 
22 //---------------------------------------------------------------------------
23 // D3D10_TX_VERSION:
24 // --------------
25 // Version token used to create a procedural texture filler in effects
26 // Used by D3D10Fill[]TX functions
27 //---------------------------------------------------------------------------
28 #define D3D10_TX_VERSION(_Major,_Minor) (('T' << 24) | ('X' << 16) | ((_Major) << 8) | (_Minor))
29 
30 
31 //----------------------------------------------------------------------------
32 // D3D10SHADER flags:
33 // -----------------
34 // D3D10_SHADER_DEBUG
35 // Insert debug file/line/type/symbol information.
36 //
37 // D3D10_SHADER_SKIP_VALIDATION
38 // Do not validate the generated code against known capabilities and
39 // constraints. This option is only recommended when compiling shaders
40 // you KNOW will work. (ie. have compiled before without this option.)
41 // Shaders are always validated by D3D before they are set to the device.
42 //
43 // D3D10_SHADER_SKIP_OPTIMIZATION
44 // Instructs the compiler to skip optimization steps during code generation.
45 // Unless you are trying to isolate a problem in your code using this option
46 // is not recommended.
47 //
48 // D3D10_SHADER_PACK_MATRIX_ROW_MAJOR
49 // Unless explicitly specified, matrices will be packed in row-major order
50 // on input and output from the shader.
51 //
52 // D3D10_SHADER_PACK_MATRIX_COLUMN_MAJOR
53 // Unless explicitly specified, matrices will be packed in column-major
54 // order on input and output from the shader. This is generally more
55 // efficient, since it allows vector-matrix multiplication to be performed
56 // using a series of dot-products.
57 //
58 // D3D10_SHADER_PARTIAL_PRECISION
59 // Force all computations in resulting shader to occur at partial precision.
60 // This may result in faster evaluation of shaders on some hardware.
61 //
62 // D3D10_SHADER_FORCE_VS_SOFTWARE_NO_OPT
63 // Force compiler to compile against the next highest available software
64 // target for vertex shaders. This flag also turns optimizations off,
65 // and debugging on.
66 //
67 // D3D10_SHADER_FORCE_PS_SOFTWARE_NO_OPT
68 // Force compiler to compile against the next highest available software
69 // target for pixel shaders. This flag also turns optimizations off,
70 // and debugging on.
71 //
72 // D3D10_SHADER_NO_PRESHADER
73 // Disables Preshaders. Using this flag will cause the compiler to not
74 // pull out static expression for evaluation on the host cpu
75 //
76 // D3D10_SHADER_AVOID_FLOW_CONTROL
77 // Hint compiler to avoid flow-control constructs where possible.
78 //
79 // D3D10_SHADER_PREFER_FLOW_CONTROL
80 // Hint compiler to prefer flow-control constructs where possible.
81 //
82 // D3D10_SHADER_ENABLE_STRICTNESS
83 // By default, the HLSL/Effect compilers are not strict on deprecated syntax.
84 // Specifying this flag enables the strict mode. Deprecated syntax may be
85 // removed in a future release, and enabling syntax is a good way to make sure
86 // your shaders comply to the latest spec.
87 //
88 // D3D10_SHADER_ENABLE_BACKWARDS_COMPATIBILITY
89 // This enables older shaders to compile to 4_0 targets.
90 //
91 //----------------------------------------------------------------------------
92 
93 #define D3D10_SHADER_DEBUG (1 << 0)
94 #define D3D10_SHADER_SKIP_VALIDATION (1 << 1)
95 #define D3D10_SHADER_SKIP_OPTIMIZATION (1 << 2)
96 #define D3D10_SHADER_PACK_MATRIX_ROW_MAJOR (1 << 3)
97 #define D3D10_SHADER_PACK_MATRIX_COLUMN_MAJOR (1 << 4)
98 #define D3D10_SHADER_PARTIAL_PRECISION (1 << 5)
99 #define D3D10_SHADER_FORCE_VS_SOFTWARE_NO_OPT (1 << 6)
100 #define D3D10_SHADER_FORCE_PS_SOFTWARE_NO_OPT (1 << 7)
101 #define D3D10_SHADER_NO_PRESHADER (1 << 8)
102 #define D3D10_SHADER_AVOID_FLOW_CONTROL (1 << 9)
103 #define D3D10_SHADER_PREFER_FLOW_CONTROL (1 << 10)
104 #define D3D10_SHADER_ENABLE_STRICTNESS (1 << 11)
105 #define D3D10_SHADER_ENABLE_BACKWARDS_COMPATIBILITY (1 << 12)
106 #define D3D10_SHADER_IEEE_STRICTNESS (1 << 13)
107 #define D3D10_SHADER_WARNINGS_ARE_ERRORS (1 << 18)
108 #define D3D10_SHADER_RESOURCES_MAY_ALIAS (1 << 19)
109 #define D3D10_ENABLE_UNBOUNDED_DESCRIPTOR_TABLES (1 << 20)
110 #define D3D10_ALL_RESOURCES_BOUND (1 << 21)
111 #define D3D10_SHADER_DEBUG_NAME_FOR_SOURCE (1 << 22)
112 #define D3D10_SHADER_DEBUG_NAME_FOR_BINARY (1 << 23)
113 
114 
115 // optimization level flags
116 #define D3D10_SHADER_OPTIMIZATION_LEVEL0 (1 << 14)
117 #define D3D10_SHADER_OPTIMIZATION_LEVEL1 0
118 #define D3D10_SHADER_OPTIMIZATION_LEVEL2 ((1 << 14) | (1 << 15))
119 #define D3D10_SHADER_OPTIMIZATION_LEVEL3 (1 << 15)
120 
121 
122 // Force root signature flags. (Passed in Flags2)
123 #define D3D10_SHADER_FLAGS2_FORCE_ROOT_SIGNATURE_LATEST 0
124 #define D3D10_SHADER_FLAGS2_FORCE_ROOT_SIGNATURE_1_0 (1 << 4)
125 #define D3D10_SHADER_FLAGS2_FORCE_ROOT_SIGNATURE_1_1 (1 << 5)
126 
127 
128 
129 
132 
133 
136 
139 
142 
145 
148 
151 
154 
156 
158 
160 
162 
163 // ID3D10Include has been made version-neutral and moved to d3dcommon.h.
164 typedef interface ID3DInclude ID3D10Include;
165 typedef interface ID3DInclude* LPD3D10INCLUDE;
166 #define IID_ID3D10Include IID_ID3DInclude
167 
168 
169 //----------------------------------------------------------------------------
170 // ID3D10ShaderReflection:
171 //----------------------------------------------------------------------------
172 
173 //
174 // Structure definitions
175 //
176 
177 typedef struct _D3D10_SHADER_DESC
178 {
179  UINT Version; // Shader version
180  LPCSTR Creator; // Creator string
181  UINT Flags; // Shader compilation/parse flags
182 
183  UINT ConstantBuffers; // Number of constant buffers
184  UINT BoundResources; // Number of bound resources
185  UINT InputParameters; // Number of parameters in the input signature
186  UINT OutputParameters; // Number of parameters in the output signature
187 
188  UINT InstructionCount; // Number of emitted instructions
189  UINT TempRegisterCount; // Number of temporary registers used
190  UINT TempArrayCount; // Number of temporary arrays used
191  UINT DefCount; // Number of constant defines
192  UINT DclCount; // Number of declarations (input + output)
193  UINT TextureNormalInstructions; // Number of non-categorized texture instructions
194  UINT TextureLoadInstructions; // Number of texture load instructions
195  UINT TextureCompInstructions; // Number of texture comparison instructions
196  UINT TextureBiasInstructions; // Number of texture bias instructions
197  UINT TextureGradientInstructions; // Number of texture gradient instructions
198  UINT FloatInstructionCount; // Number of floating point arithmetic instructions used
199  UINT IntInstructionCount; // Number of signed integer arithmetic instructions used
200  UINT UintInstructionCount; // Number of unsigned integer arithmetic instructions used
201  UINT StaticFlowControlCount; // Number of static flow control instructions used
202  UINT DynamicFlowControlCount; // Number of dynamic flow control instructions used
203  UINT MacroInstructionCount; // Number of macro instructions used
204  UINT ArrayInstructionCount; // Number of array instructions used
205  UINT CutInstructionCount; // Number of cut instructions used
206  UINT EmitInstructionCount; // Number of emit instructions used
207  D3D10_PRIMITIVE_TOPOLOGY GSOutputTopology; // Geometry shader output topology
208  UINT GSMaxOutputVertexCount; // Geometry shader maximum output vertex count
210 
212 {
213  LPCSTR Name; // Name of the constant buffer
214  D3D10_CBUFFER_TYPE Type; // Indicates that this is a CBuffer or TBuffer
215  UINT Variables; // Number of member variables
216  UINT Size; // Size of CB (in bytes)
217  UINT uFlags; // Buffer description flags
219 
221 {
222  LPCSTR Name; // Name of the variable
223  UINT StartOffset; // Offset in constant buffer's backing store
224  UINT Size; // Size of variable (in bytes)
225  UINT uFlags; // Variable flags
226  LPVOID DefaultValue; // Raw pointer to default value
228 
230 {
231  D3D10_SHADER_VARIABLE_CLASS Class; // Variable class (e.g. object, matrix, etc.)
232  D3D10_SHADER_VARIABLE_TYPE Type; // Variable type (e.g. float, sampler, etc.)
233  UINT Rows; // Number of rows (for matrices, 1 for other numeric, 0 if not applicable)
234  UINT Columns; // Number of columns (for vectors & matrices, 1 for other numeric, 0 if not applicable)
235  UINT Elements; // Number of elements (0 if not an array)
236  UINT Members; // Number of members (0 if not a structure)
237  UINT Offset; // Offset from the start of structure (0 if not a structure member)
239 
241 {
242  LPCSTR Name; // Name of the resource
243  D3D10_SHADER_INPUT_TYPE Type; // Type of resource (e.g. texture, cbuffer, etc.)
244  UINT BindPoint; // Starting bind point
245  UINT BindCount; // Number of contiguous bind points (for arrays)
246 
247  UINT uFlags; // Input binding flags
248  D3D10_RESOURCE_RETURN_TYPE ReturnType; // Return type (if texture)
249  D3D10_SRV_DIMENSION Dimension; // Dimension (if texture)
250  UINT NumSamples; // Number of samples (0 if not MS texture)
252 
254 {
255  LPCSTR SemanticName; // Name of the semantic
256  UINT SemanticIndex; // Index of the semantic
257  UINT Register; // Number of member variables
258  D3D10_NAME SystemValueType;// A predefined system value, or D3D10_NAME_UNDEFINED if not applicable
259  D3D10_REGISTER_COMPONENT_TYPE ComponentType;// Scalar type (e.g. uint, float, etc.)
260  BYTE Mask; // Mask to indicate which components of the register
261  // are used (combination of D3D10_COMPONENT_MASK values)
262  BYTE ReadWriteMask; // Mask to indicate whether a given component is
263  // never written (if this is an output signature) or
264  // always read (if this is an input signature).
265  // (combination of D3D10_COMPONENT_MASK values)
266 
268 
269 
270 //
271 // Interface definitions
272 //
273 
274 
275 
276 
279 
280 // {C530AD7D-9B16-4395-A979-BA2ECFF83ADD}
281 interface DECLSPEC_UUID("C530AD7D-9B16-4395-A979-BA2ECFF83ADD") ID3D10ShaderReflectionType;
282 DEFINE_GUID(IID_ID3D10ShaderReflectionType,
283 0xc530ad7d, 0x9b16, 0x4395, 0xa9, 0x79, 0xba, 0x2e, 0xcf, 0xf8, 0x3a, 0xdd);
284 
285 #undef INTERFACE
286 #define INTERFACE ID3D10ShaderReflectionType
287 
289 {
290  STDMETHOD(GetDesc)(THIS_ D3D10_SHADER_TYPE_DESC *pDesc) PURE;
291 
292  STDMETHOD_(ID3D10ShaderReflectionType*, GetMemberTypeByIndex)(THIS_ UINT Index) PURE;
293  STDMETHOD_(ID3D10ShaderReflectionType*, GetMemberTypeByName)(THIS_ LPCSTR Name) PURE;
294  STDMETHOD_(LPCSTR, GetMemberTypeName)(THIS_ UINT Index) PURE;
295 };
296 
299 
300 // {1BF63C95-2650-405d-99C1-3636BD1DA0A1}
301 interface DECLSPEC_UUID("1BF63C95-2650-405d-99C1-3636BD1DA0A1") ID3D10ShaderReflectionVariable;
302 DEFINE_GUID(IID_ID3D10ShaderReflectionVariable,
303 0x1bf63c95, 0x2650, 0x405d, 0x99, 0xc1, 0x36, 0x36, 0xbd, 0x1d, 0xa0, 0xa1);
304 
305 #undef INTERFACE
306 #define INTERFACE ID3D10ShaderReflectionVariable
307 
309 {
310  STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_SHADER_VARIABLE_DESC *pDesc) PURE;
311 
312  STDMETHOD_(ID3D10ShaderReflectionType*, GetType)(THIS) PURE;
313 };
314 
317 
318 // {66C66A94-DDDD-4b62-A66A-F0DA33C2B4D0}
319 interface DECLSPEC_UUID("66C66A94-DDDD-4b62-A66A-F0DA33C2B4D0") ID3D10ShaderReflectionConstantBuffer;
320 DEFINE_GUID(IID_ID3D10ShaderReflectionConstantBuffer,
321 0x66c66a94, 0xdddd, 0x4b62, 0xa6, 0x6a, 0xf0, 0xda, 0x33, 0xc2, 0xb4, 0xd0);
322 
323 #undef INTERFACE
324 #define INTERFACE ID3D10ShaderReflectionConstantBuffer
325 
327 {
328  STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_SHADER_BUFFER_DESC *pDesc) PURE;
329 
330  STDMETHOD_(ID3D10ShaderReflectionVariable*, GetVariableByIndex)(THIS_ UINT Index) PURE;
331  STDMETHOD_(ID3D10ShaderReflectionVariable*, GetVariableByName)(THIS_ LPCSTR Name) PURE;
332 };
333 
336 
337 // {D40E20B6-F8F7-42ad-AB20-4BAF8F15DFAA}
338 interface DECLSPEC_UUID("D40E20B6-F8F7-42ad-AB20-4BAF8F15DFAA") ID3D10ShaderReflection;
339 DEFINE_GUID(IID_ID3D10ShaderReflection,
340 0xd40e20b6, 0xf8f7, 0x42ad, 0xab, 0x20, 0x4b, 0xaf, 0x8f, 0x15, 0xdf, 0xaa);
341 
342 #undef INTERFACE
343 #define INTERFACE ID3D10ShaderReflection
344 
346 {
347  STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
348  STDMETHOD_(ULONG, AddRef)(THIS) PURE;
349  STDMETHOD_(ULONG, Release)(THIS) PURE;
350 
351  STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_SHADER_DESC *pDesc) PURE;
352 
353  STDMETHOD_(ID3D10ShaderReflectionConstantBuffer*, GetConstantBufferByIndex)(THIS_ UINT Index) PURE;
354  STDMETHOD_(ID3D10ShaderReflectionConstantBuffer*, GetConstantBufferByName)(THIS_ LPCSTR Name) PURE;
355 
356  STDMETHOD(GetResourceBindingDesc)(THIS_ UINT ResourceIndex, _Out_ D3D10_SHADER_INPUT_BIND_DESC *pDesc) PURE;
357 
358  STDMETHOD(GetInputParameterDesc)(THIS_ UINT ParameterIndex, _Out_ D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
359  STDMETHOD(GetOutputParameterDesc)(THIS_ UINT ParameterIndex, _Out_ D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
360 
361 };
362 
364 // APIs //////////////////////////////////////////////////////////////////////
366 
367 #ifdef __cplusplus
368 extern "C" {
369 #endif //__cplusplus
370 
371 //----------------------------------------------------------------------------
372 // D3D10CompileShader:
373 // ------------------
374 // Compiles a shader.
375 //
376 // Parameters:
377 // pSrcFile
378 // Source file name.
379 // hSrcModule
380 // Module handle. if NULL, current module will be used.
381 // pSrcResource
382 // Resource name in module.
383 // pSrcData
384 // Pointer to source code.
385 // SrcDataSize
386 // Size of source code, in bytes.
387 // pDefines
388 // Optional NULL-terminated array of preprocessor macro definitions.
389 // pInclude
390 // Optional interface pointer to use for handling #include directives.
391 // If this parameter is NULL, #includes will be honored when compiling
392 // from file, and will error when compiling from resource or memory.
393 // pFunctionName
394 // Name of the entrypoint function where execution should begin.
395 // pProfile
396 // Instruction set to be used when generating code. The D3D10 entry
397 // point currently supports only "vs_4_0", "ps_4_0", and "gs_4_0".
398 // Flags
399 // See D3D10_SHADER_xxx flags.
400 // ppShader
401 // Returns a buffer containing the created shader. This buffer contains
402 // the compiled shader code, as well as any embedded debug and symbol
403 // table info. (See D3D10GetShaderConstantTable)
404 // ppErrorMsgs
405 // Returns a buffer containing a listing of errors and warnings that were
406 // encountered during the compile. If you are running in a debugger,
407 // these are the same messages you will see in your debug output.
408 //----------------------------------------------------------------------------
409 
410 HRESULT WINAPI D3D10CompileShader(_In_reads_bytes_(SrcDataSize) LPCSTR pSrcData, SIZE_T SrcDataSize, _In_opt_ LPCSTR pFileName, _In_opt_ CONST D3D10_SHADER_MACRO* pDefines, _In_opt_ LPD3D10INCLUDE pInclude,
411  LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags, _Out_ ID3D10Blob** ppShader, _Out_opt_ ID3D10Blob** ppErrorMsgs);
412 
413 //----------------------------------------------------------------------------
414 // D3D10DisassembleShader:
415 // ----------------------
416 // Takes a binary shader, and returns a buffer containing text assembly.
417 //
418 // Parameters:
419 // pShader
420 // Pointer to the shader byte code.
421 // BytecodeLength
422 // Size of the shader byte code in bytes.
423 // EnableColorCode
424 // Emit HTML tags for color coding the output?
425 // pComments
426 // Pointer to a comment string to include at the top of the shader.
427 // ppDisassembly
428 // Returns a buffer containing the disassembled shader.
429 //----------------------------------------------------------------------------
430 
431 HRESULT WINAPI D3D10DisassembleShader(_In_reads_bytes_(BytecodeLength) CONST void *pShader, SIZE_T BytecodeLength, BOOL EnableColorCode, _In_opt_ LPCSTR pComments, _Out_ ID3D10Blob** ppDisassembly);
432 
433 
434 //----------------------------------------------------------------------------
435 // D3D10GetPixelShaderProfile/D3D10GetVertexShaderProfile/D3D10GetGeometryShaderProfile:
436 // -----------------------------------------------------
437 // Returns the name of the HLSL profile best suited to a given device.
438 //
439 // Parameters:
440 // pDevice
441 // Pointer to the device in question
442 //----------------------------------------------------------------------------
443 
444 LPCSTR WINAPI D3D10GetPixelShaderProfile(_In_ ID3D10Device *pDevice);
445 
446 LPCSTR WINAPI D3D10GetVertexShaderProfile(_In_ ID3D10Device *pDevice);
447 
448 LPCSTR WINAPI D3D10GetGeometryShaderProfile(_In_ ID3D10Device *pDevice);
449 
450 //----------------------------------------------------------------------------
451 // D3D10ReflectShader:
452 // ------------------
453 // Creates a shader reflection object that can be used to retrieve information
454 // about a compiled shader
455 //
456 // Parameters:
457 // pShaderBytecode
458 // Pointer to a compiled shader (same pointer that is passed into
459 // ID3D10Device::CreateShader)
460 // BytecodeLength
461 // Length of the shader bytecode buffer
462 // ppReflector
463 // [out] Returns a ID3D10ShaderReflection object that can be used to
464 // retrieve shader resource and constant buffer information
465 //
466 //----------------------------------------------------------------------------
467 
468 HRESULT WINAPI D3D10ReflectShader(_In_reads_bytes_(BytecodeLength) CONST void *pShaderBytecode, SIZE_T BytecodeLength, _Out_ ID3D10ShaderReflection **ppReflector);
469 
470 //----------------------------------------------------------------------------
471 // D3D10PreprocessShader
472 // ---------------------
473 // Creates a shader reflection object that can be used to retrieve information
474 // about a compiled shader
475 //
476 // Parameters:
477 // pSrcData
478 // Pointer to source code
479 // SrcDataSize
480 // Size of source code, in bytes
481 // pFileName
482 // Source file name (used for error output)
483 // pDefines
484 // Optional NULL-terminated array of preprocessor macro definitions.
485 // pInclude
486 // Optional interface pointer to use for handling #include directives.
487 // If this parameter is NULL, #includes will be honored when assembling
488 // from file, and will error when assembling from resource or memory.
489 // ppShaderText
490 // Returns a buffer containing a single large string that represents
491 // the resulting formatted token stream
492 // ppErrorMsgs
493 // Returns a buffer containing a listing of errors and warnings that were
494 // encountered during assembly. If you are running in a debugger,
495 // these are the same messages you will see in your debug output.
496 //----------------------------------------------------------------------------
497 
498 HRESULT WINAPI D3D10PreprocessShader(_In_reads_bytes_(SrcDataSize) LPCSTR pSrcData, SIZE_T SrcDataSize, _In_opt_ LPCSTR pFileName, _In_opt_ CONST D3D10_SHADER_MACRO* pDefines,
499  _In_opt_ LPD3D10INCLUDE pInclude, _Out_ ID3D10Blob** ppShaderText, _Out_opt_ ID3D10Blob** ppErrorMsgs);
500 
502 //
503 // Shader blob manipulation routines
504 // ---------------------------------
505 //
506 // void *pShaderBytecode - a buffer containing the result of an HLSL
507 // compilation. Typically this opaque buffer contains several
508 // discrete sections including the shader executable code, the input
509 // signature, and the output signature. This can typically be retrieved
510 // by calling ID3D10Blob::GetBufferPointer() on the returned blob
511 // from HLSL's compile APIs.
512 //
513 // UINT BytecodeLength - the length of pShaderBytecode. This can
514 // typically be retrieved by calling ID3D10Blob::GetBufferSize()
515 // on the returned blob from HLSL's compile APIs.
516 //
517 // ID3D10Blob **ppSignatureBlob(s) - a newly created buffer that
518 // contains only the signature portions of the original bytecode.
519 // This is a copy; the original bytecode is not modified. You may
520 // specify NULL for this parameter to have the bytecode validated
521 // for the presence of the corresponding signatures without actually
522 // copying them and creating a new blob.
523 //
524 // Returns E_INVALIDARG if any required parameters are NULL
525 // Returns E_FAIL is the bytecode is corrupt or missing signatures
526 // Returns S_OK on success
527 //
529 
530 HRESULT WINAPI D3D10GetInputSignatureBlob(_In_reads_bytes_(BytecodeLength) CONST void *pShaderBytecode, SIZE_T BytecodeLength, _Out_ ID3D10Blob **ppSignatureBlob);
531 HRESULT WINAPI D3D10GetOutputSignatureBlob(_In_reads_bytes_(BytecodeLength) CONST void *pShaderBytecode, SIZE_T BytecodeLength, _Out_ ID3D10Blob **ppSignatureBlob);
532 HRESULT WINAPI D3D10GetInputAndOutputSignatureBlob(_In_reads_bytes_(BytecodeLength) CONST void *pShaderBytecode, SIZE_T BytecodeLength, _Out_ ID3D10Blob **ppSignatureBlob);
533 
534 //----------------------------------------------------------------------------
535 // D3D10GetShaderDebugInfo:
536 // -----------------------
537 // Gets shader debug info. Debug info is generated by D3D10CompileShader and is
538 // embedded in the body of the shader.
539 //
540 // Parameters:
541 // pShaderBytecode
542 // Pointer to the function bytecode
543 // BytecodeLength
544 // Length of the shader bytecode buffer
545 // ppDebugInfo
546 // Buffer used to return debug info. For information about the layout
547 // of this buffer, see definition of D3D10_SHADER_DEBUG_INFO above.
548 //----------------------------------------------------------------------------
549 
550 HRESULT WINAPI D3D10GetShaderDebugInfo(_In_reads_bytes_(BytecodeLength) CONST void *pShaderBytecode, SIZE_T BytecodeLength, _Out_ ID3D10Blob** ppDebugInfo);
551 
552 #ifdef __cplusplus
553 }
554 #endif //__cplusplus
555 
556 /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
557 /*#pragma endregion*/
558 
559 #endif //__D3D10SHADER_H__
560 
enum _D3D_SHADER_VARIABLE_CLASS D3D_SHADER_VARIABLE_CLASS
DECLARE_INTERFACE_(ID3D10ShaderReflection, IUnknown)
Definition: d3d10shader.h:345
D3D10_SHADER_INPUT_TYPE * LPD3D10_SHADER_INPUT_TYPE
Definition: d3d10shader.h:147
UINT ConstantBuffers
Definition: d3d10shader.h:183
UINT uFlags
Definition: d3d10shader.h:225
UINT Size
Definition: d3d10shader.h:224
interface ID3D10ShaderReflectionConstantBuffer * LPD3D10SHADERREFLECTIONCONSTANTBUFFER
Definition: d3d10shader.h:316
interface ID3D10ShaderReflectionType ID3D10ShaderReflectionType
Definition: d3d10shader.h:277
UINT Size
Definition: d3d10shader.h:216
Definition: d3d10shader.h:211
D3D_SHADER_INPUT_TYPE D3D10_SHADER_INPUT_TYPE
Definition: d3d10shader.h:146
interface ID3D10ShaderReflection * LPD3D10SHADERREFLECTION
Definition: d3d10shader.h:335
D3D10_SHADER_VARIABLE_CLASS Class
Definition: d3d10shader.h:231
LPCSTR SemanticName
Definition: d3d10shader.h:255
LPCSTR WINAPI D3D10GetPixelShaderProfile(_In_ ID3D10Device *pDevice)
struct _D3D10_SHADER_VARIABLE_DESC D3D10_SHADER_VARIABLE_DESC
Definition: d3d10shader.h:240
BYTE Mask
Definition: d3d10shader.h:260
UINT DefCount
Definition: d3d10shader.h:191
LPCSTR Name
Definition: d3d10shader.h:213
D3D10_SHADER_VARIABLE_CLASS * LPD3D10_SHADER_VARIABLE_CLASS
Definition: d3d10shader.h:135
interface ID3D10ShaderReflectionVariable * LPD3D10SHADERREFLECTIONVARIABLE
Definition: d3d10shader.h:298
HRESULT WINAPI D3D10ReflectShader(_In_reads_bytes_(BytecodeLength) CONST void *pShaderBytecode, SIZE_T BytecodeLength, _Out_ ID3D10ShaderReflection **ppReflector)
struct _D3D10_SHADER_DESC D3D10_SHADER_DESC
interface ID3D10ShaderReflectionType * LPD3D10SHADERREFLECTIONTYPE
Definition: d3d10shader.h:278
Definition: d3dcommon.h:344
enum _D3D_SHADER_VARIABLE_FLAGS D3D_SHADER_VARIABLE_FLAGS
D3D_SHADER_VARIABLE_CLASS D3D10_SHADER_VARIABLE_CLASS
Definition: d3d10shader.h:134
D3D_SHADER_INPUT_FLAGS D3D10_SHADER_INPUT_FLAGS
Definition: d3d10shader.h:143
Definition: d3d10shader.h:177
UINT GSMaxOutputVertexCount
Definition: d3d10shader.h:208
UINT Version
Definition: d3d10shader.h:179
HRESULT WINAPI D3D10GetOutputSignatureBlob(_In_reads_bytes_(BytecodeLength) CONST void *pShaderBytecode, SIZE_T BytecodeLength, _Out_ ID3D10Blob **ppSignatureBlob)
D3D_NAME
Definition: d3dcommon.h:805
HRESULT WINAPI D3D10CompileShader(_In_reads_bytes_(SrcDataSize) LPCSTR pSrcData, SIZE_T SrcDataSize, _In_opt_ LPCSTR pFileName, _In_opt_ CONST D3D10_SHADER_MACRO *pDefines, _In_opt_ LPD3D10INCLUDE pInclude, LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags, _Out_ ID3D10Blob **ppShader, _Out_opt_ ID3D10Blob **ppErrorMsgs)
UINT TempRegisterCount
Definition: d3d10shader.h:189
D3D10_SHADER_VARIABLE_TYPE Type
Definition: d3d10shader.h:232
UINT CutInstructionCount
Definition: d3d10shader.h:205
UINT BoundResources
Definition: d3d10shader.h:184
LPCSTR Name
Definition: d3d10shader.h:222
typedef HRESULT(WINAPI *PFN_D3D12_SERIALIZE_ROOT_SIGNATURE)(_In_ const D3D12_ROOT_SIGNATURE_DESC *pRootSignature
UINT TempArrayCount
Definition: d3d10shader.h:190
DEFINE_GUID(IID_ID3D10ShaderReflectionType, 0xc530ad7d, 0x9b16, 0x4395, 0xa9, 0x79, 0xba, 0x2e, 0xcf, 0xf8, 0x3a, 0xdd)
LPCSTR WINAPI D3D10GetVertexShaderProfile(_In_ ID3D10Device *pDevice)
interface ID3D10Blob ID3D10Blob
Definition: d3dcommon.h:44
UINT BindPoint
Definition: d3d10shader.h:244
BYTE ReadWriteMask
Definition: d3d10shader.h:262
LPCSTR WINAPI D3D10GetGeometryShaderProfile(_In_ ID3D10Device *pDevice)
struct _D3D10_SHADER_TYPE_DESC D3D10_SHADER_TYPE_DESC
UINT ArrayInstructionCount
Definition: d3d10shader.h:204
UINT uFlags
Definition: d3d10shader.h:247
HRESULT WINAPI D3D10GetShaderDebugInfo(_In_reads_bytes_(BytecodeLength) CONST void *pShaderBytecode, SIZE_T BytecodeLength, _Out_ ID3D10Blob **ppDebugInfo)
interface ID3D10ShaderReflection ID3D10ShaderReflection
Definition: d3d10shader.h:332
LPCSTR Name
Definition: d3d10shader.h:242
UINT TextureNormalInstructions
Definition: d3d10shader.h:193
UINT NumSamples
Definition: d3d10shader.h:250
D3D_SHADER_VARIABLE_FLAGS D3D10_SHADER_VARIABLE_FLAGS
Definition: d3d10shader.h:137
interface ID3DInclude ID3D10Include
Definition: d3d10shader.h:164
UINT UintInstructionCount
Definition: d3d10shader.h:200
D3D_REGISTER_COMPONENT_TYPE
Definition: d3dcommon.h:887
Definition: d3d10shader.h:229
UINT Columns
Definition: d3d10shader.h:234
UINT Offset
Definition: d3d10shader.h:237
interface DECLSPEC_UUID("C530AD7D-9B16-4395-A979-BA2ECFF83ADD") ID3D10ShaderReflectionType
D3D10_NAME SystemValueType
Definition: d3d10shader.h:258
DECLARE_INTERFACE(ID3D10ShaderReflectionType)
Definition: d3d10shader.h:288
D3D10_SHADER_INPUT_FLAGS * LPD3D10_SHADER_INPUT_FLAGS
Definition: d3d10shader.h:144
D3D_REGISTER_COMPONENT_TYPE D3D10_REGISTER_COMPONENT_TYPE
Definition: d3d10shader.h:159
D3D_SHADER_MACRO D3D10_SHADER_MACRO
Definition: d3d10shader.h:130
UINT Variables
Definition: d3d10shader.h:215
UINT uFlags
Definition: d3d10shader.h:217
UINT SemanticIndex
Definition: d3d10shader.h:256
UINT Elements
Definition: d3d10shader.h:235
Definition: d3d10shader.h:253
D3D10_CBUFFER_TYPE Type
Definition: d3d10shader.h:214
struct _D3D10_SIGNATURE_PARAMETER_DESC D3D10_SIGNATURE_PARAMETER_DESC
D3D_SRV_DIMENSION
Definition: d3dcommon.h:294
Definition: d3d10shader.h:220
D3D_CBUFFER_TYPE D3D10_CBUFFER_TYPE
Definition: d3d10shader.h:152
D3D_NAME D3D10_NAME
Definition: d3d10shader.h:155
D3D10_SHADER_VARIABLE_TYPE * LPD3D10_SHADER_VARIABLE_TYPE
Definition: d3d10shader.h:141
UINT Flags
Definition: d3d10shader.h:181
LPCSTR Creator
Definition: d3d10shader.h:180
D3D10_SHADER_MACRO * LPD3D10_SHADER_MACRO
Definition: d3d10shader.h:131
enum _D3D_SHADER_INPUT_FLAGS D3D_SHADER_INPUT_FLAGS
interface ID3D10ShaderReflectionConstantBuffer ID3D10ShaderReflectionConstantBuffer
Definition: d3d10shader.h:313
interface ID3DInclude * LPD3D10INCLUDE
Definition: d3d10shader.h:165
D3D10_REGISTER_COMPONENT_TYPE ComponentType
Definition: d3d10shader.h:259
D3D10_SHADER_CBUFFER_FLAGS * LPD3D10_SHADER_CBUFFER_FLAGS
Definition: d3d10shader.h:150
interface ID3D10ShaderReflectionVariable ID3D10ShaderReflectionVariable
Definition: d3d10shader.h:295
UINT Rows
Definition: d3d10shader.h:233
UINT MacroInstructionCount
Definition: d3d10shader.h:203
enum _D3D_SHADER_INPUT_TYPE D3D_SHADER_INPUT_TYPE
struct _D3D10_SHADER_BUFFER_DESC D3D10_SHADER_BUFFER_DESC
interface ID3D10Device ID3D10Device
Definition: d3d10.h:203
UINT Members
Definition: d3d10shader.h:236
enum _D3D_CBUFFER_TYPE D3D_CBUFFER_TYPE
static INLINE ULONG Release(void *object)
Definition: dxgi_common.h:253
unsigned int BOOL
Definition: gctypes.h:51
UINT DynamicFlowControlCount
Definition: d3d10shader.h:202
enum _D3D_SHADER_CBUFFER_FLAGS D3D_SHADER_CBUFFER_FLAGS
D3D_SHADER_VARIABLE_TYPE D3D10_SHADER_VARIABLE_TYPE
Definition: d3d10shader.h:140
D3D_SHADER_CBUFFER_FLAGS D3D10_SHADER_CBUFFER_FLAGS
Definition: d3d10shader.h:149
enum _D3D_SHADER_VARIABLE_TYPE D3D_SHADER_VARIABLE_TYPE
D3D_PRIMITIVE_TOPOLOGY
Definition: d3dcommon.h:108
UINT TextureBiasInstructions
Definition: d3d10shader.h:196
HRESULT WINAPI D3D10GetInputSignatureBlob(_In_reads_bytes_(BytecodeLength) CONST void *pShaderBytecode, SIZE_T BytecodeLength, _Out_ ID3D10Blob **ppSignatureBlob)
D3D_RESOURCE_RETURN_TYPE
Definition: d3dcommon.h:860
D3D10_SHADER_VARIABLE_FLAGS * LPD3D10_SHADER_VARIABLE_FLAGS
Definition: d3d10shader.h:138
D3D10_RESOURCE_RETURN_TYPE ReturnType
Definition: d3d10shader.h:248
Definition: glslang_tab.cpp:136
D3D_INCLUDE_TYPE D3D10_INCLUDE_TYPE
Definition: d3d10shader.h:161
struct _D3D10_SHADER_INPUT_BIND_DESC D3D10_SHADER_INPUT_BIND_DESC
UINT BindCount
Definition: d3d10shader.h:245
UINT TextureCompInstructions
Definition: d3d10shader.h:195
UINT IntInstructionCount
Definition: d3d10shader.h:199
UINT DclCount
Definition: d3d10shader.h:192
HRESULT WINAPI D3D10PreprocessShader(_In_reads_bytes_(SrcDataSize) LPCSTR pSrcData, SIZE_T SrcDataSize, _In_opt_ LPCSTR pFileName, _In_opt_ CONST D3D10_SHADER_MACRO *pDefines, _In_opt_ LPD3D10INCLUDE pInclude, _Out_ ID3D10Blob **ppShaderText, _Out_opt_ ID3D10Blob **ppErrorMsgs)
Definition: glslang_tab.cpp:133
UINT StartOffset
Definition: d3d10shader.h:223
UINT TextureGradientInstructions
Definition: d3d10shader.h:197
UINT OutputParameters
Definition: d3d10shader.h:186
UINT StaticFlowControlCount
Definition: d3d10shader.h:201
enum _D3D_INCLUDE_TYPE D3D_INCLUDE_TYPE
UINT EmitInstructionCount
Definition: d3d10shader.h:206
UINT InputParameters
Definition: d3d10shader.h:185
UINT FloatInstructionCount
Definition: d3d10shader.h:198
UINT Register
Definition: d3d10shader.h:257
UINT InstructionCount
Definition: d3d10shader.h:188
static const unsigned char ad[]
Definition: ccm.c:369
D3D10_SHADER_INPUT_TYPE Type
Definition: d3d10shader.h:243
D3D_RESOURCE_RETURN_TYPE D3D10_RESOURCE_RETURN_TYPE
Definition: d3d10shader.h:157
HRESULT WINAPI D3D10DisassembleShader(_In_reads_bytes_(BytecodeLength) CONST void *pShader, SIZE_T BytecodeLength, BOOL EnableColorCode, _In_opt_ LPCSTR pComments, _Out_ ID3D10Blob **ppDisassembly)
D3D10_PRIMITIVE_TOPOLOGY GSOutputTopology
Definition: d3d10shader.h:207
D3D10_SRV_DIMENSION Dimension
Definition: d3d10shader.h:249
LPVOID DefaultValue
Definition: d3d10shader.h:226
D3D10_CBUFFER_TYPE * LPD3D10_CBUFFER_TYPE
Definition: d3d10shader.h:153
UINT TextureLoadInstructions
Definition: d3d10shader.h:194
HRESULT WINAPI D3D10GetInputAndOutputSignatureBlob(_In_reads_bytes_(BytecodeLength) CONST void *pShaderBytecode, SIZE_T BytecodeLength, _Out_ ID3D10Blob **ppSignatureBlob)
interface ID3DInclude ID3DInclude
Definition: d3dcommon.h:575