Skip to content

Commit 789ee70

Browse files
committed
[host] dxgi: print out the adapter details earlier
Before we try and perhaps fail to init DXGI, we should print out what the device is so that when there is an error report we can immediately see if the user has the QXL device attached still.
1 parent 3c0616b commit 789ee70

File tree

1 file changed

+9
-10
lines changed
  • host/platform/Windows/capture/DXGI/src

1 file changed

+9
-10
lines changed

host/platform/Windows/capture/DXGI/src/dxgi.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,15 @@ static bool dxgi_init(void)
302302
goto fail;
303303
}
304304

305-
DEBUG_INFO("Device Name : %ls", outputDesc.DeviceName);
305+
DXGI_ADAPTER_DESC1 adapterDesc;
306+
IDXGIAdapter1_GetDesc1(this->adapter, &adapterDesc);
307+
DEBUG_INFO("Device Name : %ls" , outputDesc.DeviceName);
308+
DEBUG_INFO("Device Descripion: %ls" , adapterDesc.Description);
309+
DEBUG_INFO("Device Vendor ID : 0x%x" , adapterDesc.VendorId);
310+
DEBUG_INFO("Device Device ID : 0x%x" , adapterDesc.DeviceId);
311+
DEBUG_INFO("Device Video Mem : %u MiB" , (unsigned)(adapterDesc.DedicatedVideoMemory / 1048576));
312+
DEBUG_INFO("Device Sys Mem : %u MiB" , (unsigned)(adapterDesc.DedicatedSystemMemory / 1048576));
313+
DEBUG_INFO("Shared Sys Mem : %u MiB" , (unsigned)(adapterDesc.SharedSystemMemory / 1048576));
306314

307315
static const D3D_FEATURE_LEVEL win8[] =
308316
{
@@ -370,9 +378,6 @@ static bool dxgi_init(void)
370378
goto fail;
371379
}
372380

373-
DXGI_ADAPTER_DESC1 adapterDesc;
374-
IDXGIAdapter1_GetDesc1(this->adapter, &adapterDesc);
375-
376381
switch(outputDesc.Rotation)
377382
{
378383
case DXGI_MODE_ROTATION_ROTATE90:
@@ -413,12 +418,6 @@ static bool dxgi_init(void)
413418
this->dpi = monitor_dpi(outputDesc.Monitor);
414419
++this->formatVer;
415420

416-
DEBUG_INFO("Device Descripion: %ls" , adapterDesc.Description);
417-
DEBUG_INFO("Device Vendor ID : 0x%x" , adapterDesc.VendorId);
418-
DEBUG_INFO("Device Device ID : 0x%x" , adapterDesc.DeviceId);
419-
DEBUG_INFO("Device Video Mem : %u MiB" , (unsigned)(adapterDesc.DedicatedVideoMemory / 1048576));
420-
DEBUG_INFO("Device Sys Mem : %u MiB" , (unsigned)(adapterDesc.DedicatedSystemMemory / 1048576));
421-
DEBUG_INFO("Shared Sys Mem : %u MiB" , (unsigned)(adapterDesc.SharedSystemMemory / 1048576));
422421
DEBUG_INFO("Feature Level : 0x%x" , this->featureLevel);
423422
DEBUG_INFO("Capture Size : %u x %u", this->width, this->height);
424423
DEBUG_INFO("AcquireLock : %s" , this->useAcquireLock ? "enabled" : "disabled");

0 commit comments

Comments
 (0)