Skip to content

Commit 8170aab

Browse files
committed
Merge branch 'release-gtd-external/rc2.3.0'
2 parents f5b8b75 + 7ec24eb commit 8170aab

File tree

86 files changed

+7822
-2632
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+7822
-2632
lines changed

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,3 @@ PresentData/PresentData.args.json
4141
IntelPresentMon/SampleClient/log.txt
4242

4343
IntelPresentMon/PresentMonAPI2/Internal.h
44-
45-
IntelPresentMon/CommonUtilities/git_hash.h

IntelPresentMon/AppCef/AppCef.rc

+4-4
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ IDI_ICON1 ICON "flask.ico"
6161
//
6262

6363
VS_VERSION_INFO VERSIONINFO
64-
FILEVERSION 1,0,0,0
65-
PRODUCTVERSION 2,1,0,0
64+
FILEVERSION 1,0,3,0
65+
PRODUCTVERSION 2,3,0,0
6666
FILEFLAGSMASK 0x3fL
6767
#ifdef _DEBUG
6868
FILEFLAGS 0x1L
@@ -79,12 +79,12 @@ BEGIN
7979
BEGIN
8080
VALUE "CompanyName", "Intel(R) Corporation"
8181
VALUE "FileDescription", "Intel(R) PresentMon application"
82-
VALUE "FileVersion", "1.0.0.0"
82+
VALUE "FileVersion", "1.0.3.0"
8383
VALUE "InternalName", "CefNano.exe"
8484
VALUE "LegalCopyright", "Copyright (C) 2017-2024"
8585
VALUE "OriginalFilename", "CefNano.exe"
8686
VALUE "ProductName", "Intel(R) PresentMon"
87-
VALUE "ProductVersion", "2.1.0.0"
87+
VALUE "ProductVersion", "2.3.0.0"
8888
END
8989
END
9090
BLOCK "VarFileInfo"

IntelPresentMon/AppCef/CefNano.vcxproj

+3
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@
8383
<ProjectReference Include="..\Core\Core.vcxproj">
8484
<Project>{808f5ea9-ea09-4d72-87b4-5397d43cba54}</Project>
8585
</ProjectReference>
86+
<ProjectReference Include="..\Versioning\Versioning.vcxproj">
87+
<Project>{c73aa532-e532-4d93-9279-905444653c08}</Project>
88+
</ProjectReference>
8689
</ItemGroup>
8790
<ItemGroup>
8891
<ResourceCompile Include="AppCef.rc" />

IntelPresentMon/AppCef/source/util/PathSanitaryCheck.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <algorithm>
55
#include <Core/source/infra/util/FolderResolver.h>
66
#include <Core/source/infra/Logging.h>
7+
#include <CommonUtilities/str/String.h>
78

89

910
namespace p2c::client::util
@@ -43,8 +44,9 @@ namespace p2c::client::util
4344
}
4445
bool PathSanitaryCheck(const std::filesystem::path& path, const std::filesystem::path& root)
4546
{
46-
const auto canonicalString = std::filesystem::weakly_canonical(path).wstring();
47-
const auto rootString = root.wstring();
48-
return canonicalString.starts_with(rootString);
47+
const auto canonicalString = pmon::util::str::ToLower(std::filesystem::weakly_canonical(path).wstring());
48+
const auto rootString = pmon::util::str::ToLower(root.wstring());
49+
const auto isSanitary = canonicalString.starts_with(rootString);
50+
return isSanitary;
4951
}
5052
}

IntelPresentMon/AppCef/source/util/async/Introspect.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ namespace p2c::client::util::async
3434
// filter predicate to only pick up metrics usable in dynamic queries (plus hardcoded blacklist)
3535
const auto filterPred = [](const pmapi::intro::MetricView& m) { const auto type = m.GetType();
3636
return
37-
( m.GetId() != PM_METRIC_GPU_LATENCY &&
38-
m.GetId() != PM_METRIC_DISPLAY_LATENCY)
37+
( m.GetId() != PM_METRIC_GPU_LATENCY)
3938
&&
4039
( type == PM_METRIC_TYPE_DYNAMIC ||
4140
type == PM_METRIC_TYPE_DYNAMIC_FRAME ||

IntelPresentMon/AppCef/source/winmain.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <Core/source/infra/util/FolderResolver.h>
99
#include <Core/source/cli/CliOptions.h>
1010
#include <CommonUtilities/log/IdentificationTable.h>
11-
#include <CommonUtilities/BuildId.h>
11+
#include <Versioning/BuildId.h>
1212
#include <CommonUtilities/win/Utilities.h>
1313
#include <PresentMonAPIWrapper/DiagnosticHandler.h>
1414
#include <dwmapi.h>
@@ -22,6 +22,7 @@
2222

2323
using namespace p2c;
2424
using namespace pmon::util;
25+
using namespace pmon::bid;
2526
using p2c::cli::Options;
2627
namespace ccef = client::cef;
2728
using namespace std::chrono_literals;

IntelPresentMon/CommonUtilities/CommonUtilities.vcxproj

+2-12
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
</ProjectConfiguration>
2020
</ItemGroup>
2121
<ItemGroup>
22-
<ClInclude Include="BuildId.h" />
2322
<ClInclude Include="cli\CliFramework.h" />
2423
<ClInclude Include="Exception.h" />
2524
<ClInclude Include="IntervalWaiter.h" />
@@ -92,7 +91,6 @@
9291
<ClInclude Include="pipe\WrapAsio.h" />
9392
</ItemGroup>
9493
<ItemGroup>
95-
<ClCompile Include="BuildId.cpp" />
9694
<ClCompile Include="cli\CliFramework.cpp" />
9795
<ClCompile Include="Exception.cpp" />
9896
<ClCompile Include="IntervalWaiter.cpp" />
@@ -137,8 +135,6 @@
137135
<ClCompile Include="win\Utilities.cpp" />
138136
</ItemGroup>
139137
<ItemGroup>
140-
<None Include="build-scripts\pre-build.bat" />
141-
<None Include="generated\.gitignore" />
142138
<None Include="vcpkg.json" />
143139
</ItemGroup>
144140
<PropertyGroup Label="Globals">
@@ -271,10 +267,7 @@
271267
</SubSystem>
272268
<GenerateDebugInformation>true</GenerateDebugInformation>
273269
</Link>
274-
<PreBuildEvent>
275-
<Command>build-scripts\pre-build.bat</Command>
276-
<Message>Generating build ID</Message>
277-
</PreBuildEvent>
270+
<PreBuildEvent />
278271
<CustomBuildStep>
279272
<Command>
280273
</Command>
@@ -304,10 +297,7 @@
304297
<OptimizeReferences>true</OptimizeReferences>
305298
<GenerateDebugInformation>true</GenerateDebugInformation>
306299
</Link>
307-
<PreBuildEvent>
308-
<Command>build-scripts\pre-build.bat</Command>
309-
<Message>Generating build ID</Message>
310-
</PreBuildEvent>
300+
<PreBuildEvent />
311301
<CustomBuildStep>
312302
<Command>
313303
</Command>

IntelPresentMon/CommonUtilities/CommonUtilities.vcxproj.filters

-10
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,6 @@
204204
<ClInclude Include="third\reflect.hpp">
205205
<Filter>Header Files</Filter>
206206
</ClInclude>
207-
<ClInclude Include="BuildId.h">
208-
<Filter>Header Files</Filter>
209-
</ClInclude>
210207
<ClInclude Include="PrecisionWaiter.h">
211208
<Filter>Header Files</Filter>
212209
</ClInclude>
@@ -347,9 +344,6 @@
347344
<ClCompile Include="pipe\CoroMutex.cpp">
348345
<Filter>Source Files</Filter>
349346
</ClCompile>
350-
<ClCompile Include="BuildId.cpp">
351-
<Filter>Source Files</Filter>
352-
</ClCompile>
353347
<ClCompile Include="PrecisionWaiter.cpp">
354348
<Filter>Source Files</Filter>
355349
</ClCompile>
@@ -362,9 +356,5 @@
362356
</ItemGroup>
363357
<ItemGroup>
364358
<None Include="vcpkg.json" />
365-
<None Include="build-scripts\pre-build.bat">
366-
<Filter>Source Files</Filter>
367-
</None>
368-
<None Include="generated\.gitignore" />
369359
</ItemGroup>
370360
</Project>

IntelPresentMon/CommonUtilities/Math.h

+32
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,36 @@ namespace pmon::util
2121
{
2222
return (a - b) < CommonEpsilon(a, b);
2323
}
24+
enum class MagnitudePrefix
25+
{
26+
Base,
27+
Kilo,
28+
Kibi,
29+
Mega,
30+
Mebi,
31+
Giga,
32+
Gibi,
33+
};
34+
constexpr double GetMagnitudeFactor(MagnitudePrefix prefix)
35+
{
36+
switch (prefix) {
37+
case MagnitudePrefix::Base: return 1.;
38+
case MagnitudePrefix::Kilo: return 1'000.;
39+
case MagnitudePrefix::Kibi: return 1'024.;
40+
case MagnitudePrefix::Mega: return 1'000'000.;
41+
case MagnitudePrefix::Mebi: return 1'048'576.;
42+
case MagnitudePrefix::Giga: return 1'000'000'000.;
43+
case MagnitudePrefix::Gibi: return 1'073'741'824.;
44+
default: return 0.;
45+
}
46+
}
47+
template<typename From, typename To = From>
48+
To ConvertMagnitudePrefix(From from, MagnitudePrefix fromPrefix, MagnitudePrefix toPrefix)
49+
{
50+
auto fromExtended = double(from);
51+
const auto srcFactor = GetMagnitudeFactor(fromPrefix);
52+
const auto dstFactor = GetMagnitudeFactor(toPrefix);
53+
const auto conversionFactor = srcFactor / dstFactor;
54+
return To(fromExtended * conversionFactor);
55+
}
2456
}

IntelPresentMon/ControlLib/ControlLib.vcxproj

+3
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,13 @@
200200
<ClInclude Include="AmdPowerTelemetryProvider.h" />
201201
<ClInclude Include="Adl2Wrapper.h" />
202202
<ClInclude Include="CpuTelemetryInfo.h" />
203+
<ClInclude Include="ctlpvttemp_api.h" />
203204
<ClInclude Include="DllModule.h" />
204205
<ClInclude Include="CpuTelemetry.h" />
205206
<ClInclude Include="Exceptions.h" />
206207
<ClInclude Include="IntelPowerTelemetryAdapter.h" />
207208
<ClInclude Include="Logging.h" />
209+
<ClInclude Include="LoggingVerbose.h" />
208210
<ClInclude Include="MacroHelpers.h" />
209211
<ClInclude Include="nvapi.h" />
210212
<ClInclude Include="NvapiWrapper.h" />
@@ -227,6 +229,7 @@
227229
<ClCompile Include="AmdPowerTelemetryAdapter.cpp" />
228230
<ClCompile Include="Adl2Wrapper.cpp" />
229231
<ClCompile Include="cApiWrapper.cpp" />
232+
<ClCompile Include="ctlpvttempWrapper.cpp" />
230233
<ClCompile Include="IntelPowerTelemetryProvider.cpp" />
231234
<ClCompile Include="IntelPowerTelemetryAdapter.cpp" />
232235
<ClCompile Include="NvapiWrapper.cpp" />

IntelPresentMon/ControlLib/ControlLib.vcxproj.filters

+7
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@
7676
<ClInclude Include="PresentMonPowerTelemetry.h" />
7777
<ClInclude Include="TelemetryHistory.h" />
7878
<ClInclude Include="Exceptions.h" />
79+
<ClInclude Include="ctlpvttemp_api.h">
80+
<Filter>Intel</Filter>
81+
</ClInclude>
82+
<ClInclude Include="LoggingVerbose.h" />
7983
</ItemGroup>
8084
<ItemGroup>
8185
<ClCompile Include="NvapiWrapper.cpp">
@@ -116,5 +120,8 @@
116120
</ClCompile>
117121
<ClCompile Include="PowerTelemetryProviderFactory.cpp" />
118122
<ClCompile Include="CpuTelemetry.cpp" />
123+
<ClCompile Include="ctlpvttempWrapper.cpp">
124+
<Filter>Intel</Filter>
125+
</ClCompile>
119126
</ItemGroup>
120127
</Project>

0 commit comments

Comments
 (0)