ReactOS 0.4.17-dev-966-gf06eace
dxcore_interface.h File Reference
#include <stdarg.h>
#include <stdint.h>
#include <ole2.h>
Include dependency graph for dxcore_interface.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  DXCoreHardwareID
 
struct  DXCoreHardwareIDParts
 
struct  DXCoreAdapterMemoryBudgetNodeSegmentGroup
 
struct  DXCoreAdapterMemoryBudget
 

Macros

#define DECLARE_ENUM_CLASS(x)   typedef enum x x; enum x
 
#define REFLUID   const LUID *
 
#define INTERFACE   IDXCoreAdapter
 
#define INTERFACE   IDXCoreAdapterList
 
#define INTERFACE   IDXCoreAdapterFactory
 

Typedefs

typedef struct DXCoreHardwareID DXCoreHardwareID
 
typedef struct DXCoreHardwareIDParts DXCoreHardwareIDParts
 
typedef struct DXCoreAdapterMemoryBudgetNodeSegmentGroup DXCoreAdapterMemoryBudgetNodeSegmentGroup
 
typedef struct DXCoreAdapterMemoryBudget DXCoreAdapterMemoryBudget
 
typedef void(STDMETHODCALLTYPE * PFN_DXCORE_NOTIFICATION_CALLBACK) (DXCoreNotificationType type, IUnknown *object, void *context)
 

Functions

 DECLARE_ENUM_CLASS (DXCoreAdapterProperty)
 
 DECLARE_ENUM_CLASS (DXCoreAdapterState)
 
 DECLARE_ENUM_CLASS (DXCoreSegmentGroup)
 
 DECLARE_ENUM_CLASS (DXCoreNotificationType)
 
 DECLARE_ENUM_CLASS (DXCoreAdapterPreference)
 
 DEFINE_GUID (IID_IDXCoreAdapterFactory, 0x78ee5945, 0xc36e, 0x4b13, 0xa6, 0x69, 0x00, 0x5d, 0xd1, 0x1c, 0x0f, 0x06)
 
 DEFINE_GUID (IID_IDXCoreAdapterList, 0x526c7776, 0x40e9, 0x459b, 0xb7, 0x11, 0xf3, 0x2a, 0xd7, 0x6d, 0xfc, 0x28)
 
 DEFINE_GUID (IID_IDXCoreAdapter, 0xf0db4c7f, 0xfe5a, 0x42a2, 0xbd, 0x62, 0xf2, 0xa6, 0xcf, 0x6f, 0xc8, 0x3e)
 
 DEFINE_GUID (DXCORE_ADAPTER_ATTRIBUTE_D3D11_GRAPHICS, 0x8c47866b, 0x7583, 0x450d, 0xf0, 0xf0, 0x6b, 0xad, 0xa8, 0x95, 0xaf, 0x4b)
 
 DEFINE_GUID (DXCORE_ADAPTER_ATTRIBUTE_D3D12_GRAPHICS, 0x0c9ece4d, 0x2f6e, 0x4f01, 0x8c, 0x96, 0xe8, 0x9e, 0x33, 0x1b, 0x47, 0xb1)
 
 DEFINE_GUID (DXCORE_ADAPTER_ATTRIBUTE_D3D12_CORE_COMPUTE, 0x248e2800, 0xa793, 0x4724, 0xab, 0xaa, 0x23, 0xa6, 0xde, 0x1b, 0xe0, 0x90)
 
 DECLARE_INTERFACE_IID_ (IDXCoreAdapter, IUnknown, "f0db4c7f-fe5a-42a2-bd62-f2a6cf6fc83e")
 
 DECLARE_INTERFACE_IID_ (IDXCoreAdapterList, IUnknown, "526c7776-40e9-459b-b711-f32ad76dfc28")
 
 DECLARE_INTERFACE_IID_ (IDXCoreAdapterFactory, IUnknown, "78ee5945-c36e-4b13-a669-005dd11c0f06")
 

Macro Definition Documentation

◆ DECLARE_ENUM_CLASS

#define DECLARE_ENUM_CLASS (   x)    typedef enum x x; enum x

Definition at line 30 of file dxcore_interface.h.

◆ INTERFACE [1/3]

#define INTERFACE   IDXCoreAdapter

Definition at line 205 of file dxcore_interface.h.

◆ INTERFACE [2/3]

#define INTERFACE   IDXCoreAdapterList

Definition at line 205 of file dxcore_interface.h.

◆ INTERFACE [3/3]

#define INTERFACE   IDXCoreAdapterFactory

Definition at line 205 of file dxcore_interface.h.

◆ REFLUID

#define REFLUID   const LUID *

Definition at line 31 of file dxcore_interface.h.

Typedef Documentation

◆ DXCoreAdapterMemoryBudget

◆ DXCoreAdapterMemoryBudgetNodeSegmentGroup

◆ DXCoreHardwareID

◆ DXCoreHardwareIDParts

◆ PFN_DXCORE_NOTIFICATION_CALLBACK

typedef void(STDMETHODCALLTYPE * PFN_DXCORE_NOTIFICATION_CALLBACK) (DXCoreNotificationType type, IUnknown *object, void *context)

Definition at line 111 of file dxcore_interface.h.

Function Documentation

◆ DECLARE_ENUM_CLASS() [1/5]

DECLARE_ENUM_CLASS ( DXCoreAdapterPreference  )

Definition at line 73 of file dxcore_interface.h.

74{
75 Hardware = 0,
76 MinimumPower = 1,
77 HighPerformance = 2,
78};

◆ DECLARE_ENUM_CLASS() [2/5]

DECLARE_ENUM_CLASS ( DXCoreAdapterProperty  )

Definition at line 34 of file dxcore_interface.h.

35{
36 InstanceLuid = 0,
37 DriverVersion = 1,
38 DriverDescription = 2,
39 HardwareID = 3,
40 KmdModelVersion = 4,
41 ComputePreemptionGranularity = 5,
42 GraphicsPreemptionGranularity = 6,
43 DedicatedAdapterMemory = 7,
44 DedicatedSystemMemory = 8,
45 SharedSystemMemory = 9,
46 AcgCompatible = 10,
47 IsHardware = 11,
48 IsIntegrated = 12,
49 IsDetachable = 13,
50 HardwareIDParts = 14,
51};
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING HardwareID
Definition: wdfpdo.h:340

◆ DECLARE_ENUM_CLASS() [3/5]

DECLARE_ENUM_CLASS ( DXCoreAdapterState  )

Definition at line 53 of file dxcore_interface.h.

54{
55 IsDriverUpdateInProgress = 0,
56 AdapterMemoryBudget = 1,
57};

◆ DECLARE_ENUM_CLASS() [4/5]

DECLARE_ENUM_CLASS ( DXCoreNotificationType  )

Definition at line 65 of file dxcore_interface.h.

66{
67 AdapterListStale = 0,
68 AdapterNoLongerValid = 1,
69 AdapterBudgetChange = 2,
70 AdapterHardwareContentProtectionTeardown = 3,
71};

◆ DECLARE_ENUM_CLASS() [5/5]

DECLARE_ENUM_CLASS ( DXCoreSegmentGroup  )

Definition at line 59 of file dxcore_interface.h.

60{
61 Local = 0,
62 NonLocal = 1,
63};

◆ DECLARE_INTERFACE_IID_() [1/3]

DECLARE_INTERFACE_IID_ ( IDXCoreAdapter  ,
IUnknown  ,
"f0db4c7f-fe5a-42a2-bd62-f2a6cf6fc83e"   
)

Definition at line 122 of file dxcore_interface.h.

123{
124 /* IUnknown methods */
128 /* IDXCoreAdapter methods */
129 STDMETHOD_(BOOL, IsValid) (THIS) PURE;
130 STDMETHOD_(BOOL, IsAttributeSupported) (THIS_ REFGUID attribute) PURE;
131 STDMETHOD_(BOOL, IsPropertySupported) (THIS_ DXCoreAdapterProperty property) PURE;
132 STDMETHOD(GetProperty) (THIS_ DXCoreAdapterProperty property, size_t buffer_size, void *buffer) PURE;
133 STDMETHOD(GetPropertySize) (THIS_ DXCoreAdapterProperty property, size_t *buffer_size) PURE;
134 STDMETHOD_(BOOL, IsQueryStateSupported) (THIS_ DXCoreAdapterState property) PURE;
135 STDMETHOD(QueryState) (THIS_ DXCoreAdapterState state, size_t state_details_size, const void *state_details, size_t buffer_size, void *buffer) PURE;
136 STDMETHOD_(BOOL, IsSetStateSupported) (THIS_ DXCoreAdapterState property) PURE;
137 STDMETHOD(SetState) (THIS_ DXCoreAdapterState state, size_t state_details_size, const void *state_details, size_t buffer_size, const void *buffer) PURE;
138 STDMETHOD(GetFactory) (THIS_ REFIID riid, void **ppv) PURE;
139
140 #ifdef __cplusplus
141 template <class T>
142 HRESULT GetProperty(DXCoreAdapterProperty property, T *buffer)
143 {
144 return GetProperty(property, sizeof(T), (void *)buffer);
145 }
146
147 template <class T1, class T2>
148 HRESULT QueryState(DXCoreAdapterState state, const T1 *state_details, T2 *buffer)
149 {
150 return QueryState(state, sizeof(T1), (const void *)state_details, sizeof(T2), (void *)buffer);
151 }
152
153 template <class T>
154 HRESULT QueryState(DXCoreAdapterState state, T *buffer)
155 {
156 return QueryState(state, 0, NULL, sizeof(T), (void *)buffer);
157 }
158
159 template <class T1, class T2>
160 HRESULT SetState(DXCoreAdapterState state, const T1 *state_details, const T2 *buffer)
161 {
162 return SetState(state, sizeof(T1), (const void *)state_details, sizeof(T2), (const void *)buffer);
163 }
164
165 template <class T>
166 HRESULT GetFactory(T **ppv)
167 {
168 return GetFactory(IID_PPV_ARGS(ppv));
169 }
170 #endif
171};
static int state
Definition: maze.c:121
#define PURE
Definition: basetyps.h:64
#define THIS_
Definition: basetyps.h:65
#define THIS
Definition: basetyps.h:66
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
#define STDMETHOD(m)
Definition: basetyps.h:62
_In_ BOOLEAN Release
Definition: cdrom.h:920
_Check_return_ _In_ PQUERY_INTERFACE QueryInterface
Definition: dispmprt.h:1318
#define NULL
Definition: types.h:112
unsigned int BOOL
Definition: ntddk_ex.h:94
GLuint buffer
Definition: glext.h:5915
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:83
#define REFIID
Definition: guiddef.h:118
#define T(num)
Definition: thunks.c:311
wchar_t const *const size_t const buffer_size
Definition: stat.cpp:95
Definition: scsiwmi.h:51
uint32_t ULONG
Definition: typedefs.h:59

◆ DECLARE_INTERFACE_IID_() [2/3]

DECLARE_INTERFACE_IID_ ( IDXCoreAdapterFactory  ,
IUnknown  ,
"78ee5945-c36e-4b13-a669-005dd11c0f06"   
)

Definition at line 206 of file dxcore_interface.h.

207{
208 /* IUnknown methods */
212 /* IDXCoreAdapterFactory methods */
213 STDMETHOD(CreateAdapterList) (THIS_ uint32_t num_attributes, const GUID *filter_attributes, REFIID riid, void **ppv) PURE;
214 STDMETHOD(GetAdapterByLuid) (THIS_ REFLUID adapter_luid, REFIID riid, void **ppv) PURE;
215 STDMETHOD_(BOOL, IsNotificationTypeSupported) (THIS_ DXCoreNotificationType type) PURE;
216 STDMETHOD(RegisterEventNotification) (THIS_ IUnknown *dxcore_object, DXCoreNotificationType type, PFN_DXCORE_NOTIFICATION_CALLBACK callback,
217 void *callback_context, uint32_t *event_cookie) PURE;
218 STDMETHOD(UnregisterEventNotification) (THIS_ uint32_t event_cookie) PURE;
219
220 #ifdef __cplusplus
221 template<class T>
222 HRESULT STDMETHODCALLTYPE CreateAdapterList(uint32_t num_attributes, const GUID *filter_attributes, T **ppv)
223 {
224 return CreateAdapterList(num_attributes, filter_attributes, IID_PPV_ARGS(ppv));
225 }
226
227 template<class T>
228 HRESULT STDMETHODCALLTYPE GetAdapterByLuid(const LUID &adapter_luid, T **ppv)
229 {
230 return GetAdapterByLuid(adapter_luid, IID_PPV_ARGS(ppv));
231 }
232 #endif
233};
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
UINT32 uint32_t
Definition: types.h:75
void(STDMETHODCALLTYPE * PFN_DXCORE_NOTIFICATION_CALLBACK)(DXCoreNotificationType type, IUnknown *object, void *context)
#define REFLUID
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static IPrintDialogCallback callback
Definition: printdlg.c:325

◆ DECLARE_INTERFACE_IID_() [3/3]

DECLARE_INTERFACE_IID_ ( IDXCoreAdapterList  ,
IUnknown  ,
"526c7776-40e9-459b-b711-f32ad76dfc28"   
)

Definition at line 175 of file dxcore_interface.h.

176{
177 /* IUnknown methods */
181 /* IDXCoreAdapterList methods */
182 STDMETHOD(GetAdapter) (THIS_ uint32_t index, REFIID riid, void **ppv) PURE;
183 STDMETHOD_(uint32_t, GetAdapterCount) (THIS) PURE;
184 STDMETHOD_(BOOL, IsStale) (THIS) PURE;
185 STDMETHOD(GetFactory) (THIS_ REFIID riid, void **ppv) PURE;
186 STDMETHOD(Sort) (THIS_ uint32_t num_preferences, const DXCoreAdapterPreference *preferences) PURE;
187 STDMETHOD_(BOOL, IsAdapterPreferenceSupported) (THIS_ DXCoreAdapterPreference preference) PURE;
188
189 #ifdef __cplusplus
190 template<class T>
192 {
193 return GetAdapter(index, IID_PPV_ARGS(ppv));
194 }
195
196 template <class T>
197 HRESULT GetFactory(T **ppv)
198 {
199 return GetFactory(IID_PPV_ARGS(ppv));
200 }
201 #endif
202};
#define index(s, c)
Definition: various.h:29
GLuint index
Definition: glext.h:6031

◆ DEFINE_GUID() [1/6]

DEFINE_GUID ( DXCORE_ADAPTER_ATTRIBUTE_D3D11_GRAPHICS  ,
0x8c47866b  ,
0x7583  ,
0x450d  ,
0xf0  ,
0xf0  ,
0x6b  ,
0xad  ,
0xa8  ,
0x95  ,
0xaf  ,
0x4b   
)

◆ DEFINE_GUID() [2/6]

DEFINE_GUID ( DXCORE_ADAPTER_ATTRIBUTE_D3D12_CORE_COMPUTE  ,
0x248e2800  ,
0xa793  ,
0x4724  ,
0xab  ,
0xaa  ,
0x23  ,
0xa6  ,
0xde  ,
0x1b  ,
0xe0  ,
0x90   
)

◆ DEFINE_GUID() [3/6]

DEFINE_GUID ( DXCORE_ADAPTER_ATTRIBUTE_D3D12_GRAPHICS  ,
0x0c9ece4d  ,
0x2f6e  ,
0x4f01  ,
0x8c  ,
0x96  ,
0xe8  ,
0x9e  ,
0x33  ,
0x1b  ,
0x47  ,
0xb1   
)

◆ DEFINE_GUID() [4/6]

DEFINE_GUID ( IID_IDXCoreAdapter  ,
0xf0db4c7f  ,
0xfe5a  ,
0x42a2  ,
0xbd  ,
0x62  ,
0xf2  ,
0xa6  ,
0xcf  ,
0x6f  ,
0xc8  ,
0x3e   
)

◆ DEFINE_GUID() [5/6]

DEFINE_GUID ( IID_IDXCoreAdapterFactory  ,
0x78ee5945  ,
0xc36e  ,
0x4b13  ,
0xa6  ,
0x69  ,
0x00  ,
0x5d  ,
0xd1  ,
0x1c  ,
0x0f  ,
0x06   
)

◆ DEFINE_GUID() [6/6]

DEFINE_GUID ( IID_IDXCoreAdapterList  ,
0x526c7776  ,
0x40e9  ,
0x459b  ,
0xb7  ,
0x11  ,
0xf3  ,
0x2a  ,
0xd7  ,
0x6d  ,
0xfc  ,
0x28   
)