diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9f3d1a6..48ca4f9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,4 +50,4 @@ jobs: if: matrix.os == 'windows-latest' uses: ncipollo/release-action@v1.14.0 with: - tag: v1.4.7 \ No newline at end of file + tag: v1.4.7.1 \ No newline at end of file diff --git a/Benchmark.csproj b/Benchmark.csproj index 7a51816..b2fa752 100644 --- a/Benchmark.csproj +++ b/Benchmark.csproj @@ -1,4 +1,4 @@ - + Exe @@ -9,6 +9,8 @@ + + diff --git a/Program.cs b/Program.cs index d6a8a73..8165cc1 100644 --- a/Program.cs +++ b/Program.cs @@ -3,6 +3,12 @@ using System.Management; using System.Diagnostics; using System.Runtime.InteropServices; +using System.Runtime.CompilerServices; +using SharpDX.Direct3D11; +using SharpDX.DXGI; +using SharpDX.Direct3D; +using System; +using Device = SharpDX.Direct3D11.Device; Console.WriteLine("Welcome to the best benchmark in the entire universe"); Console.WriteLine("-----------------------------------------------------------"); @@ -105,16 +111,24 @@ Console.WriteLine("Name: {0}", item["Name"]); Console.WriteLine("Manufacturer: {0}", manufacturer); Console.WriteLine("Driver Version: {0}", item["DriverVersion"]); - Console.WriteLine("VRAM: {0}MB", Convert.ToUInt64(item["AdapterRAM"]) / (1024 * 1024)); + } + } + } + + using (var factory = new Factory1()) + { + using (var adapter = factory.GetAdapter(0)) + { + var desc = adapter.Description; + Console.WriteLine("Total VRAM: {0}MB", desc.DedicatedVideoMemory / (1024 * 1024)); Console.WriteLine("-----------------------------------------------------------"); } } } -} Console.Write("Continue to benchmark? (y/n): "); var input = Console.ReadLine(); -if (input.ToLower() == "y") +if (string.Equals("y", "Y")) { Console.WriteLine("Choose a benchmark to run:"); diff --git a/README.md b/README.md index 2b30354..349fa7a 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,16 @@ - For `VSCode` you also need to create `launch.JSON` and `task.JSON` files if you want to run in different configurations. - If not you can use the provided JSON files. +# Running the EXE +- Open the solution with preferred IDE +- Set the startup project to `Benchmark` +- Build with `dotnet build -c Release` +- Publish with `dotnet publish -c Release` +- Run `Benchmark.exe` in the `C:\Users\\Benchmark\bin\Release\net8.0\publish\` folder. + +# Required SDKs +- .NET 8.0.2 from `here` + # Output