dxcpix.h 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // //
  3. // dxcpix.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 with pix debugging. //
  9. // //
  10. ///////////////////////////////////////////////////////////////////////////////
  11. #ifndef __DXC_PIX__
  12. #define __DXC_PIX__
  13. #include "objidl.h"
  14. #include "dxc/dxcapi.h"
  15. struct __declspec(uuid("199d8c13-d312-4197-a2c1-07a532999727"))
  16. IDxcPixType : public IUnknown
  17. {
  18. virtual STDMETHODIMP GetName(
  19. _Outptr_result_z_ BSTR *Name) = 0;
  20. virtual STDMETHODIMP GetSizeInBits(
  21. _Out_ DWORD *GetSizeInBits) = 0;
  22. virtual STDMETHODIMP UnAlias(
  23. _COM_Outptr_ IDxcPixType** ppBaseType) = 0;
  24. };
  25. struct __declspec(uuid("d9df2c8b-2773-466d-9bc2-d848d8496bf6"))
  26. IDxcPixConstType: public IDxcPixType
  27. {
  28. };
  29. struct __declspec(uuid("7bfca9c0-1ed0-429c-9dc2-c75597d821d2"))
  30. IDxcPixTypedefType: public IDxcPixType
  31. {
  32. };
  33. struct __declspec(uuid("246e1652-ed2a-4ffc-a949-43bf63750ee5"))
  34. IDxcPixScalarType : public IDxcPixType
  35. {
  36. };
  37. struct __declspec(uuid("9ba0d9d3-457b-426f-8019-9f3849982aa2"))
  38. IDxcPixArrayType : public IDxcPixType
  39. {
  40. virtual STDMETHODIMP GetNumElements(
  41. _Out_ DWORD* ppNumElements) = 0;
  42. virtual STDMETHODIMP GetIndexedType(
  43. _COM_Outptr_ IDxcPixType **ppElementType) = 0;
  44. virtual STDMETHODIMP GetElementType(
  45. _COM_Outptr_ IDxcPixType** ppElementType) = 0;
  46. };
  47. struct __declspec(uuid("6c707d08-7995-4a84-bae5-e6d8291f3b78"))
  48. IDxcPixStructField : public IUnknown
  49. {
  50. virtual STDMETHODIMP GetName(
  51. _Outptr_result_z_ BSTR *Name) = 0;
  52. virtual STDMETHODIMP GetType(
  53. _COM_Outptr_ IDxcPixType** ppType) = 0;
  54. virtual STDMETHODIMP GetOffsetInBits(
  55. _Out_ DWORD *pOffsetInBits) = 0;
  56. };
  57. struct __declspec(uuid("24c08c44-684b-4b1c-b41b-f8772383d074"))
  58. IDxcPixStructType : public IDxcPixType
  59. {
  60. virtual STDMETHODIMP GetNumFields(
  61. _Out_ DWORD* ppNumFields) = 0;
  62. virtual STDMETHODIMP GetFieldByIndex(
  63. DWORD dwIndex,
  64. _COM_Outptr_ IDxcPixStructField **ppField) = 0;
  65. virtual STDMETHODIMP GetFieldByName(
  66. _In_ LPCWSTR lpName,
  67. _COM_Outptr_ IDxcPixStructField** ppField) = 0;
  68. };
  69. struct __declspec(uuid("74d522f5-16c4-40cb-867b-4b4149e3db0e"))
  70. IDxcPixDxilStorage : public IUnknown
  71. {
  72. virtual STDMETHODIMP AccessField(
  73. _In_ LPCWSTR Name,
  74. _COM_Outptr_ IDxcPixDxilStorage** ppResult) = 0;
  75. virtual STDMETHODIMP Index(
  76. _In_ DWORD Index,
  77. _COM_Outptr_ IDxcPixDxilStorage** ppResult) = 0;
  78. virtual STDMETHODIMP GetRegisterNumber(
  79. _Out_ DWORD* pRegNum) = 0;
  80. virtual STDMETHODIMP GetIsAlive() = 0;
  81. virtual STDMETHODIMP GetType(
  82. _COM_Outptr_ IDxcPixType** ppType) = 0;
  83. };
  84. struct __declspec(uuid("2f954b30-61a7-4348-95b1-2db356a75cde"))
  85. IDxcPixVariable : public IUnknown
  86. {
  87. virtual STDMETHODIMP GetName(
  88. _Outptr_result_z_ BSTR *Name) = 0;
  89. virtual STDMETHODIMP GetType(
  90. _COM_Outptr_ IDxcPixType** ppType) = 0;
  91. virtual STDMETHODIMP GetStorage(
  92. _COM_Outptr_ IDxcPixDxilStorage **ppStorage) = 0;
  93. };
  94. struct __declspec(uuid("c59d302f-34a2-4fe5-9646-32ce7a52d03f"))
  95. IDxcPixDxilLiveVariables : public IUnknown
  96. {
  97. virtual STDMETHODIMP GetCount(
  98. _Out_ DWORD *dwSize) = 0;
  99. virtual STDMETHODIMP GetVariableByIndex(
  100. _In_ DWORD Index,
  101. _COM_Outptr_ IDxcPixVariable ** ppVariable) = 0;
  102. virtual STDMETHODIMP GetVariableByName(
  103. _In_ LPCWSTR Name,
  104. _COM_Outptr_ IDxcPixVariable** ppVariable) = 0;
  105. };
  106. struct __declspec(uuid("eb71f85e-8542-44b5-87da-9d76045a1910"))
  107. IDxcPixDxilInstructionOffsets : public IUnknown
  108. {
  109. virtual STDMETHODIMP_(DWORD) GetCount() = 0;
  110. virtual STDMETHODIMP_(DWORD) GetOffsetByIndex(_In_ DWORD Index) = 0;
  111. };
  112. struct __declspec(uuid("761c833d-e7b8-4624-80f8-3a3fb4146342"))
  113. IDxcPixDxilSourceLocations : public IUnknown
  114. {
  115. virtual STDMETHODIMP_(DWORD) GetCount() = 0;
  116. virtual STDMETHODIMP_(DWORD) GetLineNumberByIndex(_In_ DWORD Index) = 0;
  117. virtual STDMETHODIMP_(DWORD) GetColumnByIndex(_In_ DWORD Index) = 0;
  118. virtual STDMETHODIMP GetFileNameByIndex(_In_ DWORD Index, _Outptr_result_z_ BSTR *Name) = 0;
  119. };
  120. struct __declspec(uuid("b875638e-108a-4d90-a53a-68d63773cb38"))
  121. IDxcPixDxilDebugInfo : public IUnknown
  122. {
  123. virtual STDMETHODIMP GetLiveVariablesAt(
  124. _In_ DWORD InstructionOffset,
  125. _COM_Outptr_ IDxcPixDxilLiveVariables **ppLiveVariables) = 0;
  126. virtual STDMETHODIMP IsVariableInRegister(
  127. _In_ DWORD InstructionOffset,
  128. _In_ const wchar_t *VariableName) = 0;
  129. virtual STDMETHODIMP GetFunctionName(
  130. _In_ DWORD InstructionOffset,
  131. _Outptr_result_z_ BSTR *ppFunctionName) = 0;
  132. virtual STDMETHODIMP GetStackDepth(
  133. _In_ DWORD InstructionOffset,
  134. _Out_ DWORD* StackDepth) = 0;
  135. virtual STDMETHODIMP InstructionOffsetsFromSourceLocation(
  136. _In_ const wchar_t *FileName,
  137. _In_ DWORD SourceLine,
  138. _In_ DWORD SourceColumn,
  139. _COM_Outptr_ IDxcPixDxilInstructionOffsets** ppOffsets) = 0;
  140. virtual STDMETHODIMP SourceLocationsFromInstructionOffset(
  141. _In_ DWORD InstructionOffset,
  142. _COM_Outptr_ IDxcPixDxilSourceLocations**ppSourceLocations) = 0;
  143. };
  144. struct __declspec(uuid("61b16c95-8799-4ed8-bdb0-3b6c08a141b4"))
  145. IDxcPixCompilationInfo : public IUnknown
  146. {
  147. virtual STDMETHODIMP GetSourceFile(
  148. _In_ DWORD SourceFileOrdinal,
  149. _Outptr_result_z_ BSTR *pSourceName,
  150. _Outptr_result_z_ BSTR *pSourceContents) = 0;
  151. virtual STDMETHODIMP GetArguments(
  152. _Outptr_result_z_ BSTR *pArguments) = 0;
  153. virtual STDMETHODIMP GetMacroDefinitions(
  154. _Outptr_result_z_ BSTR *pMacroDefinitions) = 0;
  155. virtual STDMETHODIMP GetEntryPointFile(
  156. _Outptr_result_z_ BSTR *pEntryPointFile) = 0;
  157. virtual STDMETHODIMP GetHlslTarget(
  158. _Outptr_result_z_ BSTR *pHlslTarget) = 0;
  159. virtual STDMETHODIMP GetEntryPoint(
  160. _Outptr_result_z_ BSTR *pEntryPoint) = 0;
  161. };
  162. struct __declspec(uuid("9c2a040d-8068-44ec-8c68-8bfef1b43789"))
  163. IDxcPixDxilDebugInfoFactory : public IUnknown
  164. {
  165. virtual STDMETHODIMP NewDxcPixDxilDebugInfo(
  166. _COM_Outptr_ IDxcPixDxilDebugInfo **ppDxilDebugInfo) = 0;
  167. virtual STDMETHODIMP NewDxcPixCompilationInfo(
  168. _COM_Outptr_ IDxcPixCompilationInfo **ppCompilationInfo) = 0;
  169. };
  170. #ifndef CLSID_SCOPE
  171. #ifdef _MSC_VER
  172. #define CLSID_SCOPE __declspec(selectany) extern
  173. #else
  174. #define CLSID_SCOPE
  175. #endif
  176. #endif // !CLSID_SCOPE
  177. CLSID_SCOPE const CLSID
  178. CLSID_DxcPixDxilDebugger = {/* a712b622-5af7-4c77-a965-c83ac1a5d8bc */
  179. 0xa712b622,
  180. 0x5af7,
  181. 0x4c77,
  182. {0xa9, 0x65, 0xc8, 0x3a, 0xc1, 0xa5, 0xd8, 0xbc}};
  183. #endif