mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
synced 2024-11-05 12:20:07 +00:00
Code formatting
This commit is contained in:
parent
f188a152de
commit
5b48b5efcf
@ -347,8 +347,10 @@ void Player::ExecuteLine(size_t lineNumber, const StrRange& line)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(IssueWarning())
|
if(IssueWarning())
|
||||||
|
{
|
||||||
printf("Line %zu: Incorrect frame index.\n", lineNumber);
|
printf("Line %zu: Incorrect frame index.\n", lineNumber);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
StrRange functionName = csvSplit.GetRange(3);
|
StrRange functionName = csvSplit.GetRange(3);
|
||||||
|
|
||||||
@ -390,15 +392,19 @@ void Player::ExecuteLine(size_t lineNumber, const StrRange& line)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(IssueWarning())
|
if(IssueWarning())
|
||||||
|
{
|
||||||
printf("Line %zu: Unknown function.\n", lineNumber);
|
printf("Line %zu: Unknown function.\n", lineNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(IssueWarning())
|
if(IssueWarning())
|
||||||
|
{
|
||||||
printf("Line %zu: Too few columns.\n", lineNumber);
|
printf("Line %zu: Too few columns.\n", lineNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Player::Destroy(const Allocation& alloc)
|
void Player::Destroy(const Allocation& alloc)
|
||||||
{
|
{
|
||||||
@ -697,8 +703,10 @@ bool Player::ValidateFunctionParameterCount(size_t lineNumber, const CsvSplit& c
|
|||||||
if(!ok)
|
if(!ok)
|
||||||
{
|
{
|
||||||
if(IssueWarning())
|
if(IssueWarning())
|
||||||
|
{
|
||||||
printf("Line %zu: Incorrect number of function parameters.\n", lineNumber);
|
printf("Line %zu: Incorrect number of function parameters.\n", lineNumber);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
@ -723,25 +731,31 @@ void Player::ExecuteCreatePool(size_t lineNumber, const CsvSplit& csvSplit)
|
|||||||
if(res != VK_SUCCESS)
|
if(res != VK_SUCCESS)
|
||||||
{
|
{
|
||||||
if(IssueWarning())
|
if(IssueWarning())
|
||||||
|
{
|
||||||
printf("Line %zu: vmaCreatePool failed (%u).\n", lineNumber, res);
|
printf("Line %zu: vmaCreatePool failed (%u).\n", lineNumber, res);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const auto existingIt = m_Pools.find(origPtr);
|
const auto existingIt = m_Pools.find(origPtr);
|
||||||
if(existingIt != m_Pools.end())
|
if(existingIt != m_Pools.end())
|
||||||
{
|
{
|
||||||
if(IssueWarning())
|
if(IssueWarning())
|
||||||
|
{
|
||||||
printf("Line %zu: Pool %llX already exists.\n", lineNumber, origPtr);
|
printf("Line %zu: Pool %llX already exists.\n", lineNumber, origPtr);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_Pools[origPtr] = poolDesc;
|
m_Pools[origPtr] = poolDesc;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(IssueWarning())
|
if(IssueWarning())
|
||||||
|
{
|
||||||
printf("Line %zu: Invalid parameters for vmaCreatePool.\n", lineNumber);
|
printf("Line %zu: Invalid parameters for vmaCreatePool.\n", lineNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Player::ExecuteDestroyPool(size_t lineNumber, const CsvSplit& csvSplit)
|
void Player::ExecuteDestroyPool(size_t lineNumber, const CsvSplit& csvSplit)
|
||||||
{
|
{
|
||||||
@ -760,16 +774,20 @@ void Player::ExecuteDestroyPool(size_t lineNumber, const CsvSplit& csvSplit)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(IssueWarning())
|
if(IssueWarning())
|
||||||
|
{
|
||||||
printf("Line %zu: Pool %llX not found.\n", lineNumber, origPtr);
|
printf("Line %zu: Pool %llX not found.\n", lineNumber, origPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(IssueWarning())
|
if(IssueWarning())
|
||||||
|
{
|
||||||
printf("Line %zu: Invalid parameters for vmaDestroyPool.\n", lineNumber);
|
printf("Line %zu: Invalid parameters for vmaDestroyPool.\n", lineNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Player::ExecuteCreateBuffer(size_t lineNumber, const CsvSplit& csvSplit)
|
void Player::ExecuteCreateBuffer(size_t lineNumber, const CsvSplit& csvSplit)
|
||||||
{
|
{
|
||||||
@ -800,9 +818,11 @@ void Player::ExecuteCreateBuffer(size_t lineNumber, const CsvSplit& csvSplit)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(IssueWarning())
|
if(IssueWarning())
|
||||||
|
{
|
||||||
printf("Line %zu: Pool %llX not found.\n", lineNumber, origPool);
|
printf("Line %zu: Pool %llX not found.\n", lineNumber, origPool);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Allocation allocDesc = {};
|
Allocation allocDesc = {};
|
||||||
VkResult res = vmaCreateBuffer(m_Allocator, &bufCreateInfo, &allocCreateInfo, &allocDesc.buffer, &allocDesc.allocation, nullptr);
|
VkResult res = vmaCreateBuffer(m_Allocator, &bufCreateInfo, &allocCreateInfo, &allocDesc.buffer, &allocDesc.allocation, nullptr);
|
||||||
@ -813,25 +833,31 @@ void Player::ExecuteCreateBuffer(size_t lineNumber, const CsvSplit& csvSplit)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(IssueWarning())
|
if(IssueWarning())
|
||||||
|
{
|
||||||
printf("Line %zu: vmaCreateBuffer failed (%u).\n", lineNumber, res);
|
printf("Line %zu: vmaCreateBuffer failed (%u).\n", lineNumber, res);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const auto existingIt = m_Allocations.find(origPtr);
|
const auto existingIt = m_Allocations.find(origPtr);
|
||||||
if(existingIt != m_Allocations.end())
|
if(existingIt != m_Allocations.end())
|
||||||
{
|
{
|
||||||
if(IssueWarning())
|
if(IssueWarning())
|
||||||
|
{
|
||||||
printf("Line %zu: Allocation %llX already exists.\n", lineNumber, origPtr);
|
printf("Line %zu: Allocation %llX already exists.\n", lineNumber, origPtr);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_Allocations[origPtr] = allocDesc;
|
m_Allocations[origPtr] = allocDesc;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(IssueWarning())
|
if(IssueWarning())
|
||||||
|
{
|
||||||
printf("Line %zu: Invalid parameters for vmaCreateBuffer.\n", lineNumber);
|
printf("Line %zu: Invalid parameters for vmaCreateBuffer.\n", lineNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Player::DestroyAllocation(size_t lineNumber, const CsvSplit& csvSplit)
|
void Player::DestroyAllocation(size_t lineNumber, const CsvSplit& csvSplit)
|
||||||
{
|
{
|
||||||
@ -850,16 +876,20 @@ void Player::DestroyAllocation(size_t lineNumber, const CsvSplit& csvSplit)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(IssueWarning())
|
if(IssueWarning())
|
||||||
|
{
|
||||||
printf("Line %zu: Allocation %llX not found.\n", lineNumber, origAllocPtr);
|
printf("Line %zu: Allocation %llX not found.\n", lineNumber, origAllocPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(IssueWarning())
|
if(IssueWarning())
|
||||||
|
{
|
||||||
printf("Line %zu: Invalid parameters for vmaDestroyBuffer.\n", lineNumber);
|
printf("Line %zu: Invalid parameters for vmaDestroyBuffer.\n", lineNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Player::ExecuteCreateImage(size_t lineNumber, const CsvSplit& csvSplit)
|
void Player::ExecuteCreateImage(size_t lineNumber, const CsvSplit& csvSplit)
|
||||||
{
|
{
|
||||||
@ -895,13 +925,17 @@ void Player::ExecuteCreateImage(size_t lineNumber, const CsvSplit& csvSplit)
|
|||||||
{
|
{
|
||||||
const auto poolIt = m_Pools.find(origPool);
|
const auto poolIt = m_Pools.find(origPool);
|
||||||
if(poolIt != m_Pools.end())
|
if(poolIt != m_Pools.end())
|
||||||
|
{
|
||||||
allocCreateInfo.pool = poolIt->second.pool;
|
allocCreateInfo.pool = poolIt->second.pool;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(IssueWarning())
|
if(IssueWarning())
|
||||||
|
{
|
||||||
printf("Line %zu: Pool %llX not found.\n", lineNumber, origPool);
|
printf("Line %zu: Pool %llX not found.\n", lineNumber, origPool);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Allocation allocDesc = {};
|
Allocation allocDesc = {};
|
||||||
VkResult res = vmaCreateImage(m_Allocator, &imageCreateInfo, &allocCreateInfo, &allocDesc.image, &allocDesc.allocation, nullptr);
|
VkResult res = vmaCreateImage(m_Allocator, &imageCreateInfo, &allocCreateInfo, &allocDesc.image, &allocDesc.allocation, nullptr);
|
||||||
@ -912,25 +946,31 @@ void Player::ExecuteCreateImage(size_t lineNumber, const CsvSplit& csvSplit)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(IssueWarning())
|
if(IssueWarning())
|
||||||
|
{
|
||||||
printf("Line %zu: vmaCreateImage failed (%u).\n", lineNumber, res);
|
printf("Line %zu: vmaCreateImage failed (%u).\n", lineNumber, res);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const auto existingIt = m_Allocations.find(origPtr);
|
const auto existingIt = m_Allocations.find(origPtr);
|
||||||
if(existingIt != m_Allocations.end())
|
if(existingIt != m_Allocations.end())
|
||||||
{
|
{
|
||||||
if(IssueWarning())
|
if(IssueWarning())
|
||||||
|
{
|
||||||
printf("Line %zu: Allocation %llX already exists.\n", lineNumber, origPtr);
|
printf("Line %zu: Allocation %llX already exists.\n", lineNumber, origPtr);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_Allocations[origPtr] = allocDesc;
|
m_Allocations[origPtr] = allocDesc;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(IssueWarning())
|
if(IssueWarning())
|
||||||
|
{
|
||||||
printf("Line %zu: Invalid parameters for vmaCreateImage.\n", lineNumber);
|
printf("Line %zu: Invalid parameters for vmaCreateImage.\n", lineNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user