Update Vulkan Memory Allocator to v2.3.0
This commit is contained in:
14
third_party/vkmemalloc/src/SparseBindingTest.cpp
vendored
14
third_party/vkmemalloc/src/SparseBindingTest.cpp
vendored
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright (c) 2017-2021 Advanced Micro Devices, Inc. All rights reserved.
|
||||
// Copyright (c) 2017-2019 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -532,8 +532,6 @@ SparseBindingImage::~SparseBindingImage()
|
||||
|
||||
void TestSparseBinding()
|
||||
{
|
||||
wprintf(L"TESTING SPARSE BINDING:\n");
|
||||
|
||||
struct ImageInfo
|
||||
{
|
||||
std::unique_ptr<BaseImage> image;
|
||||
@@ -547,7 +545,7 @@ void TestSparseBinding()
|
||||
|
||||
RandomNumberGenerator rand(4652467);
|
||||
|
||||
for(uint32_t frameIndex = 0; frameIndex < frameCount; ++frameIndex)
|
||||
for(uint32_t i = 0; i < frameCount; ++i)
|
||||
{
|
||||
// Bump frame index.
|
||||
++g_FrameIndex;
|
||||
@@ -562,11 +560,11 @@ void TestSparseBinding()
|
||||
images.push_back(std::move(imageInfo));
|
||||
|
||||
// Delete all images that expired.
|
||||
for(size_t imageIndex = images.size(); imageIndex--; )
|
||||
for(size_t i = images.size(); i--; )
|
||||
{
|
||||
if(g_FrameIndex >= images[imageIndex].endFrame)
|
||||
if(g_FrameIndex >= images[i].endFrame)
|
||||
{
|
||||
images.erase(images.begin() + imageIndex);
|
||||
images.erase(images.begin() + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -590,8 +588,6 @@ void TestSparseBinding()
|
||||
|
||||
// Free remaining images.
|
||||
images.clear();
|
||||
|
||||
wprintf(L"Done.\n");
|
||||
}
|
||||
|
||||
#endif // #ifdef _WIN32
|
||||
|
||||
Reference in New Issue
Block a user