mirror of
https://github.com/decaf-emu/decaf-emu.git
synced 2024-06-16 03:17:10 -04:00
Fix compiling tests.
This commit is contained in:
parent
e35c30b50f
commit
089fc5f42c
|
@ -19,6 +19,7 @@ set_target_properties(binrec PROPERTIES FOLDER libraries)
|
|||
# catch
|
||||
add_library(catch2 INTERFACE IMPORTED GLOBAL)
|
||||
set_target_properties(catch2 PROPERTIES
|
||||
INTERFACE_COMPILE_DEFINITIONS "CATCH_CONFIG_ENABLE_BENCHMARKING"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/catch/single_include/catch2")
|
||||
|
||||
# cereal
|
||||
|
|
|
@ -7,7 +7,7 @@ add_executable(test-libcpu ${SOURCE_FILES} ${HEADER_FILES})
|
|||
set_target_properties(test-libcpu PROPERTIES FOLDER tests)
|
||||
|
||||
target_link_libraries(test-libcpu
|
||||
Catch2::Catch2
|
||||
catch2
|
||||
common
|
||||
libcpu)
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ set_target_properties(test-gpu-tiling PROPERTIES FOLDER tests)
|
|||
|
||||
target_link_libraries(test-gpu-tiling
|
||||
addrlib
|
||||
Catch2::Catch2
|
||||
catch2
|
||||
common
|
||||
libcpu
|
||||
libgpu)
|
||||
|
|
|
@ -154,16 +154,15 @@ TEST_CASE("alibTilingPerf", "[!benchmark]")
|
|||
auto addrLibImage = std::vector<uint8_t> { };
|
||||
addrLibImage.resize(untiled.size());
|
||||
|
||||
auto benchTitle = fmt::format("processing ({} retiles)", pendingTests.size());
|
||||
BENCHMARK(benchTitle)
|
||||
BENCHMARK(fmt::format("processing ({} retiles)", pendingTests.size()))
|
||||
{
|
||||
for (auto& test : pendingTests) {
|
||||
for (auto &test : pendingTests) {
|
||||
// Compare image
|
||||
addrLib.untileSlices(test.desc, 0,
|
||||
untiled.data(), addrLibImage.data(),
|
||||
test.firstSlice, test.numSlices);
|
||||
untiled.data(), addrLibImage.data(),
|
||||
test.firstSlice, test.numSlices);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
struct PendingCpuPerfEntry
|
||||
|
@ -222,8 +221,7 @@ TEST_CASE("cpuTilingPerf", "[!benchmark]")
|
|||
|
||||
static constexpr auto TestIterMulti = 10;
|
||||
|
||||
auto benchTitle = fmt::format("processing ({} retiles)", pendingTests.size() * TestIterMulti);
|
||||
BENCHMARK(benchTitle)
|
||||
BENCHMARK(fmt::format("processing ({} retiles)", pendingTests.size() * TestIterMulti))
|
||||
{
|
||||
for (auto i = 0; i < TestIterMulti; ++i) {
|
||||
for (auto& test : pendingTests) {
|
||||
|
@ -241,6 +239,6 @@ TEST_CASE("cpuTilingPerf", "[!benchmark]")
|
|||
test.numSlices);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -310,11 +310,10 @@ TEST_CASE("vkTilingPerf", "[!benchmark]")
|
|||
|
||||
endSyncCmdBuffer(cmdBuffer);
|
||||
|
||||
auto benchTitle = fmt::format("processing ({} retiles)", pendingTests.size());
|
||||
BENCHMARK(benchTitle)
|
||||
BENCHMARK(fmt::format("processing ({} retiles)", pendingTests.size()))
|
||||
{
|
||||
execSyncCmdBuffer(cmdBuffer);
|
||||
}
|
||||
};
|
||||
|
||||
freeSyncCmdBuffer(cmdBuffer);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue