From 4868c1f52357a622b106911be819b532a6f3a73a Mon Sep 17 00:00:00 2001 From: Adam Sawicki Date: Wed, 3 Oct 2018 15:57:11 +0200 Subject: [PATCH] Fixed tests for NVIDIA, where it asserted with OUT_OF_MEMORY, probably due to higher alignment requirements. --- src/Tests.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Tests.cpp b/src/Tests.cpp index e1e3650..c194c25 100644 --- a/src/Tests.cpp +++ b/src/Tests.cpp @@ -2199,9 +2199,9 @@ static void BenchmarkAlgorithmsCase(FILE* file, if(!empty) { - // Make allocations up to half of pool size. + // Make allocations up to 1/3 of pool size. VkDeviceSize totalSize = 0; - while(totalSize < poolCreateInfo.blockSize / 2) + while(totalSize < poolCreateInfo.blockSize / 3) { memReq.size = bufSizeMin + rand.Generate() % (bufSizeMax - bufSizeMin); res = vmaAllocateMemory(g_hAllocator, &memReq, &allocCreateInfo, &alloc, nullptr); @@ -2221,7 +2221,7 @@ static void BenchmarkAlgorithmsCase(FILE* file, } // BENCHMARK - const size_t allocCount = maxBufCapacity / 2; + const size_t allocCount = maxBufCapacity / 3; std::vector testAllocations; testAllocations.reserve(allocCount); duration allocTotalDuration = duration::zero(); @@ -2367,7 +2367,7 @@ static void BenchmarkAlgorithms(FILE* file) BenchmarkAlgorithmsCase( file, algorithm, - emptyIndex ? 0 : 1, // empty + (emptyIndex == 0), // empty strategy, freeOrder); // freeOrder }