Test the testing environment.
| 8304 | |
| 8305 | // Test the testing environment. |
| 8306 | static void TestGpuData() |
| 8307 | { |
| 8308 | RandomNumberGenerator rand = { 53434 }; |
| 8309 | |
| 8310 | std::vector<AllocInfo> allocInfo; |
| 8311 | |
| 8312 | for(size_t i = 0; i < 100; ++i) |
| 8313 | { |
| 8314 | AllocInfo info = {}; |
| 8315 | |
| 8316 | info.m_BufferInfo.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; |
| 8317 | info.m_BufferInfo.usage = VK_BUFFER_USAGE_TRANSFER_DST_BIT | |
| 8318 | VK_BUFFER_USAGE_TRANSFER_SRC_BIT | |
| 8319 | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT; |
| 8320 | info.m_BufferInfo.size = 1024 * 1024 * (rand.Generate() % 9 + 1); |
| 8321 | |
| 8322 | VmaAllocationCreateInfo allocCreateInfo = {}; |
| 8323 | allocCreateInfo.usage = VMA_MEMORY_USAGE_AUTO; |
| 8324 | |
| 8325 | VkResult res = vmaCreateBuffer(g_hAllocator, &info.m_BufferInfo, &allocCreateInfo, &info.m_Buffer, &info.m_Allocation, nullptr); |
| 8326 | TEST(res == VK_SUCCESS); |
| 8327 | |
| 8328 | info.m_StartValue = rand.Generate(); |
| 8329 | |
| 8330 | allocInfo.push_back(std::move(info)); |
| 8331 | } |
| 8332 | |
| 8333 | UploadGpuData(allocInfo.data(), allocInfo.size()); |
| 8334 | |
| 8335 | ValidateGpuData(allocInfo.data(), allocInfo.size()); |
| 8336 | |
| 8337 | DestroyAllAllocations(allocInfo); |
| 8338 | } |
| 8339 | |
| 8340 | static void TestVirtualBlocksAlgorithmsBenchmark() |
| 8341 | { |
nothing calls this directly
no test coverage detected