fix issues and remarks

This commit is contained in:
isurmin
2018-08-29 11:58:17 +02:00
committed by Baldur Karlsson
parent 02b3cdad94
commit adb7df57d4
11 changed files with 1627 additions and 1847 deletions
+4 -106
View File
@@ -85,18 +85,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Intel", "renderdoc\driver\i
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Development|x64 = Development|x64
Development|x86 = Development|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A14A6AE5-02B1-35FE-BE59-B3E7C273B40B}.Debug|x64.ActiveCfg = QTDebug|x64
{A14A6AE5-02B1-35FE-BE59-B3E7C273B40B}.Debug|x64.Build.0 = QTDebug|x64
{A14A6AE5-02B1-35FE-BE59-B3E7C273B40B}.Debug|x86.ActiveCfg = QTDebug|Win32
{A14A6AE5-02B1-35FE-BE59-B3E7C273B40B}.Debug|x86.Build.0 = QTDebug|Win32
{A14A6AE5-02B1-35FE-BE59-B3E7C273B40B}.Development|x64.ActiveCfg = Development|x64
{A14A6AE5-02B1-35FE-BE59-B3E7C273B40B}.Development|x64.Build.0 = Development|x64
{A14A6AE5-02B1-35FE-BE59-B3E7C273B40B}.Development|x86.ActiveCfg = Development|Win32
@@ -105,10 +99,6 @@ Global
{A14A6AE5-02B1-35FE-BE59-B3E7C273B40B}.Release|x64.Build.0 = Release|x64
{A14A6AE5-02B1-35FE-BE59-B3E7C273B40B}.Release|x86.ActiveCfg = Release|Win32
{A14A6AE5-02B1-35FE-BE59-B3E7C273B40B}.Release|x86.Build.0 = Release|Win32
{E2B46D67-90E2-40B6-9597-72930E7845E5}.Debug|x64.ActiveCfg = Development|x64
{E2B46D67-90E2-40B6-9597-72930E7845E5}.Debug|x64.Build.0 = Development|x64
{E2B46D67-90E2-40B6-9597-72930E7845E5}.Debug|x86.ActiveCfg = Development|Win32
{E2B46D67-90E2-40B6-9597-72930E7845E5}.Debug|x86.Build.0 = Development|Win32
{E2B46D67-90E2-40B6-9597-72930E7845E5}.Development|x64.ActiveCfg = Development|x64
{E2B46D67-90E2-40B6-9597-72930E7845E5}.Development|x64.Build.0 = Development|x64
{E2B46D67-90E2-40B6-9597-72930E7845E5}.Development|x86.ActiveCfg = Development|Win32
@@ -117,10 +107,6 @@ Global
{E2B46D67-90E2-40B6-9597-72930E7845E5}.Release|x64.Build.0 = Release|x64
{E2B46D67-90E2-40B6-9597-72930E7845E5}.Release|x86.ActiveCfg = Release|Win32
{E2B46D67-90E2-40B6-9597-72930E7845E5}.Release|x86.Build.0 = Release|Win32
{D03DF2F9-513C-4084-BBDD-1DEE8D9250D7}.Debug|x64.ActiveCfg = Development|x64
{D03DF2F9-513C-4084-BBDD-1DEE8D9250D7}.Debug|x64.Build.0 = Development|x64
{D03DF2F9-513C-4084-BBDD-1DEE8D9250D7}.Debug|x86.ActiveCfg = Development|Win32
{D03DF2F9-513C-4084-BBDD-1DEE8D9250D7}.Debug|x86.Build.0 = Development|Win32
{D03DF2F9-513C-4084-BBDD-1DEE8D9250D7}.Development|x64.ActiveCfg = Development|x64
{D03DF2F9-513C-4084-BBDD-1DEE8D9250D7}.Development|x64.Build.0 = Development|x64
{D03DF2F9-513C-4084-BBDD-1DEE8D9250D7}.Development|x86.ActiveCfg = Development|Win32
@@ -129,50 +115,30 @@ Global
{D03DF2F9-513C-4084-BBDD-1DEE8D9250D7}.Release|x64.Build.0 = Release|x64
{D03DF2F9-513C-4084-BBDD-1DEE8D9250D7}.Release|x86.ActiveCfg = Release|Win32
{D03DF2F9-513C-4084-BBDD-1DEE8D9250D7}.Release|x86.Build.0 = Release|Win32
{EA1242CF-BB42-B1AC-9B6A-A508D96D1CB7}.Debug|x64.ActiveCfg = Development|x64
{EA1242CF-BB42-B1AC-9B6A-A508D96D1CB7}.Debug|x64.Build.0 = Development|x64
{EA1242CF-BB42-B1AC-9B6A-A508D96D1CB7}.Debug|x86.ActiveCfg = Development|Win32
{EA1242CF-BB42-B1AC-9B6A-A508D96D1CB7}.Debug|x86.Build.0 = Development|Win32
{EA1242CF-BB42-B1AC-9B6A-A508D96D1CB7}.Development|x64.ActiveCfg = Development|x64
{EA1242CF-BB42-B1AC-9B6A-A508D96D1CB7}.Development|x86.ActiveCfg = Development|Win32
{EA1242CF-BB42-B1AC-9B6A-A508D96D1CB7}.Release|x64.ActiveCfg = Release|x64
{EA1242CF-BB42-B1AC-9B6A-A508D96D1CB7}.Release|x64.Build.0 = Release|x64
{EA1242CF-BB42-B1AC-9B6A-A508D96D1CB7}.Release|x86.ActiveCfg = Release|Win32
{EA1242CF-BB42-B1AC-9B6A-A508D96D1CB7}.Release|x86.Build.0 = Release|Win32
{EC847717-119A-2391-0477-212E1140082C}.Debug|x64.ActiveCfg = Development|x64
{EC847717-119A-2391-0477-212E1140082C}.Debug|x64.Build.0 = Development|x64
{EC847717-119A-2391-0477-212E1140082C}.Debug|x86.ActiveCfg = Development|Win32
{EC847717-119A-2391-0477-212E1140082C}.Debug|x86.Build.0 = Development|Win32
{EC847717-119A-2391-0477-212E1140082C}.Development|x64.ActiveCfg = Development|x64
{EC847717-119A-2391-0477-212E1140082C}.Development|x86.ActiveCfg = Development|Win32
{EC847717-119A-2391-0477-212E1140082C}.Release|x64.ActiveCfg = Release|x64
{EC847717-119A-2391-0477-212E1140082C}.Release|x64.Build.0 = Release|x64
{EC847717-119A-2391-0477-212E1140082C}.Release|x86.ActiveCfg = Release|Win32
{EC847717-119A-2391-0477-212E1140082C}.Release|x86.Build.0 = Release|Win32
{7893E300-3ED0-7F4C-158F-67EA63934C57}.Debug|x64.ActiveCfg = Development|x64
{7893E300-3ED0-7F4C-158F-67EA63934C57}.Debug|x64.Build.0 = Development|x64
{7893E300-3ED0-7F4C-158F-67EA63934C57}.Debug|x86.ActiveCfg = Development|Win32
{7893E300-3ED0-7F4C-158F-67EA63934C57}.Debug|x86.Build.0 = Development|Win32
{7893E300-3ED0-7F4C-158F-67EA63934C57}.Development|x64.ActiveCfg = Development|x64
{7893E300-3ED0-7F4C-158F-67EA63934C57}.Development|x86.ActiveCfg = Development|Win32
{7893E300-3ED0-7F4C-158F-67EA63934C57}.Release|x64.ActiveCfg = Release|x64
{7893E300-3ED0-7F4C-158F-67EA63934C57}.Release|x64.Build.0 = Release|x64
{7893E300-3ED0-7F4C-158F-67EA63934C57}.Release|x86.ActiveCfg = Release|Win32
{7893E300-3ED0-7F4C-158F-67EA63934C57}.Release|x86.Build.0 = Release|Win32
{B7399F39-300F-450E-F471-9490F959D2A7}.Debug|x64.ActiveCfg = Development|x64
{B7399F39-300F-450E-F471-9490F959D2A7}.Debug|x64.Build.0 = Development|x64
{B7399F39-300F-450E-F471-9490F959D2A7}.Debug|x86.ActiveCfg = Development|Win32
{B7399F39-300F-450E-F471-9490F959D2A7}.Debug|x86.Build.0 = Development|Win32
{B7399F39-300F-450E-F471-9490F959D2A7}.Development|x64.ActiveCfg = Development|x64
{B7399F39-300F-450E-F471-9490F959D2A7}.Development|x86.ActiveCfg = Development|Win32
{B7399F39-300F-450E-F471-9490F959D2A7}.Release|x64.ActiveCfg = Release|x64
{B7399F39-300F-450E-F471-9490F959D2A7}.Release|x64.Build.0 = Release|x64
{B7399F39-300F-450E-F471-9490F959D2A7}.Release|x86.ActiveCfg = Release|Win32
{B7399F39-300F-450E-F471-9490F959D2A7}.Release|x86.Build.0 = Release|Win32
{6DEE3F12-F2F8-42CA-865A-578D0FD11387}.Debug|x64.ActiveCfg = Development|x64
{6DEE3F12-F2F8-42CA-865A-578D0FD11387}.Debug|x64.Build.0 = Development|x64
{6DEE3F12-F2F8-42CA-865A-578D0FD11387}.Debug|x86.ActiveCfg = Development|Win32
{6DEE3F12-F2F8-42CA-865A-578D0FD11387}.Debug|x86.Build.0 = Development|Win32
{6DEE3F12-F2F8-42CA-865A-578D0FD11387}.Development|x64.ActiveCfg = Development|x64
{6DEE3F12-F2F8-42CA-865A-578D0FD11387}.Development|x64.Build.0 = Development|x64
{6DEE3F12-F2F8-42CA-865A-578D0FD11387}.Development|x86.ActiveCfg = Development|Win32
@@ -181,10 +147,6 @@ Global
{6DEE3F12-F2F8-42CA-865A-578D0FD11387}.Release|x64.Build.0 = Release|x64
{6DEE3F12-F2F8-42CA-865A-578D0FD11387}.Release|x86.ActiveCfg = Release|Win32
{6DEE3F12-F2F8-42CA-865A-578D0FD11387}.Release|x86.Build.0 = Release|Win32
{5DE5A561-548A-4DD7-90F0-06A2B39EAE9A}.Debug|x64.ActiveCfg = Development|x64
{5DE5A561-548A-4DD7-90F0-06A2B39EAE9A}.Debug|x64.Build.0 = Development|x64
{5DE5A561-548A-4DD7-90F0-06A2B39EAE9A}.Debug|x86.ActiveCfg = Development|Win32
{5DE5A561-548A-4DD7-90F0-06A2B39EAE9A}.Debug|x86.Build.0 = Development|Win32
{5DE5A561-548A-4DD7-90F0-06A2B39EAE9A}.Development|x64.ActiveCfg = Development|x64
{5DE5A561-548A-4DD7-90F0-06A2B39EAE9A}.Development|x64.Build.0 = Development|x64
{5DE5A561-548A-4DD7-90F0-06A2B39EAE9A}.Development|x86.ActiveCfg = Development|Win32
@@ -193,10 +155,6 @@ Global
{5DE5A561-548A-4DD7-90F0-06A2B39EAE9A}.Release|x64.Build.0 = Release|x64
{5DE5A561-548A-4DD7-90F0-06A2B39EAE9A}.Release|x86.ActiveCfg = Release|Win32
{5DE5A561-548A-4DD7-90F0-06A2B39EAE9A}.Release|x86.Build.0 = Release|Win32
{0AAE0AD1-371B-4A36-9ED1-80E10E960605}.Debug|x64.ActiveCfg = Development|x64
{0AAE0AD1-371B-4A36-9ED1-80E10E960605}.Debug|x64.Build.0 = Development|x64
{0AAE0AD1-371B-4A36-9ED1-80E10E960605}.Debug|x86.ActiveCfg = Development|Win32
{0AAE0AD1-371B-4A36-9ED1-80E10E960605}.Debug|x86.Build.0 = Development|Win32
{0AAE0AD1-371B-4A36-9ED1-80E10E960605}.Development|x64.ActiveCfg = Development|x64
{0AAE0AD1-371B-4A36-9ED1-80E10E960605}.Development|x64.Build.0 = Development|x64
{0AAE0AD1-371B-4A36-9ED1-80E10E960605}.Development|x86.ActiveCfg = Development|Win32
@@ -205,10 +163,6 @@ Global
{0AAE0AD1-371B-4A36-9ED1-80E10E960605}.Release|x64.Build.0 = Release|x64
{0AAE0AD1-371B-4A36-9ED1-80E10E960605}.Release|x86.ActiveCfg = Release|Win32
{0AAE0AD1-371B-4A36-9ED1-80E10E960605}.Release|x86.Build.0 = Release|Win32
{2A793574-BD3C-46D4-9788-C339D9550CE1}.Debug|x64.ActiveCfg = Development|x64
{2A793574-BD3C-46D4-9788-C339D9550CE1}.Debug|x64.Build.0 = Development|x64
{2A793574-BD3C-46D4-9788-C339D9550CE1}.Debug|x86.ActiveCfg = Development|Win32
{2A793574-BD3C-46D4-9788-C339D9550CE1}.Debug|x86.Build.0 = Development|Win32
{2A793574-BD3C-46D4-9788-C339D9550CE1}.Development|x64.ActiveCfg = Development|x64
{2A793574-BD3C-46D4-9788-C339D9550CE1}.Development|x64.Build.0 = Development|x64
{2A793574-BD3C-46D4-9788-C339D9550CE1}.Development|x86.ActiveCfg = Development|Win32
@@ -217,10 +171,6 @@ Global
{2A793574-BD3C-46D4-9788-C339D9550CE1}.Release|x64.Build.0 = Release|x64
{2A793574-BD3C-46D4-9788-C339D9550CE1}.Release|x86.ActiveCfg = Release|Win32
{2A793574-BD3C-46D4-9788-C339D9550CE1}.Release|x86.Build.0 = Release|Win32
{C43FF27E-A155-4852-88EC-5CE9334C07A8}.Debug|x64.ActiveCfg = Development|x64
{C43FF27E-A155-4852-88EC-5CE9334C07A8}.Debug|x64.Build.0 = Development|x64
{C43FF27E-A155-4852-88EC-5CE9334C07A8}.Debug|x86.ActiveCfg = Development|Win32
{C43FF27E-A155-4852-88EC-5CE9334C07A8}.Debug|x86.Build.0 = Development|Win32
{C43FF27E-A155-4852-88EC-5CE9334C07A8}.Development|x64.ActiveCfg = Development|x64
{C43FF27E-A155-4852-88EC-5CE9334C07A8}.Development|x64.Build.0 = Development|x64
{C43FF27E-A155-4852-88EC-5CE9334C07A8}.Development|x86.ActiveCfg = Development|Win32
@@ -229,10 +179,6 @@ Global
{C43FF27E-A155-4852-88EC-5CE9334C07A8}.Release|x64.Build.0 = Release|x64
{C43FF27E-A155-4852-88EC-5CE9334C07A8}.Release|x86.ActiveCfg = Release|Win32
{C43FF27E-A155-4852-88EC-5CE9334C07A8}.Release|x86.Build.0 = Release|Win32
{F1E59A05-60D4-4927-9E57-DD191EAE90EF}.Debug|x64.ActiveCfg = Development|x64
{F1E59A05-60D4-4927-9E57-DD191EAE90EF}.Debug|x64.Build.0 = Development|x64
{F1E59A05-60D4-4927-9E57-DD191EAE90EF}.Debug|x86.ActiveCfg = Development|Win32
{F1E59A05-60D4-4927-9E57-DD191EAE90EF}.Debug|x86.Build.0 = Development|Win32
{F1E59A05-60D4-4927-9E57-DD191EAE90EF}.Development|x64.ActiveCfg = Development|x64
{F1E59A05-60D4-4927-9E57-DD191EAE90EF}.Development|x64.Build.0 = Development|x64
{F1E59A05-60D4-4927-9E57-DD191EAE90EF}.Development|x86.ActiveCfg = Development|Win32
@@ -241,10 +187,6 @@ Global
{F1E59A05-60D4-4927-9E57-DD191EAE90EF}.Release|x64.Build.0 = Release|x64
{F1E59A05-60D4-4927-9E57-DD191EAE90EF}.Release|x86.ActiveCfg = Release|Win32
{F1E59A05-60D4-4927-9E57-DD191EAE90EF}.Release|x86.Build.0 = Release|Win32
{9C4487E8-EEB0-4A7F-BD81-23F81CD24E22}.Debug|x64.ActiveCfg = Development|x64
{9C4487E8-EEB0-4A7F-BD81-23F81CD24E22}.Debug|x64.Build.0 = Development|x64
{9C4487E8-EEB0-4A7F-BD81-23F81CD24E22}.Debug|x86.ActiveCfg = Development|Win32
{9C4487E8-EEB0-4A7F-BD81-23F81CD24E22}.Debug|x86.Build.0 = Development|Win32
{9C4487E8-EEB0-4A7F-BD81-23F81CD24E22}.Development|x64.ActiveCfg = Development|x64
{9C4487E8-EEB0-4A7F-BD81-23F81CD24E22}.Development|x64.Build.0 = Development|x64
{9C4487E8-EEB0-4A7F-BD81-23F81CD24E22}.Development|x86.ActiveCfg = Development|Win32
@@ -253,10 +195,6 @@ Global
{9C4487E8-EEB0-4A7F-BD81-23F81CD24E22}.Release|x64.Build.0 = Release|x64
{9C4487E8-EEB0-4A7F-BD81-23F81CD24E22}.Release|x86.ActiveCfg = Release|Win32
{9C4487E8-EEB0-4A7F-BD81-23F81CD24E22}.Release|x86.Build.0 = Release|Win32
{44044776-9469-4079-B587-ABFFF6574AA4}.Debug|x64.ActiveCfg = Development|x64
{44044776-9469-4079-B587-ABFFF6574AA4}.Debug|x64.Build.0 = Development|x64
{44044776-9469-4079-B587-ABFFF6574AA4}.Debug|x86.ActiveCfg = Development|Win32
{44044776-9469-4079-B587-ABFFF6574AA4}.Debug|x86.Build.0 = Development|Win32
{44044776-9469-4079-B587-ABFFF6574AA4}.Development|x64.ActiveCfg = Development|x64
{44044776-9469-4079-B587-ABFFF6574AA4}.Development|x64.Build.0 = Development|x64
{44044776-9469-4079-B587-ABFFF6574AA4}.Development|x86.ActiveCfg = Development|Win32
@@ -265,10 +203,6 @@ Global
{44044776-9469-4079-B587-ABFFF6574AA4}.Release|x64.Build.0 = Release|x64
{44044776-9469-4079-B587-ABFFF6574AA4}.Release|x86.ActiveCfg = Release|Win32
{44044776-9469-4079-B587-ABFFF6574AA4}.Release|x86.Build.0 = Release|Win32
{88C5DAC6-30A0-4CFD-AF51-540A977D1F3F}.Debug|x64.ActiveCfg = Development|x64
{88C5DAC6-30A0-4CFD-AF51-540A977D1F3F}.Debug|x64.Build.0 = Development|x64
{88C5DAC6-30A0-4CFD-AF51-540A977D1F3F}.Debug|x86.ActiveCfg = Development|Win32
{88C5DAC6-30A0-4CFD-AF51-540A977D1F3F}.Debug|x86.Build.0 = Development|Win32
{88C5DAC6-30A0-4CFD-AF51-540A977D1F3F}.Development|x64.ActiveCfg = Development|x64
{88C5DAC6-30A0-4CFD-AF51-540A977D1F3F}.Development|x64.Build.0 = Development|x64
{88C5DAC6-30A0-4CFD-AF51-540A977D1F3F}.Development|x86.ActiveCfg = Development|Win32
@@ -277,10 +211,6 @@ Global
{88C5DAC6-30A0-4CFD-AF51-540A977D1F3F}.Release|x64.Build.0 = Release|x64
{88C5DAC6-30A0-4CFD-AF51-540A977D1F3F}.Release|x86.ActiveCfg = Release|Win32
{88C5DAC6-30A0-4CFD-AF51-540A977D1F3F}.Release|x86.Build.0 = Release|Win32
{F92FCDA6-A261-4EEC-9CD0-73A11FBCC459}.Debug|x64.ActiveCfg = Development|x64
{F92FCDA6-A261-4EEC-9CD0-73A11FBCC459}.Debug|x64.Build.0 = Development|x64
{F92FCDA6-A261-4EEC-9CD0-73A11FBCC459}.Debug|x86.ActiveCfg = Development|Win32
{F92FCDA6-A261-4EEC-9CD0-73A11FBCC459}.Debug|x86.Build.0 = Development|Win32
{F92FCDA6-A261-4EEC-9CD0-73A11FBCC459}.Development|x64.ActiveCfg = Development|x64
{F92FCDA6-A261-4EEC-9CD0-73A11FBCC459}.Development|x64.Build.0 = Development|x64
{F92FCDA6-A261-4EEC-9CD0-73A11FBCC459}.Development|x86.ActiveCfg = Development|Win32
@@ -289,10 +219,6 @@ Global
{F92FCDA6-A261-4EEC-9CD0-73A11FBCC459}.Release|x64.Build.0 = Release|x64
{F92FCDA6-A261-4EEC-9CD0-73A11FBCC459}.Release|x86.ActiveCfg = Release|Win32
{F92FCDA6-A261-4EEC-9CD0-73A11FBCC459}.Release|x86.Build.0 = Release|Win32
{9E6B10A2-84B4-434D-ABDB-43BE4EA650F4}.Debug|x64.ActiveCfg = Development|x64
{9E6B10A2-84B4-434D-ABDB-43BE4EA650F4}.Debug|x64.Build.0 = Development|x64
{9E6B10A2-84B4-434D-ABDB-43BE4EA650F4}.Debug|x86.ActiveCfg = Development|Win32
{9E6B10A2-84B4-434D-ABDB-43BE4EA650F4}.Debug|x86.Build.0 = Development|Win32
{9E6B10A2-84B4-434D-ABDB-43BE4EA650F4}.Development|x64.ActiveCfg = Development|x64
{9E6B10A2-84B4-434D-ABDB-43BE4EA650F4}.Development|x64.Build.0 = Development|x64
{9E6B10A2-84B4-434D-ABDB-43BE4EA650F4}.Development|x86.ActiveCfg = Development|Win32
@@ -301,10 +227,6 @@ Global
{9E6B10A2-84B4-434D-ABDB-43BE4EA650F4}.Release|x64.Build.0 = Release|x64
{9E6B10A2-84B4-434D-ABDB-43BE4EA650F4}.Release|x86.ActiveCfg = Release|Win32
{9E6B10A2-84B4-434D-ABDB-43BE4EA650F4}.Release|x86.Build.0 = Release|Win32
{A8998B2D-652A-47F8-955B-5654B222B4EB}.Debug|x64.ActiveCfg = Development|x64
{A8998B2D-652A-47F8-955B-5654B222B4EB}.Debug|x64.Build.0 = Development|x64
{A8998B2D-652A-47F8-955B-5654B222B4EB}.Debug|x86.ActiveCfg = Development|Win32
{A8998B2D-652A-47F8-955B-5654B222B4EB}.Debug|x86.Build.0 = Development|Win32
{A8998B2D-652A-47F8-955B-5654B222B4EB}.Development|x64.ActiveCfg = Development|x64
{A8998B2D-652A-47F8-955B-5654B222B4EB}.Development|x64.Build.0 = Development|x64
{A8998B2D-652A-47F8-955B-5654B222B4EB}.Development|x86.ActiveCfg = Development|Win32
@@ -313,10 +235,6 @@ Global
{A8998B2D-652A-47F8-955B-5654B222B4EB}.Release|x64.Build.0 = Release|x64
{A8998B2D-652A-47F8-955B-5654B222B4EB}.Release|x86.ActiveCfg = Release|Win32
{A8998B2D-652A-47F8-955B-5654B222B4EB}.Release|x86.Build.0 = Release|Win32
{61157930-78C3-4355-8B49-4CC91B98F17B}.Debug|x64.ActiveCfg = Development|x64
{61157930-78C3-4355-8B49-4CC91B98F17B}.Debug|x64.Build.0 = Development|x64
{61157930-78C3-4355-8B49-4CC91B98F17B}.Debug|x86.ActiveCfg = Development|Win32
{61157930-78C3-4355-8B49-4CC91B98F17B}.Debug|x86.Build.0 = Development|Win32
{61157930-78C3-4355-8B49-4CC91B98F17B}.Development|x64.ActiveCfg = Development|x64
{61157930-78C3-4355-8B49-4CC91B98F17B}.Development|x64.Build.0 = Development|x64
{61157930-78C3-4355-8B49-4CC91B98F17B}.Development|x86.ActiveCfg = Development|Win32
@@ -325,10 +243,6 @@ Global
{61157930-78C3-4355-8B49-4CC91B98F17B}.Release|x64.Build.0 = Release|x64
{61157930-78C3-4355-8B49-4CC91B98F17B}.Release|x86.ActiveCfg = Release|Win32
{61157930-78C3-4355-8B49-4CC91B98F17B}.Release|x86.Build.0 = Release|Win32
{257FD75C-4D17-4A23-A754-23BFD85887A0}.Debug|x64.ActiveCfg = Development|x64
{257FD75C-4D17-4A23-A754-23BFD85887A0}.Debug|x64.Build.0 = Development|x64
{257FD75C-4D17-4A23-A754-23BFD85887A0}.Debug|x86.ActiveCfg = Development|Win32
{257FD75C-4D17-4A23-A754-23BFD85887A0}.Debug|x86.Build.0 = Development|Win32
{257FD75C-4D17-4A23-A754-23BFD85887A0}.Development|x64.ActiveCfg = Development|x64
{257FD75C-4D17-4A23-A754-23BFD85887A0}.Development|x64.Build.0 = Development|x64
{257FD75C-4D17-4A23-A754-23BFD85887A0}.Development|x86.ActiveCfg = Development|Win32
@@ -337,10 +251,6 @@ Global
{257FD75C-4D17-4A23-A754-23BFD85887A0}.Release|x64.Build.0 = Release|x64
{257FD75C-4D17-4A23-A754-23BFD85887A0}.Release|x86.ActiveCfg = Release|Win32
{257FD75C-4D17-4A23-A754-23BFD85887A0}.Release|x86.Build.0 = Release|Win32
{37955C79-D91D-423F-8C6C-8F5BCF4F28D4}.Debug|x64.ActiveCfg = Development|x64
{37955C79-D91D-423F-8C6C-8F5BCF4F28D4}.Debug|x64.Build.0 = Development|x64
{37955C79-D91D-423F-8C6C-8F5BCF4F28D4}.Debug|x86.ActiveCfg = Development|Win32
{37955C79-D91D-423F-8C6C-8F5BCF4F28D4}.Debug|x86.Build.0 = Development|Win32
{37955C79-D91D-423F-8C6C-8F5BCF4F28D4}.Development|x64.ActiveCfg = Development|x64
{37955C79-D91D-423F-8C6C-8F5BCF4F28D4}.Development|x64.Build.0 = Development|x64
{37955C79-D91D-423F-8C6C-8F5BCF4F28D4}.Development|x86.ActiveCfg = Development|Win32
@@ -349,10 +259,6 @@ Global
{37955C79-D91D-423F-8C6C-8F5BCF4F28D4}.Release|x64.Build.0 = Release|x64
{37955C79-D91D-423F-8C6C-8F5BCF4F28D4}.Release|x86.ActiveCfg = Release|Win32
{37955C79-D91D-423F-8C6C-8F5BCF4F28D4}.Release|x86.Build.0 = Release|Win32
{40349AD9-5558-4DF4-84E2-11934DE90A11}.Debug|x64.ActiveCfg = Development|x64
{40349AD9-5558-4DF4-84E2-11934DE90A11}.Debug|x64.Build.0 = Development|x64
{40349AD9-5558-4DF4-84E2-11934DE90A11}.Debug|x86.ActiveCfg = Development|Win32
{40349AD9-5558-4DF4-84E2-11934DE90A11}.Debug|x86.Build.0 = Development|Win32
{40349AD9-5558-4DF4-84E2-11934DE90A11}.Development|x64.ActiveCfg = Development|x64
{40349AD9-5558-4DF4-84E2-11934DE90A11}.Development|x64.Build.0 = Development|x64
{40349AD9-5558-4DF4-84E2-11934DE90A11}.Development|x86.ActiveCfg = Development|Win32
@@ -361,10 +267,6 @@ Global
{40349AD9-5558-4DF4-84E2-11934DE90A11}.Release|x64.Build.0 = Release|x64
{40349AD9-5558-4DF4-84E2-11934DE90A11}.Release|x86.ActiveCfg = Release|Win32
{40349AD9-5558-4DF4-84E2-11934DE90A11}.Release|x86.Build.0 = Release|Win32
{B33F8FFD-3C04-4779-9C3B-E2858387971B}.Debug|x64.ActiveCfg = Development|x64
{B33F8FFD-3C04-4779-9C3B-E2858387971B}.Debug|x64.Build.0 = Development|x64
{B33F8FFD-3C04-4779-9C3B-E2858387971B}.Debug|x86.ActiveCfg = Development|Win32
{B33F8FFD-3C04-4779-9C3B-E2858387971B}.Debug|x86.Build.0 = Development|Win32
{B33F8FFD-3C04-4779-9C3B-E2858387971B}.Development|x64.ActiveCfg = Development|x64
{B33F8FFD-3C04-4779-9C3B-E2858387971B}.Development|x64.Build.0 = Development|x64
{B33F8FFD-3C04-4779-9C3B-E2858387971B}.Development|x86.ActiveCfg = Development|Win32
@@ -373,14 +275,10 @@ Global
{B33F8FFD-3C04-4779-9C3B-E2858387971B}.Release|x64.Build.0 = Release|x64
{B33F8FFD-3C04-4779-9C3B-E2858387971B}.Release|x86.ActiveCfg = Release|Win32
{B33F8FFD-3C04-4779-9C3B-E2858387971B}.Release|x86.Build.0 = Release|Win32
{7FCB5FC5-1DBD-4DA6-83A0-6BA4E945BDA5}.Debug|x64.ActiveCfg = Debug|x64
{7FCB5FC5-1DBD-4DA6-83A0-6BA4E945BDA5}.Debug|x64.Build.0 = Debug|x64
{7FCB5FC5-1DBD-4DA6-83A0-6BA4E945BDA5}.Debug|x86.ActiveCfg = Debug|Win32
{7FCB5FC5-1DBD-4DA6-83A0-6BA4E945BDA5}.Debug|x86.Build.0 = Debug|Win32
{7FCB5FC5-1DBD-4DA6-83A0-6BA4E945BDA5}.Development|x64.ActiveCfg = Debug|x64
{7FCB5FC5-1DBD-4DA6-83A0-6BA4E945BDA5}.Development|x64.Build.0 = Debug|x64
{7FCB5FC5-1DBD-4DA6-83A0-6BA4E945BDA5}.Development|x86.ActiveCfg = Debug|Win32
{7FCB5FC5-1DBD-4DA6-83A0-6BA4E945BDA5}.Development|x86.Build.0 = Debug|Win32
{7FCB5FC5-1DBD-4DA6-83A0-6BA4E945BDA5}.Development|x64.ActiveCfg = Development|x64
{7FCB5FC5-1DBD-4DA6-83A0-6BA4E945BDA5}.Development|x64.Build.0 = Development|x64
{7FCB5FC5-1DBD-4DA6-83A0-6BA4E945BDA5}.Development|x86.ActiveCfg = Development|Win32
{7FCB5FC5-1DBD-4DA6-83A0-6BA4E945BDA5}.Development|x86.Build.0 = Development|Win32
{7FCB5FC5-1DBD-4DA6-83A0-6BA4E945BDA5}.Release|x64.ActiveCfg = Release|x64
{7FCB5FC5-1DBD-4DA6-83A0-6BA4E945BDA5}.Release|x64.Build.0 = Release|x64
{7FCB5FC5-1DBD-4DA6-83A0-6BA4E945BDA5}.Release|x86.ActiveCfg = Release|Win32
+1 -1
View File
@@ -557,7 +557,7 @@ vector<CounterResult> D3D11Replay::FetchCountersIntel(const vector<GPUCounter> &
m_pIntelCounters->EndPass();
}
m_pIntelCounters->EndSesssion();
m_pIntelCounters->EndSession();
return m_pIntelCounters->GetCounterData(eventIDs, counters);
}
+47 -70
View File
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<ProjectConfiguration Include="Development|Win32">
<Configuration>Development</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Development|x64">
<Configuration>Development</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
@@ -24,90 +24,69 @@
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PropertyGroup>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<ExecutablePath>$(ExecutablePath)</ExecutablePath>
<IncludePath>$(SolutionDir)\breakpad;$(IncludePath)</IncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath>
<ExcludePath>$(ExcludePath)</ExcludePath>
<TargetName>driver_$(ProjectName)</TargetName>
</PropertyGroup>
<PropertyGroup>
<IntDir>$(SolutionDir)$(Platform)\$(Configuration)\obj\$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)renderdoc\;$(SolutionDir)renderdoc\3rdparty\</AdditionalIncludeDirectories>
<PreprocessorDefinitions>RENDERDOC_EXPORTS;RENDERDOC_PLATFORM_WIN32;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level4</WarningLevel>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<TreatWarningAsError>true</TreatWarningAsError>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4100</DisableSpecificWarnings>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ItemDefinitionGroup Condition="'$(Configuration)'=='Development'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)renderdoc\</AdditionalIncludeDirectories>
<PreprocessorDefinitions>RENDERDOC_EXPORTS;RENDERDOC_PLATFORM_WIN32;WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
@@ -115,14 +94,12 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="driver_store_path.cpp" />
<ClCompile Include="intel_counters.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="driver_store_path.h" />
<ClInclude Include="intel_counters.h" />
<ClInclude Include="metrics_discovery_api.h" />
<ClInclude Include="official\DriverStorePath.h" />
<ClInclude Include="official\metrics_discovery_api.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
@@ -1,383 +0,0 @@
/*****************************************************************************\
Copyright (C) 2018, Intel Corporation
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
\*****************************************************************************/
#include <Windows.h>
#include <initguid.h>
#include <Devpkey.h>
#include <SetupAPI.h>
#include <Shlwapi.h>
#include <ntddvdeo.h>
#include <string>
#include "driver_store_path.h"
#define VENDORNAME L"intel"
#if DEBUG
#define DBG(std, fmt, ...) fprintf_s(std, fmt, __VA_ARGS__)
#else
#define DBG(std, fmt, ...)
#endif
/********************************************************************************************/
/* GetPropertyFromDevice */
/* */
/* This function can be used to request a value of any device property. */
/* There are many types of properties values. Refer to devpkey.h for more details. */
/* Function SetupDiGetDeviceProperty() inside GetPropertyFromDevice() fills a propery value */
/* in a correct format, but always returs the value as a pointer to a string of bytes. */
/* The string of bytes must be casted outside of the function GetPropertyFromDevice() */
/* to get a value in a format suitable for the given type of property. */
/* */
/********************************************************************************************/
bool GetPropertyFromDevice(void *pDevInfo, PSP_DEVINFO_DATA pDevInfoData,
const DEVPROPKEY *pPropertyKey, unsigned char **ppStringOut,
unsigned long *pStringOutSize)
{
unsigned long propertyType = 0;
unsigned long propertySize = 0;
// request a size, in bytes, required for a buffer in which property value will be stored
// SetupDiGetDeviceProperty() returns false and ERROR_INSUFFICIENT_BUFFER for the call
if(SetupDiGetDevicePropertyW(pDevInfo, pDevInfoData, pPropertyKey, &propertyType, NULL, 0,
&propertySize, 0))
{
DBG(stderr, "%s [%d] ---> SetupDiGetDevicePropertyW() failed with the error code 0x%02x\n",
__FUNCTION__, __LINE__, GetLastError());
return false;
}
if(GetLastError() != ERROR_INSUFFICIENT_BUFFER)
{
DBG(stderr, "%s [%d] ---> SetupDiGetDevicePropertyW() failed with the error code 0x%02x\n",
__FUNCTION__, __LINE__, GetLastError());
return false;
}
if(!ppStringOut)
{
SetLastError(ERROR_INVALID_HANDLE);
DBG(stderr, "%s [%d] ---> Error: input parameter ppStringOut = NULL\n", __FUNCTION__, __LINE__);
return false;
}
// allocate memory for the buffer
*ppStringOut = new(std::nothrow) unsigned char[propertySize];
if(*ppStringOut == NULL)
{
SetLastError(ERROR_INVALID_HANDLE);
DBG(stderr, "%s [%d] ---> Error: *ppStringOut = NULL\n", __FUNCTION__, __LINE__);
return false;
}
// fill in the buffer with property value
if(!SetupDiGetDevicePropertyW(pDevInfo, pDevInfoData, pPropertyKey, &propertyType, *ppStringOut,
propertySize, NULL, 0))
{
DBG(stderr, "%s [%d] ---> SetupDiGetDevicePropertyW() failed with the error code 0x%02x\n",
__FUNCTION__, __LINE__, GetLastError());
delete[] * ppStringOut;
*ppStringOut = NULL;
return false;
}
if(pStringOutSize)
{
*pStringOutSize = propertySize;
}
return true;
}
/************************************************************************/
/* GetIntelDriverStoreFullPath */
/************************************************************************/
bool GetIntelDriverStoreFullPath(wchar_t *pDriverStorePath,
unsigned long driverStorePathSizeInCharacters,
unsigned long *pDriverStorePathLengthInCharacters)
{
bool result = false;
// allocated memory must be freed with delete operation
unsigned char *pPropertyInfName = NULL;
// allocated memory must be freed with delete operation
unsigned char *pPropertyDevServiceName = NULL;
unsigned long StringOutSize = 0;
// guid defined for display adapters
const GUID guid = GUID_DISPLAY_DEVICE_ARRIVAL;
// create device information set containing dispaly adapters which support interfaces and are
// currently present in the system
void *pDevInfo = SetupDiGetClassDevs(&guid, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT);
if(pDevInfo == INVALID_HANDLE_VALUE)
{
DBG(stderr,
"%s [%d] ---> SetupDiGetClassDevs() failed with the error code 0x%02x, pDevInfo = "
"INVALID_HANDLE_VALUE\n",
__FUNCTION__, __LINE__, GetLastError());
goto END;
}
unsigned long deviceIndex = 0;
unsigned long interfaceIndex = 0;
unsigned long driverStorePathLengthInCharacters = 0;
// enumerate dispaly adapters
while(true)
{
SP_DEVINFO_DATA devInfoData = {};
devInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
if(!SetupDiEnumDeviceInfo(pDevInfo, deviceIndex, &devInfoData))
{
if(GetLastError() != ERROR_NO_MORE_ITEMS)
{
DBG(stderr, "%s [%d] ---> SetupDiEnumDeviceInfo() failed with the error code 0x%02x\n",
__FUNCTION__, __LINE__, GetLastError());
}
deviceIndex = 0;
goto END;
}
// enumerate interfaces of display adapters
while(true)
{
SP_DEVICE_INTERFACE_DATA deviceInterfaceData = {};
deviceInterfaceData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
if(!SetupDiEnumDeviceInterfaces(pDevInfo, &devInfoData, &guid, interfaceIndex,
&deviceInterfaceData))
{
if(GetLastError() == ERROR_NO_MORE_ITEMS)
{
interfaceIndex = 0;
break;
}
else
{
DBG(stderr,
"%s [%d] ---> SetupDiEnumDeviceInterfaces() failed with the error code 0x%02x\n",
__FUNCTION__, __LINE__, GetLastError());
interfaceIndex = 0;
goto END;
}
}
// get an inf file name for a display adapter
if(!GetPropertyFromDevice(pDevInfo, &devInfoData, &DEVPKEY_Device_DriverInfPath,
&pPropertyInfName, NULL))
{
DBG(stderr, "%s [%d] ---> GetPropertyFromDevice() failed with the error code 0x%02x\n",
__FUNCTION__, __LINE__, GetLastError());
goto END;
}
// to read DEVPKEY_Device_DriverInfPath property value correctly just cast unsigned char* (means PBYTE) to const wchar_t*
const wchar_t *pInfName = reinterpret_cast<const wchar_t *>(pPropertyInfName);
DBG(stdout, "\n");
DBG(stdout, "pPropertyInfName = %ws\n", pInfName);
wchar_t driverStorePath[MAX_PATH] = {};
// get a fully qualified name of an inf file (directory path and file name)
if(!SetupGetInfDriverStoreLocationW(pInfName, NULL, NULL, driverStorePath,
ARRAYSIZE(driverStorePath), NULL))
{
// SetupGetInfDriverStoreLocationW doesn't work in Universal Windows Platform apps. Try to
// get driverStorePath through the env variable
if(!GetEnvironmentVariableW(L"DRV_INST_PATH", driverStorePath, MAX_PATH))
{
DBG(stderr,
"%s [%d] ---> SetupGetInfDriverStoreLocation() failed with the error code 0x%02x\n",
__FUNCTION__, __LINE__, GetLastError());
goto END;
}
}
// remove backslash and file name from the fully qualified name
PathRemoveFileSpecW(driverStorePath);
DBG(stdout, "driverStorePath = %ws\n", driverStorePath);
driverStorePathLengthInCharacters =
(unsigned long)wcsnlen_s(driverStorePath, ARRAYSIZE(driverStorePath));
DBG(stdout, "driverStorePathLengthInCharacters = %d\n", driverStorePathLengthInCharacters);
// get service name for a display adapter
if(!GetPropertyFromDevice(pDevInfo, &devInfoData, &DEVPKEY_Device_Manufacturer,
&pPropertyDevServiceName, &StringOutSize))
{
DBG(stderr, "%s [%d] ---> GetPropertyFromDevice() failed with the error code 0x%02x\n",
__FUNCTION__, __LINE__, GetLastError());
goto END;
}
// to read DEVPKEY_Device_Service property value correctly just cast unsigned char* (means PBYTE) to const wchar_t*
StringOutSize = (unsigned long)wcsnlen_s(reinterpret_cast<wchar_t *>(pPropertyDevServiceName),
(size_t)StringOutSize);
_wcslwr_s(reinterpret_cast<wchar_t *>(pPropertyDevServiceName), StringOutSize + 1);
wchar_t *pDevServiceName = reinterpret_cast<wchar_t *>(pPropertyDevServiceName);
DBG(stdout, "pDevServiceName = %ws\n", pDevServiceName);
// check if a given display adapter is from intel based on driver device service name "igfx"
// check if pDevServiceName contains "igfx" name
if((wcsncmp(pDevServiceName, VENDORNAME, wcslen(VENDORNAME)) == 0))
{
// display adapter is from Intel
DBG(stdout, "this display adapter is from Intel\n");
if(!pDriverStorePath)
{
DBG(stderr, "%s [%d] ---> Error: input parameter pDriverStorePath = NULL\n", __FUNCTION__,
__LINE__);
goto END;
}
if(driverStorePathSizeInCharacters < driverStorePathLengthInCharacters + 1)
{
DBG(stderr,
"%s [%d] ---> Error: input parameter driverStorePathSizeInCharacters = %d is too "
"small, the required size is %d\n",
__FUNCTION__, __LINE__, driverStorePathSizeInCharacters,
driverStorePathLengthInCharacters + 1);
goto END;
}
wcscpy_s(pDriverStorePath, driverStorePathSizeInCharacters, driverStorePath);
if(pDriverStorePathLengthInCharacters)
{
*pDriverStorePathLengthInCharacters = driverStorePathLengthInCharacters;
}
result = (driverStorePathLengthInCharacters > 0) ? true : false;
if(!result)
{
SetLastError(ERROR_BAD_LENGTH);
DBG(stderr, "%s [%d] ---> Error: driverStorePathLengthInCharacters = 0, result = false\n",
__FUNCTION__, __LINE__);
}
goto END;
}
else
{
// display adapter is from other vendor
DBG(stdout, "this display adapter is NOT from Intel\n");
if(pPropertyDevServiceName)
{
delete[] pPropertyDevServiceName;
pPropertyDevServiceName = NULL;
}
if(pPropertyInfName)
{
delete[] pPropertyInfName;
pPropertyInfName = NULL;
}
}
++interfaceIndex;
}
++deviceIndex;
}
END:
DBG(stdout, "\n");
if(pPropertyDevServiceName)
{
delete[] pPropertyDevServiceName;
pPropertyDevServiceName = NULL;
}
if(pPropertyInfName)
{
delete[] pPropertyInfName;
pPropertyInfName = NULL;
}
if(pDevInfo)
{
SetupDiDestroyDeviceInfoList(pDevInfo);
pDevInfo = NULL;
}
return result;
}
/************************************************************************/
/* LoadDynamicLibrary */
/************************************************************************/
HMODULE LoadDynamicLibrary(const wchar_t *pFileName, HANDLE hFile, unsigned long flags)
{
HMODULE hModule = NULL;
unsigned long driverStorePathLengthInCharacters = 0;
// contains fully qualified name of DriverStore (directory path only without backslash at the end)
// for Intel display driver for example:
// C:\Windows\System32\DriverStore\FileRepository\igdlh64.inf_amd64_1d1d318ad2d391db
wchar_t driverStorePath[MAX_PATH] = {0};
// find fully qualified name of DriverStore for Intel graphics driver
if(GetIntelDriverStoreFullPath(driverStorePath, ARRAYSIZE(driverStorePath),
&driverStorePathLengthInCharacters))
{
std::wstring driverStoreFullPath(driverStorePath);
if(driverStorePathLengthInCharacters)
{
driverStoreFullPath += L"\\";
driverStoreFullPath += pFileName;
}
DBG(stdout, "full path: %ws\n\n", driverStoreFullPath.c_str());
// load dll from DriverStore full path
hModule = LoadLibraryExW(driverStoreFullPath.c_str(), NULL, 0);
}
else
{
DBG(stderr, "%s [%d] ---> GetIntelDriverStoreFullPath() failed\n", __FUNCTION__, __LINE__);
hModule = NULL;
}
return hModule;
}
/************************************************************************/
/* UnloadDynamicLibrary */
/************************************************************************/
bool UnloadDynamicLibrary(HMODULE *phModule)
{
if(phModule)
{
return FreeLibrary(*phModule) ? true : false;
}
else
{
DBG(stderr, "%s [%d] ---> Error: input parameter phModule = NULL\n", __FUNCTION__, __LINE__);
return false;
}
}
@@ -1,40 +0,0 @@
/*****************************************************************************\
Copyright (C) 2018, Intel Corporation
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
\*****************************************************************************/
#pragma once
#include <SetupAPI.h>
#include <initguid.h>
bool GetPropertyFromDevice(void *pDevInfo, PSP_DEVINFO_DATA pDevInfoData,
const DEVPROPKEY *pPropertyKey, unsigned char **ppStringOut,
unsigned long *pStringOutSize);
bool GetIntelDriverStoreFullPath(wchar_t *pDriverStorePath,
unsigned long driverStorePathSizeInCharacters,
unsigned long *pDriverStorePathLengthInCharacters);
HMODULE LoadDynamicLibrary(const wchar_t *pFileName, HANDLE hFile = NULL, unsigned long flags = 0);
bool UnloadDynamicLibrary(HMODULE *phModule);
+45 -37
View File
@@ -1,42 +1,42 @@
/*****************************************************************************\
Copyright (C) 2018, Intel Corporation
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
\*****************************************************************************/
/******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2018 Baldur Karlsson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
******************************************************************************/
#include "common/common.h"
#include "official/DriverStorePath.h"
#include "intel_counters.h"
#include "driver_store_path.h"
#include <set>
const static std::vector<std::string> metricSetBlacklist = {"TestOa"};
IntelCounters::IntelCounters()
: m_MDLibraryHandle(nullptr),
m_metricsDevice(nullptr),
m_device(nullptr),
m_deviceContext(nullptr),
m_counter(nullptr),
: m_MDLibraryHandle(NULL),
m_metricsDevice(NULL),
m_device(NULL),
m_deviceContext(NULL),
m_counter(NULL),
m_passIndex(0),
m_sampleIndex(0)
{
@@ -61,7 +61,7 @@ bool IntelCounters::Init(void *pContext)
if(!m_deviceContext)
return false;
m_MDLibraryHandle = LoadDynamicLibrary(L"igdmd64.dll", nullptr, 0);
m_MDLibraryHandle = LoadDynamicLibrary(L"igdmd64.dll", NULL, 0);
if(!m_MDLibraryHandle)
return false;
@@ -84,7 +84,7 @@ bool IntelCounters::Init(void *pContext)
{
CloseMetricsDevice(m_metricsDevice);
FreeLibrary(m_MDLibraryHandle);
m_metricsDevice = nullptr;
m_metricsDevice = NULL;
m_MDLibraryHandle = (HMODULE)0;
return false;
}
@@ -170,7 +170,11 @@ std::vector<CounterDescription> IntelCounters::EnumerateCounters()
else if(strcmp(metricParams->MetricResultUnits, "percent") == 0)
counterDesc.unit = CounterUnit::Percentage;
else if(strcmp(metricParams->MetricResultUnits, "ns") == 0)
{
counterDesc.unit = CounterUnit::Seconds;
counterDesc.resultType = CompType::Float;
counterDesc.resultByteWidth = sizeof(float);
}
uint32_t counterId = (uint32_t)GPUCounter::FirstIntel + (uint32_t)m_Counters.size();
counterDesc.counter = (GPUCounter)counterId;
@@ -220,7 +224,7 @@ uint32_t IntelCounters::BeginSession()
return 0;
}
void IntelCounters::EndSesssion()
void IntelCounters::EndSession()
{
if(!m_metricsDevice)
return;
@@ -316,8 +320,8 @@ void IntelCounters::EndSample()
m_deviceContext->End(m_counter);
HRESULT hr = S_OK;
uint32_t iteration = 0;
const uint32_t max_attempts = 0xFFFFFFFF;
void *counter_data = nullptr;
const uint32_t max_attempts = 0xFFFF;
void *counter_data = NULL;
do
{
@@ -381,9 +385,6 @@ std::vector<CounterResult> IntelCounters::GetCounterData(const std::vector<uint3
{
uint64_t value =
m_results[std::pair<GPUCounter, uint32_t>(desc.counter, sample)].ValueUInt64;
// RenderDoc expects time metrics in microceconds
if(desc.unit == CounterUnit::Seconds)
value /= 1000;
if(desc.unit == CounterUnit::Percentage)
{
@@ -401,6 +402,13 @@ std::vector<CounterResult> IntelCounters::GetCounterData(const std::vector<uint3
case CompType::Float:
{
float value = m_results[std::pair<GPUCounter, uint32_t>(desc.counter, sample)].ValueFloat;
if(desc.unit == CounterUnit::Seconds)
{
float nanoseconds =
(float)m_results[std::pair<GPUCounter, uint32_t>(desc.counter, sample)].ValueUInt64;
value = nanoseconds / 1e9f;
}
if(fabs(value) < 1e-9)
{
value = 0.0f;
+25 -25
View File
@@ -1,26 +1,26 @@
/*****************************************************************************\
Copyright (C) 2018, Intel Corporation
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
\*****************************************************************************/
/******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2018 Baldur Karlsson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
******************************************************************************/
#pragma once
@@ -30,7 +30,7 @@
#include <vector>
#include "api/replay/renderdoc_replay.h"
#include "metrics_discovery_api.h"
#include "official/metrics_discovery_api.h"
using namespace MetricsDiscovery;
@@ -56,7 +56,7 @@ public:
uint32_t GetPassCount();
uint32_t BeginSession();
void EndSesssion();
void EndSession();
void BeginPass();
void EndPass();
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,333 @@
/*
// Copyright (c) 2018 Intel Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
*/
#pragma once
#include <initguid.h>
#include <ntddvdeo.h>
#include <Devpkey.h>
#include <SetupAPI.h>
#include <Shlwapi.h>
#define DEBUG 0
#if DEBUG
#define DBG(std, fmt, ...) fprintf_s(stderr, fmt, __VA_ARGS__)
#else
#define DBG(std, fmt, ...)
#endif
/********************************************************************************************/
/* GetPropertyFromDevice */
/* */
/* This function can be used to request a value of any device property. */
/* There are many types of properties values. Refer to devpkey.h for more details. */
/* Function SetupDiGetDeviceProperty() inside GetPropertyFromDevice() fills a property value*/
/* in a correct format, but always returns the value as a pointer to a string of bytes. */
/* The string of bytes must be casted outside of the function GetPropertyFromDevice() */
/* to get a value in a format suitable for the given type of property. */
/* */
/********************************************************************************************/
static bool GetPropertyFromDevice(
void* pDevInfo,
PSP_DEVINFO_DATA pDevInfoData,
const DEVPROPKEY* pPropertyKey,
unsigned char** ppStringOut,
unsigned long* pStringOutSize)
{
unsigned long propertyType = 0;
unsigned long propertySize = 0;
// request a size, in bytes, required for a buffer in which property value will be stored
// SetupDiGetDeviceProperty() returns false and ERROR_INSUFFICIENT_BUFFER for the call
if (SetupDiGetDevicePropertyW(pDevInfo, pDevInfoData, pPropertyKey, &propertyType, NULL, 0, &propertySize, 0))
{
DBG(stderr, "%s [%d] ---> SetupDiGetDeviceProperty() failed with the error code 0x%02x\n", __FUNCTION__, __LINE__, GetLastError());
return false;
}
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)
{
DBG(stderr, "%s [%d] ---> SetupDiGetDeviceProperty() failed with the error code 0x%02x\n", __FUNCTION__, __LINE__, GetLastError());
return false;
}
if (ppStringOut == NULL)
{
SetLastError(ERROR_INVALID_HANDLE);
DBG(stderr, "%s [%d] ---> Error: input parameter ppStringOut = NULL\n", __FUNCTION__, __LINE__);
return false;
}
// allocate memory for the buffer
*ppStringOut = new (std::nothrow) unsigned char[propertySize];
if (*ppStringOut == NULL)
{
SetLastError(ERROR_INVALID_HANDLE);
DBG(stderr, "%s [%d] ---> Error: *ppStringOut = NULL\n", __FUNCTION__, __LINE__);
return false;
}
// fill in the buffer with property value
if (!SetupDiGetDevicePropertyW(pDevInfo, pDevInfoData, pPropertyKey, &propertyType, *ppStringOut, propertySize, NULL, 0))
{
DBG(stderr, "%s [%d] ---> SetupDiGetDeviceProperty() failed with the error code 0x%02x\n", __FUNCTION__, __LINE__, GetLastError());
delete[] *ppStringOut;
*ppStringOut = NULL;
return false;
}
if (pStringOutSize)
{
*pStringOutSize = propertySize;
}
return true;
}
/************************************************************************/
/* GetIntelDriverStoreFullPath */
/************************************************************************/
static bool GetIntelDriverStoreFullPath(
wchar_t* pDriverStorePath,
unsigned long driverStorePathSizeInCharacters,
unsigned long* pDriverStorePathLengthInCharacters)
{
bool result = false;
// allocated memory must be freed with delete operation
unsigned char* pPropertyInfName = NULL;
// allocated memory must be freed with delete operation
unsigned char* pPropertyDevServiceName = NULL;
// guid defined for display adapters
const GUID guid = GUID_DISPLAY_DEVICE_ARRIVAL;
// create device information set containing display adapters which support interfaces and are currently present in the system
void* pDevInfo = SetupDiGetClassDevs(&guid, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT);
if (pDevInfo == INVALID_HANDLE_VALUE)
{
DBG(stderr, "%s [%d] ---> SetupDiGetClassDevs() failed with the error code 0x%02x, pDevInfo = INVALID_HANDLE_VALUE\n", __FUNCTION__, __LINE__, GetLastError());
goto END;
}
unsigned long deviceIndex = 0;
SP_DEVINFO_DATA devInfoData;
ZeroMemory(&devInfoData, sizeof(SP_DEVINFO_DATA));
unsigned long interfaceIndex = 0;
SP_DEVICE_INTERFACE_DATA deviceInterfaceData;
ZeroMemory(&deviceInterfaceData, sizeof(SP_DEVICE_INTERFACE_DATA));
DEVPROPKEY devPropKey;
ZeroMemory(&devPropKey, sizeof(DEVPROPKEY));
unsigned long driverStorePathLengthInCharacters = 0;
// enumerate display adapters
while (true)
{
ZeroMemory(&devInfoData, sizeof(SP_DEVINFO_DATA));
devInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
if (!SetupDiEnumDeviceInfo(pDevInfo, deviceIndex, &devInfoData))
{
if (GetLastError() != ERROR_NO_MORE_ITEMS)
{
DBG(stderr, "%s [%d] ---> SetupDiEnumDeviceInfo() failed with the error code 0x%02x\n", __FUNCTION__, __LINE__, GetLastError());
}
deviceIndex = 0;
goto END;
}
// enumerate interfaces of display adapters
while (true)
{
ZeroMemory(&deviceInterfaceData, sizeof(SP_DEVICE_INTERFACE_DATA));
deviceInterfaceData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
if (!SetupDiEnumDeviceInterfaces(pDevInfo, &devInfoData, &guid, interfaceIndex, &deviceInterfaceData))
{
if (GetLastError() == ERROR_NO_MORE_ITEMS)
{
interfaceIndex = 0;
break;
}
else
{
DBG(stderr, "%s [%d] ---> SetupDiEnumDeviceInterfaces() failed with the error code 0x%02x\n", __FUNCTION__, __LINE__, GetLastError());
interfaceIndex = 0;
goto END;
}
}
// get an inf file name for a display adapter
if (GetPropertyFromDevice(pDevInfo, &devInfoData, &DEVPKEY_Device_DriverInfPath, &pPropertyInfName, NULL) == false)
{
DBG(stderr, "%s [%d] ---> GetPropertyFromDevice() failed with the error code 0x%02x\n", __FUNCTION__, __LINE__, GetLastError());
goto END;
}
// to read DEVPKEY_Device_DriverInfPath property value correctly just cast unsigned char* (means PBYTE) to const wchar_t*
const wchar_t* pInfName = reinterpret_cast<const wchar_t*>(pPropertyInfName);
DBG(stdout, "\n");
DBG(stdout, "pPropertyInfName = %ws\n", pInfName);
wchar_t driverStorePath[MAX_PATH];
ZeroMemory(driverStorePath, sizeof(driverStorePath));
// get a fully qualified name of an inf file (directory path and file name)
if (!SetupGetInfDriverStoreLocationW(pInfName, NULL, NULL, driverStorePath, ARRAYSIZE(driverStorePath), NULL))
{
DBG(stderr, "%s [%d] ---> SetupGetInfDriverStoreLocation() failed with the error code 0x%02x\n", __FUNCTION__, __LINE__, GetLastError());
goto END;
}
// remove backslash and file name from the fully qualified name
PathRemoveFileSpecW(driverStorePath);
DBG(stdout, "driverStorePath = %ws\n", driverStorePath);
driverStorePathLengthInCharacters = (unsigned long)wcsnlen_s(driverStorePath, ARRAYSIZE(driverStorePath));
DBG(stdout, "driverStorePathLengthInCharacters = %d\n", driverStorePathLengthInCharacters);
// get service name for a display adapter
if (GetPropertyFromDevice(pDevInfo, &devInfoData, &DEVPKEY_Device_Service, &pPropertyDevServiceName, NULL) == false)
{
DBG(stderr, "%s [%d] ---> GetPropertyFromDevice() failed with the error code 0x%02x\n", __FUNCTION__, __LINE__, GetLastError());
goto END;
}
// to read DEVPKEY_Device_Service property value correctly just cast unsigned char* (means PBYTE) to const wchar_t*
const wchar_t* pDevServiceName = reinterpret_cast<const wchar_t*>(pPropertyDevServiceName);
DBG(stdout, "pDevServiceName = %ws\n", pDevServiceName);
// check if a given display adapter is from Intel based on driver device service name "igfx"
// check if pDevServiceName contains "igfx" name
if (wcsstr(pDevServiceName, L"igfx"))
{
// display adapter is from Intel
DBG(stdout, "this display adapter is from Intel\n");
if (pDriverStorePath == NULL)
{
DBG(stderr, "%s [%d] ---> Error: input parameter pDriverStorePath = NULL\n", __FUNCTION__, __LINE__);
goto END;
}
if (driverStorePathSizeInCharacters < driverStorePathLengthInCharacters + 1)
{
DBG(stderr, "%s [%d] ---> Error: input parameter driverStorePathSizeInCharacters = %d is too small, the required size is %d\n", __FUNCTION__, __LINE__, driverStorePathSizeInCharacters, driverStorePathLengthInCharacters + 1);
goto END;
}
wcscpy_s(pDriverStorePath, driverStorePathSizeInCharacters, driverStorePath);
if (pDriverStorePathLengthInCharacters)
{
*pDriverStorePathLengthInCharacters = driverStorePathLengthInCharacters;
}
result = (driverStorePathLengthInCharacters > 0) ? true : false;
if (result == false)
{
SetLastError(ERROR_BAD_LENGTH);
DBG(stderr, "%s [%d] ---> Error: driverStorePathLengthInCharacters = 0, result = false\n", __FUNCTION__, __LINE__);
}
goto END;
}
else
{
// display adapter is from other vendor
DBG(stdout, "this display adapter is NOT from Intel\n");
if (pPropertyDevServiceName)
{
delete[] pPropertyDevServiceName;
pPropertyDevServiceName = NULL;
}
if (pPropertyInfName)
{
delete[] pPropertyInfName;
pPropertyInfName = NULL;
}
}
++interfaceIndex;
}
++deviceIndex;
}
END:
DBG(stdout, "\n");
if (pPropertyDevServiceName)
{
delete[] pPropertyDevServiceName;
pPropertyDevServiceName = NULL;
}
if (pPropertyInfName)
{
delete[] pPropertyInfName;
pPropertyInfName = NULL;
}
if (pDevInfo)
{
SetupDiDestroyDeviceInfoList(pDevInfo);
pDevInfo = NULL;
}
return result;
}
/************************************************************************/
/* LoadDynamicLibrary */
/************************************************************************/
static HMODULE LoadDynamicLibrary(const wchar_t* pFileName, HANDLE hFile = NULL, unsigned long flags = 0)
{
HMODULE hModule = NULL;
unsigned long driverStorePathLengthInCharacters = 0;
// contains fully qualified name of DriverStore (directory path only without backslash at the end) for Intel display driver
// for example: C:\Windows\System32\DriverStore\FileRepository\igdlh64.inf_amd64_1d1d318ad2d391db
wchar_t driverStorePath[MAX_PATH] = { 0 };
// find fully qualified name of DriverStore for Intel graphics driver
if (GetIntelDriverStoreFullPath(driverStorePath, ARRAYSIZE(driverStorePath), &driverStorePathLengthInCharacters) == true)
{
std::wstring driverStoreFullPath(driverStorePath);
if (driverStorePathLengthInCharacters)
{
driverStoreFullPath += L"\\";
driverStoreFullPath += pFileName;
}
DBG(stdout, "full path: %ws\n\n", driverStoreFullPath.c_str());
// load dll from DriverStore full path
hModule = LoadLibraryExW(driverStoreFullPath.c_str(), NULL, 0);
}
else
{
DBG(stderr, "%s [%d] ---> GetIntelDriverStoreFullPath() failed\n", __FUNCTION__, __LINE__);
hModule = NULL;
}
return hModule;
}
File diff suppressed because it is too large Load Diff
+4 -1
View File
@@ -78,7 +78,7 @@
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>tdh.lib;ws2_32.lib;kernel32.lib;user32.lib;shlwapi.lib;Setupapi.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>tdh.lib;ws2_32.lib;kernel32.lib;user32.lib;shlwapi.lib;setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>$(ProjectDir)os\win32\comexport.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<DelayLoadDLLs>tdh.dll</DelayLoadDLLs>
@@ -584,6 +584,9 @@
<ProjectReference Include="driver\ihv\amd\AMD.vcxproj">
<Project>{5de5a561-548a-4dd7-90f0-06a2b39eae9a}</Project>
</ProjectReference>
<ProjectReference Include="driver\ihv\intel\Intel.vcxproj">
<Project>{7fcb5fc5-1dbd-4da6-83a0-6ba4e945bda5}</Project>
</ProjectReference>
<ProjectReference Include="driver\ihv\nv\NV.vcxproj">
<Project>{40349ad9-5558-4df4-84e2-11934de90a11}</Project>
</ProjectReference>