Skip to content

Commit 4868c1f

Browse files
Fixed tests for NVIDIA, where it asserted with OUT_OF_MEMORY, probably due to higher alignment requirements.
1 parent 2e4d3ef commit 4868c1f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/Tests.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2199,9 +2199,9 @@ static void BenchmarkAlgorithmsCase(FILE* file,
21992199

22002200
if(!empty)
22012201
{
2202-
// Make allocations up to half of pool size.
2202+
// Make allocations up to 1/3 of pool size.
22032203
VkDeviceSize totalSize = 0;
2204-
while(totalSize < poolCreateInfo.blockSize / 2)
2204+
while(totalSize < poolCreateInfo.blockSize / 3)
22052205
{
22062206
memReq.size = bufSizeMin + rand.Generate() % (bufSizeMax - bufSizeMin);
22072207
res = vmaAllocateMemory(g_hAllocator, &memReq, &allocCreateInfo, &alloc, nullptr);
@@ -2221,7 +2221,7 @@ static void BenchmarkAlgorithmsCase(FILE* file,
22212221
}
22222222

22232223
// BENCHMARK
2224-
const size_t allocCount = maxBufCapacity / 2;
2224+
const size_t allocCount = maxBufCapacity / 3;
22252225
std::vector<VmaAllocation> testAllocations;
22262226
testAllocations.reserve(allocCount);
22272227
duration allocTotalDuration = duration::zero();
@@ -2367,7 +2367,7 @@ static void BenchmarkAlgorithms(FILE* file)
23672367
BenchmarkAlgorithmsCase(
23682368
file,
23692369
algorithm,
2370-
emptyIndex ? 0 : 1, // empty
2370+
(emptyIndex == 0), // empty
23712371
strategy,
23722372
freeOrder); // freeOrder
23732373
}

0 commit comments

Comments
 (0)