@@ -2971,7 +2971,7 @@ static void TestGPUUploadHeap(const TestContext& ctx)
2971
2971
res->Unmap (0 , NULL ); // NULL - written everything.
2972
2972
2973
2973
CHECK_HR (res->Map (0 , NULL , (void **)&mappedData)); // NULL - reading everything.
2974
- CHECK_BOOL (mappedData[100 ] = 300 );
2974
+ CHECK_BOOL (mappedData[100 ] == 300 );
2975
2975
res->Unmap (0 , &EMPTY_RANGE); // {0, 0} - not written anything.
2976
2976
2977
2977
}
@@ -3344,7 +3344,7 @@ static void TestVirtualBlocksAlgorithmsBenchmark(const TestContext& ctx)
3344
3344
3345
3345
RandomNumberGenerator rand { 20092010 };
3346
3346
3347
- UINT32 allocSizes[ ALLOCATION_COUNT] ;
3347
+ std::vector< UINT32> allocSizes ( ALLOCATION_COUNT) ;
3348
3348
for (size_t i = 0 ; i < ALLOCATION_COUNT; ++i)
3349
3349
{
3350
3350
allocSizes[i] = rand .Generate () % MAX_ALLOC_SIZE + 1 ;
@@ -3379,7 +3379,7 @@ static void TestVirtualBlocksAlgorithmsBenchmark(const TestContext& ctx)
3379
3379
assert (0 );
3380
3380
}
3381
3381
3382
- D3D12MA::VirtualAllocation allocs[ ALLOCATION_COUNT] ;
3382
+ std::vector < D3D12MA::VirtualAllocation> allocs ( ALLOCATION_COUNT) ;
3383
3383
ComPtr<D3D12MA::VirtualBlock> block;
3384
3384
CHECK_HR (D3D12MA::CreateVirtualBlock (&blockDesc, &block));
3385
3385
duration allocDuration = duration::zero ();
@@ -3393,7 +3393,7 @@ static void TestVirtualBlocksAlgorithmsBenchmark(const TestContext& ctx)
3393
3393
allocSizes[i],
3394
3394
alignment };
3395
3395
3396
- CHECK_HR (block->Allocate (&allocCreateInfo, allocs + i , nullptr ));
3396
+ CHECK_HR (block->Allocate (&allocCreateInfo, & allocs[i] , nullptr ));
3397
3397
}
3398
3398
allocDuration += std::chrono::high_resolution_clock::now () - timeBegin;
3399
3399
0 commit comments