Skip to content

Commit

Permalink
Add iGPU Curve Optimiser
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesCJ60 committed Apr 2, 2024
1 parent 43b2343 commit a596548
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Universal x86 Tuning Utility"
"ProductCode" = "8:{BF615380-80DD-40CF-978D-1253F2C4517F}"
"PackageCode" = "8:{F2A0D547-5B82-4393-8E91-58E15014F517}"
"ProductCode" = "8:{05BD79FB-A585-41EC-8BEE-7F30E26E5049}"
"PackageCode" = "8:{C236D001-4771-4D8B-9D4D-0F6C3D3899B2}"
"UpgradeCode" = "8:{300E743A-4C69-440D-9425-14C446AB2658}"
"AspNetVersion" = "8:"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:2.2.8"
"ProductVersion" = "8:2.2.9"
"Manufacturer" = "8:JamesCJ60"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
Expand Down
2 changes: 1 addition & 1 deletion Universal x86 Tuning Utility/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static bool IsAdministrator()
return principal.IsInRole(WindowsBuiltInRole.Administrator);
}

public static string version = "2.2.8";
public static string version = "2.2.10";
private Mutex mutex;
private const string MutexName = "UniversalX86TuningUtility";

Expand Down
2 changes: 2 additions & 0 deletions Universal x86 Tuning Utility/Services/PresetManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class Preset
public int apuGfxClk { get; set; }
public int pboScalar { get; set; }
public int coAllCore { get; set; }
public int coGfx { get; set; }

public int dtCpuTemp { get; set; }
public int dtCpuPPT { get; set; }
Expand Down Expand Up @@ -96,6 +97,7 @@ public class Preset
public bool isApuGfxClk { get; set; }
public bool isPboScalar { get; set; }
public bool isCoAllCore { get; set; }
public bool isCoGfx { get; set; }

public bool isDtCpuTemp { get; set; }
public bool isDtCpuPPT { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows10.0.22621.0</TargetFramework>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>10.0</LangVersion>
<UseWPF>true</UseWPF>
Expand All @@ -15,8 +15,8 @@
<UseWindowsForms>True</UseWindowsForms>
<SignAssembly>False</SignAssembly>
<Copyright>© UXTU Team 2020 - 2024</Copyright>
<AssemblyVersion>2.2.8</AssemblyVersion>
<FileVersion>2.2.8</FileVersion>
<AssemblyVersion>2.2.9</AssemblyVersion>
<FileVersion>2.2.9</FileVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<SupportedOSPlatformVersion>10.0.22621.0</SupportedOSPlatformVersion>
<Version>2.2.6</Version>
Expand Down
16 changes: 16 additions & 0 deletions Universal x86 Tuning Utility/Views/Pages/CustomPresets.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -1229,6 +1229,22 @@ VerticalAlignment="Center" SelectedIndex="0" MinWidth="138" Name="cbxResScale" H
<ui:NumberBox Name="nudAllCO" Text="{Binding ElementName=sdAllCO, Path=Value}" Value="{Binding ElementName=sdAllCO, Path=Value}" Maximum="30" Minimum="-50" Grid.Column="1" SmallChange="1" MaxDecimalPlaces="0" />
<Slider Name="sdAllCO" Value="{Binding ElementName=nudAllCO, Path=Value}" Maximum="30" Minimum="-50" Grid.Column="2" Margin="12,0,0,0" TickFrequency="1" VerticalAlignment="Center" IsSnapToTickEnabled="True" TouchDown="SizeSlider_TouchDown"/>
</Grid>
<StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,8,0,0">
<TextBlock FontWeight="DemiBold" FontSize="13" Foreground="{DynamicResource TextFillColorPrimaryBrush}">iGPU Offset</TextBlock>
<ui:SymbolIcon Symbol="Info20" Margin="6,0,0,-2" Foreground="{DynamicResource TextFillColorPrimaryBrush}" ToolTip="Allows control to change the iGPU Curve Optimiser Frequency/Voltage curve offset" VerticalAlignment="Bottom" />
</StackPanel>
<Grid Margin="0,8,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="33" />
<ColumnDefinition Width="150" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<CheckBox Name="cbGfxCO"/>
<ui:NumberBox Name="nudGfxCO" Text="{Binding ElementName=sdGfxCO, Path=Value}" Value="{Binding ElementName=sdGfxCO, Path=Value}" Maximum="30" Minimum="-50" Grid.Column="1" SmallChange="1" MaxDecimalPlaces="0" />
<Slider Name="sdGfxCO" Value="{Binding ElementName=nudGfxCO, Path=Value}" Maximum="30" Minimum="-50" Grid.Column="2" Margin="12,0,0,0" TickFrequency="1" VerticalAlignment="Center" IsSnapToTickEnabled="True" TouchDown="SizeSlider_TouchDown"/>
</Grid>
</StackPanel>
</StackPanel>
</StackPanel>
</ui:CardExpander>
Expand Down
23 changes: 23 additions & 0 deletions Universal x86 Tuning Utility/Views/Pages/CustomPresets.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ private void btnSave_Click(object sender, RoutedEventArgs e)
pboScalar = (int)nudPBOScaler.Value,
coAllCore = (int)nudAllCO.Value,

coGfx = (int)nudGfxCO.Value,
isCoGfx = (bool)cbGfxCO.IsChecked,

boostProfile = (int)cbxBoost.SelectedIndex,

rsr = (int)nudRSR.Value,
Expand Down Expand Up @@ -451,6 +454,9 @@ private void btnSave_Click(object sender, RoutedEventArgs e)
isPboScalar = (bool)cbPBOScaler.IsChecked,
isCoAllCore = (bool)cbAllCO.IsChecked,

coGfx= (int)nudGfxCO.Value,
isCoGfx = (bool)cbGfxCO.IsChecked,

isNVIDIA = (bool)tsNV.IsChecked,
nvMaxCoreClk = (int)nudNVMaxCore.Value,
nvCoreClk = (int)nudNVCore.Value,
Expand Down Expand Up @@ -730,9 +736,11 @@ public void updateValues(string preset)

nudPBOScaler.Value = myPreset.pboScalar;
nudAllCO.Value = myPreset.coAllCore;
nudGfxCO.Value = myPreset.coGfx;

cbPBOScaler.IsChecked = myPreset.isPboScalar;
cbAllCO.IsChecked = myPreset.isCoAllCore;
cbGfxCO.IsChecked = myPreset.isCoGfx;

tsRadeonGraph.IsChecked = myPreset.isRadeonGraphics;
cbAntiLag.IsChecked = myPreset.isAntiLag;
Expand Down Expand Up @@ -849,9 +857,11 @@ public void updateValues(string preset)

nudPBOScaler.Value = myPreset.pboScalar;
nudAllCO.Value = myPreset.coAllCore;
nudGfxCO.Value = myPreset.coGfx;

cbPBOScaler.IsChecked = myPreset.isPboScalar;
cbAllCO.IsChecked = myPreset.isCoAllCore;
cbGfxCO.IsChecked = myPreset.isCoGfx;

tsRadeonGraph.IsChecked = myPreset.isRadeonGraphics;
cbAntiLag.IsChecked = myPreset.isAntiLag;
Expand Down Expand Up @@ -1010,6 +1020,12 @@ public string getCommandValues()
if (nudAllCO.Value < 0) commandValues = commandValues + $"--set-coall={Convert.ToUInt32(0x100000 - (uint)(-1 * (int)nudAllCO.Value))} ";
}

if (cbGfxCO.IsChecked == true)
{
if (nudGfxCO.Value >= 0) commandValues = commandValues + $"--set-cogfx={nudGfxCO.Value} ";
if (nudGfxCO.Value < 0) commandValues = commandValues + $"--set-cogfx={Convert.ToUInt32(0x100000 - (uint)(-1 * (int)nudGfxCO.Value))} ";
}

if (cbSoftMiniGPUClk.IsChecked == true) commandValues = commandValues + $"--min-gfxclk={nudSoftMiniGPUClk.Value} ";
if (cbSoftMaxiGPUClk.IsChecked == true) commandValues = commandValues + $"--max-gfxclk={nudSoftMaxiGPUClk.Value} ";

Expand Down Expand Up @@ -1097,12 +1113,19 @@ public string getCommandValues()
if (cbTDC.IsChecked == true) commandValues = commandValues + $"--tdc-limit={nudTDC.Value * 1000} ";
if (cbEDC.IsChecked == true) commandValues = commandValues + $"--edc-limit={nudEDC.Value * 1000} ";
if (cbPBOScaler.IsChecked == true) commandValues = commandValues + $"--pbo-scalar={nudPBOScaler.Value * 100} ";

if (cbAllCO.IsChecked == true)
{
if (nudAllCO.Value >= 0) commandValues = commandValues + $"--set-coall={nudAllCO.Value} ";
if (nudAllCO.Value < 0) commandValues = commandValues + $"--set-coall={Convert.ToUInt32(0x100000 - (uint)(-1 * (int)nudAllCO.Value))} ";
}

if (cbGfxCO.IsChecked == true)
{
if (nudGfxCO.Value >= 0) commandValues = commandValues + $"--set-cogfx={nudGfxCO.Value} ";
if (nudGfxCO.Value < 0) commandValues = commandValues + $"--set-cogfx={Convert.ToUInt32(0x100000 - (uint)(-1 * (int)nudGfxCO.Value))} ";
}

if (cbCCD1Core1.IsChecked == true) commandValues = commandValues + $"--set-coper={((0 << 4 | 0 % 1 & 15) << 4 | 0 % 8 & 15) << 20 | ((int)nudCCD1Core1.Value & 0xFFFF)} ";
if (cbCCD1Core2.IsChecked == true) commandValues = commandValues + $"--set-coper={((0 << 4 | 0 % 1 & 15) << 4 | 1 % 8 & 15) << 20 | ((int)nudCCD1Core2.Value & 0xFFFF)} ";
if (cbCCD1Core3.IsChecked == true) commandValues = commandValues + $"--set-coper={((0 << 4 | 0 % 1 & 15) << 4 | 2 % 8 & 15) << 20 | ((int)nudCCD1Core3.Value & 0xFFFF)} ";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<TextBlock
FontSize="18"
Foreground="#B7FFFFFF"
Text="V2.3.0 Beta 2" />
Text="V2.3.0 Beta 3" />
<ui:Button
Name="btnPremade"
Height="36"
Expand Down

0 comments on commit a596548

Please sign in to comment.