Skip to content

Commit

Permalink
Merge branch 'release-gtd-external/rc2.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
planetchili committed Dec 17, 2024
2 parents f5b8b75 + 7ec24eb commit 8170aab
Show file tree
Hide file tree
Showing 86 changed files with 7,822 additions and 2,632 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,3 @@ PresentData/PresentData.args.json
IntelPresentMon/SampleClient/log.txt

IntelPresentMon/PresentMonAPI2/Internal.h

IntelPresentMon/CommonUtilities/git_hash.h
8 changes: 4 additions & 4 deletions IntelPresentMon/AppCef/AppCef.rc
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ IDI_ICON1 ICON "flask.ico"
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 2,1,0,0
FILEVERSION 1,0,3,0
PRODUCTVERSION 2,3,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -79,12 +79,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Intel(R) Corporation"
VALUE "FileDescription", "Intel(R) PresentMon application"
VALUE "FileVersion", "1.0.0.0"
VALUE "FileVersion", "1.0.3.0"
VALUE "InternalName", "CefNano.exe"
VALUE "LegalCopyright", "Copyright (C) 2017-2024"
VALUE "OriginalFilename", "CefNano.exe"
VALUE "ProductName", "Intel(R) PresentMon"
VALUE "ProductVersion", "2.1.0.0"
VALUE "ProductVersion", "2.3.0.0"
END
END
BLOCK "VarFileInfo"
Expand Down
3 changes: 3 additions & 0 deletions IntelPresentMon/AppCef/CefNano.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@
<ProjectReference Include="..\Core\Core.vcxproj">
<Project>{808f5ea9-ea09-4d72-87b4-5397d43cba54}</Project>
</ProjectReference>
<ProjectReference Include="..\Versioning\Versioning.vcxproj">
<Project>{c73aa532-e532-4d93-9279-905444653c08}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="AppCef.rc" />
Expand Down
8 changes: 5 additions & 3 deletions IntelPresentMon/AppCef/source/util/PathSanitaryCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <algorithm>
#include <Core/source/infra/util/FolderResolver.h>
#include <Core/source/infra/Logging.h>
#include <CommonUtilities/str/String.h>


namespace p2c::client::util
Expand Down Expand Up @@ -43,8 +44,9 @@ namespace p2c::client::util
}
bool PathSanitaryCheck(const std::filesystem::path& path, const std::filesystem::path& root)
{
const auto canonicalString = std::filesystem::weakly_canonical(path).wstring();
const auto rootString = root.wstring();
return canonicalString.starts_with(rootString);
const auto canonicalString = pmon::util::str::ToLower(std::filesystem::weakly_canonical(path).wstring());
const auto rootString = pmon::util::str::ToLower(root.wstring());
const auto isSanitary = canonicalString.starts_with(rootString);
return isSanitary;
}
}
3 changes: 1 addition & 2 deletions IntelPresentMon/AppCef/source/util/async/Introspect.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ namespace p2c::client::util::async
// filter predicate to only pick up metrics usable in dynamic queries (plus hardcoded blacklist)
const auto filterPred = [](const pmapi::intro::MetricView& m) { const auto type = m.GetType();
return
( m.GetId() != PM_METRIC_GPU_LATENCY &&
m.GetId() != PM_METRIC_DISPLAY_LATENCY)
( m.GetId() != PM_METRIC_GPU_LATENCY)
&&
( type == PM_METRIC_TYPE_DYNAMIC ||
type == PM_METRIC_TYPE_DYNAMIC_FRAME ||
Expand Down
3 changes: 2 additions & 1 deletion IntelPresentMon/AppCef/source/winmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <Core/source/infra/util/FolderResolver.h>
#include <Core/source/cli/CliOptions.h>
#include <CommonUtilities/log/IdentificationTable.h>
#include <CommonUtilities/BuildId.h>
#include <Versioning/BuildId.h>
#include <CommonUtilities/win/Utilities.h>
#include <PresentMonAPIWrapper/DiagnosticHandler.h>
#include <dwmapi.h>
Expand All @@ -22,6 +22,7 @@

using namespace p2c;
using namespace pmon::util;
using namespace pmon::bid;
using p2c::cli::Options;
namespace ccef = client::cef;
using namespace std::chrono_literals;
Expand Down
14 changes: 2 additions & 12 deletions IntelPresentMon/CommonUtilities/CommonUtilities.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="BuildId.h" />
<ClInclude Include="cli\CliFramework.h" />
<ClInclude Include="Exception.h" />
<ClInclude Include="IntervalWaiter.h" />
Expand Down Expand Up @@ -92,7 +91,6 @@
<ClInclude Include="pipe\WrapAsio.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="BuildId.cpp" />
<ClCompile Include="cli\CliFramework.cpp" />
<ClCompile Include="Exception.cpp" />
<ClCompile Include="IntervalWaiter.cpp" />
Expand Down Expand Up @@ -137,8 +135,6 @@
<ClCompile Include="win\Utilities.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="build-scripts\pre-build.bat" />
<None Include="generated\.gitignore" />
<None Include="vcpkg.json" />
</ItemGroup>
<PropertyGroup Label="Globals">
Expand Down Expand Up @@ -271,10 +267,7 @@
</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PreBuildEvent>
<Command>build-scripts\pre-build.bat</Command>
<Message>Generating build ID</Message>
</PreBuildEvent>
<PreBuildEvent />
<CustomBuildStep>
<Command>
</Command>
Expand Down Expand Up @@ -304,10 +297,7 @@
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PreBuildEvent>
<Command>build-scripts\pre-build.bat</Command>
<Message>Generating build ID</Message>
</PreBuildEvent>
<PreBuildEvent />
<CustomBuildStep>
<Command>
</Command>
Expand Down
10 changes: 0 additions & 10 deletions IntelPresentMon/CommonUtilities/CommonUtilities.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,6 @@
<ClInclude Include="third\reflect.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="BuildId.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="PrecisionWaiter.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down Expand Up @@ -347,9 +344,6 @@
<ClCompile Include="pipe\CoroMutex.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="BuildId.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="PrecisionWaiter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Expand All @@ -362,9 +356,5 @@
</ItemGroup>
<ItemGroup>
<None Include="vcpkg.json" />
<None Include="build-scripts\pre-build.bat">
<Filter>Source Files</Filter>
</None>
<None Include="generated\.gitignore" />
</ItemGroup>
</Project>
32 changes: 32 additions & 0 deletions IntelPresentMon/CommonUtilities/Math.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,36 @@ namespace pmon::util
{
return (a - b) < CommonEpsilon(a, b);
}
enum class MagnitudePrefix
{
Base,
Kilo,
Kibi,
Mega,
Mebi,
Giga,
Gibi,
};
constexpr double GetMagnitudeFactor(MagnitudePrefix prefix)
{
switch (prefix) {
case MagnitudePrefix::Base: return 1.;
case MagnitudePrefix::Kilo: return 1'000.;
case MagnitudePrefix::Kibi: return 1'024.;
case MagnitudePrefix::Mega: return 1'000'000.;
case MagnitudePrefix::Mebi: return 1'048'576.;
case MagnitudePrefix::Giga: return 1'000'000'000.;
case MagnitudePrefix::Gibi: return 1'073'741'824.;
default: return 0.;
}
}
template<typename From, typename To = From>
To ConvertMagnitudePrefix(From from, MagnitudePrefix fromPrefix, MagnitudePrefix toPrefix)
{
auto fromExtended = double(from);
const auto srcFactor = GetMagnitudeFactor(fromPrefix);
const auto dstFactor = GetMagnitudeFactor(toPrefix);
const auto conversionFactor = srcFactor / dstFactor;
return To(fromExtended * conversionFactor);
}
}
3 changes: 3 additions & 0 deletions IntelPresentMon/ControlLib/ControlLib.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,13 @@
<ClInclude Include="AmdPowerTelemetryProvider.h" />
<ClInclude Include="Adl2Wrapper.h" />
<ClInclude Include="CpuTelemetryInfo.h" />
<ClInclude Include="ctlpvttemp_api.h" />
<ClInclude Include="DllModule.h" />
<ClInclude Include="CpuTelemetry.h" />
<ClInclude Include="Exceptions.h" />
<ClInclude Include="IntelPowerTelemetryAdapter.h" />
<ClInclude Include="Logging.h" />
<ClInclude Include="LoggingVerbose.h" />
<ClInclude Include="MacroHelpers.h" />
<ClInclude Include="nvapi.h" />
<ClInclude Include="NvapiWrapper.h" />
Expand All @@ -227,6 +229,7 @@
<ClCompile Include="AmdPowerTelemetryAdapter.cpp" />
<ClCompile Include="Adl2Wrapper.cpp" />
<ClCompile Include="cApiWrapper.cpp" />
<ClCompile Include="ctlpvttempWrapper.cpp" />
<ClCompile Include="IntelPowerTelemetryProvider.cpp" />
<ClCompile Include="IntelPowerTelemetryAdapter.cpp" />
<ClCompile Include="NvapiWrapper.cpp" />
Expand Down
7 changes: 7 additions & 0 deletions IntelPresentMon/ControlLib/ControlLib.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@
<ClInclude Include="PresentMonPowerTelemetry.h" />
<ClInclude Include="TelemetryHistory.h" />
<ClInclude Include="Exceptions.h" />
<ClInclude Include="ctlpvttemp_api.h">
<Filter>Intel</Filter>
</ClInclude>
<ClInclude Include="LoggingVerbose.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="NvapiWrapper.cpp">
Expand Down Expand Up @@ -116,5 +120,8 @@
</ClCompile>
<ClCompile Include="PowerTelemetryProviderFactory.cpp" />
<ClCompile Include="CpuTelemetry.cpp" />
<ClCompile Include="ctlpvttempWrapper.cpp">
<Filter>Intel</Filter>
</ClCompile>
</ItemGroup>
</Project>
Loading

0 comments on commit 8170aab

Please sign in to comment.