Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ValveSoftware/vkd3d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJózef Kucia <jkucia@codeweavers.com>2019-06-25 15:30:12 +0300
committerAlexandre Julliard <julliard@winehq.org>2019-06-25 20:23:10 +0300
commit678658086d62c23a821d9ef41d8f7f7d4e7e5cd2 (patch)
treebd408ef407ae49bfd7a2d878bd49127f56b8d8c4 /tests
parent3172faf61282f934d928683f423e4742bcc25baf (diff)
tests: Print adapter name on Windows.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/d3d12_crosstest.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/d3d12_crosstest.h b/tests/d3d12_crosstest.h
index 22844ab3..fbc0e3de 100644
--- a/tests/d3d12_crosstest.h
+++ b/tests/d3d12_crosstest.h
@@ -297,9 +297,11 @@ static ID3D12Device *create_device(void)
static void init_adapter_info(void)
{
+ char name[MEMBER_SIZE(DXGI_ADAPTER_DESC, Description)];
IDXGIAdapter *dxgi_adapter;
DXGI_ADAPTER_DESC desc;
IUnknown *adapter;
+ unsigned int i;
HRESULT hr;
if (!(adapter = create_adapter()))
@@ -312,7 +314,12 @@ static void init_adapter_info(void)
hr = IDXGIAdapter_GetDesc(dxgi_adapter, &desc);
ok(hr == S_OK, "Failed to get adapter desc, hr %#x.\n", hr);
- trace("Adapter: %04x:%04x.\n", desc.VendorId, desc.DeviceId);
+ /* FIXME: Use debugstr_w(). */
+ for (i = 0; i < ARRAY_SIZE(desc.Description) && isprint(desc.Description[i]); ++i)
+ name[i] = desc.Description[i];
+ name[min(i, ARRAY_SIZE(name) - 1)] = '\0';
+
+ trace("Adapter: %s, %04x:%04x.\n", name, desc.VendorId, desc.DeviceId);
if (desc.VendorId == 0x1414 && desc.DeviceId == 0x008c)
{