| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
#ifndef __dxcore_interface_h__ |
| 8 |
#define __dxcore_interface_h__ |
| 9 |
|
| 10 |
#ifndef COM_NO_WINDOWS_H |
| 11 |
#include "windows.h" |
| 12 |
#include "ole2.h" |
| 13 |
#endif |
| 14 |
|
| 15 |
#include <stdint.h> |
| 16 |
|
| 17 |
#ifdef __cplusplus |
| 18 |
|
| 19 |
#define _FACDXCORE 0x880 |
| 20 |
#define MAKE_DXCORE_HRESULT( code ) MAKE_HRESULT( 1, _FACDXCORE, code ) |
| 21 |
|
| 22 |
enum class DXCoreAdapterProperty : uint32_t |
| 23 |
{ |
| 24 |
InstanceLuid = 0, |
| 25 |
DriverVersion = 1, |
| 26 |
DriverDescription = 2, |
| 27 |
HardwareID = 3, |
| 28 |
KmdModelVersion = 4, |
| 29 |
ComputePreemptionGranularity = 5, |
| 30 |
GraphicsPreemptionGranularity = 6, |
| 31 |
DedicatedAdapterMemory = 7, |
| 32 |
DedicatedSystemMemory = 8, |
| 33 |
SharedSystemMemory = 9, |
| 34 |
AcgCompatible = 10, |
| 35 |
IsHardware = 11, |
| 36 |
IsIntegrated = 12, |
| 37 |
IsDetachable = 13, |
| 38 |
HardwareIDParts = 14, |
| 39 |
PhysicalAdapterCount = 15, |
| 40 |
AdapterEngineCount = 16, |
| 41 |
AdapterEngineName = 17, |
| 42 |
}; |
| 43 |
|
| 44 |
enum class DXCoreAdapterState : uint32_t |
| 45 |
{ |
| 46 |
IsDriverUpdateInProgress = 0, |
| 47 |
AdapterMemoryBudget = 1, |
| 48 |
AdapterMemoryUsageBytes = 2, |
| 49 |
AdapterMemoryUsageByProcessBytes = 3, |
| 50 |
AdapterEngineRunningTimeMicroseconds = 4, |
| 51 |
AdapterEngineRunningTimeByProcessMicroseconds = 5, |
| 52 |
AdapterTemperatureCelsius = 6, |
| 53 |
AdapterInUseProcessCount = 7, |
| 54 |
AdapterInUseProcessSet = 8, |
| 55 |
AdapterEngineFrequencyHertz = 9, |
| 56 |
AdapterMemoryFrequencyHertz = 10 |
| 57 |
}; |
| 58 |
|
| 59 |
enum class DXCoreSegmentGroup : uint32_t |
| 60 |
{ |
| 61 |
Local = 0, |
| 62 |
NonLocal = 1 |
| 63 |
}; |
| 64 |
|
| 65 |
enum class DXCoreNotificationType : uint32_t |
| 66 |
{ |
| 67 |
AdapterListStale = 0, |
| 68 |
AdapterNoLongerValid = 1, |
| 69 |
AdapterBudgetChange = 2, |
| 70 |
AdapterHardwareContentProtectionTeardown = 3 |
| 71 |
}; |
| 72 |
|
| 73 |
enum class DXCoreAdapterPreference : uint32_t |
| 74 |
{ |
| 75 |
Hardware = 0, |
| 76 |
MinimumPower = 1, |
| 77 |
HighPerformance = 2 |
| 78 |
}; |
| 79 |
|
| 80 |
enum class DXCoreWorkload : uint32_t |
| 81 |
{ |
| 82 |
Graphics = 0, |
| 83 |
Compute = 1, |
| 84 |
Media = 2, |
| 85 |
MachineLearning = 3, |
| 86 |
}; |
| 87 |
|
| 88 |
enum class DXCoreRuntimeFilterFlags : uint32_t |
| 89 |
{ |
| 90 |
None = 0x0, |
| 91 |
D3D11 = 0x1, |
| 92 |
D3D12 = 0x2 |
| 93 |
}; |
| 94 |
|
| 95 |
DEFINE_ENUM_FLAG_OPERATORS(DXCoreRuntimeFilterFlags) |
| 96 |
|
| 97 |
enum class DXCoreHardwareTypeFilterFlags : uint32_t |
| 98 |
{ |
| 99 |
None = 0x0, |
| 100 |
GPU = 0x1, |
| 101 |
ComputeAccelerator = 0x2, |
| 102 |
NPU = 0x4, |
| 103 |
MediaAccelerator = 0x8 |
| 104 |
}; |
| 105 |
|
| 106 |
DEFINE_ENUM_FLAG_OPERATORS(DXCoreHardwareTypeFilterFlags) |
| 107 |
|
| 108 |
struct DXCoreHardwareID |
| 109 |
{ |
| 110 |
uint32_t vendorID; |
| 111 |
uint32_t deviceID; |
| 112 |
uint32_t subSysID; |
| 113 |
uint32_t revision; |
| 114 |
}; |
| 115 |
|
| 116 |
struct DXCoreHardwareIDParts |
| 117 |
{ |
| 118 |
uint32_t vendorID; |
| 119 |
uint32_t deviceID; |
| 120 |
uint32_t subSystemID; |
| 121 |
uint32_t subVendorID; |
| 122 |
uint32_t revisionID; |
| 123 |
}; |
| 124 |
|
| 125 |
struct DXCoreAdapterMemoryBudgetNodeSegmentGroup |
| 126 |
{ |
| 127 |
uint32_t nodeIndex; |
| 128 |
DXCoreSegmentGroup segmentGroup; |
| 129 |
}; |
| 130 |
|
| 131 |
struct DXCoreAdapterMemoryBudget |
| 132 |
{ |
| 133 |
uint64_t budget; |
| 134 |
uint64_t currentUsage; |
| 135 |
uint64_t availableForReservation; |
| 136 |
uint64_t currentReservation; |
| 137 |
}; |
| 138 |
|
| 139 |
struct DXCoreAdapterEngineIndex |
| 140 |
{ |
| 141 |
uint32_t physicalAdapterIndex; |
| 142 |
uint32_t engineIndex; |
| 143 |
}; |
| 144 |
|
| 145 |
struct DXCoreEngineQueryInput |
| 146 |
{ |
| 147 |
DXCoreAdapterEngineIndex adapterEngineIndex; |
| 148 |
uint32_t processId; |
| 149 |
}; |
| 150 |
|
| 151 |
struct DXCoreEngineQueryOutput |
| 152 |
{ |
| 153 |
uint64_t runningTime; |
| 154 |
bool processQuerySucceeded; |
| 155 |
}; |
| 156 |
|
| 157 |
enum class DXCoreMemoryType : uint32_t |
| 158 |
{ |
| 159 |
Dedicated = 0, |
| 160 |
Shared = 1 |
| 161 |
}; |
| 162 |
|
| 163 |
struct DXCoreMemoryUsage |
| 164 |
{ |
| 165 |
uint64_t committed; |
| 166 |
uint64_t resident; |
| 167 |
}; |
| 168 |
|
| 169 |
struct DXCoreMemoryQueryInput |
| 170 |
{ |
| 171 |
uint32_t physicalAdapterIndex; |
| 172 |
DXCoreMemoryType memoryType; |
| 173 |
}; |
| 174 |
|
| 175 |
struct DXCoreProcessMemoryQueryInput |
| 176 |
{ |
| 177 |
uint32_t physicalAdapterIndex; |
| 178 |
DXCoreMemoryType memoryType; |
| 179 |
uint32_t processId; |
| 180 |
}; |
| 181 |
|
| 182 |
struct DXCoreProcessMemoryQueryOutput |
| 183 |
{ |
| 184 |
DXCoreMemoryUsage memoryUsage; |
| 185 |
bool processQuerySucceeded; |
| 186 |
}; |
| 187 |
|
| 188 |
struct DXCoreAdapterProcessSetQueryInput |
| 189 |
{ |
| 190 |
uint32_t arraySize; |
| 191 |
_Field_size_(arraySize) uint32_t* processIds; |
| 192 |
}; |
| 193 |
|
| 194 |
struct DXCoreAdapterProcessSetQueryOutput |
| 195 |
{ |
| 196 |
uint32_t processesWritten; |
| 197 |
uint32_t processesTotal; |
| 198 |
}; |
| 199 |
|
| 200 |
struct DXCoreEngineNamePropertyInput |
| 201 |
{ |
| 202 |
DXCoreAdapterEngineIndex adapterEngineIndex; |
| 203 |
uint32_t engineNameLength; |
| 204 |
_Field_size_(engineNameLength) wchar_t *engineName; |
| 205 |
}; |
| 206 |
|
| 207 |
struct DXCoreEngineNamePropertyOutput |
| 208 |
{ |
| 209 |
uint32_t engineNameLength; |
| 210 |
}; |
| 211 |
|
| 212 |
struct DXCoreFrequencyQueryOutput |
| 213 |
{ |
| 214 |
uint64_t frequency; |
| 215 |
uint64_t maxFrequency; |
| 216 |
uint64_t maxOverclockedFrequency; |
| 217 |
}; |
| 218 |
|
| 219 |
typedef void (STDMETHODCALLTYPE *PFN_DXCORE_NOTIFICATION_CALLBACK)( |
| 220 |
DXCoreNotificationType notificationType, |
| 221 |
_In_ IUnknown *object, |
| 222 |
_In_opt_ void *context); |
| 223 |
|
| 224 |
static_assert(sizeof(bool) == 1, "bool assumed as one byte"); |
| 225 |
|
| 226 |
DEFINE_GUID(IID_IDXCoreAdapterFactory, 0x78ee5945, 0xc36e, 0x4b13, 0xa6, 0x69, 0x00, 0x5d, 0xd1, 0x1c, 0x0f, 0x06); |
| 227 |
DEFINE_GUID(IID_IDXCoreAdapterFactory1, 0xd5682e19, 0x6d21, 0x401c, 0x82, 0x7a, 0x9a, 0x51, 0xa4, 0xea, 0x35, 0xd7); |
| 228 |
DEFINE_GUID(IID_IDXCoreAdapterList, 0x526c7776, 0x40e9, 0x459b, 0xb7, 0x11, 0xf3, 0x2a, 0xd7, 0x6d, 0xfc, 0x28); |
| 229 |
DEFINE_GUID(IID_IDXCoreAdapter, 0xf0db4c7f, 0xfe5a, 0x42a2, 0xbd, 0x62, 0xf2, 0xa6, 0xcf, 0x6f, 0xc8, 0x3e); |
| 230 |
DEFINE_GUID(IID_IDXCoreAdapter1, 0xa0783366, 0xcfa3, 0x43be, 0x9d, 0x79, 0x55, 0xb2, 0xda, 0x97, 0xc6, 0x3c); |
| 231 |
|
| 232 |
DEFINE_GUID(DXCORE_ADAPTER_ATTRIBUTE_D3D11_GRAPHICS, 0x8c47866b, 0x7583, 0x450d, 0xf0, 0xf0, 0x6b, 0xad, 0xa8, 0x95, 0xaf, 0x4b); |
| 233 |
DEFINE_GUID(DXCORE_ADAPTER_ATTRIBUTE_D3D12_GRAPHICS, 0x0c9ece4d, 0x2f6e, 0x4f01, 0x8c, 0x96, 0xe8, 0x9e, 0x33, 0x1b, 0x47, 0xb1); |
| 234 |
DEFINE_GUID(DXCORE_ADAPTER_ATTRIBUTE_D3D12_CORE_COMPUTE, 0x248e2800, 0xa793, 0x4724, 0xab, 0xaa, 0x23, 0xa6, 0xde, 0x1b, 0xe0, 0x90); |
| 235 |
DEFINE_GUID(DXCORE_ADAPTER_ATTRIBUTE_D3D12_GENERIC_ML, 0xb71b0d41, 0x1088, 0x422f, 0xa2, 0x7c, 0x2, 0x50, 0xb7, 0xd3, 0xa9, 0x88); |
| 236 |
DEFINE_GUID(DXCORE_ADAPTER_ATTRIBUTE_D3D12_GENERIC_MEDIA, 0x8eb2c848, 0x82f6, 0x4b49, 0xaa, 0x87, 0xae, 0xcf, 0xcf, 0x1, 0x74, 0xc6); |
| 237 |
|
| 238 |
DEFINE_GUID(DXCORE_HARDWARE_TYPE_ATTRIBUTE_GPU, 0xb69eb219, 0x3ded, 0x4464, 0x97, 0x9f, 0xa0, 0xb, 0xd4, 0x68, 0x70, 0x6); |
| 239 |
DEFINE_GUID(DXCORE_HARDWARE_TYPE_ATTRIBUTE_COMPUTE_ACCELERATOR, 0xe0b195da, 0x58ef, 0x4a22, 0x90, 0xf1, 0x1f, 0x28, 0x16, 0x9c, 0xab, 0x8d); |
| 240 |
DEFINE_GUID(DXCORE_HARDWARE_TYPE_ATTRIBUTE_NPU, 0xd46140c4, 0xadd7, 0x451b, 0x9e, 0x56, 0x6, 0xfe, 0x8c, 0x3b, 0x58, 0xed); |
| 241 |
DEFINE_GUID(DXCORE_HARDWARE_TYPE_ATTRIBUTE_MEDIA_ACCELERATOR, 0x66bdb96a, 0x50b, 0x44c7, 0xa4, 0xfd, 0xd1, 0x44, 0xce, 0xa, 0xb4, 0x43); |
| 242 |
|
| 243 |
|
| 244 |
MIDL_INTERFACE("f0db4c7f-fe5a-42a2-bd62-f2a6cf6fc83e") |
| 245 |
IDXCoreAdapter : public IUnknown |
| 246 |
{ |
| 247 |
public: |
| 248 |
virtual bool STDMETHODCALLTYPE IsValid() = 0; |
| 249 |
|
| 250 |
virtual bool STDMETHODCALLTYPE IsAttributeSupported( |
| 251 |
REFGUID attributeGUID) = 0; |
| 252 |
|
| 253 |
virtual bool STDMETHODCALLTYPE IsPropertySupported( |
| 254 |
DXCoreAdapterProperty property) = 0; |
| 255 |
|
| 256 |
virtual HRESULT STDMETHODCALLTYPE GetProperty( |
| 257 |
DXCoreAdapterProperty property, |
| 258 |
size_t bufferSize, |
| 259 |
_Out_writes_bytes_(bufferSize) void *propertyData) = 0; |
| 260 |
|
| 261 |
template <class T> |
| 262 |
HRESULT GetProperty( |
| 263 |
DXCoreAdapterProperty property, |
| 264 |
_Out_writes_bytes_(sizeof(T)) T *propertyData) |
| 265 |
{ |
| 266 |
return GetProperty(property, |
| 267 |
sizeof(T), |
| 268 |
(void*)propertyData); |
| 269 |
} |
| 270 |
|
| 271 |
virtual HRESULT STDMETHODCALLTYPE GetPropertySize( |
| 272 |
DXCoreAdapterProperty property, |
| 273 |
_Out_ size_t *bufferSize) = 0; |
| 274 |
|
| 275 |
virtual bool STDMETHODCALLTYPE IsQueryStateSupported( |
| 276 |
DXCoreAdapterState property) = 0; |
| 277 |
|
| 278 |
virtual HRESULT STDMETHODCALLTYPE QueryState( |
| 279 |
DXCoreAdapterState state, |
| 280 |
size_t inputStateDetailsSize, |
| 281 |
_In_reads_bytes_opt_(inputStateDetailsSize) const void *inputStateDetails, |
| 282 |
size_t outputBufferSize, |
| 283 |
_Out_writes_bytes_(outputBufferSize) void *outputBuffer) = 0; |
| 284 |
|
| 285 |
template <class T1, class T2> |
| 286 |
HRESULT QueryState( |
| 287 |
DXCoreAdapterState state, |
| 288 |
_In_reads_bytes_opt_(sizeof(T1)) const T1 *inputStateDetails, |
| 289 |
_Out_writes_bytes_(sizeof(T2)) T2 *outputBuffer) |
| 290 |
{ |
| 291 |
return QueryState(state, |
| 292 |
sizeof(T1), |
| 293 |
(const void*)inputStateDetails, |
| 294 |
sizeof(T2), |
| 295 |
(void*)outputBuffer); |
| 296 |
} |
| 297 |
|
| 298 |
template <class T> |
| 299 |
HRESULT QueryState( |
| 300 |
DXCoreAdapterState state, |
| 301 |
_Out_writes_bytes_(sizeof(T)) T *outputBuffer) |
| 302 |
{ |
| 303 |
return QueryState(state, |
| 304 |
0, |
| 305 |
nullptr, |
| 306 |
sizeof(T), |
| 307 |
(void*)outputBuffer); |
| 308 |
} |
| 309 |
|
| 310 |
virtual bool STDMETHODCALLTYPE IsSetStateSupported( |
| 311 |
DXCoreAdapterState property) = 0; |
| 312 |
|
| 313 |
virtual HRESULT STDMETHODCALLTYPE SetState( |
| 314 |
DXCoreAdapterState state, |
| 315 |
size_t inputStateDetailsSize, |
| 316 |
_In_reads_bytes_opt_(inputStateDetailsSize) const void *inputStateDetails, |
| 317 |
size_t inputDataSize, |
| 318 |
_In_reads_bytes_(inputDataSize) const void *inputData) = 0; |
| 319 |
|
| 320 |
template <class T1, class T2> |
| 321 |
HRESULT SetState( |
| 322 |
DXCoreAdapterState state, |
| 323 |
const T1 *inputStateDetails, |
| 324 |
const T2 *inputData) |
| 325 |
{ |
| 326 |
return SetState(state, |
| 327 |
sizeof(T1), |
| 328 |
(const void*)inputStateDetails, |
| 329 |
sizeof(T2), |
| 330 |
(const void*)inputData); |
| 331 |
} |
| 332 |
|
| 333 |
virtual HRESULT STDMETHODCALLTYPE GetFactory( |
| 334 |
REFIID riid, |
| 335 |
_COM_Outptr_ void** ppvFactory |
| 336 |
) = 0; |
| 337 |
|
| 338 |
template <class T> |
| 339 |
HRESULT GetFactory( |
| 340 |
_COM_Outptr_ T** ppvFactory |
| 341 |
) |
| 342 |
{ |
| 343 |
return GetFactory(IID_PPV_ARGS(ppvFactory)); |
| 344 |
} |
| 345 |
}; |
| 346 |
|
| 347 |
|
| 348 |
MIDL_INTERFACE("a0783366-cfa3-43be-9d79-55b2da97c63c") |
| 349 |
IDXCoreAdapter1 : public IDXCoreAdapter |
| 350 |
{ |
| 351 |
public: |
| 352 |
virtual HRESULT STDMETHODCALLTYPE GetPropertyWithInput( |
| 353 |
DXCoreAdapterProperty property, |
| 354 |
size_t inputPropertyDetailsSize, |
| 355 |
_In_reads_bytes_opt_(inputPropertyDetailsSize) const void *inputPropertyDetails, |
| 356 |
size_t outputBufferSize, |
| 357 |
_Out_writes_bytes_(outputBufferSize) void *outputBuffer) = 0; |
| 358 |
|
| 359 |
template <class T1, class T2> |
| 360 |
HRESULT GetPropertyWithInput( |
| 361 |
DXCoreAdapterProperty property, |
| 362 |
_In_reads_bytes_opt_(sizeof(T1)) const T1 *inputPropertyDetails, |
| 363 |
_Out_writes_bytes_(sizeof(T2)) T2 *outputBuffer) |
| 364 |
{ |
| 365 |
return GetPropertyWithInput(property, |
| 366 |
sizeof(T1), |
| 367 |
(const void*)inputPropertyDetails, |
| 368 |
sizeof(T2), |
| 369 |
(void*)outputBuffer); |
| 370 |
} |
| 371 |
}; |
| 372 |
|
| 373 |
|
| 374 |
MIDL_INTERFACE("526c7776-40e9-459b-b711-f32ad76dfc28") |
| 375 |
IDXCoreAdapterList : public IUnknown |
| 376 |
{ |
| 377 |
public: |
| 378 |
virtual HRESULT STDMETHODCALLTYPE GetAdapter( |
| 379 |
uint32_t index, |
| 380 |
REFIID riid, |
| 381 |
_COM_Outptr_ void **ppvAdapter) = 0; |
| 382 |
|
| 383 |
template<class T> |
| 384 |
HRESULT STDMETHODCALLTYPE GetAdapter( |
| 385 |
uint32_t index, |
| 386 |
_COM_Outptr_ T **ppvAdapter) |
| 387 |
{ |
| 388 |
return GetAdapter(index, |
| 389 |
IID_PPV_ARGS(ppvAdapter)); |
| 390 |
} |
| 391 |
|
| 392 |
virtual uint32_t STDMETHODCALLTYPE GetAdapterCount() = 0; |
| 393 |
|
| 394 |
virtual bool STDMETHODCALLTYPE IsStale() = 0; |
| 395 |
|
| 396 |
virtual HRESULT STDMETHODCALLTYPE GetFactory( |
| 397 |
REFIID riid, |
| 398 |
_COM_Outptr_ void** ppvFactory |
| 399 |
) = 0; |
| 400 |
|
| 401 |
template <class T> |
| 402 |
HRESULT GetFactory( |
| 403 |
_COM_Outptr_ T** ppvFactory |
| 404 |
) |
| 405 |
{ |
| 406 |
return GetFactory(IID_PPV_ARGS(ppvFactory)); |
| 407 |
} |
| 408 |
|
| 409 |
virtual HRESULT STDMETHODCALLTYPE Sort( |
| 410 |
uint32_t numPreferences, |
| 411 |
_In_reads_(numPreferences) const DXCoreAdapterPreference* preferences) = 0; |
| 412 |
|
| 413 |
virtual bool STDMETHODCALLTYPE IsAdapterPreferenceSupported( |
| 414 |
DXCoreAdapterPreference preference) = 0; |
| 415 |
}; |
| 416 |
|
| 417 |
|
| 418 |
MIDL_INTERFACE("78ee5945-c36e-4b13-a669-005dd11c0f06") |
| 419 |
IDXCoreAdapterFactory : public IUnknown |
| 420 |
{ |
| 421 |
public: |
| 422 |
|
| 423 |
virtual HRESULT STDMETHODCALLTYPE CreateAdapterList( |
| 424 |
uint32_t numAttributes, |
| 425 |
_In_reads_(numAttributes) const GUID *filterAttributes, |
| 426 |
REFIID riid, |
| 427 |
_COM_Outptr_ void **ppvAdapterList) = 0; |
| 428 |
|
| 429 |
template<class T> |
| 430 |
HRESULT STDMETHODCALLTYPE CreateAdapterList( |
| 431 |
uint32_t numAttributes, |
| 432 |
_In_reads_(numAttributes) const GUID *filterAttributes, |
| 433 |
_COM_Outptr_ T **ppvAdapterList) |
| 434 |
{ |
| 435 |
return CreateAdapterList(numAttributes, |
| 436 |
filterAttributes, |
| 437 |
IID_PPV_ARGS(ppvAdapterList)); |
| 438 |
} |
| 439 |
|
| 440 |
virtual HRESULT STDMETHODCALLTYPE GetAdapterByLuid( |
| 441 |
const LUID &adapterLUID, |
| 442 |
REFIID riid, |
| 443 |
_COM_Outptr_ void **ppvAdapter) = 0; |
| 444 |
|
| 445 |
template<class T> |
| 446 |
HRESULT STDMETHODCALLTYPE GetAdapterByLuid( |
| 447 |
const LUID &adapterLUID, |
| 448 |
_COM_Outptr_ T **ppvAdapter) |
| 449 |
{ |
| 450 |
return GetAdapterByLuid(adapterLUID, |
| 451 |
IID_PPV_ARGS(ppvAdapter)); |
| 452 |
} |
| 453 |
|
| 454 |
virtual bool STDMETHODCALLTYPE IsNotificationTypeSupported( |
| 455 |
DXCoreNotificationType notificationType) = 0; |
| 456 |
|
| 457 |
virtual HRESULT STDMETHODCALLTYPE RegisterEventNotification( |
| 458 |
_In_ IUnknown *dxCoreObject, |
| 459 |
DXCoreNotificationType notificationType, |
| 460 |
_In_ PFN_DXCORE_NOTIFICATION_CALLBACK callbackFunction, |
| 461 |
_In_opt_ void *callbackContext, |
| 462 |
_Out_ uint32_t *eventCookie) = 0; |
| 463 |
|
| 464 |
virtual HRESULT STDMETHODCALLTYPE UnregisterEventNotification( |
| 465 |
uint32_t eventCookie) = 0; |
| 466 |
}; |
| 467 |
|
| 468 |
|
| 469 |
MIDL_INTERFACE("d5682e19-6d21-401c-827a-9a51a4ea35d7") |
| 470 |
IDXCoreAdapterFactory1 : public IDXCoreAdapterFactory |
| 471 |
{ |
| 472 |
public: |
| 473 |
virtual HRESULT STDMETHODCALLTYPE CreateAdapterListByWorkload( |
| 474 |
DXCoreWorkload workload, |
| 475 |
DXCoreRuntimeFilterFlags runtimeFilter, |
| 476 |
DXCoreHardwareTypeFilterFlags hardwareTypeFilter, |
| 477 |
REFIID riid, |
| 478 |
_COM_Outptr_ void **ppvAdapterList) = 0; |
| 479 |
|
| 480 |
template<class T> |
| 481 |
HRESULT STDMETHODCALLTYPE CreateAdapterListByWorkload( |
| 482 |
DXCoreWorkload workload, |
| 483 |
DXCoreRuntimeFilterFlags runtimeFilter, |
| 484 |
DXCoreHardwareTypeFilterFlags hardwareTypeFilter, |
| 485 |
_COM_Outptr_ T **ppvAdapterList) |
| 486 |
{ |
| 487 |
return CreateAdapterListByWorkload(workload, |
| 488 |
runtimeFilter, |
| 489 |
hardwareTypeFilter, |
| 490 |
IID_PPV_ARGS(ppvAdapterList)); |
| 491 |
} |
| 492 |
}; |
| 493 |
|
| 494 |
#endif |
| 495 |
|
| 496 |
#endif |
| 497 |
|