yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Ellie HermaszewskaEnable SLANG_ENABLE_DXIL_SUPPORT on non-Windows platforms (#2750)5a629b3cc

master
36.1 KiB807 linesraw
1
2///////////////////////////////////////////////////////////////////////////////
3//                                                                           //
4// dxcapi.h                                                                  //
5// Copyright (C) Microsoft Corporation. All rights reserved.                 //
6// This file is distributed under the University of Illinois Open Source     //
7// License. See LICENSE.TXT for details.                                     //
8//                                                                           //
9// Provides declarations for the DirectX Compiler API entry point.           //
10//                                                                           //
11///////////////////////////////////////////////////////////////////////////////
12
13#ifndef __DXC_API__
14#define __DXC_API__
15
16#ifdef _WIN32
17#ifndef DXC_API_IMPORT
18#define DXC_API_IMPORT __declspec(dllimport)
19#endif
20#else
21#ifndef DXC_API_IMPORT
22#define DXC_API_IMPORT __attribute__ ((visibility ("default")))
23#endif
24#endif
25
26#ifdef _WIN32
27
28#ifndef CROSS_PLATFORM_UUIDOF
29// Warning: This macro exists in WinAdapter.h as well
30#define CROSS_PLATFORM_UUIDOF(interface, spec)                                 \
31  struct __declspec(uuid(spec)) interface;
32#endif
33
34#else
35
36#include <dlfcn.h>
37#include "WinAdapter.h"
38#endif
39
40struct IMalloc;
41
42struct IDxcIncludeHandler;
43
44typedef HRESULT (__stdcall *DxcCreateInstanceProc)(
45    _In_ REFCLSID   rclsid,
46    _In_ REFIID     riid,
47    _Out_ LPVOID*   ppv
48);
49
50typedef HRESULT(__stdcall *DxcCreateInstance2Proc)(
51  _In_ IMalloc    *pMalloc,
52  _In_ REFCLSID   rclsid,
53  _In_ REFIID     riid,
54  _Out_ LPVOID*   ppv
55  );
56
57/// <summary>
58/// Creates a single uninitialized object of the class associated with a specified CLSID.
59/// </summary>
60/// <param name="rclsid">
61/// The CLSID associated with the data and code that will be used to create the object.
62/// </param>
63/// <param name="riid">
64/// A reference to the identifier of the interface to be used to communicate
65/// with the object.
66/// </param>
67/// <param name="ppv">
68/// Address of pointer variable that receives the interface pointer requested
69/// in riid. Upon successful return, *ppv contains the requested interface
70/// pointer. Upon failure, *ppv contains NULL.</param>
71/// <remarks>
72/// While this function is similar to CoCreateInstance, there is no COM involvement.
73/// </remarks>
74
75extern "C"
76DXC_API_IMPORT HRESULT __stdcall DxcCreateInstance(
77  _In_ REFCLSID   rclsid,
78  _In_ REFIID     riid,
79  _Out_ LPVOID*   ppv
80  );
81
82extern "C"
83DXC_API_IMPORT HRESULT __stdcall DxcCreateInstance2(
84  _In_ IMalloc    *pMalloc,
85  _In_ REFCLSID   rclsid,
86  _In_ REFIID     riid,
87  _Out_ LPVOID*   ppv
88);
89
90// For convenience, equivalent definitions to CP_UTF8 and CP_UTF16.
91#define DXC_CP_UTF8 65001
92#define DXC_CP_UTF16 1200
93#define DXC_CP_UTF32 12000
94// Use DXC_CP_ACP for: Binary;  ANSI Text;  Autodetect UTF with BOM
95#define DXC_CP_ACP 0
96
97#ifdef _WIN32
98#define DXC_CP_WIDE DXC_CP_UTF16
99#else
100#define DXC_CP_WIDE DXC_CP_UTF32
101#endif
102
103// This flag indicates that the shader hash was computed taking into account source information (-Zss)
104#define DXC_HASHFLAG_INCLUDES_SOURCE  1
105
106// Hash digest type for ShaderHash
107typedef struct DxcShaderHash {
108  UINT32 Flags; // DXC_HASHFLAG_*
109  BYTE HashDigest[16];
110} DxcShaderHash;
111
112#define DXC_FOURCC(ch0, ch1, ch2, ch3) (                     \
113  (UINT32)(UINT8)(ch0)        | (UINT32)(UINT8)(ch1) << 8  | \
114  (UINT32)(UINT8)(ch2) << 16  | (UINT32)(UINT8)(ch3) << 24   \
115  )
116#define DXC_PART_PDB                      DXC_FOURCC('I', 'L', 'D', 'B')
117#define DXC_PART_PDB_NAME                 DXC_FOURCC('I', 'L', 'D', 'N')
118#define DXC_PART_PRIVATE_DATA             DXC_FOURCC('P', 'R', 'I', 'V')
119#define DXC_PART_ROOT_SIGNATURE           DXC_FOURCC('R', 'T', 'S', '0')
120#define DXC_PART_DXIL                     DXC_FOURCC('D', 'X', 'I', 'L')
121#define DXC_PART_REFLECTION_DATA          DXC_FOURCC('S', 'T', 'A', 'T')
122#define DXC_PART_SHADER_HASH              DXC_FOURCC('H', 'A', 'S', 'H')
123#define DXC_PART_INPUT_SIGNATURE          DXC_FOURCC('I', 'S', 'G', '1')
124#define DXC_PART_OUTPUT_SIGNATURE         DXC_FOURCC('O', 'S', 'G', '1')
125#define DXC_PART_PATCH_CONSTANT_SIGNATURE DXC_FOURCC('P', 'S', 'G', '1')
126
127// Some option arguments are defined here for continuity with D3DCompile interface
128#define DXC_ARG_DEBUG L"-Zi"
129#define DXC_ARG_SKIP_VALIDATION L"-Vd"
130#define DXC_ARG_SKIP_OPTIMIZATIONS L"-Od"
131#define DXC_ARG_PACK_MATRIX_ROW_MAJOR L"-Zpr"
132#define DXC_ARG_PACK_MATRIX_COLUMN_MAJOR L"-Zpc"
133#define DXC_ARG_AVOID_FLOW_CONTROL L"-Gfa"
134#define DXC_ARG_PREFER_FLOW_CONTROL L"-Gfp"
135#define DXC_ARG_ENABLE_STRICTNESS L"-Ges"
136#define DXC_ARG_ENABLE_BACKWARDS_COMPATIBILITY L"-Gec"
137#define DXC_ARG_IEEE_STRICTNESS L"-Gis"
138#define DXC_ARG_OPTIMIZATION_LEVEL0 L"-O0"
139#define DXC_ARG_OPTIMIZATION_LEVEL1 L"-O1"
140#define DXC_ARG_OPTIMIZATION_LEVEL2 L"-O2"
141#define DXC_ARG_OPTIMIZATION_LEVEL3 L"-O3"
142#define DXC_ARG_WARNINGS_ARE_ERRORS L"-WX"
143#define DXC_ARG_RESOURCES_MAY_ALIAS L"-res_may_alias"
144#define DXC_ARG_ALL_RESOURCES_BOUND L"-all_resources_bound"
145#define DXC_ARG_DEBUG_NAME_FOR_SOURCE L"-Zss"
146#define DXC_ARG_DEBUG_NAME_FOR_BINARY L"-Zsb"
147
148// IDxcBlob is an alias of ID3D10Blob and ID3DBlob
149CROSS_PLATFORM_UUIDOF(IDxcBlob, "8BA5FB08-5195-40e2-AC58-0D989C3A0102")
150struct IDxcBlob : public IUnknown {
151public:
152  virtual LPVOID STDMETHODCALLTYPE GetBufferPointer(void) = 0;
153  virtual SIZE_T STDMETHODCALLTYPE GetBufferSize(void) = 0;
154};
155
156CROSS_PLATFORM_UUIDOF(IDxcBlobEncoding, "7241d424-2646-4191-97c0-98e96e42fc68")
157struct IDxcBlobEncoding : public IDxcBlob {
158public:
159  virtual HRESULT STDMETHODCALLTYPE GetEncoding(_Out_ BOOL *pKnown,
160                                                _Out_ UINT32 *pCodePage) = 0;
161};
162
163// Notes on IDxcBlobWide and IDxcBlobUtf8
164// These guarantee null-terminated text and eithre utf8 or the native wide char encoding.
165// GetBufferSize() will return the size in bytes, including null-terminator
166// GetStringLength() will return the length in characters, excluding the null-terminator
167// Name strings will use IDxcBlobWide, while other string output blobs,
168// such as errors/warnings, preprocessed HLSL, or other text will be based
169// on the -encoding option.
170
171// The API will use this interface for output name strings
172CROSS_PLATFORM_UUIDOF(IDxcBlobWide, "A3F84EAB-0FAA-497E-A39C-EE6ED60B2D84")
173struct IDxcBlobWide : public IDxcBlobEncoding {
174public:
175  virtual LPCWSTR STDMETHODCALLTYPE GetStringPointer(void) = 0;
176  virtual SIZE_T STDMETHODCALLTYPE GetStringLength(void) = 0;
177};
178CROSS_PLATFORM_UUIDOF(IDxcBlobUtf8, "3DA636C9-BA71-4024-A301-30CBF125305B")
179struct IDxcBlobUtf8 : public IDxcBlobEncoding {
180public:
181  virtual LPCSTR STDMETHODCALLTYPE GetStringPointer(void) = 0;
182  virtual SIZE_T STDMETHODCALLTYPE GetStringLength(void) = 0;
183};
184
185// Define legacy name IDxcBlobUtf16 as IDxcBlobWide for Win32
186#ifdef _WIN32
187typedef IDxcBlobWide IDxcBlobUtf16;
188#endif
189
190CROSS_PLATFORM_UUIDOF(IDxcIncludeHandler, "7f61fc7d-950d-467f-b3e3-3c02fb49187c")
191struct IDxcIncludeHandler : public IUnknown {
192  virtual HRESULT STDMETHODCALLTYPE LoadSource(
193    _In_z_ LPCWSTR pFilename,                                 // Candidate filename.
194    _COM_Outptr_result_maybenull_ IDxcBlob **ppIncludeSource  // Resultant source object for included file, nullptr if not found.
195    ) = 0;
196};
197
198// Structure for supplying bytes or text input to Dxc APIs.
199// Use Encoding = 0 for non-text bytes, ANSI text, or unknown with BOM.
200typedef struct DxcBuffer {
201  LPCVOID Ptr;
202  SIZE_T Size;
203  UINT Encoding;
204} DxcText;
205
206struct DxcDefine {
207  LPCWSTR Name;
208  _Maybenull_ LPCWSTR Value;
209};
210
211CROSS_PLATFORM_UUIDOF(IDxcCompilerArgs, "73EFFE2A-70DC-45F8-9690-EFF64C02429D")
212struct IDxcCompilerArgs : public IUnknown {
213  // Pass GetArguments() and GetCount() to Compile
214  virtual LPCWSTR* STDMETHODCALLTYPE GetArguments() = 0;
215  virtual UINT32 STDMETHODCALLTYPE GetCount() = 0;
216
217  // Add additional arguments or defines here, if desired.
218  virtual HRESULT STDMETHODCALLTYPE AddArguments(
219    _In_opt_count_(argCount) LPCWSTR *pArguments,       // Array of pointers to arguments to add
220    _In_ UINT32 argCount                                // Number of arguments to add
221  ) = 0;
222  virtual HRESULT STDMETHODCALLTYPE AddArgumentsUTF8(
223    _In_opt_count_(argCount)LPCSTR *pArguments,         // Array of pointers to UTF-8 arguments to add
224    _In_ UINT32 argCount                                // Number of arguments to add
225  ) = 0;
226  virtual HRESULT STDMETHODCALLTYPE AddDefines(
227      _In_count_(defineCount) const DxcDefine *pDefines, // Array of defines
228      _In_ UINT32 defineCount                            // Number of defines
229  ) = 0;
230};
231
232//////////////////////////
233// Legacy Interfaces
234/////////////////////////
235
236// NOTE: IDxcUtils replaces IDxcLibrary
237CROSS_PLATFORM_UUIDOF(IDxcLibrary, "e5204dc7-d18c-4c3c-bdfb-851673980fe7")
238struct IDxcLibrary : public IUnknown {
239  virtual HRESULT STDMETHODCALLTYPE SetMalloc(_In_opt_ IMalloc *pMalloc) = 0;
240  virtual HRESULT STDMETHODCALLTYPE CreateBlobFromBlob(
241    _In_ IDxcBlob *pBlob, UINT32 offset, UINT32 length, _COM_Outptr_ IDxcBlob **ppResult) = 0;
242  virtual HRESULT STDMETHODCALLTYPE CreateBlobFromFile(
243    _In_z_ LPCWSTR pFileName, _In_opt_ UINT32* codePage,
244    _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) = 0;
245  virtual HRESULT STDMETHODCALLTYPE CreateBlobWithEncodingFromPinned(
246    _In_bytecount_(size) LPCVOID pText, UINT32 size, UINT32 codePage,
247    _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) = 0;
248  virtual HRESULT STDMETHODCALLTYPE CreateBlobWithEncodingOnHeapCopy(
249    _In_bytecount_(size) LPCVOID pText, UINT32 size, UINT32 codePage,
250    _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) = 0;
251  virtual HRESULT STDMETHODCALLTYPE CreateBlobWithEncodingOnMalloc(
252    _In_bytecount_(size) LPCVOID pText, IMalloc *pIMalloc, UINT32 size, UINT32 codePage,
253    _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) = 0;
254  virtual HRESULT STDMETHODCALLTYPE CreateIncludeHandler(
255    _COM_Outptr_ IDxcIncludeHandler **ppResult) = 0;
256  virtual HRESULT STDMETHODCALLTYPE CreateStreamFromBlobReadOnly(
257    _In_ IDxcBlob *pBlob, _COM_Outptr_ IStream **ppStream) = 0;
258  virtual HRESULT STDMETHODCALLTYPE GetBlobAsUtf8(
259    _In_ IDxcBlob *pBlob, _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) = 0;
260
261  // Renamed from GetBlobAsUtf16 to GetBlobAsWide
262  virtual HRESULT STDMETHODCALLTYPE GetBlobAsWide(
263    _In_ IDxcBlob *pBlob, _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) = 0;
264
265#ifdef _WIN32
266  // Alias to GetBlobAsWide on Win32
267  inline HRESULT GetBlobAsUtf16(
268    _In_ IDxcBlob *pBlob, _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) {
269    return this->GetBlobAsWide(pBlob, pBlobEncoding);
270  }
271#endif
272};
273
274// NOTE: IDxcResult replaces IDxcOperationResult
275CROSS_PLATFORM_UUIDOF(IDxcOperationResult, "CEDB484A-D4E9-445A-B991-CA21CA157DC2")
276struct IDxcOperationResult : public IUnknown {
277  virtual HRESULT STDMETHODCALLTYPE GetStatus(_Out_ HRESULT *pStatus) = 0;
278
279  // GetResult returns the main result of the operation.
280  // This corresponds to:
281  // DXC_OUT_OBJECT - Compile() with shader or library target
282  // DXC_OUT_DISASSEMBLY - Disassemble()
283  // DXC_OUT_HLSL - Compile() with -P
284  // DXC_OUT_ROOT_SIGNATURE - Compile() with rootsig_* target
285  virtual HRESULT STDMETHODCALLTYPE GetResult(_COM_Outptr_result_maybenull_ IDxcBlob **ppResult) = 0;
286
287  // GetErrorBuffer Corresponds to DXC_OUT_ERRORS.
288  virtual HRESULT STDMETHODCALLTYPE GetErrorBuffer(_COM_Outptr_result_maybenull_ IDxcBlobEncoding **ppErrors) = 0;
289};
290
291// NOTE: IDxcCompiler3 replaces IDxcCompiler and IDxcCompiler2
292CROSS_PLATFORM_UUIDOF(IDxcCompiler, "8c210bf3-011f-4422-8d70-6f9acb8db617")
293struct IDxcCompiler : public IUnknown {
294  // Compile a single entry point to the target shader model
295  virtual HRESULT STDMETHODCALLTYPE Compile(
296    _In_ IDxcBlob *pSource,                       // Source text to compile
297    _In_opt_z_ LPCWSTR pSourceName,               // Optional file name for pSource. Used in errors and include handlers.
298    _In_opt_z_ LPCWSTR pEntryPoint,               // entry point name
299    _In_z_ LPCWSTR pTargetProfile,                // shader profile to compile
300    _In_opt_count_(argCount) LPCWSTR *pArguments, // Array of pointers to arguments
301    _In_ UINT32 argCount,                         // Number of arguments
302    _In_count_(defineCount)
303      const DxcDefine *pDefines,                  // Array of defines
304    _In_ UINT32 defineCount,                      // Number of defines
305    _In_opt_ IDxcIncludeHandler *pIncludeHandler, // user-provided interface to handle #include directives (optional)
306    _COM_Outptr_ IDxcOperationResult **ppResult   // Compiler output status, buffer, and errors
307  ) = 0;
308
309  // Preprocess source text
310  virtual HRESULT STDMETHODCALLTYPE Preprocess(
311    _In_ IDxcBlob *pSource,                       // Source text to preprocess
312    _In_opt_z_ LPCWSTR pSourceName,               // Optional file name for pSource. Used in errors and include handlers.
313    _In_opt_count_(argCount) LPCWSTR *pArguments, // Array of pointers to arguments
314    _In_ UINT32 argCount,                         // Number of arguments
315    _In_count_(defineCount)
316      const DxcDefine *pDefines,                  // Array of defines
317    _In_ UINT32 defineCount,                      // Number of defines
318    _In_opt_ IDxcIncludeHandler *pIncludeHandler, // user-provided interface to handle #include directives (optional)
319    _COM_Outptr_ IDxcOperationResult **ppResult   // Preprocessor output status, buffer, and errors
320  ) = 0;
321
322  // Disassemble a program.
323  virtual HRESULT STDMETHODCALLTYPE Disassemble(
324    _In_ IDxcBlob *pSource,                         // Program to disassemble.
325    _COM_Outptr_ IDxcBlobEncoding **ppDisassembly   // Disassembly text.
326    ) = 0;
327};
328
329// NOTE: IDxcCompiler3 replaces IDxcCompiler and IDxcCompiler2
330CROSS_PLATFORM_UUIDOF(IDxcCompiler2, "A005A9D9-B8BB-4594-B5C9-0E633BEC4D37")
331struct IDxcCompiler2 : public IDxcCompiler {
332  // Compile a single entry point to the target shader model with debug information.
333  virtual HRESULT STDMETHODCALLTYPE CompileWithDebug(
334    _In_ IDxcBlob *pSource,                       // Source text to compile
335    _In_opt_z_ LPCWSTR pSourceName,               // Optional file name for pSource. Used in errors and include handlers.
336    _In_opt_z_ LPCWSTR pEntryPoint,               // Entry point name
337    _In_z_ LPCWSTR pTargetProfile,                // Shader profile to compile
338    _In_opt_count_(argCount) LPCWSTR *pArguments, // Array of pointers to arguments
339    _In_ UINT32 argCount,                         // Number of arguments
340    _In_count_(defineCount)
341      const DxcDefine *pDefines,                  // Array of defines
342    _In_ UINT32 defineCount,                      // Number of defines
343    _In_opt_ IDxcIncludeHandler *pIncludeHandler, // user-provided interface to handle #include directives (optional)
344    _COM_Outptr_ IDxcOperationResult **ppResult,  // Compiler output status, buffer, and errors
345    _Outptr_opt_result_z_ LPWSTR *ppDebugBlobName,// Suggested file name for debug blob. (Must be CoTaskMemFree()'d!)
346    _COM_Outptr_opt_ IDxcBlob **ppDebugBlob       // Debug blob
347  ) = 0;
348};
349
350CROSS_PLATFORM_UUIDOF(IDxcLinker, "F1B5BE2A-62DD-4327-A1C2-42AC1E1E78E6")
351struct IDxcLinker : public IUnknown {
352public:
353  // Register a library with name to ref it later.
354  virtual HRESULT RegisterLibrary(
355    _In_opt_ LPCWSTR pLibName,          // Name of the library.
356    _In_ IDxcBlob *pLib                 // Library blob.
357  ) = 0;
358
359  // Links the shader and produces a shader blob that the Direct3D runtime can
360  // use.
361  virtual HRESULT STDMETHODCALLTYPE Link(
362    _In_opt_ LPCWSTR pEntryName,        // Entry point name
363    _In_ LPCWSTR pTargetProfile,        // shader profile to link
364    _In_count_(libCount)
365        const LPCWSTR *pLibNames,       // Array of library names to link
366    _In_ UINT32 libCount,               // Number of libraries to link
367    _In_opt_count_(argCount) const LPCWSTR *pArguments, // Array of pointers to arguments
368    _In_ UINT32 argCount,               // Number of arguments
369    _COM_Outptr_
370        IDxcOperationResult **ppResult  // Linker output status, buffer, and errors
371  ) = 0;
372};
373
374/////////////////////////
375// Latest interfaces. Please use these
376////////////////////////
377
378// NOTE: IDxcUtils replaces IDxcLibrary
379CROSS_PLATFORM_UUIDOF(IDxcUtils, "4605C4CB-2019-492A-ADA4-65F20BB7D67F")
380struct IDxcUtils : public IUnknown {
381  // Create a sub-blob that holds a reference to the outer blob and points to its memory.
382  virtual HRESULT STDMETHODCALLTYPE CreateBlobFromBlob(
383    _In_ IDxcBlob *pBlob, UINT32 offset, UINT32 length, _COM_Outptr_ IDxcBlob **ppResult) = 0;
384
385  // For codePage, use 0 (or DXC_CP_ACP) for raw binary or ANSI code page
386
387  // Creates a blob referencing existing memory, with no copy.
388  // User must manage the memory lifetime separately.
389  // (was: CreateBlobWithEncodingFromPinned)
390  virtual HRESULT STDMETHODCALLTYPE CreateBlobFromPinned(
391    _In_bytecount_(size) LPCVOID pData, UINT32 size, UINT32 codePage,
392    _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) = 0;
393
394  // Create blob, taking ownership of memory allocated with supplied allocator.
395  // (was: CreateBlobWithEncodingOnMalloc)
396  virtual HRESULT STDMETHODCALLTYPE MoveToBlob(
397    _In_bytecount_(size) LPCVOID pData, IMalloc *pIMalloc, UINT32 size, UINT32 codePage,
398    _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) = 0;
399
400  ////
401  // New blobs and copied contents are allocated with the current allocator
402
403  // Copy blob contents to memory owned by the new blob.
404  // (was: CreateBlobWithEncodingOnHeapCopy)
405  virtual HRESULT STDMETHODCALLTYPE CreateBlob(
406    _In_bytecount_(size) LPCVOID pData, UINT32 size, UINT32 codePage,
407    _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) = 0;
408
409  // (was: CreateBlobFromFile)
410  virtual HRESULT STDMETHODCALLTYPE LoadFile(
411    _In_z_ LPCWSTR pFileName, _In_opt_ UINT32* pCodePage,
412    _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) = 0;
413
414  virtual HRESULT STDMETHODCALLTYPE CreateReadOnlyStreamFromBlob(
415    _In_ IDxcBlob *pBlob, _COM_Outptr_ IStream **ppStream) = 0;
416
417  // Create default file-based include handler
418  virtual HRESULT STDMETHODCALLTYPE CreateDefaultIncludeHandler(
419    _COM_Outptr_ IDxcIncludeHandler **ppResult) = 0;
420
421  // Convert or return matching encoded text blobs
422  virtual HRESULT STDMETHODCALLTYPE GetBlobAsUtf8(
423    _In_ IDxcBlob *pBlob, _COM_Outptr_ IDxcBlobUtf8 **pBlobEncoding) = 0;
424
425  // Renamed from GetBlobAsUtf16 to GetBlobAsWide
426  virtual HRESULT STDMETHODCALLTYPE GetBlobAsWide(
427    _In_ IDxcBlob *pBlob, _COM_Outptr_ IDxcBlobWide **pBlobEncoding) = 0;
428
429#ifdef _WIN32
430  // Alias to GetBlobAsWide on Win32
431  inline HRESULT GetBlobAsUtf16(
432    _In_ IDxcBlob *pBlob, _COM_Outptr_ IDxcBlobWide **pBlobEncoding) {
433    return this->GetBlobAsWide(pBlob, pBlobEncoding);
434  }
435#endif
436
437  virtual HRESULT STDMETHODCALLTYPE GetDxilContainerPart(
438    _In_ const DxcBuffer *pShader,
439    _In_ UINT32 DxcPart,
440    _Outptr_result_nullonfailure_ void **ppPartData,
441    _Out_ UINT32 *pPartSizeInBytes) = 0;
442
443  // Create reflection interface from serialized Dxil container, or DXC_PART_REFLECTION_DATA.
444  // TBD: Require part header for RDAT?  (leaning towards yes)
445  virtual HRESULT STDMETHODCALLTYPE CreateReflection(
446    _In_ const DxcBuffer *pData, REFIID iid, void **ppvReflection) = 0;
447
448  virtual HRESULT STDMETHODCALLTYPE BuildArguments(
449    _In_opt_z_ LPCWSTR pSourceName,               // Optional file name for pSource. Used in errors and include handlers.
450    _In_opt_z_ LPCWSTR pEntryPoint,               // Entry point name. (-E)
451    _In_z_ LPCWSTR pTargetProfile,                // Shader profile to compile. (-T)
452    _In_opt_count_(argCount) LPCWSTR *pArguments, // Array of pointers to arguments
453    _In_ UINT32 argCount,                         // Number of arguments
454    _In_count_(defineCount)
455      const DxcDefine *pDefines,                  // Array of defines
456    _In_ UINT32 defineCount,                      // Number of defines
457    _COM_Outptr_ IDxcCompilerArgs **ppArgs        // Arguments you can use with Compile() method
458  ) = 0;
459
460  // Takes the shader PDB and returns the hash and the container inside it
461  virtual HRESULT STDMETHODCALLTYPE GetPDBContents(
462    _In_ IDxcBlob *pPDBBlob, _COM_Outptr_ IDxcBlob **ppHash, _COM_Outptr_ IDxcBlob **ppContainer) = 0;
463};
464
465// For use with IDxcResult::[Has|Get]Output dxcOutKind argument
466// Note: text outputs returned from version 2 APIs are UTF-8 or UTF-16 based on -encoding option
467typedef enum DXC_OUT_KIND {
468  DXC_OUT_NONE = 0,
469  DXC_OUT_OBJECT = 1,         // IDxcBlob - Shader or library object
470  DXC_OUT_ERRORS = 2,         // IDxcBlobUtf8 or IDxcBlobWide
471  DXC_OUT_PDB = 3,            // IDxcBlob
472  DXC_OUT_SHADER_HASH = 4,    // IDxcBlob - DxcShaderHash of shader or shader with source info (-Zsb/-Zss)
473  DXC_OUT_DISASSEMBLY = 5,    // IDxcBlobUtf8 or IDxcBlobWide - from Disassemble
474  DXC_OUT_HLSL = 6,           // IDxcBlobUtf8 or IDxcBlobWide - from Preprocessor or Rewriter
475  DXC_OUT_TEXT = 7,           // IDxcBlobUtf8 or IDxcBlobWide - other text, such as -ast-dump or -Odump
476  DXC_OUT_REFLECTION = 8,     // IDxcBlob - RDAT part with reflection data
477  DXC_OUT_ROOT_SIGNATURE = 9, // IDxcBlob - Serialized root signature output
478  DXC_OUT_EXTRA_OUTPUTS  = 10,// IDxcExtraResults - Extra outputs
479  DXC_OUT_REMARKS = 11,       // IDxcBlobUtf8 or IDxcBlobWide - text directed at stdout
480  DXC_OUT_TIME_REPORT = 12,   // IDxcBlobUtf8 or IDxcBlobWide - text directed at stdout
481  DXC_OUT_TIME_TRACE = 13,   // IDxcBlobUtf8 or IDxcBlobWide - text directed at stdout
482
483  DXC_OUT_LAST = DXC_OUT_TIME_TRACE, // Last value for a counter
484
485  DXC_OUT_NUM_ENUMS,
486  DXC_OUT_FORCE_DWORD = 0xFFFFFFFF
487} DXC_OUT_KIND;
488
489static_assert(DXC_OUT_NUM_ENUMS == DXC_OUT_LAST + 1,
490              "DXC_OUT_* Enum added and last value not updated.");
491
492CROSS_PLATFORM_UUIDOF(IDxcResult, "58346CDA-DDE7-4497-9461-6F87AF5E0659")
493struct IDxcResult : public IDxcOperationResult {
494  virtual BOOL STDMETHODCALLTYPE HasOutput(_In_ DXC_OUT_KIND dxcOutKind) = 0;
495  virtual HRESULT STDMETHODCALLTYPE GetOutput(_In_ DXC_OUT_KIND dxcOutKind,
496    _In_ REFIID iid, _COM_Outptr_opt_result_maybenull_ void **ppvObject,
497    _COM_Outptr_ IDxcBlobWide **ppOutputName) = 0;
498
499  virtual UINT32 GetNumOutputs() = 0;
500  virtual DXC_OUT_KIND GetOutputByIndex(UINT32 Index) = 0;
501  virtual DXC_OUT_KIND PrimaryOutput() = 0;
502};
503
504// Special names for extra output that should get written to specific streams
505#define DXC_EXTRA_OUTPUT_NAME_STDOUT L"*stdout*"
506#define DXC_EXTRA_OUTPUT_NAME_STDERR L"*stderr*"
507
508CROSS_PLATFORM_UUIDOF(IDxcExtraOutputs, "319b37a2-a5c2-494a-a5de-4801b2faf989")
509struct IDxcExtraOutputs : public IUnknown {
510
511  virtual UINT32 STDMETHODCALLTYPE GetOutputCount() = 0;
512  virtual HRESULT STDMETHODCALLTYPE GetOutput(_In_ UINT32 uIndex,
513    _In_ REFIID iid, _COM_Outptr_opt_result_maybenull_ void **ppvObject,
514    _COM_Outptr_opt_result_maybenull_ IDxcBlobWide **ppOutputType,
515    _COM_Outptr_opt_result_maybenull_ IDxcBlobWide **ppOutputName) = 0;
516};
517
518CROSS_PLATFORM_UUIDOF(IDxcCompiler3, "228B4687-5A6A-4730-900C-9702B2203F54")
519struct IDxcCompiler3 : public IUnknown {
520  // Compile a single entry point to the target shader model,
521  // Compile a library to a library target (-T lib_*),
522  // Compile a root signature (-T rootsig_*), or
523  // Preprocess HLSL source (-P)
524  virtual HRESULT STDMETHODCALLTYPE Compile(
525    _In_ const DxcBuffer *pSource,                // Source text to compile
526    _In_opt_count_(argCount) LPCWSTR *pArguments, // Array of pointers to arguments
527    _In_ UINT32 argCount,                         // Number of arguments
528    _In_opt_ IDxcIncludeHandler *pIncludeHandler, // user-provided interface to handle #include directives (optional)
529    _In_ REFIID riid, _Out_ LPVOID *ppResult      // IDxcResult: status, buffer, and errors
530  ) = 0;
531
532  // Disassemble a program.
533  virtual HRESULT STDMETHODCALLTYPE Disassemble(
534    _In_ const DxcBuffer *pObject,                // Program to disassemble: dxil container or bitcode.
535    _In_ REFIID riid, _Out_ LPVOID *ppResult      // IDxcResult: status, disassembly text, and errors
536    ) = 0;
537};
538
539static const UINT32 DxcValidatorFlags_Default = 0;
540static const UINT32 DxcValidatorFlags_InPlaceEdit = 1;  // Validator is allowed to update shader blob in-place.
541static const UINT32 DxcValidatorFlags_RootSignatureOnly = 2;
542static const UINT32 DxcValidatorFlags_ModuleOnly = 4;
543static const UINT32 DxcValidatorFlags_ValidMask = 0x7;
544
545CROSS_PLATFORM_UUIDOF(IDxcValidator, "A6E82BD2-1FD7-4826-9811-2857E797F49A")
546struct IDxcValidator : public IUnknown {
547  // Validate a shader.
548  virtual HRESULT STDMETHODCALLTYPE Validate(
549    _In_ IDxcBlob *pShader,                       // Shader to validate.
550    _In_ UINT32 Flags,                            // Validation flags.
551    _COM_Outptr_ IDxcOperationResult **ppResult   // Validation output status, buffer, and errors
552    ) = 0;
553};
554
555CROSS_PLATFORM_UUIDOF(IDxcValidator2, "458e1fd1-b1b2-4750-a6e1-9c10f03bed92")
556struct IDxcValidator2 : public IDxcValidator {
557  // Validate a shader.
558  virtual HRESULT STDMETHODCALLTYPE ValidateWithDebug(
559    _In_ IDxcBlob *pShader,                       // Shader to validate.
560    _In_ UINT32 Flags,                            // Validation flags.
561    _In_opt_ DxcBuffer *pOptDebugBitcode,         // Optional debug module bitcode to provide line numbers
562    _COM_Outptr_ IDxcOperationResult **ppResult   // Validation output status, buffer, and errors
563    ) = 0;
564};
565
566CROSS_PLATFORM_UUIDOF(IDxcContainerBuilder, "334b1f50-2292-4b35-99a1-25588d8c17fe")
567struct IDxcContainerBuilder : public IUnknown {
568  virtual HRESULT STDMETHODCALLTYPE Load(_In_ IDxcBlob *pDxilContainerHeader) = 0;                // Loads DxilContainer to the builder
569  virtual HRESULT STDMETHODCALLTYPE AddPart(_In_ UINT32 fourCC, _In_ IDxcBlob *pSource) = 0;      // Part to add to the container
570  virtual HRESULT STDMETHODCALLTYPE RemovePart(_In_ UINT32 fourCC) = 0;                           // Remove the part with fourCC
571  virtual HRESULT STDMETHODCALLTYPE SerializeContainer(_Out_ IDxcOperationResult **ppResult) = 0; // Builds a container of the given container builder state
572};
573
574CROSS_PLATFORM_UUIDOF(IDxcAssembler, "091f7a26-1c1f-4948-904b-e6e3a8a771d5")
575struct IDxcAssembler : public IUnknown {
576  // Assemble dxil in ll or llvm bitcode to DXIL container.
577  virtual HRESULT STDMETHODCALLTYPE AssembleToContainer(
578    _In_ IDxcBlob *pShader,                       // Shader to assemble.
579    _COM_Outptr_ IDxcOperationResult **ppResult   // Assembly output status, buffer, and errors
580    ) = 0;
581};
582
583CROSS_PLATFORM_UUIDOF(IDxcContainerReflection, "d2c21b26-8350-4bdc-976a-331ce6f4c54c")
584struct IDxcContainerReflection : public IUnknown {
585  virtual HRESULT STDMETHODCALLTYPE Load(_In_ IDxcBlob *pContainer) = 0; // Container to load.
586  virtual HRESULT STDMETHODCALLTYPE GetPartCount(_Out_ UINT32 *pResult) = 0;
587  virtual HRESULT STDMETHODCALLTYPE GetPartKind(UINT32 idx, _Out_ UINT32 *pResult) = 0;
588  virtual HRESULT STDMETHODCALLTYPE GetPartContent(UINT32 idx, _COM_Outptr_ IDxcBlob **ppResult) = 0;
589  virtual HRESULT STDMETHODCALLTYPE FindFirstPartKind(UINT32 kind, _Out_ UINT32 *pResult) = 0;
590  virtual HRESULT STDMETHODCALLTYPE GetPartReflection(UINT32 idx, REFIID iid, void **ppvObject) = 0;
591};
592
593CROSS_PLATFORM_UUIDOF(IDxcOptimizerPass, "AE2CD79F-CC22-453F-9B6B-B124E7A5204C")
594struct IDxcOptimizerPass : public IUnknown {
595  virtual HRESULT STDMETHODCALLTYPE GetOptionName(_COM_Outptr_ LPWSTR *ppResult) = 0;
596  virtual HRESULT STDMETHODCALLTYPE GetDescription(_COM_Outptr_ LPWSTR *ppResult) = 0;
597  virtual HRESULT STDMETHODCALLTYPE GetOptionArgCount(_Out_ UINT32 *pCount) = 0;
598  virtual HRESULT STDMETHODCALLTYPE GetOptionArgName(UINT32 argIndex, _COM_Outptr_ LPWSTR *ppResult) = 0;
599  virtual HRESULT STDMETHODCALLTYPE GetOptionArgDescription(UINT32 argIndex, _COM_Outptr_ LPWSTR *ppResult) = 0;
600};
601
602CROSS_PLATFORM_UUIDOF(IDxcOptimizer, "25740E2E-9CBA-401B-9119-4FB42F39F270")
603struct IDxcOptimizer : public IUnknown {
604  virtual HRESULT STDMETHODCALLTYPE GetAvailablePassCount(_Out_ UINT32 *pCount) = 0;
605  virtual HRESULT STDMETHODCALLTYPE GetAvailablePass(UINT32 index, _COM_Outptr_ IDxcOptimizerPass** ppResult) = 0;
606  virtual HRESULT STDMETHODCALLTYPE RunOptimizer(IDxcBlob *pBlob,
607    _In_count_(optionCount) LPCWSTR *ppOptions, UINT32 optionCount,
608    _COM_Outptr_ IDxcBlob **pOutputModule,
609    _COM_Outptr_opt_ IDxcBlobEncoding **ppOutputText) = 0;
610};
611
612static const UINT32 DxcVersionInfoFlags_None = 0;
613static const UINT32 DxcVersionInfoFlags_Debug = 1; // Matches VS_FF_DEBUG
614static const UINT32 DxcVersionInfoFlags_Internal = 2; // Internal Validator (non-signing)
615
616CROSS_PLATFORM_UUIDOF(IDxcVersionInfo, "b04f5b50-2059-4f12-a8ff-a1e0cde1cc7e")
617struct IDxcVersionInfo : public IUnknown {
618  virtual HRESULT STDMETHODCALLTYPE GetVersion(_Out_ UINT32 *pMajor, _Out_ UINT32 *pMinor) = 0;
619  virtual HRESULT STDMETHODCALLTYPE GetFlags(_Out_ UINT32 *pFlags) = 0;
620};
621
622CROSS_PLATFORM_UUIDOF(IDxcVersionInfo2, "fb6904c4-42f0-4b62-9c46-983af7da7c83")
623struct IDxcVersionInfo2 : public IDxcVersionInfo {
624  virtual HRESULT STDMETHODCALLTYPE GetCommitInfo(
625    _Out_ UINT32 *pCommitCount,           // The total number commits.
626    _Outptr_result_z_ char **pCommitHash  // The SHA of the latest commit. (Must be CoTaskMemFree()'d!)
627  ) = 0;
628};
629
630CROSS_PLATFORM_UUIDOF(IDxcVersionInfo3, "5e13e843-9d25-473c-9ad2-03b2d0b44b1e")
631struct IDxcVersionInfo3 : public IUnknown {
632  virtual HRESULT STDMETHODCALLTYPE GetCustomVersionString(
633    _Outptr_result_z_ char **pVersionString // Custom version string for compiler. (Must be CoTaskMemFree()'d!)
634  ) = 0;
635};
636
637struct DxcArgPair {
638  const WCHAR *pName;
639  const WCHAR *pValue;
640};
641
642CROSS_PLATFORM_UUIDOF(IDxcPdbUtils, "E6C9647E-9D6A-4C3B-B94C-524B5A6C343D")
643struct IDxcPdbUtils : public IUnknown {
644  virtual HRESULT STDMETHODCALLTYPE Load(_In_ IDxcBlob *pPdbOrDxil) = 0;
645
646  virtual HRESULT STDMETHODCALLTYPE GetSourceCount(_Out_ UINT32 *pCount) = 0;
647  virtual HRESULT STDMETHODCALLTYPE GetSource(_In_ UINT32 uIndex, _COM_Outptr_ IDxcBlobEncoding **ppResult) = 0;
648  virtual HRESULT STDMETHODCALLTYPE GetSourceName(_In_ UINT32 uIndex, _Outptr_result_z_ BSTR *pResult) = 0;
649
650  virtual HRESULT STDMETHODCALLTYPE GetFlagCount(_Out_ UINT32 *pCount) = 0;
651  virtual HRESULT STDMETHODCALLTYPE GetFlag(_In_ UINT32 uIndex, _Outptr_result_z_ BSTR *pResult) = 0;
652
653  virtual HRESULT STDMETHODCALLTYPE GetArgCount(_Out_ UINT32 *pCount) = 0;
654  virtual HRESULT STDMETHODCALLTYPE GetArg(_In_ UINT32 uIndex, _Outptr_result_z_ BSTR *pResult) = 0;
655
656  virtual HRESULT STDMETHODCALLTYPE GetArgPairCount(_Out_ UINT32 *pCount) = 0;
657  virtual HRESULT STDMETHODCALLTYPE GetArgPair(_In_ UINT32 uIndex, _Outptr_result_z_ BSTR *pName, _Outptr_result_z_ BSTR *pValue) = 0;
658
659  virtual HRESULT STDMETHODCALLTYPE GetDefineCount(_Out_ UINT32 *pCount) = 0;
660  virtual HRESULT STDMETHODCALLTYPE GetDefine(_In_ UINT32 uIndex, _Outptr_result_z_ BSTR *pResult) = 0;
661
662  virtual HRESULT STDMETHODCALLTYPE GetTargetProfile(_Outptr_result_z_ BSTR *pResult) = 0;
663  virtual HRESULT STDMETHODCALLTYPE GetEntryPoint(_Outptr_result_z_ BSTR *pResult) = 0;
664  virtual HRESULT STDMETHODCALLTYPE GetMainFileName(_Outptr_result_z_ BSTR *pResult) = 0;
665
666  virtual HRESULT STDMETHODCALLTYPE GetHash(_COM_Outptr_ IDxcBlob **ppResult) = 0;
667  virtual HRESULT STDMETHODCALLTYPE GetName(_Outptr_result_z_ BSTR *pResult) = 0;
668
669  virtual BOOL STDMETHODCALLTYPE IsFullPDB() = 0;
670  virtual HRESULT STDMETHODCALLTYPE GetFullPDB(_COM_Outptr_ IDxcBlob **ppFullPDB) = 0;
671
672  virtual HRESULT STDMETHODCALLTYPE GetVersionInfo(_COM_Outptr_ IDxcVersionInfo **ppVersionInfo) = 0;
673
674  virtual HRESULT STDMETHODCALLTYPE SetCompiler(_In_ IDxcCompiler3 *pCompiler) = 0;
675  virtual HRESULT STDMETHODCALLTYPE CompileForFullPDB(_COM_Outptr_ IDxcResult **ppResult) = 0;
676  virtual HRESULT STDMETHODCALLTYPE OverrideArgs(_In_ DxcArgPair *pArgPairs, UINT32 uNumArgPairs) = 0;
677  virtual HRESULT STDMETHODCALLTYPE OverrideRootSignature(_In_ const WCHAR *pRootSignature) = 0;
678};
679
680CROSS_PLATFORM_UUIDOF(IDxcPdbUtils2, "4315D938-F369-4F93-95A2-252017CC3807")
681struct IDxcPdbUtils2 : public IUnknown {
682  virtual HRESULT STDMETHODCALLTYPE Load(_In_ IDxcBlob *pPdbOrDxil) = 0;
683
684  virtual HRESULT STDMETHODCALLTYPE GetSourceCount(_Out_ UINT32 *pCount) = 0;
685  virtual HRESULT STDMETHODCALLTYPE GetSource(_In_ UINT32 uIndex, _COM_Outptr_ IDxcBlobEncoding **ppResult) = 0;
686  virtual HRESULT STDMETHODCALLTYPE GetSourceName(_In_ UINT32 uIndex, _COM_Outptr_ IDxcBlobWide **ppResult) = 0;
687
688  virtual HRESULT STDMETHODCALLTYPE GetLibraryPDBCount(UINT32 *pCount) = 0;
689  virtual HRESULT STDMETHODCALLTYPE GetLibraryPDB(_In_ UINT32 uIndex, _COM_Outptr_ IDxcPdbUtils2 **ppOutPdbUtils, _COM_Outptr_opt_result_maybenull_ IDxcBlobWide **ppLibraryName) = 0;
690
691  virtual HRESULT STDMETHODCALLTYPE GetFlagCount(_Out_ UINT32 *pCount) = 0;
692  virtual HRESULT STDMETHODCALLTYPE GetFlag(_In_ UINT32 uIndex, _COM_Outptr_ IDxcBlobWide **ppResult) = 0;
693
694  virtual HRESULT STDMETHODCALLTYPE GetArgCount(_Out_ UINT32 *pCount) = 0;
695  virtual HRESULT STDMETHODCALLTYPE GetArg(_In_ UINT32 uIndex, _COM_Outptr_ IDxcBlobWide **ppResult) = 0;
696
697  virtual HRESULT STDMETHODCALLTYPE GetArgPairCount(_Out_ UINT32 *pCount) = 0;
698  virtual HRESULT STDMETHODCALLTYPE GetArgPair(_In_ UINT32 uIndex, _COM_Outptr_result_maybenull_ IDxcBlobWide **ppName, _COM_Outptr_result_maybenull_ IDxcBlobWide **ppValue) = 0;
699
700  virtual HRESULT STDMETHODCALLTYPE GetDefineCount(_Out_ UINT32 *pCount) = 0;
701  virtual HRESULT STDMETHODCALLTYPE GetDefine(_In_ UINT32 uIndex, _COM_Outptr_ IDxcBlobWide **ppResult) = 0;
702
703  virtual HRESULT STDMETHODCALLTYPE GetTargetProfile(_COM_Outptr_result_maybenull_ IDxcBlobWide **ppResult) = 0;
704  virtual HRESULT STDMETHODCALLTYPE GetEntryPoint(_COM_Outptr_result_maybenull_ IDxcBlobWide **ppResult) = 0;
705  virtual HRESULT STDMETHODCALLTYPE GetMainFileName(_COM_Outptr_result_maybenull_ IDxcBlobWide **ppResult) = 0;
706
707  virtual HRESULT STDMETHODCALLTYPE GetHash(_COM_Outptr_result_maybenull_ IDxcBlob **ppResult) = 0;
708  virtual HRESULT STDMETHODCALLTYPE GetName(_COM_Outptr_result_maybenull_ IDxcBlobWide **ppResult) = 0;
709
710  virtual HRESULT STDMETHODCALLTYPE GetVersionInfo(_COM_Outptr_result_maybenull_ IDxcVersionInfo **ppVersionInfo) = 0;
711
712  virtual HRESULT STDMETHODCALLTYPE GetCustomToolchainID(_Out_ UINT32 *pID) = 0;
713  virtual HRESULT STDMETHODCALLTYPE GetCustomToolchainData(_COM_Outptr_result_maybenull_ IDxcBlob **ppBlob) = 0;
714
715  virtual HRESULT STDMETHODCALLTYPE GetWholeDxil(_COM_Outptr_result_maybenull_ IDxcBlob **ppResult) = 0;
716
717  virtual BOOL STDMETHODCALLTYPE IsFullPDB() = 0;
718  virtual BOOL STDMETHODCALLTYPE IsPDBRef() = 0;
719};
720
721// Note: __declspec(selectany) requires 'extern'
722// On Linux __declspec(selectany) is removed and using 'extern' results in link error.
723#ifdef _MSC_VER
724#define CLSID_SCOPE __declspec(selectany) extern
725#else
726#define CLSID_SCOPE
727#endif
728
729CLSID_SCOPE const CLSID CLSID_DxcCompiler = {
730    0x73e22d93,
731    0xe6ce,
732    0x47f3,
733    {0xb5, 0xbf, 0xf0, 0x66, 0x4f, 0x39, 0xc1, 0xb0}};
734
735// {EF6A8087-B0EA-4D56-9E45-D07E1A8B7806}
736CLSID_SCOPE const GUID CLSID_DxcLinker = {
737    0xef6a8087,
738    0xb0ea,
739    0x4d56,
740    {0x9e, 0x45, 0xd0, 0x7e, 0x1a, 0x8b, 0x78, 0x6}};
741
742// {CD1F6B73-2AB0-484D-8EDC-EBE7A43CA09F}
743CLSID_SCOPE const CLSID CLSID_DxcDiaDataSource = {
744    0xcd1f6b73,
745    0x2ab0,
746    0x484d,
747    {0x8e, 0xdc, 0xeb, 0xe7, 0xa4, 0x3c, 0xa0, 0x9f}};
748
749// {3E56AE82-224D-470F-A1A1-FE3016EE9F9D}
750CLSID_SCOPE const CLSID CLSID_DxcCompilerArgs = {
751    0x3e56ae82,
752    0x224d,
753    0x470f,
754    {0xa1, 0xa1, 0xfe, 0x30, 0x16, 0xee, 0x9f, 0x9d}};
755
756// {6245D6AF-66E0-48FD-80B4-4D271796748C}
757CLSID_SCOPE const GUID CLSID_DxcLibrary = {
758    0x6245d6af,
759    0x66e0,
760    0x48fd,
761    {0x80, 0xb4, 0x4d, 0x27, 0x17, 0x96, 0x74, 0x8c}};
762
763CLSID_SCOPE const GUID CLSID_DxcUtils = CLSID_DxcLibrary;
764
765// {8CA3E215-F728-4CF3-8CDD-88AF917587A1}
766CLSID_SCOPE const GUID CLSID_DxcValidator = {
767    0x8ca3e215,
768    0xf728,
769    0x4cf3,
770    {0x8c, 0xdd, 0x88, 0xaf, 0x91, 0x75, 0x87, 0xa1}};
771
772// {D728DB68-F903-4F80-94CD-DCCF76EC7151}
773CLSID_SCOPE const GUID CLSID_DxcAssembler = {
774    0xd728db68,
775    0xf903,
776    0x4f80,
777    {0x94, 0xcd, 0xdc, 0xcf, 0x76, 0xec, 0x71, 0x51}};
778
779// {b9f54489-55b8-400c-ba3a-1675e4728b91}
780CLSID_SCOPE const GUID CLSID_DxcContainerReflection = {
781    0xb9f54489,
782    0x55b8,
783    0x400c,
784    {0xba, 0x3a, 0x16, 0x75, 0xe4, 0x72, 0x8b, 0x91}};
785
786// {AE2CD79F-CC22-453F-9B6B-B124E7A5204C}
787CLSID_SCOPE const GUID CLSID_DxcOptimizer = {
788    0xae2cd79f,
789    0xcc22,
790    0x453f,
791    {0x9b, 0x6b, 0xb1, 0x24, 0xe7, 0xa5, 0x20, 0x4c}};
792
793// {94134294-411f-4574-b4d0-8741e25240d2}
794CLSID_SCOPE const GUID CLSID_DxcContainerBuilder = {
795    0x94134294,
796    0x411f,
797    0x4574,
798    {0xb4, 0xd0, 0x87, 0x41, 0xe2, 0x52, 0x40, 0xd2}};
799
800// {54621dfb-f2ce-457e-ae8c-ec355faeec7c}
801CLSID_SCOPE const GUID CLSID_DxcPdbUtils = {
802    0x54621dfb,
803    0xf2ce,
804    0x457e,
805    {0xae, 0x8c, 0xec, 0x35, 0x5f, 0xae, 0xec, 0x7c}};
806
807#endif