PFND3DDDI_GETCAPS callback function (d3dumddi.h)
The D3D runtime calls the driver's PFND3DDDI_GETCAPS callback function to query the capabilities of the graphics adapter.
Syntax
PFND3DDDI_GETCAPS Pfnd3dddiGetcaps;
HRESULT Pfnd3dddiGetcaps(
HANDLE hAdapter,
const D3DDDIARG_GETCAPS *unnamedParam2
)
{...}
Parameters
hAdapter
A handle that identifies the graphics adapter.
unnamedParam2
pData [in, out]
A pointer to a D3DDDIARG_GETCAPS structure that describes the capabilities to retrieve.
Return value
PFND3DDDI_GETCAPS returns one of the following values:
Return code | Description |
---|---|
S_OK | The capabilities were successfully retrieved. |
E_OUTOFMEMORY | PFND3DDDI_GETCAPS could not allocate the required memory for it to complete. |
Remarks
The data returned in the pData member of the D3DDDIARG_GETCAPS structure depends on the type of data that is requested (that is, the data depends on D3DDDIARG_GETCAPS.Type and sometimes on the pInfo member).
The following table has two examples of how to set up the PFND3DDDI_GETCAPS call depending on the value of D3DDDIARG_GETCAPS.Type.
D3DDDIARG_GETCAPS member | Example 1 | Example 2 |
---|---|---|
Type | D3DDDICAPS_DDRAW | D3DDDICAPS_GETFORMATCOUNT |
pInfo | [in] NULL (no conditions are set) | [in] NULL (no conditions are set) |
pData | [out] DDRAW_CAPS (unique pointer) | [out] UINT* (unique pointer) |
DataSize | sizeof(DDRAW_CAPS) | sizeof(UINT) |
Notes | Driver must fill in the DDRAW_CAPS structure with the DirectDraw capabilities that it supports. | Driver must fill the buffer pointed to by pData with a UINT value that represents the number of D3DDDIFORMAT surface formats that the device supports. |
See D3DDDIARG_GETCAPS for explanations of other values for D3DDDIARG_GETCAPS.Type that are used for multiplane overlays.
Simple_instancing
If a Direct3D Level 9 driver that supports Windows Display Driver Model (WDDM) 1.3 and later completes a call to PFND3DDDI_GETCAPS and returns S_OK but doesn't change the data in the D3DDDIARG_GETCAPS structure, it is indicating to the Direct3D runtime that the hardware and driver don't support simple instancing. For more info, see D3DDDICAPS_SIMPLE_INSTANCING_SUPPORT.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Target Platform | Desktop |
Header | d3dumddi.h (include D3dumddi.h) |