dxcapi.h 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // //
  3. // dxcapi.h //
  4. // Copyright (C) Microsoft Corporation. All rights reserved. //
  5. // This file is distributed under the University of Illinois Open Source //
  6. // License. See LICENSE.TXT for details. //
  7. // //
  8. // Provides declarations for the DirectX Compiler API entry point. //
  9. // //
  10. ///////////////////////////////////////////////////////////////////////////////
  11. #ifndef __DXC_API__
  12. #define __DXC_API__
  13. #ifdef _WIN32
  14. #ifndef DXC_API_IMPORT
  15. #define DXC_API_IMPORT __declspec(dllimport)
  16. #endif
  17. #else
  18. #ifndef DXC_API_IMPORT
  19. #define DXC_API_IMPORT __attribute__((visibility("default")))
  20. #endif
  21. #endif
  22. #ifdef _WIN32
  23. #ifndef CROSS_PLATFORM_UUIDOF
  24. // Warning: This macro exists in WinAdapter.h as well
  25. #define CROSS_PLATFORM_UUIDOF(interface, spec) \
  26. struct __declspec(uuid(spec)) interface;
  27. #endif
  28. #else
  29. #include "WinAdapter.h"
  30. #include <dlfcn.h>
  31. #endif
  32. struct IMalloc;
  33. struct IDxcIncludeHandler;
  34. /// \brief Typedef for DxcCreateInstance function pointer.
  35. ///
  36. /// This can be used with GetProcAddress to get the DxcCreateInstance function.
  37. typedef HRESULT(__stdcall *DxcCreateInstanceProc)(_In_ REFCLSID rclsid,
  38. _In_ REFIID riid,
  39. _Out_ LPVOID *ppv);
  40. /// \brief Typedef for DxcCreateInstance2 function pointer.
  41. ///
  42. /// This can be used with GetProcAddress to get the DxcCreateInstance2 function.
  43. typedef HRESULT(__stdcall *DxcCreateInstance2Proc)(_In_ IMalloc *pMalloc,
  44. _In_ REFCLSID rclsid,
  45. _In_ REFIID riid,
  46. _Out_ LPVOID *ppv);
  47. /// \brief Creates a single uninitialized object of the class associated with a
  48. /// specified CLSID.
  49. ///
  50. /// \param rclsid The CLSID associated with the data and code that will be used
  51. /// to create the object.
  52. ///
  53. /// \param riid A reference to the identifier of the interface to be used to
  54. /// communicate with the object.
  55. ///
  56. /// \param ppv Address of pointer variable that receives the interface pointer
  57. /// requested in riid. Upon successful return, *ppv contains the requested
  58. /// interface pointer. Upon failure, *ppv contains NULL.
  59. ///
  60. /// While this function is similar to CoCreateInstance, there is no COM
  61. /// involvement.
  62. extern "C" DXC_API_IMPORT
  63. HRESULT __stdcall DxcCreateInstance(_In_ REFCLSID rclsid, _In_ REFIID riid,
  64. _Out_ LPVOID *ppv);
  65. /// \brief Version of DxcCreateInstance that takes an IMalloc interface.
  66. ///
  67. /// This can be used to create an instance of the compiler with a custom memory
  68. /// allocator.
  69. extern "C" DXC_API_IMPORT
  70. HRESULT __stdcall DxcCreateInstance2(_In_ IMalloc *pMalloc,
  71. _In_ REFCLSID rclsid, _In_ REFIID riid,
  72. _Out_ LPVOID *ppv);
  73. // For convenience, equivalent definitions to CP_UTF8 and CP_UTF16.
  74. #define DXC_CP_UTF8 65001
  75. #define DXC_CP_UTF16 1200
  76. #define DXC_CP_UTF32 12000
  77. // Use DXC_CP_ACP for: Binary; ANSI Text; Autodetect UTF with BOM
  78. #define DXC_CP_ACP 0
  79. /// Codepage for "wide" characters - UTF16 on Windows, UTF32 on other platforms.
  80. #ifdef _WIN32
  81. #define DXC_CP_WIDE DXC_CP_UTF16
  82. #else
  83. #define DXC_CP_WIDE DXC_CP_UTF32
  84. #endif
  85. /// Indicates that the shader hash was computed taking into account source
  86. /// information (-Zss).
  87. #define DXC_HASHFLAG_INCLUDES_SOURCE 1
  88. /// Hash digest type for ShaderHash.
  89. typedef struct DxcShaderHash {
  90. UINT32 Flags; ///< DXC_HASHFLAG_*
  91. BYTE HashDigest[16]; ///< The hash digest
  92. } DxcShaderHash;
  93. #define DXC_FOURCC(ch0, ch1, ch2, ch3) \
  94. ((UINT32)(UINT8)(ch0) | (UINT32)(UINT8)(ch1) << 8 | \
  95. (UINT32)(UINT8)(ch2) << 16 | (UINT32)(UINT8)(ch3) << 24)
  96. #define DXC_PART_PDB DXC_FOURCC('I', 'L', 'D', 'B')
  97. #define DXC_PART_PDB_NAME DXC_FOURCC('I', 'L', 'D', 'N')
  98. #define DXC_PART_PRIVATE_DATA DXC_FOURCC('P', 'R', 'I', 'V')
  99. #define DXC_PART_ROOT_SIGNATURE DXC_FOURCC('R', 'T', 'S', '0')
  100. #define DXC_PART_DXIL DXC_FOURCC('D', 'X', 'I', 'L')
  101. #define DXC_PART_REFLECTION_DATA DXC_FOURCC('S', 'T', 'A', 'T')
  102. #define DXC_PART_SHADER_HASH DXC_FOURCC('H', 'A', 'S', 'H')
  103. #define DXC_PART_INPUT_SIGNATURE DXC_FOURCC('I', 'S', 'G', '1')
  104. #define DXC_PART_OUTPUT_SIGNATURE DXC_FOURCC('O', 'S', 'G', '1')
  105. #define DXC_PART_PATCH_CONSTANT_SIGNATURE DXC_FOURCC('P', 'S', 'G', '1')
  106. // Some option arguments are defined here for continuity with D3DCompile
  107. // interface.
  108. #define DXC_ARG_DEBUG L"-Zi"
  109. #define DXC_ARG_SKIP_VALIDATION L"-Vd"
  110. #define DXC_ARG_SKIP_OPTIMIZATIONS L"-Od"
  111. #define DXC_ARG_PACK_MATRIX_ROW_MAJOR L"-Zpr"
  112. #define DXC_ARG_PACK_MATRIX_COLUMN_MAJOR L"-Zpc"
  113. #define DXC_ARG_AVOID_FLOW_CONTROL L"-Gfa"
  114. #define DXC_ARG_PREFER_FLOW_CONTROL L"-Gfp"
  115. #define DXC_ARG_ENABLE_STRICTNESS L"-Ges"
  116. #define DXC_ARG_ENABLE_BACKWARDS_COMPATIBILITY L"-Gec"
  117. #define DXC_ARG_IEEE_STRICTNESS L"-Gis"
  118. #define DXC_ARG_OPTIMIZATION_LEVEL0 L"-O0"
  119. #define DXC_ARG_OPTIMIZATION_LEVEL1 L"-O1"
  120. #define DXC_ARG_OPTIMIZATION_LEVEL2 L"-O2"
  121. #define DXC_ARG_OPTIMIZATION_LEVEL3 L"-O3"
  122. #define DXC_ARG_WARNINGS_ARE_ERRORS L"-WX"
  123. #define DXC_ARG_RESOURCES_MAY_ALIAS L"-res_may_alias"
  124. #define DXC_ARG_ALL_RESOURCES_BOUND L"-all_resources_bound"
  125. #define DXC_ARG_DEBUG_NAME_FOR_SOURCE L"-Zss"
  126. #define DXC_ARG_DEBUG_NAME_FOR_BINARY L"-Zsb"
  127. CROSS_PLATFORM_UUIDOF(IDxcBlob, "8BA5FB08-5195-40e2-AC58-0D989C3A0102")
  128. /// \brief A sized buffer that can be passed in and out of DXC APIs.
  129. ///
  130. /// This is an alias of ID3D10Blob and ID3DBlob.
  131. struct IDxcBlob : public IUnknown {
  132. public:
  133. /// \brief Retrieves a pointer to the blob's data.
  134. virtual LPVOID STDMETHODCALLTYPE GetBufferPointer(void) = 0;
  135. /// \brief Retrieves the size, in bytes, of the blob's data.
  136. virtual SIZE_T STDMETHODCALLTYPE GetBufferSize(void) = 0;
  137. };
  138. CROSS_PLATFORM_UUIDOF(IDxcBlobEncoding, "7241d424-2646-4191-97c0-98e96e42fc68")
  139. /// \brief A blob that might have a known encoding.
  140. struct IDxcBlobEncoding : public IDxcBlob {
  141. public:
  142. /// \brief Retrieve the encoding for this blob.
  143. ///
  144. /// \param pKnown Pointer to a variable that will be set to TRUE if the
  145. /// encoding is known.
  146. ///
  147. /// \param pCodePage Pointer to variable that will be set to the encoding used
  148. /// for this blog.
  149. ///
  150. /// If the encoding is not known then pCodePage will be set to CP_ACP.
  151. virtual HRESULT STDMETHODCALLTYPE GetEncoding(_Out_ BOOL *pKnown,
  152. _Out_ UINT32 *pCodePage) = 0;
  153. };
  154. CROSS_PLATFORM_UUIDOF(IDxcBlobWide, "A3F84EAB-0FAA-497E-A39C-EE6ED60B2D84")
  155. /// \brief A blob containing a null-terminated wide string.
  156. ///
  157. /// This uses the native wide character encoding (utf16 on Windows, utf32 on
  158. /// Linux).
  159. ///
  160. /// The value returned by GetBufferSize() is the size of the buffer, in bytes,
  161. /// including the null-terminator.
  162. ///
  163. /// This interface is used to return output name strings DXC. Other string
  164. /// output blobs, such as errors/warnings, preprocessed HLSL, or other text are
  165. /// returned using encodings based on the -encoding option passed to the
  166. /// compiler.
  167. struct IDxcBlobWide : public IDxcBlobEncoding {
  168. public:
  169. /// \brief Retrieves a pointer to the string stored in this blob.
  170. virtual LPCWSTR STDMETHODCALLTYPE GetStringPointer(void) = 0;
  171. /// \brief Retrieves the length of the string stored in this blob, in
  172. /// characters, excluding the null-terminator.
  173. virtual SIZE_T STDMETHODCALLTYPE GetStringLength(void) = 0;
  174. };
  175. CROSS_PLATFORM_UUIDOF(IDxcBlobUtf8, "3DA636C9-BA71-4024-A301-30CBF125305B")
  176. /// \brief A blob containing a UTF-8 encoded string.
  177. ///
  178. /// The value returned by GetBufferSize() is the size of the buffer, in bytes,
  179. /// including the null-terminator.
  180. ///
  181. /// Depending on the -encoding option passed to the compiler, this interface is
  182. /// used to return string output blobs, such as errors/warnings, preprocessed
  183. /// HLSL, or other text. Output name strings always use IDxcBlobWide.
  184. struct IDxcBlobUtf8 : public IDxcBlobEncoding {
  185. public:
  186. /// \brief Retrieves a pointer to the string stored in this blob.
  187. virtual LPCSTR STDMETHODCALLTYPE GetStringPointer(void) = 0;
  188. /// \brief Retrieves the length of the string stored in this blob, in
  189. /// characters, excluding the null-terminator.
  190. virtual SIZE_T STDMETHODCALLTYPE GetStringLength(void) = 0;
  191. };
  192. #ifdef _WIN32
  193. /// IDxcBlobUtf16 is a legacy alias for IDxcBlobWide on Win32.
  194. typedef IDxcBlobWide IDxcBlobUtf16;
  195. #endif
  196. CROSS_PLATFORM_UUIDOF(IDxcIncludeHandler,
  197. "7f61fc7d-950d-467f-b3e3-3c02fb49187c")
  198. /// \brief Interface for handling include directives.
  199. ///
  200. /// This interface can be implemented to customize handling of include
  201. /// directives.
  202. ///
  203. /// Use IDxcUtils::CreateDefaultIncludeHandler to create a default
  204. /// implementation that reads include files from the filesystem.
  205. ///
  206. struct IDxcIncludeHandler : public IUnknown {
  207. /// \brief Load a source file to be included by the compiler.
  208. ///
  209. /// \param pFilename Candidate filename.
  210. ///
  211. /// \param ppIncludeSource Resultant source object for included file, nullptr
  212. /// if not found.
  213. virtual HRESULT STDMETHODCALLTYPE
  214. LoadSource(_In_z_ LPCWSTR pFilename,
  215. _COM_Outptr_result_maybenull_ IDxcBlob **ppIncludeSource) = 0;
  216. };
  217. /// \brief Structure for supplying bytes or text input to Dxc APIs.
  218. typedef struct DxcBuffer {
  219. /// \brief Pointer to the start of the buffer.
  220. LPCVOID Ptr;
  221. /// \brief Size of the buffer in bytes.
  222. SIZE_T Size;
  223. /// \brief Encoding of the buffer.
  224. ///
  225. /// Use Encoding = 0 for non-text bytes, ANSI text, or unknown with BOM.
  226. UINT Encoding;
  227. } DxcText;
  228. /// \brief Structure for supplying defines to Dxc APIs.
  229. struct DxcDefine {
  230. LPCWSTR Name; ///< The define name.
  231. _Maybenull_ LPCWSTR Value; ///< Optional value for the define.
  232. };
  233. CROSS_PLATFORM_UUIDOF(IDxcCompilerArgs, "73EFFE2A-70DC-45F8-9690-EFF64C02429D")
  234. /// \brief Interface for managing arguments passed to DXC.
  235. ///
  236. /// Use IDxcUtils::BuildArguments to create an instance of this interface.
  237. struct IDxcCompilerArgs : public IUnknown {
  238. /// \brief Retrieve the array of arguments.
  239. ///
  240. /// This can be passed directly to the pArguments parameter of the Compile()
  241. /// method.
  242. virtual LPCWSTR *STDMETHODCALLTYPE GetArguments() = 0;
  243. /// \brief Retrieve the number of arguments.
  244. ///
  245. /// This can be passed directly to the argCount parameter of the Compile()
  246. /// method.
  247. virtual UINT32 STDMETHODCALLTYPE GetCount() = 0;
  248. /// \brief Add additional arguments to this list of compiler arguments.
  249. virtual HRESULT STDMETHODCALLTYPE AddArguments(
  250. _In_opt_count_(argCount)
  251. LPCWSTR *pArguments, ///< Array of pointers to arguments to add.
  252. _In_ UINT32 argCount ///< Number of arguments to add.
  253. ) = 0;
  254. /// \brief Add additional UTF-8 encoded arguments to this list of compiler
  255. /// arguments.
  256. virtual HRESULT STDMETHODCALLTYPE AddArgumentsUTF8(
  257. _In_opt_count_(argCount)
  258. LPCSTR *pArguments, ///< Array of pointers to UTF-8 arguments to add.
  259. _In_ UINT32 argCount ///< Number of arguments to add.
  260. ) = 0;
  261. /// \brief Add additional defines to this list of compiler arguments.
  262. virtual HRESULT STDMETHODCALLTYPE AddDefines(
  263. _In_count_(defineCount) const DxcDefine *pDefines, ///< Array of defines.
  264. _In_ UINT32 defineCount ///< Number of defines.
  265. ) = 0;
  266. };
  267. //////////////////////////
  268. // Legacy Interfaces
  269. /////////////////////////
  270. CROSS_PLATFORM_UUIDOF(IDxcLibrary, "e5204dc7-d18c-4c3c-bdfb-851673980fe7")
  271. /// \deprecated IDxcUtils replaces IDxcLibrary; please use IDxcUtils insted.
  272. struct IDxcLibrary : public IUnknown {
  273. /// \deprecated
  274. virtual HRESULT STDMETHODCALLTYPE SetMalloc(_In_opt_ IMalloc *pMalloc) = 0;
  275. /// \deprecated
  276. virtual HRESULT STDMETHODCALLTYPE
  277. CreateBlobFromBlob(_In_ IDxcBlob *pBlob, UINT32 offset, UINT32 length,
  278. _COM_Outptr_ IDxcBlob **ppResult) = 0;
  279. /// \deprecated
  280. virtual HRESULT STDMETHODCALLTYPE
  281. CreateBlobFromFile(_In_z_ LPCWSTR pFileName, _In_opt_ UINT32 *codePage,
  282. _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) = 0;
  283. /// \deprecated
  284. virtual HRESULT STDMETHODCALLTYPE CreateBlobWithEncodingFromPinned(
  285. _In_bytecount_(size) LPCVOID pText, UINT32 size, UINT32 codePage,
  286. _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) = 0;
  287. /// \deprecated
  288. virtual HRESULT STDMETHODCALLTYPE CreateBlobWithEncodingOnHeapCopy(
  289. _In_bytecount_(size) LPCVOID pText, UINT32 size, UINT32 codePage,
  290. _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) = 0;
  291. /// \deprecated
  292. virtual HRESULT STDMETHODCALLTYPE CreateBlobWithEncodingOnMalloc(
  293. _In_bytecount_(size) LPCVOID pText, IMalloc *pIMalloc, UINT32 size,
  294. UINT32 codePage, _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) = 0;
  295. /// \deprecated
  296. virtual HRESULT STDMETHODCALLTYPE
  297. CreateIncludeHandler(_COM_Outptr_ IDxcIncludeHandler **ppResult) = 0;
  298. /// \deprecated
  299. virtual HRESULT STDMETHODCALLTYPE CreateStreamFromBlobReadOnly(
  300. _In_ IDxcBlob *pBlob, _COM_Outptr_ IStream **ppStream) = 0;
  301. /// \deprecated
  302. virtual HRESULT STDMETHODCALLTYPE GetBlobAsUtf8(
  303. _In_ IDxcBlob *pBlob, _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) = 0;
  304. // Renamed from GetBlobAsUtf16 to GetBlobAsWide
  305. /// \deprecated
  306. virtual HRESULT STDMETHODCALLTYPE GetBlobAsWide(
  307. _In_ IDxcBlob *pBlob, _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) = 0;
  308. #ifdef _WIN32
  309. // Alias to GetBlobAsWide on Win32
  310. /// \deprecated
  311. inline HRESULT GetBlobAsUtf16(_In_ IDxcBlob *pBlob,
  312. _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) {
  313. return this->GetBlobAsWide(pBlob, pBlobEncoding);
  314. }
  315. #endif
  316. };
  317. CROSS_PLATFORM_UUIDOF(IDxcOperationResult,
  318. "CEDB484A-D4E9-445A-B991-CA21CA157DC2")
  319. /// \brief The results of a DXC operation.
  320. ///
  321. /// Note: IDxcResult replaces IDxcOperationResult and should be used wherever
  322. /// possible.
  323. struct IDxcOperationResult : public IUnknown {
  324. /// \brief Retrieve the overall status of the operation.
  325. virtual HRESULT STDMETHODCALLTYPE GetStatus(_Out_ HRESULT *pStatus) = 0;
  326. /// \brief Retrieve the primary output of the operation.
  327. ///
  328. /// This corresponds to:
  329. /// * DXC_OUT_OBJECT - Compile() with shader or library target
  330. /// * DXC_OUT_DISASSEMBLY - Disassemble()
  331. /// * DXC_OUT_HLSL - Compile() with -P
  332. /// * DXC_OUT_ROOT_SIGNATURE - Compile() with rootsig_* target
  333. virtual HRESULT STDMETHODCALLTYPE
  334. GetResult(_COM_Outptr_result_maybenull_ IDxcBlob **ppResult) = 0;
  335. /// \brief Retrieves the error buffer from the operation, if there is one.
  336. ///
  337. // This corresponds to calling IDxcResult::GetOutput() with DXC_OUT_ERRORS.
  338. virtual HRESULT STDMETHODCALLTYPE
  339. GetErrorBuffer(_COM_Outptr_result_maybenull_ IDxcBlobEncoding **ppErrors) = 0;
  340. };
  341. CROSS_PLATFORM_UUIDOF(IDxcCompiler, "8c210bf3-011f-4422-8d70-6f9acb8db617")
  342. /// \deprecated Please use IDxcCompiler3 instead.
  343. struct IDxcCompiler : public IUnknown {
  344. /// \brief Compile a single entry point to the target shader model.
  345. ///
  346. /// \deprecated Please use IDxcCompiler3::Compile() instead.
  347. virtual HRESULT STDMETHODCALLTYPE Compile(
  348. _In_ IDxcBlob *pSource, // Source text to compile.
  349. _In_opt_z_ LPCWSTR pSourceName, // Optional file name for pSource. Used in
  350. // errors and include handlers.
  351. _In_opt_z_ LPCWSTR pEntryPoint, // Entry point name.
  352. _In_z_ LPCWSTR pTargetProfile, // Shader profile to compile.
  353. _In_opt_count_(argCount)
  354. LPCWSTR *pArguments, // Array of pointers to arguments.
  355. _In_ UINT32 argCount, // Number of arguments.
  356. _In_count_(defineCount) const DxcDefine *pDefines, // Array of defines.
  357. _In_ UINT32 defineCount, // Number of defines.
  358. _In_opt_ IDxcIncludeHandler
  359. *pIncludeHandler, // User-provided interface to handle #include
  360. // directives (optional).
  361. _COM_Outptr_ IDxcOperationResult *
  362. *ppResult // Compiler output status, buffer, and errors.
  363. ) = 0;
  364. /// \brief Preprocess source text.
  365. ///
  366. /// \deprecated Please use IDxcCompiler3::Compile() with the "-P" argument
  367. /// instead.
  368. virtual HRESULT STDMETHODCALLTYPE Preprocess(
  369. _In_ IDxcBlob *pSource, // Source text to preprocess.
  370. _In_opt_z_ LPCWSTR pSourceName, // Optional file name for pSource. Used in
  371. // errors and include handlers.
  372. _In_opt_count_(argCount)
  373. LPCWSTR *pArguments, // Array of pointers to arguments.
  374. _In_ UINT32 argCount, // Number of arguments.
  375. _In_count_(defineCount) const DxcDefine *pDefines, // Array of defines.
  376. _In_ UINT32 defineCount, // Number of defines.
  377. _In_opt_ IDxcIncludeHandler
  378. *pIncludeHandler, // user-provided interface to handle #include
  379. // directives (optional).
  380. _COM_Outptr_ IDxcOperationResult *
  381. *ppResult // Preprocessor output status, buffer, and errors.
  382. ) = 0;
  383. /// \brief Disassemble a program.
  384. ///
  385. /// \deprecated Please use IDxcCompiler3::Disassemble() instead.
  386. virtual HRESULT STDMETHODCALLTYPE Disassemble(
  387. _In_ IDxcBlob *pSource, // Program to disassemble.
  388. _COM_Outptr_ IDxcBlobEncoding **ppDisassembly // Disassembly text.
  389. ) = 0;
  390. };
  391. CROSS_PLATFORM_UUIDOF(IDxcCompiler2, "A005A9D9-B8BB-4594-B5C9-0E633BEC4D37")
  392. /// \deprecated Please use IDxcCompiler3 instead.
  393. struct IDxcCompiler2 : public IDxcCompiler {
  394. /// \brief Compile a single entry point to the target shader model with debug
  395. /// information.
  396. ///
  397. /// \deprecated Please use IDxcCompiler3::Compile() instead.
  398. virtual HRESULT STDMETHODCALLTYPE CompileWithDebug(
  399. _In_ IDxcBlob *pSource, // Source text to compile.
  400. _In_opt_z_ LPCWSTR pSourceName, // Optional file name for pSource. Used in
  401. // errors and include handlers.
  402. _In_opt_z_ LPCWSTR pEntryPoint, // Entry point name.
  403. _In_z_ LPCWSTR pTargetProfile, // Shader profile to compile.
  404. _In_opt_count_(argCount)
  405. LPCWSTR *pArguments, // Array of pointers to arguments.
  406. _In_ UINT32 argCount, // Number of arguments.
  407. _In_count_(defineCount) const DxcDefine *pDefines, // Array of defines.
  408. _In_ UINT32 defineCount, // Number of defines.
  409. _In_opt_ IDxcIncludeHandler
  410. *pIncludeHandler, // user-provided interface to handle #include
  411. // directives (optional).
  412. _COM_Outptr_ IDxcOperationResult *
  413. *ppResult, // Compiler output status, buffer, and errors.
  414. _Outptr_opt_result_z_ LPWSTR
  415. *ppDebugBlobName, // Suggested file name for debug blob. Must be
  416. // CoTaskMemFree()'d.
  417. _COM_Outptr_opt_ IDxcBlob **ppDebugBlob // Debug blob.
  418. ) = 0;
  419. };
  420. CROSS_PLATFORM_UUIDOF(IDxcLinker, "F1B5BE2A-62DD-4327-A1C2-42AC1E1E78E6")
  421. /// \brief DXC linker interface.
  422. ///
  423. /// Use DxcCreateInstance with CLSID_DxcLinker to obtain an instance of this
  424. /// interface.
  425. struct IDxcLinker : public IUnknown {
  426. public:
  427. /// \brief Register a library with name to reference it later.
  428. virtual HRESULT
  429. RegisterLibrary(_In_opt_ LPCWSTR pLibName, ///< Name of the library.
  430. _In_ IDxcBlob *pLib ///< Library blob.
  431. ) = 0;
  432. /// \brief Links the shader and produces a shader blob that the Direct3D
  433. /// runtime can use.
  434. virtual HRESULT STDMETHODCALLTYPE Link(
  435. _In_opt_ LPCWSTR pEntryName, ///< Entry point name.
  436. _In_ LPCWSTR pTargetProfile, ///< shader profile to link.
  437. _In_count_(libCount)
  438. const LPCWSTR *pLibNames, ///< Array of library names to link.
  439. _In_ UINT32 libCount, ///< Number of libraries to link.
  440. _In_opt_count_(argCount)
  441. const LPCWSTR *pArguments, ///< Array of pointers to arguments.
  442. _In_ UINT32 argCount, ///< Number of arguments.
  443. _COM_Outptr_ IDxcOperationResult *
  444. *ppResult ///< Linker output status, buffer, and errors.
  445. ) = 0;
  446. };
  447. /////////////////////////
  448. // Latest interfaces. Please use these.
  449. ////////////////////////
  450. CROSS_PLATFORM_UUIDOF(IDxcUtils, "4605C4CB-2019-492A-ADA4-65F20BB7D67F")
  451. /// \brief Various utility functions for DXC.
  452. ///
  453. /// Use DxcCreateInstance with CLSID_DxcUtils to obtain an instance of this
  454. /// interface.
  455. ///
  456. /// IDxcUtils replaces IDxcLibrary.
  457. struct IDxcUtils : public IUnknown {
  458. /// \brief Create a sub-blob that holds a reference to the outer blob and
  459. /// points to its memory.
  460. ///
  461. /// \param pBlob The outer blob.
  462. ///
  463. /// \param offset The offset inside the outer blob.
  464. ///
  465. /// \param length The size, in bytes, of the buffer to reference from the
  466. /// output blob.
  467. ///
  468. /// \param ppResult Address of the pointer that receives a pointer to the
  469. /// newly created blob.
  470. virtual HRESULT STDMETHODCALLTYPE
  471. CreateBlobFromBlob(_In_ IDxcBlob *pBlob, UINT32 offset, UINT32 length,
  472. _COM_Outptr_ IDxcBlob **ppResult) = 0;
  473. // For codePage, use 0 (or DXC_CP_ACP) for raw binary or ANSI code page.
  474. /// \brief Create a blob referencing existing memory, with no copy.
  475. ///
  476. /// \param pData Pointer to buffer containing the contents of the new blob.
  477. ///
  478. /// \param size The size of the pData buffer, in bytes.
  479. ///
  480. /// \param codePage The code page to use if the blob contains text. Use
  481. /// DXC_CP_ACP for binary or ANSI code page.
  482. ///
  483. /// \param ppBlobEncoding Address of the pointer that receives a pointer to
  484. /// the newly created blob.
  485. ///
  486. /// The user must manage the memory lifetime separately.
  487. ///
  488. /// This replaces IDxcLibrary::CreateBlobWithEncodingFromPinned.
  489. virtual HRESULT STDMETHODCALLTYPE CreateBlobFromPinned(
  490. _In_bytecount_(size) LPCVOID pData, UINT32 size, UINT32 codePage,
  491. _COM_Outptr_ IDxcBlobEncoding **ppBlobEncoding) = 0;
  492. /// \brief Create a blob, taking ownership of memory allocated with the
  493. /// supplied allocator.
  494. ///
  495. /// \param pData Pointer to buffer containing the contents of the new blob.
  496. ///
  497. /// \param pIMalloc The memory allocator to use.
  498. ///
  499. /// \param size The size of thee pData buffer, in bytes.
  500. ///
  501. /// \param codePage The code page to use if the blob contains text. Use
  502. /// DXC_CP_ACP for binary or ANSI code page.
  503. ///
  504. /// \param ppBlobEncoding Address of the pointer that receives a pointer to
  505. /// the newly created blob.
  506. ///
  507. /// This replaces IDxcLibrary::CreateBlobWithEncodingOnMalloc.
  508. virtual HRESULT STDMETHODCALLTYPE MoveToBlob(
  509. _In_bytecount_(size) LPCVOID pData, IMalloc *pIMalloc, UINT32 size,
  510. UINT32 codePage, _COM_Outptr_ IDxcBlobEncoding **ppBlobEncoding) = 0;
  511. /// \brief Create a blob containing a copy of the existing data.
  512. ///
  513. /// \param pData Pointer to buffer containing the contents of the new blob.
  514. ///
  515. /// \param size The size of thee pData buffer, in bytes.
  516. ///
  517. /// \param codePage The code page to use if the blob contains text. Use
  518. /// DXC_CP_ACP for binary or ANSI code page.
  519. ///
  520. /// \param ppBlobEncoding Address of the pointer that receives a pointer to
  521. /// the newly created blob.
  522. ///
  523. /// The new blob and its contents are allocated with the current allocator.
  524. /// This replaces IDxcLibrary::CreateBlobWithEncodingOnHeapCopy.
  525. virtual HRESULT STDMETHODCALLTYPE
  526. CreateBlob(_In_bytecount_(size) LPCVOID pData, UINT32 size, UINT32 codePage,
  527. _COM_Outptr_ IDxcBlobEncoding **ppBlobEncoding) = 0;
  528. /// \brief Create a blob with data loaded from a file.
  529. ///
  530. /// \param pFileName The name of the file to load from.
  531. ///
  532. /// \param pCodePage Optional code page to use if the blob contains text. Pass
  533. /// NULL for binary data.
  534. ///
  535. /// \param ppBlobEncoding Address of the pointer that receives a pointer to
  536. /// the newly created blob.
  537. ///
  538. /// The new blob and its contents are allocated with the current allocator.
  539. /// This replaces IDxcLibrary::CreateBlobFromFile.
  540. virtual HRESULT STDMETHODCALLTYPE
  541. LoadFile(_In_z_ LPCWSTR pFileName, _In_opt_ UINT32 *pCodePage,
  542. _COM_Outptr_ IDxcBlobEncoding **ppBlobEncoding) = 0;
  543. /// \brief Create a stream that reads data from a blob.
  544. ///
  545. /// \param pBlob The blob to read from.
  546. ///
  547. /// \param ppStream Address of the pointer that receives a pointer to the
  548. /// newly created stream.
  549. virtual HRESULT STDMETHODCALLTYPE CreateReadOnlyStreamFromBlob(
  550. _In_ IDxcBlob *pBlob, _COM_Outptr_ IStream **ppStream) = 0;
  551. /// \brief Create default file-based include handler.
  552. ///
  553. /// \param ppResult Address of the pointer that receives a pointer to the
  554. /// newly created include handler.
  555. virtual HRESULT STDMETHODCALLTYPE
  556. CreateDefaultIncludeHandler(_COM_Outptr_ IDxcIncludeHandler **ppResult) = 0;
  557. /// \brief Convert or return matching encoded text blob as UTF-8.
  558. ///
  559. /// \param pBlob The blob to convert.
  560. ///
  561. /// \param ppBlobEncoding Address of the pointer that receives a pointer to
  562. /// the newly created blob.
  563. virtual HRESULT STDMETHODCALLTYPE GetBlobAsUtf8(
  564. _In_ IDxcBlob *pBlob, _COM_Outptr_ IDxcBlobUtf8 **ppBlobEncoding) = 0;
  565. /// \brief Convert or return matching encoded text blob as UTF-16.
  566. ///
  567. /// \param pBlob The blob to convert.
  568. ///
  569. /// \param ppBlobEncoding Address of the pointer that receives a pointer to
  570. /// the newly created blob.
  571. virtual HRESULT STDMETHODCALLTYPE GetBlobAsWide(
  572. _In_ IDxcBlob *pBlob, _COM_Outptr_ IDxcBlobWide **ppBlobEncoding) = 0;
  573. #ifdef _WIN32
  574. /// \brief Convert or return matching encoded text blob as UTF-16.
  575. ///
  576. /// \param pBlob The blob to convert.
  577. ///
  578. /// \param ppBlobEncoding Address of the pointer that receives a pointer to
  579. /// the newly created blob.
  580. ///
  581. /// Alias to GetBlobAsWide on Win32.
  582. inline HRESULT GetBlobAsUtf16(_In_ IDxcBlob *pBlob,
  583. _COM_Outptr_ IDxcBlobWide **ppBlobEncoding) {
  584. return this->GetBlobAsWide(pBlob, ppBlobEncoding);
  585. }
  586. #endif
  587. /// \brief Retrieve a single part from a DXIL container.
  588. ///
  589. /// \param pShader The shader to retrieve the part from.
  590. ///
  591. /// \param DxcPart The part to retrieve (eg DXC_PART_ROOT_SIGNATURE).
  592. ///
  593. /// \param ppPartData Address of the pointer that receives a pointer to the
  594. /// part.
  595. ///
  596. /// \param pPartSizeInBytes Address of the pointer that receives the size of
  597. /// the part.
  598. ///
  599. /// The returned pointer points inside the buffer passed in pShader.
  600. virtual HRESULT STDMETHODCALLTYPE
  601. GetDxilContainerPart(_In_ const DxcBuffer *pShader, _In_ UINT32 DxcPart,
  602. _Outptr_result_nullonfailure_ void **ppPartData,
  603. _Out_ UINT32 *pPartSizeInBytes) = 0;
  604. /// \brief Create reflection interface from serialized DXIL container or the
  605. /// DXC_OUT_REFLECTION blob contents.
  606. ///
  607. /// \param pData The source data.
  608. ///
  609. /// \param iid The interface ID of the reflection interface to create.
  610. ///
  611. /// \param ppvReflection Address of the pointer that receives a pointer to the
  612. /// newly created reflection interface.
  613. ///
  614. /// Use this with interfaces such as ID3D12ShaderReflection.
  615. virtual HRESULT STDMETHODCALLTYPE CreateReflection(
  616. _In_ const DxcBuffer *pData, REFIID iid, void **ppvReflection) = 0;
  617. /// \brief Build arguments that can be passed to the Compile method.
  618. virtual HRESULT STDMETHODCALLTYPE BuildArguments(
  619. _In_opt_z_ LPCWSTR pSourceName, ///< Optional file name for pSource. Used
  620. ///< in errors and include handlers.
  621. _In_opt_z_ LPCWSTR pEntryPoint, ///< Entry point name (-E).
  622. _In_z_ LPCWSTR pTargetProfile, ///< Shader profile to compile (-T).
  623. _In_opt_count_(argCount)
  624. LPCWSTR *pArguments, ///< Array of pointers to arguments.
  625. _In_ UINT32 argCount, ///< Number of arguments.
  626. _In_count_(defineCount) const DxcDefine *pDefines, ///< Array of defines.
  627. _In_ UINT32 defineCount, ///< Number of defines.
  628. _COM_Outptr_ IDxcCompilerArgs *
  629. *ppArgs ///< Arguments you can use with Compile() method.
  630. ) = 0;
  631. /// \brief Retrieve the hash and contents of a shader PDB.
  632. ///
  633. /// \param pPDBBlob The blob containing the PDB.
  634. ///
  635. /// \param ppHash Address of the pointer that receives a pointer to the hash
  636. /// blob.
  637. ///
  638. /// \param ppContainer Address of the pointer that receives a pointer to the
  639. /// bloc containing the contents of the PDB.
  640. ///
  641. virtual HRESULT STDMETHODCALLTYPE
  642. GetPDBContents(_In_ IDxcBlob *pPDBBlob, _COM_Outptr_ IDxcBlob **ppHash,
  643. _COM_Outptr_ IDxcBlob **ppContainer) = 0;
  644. };
  645. /// \brief Specifies the kind of output to retrieve from a IDxcResult.
  646. ///
  647. /// Note: text outputs returned from version 2 APIs are UTF-8 or UTF-16 based on
  648. /// the -encoding option passed to the compiler.
  649. typedef enum DXC_OUT_KIND {
  650. DXC_OUT_NONE = 0, ///< No output.
  651. DXC_OUT_OBJECT = 1, ///< IDxcBlob - Shader or library object.
  652. DXC_OUT_ERRORS = 2, ///< IDxcBlobUtf8 or IDxcBlobWide.
  653. DXC_OUT_PDB = 3, ///< IDxcBlob.
  654. DXC_OUT_SHADER_HASH = 4, ///< IDxcBlob - DxcShaderHash of shader or shader
  655. ///< with source info (-Zsb/-Zss).
  656. DXC_OUT_DISASSEMBLY = 5, ///< IDxcBlobUtf8 or IDxcBlobWide - from Disassemble.
  657. DXC_OUT_HLSL =
  658. 6, ///< IDxcBlobUtf8 or IDxcBlobWide - from Preprocessor or Rewriter.
  659. DXC_OUT_TEXT = 7, ///< IDxcBlobUtf8 or IDxcBlobWide - other text, such as
  660. ///< -ast-dump or -Odump.
  661. DXC_OUT_REFLECTION = 8, ///< IDxcBlob - RDAT part with reflection data.
  662. DXC_OUT_ROOT_SIGNATURE = 9, ///< IDxcBlob - Serialized root signature output.
  663. DXC_OUT_EXTRA_OUTPUTS = 10, ///< IDxcExtraOutputs - Extra outputs.
  664. DXC_OUT_REMARKS =
  665. 11, ///< IDxcBlobUtf8 or IDxcBlobWide - text directed at stdout.
  666. DXC_OUT_TIME_REPORT =
  667. 12, ///< IDxcBlobUtf8 or IDxcBlobWide - text directed at stdout.
  668. DXC_OUT_TIME_TRACE =
  669. 13, ///< IDxcBlobUtf8 or IDxcBlobWide - text directed at stdout.
  670. DXC_OUT_LAST = DXC_OUT_TIME_TRACE, ///< Last value for a counter.
  671. DXC_OUT_NUM_ENUMS,
  672. DXC_OUT_FORCE_DWORD = 0xFFFFFFFF
  673. } DXC_OUT_KIND;
  674. static_assert(DXC_OUT_NUM_ENUMS == DXC_OUT_LAST + 1,
  675. "DXC_OUT_* Enum added and last value not updated.");
  676. CROSS_PLATFORM_UUIDOF(IDxcResult, "58346CDA-DDE7-4497-9461-6F87AF5E0659")
  677. /// \brief Result of a DXC operation.
  678. ///
  679. /// DXC operations may have multiple outputs, such as a shader object and
  680. /// errors. This interface provides access to the outputs.
  681. struct IDxcResult : public IDxcOperationResult {
  682. /// \brief Determines whether or not this result has the specified output.
  683. ///
  684. /// \param dxcOutKind The kind of output to check for.
  685. virtual BOOL STDMETHODCALLTYPE HasOutput(_In_ DXC_OUT_KIND dxcOutKind) = 0;
  686. /// \brief Retrieves the specified output.
  687. ///
  688. /// \param dxcOutKind The kind of output to retrieve.
  689. ///
  690. /// \param iid The interface ID of the output interface.
  691. ///
  692. /// \param ppvObject Address of the pointer that receives a pointer to the
  693. /// output.
  694. ///
  695. /// \param ppOutputName Optional address of a pointer to receive the name
  696. /// blob, if there is one.
  697. virtual HRESULT STDMETHODCALLTYPE
  698. GetOutput(_In_ DXC_OUT_KIND dxcOutKind, _In_ REFIID iid,
  699. _COM_Outptr_opt_result_maybenull_ void **ppvObject,
  700. _COM_Outptr_opt_result_maybenull_ IDxcBlobWide **ppOutputName) = 0;
  701. /// \brief Retrieves the number of outputs available in this result.
  702. virtual UINT32 GetNumOutputs() = 0;
  703. /// \brief Retrieves the output kind at the specified index.
  704. virtual DXC_OUT_KIND GetOutputByIndex(UINT32 Index) = 0;
  705. /// \brief Retrieves the primary output kind for this result.
  706. ///
  707. /// See IDxcOperationResult::GetResult() for more information on the primary
  708. /// output kinds.
  709. virtual DXC_OUT_KIND PrimaryOutput() = 0;
  710. };
  711. // Special names for extra output that should get written to specific streams.
  712. #define DXC_EXTRA_OUTPUT_NAME_STDOUT L"*stdout*"
  713. #define DXC_EXTRA_OUTPUT_NAME_STDERR L"*stderr*"
  714. CROSS_PLATFORM_UUIDOF(IDxcExtraOutputs, "319b37a2-a5c2-494a-a5de-4801b2faf989")
  715. /// \brief Additional outputs from a DXC operation.
  716. ///
  717. /// This can be used to obtain outputs that don't have an explicit DXC_OUT_KIND.
  718. /// Use DXC_OUT_EXTRA_OUTPUTS to obtain instances of this.
  719. struct IDxcExtraOutputs : public IUnknown {
  720. /// \brief Retrieves the number of outputs available
  721. virtual UINT32 STDMETHODCALLTYPE GetOutputCount() = 0;
  722. /// \brief Retrieves the specified output.
  723. ///
  724. /// \param uIndex The index of the output to retrieve.
  725. ///
  726. /// \param iid The interface ID of the output interface.
  727. ///
  728. /// \param ppvObject Optional address of the pointer that receives a pointer
  729. /// to the output if there is one.
  730. ///
  731. /// \param ppOutputType Optional address of the pointer that receives the
  732. /// output type name blob if there is one.
  733. ///
  734. /// \param ppOutputName Optional address of the pointer that receives the
  735. /// output name blob if there is one.
  736. virtual HRESULT STDMETHODCALLTYPE
  737. GetOutput(_In_ UINT32 uIndex, _In_ REFIID iid,
  738. _COM_Outptr_opt_result_maybenull_ void **ppvObject,
  739. _COM_Outptr_opt_result_maybenull_ IDxcBlobWide **ppOutputType,
  740. _COM_Outptr_opt_result_maybenull_ IDxcBlobWide **ppOutputName) = 0;
  741. };
  742. CROSS_PLATFORM_UUIDOF(IDxcCompiler3, "228B4687-5A6A-4730-900C-9702B2203F54")
  743. /// \brief Interface to the DirectX Shader Compiler.
  744. ///
  745. /// Use DxcCreateInstance with CLSID_DxcCompiler to obtain an instance of this
  746. /// interface.
  747. struct IDxcCompiler3 : public IUnknown {
  748. /// \brief Compile a shader.
  749. ///
  750. /// IDxcUtils::BuildArguments can be used to assist building the pArguments
  751. /// and argCount parameters.
  752. ///
  753. /// Depending on the arguments, this method can be used to:
  754. ///
  755. /// * Compile a single entry point to the target shader model,
  756. /// * Compile a library to a library target (-T lib_*)
  757. /// * Compile a root signature (-T rootsig_*),
  758. /// * Preprocess HLSL source (-P).
  759. virtual HRESULT STDMETHODCALLTYPE Compile(
  760. _In_ const DxcBuffer *pSource, ///< Source text to compile.
  761. _In_opt_count_(argCount)
  762. LPCWSTR *pArguments, ///< Array of pointers to arguments.
  763. _In_ UINT32 argCount, ///< Number of arguments.
  764. _In_opt_ IDxcIncludeHandler
  765. *pIncludeHandler, ///< user-provided interface to handle include
  766. ///< directives (optional).
  767. _In_ REFIID riid, ///< Interface ID for the result.
  768. _Out_ LPVOID *ppResult ///< IDxcResult: status, buffer, and errors.
  769. ) = 0;
  770. /// \brief Disassemble a program.
  771. virtual HRESULT STDMETHODCALLTYPE Disassemble(
  772. _In_ const DxcBuffer
  773. *pObject, ///< Program to disassemble: dxil container or bitcode.
  774. _In_ REFIID riid, ///< Interface ID for the result.
  775. _Out_ LPVOID
  776. *ppResult ///< IDxcResult: status, disassembly text, and errors.
  777. ) = 0;
  778. };
  779. static const UINT32 DxcValidatorFlags_Default = 0;
  780. static const UINT32 DxcValidatorFlags_InPlaceEdit =
  781. 1; // Validator is allowed to update shader blob in-place.
  782. static const UINT32 DxcValidatorFlags_RootSignatureOnly = 2;
  783. static const UINT32 DxcValidatorFlags_ModuleOnly = 4;
  784. static const UINT32 DxcValidatorFlags_ValidMask = 0x7;
  785. CROSS_PLATFORM_UUIDOF(IDxcValidator, "A6E82BD2-1FD7-4826-9811-2857E797F49A")
  786. /// \brief Interface to DXC shader validator.
  787. ///
  788. /// Use DxcCreateInstance with CLSID_DxcValidator to obtain an instance of this.
  789. struct IDxcValidator : public IUnknown {
  790. /// \brief Validate a shader.
  791. virtual HRESULT STDMETHODCALLTYPE Validate(
  792. _In_ IDxcBlob *pShader, ///< Shader to validate.
  793. _In_ UINT32 Flags, ///< Validation flags.
  794. _COM_Outptr_ IDxcOperationResult *
  795. *ppResult ///< Validation output status, buffer, and errors.
  796. ) = 0;
  797. };
  798. CROSS_PLATFORM_UUIDOF(IDxcValidator2, "458e1fd1-b1b2-4750-a6e1-9c10f03bed92")
  799. /// \brief Interface to DXC shader validator.
  800. ///
  801. /// Use DxcCreateInstance with CLSID_DxcValidator to obtain an instance of this.
  802. struct IDxcValidator2 : public IDxcValidator {
  803. /// \brief Validate a shader with optional debug bitcode.
  804. virtual HRESULT STDMETHODCALLTYPE ValidateWithDebug(
  805. _In_ IDxcBlob *pShader, ///< Shader to validate.
  806. _In_ UINT32 Flags, ///< Validation flags.
  807. _In_opt_ DxcBuffer *pOptDebugBitcode, ///< Optional debug module bitcode
  808. ///< to provide line numbers.
  809. _COM_Outptr_ IDxcOperationResult *
  810. *ppResult ///< Validation output status, buffer, and errors.
  811. ) = 0;
  812. };
  813. CROSS_PLATFORM_UUIDOF(IDxcContainerBuilder,
  814. "334b1f50-2292-4b35-99a1-25588d8c17fe")
  815. /// \brief Interface to DXC container builder.
  816. ///
  817. /// Use DxcCreateInstance with CLSID_DxcContainerBuilder to obtain an instance
  818. /// of this.
  819. struct IDxcContainerBuilder : public IUnknown {
  820. /// \brief Load a DxilContainer to the builder.
  821. virtual HRESULT STDMETHODCALLTYPE
  822. Load(_In_ IDxcBlob *pDxilContainerHeader) = 0;
  823. /// \brief Add a part to the container.
  824. ///
  825. /// \param fourCC The part identifier (eg DXC_PART_PDB).
  826. ///
  827. /// \param pSource The source blob.
  828. virtual HRESULT STDMETHODCALLTYPE AddPart(_In_ UINT32 fourCC,
  829. _In_ IDxcBlob *pSource) = 0;
  830. /// \brief Remove a part from the container.
  831. ///
  832. /// \param fourCC The part identifier (eg DXC_PART_PDB).
  833. ///
  834. /// \return S_OK on success, DXC_E_MISSING_PART if the part was not found, or
  835. /// other standard HRESULT error code.
  836. virtual HRESULT STDMETHODCALLTYPE RemovePart(_In_ UINT32 fourCC) = 0;
  837. /// \brief Build the container.
  838. ///
  839. /// \param ppResult Pointer to variable to receive the result.
  840. virtual HRESULT STDMETHODCALLTYPE
  841. SerializeContainer(_Out_ IDxcOperationResult **ppResult) = 0;
  842. };
  843. CROSS_PLATFORM_UUIDOF(IDxcAssembler, "091f7a26-1c1f-4948-904b-e6e3a8a771d5")
  844. /// \brief Interface to DxcAssembler.
  845. ///
  846. /// Use DxcCreateInstance with CLSID_DxcAssembler to obtain an instance of this.
  847. struct IDxcAssembler : public IUnknown {
  848. /// \brief Assemble DXIL in LL or LLVM bitcode to DXIL container.
  849. virtual HRESULT STDMETHODCALLTYPE AssembleToContainer(
  850. _In_ IDxcBlob *pShader, ///< Shader to assemble.
  851. _COM_Outptr_ IDxcOperationResult *
  852. *ppResult ///< Assembly output status, buffer, and errors.
  853. ) = 0;
  854. };
  855. CROSS_PLATFORM_UUIDOF(IDxcContainerReflection,
  856. "d2c21b26-8350-4bdc-976a-331ce6f4c54c")
  857. /// \brief Interface to DxcContainerReflection.
  858. ///
  859. /// Use DxcCreateInstance with CLSID_DxcContainerReflection to obtain an
  860. /// instance of this.
  861. struct IDxcContainerReflection : public IUnknown {
  862. /// \brief Choose the container to perform reflection on
  863. ///
  864. /// \param pContainer The container to load. If null is passed then this
  865. /// instance will release any held resources.
  866. virtual HRESULT STDMETHODCALLTYPE Load(_In_ IDxcBlob *pContainer) = 0;
  867. /// \brief Retrieves the number of parts in the container.
  868. ///
  869. /// \param pResult Pointer to variable to receive the result.
  870. ///
  871. /// \return S_OK on success, E_NOT_VALID_STATE if a container has not been
  872. /// loaded using Load(), or other standard HRESULT error codes.
  873. virtual HRESULT STDMETHODCALLTYPE GetPartCount(_Out_ UINT32 *pResult) = 0;
  874. /// \brief Retrieve the kind of a specified part.
  875. ///
  876. /// \param idx The index of the part to retrieve the kind of.
  877. ///
  878. /// \param pResult Pointer to variable to receive the result.
  879. ///
  880. /// \return S_OK on success, E_NOT_VALID_STATE if a container has not been
  881. /// loaded using Load(), E_BOUND if idx is out of bounds, or other standard
  882. /// HRESULT error codes.
  883. virtual HRESULT STDMETHODCALLTYPE GetPartKind(UINT32 idx,
  884. _Out_ UINT32 *pResult) = 0;
  885. /// \brief Retrieve the content of a specified part.
  886. ///
  887. /// \param idx The index of the part to retrieve.
  888. ///
  889. /// \param ppResult Pointer to variable to receive the result.
  890. ///
  891. /// \return S_OK on success, E_NOT_VALID_STATE if a container has not been
  892. /// loaded using Load(), E_BOUND if idx is out of bounds, or other standard
  893. /// HRESULT error codes.
  894. virtual HRESULT STDMETHODCALLTYPE
  895. GetPartContent(UINT32 idx, _COM_Outptr_ IDxcBlob **ppResult) = 0;
  896. /// \brief Retrieve the index of the first part with the specified kind.
  897. ///
  898. /// \param kind The kind to search for.
  899. ///
  900. /// \param pResult Pointer to variable to receive the index of the matching
  901. /// part.
  902. ///
  903. /// \return S_OK on success, E_NOT_VALID_STATE if a container has not been
  904. /// loaded using Load(), HRESULT_FROM_WIN32(ERROR_NOT_FOUND) if there is no
  905. /// part with the specified kind, or other standard HRESULT error codes.
  906. virtual HRESULT STDMETHODCALLTYPE
  907. FindFirstPartKind(UINT32 kind, _Out_ UINT32 *pResult) = 0;
  908. /// \brief Retrieve the reflection interface for a specified part.
  909. ///
  910. /// \param idx The index of the part to retrieve the reflection interface of.
  911. ///
  912. /// \param iid The IID of the interface to retrieve.
  913. ///
  914. /// \param ppvObject Pointer to variable to receive the result.
  915. ///
  916. /// Use this with interfaces such as ID3D12ShaderReflection.
  917. ///
  918. /// \return S_OK on success, E_NOT_VALID_STATE if a container has not been
  919. /// loaded using Load(), E_BOUND if idx is out of bounds, or other standard
  920. /// HRESULT error codes.
  921. virtual HRESULT STDMETHODCALLTYPE GetPartReflection(UINT32 idx, REFIID iid,
  922. void **ppvObject) = 0;
  923. };
  924. CROSS_PLATFORM_UUIDOF(IDxcOptimizerPass, "AE2CD79F-CC22-453F-9B6B-B124E7A5204C")
  925. /// \brief An optimizer pass.
  926. ///
  927. /// Instances of this can be obtained via IDxcOptimizer::GetAvailablePass.
  928. struct IDxcOptimizerPass : public IUnknown {
  929. virtual HRESULT STDMETHODCALLTYPE
  930. GetOptionName(_COM_Outptr_ LPWSTR *ppResult) = 0;
  931. virtual HRESULT STDMETHODCALLTYPE
  932. GetDescription(_COM_Outptr_ LPWSTR *ppResult) = 0;
  933. virtual HRESULT STDMETHODCALLTYPE GetOptionArgCount(_Out_ UINT32 *pCount) = 0;
  934. virtual HRESULT STDMETHODCALLTYPE
  935. GetOptionArgName(UINT32 argIndex, _COM_Outptr_ LPWSTR *ppResult) = 0;
  936. virtual HRESULT STDMETHODCALLTYPE
  937. GetOptionArgDescription(UINT32 argIndex, _COM_Outptr_ LPWSTR *ppResult) = 0;
  938. };
  939. CROSS_PLATFORM_UUIDOF(IDxcOptimizer, "25740E2E-9CBA-401B-9119-4FB42F39F270")
  940. /// \brief Interface to DxcOptimizer.
  941. ///
  942. /// Use DxcCreateInstance with CLSID_DxcOptimizer to obtain an instance of this.
  943. struct IDxcOptimizer : public IUnknown {
  944. virtual HRESULT STDMETHODCALLTYPE
  945. GetAvailablePassCount(_Out_ UINT32 *pCount) = 0;
  946. virtual HRESULT STDMETHODCALLTYPE
  947. GetAvailablePass(UINT32 index, _COM_Outptr_ IDxcOptimizerPass **ppResult) = 0;
  948. virtual HRESULT STDMETHODCALLTYPE
  949. RunOptimizer(IDxcBlob *pBlob, _In_count_(optionCount) LPCWSTR *ppOptions,
  950. UINT32 optionCount, _COM_Outptr_ IDxcBlob **pOutputModule,
  951. _COM_Outptr_opt_ IDxcBlobEncoding **ppOutputText) = 0;
  952. };
  953. static const UINT32 DxcVersionInfoFlags_None = 0;
  954. static const UINT32 DxcVersionInfoFlags_Debug = 1; // Matches VS_FF_DEBUG
  955. static const UINT32 DxcVersionInfoFlags_Internal =
  956. 2; // Internal Validator (non-signing)
  957. CROSS_PLATFORM_UUIDOF(IDxcVersionInfo, "b04f5b50-2059-4f12-a8ff-a1e0cde1cc7e")
  958. /// \brief PDB Version information.
  959. ///
  960. /// Use IDxcPdbUtils2::GetVersionInfo to obtain an instance of this.
  961. struct IDxcVersionInfo : public IUnknown {
  962. virtual HRESULT STDMETHODCALLTYPE GetVersion(_Out_ UINT32 *pMajor,
  963. _Out_ UINT32 *pMinor) = 0;
  964. virtual HRESULT STDMETHODCALLTYPE GetFlags(_Out_ UINT32 *pFlags) = 0;
  965. };
  966. CROSS_PLATFORM_UUIDOF(IDxcVersionInfo2, "fb6904c4-42f0-4b62-9c46-983af7da7c83")
  967. /// \brief PDB Version Information.
  968. ///
  969. /// Use IDxcPdbUtils2::GetVersionInfo to obtain a IDxcVersionInfo interface, and
  970. /// then use QueryInterface to obtain an instance of this interface from it.
  971. struct IDxcVersionInfo2 : public IDxcVersionInfo {
  972. virtual HRESULT STDMETHODCALLTYPE GetCommitInfo(
  973. _Out_ UINT32 *pCommitCount, ///< The total number commits.
  974. _Outptr_result_z_ char **pCommitHash ///< The SHA of the latest commit.
  975. ///< Must be CoTaskMemFree()'d.
  976. ) = 0;
  977. };
  978. CROSS_PLATFORM_UUIDOF(IDxcVersionInfo3, "5e13e843-9d25-473c-9ad2-03b2d0b44b1e")
  979. /// \brief PDB Version Information.
  980. ///
  981. /// Use IDxcPdbUtils2::GetVersionInfo to obtain a IDxcVersionInfo interface, and
  982. /// then use QueryInterface to obtain an instance of this interface from it.
  983. struct IDxcVersionInfo3 : public IUnknown {
  984. virtual HRESULT STDMETHODCALLTYPE GetCustomVersionString(
  985. _Outptr_result_z_ char *
  986. *pVersionString ///< Custom version string for compiler. Must be
  987. ///< CoTaskMemFree()'d.
  988. ) = 0;
  989. };
  990. struct DxcArgPair {
  991. const WCHAR *pName;
  992. const WCHAR *pValue;
  993. };
  994. CROSS_PLATFORM_UUIDOF(IDxcPdbUtils, "E6C9647E-9D6A-4C3B-B94C-524B5A6C343D")
  995. /// \deprecated Please use IDxcPdbUtils2 instead.
  996. struct IDxcPdbUtils : public IUnknown {
  997. virtual HRESULT STDMETHODCALLTYPE Load(_In_ IDxcBlob *pPdbOrDxil) = 0;
  998. virtual HRESULT STDMETHODCALLTYPE GetSourceCount(_Out_ UINT32 *pCount) = 0;
  999. virtual HRESULT STDMETHODCALLTYPE
  1000. GetSource(_In_ UINT32 uIndex, _COM_Outptr_ IDxcBlobEncoding **ppResult) = 0;
  1001. virtual HRESULT STDMETHODCALLTYPE
  1002. GetSourceName(_In_ UINT32 uIndex, _Outptr_result_z_ BSTR *pResult) = 0;
  1003. virtual HRESULT STDMETHODCALLTYPE GetFlagCount(_Out_ UINT32 *pCount) = 0;
  1004. virtual HRESULT STDMETHODCALLTYPE
  1005. GetFlag(_In_ UINT32 uIndex, _Outptr_result_z_ BSTR *pResult) = 0;
  1006. virtual HRESULT STDMETHODCALLTYPE GetArgCount(_Out_ UINT32 *pCount) = 0;
  1007. virtual HRESULT STDMETHODCALLTYPE GetArg(_In_ UINT32 uIndex,
  1008. _Outptr_result_z_ BSTR *pResult) = 0;
  1009. virtual HRESULT STDMETHODCALLTYPE GetArgPairCount(_Out_ UINT32 *pCount) = 0;
  1010. virtual HRESULT STDMETHODCALLTYPE
  1011. GetArgPair(_In_ UINT32 uIndex, _Outptr_result_z_ BSTR *pName,
  1012. _Outptr_result_z_ BSTR *pValue) = 0;
  1013. virtual HRESULT STDMETHODCALLTYPE GetDefineCount(_Out_ UINT32 *pCount) = 0;
  1014. virtual HRESULT STDMETHODCALLTYPE
  1015. GetDefine(_In_ UINT32 uIndex, _Outptr_result_z_ BSTR *pResult) = 0;
  1016. virtual HRESULT STDMETHODCALLTYPE
  1017. GetTargetProfile(_Outptr_result_z_ BSTR *pResult) = 0;
  1018. virtual HRESULT STDMETHODCALLTYPE
  1019. GetEntryPoint(_Outptr_result_z_ BSTR *pResult) = 0;
  1020. virtual HRESULT STDMETHODCALLTYPE
  1021. GetMainFileName(_Outptr_result_z_ BSTR *pResult) = 0;
  1022. virtual HRESULT STDMETHODCALLTYPE
  1023. GetHash(_COM_Outptr_ IDxcBlob **ppResult) = 0;
  1024. virtual HRESULT STDMETHODCALLTYPE
  1025. GetName(_Outptr_result_z_ BSTR *pResult) = 0;
  1026. virtual BOOL STDMETHODCALLTYPE IsFullPDB() = 0;
  1027. virtual HRESULT STDMETHODCALLTYPE
  1028. GetFullPDB(_COM_Outptr_ IDxcBlob **ppFullPDB) = 0;
  1029. virtual HRESULT STDMETHODCALLTYPE
  1030. GetVersionInfo(_COM_Outptr_ IDxcVersionInfo **ppVersionInfo) = 0;
  1031. virtual HRESULT STDMETHODCALLTYPE
  1032. SetCompiler(_In_ IDxcCompiler3 *pCompiler) = 0;
  1033. virtual HRESULT STDMETHODCALLTYPE
  1034. CompileForFullPDB(_COM_Outptr_ IDxcResult **ppResult) = 0;
  1035. virtual HRESULT STDMETHODCALLTYPE OverrideArgs(_In_ DxcArgPair *pArgPairs,
  1036. UINT32 uNumArgPairs) = 0;
  1037. virtual HRESULT STDMETHODCALLTYPE
  1038. OverrideRootSignature(_In_ const WCHAR *pRootSignature) = 0;
  1039. };
  1040. CROSS_PLATFORM_UUIDOF(IDxcPdbUtils2, "4315D938-F369-4F93-95A2-252017CC3807")
  1041. /// \brief DxcPdbUtils interface.
  1042. ///
  1043. /// Use DxcCreateInstance with CLSID_DxcPdbUtils to create an instance of this.
  1044. struct IDxcPdbUtils2 : public IUnknown {
  1045. virtual HRESULT STDMETHODCALLTYPE Load(_In_ IDxcBlob *pPdbOrDxil) = 0;
  1046. virtual HRESULT STDMETHODCALLTYPE GetSourceCount(_Out_ UINT32 *pCount) = 0;
  1047. virtual HRESULT STDMETHODCALLTYPE
  1048. GetSource(_In_ UINT32 uIndex, _COM_Outptr_ IDxcBlobEncoding **ppResult) = 0;
  1049. virtual HRESULT STDMETHODCALLTYPE
  1050. GetSourceName(_In_ UINT32 uIndex, _COM_Outptr_ IDxcBlobWide **ppResult) = 0;
  1051. virtual HRESULT STDMETHODCALLTYPE GetLibraryPDBCount(UINT32 *pCount) = 0;
  1052. virtual HRESULT STDMETHODCALLTYPE GetLibraryPDB(
  1053. _In_ UINT32 uIndex, _COM_Outptr_ IDxcPdbUtils2 **ppOutPdbUtils,
  1054. _COM_Outptr_opt_result_maybenull_ IDxcBlobWide **ppLibraryName) = 0;
  1055. virtual HRESULT STDMETHODCALLTYPE GetFlagCount(_Out_ UINT32 *pCount) = 0;
  1056. virtual HRESULT STDMETHODCALLTYPE
  1057. GetFlag(_In_ UINT32 uIndex, _COM_Outptr_ IDxcBlobWide **ppResult) = 0;
  1058. virtual HRESULT STDMETHODCALLTYPE GetArgCount(_Out_ UINT32 *pCount) = 0;
  1059. virtual HRESULT STDMETHODCALLTYPE
  1060. GetArg(_In_ UINT32 uIndex, _COM_Outptr_ IDxcBlobWide **ppResult) = 0;
  1061. virtual HRESULT STDMETHODCALLTYPE GetArgPairCount(_Out_ UINT32 *pCount) = 0;
  1062. virtual HRESULT STDMETHODCALLTYPE GetArgPair(
  1063. _In_ UINT32 uIndex, _COM_Outptr_result_maybenull_ IDxcBlobWide **ppName,
  1064. _COM_Outptr_result_maybenull_ IDxcBlobWide **ppValue) = 0;
  1065. virtual HRESULT STDMETHODCALLTYPE GetDefineCount(_Out_ UINT32 *pCount) = 0;
  1066. virtual HRESULT STDMETHODCALLTYPE
  1067. GetDefine(_In_ UINT32 uIndex, _COM_Outptr_ IDxcBlobWide **ppResult) = 0;
  1068. virtual HRESULT STDMETHODCALLTYPE
  1069. GetTargetProfile(_COM_Outptr_result_maybenull_ IDxcBlobWide **ppResult) = 0;
  1070. virtual HRESULT STDMETHODCALLTYPE
  1071. GetEntryPoint(_COM_Outptr_result_maybenull_ IDxcBlobWide **ppResult) = 0;
  1072. virtual HRESULT STDMETHODCALLTYPE
  1073. GetMainFileName(_COM_Outptr_result_maybenull_ IDxcBlobWide **ppResult) = 0;
  1074. virtual HRESULT STDMETHODCALLTYPE
  1075. GetHash(_COM_Outptr_result_maybenull_ IDxcBlob **ppResult) = 0;
  1076. virtual HRESULT STDMETHODCALLTYPE
  1077. GetName(_COM_Outptr_result_maybenull_ IDxcBlobWide **ppResult) = 0;
  1078. virtual HRESULT STDMETHODCALLTYPE GetVersionInfo(
  1079. _COM_Outptr_result_maybenull_ IDxcVersionInfo **ppVersionInfo) = 0;
  1080. virtual HRESULT STDMETHODCALLTYPE GetCustomToolchainID(_Out_ UINT32 *pID) = 0;
  1081. virtual HRESULT STDMETHODCALLTYPE
  1082. GetCustomToolchainData(_COM_Outptr_result_maybenull_ IDxcBlob **ppBlob) = 0;
  1083. virtual HRESULT STDMETHODCALLTYPE
  1084. GetWholeDxil(_COM_Outptr_result_maybenull_ IDxcBlob **ppResult) = 0;
  1085. virtual BOOL STDMETHODCALLTYPE IsFullPDB() = 0;
  1086. virtual BOOL STDMETHODCALLTYPE IsPDBRef() = 0;
  1087. };
  1088. // Note: __declspec(selectany) requires 'extern'
  1089. // On Linux __declspec(selectany) is removed and using 'extern' results in link
  1090. // error.
  1091. #ifdef _MSC_VER
  1092. #define CLSID_SCOPE __declspec(selectany) extern
  1093. #else
  1094. #define CLSID_SCOPE
  1095. #endif
  1096. CLSID_SCOPE const CLSID CLSID_DxcCompiler = {
  1097. 0x73e22d93,
  1098. 0xe6ce,
  1099. 0x47f3,
  1100. {0xb5, 0xbf, 0xf0, 0x66, 0x4f, 0x39, 0xc1, 0xb0}};
  1101. // {EF6A8087-B0EA-4D56-9E45-D07E1A8B7806}
  1102. CLSID_SCOPE const GUID CLSID_DxcLinker = {
  1103. 0xef6a8087,
  1104. 0xb0ea,
  1105. 0x4d56,
  1106. {0x9e, 0x45, 0xd0, 0x7e, 0x1a, 0x8b, 0x78, 0x6}};
  1107. // {CD1F6B73-2AB0-484D-8EDC-EBE7A43CA09F}
  1108. CLSID_SCOPE const CLSID CLSID_DxcDiaDataSource = {
  1109. 0xcd1f6b73,
  1110. 0x2ab0,
  1111. 0x484d,
  1112. {0x8e, 0xdc, 0xeb, 0xe7, 0xa4, 0x3c, 0xa0, 0x9f}};
  1113. // {3E56AE82-224D-470F-A1A1-FE3016EE9F9D}
  1114. CLSID_SCOPE const CLSID CLSID_DxcCompilerArgs = {
  1115. 0x3e56ae82,
  1116. 0x224d,
  1117. 0x470f,
  1118. {0xa1, 0xa1, 0xfe, 0x30, 0x16, 0xee, 0x9f, 0x9d}};
  1119. // {6245D6AF-66E0-48FD-80B4-4D271796748C}
  1120. CLSID_SCOPE const GUID CLSID_DxcLibrary = {
  1121. 0x6245d6af,
  1122. 0x66e0,
  1123. 0x48fd,
  1124. {0x80, 0xb4, 0x4d, 0x27, 0x17, 0x96, 0x74, 0x8c}};
  1125. CLSID_SCOPE const GUID CLSID_DxcUtils = CLSID_DxcLibrary;
  1126. // {8CA3E215-F728-4CF3-8CDD-88AF917587A1}
  1127. CLSID_SCOPE const GUID CLSID_DxcValidator = {
  1128. 0x8ca3e215,
  1129. 0xf728,
  1130. 0x4cf3,
  1131. {0x8c, 0xdd, 0x88, 0xaf, 0x91, 0x75, 0x87, 0xa1}};
  1132. // {D728DB68-F903-4F80-94CD-DCCF76EC7151}
  1133. CLSID_SCOPE const GUID CLSID_DxcAssembler = {
  1134. 0xd728db68,
  1135. 0xf903,
  1136. 0x4f80,
  1137. {0x94, 0xcd, 0xdc, 0xcf, 0x76, 0xec, 0x71, 0x51}};
  1138. // {b9f54489-55b8-400c-ba3a-1675e4728b91}
  1139. CLSID_SCOPE const GUID CLSID_DxcContainerReflection = {
  1140. 0xb9f54489,
  1141. 0x55b8,
  1142. 0x400c,
  1143. {0xba, 0x3a, 0x16, 0x75, 0xe4, 0x72, 0x8b, 0x91}};
  1144. // {AE2CD79F-CC22-453F-9B6B-B124E7A5204C}
  1145. CLSID_SCOPE const GUID CLSID_DxcOptimizer = {
  1146. 0xae2cd79f,
  1147. 0xcc22,
  1148. 0x453f,
  1149. {0x9b, 0x6b, 0xb1, 0x24, 0xe7, 0xa5, 0x20, 0x4c}};
  1150. // {94134294-411f-4574-b4d0-8741e25240d2}
  1151. CLSID_SCOPE const GUID CLSID_DxcContainerBuilder = {
  1152. 0x94134294,
  1153. 0x411f,
  1154. 0x4574,
  1155. {0xb4, 0xd0, 0x87, 0x41, 0xe2, 0x52, 0x40, 0xd2}};
  1156. // {54621dfb-f2ce-457e-ae8c-ec355faeec7c}
  1157. CLSID_SCOPE const GUID CLSID_DxcPdbUtils = {
  1158. 0x54621dfb,
  1159. 0xf2ce,
  1160. 0x457e,
  1161. {0xae, 0x8c, 0xec, 0x35, 0x5f, 0xae, 0xec, 0x7c}};
  1162. #endif