Small improvements of tests (#496)
* Remove unnecessary cache flush * Check return value of vmaCopyMemoryToAllocation in tests
This commit is contained in:
parent
f0969e908b
commit
06a453ed47
1 changed files with 7 additions and 6 deletions
|
@ -6181,7 +6181,8 @@ static void TestDataUploadingWithStagingBuffer()
|
||||||
TEST(result == VK_SUCCESS);
|
TEST(result == VK_SUCCESS);
|
||||||
|
|
||||||
TEST(stagingBufferAllocInfo.pMappedData != nullptr);
|
TEST(stagingBufferAllocInfo.pMappedData != nullptr);
|
||||||
vmaCopyMemoryToAllocation(g_hAllocator, bufferData.data(), stagingBufferAlloc, 0, bufferData.size());
|
result = vmaCopyMemoryToAllocation(g_hAllocator, bufferData.data(), stagingBufferAlloc, 0, bufferData.size());
|
||||||
|
TEST(result == VK_SUCCESS);
|
||||||
|
|
||||||
BeginSingleTimeCommands();
|
BeginSingleTimeCommands();
|
||||||
|
|
||||||
|
@ -6251,7 +6252,8 @@ static void TestDataUploadingWithMappedMemory() {
|
||||||
TEST(memPropFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT);
|
TEST(memPropFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT);
|
||||||
|
|
||||||
TEST(uniformBufferAllocInfo.pMappedData != nullptr);
|
TEST(uniformBufferAllocInfo.pMappedData != nullptr);
|
||||||
vmaCopyMemoryToAllocation(g_hAllocator, bufferData.data(), uniformBufferAlloc, 0, bufferData.size());
|
result = vmaCopyMemoryToAllocation(g_hAllocator, bufferData.data(), uniformBufferAlloc, 0, bufferData.size());
|
||||||
|
TEST(result == VK_SUCCESS);
|
||||||
|
|
||||||
BeginSingleTimeCommands();
|
BeginSingleTimeCommands();
|
||||||
|
|
||||||
|
@ -6303,7 +6305,8 @@ static void TestAdvancedDataUploading() {
|
||||||
if (memPropFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) {
|
if (memPropFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) {
|
||||||
// The allocation ended up as mapped memory.
|
// The allocation ended up as mapped memory.
|
||||||
TEST(uniformBufferAllocInfo.pMappedData != nullptr);
|
TEST(uniformBufferAllocInfo.pMappedData != nullptr);
|
||||||
vmaCopyMemoryToAllocation(g_hAllocator, bufferData.data(), uniformBufferAlloc, 0, bufferData.size());
|
result = vmaCopyMemoryToAllocation(g_hAllocator, bufferData.data(), uniformBufferAlloc, 0, bufferData.size());
|
||||||
|
TEST(result == VK_SUCCESS);
|
||||||
|
|
||||||
BeginSingleTimeCommands();
|
BeginSingleTimeCommands();
|
||||||
|
|
||||||
|
@ -6338,9 +6341,7 @@ static void TestAdvancedDataUploading() {
|
||||||
TEST(result == VK_SUCCESS);
|
TEST(result == VK_SUCCESS);
|
||||||
|
|
||||||
TEST(stagingBufferAllocInfo.pMappedData != nullptr);
|
TEST(stagingBufferAllocInfo.pMappedData != nullptr);
|
||||||
vmaCopyMemoryToAllocation(g_hAllocator, bufferData.data(), stagingBufferAlloc, 0, bufferData.size());
|
result = vmaCopyMemoryToAllocation(g_hAllocator, bufferData.data(), stagingBufferAlloc, 0, bufferData.size());
|
||||||
|
|
||||||
result = vmaFlushAllocation(g_hAllocator, uniformBufferAlloc, 0, VK_WHOLE_SIZE);
|
|
||||||
TEST(result == VK_SUCCESS);
|
TEST(result == VK_SUCCESS);
|
||||||
|
|
||||||
BeginSingleTimeCommands();
|
BeginSingleTimeCommands();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue