MCPcopy Create free account
hub / github.com/carbonengine/trinity / PrintAdapterInfo

Function PrintAdapterInfo

trinityal/tests/TrinityALTest.cpp:21–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19std::string g_screenshotFolder = "screenshots/" TRINITY_PLATFORM_NAME;
20
21void PrintAdapterInfo( unsigned index )
22{
23 Tr2AdapterInfo info;
24 if( FAILED( Tr2VideoAdapterInfo::GetAdapterInfo( index, info ) ) )
25 {
26 fprintf( stderr, "Failed to get video adapter information for adapter %u\n", index );
27 return;
28 }
29
30 printf(
31 "Device name: %s\nDescription: %ls\nVendor ID: %u\nDevice ID: %u\n",
32 info.deviceName.c_str(),
33 info.description.c_str(),
34 info.vendorID,
35 info.deviceID );
36
37 Tr2VideoDriverInfo driverInfo;
38 if( FAILED( Tr2DriverUtilities::GetDriverVersion( info.deviceID, driverInfo ) ) )
39 {
40 fprintf( stderr, "Failed to get video driver information for adapter %u\n", index );
41 return;
42 }
43 printf(
44 "Driver version: %s\nDriver date: %s\nDriver vendor: %s\nIs Optimus: %s\nIs AMD Dynamic Switchable: %s\n\n",
45 driverInfo.driverVersionString.c_str(),
46 driverInfo.driverDate.c_str(),
47 driverInfo.driverVendor.c_str(),
48 driverInfo.isOptimus ? "yes" : "no",
49 driverInfo.isAmdDynamicSwitchable ? "yes" : "no" );
50}
51
52void PrintAllAdapterInfo()
53{

Callers 2

PrintAllAdapterInfoFunction · 0.85
mainFunction · 0.85

Calls 1

GetDriverVersionFunction · 0.85

Tested by

no test coverage detected