Commit 7462da13 authored by Markus Weiland's avatar Markus Weiland Committed by Alexandre Julliard

dxdiagn: Added properties for hardware acceleration capabilities.

parent 1809f7c7
...@@ -915,10 +915,15 @@ static HRESULT fill_display_information_d3d(IDxDiagContainerImpl_Container *node ...@@ -915,10 +915,15 @@ static HRESULT fill_display_information_d3d(IDxDiagContainerImpl_Container *node
static const WCHAR id_fmtW[] = {'0','x','%','0','4','x',0}; static const WCHAR id_fmtW[] = {'0','x','%','0','4','x',0};
static const WCHAR subsysid_fmtW[] = {'0','x','%','0','8','x',0}; static const WCHAR subsysid_fmtW[] = {'0','x','%','0','8','x',0};
static const WCHAR mem_fmt[] = {'%','.','1','f',' ','M','B',0}; static const WCHAR mem_fmt[] = {'%','.','1','f',' ','M','B',0};
static const WCHAR b3DAccelerationExists[] = {'b','3','D','A','c','c','e','l','e','r','a','t','i','o','n','E','x','i','s','t','s',0};
static const WCHAR b3DAccelerationEnabled[] = {'b','3','D','A','c','c','e','l','e','r','a','t','i','o','n','E','n','a','b','l','e','d',0};
static const WCHAR bDDAccelerationEnabled[] = {'b','D','D','A','c','c','e','l','e','r','a','t','i','o','n','E','n','a','b','l','e','d',0};
D3DADAPTER_IDENTIFIER9 adapter_info; D3DADAPTER_IDENTIFIER9 adapter_info;
D3DDISPLAYMODE adapter_mode; D3DDISPLAYMODE adapter_mode;
D3DCAPS9 device_caps;
DWORD available_mem = 0; DWORD available_mem = 0;
BOOL hardware_accel;
snprintfW(buffer, sizeof(buffer)/sizeof(WCHAR), adapterid_fmtW, index); snprintfW(buffer, sizeof(buffer)/sizeof(WCHAR), adapterid_fmtW, index);
display_adapter = allocate_information_node(buffer); display_adapter = allocate_information_node(buffer);
...@@ -1043,6 +1048,21 @@ static HRESULT fill_display_information_d3d(IDxDiagContainerImpl_Container *node ...@@ -1043,6 +1048,21 @@ static HRESULT fill_display_information_d3d(IDxDiagContainerImpl_Container *node
hr = add_bstr_property(display_adapter, szDisplayMemoryEnglish, buffer); hr = add_bstr_property(display_adapter, szDisplayMemoryEnglish, buffer);
if (FAILED(hr)) if (FAILED(hr))
goto cleanup; goto cleanup;
hr = IDirect3D9_GetDeviceCaps(pDirect3D9, index, D3DDEVTYPE_HAL, &device_caps);
hardware_accel = SUCCEEDED(hr);
hr = add_bool_property(display_adapter, b3DAccelerationEnabled, hardware_accel);
if (FAILED(hr))
goto cleanup;
hr = add_bool_property(display_adapter, b3DAccelerationExists, hardware_accel);
if (FAILED(hr))
goto cleanup;
hr = add_bool_property(display_adapter, bDDAccelerationEnabled, hardware_accel);
if (FAILED(hr))
goto cleanup;
} }
hr = S_OK; hr = S_OK;
......
...@@ -938,6 +938,9 @@ static void test_DxDiag_DisplayDevices(void) ...@@ -938,6 +938,9 @@ static void test_DxDiag_DisplayDevices(void)
static const WCHAR szRevisionId[] = {'s','z','R','e','v','i','s','i','o','n','I','d',0}; static const WCHAR szRevisionId[] = {'s','z','R','e','v','i','s','i','o','n','I','d',0};
static const WCHAR dwRefreshRate[] = {'d','w','R','e','f','r','e','s','h','R','a','t','e',0}; static const WCHAR dwRefreshRate[] = {'d','w','R','e','f','r','e','s','h','R','a','t','e',0};
static const WCHAR szManufacturer[] = {'s','z','M','a','n','u','f','a','c','t','u','r','e','r',0}; static const WCHAR szManufacturer[] = {'s','z','M','a','n','u','f','a','c','t','u','r','e','r',0};
static const WCHAR b3DAccelerationExists[] = {'b','3','D','A','c','c','e','l','e','r','a','t','i','o','n','E','x','i','s','t','s',0};
static const WCHAR b3DAccelerationEnabled[] = {'b','3','D','A','c','c','e','l','e','r','a','t','i','o','n','E','n','a','b','l','e','d',0};
static const WCHAR bDDAccelerationEnabled[] = {'b','D','D','A','c','c','e','l','e','r','a','t','i','o','n','E','n','a','b','l','e','d',0};
static const struct property_test property_tests[] = static const struct property_test property_tests[] =
{ {
...@@ -959,6 +962,9 @@ static void test_DxDiag_DisplayDevices(void) ...@@ -959,6 +962,9 @@ static void test_DxDiag_DisplayDevices(void)
{szRevisionId, VT_BSTR}, {szRevisionId, VT_BSTR},
{dwRefreshRate, VT_UI4}, {dwRefreshRate, VT_UI4},
{szManufacturer, VT_BSTR}, {szManufacturer, VT_BSTR},
{b3DAccelerationExists, VT_BOOL},
{b3DAccelerationEnabled, VT_BOOL},
{bDDAccelerationEnabled, VT_BOOL},
}; };
IDxDiagContainer *display_cont = NULL; IDxDiagContainer *display_cont = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment