From 047e8e6670e2c10300686d90355b96e0018c14d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 11 May 2021 13:35:50 +0200 Subject: [PATCH] GL: fix argument order in OpenGLTester::addBenchmarks(). Apparently I didn't use this overload yet. --- doc/changelog.dox | 4 ++++ src/Magnum/GL/OpenGLTester.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/changelog.dox b/doc/changelog.dox index 0c74c5c3a..5f35b0a00 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -381,6 +381,10 @@ See also: - @ref GL::Context move constructor was not marked @cpp noexcept @ce by accident and it was also not really moving everything properly, especially when delayed creation was done on the moved-to object +- @ref GL::OpenGLTester::addBenchmarks() taking a setup/teardown function + passed the arguments to the base @relativeref{Corrade,TestSuite::Tester} + implementation in a wrong order, failing to compile if this function was + used in a test - @ref GL::Renderer::MemoryBarrier::ShaderStorage had an incorrect value - @ref GL::Shader limit queries for a particular shader stage on desktop were out-of-bounds array accesses, causing wrong or random values being returned diff --git a/src/Magnum/GL/OpenGLTester.h b/src/Magnum/GL/OpenGLTester.h index cf13f9aa0..353033e48 100644 --- a/src/Magnum/GL/OpenGLTester.h +++ b/src/Magnum/GL/OpenGLTester.h @@ -245,7 +245,7 @@ class OpenGLTester: public TestSuite::Tester { */ template void addBenchmarks(std::initializer_list benchmarks, std::size_t batchCount, void(Derived::*setup)(), void(Derived::*teardown)(), BenchmarkType benchmarkType = BenchmarkType::Default) { if(benchmarkType == BenchmarkType::GpuTime) - addCustomBenchmarks(benchmarks, batchCount, &OpenGLTester::gpuTimeBenchmarkBegin, &OpenGLTester::gpuTimeBenchmarkEnd, setup, teardown, BenchmarkUnits::Nanoseconds); + addCustomBenchmarks(benchmarks, batchCount, setup, teardown, &OpenGLTester::gpuTimeBenchmarkBegin, &OpenGLTester::gpuTimeBenchmarkEnd, BenchmarkUnits::Nanoseconds); else Tester::addBenchmarks(benchmarks, batchCount, setup, teardown, Tester::BenchmarkType(Int(benchmarkType))); }