3 Commits
Author SHA1 Message Date
ds5678 79037b8074 .NET 9 2025-01-05 22:47:19 -08:00
ds5678 1e263dd849 Bump version 2024-07-20 08:02:20 -07:00
ds5678 9678b4c296 Fix overflow in GetUsableMemorySize 2024-07-03 20:33:17 -07:00
3 changed files with 5 additions and 5 deletions

No files matched your search

@@ -19,7 +19,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ComputeSharp" Version="3.0.1" />
<PackageReference Include="ComputeSharp" Version="3.1.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
@@ -56,12 +56,12 @@ internal static class GraphicsDeviceExtensions
nuint maxMemorySize = graphicsDevice.GetMaxMemorySize();
if (maxProportion == 1)
{
return (int)nuint.Min(maxMemorySize, int.MaxValue);
return maxMemorySize > int.MaxValue ? int.MaxValue : (int)maxMemorySize;
}
else
{
float multiplied = maxProportion * maxMemorySize;
return (int)float.Min(multiplied, int.MaxValue);
return multiplied > int.MaxValue ? int.MaxValue : (int)multiplied;
}
}
}
+2 -2
View File
@@ -1,12 +1,12 @@
<Project>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>Latest</LangVersion>
<Nullable>enable</Nullable>
<IsAotCompatible>true</IsAotCompatible>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<Version>1.0.0</Version>
<Version>1.1.0</Version>
<AssemblyVersion>$(Version)</AssemblyVersion>
<Copyright>Copyright © ds5678</Copyright>
<Authors>ds5678</Authors>