mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2024-11-10 10:41:52 +00:00
Remove redundant variable VmaBlockVector::m_IsCustomPool
This commit is contained in:
parent
bc266d6f09
commit
ba2bdea58e
@ -6032,7 +6032,6 @@ public:
|
|||||||
size_t maxBlockCount,
|
size_t maxBlockCount,
|
||||||
VkDeviceSize bufferImageGranularity,
|
VkDeviceSize bufferImageGranularity,
|
||||||
uint32_t frameInUseCount,
|
uint32_t frameInUseCount,
|
||||||
bool isCustomPool,
|
|
||||||
bool explicitBlockSize,
|
bool explicitBlockSize,
|
||||||
uint32_t algorithm);
|
uint32_t algorithm);
|
||||||
~VmaBlockVector();
|
~VmaBlockVector();
|
||||||
@ -6041,6 +6040,7 @@ public:
|
|||||||
|
|
||||||
VmaAllocator GetAllocator() const { return m_hAllocator; }
|
VmaAllocator GetAllocator() const { return m_hAllocator; }
|
||||||
VmaPool GetParentPool() const { return m_hParentPool; }
|
VmaPool GetParentPool() const { return m_hParentPool; }
|
||||||
|
bool IsCustomPool() const { return m_hParentPool != VMA_NULL; }
|
||||||
uint32_t GetMemoryTypeIndex() const { return m_MemoryTypeIndex; }
|
uint32_t GetMemoryTypeIndex() const { return m_MemoryTypeIndex; }
|
||||||
VkDeviceSize GetPreferredBlockSize() const { return m_PreferredBlockSize; }
|
VkDeviceSize GetPreferredBlockSize() const { return m_PreferredBlockSize; }
|
||||||
VkDeviceSize GetBufferImageGranularity() const { return m_BufferImageGranularity; }
|
VkDeviceSize GetBufferImageGranularity() const { return m_BufferImageGranularity; }
|
||||||
@ -6106,7 +6106,6 @@ private:
|
|||||||
const size_t m_MaxBlockCount;
|
const size_t m_MaxBlockCount;
|
||||||
const VkDeviceSize m_BufferImageGranularity;
|
const VkDeviceSize m_BufferImageGranularity;
|
||||||
const uint32_t m_FrameInUseCount;
|
const uint32_t m_FrameInUseCount;
|
||||||
const bool m_IsCustomPool;
|
|
||||||
const bool m_ExplicitBlockSize;
|
const bool m_ExplicitBlockSize;
|
||||||
const uint32_t m_Algorithm;
|
const uint32_t m_Algorithm;
|
||||||
/* There can be at most one allocation that is completely empty - a
|
/* There can be at most one allocation that is completely empty - a
|
||||||
@ -11448,7 +11447,6 @@ VmaPool_T::VmaPool_T(
|
|||||||
createInfo.maxBlockCount,
|
createInfo.maxBlockCount,
|
||||||
(createInfo.flags & VMA_POOL_CREATE_IGNORE_BUFFER_IMAGE_GRANULARITY_BIT) != 0 ? 1 : hAllocator->GetBufferImageGranularity(),
|
(createInfo.flags & VMA_POOL_CREATE_IGNORE_BUFFER_IMAGE_GRANULARITY_BIT) != 0 ? 1 : hAllocator->GetBufferImageGranularity(),
|
||||||
createInfo.frameInUseCount,
|
createInfo.frameInUseCount,
|
||||||
true, // isCustomPool
|
|
||||||
createInfo.blockSize != 0, // explicitBlockSize
|
createInfo.blockSize != 0, // explicitBlockSize
|
||||||
createInfo.flags & VMA_POOL_CREATE_ALGORITHM_MASK), // algorithm
|
createInfo.flags & VMA_POOL_CREATE_ALGORITHM_MASK), // algorithm
|
||||||
m_Id(0),
|
m_Id(0),
|
||||||
@ -11488,7 +11486,6 @@ VmaBlockVector::VmaBlockVector(
|
|||||||
size_t maxBlockCount,
|
size_t maxBlockCount,
|
||||||
VkDeviceSize bufferImageGranularity,
|
VkDeviceSize bufferImageGranularity,
|
||||||
uint32_t frameInUseCount,
|
uint32_t frameInUseCount,
|
||||||
bool isCustomPool,
|
|
||||||
bool explicitBlockSize,
|
bool explicitBlockSize,
|
||||||
uint32_t algorithm) :
|
uint32_t algorithm) :
|
||||||
m_hAllocator(hAllocator),
|
m_hAllocator(hAllocator),
|
||||||
@ -11499,7 +11496,6 @@ VmaBlockVector::VmaBlockVector(
|
|||||||
m_MaxBlockCount(maxBlockCount),
|
m_MaxBlockCount(maxBlockCount),
|
||||||
m_BufferImageGranularity(bufferImageGranularity),
|
m_BufferImageGranularity(bufferImageGranularity),
|
||||||
m_FrameInUseCount(frameInUseCount),
|
m_FrameInUseCount(frameInUseCount),
|
||||||
m_IsCustomPool(isCustomPool),
|
|
||||||
m_ExplicitBlockSize(explicitBlockSize),
|
m_ExplicitBlockSize(explicitBlockSize),
|
||||||
m_Algorithm(algorithm),
|
m_Algorithm(algorithm),
|
||||||
m_HasEmptyBlock(false),
|
m_HasEmptyBlock(false),
|
||||||
@ -12426,7 +12422,7 @@ void VmaBlockVector::PrintDetailedMap(class VmaJsonWriter& json)
|
|||||||
|
|
||||||
json.BeginObject();
|
json.BeginObject();
|
||||||
|
|
||||||
if(m_IsCustomPool)
|
if(IsCustomPool())
|
||||||
{
|
{
|
||||||
const char* poolName = m_hParentPool->GetName();
|
const char* poolName = m_hParentPool->GetName();
|
||||||
if(poolName != VMA_NULL && poolName[0] != '\0')
|
if(poolName != VMA_NULL && poolName[0] != '\0')
|
||||||
@ -14331,7 +14327,6 @@ VmaAllocator_T::VmaAllocator_T(const VmaAllocatorCreateInfo* pCreateInfo) :
|
|||||||
SIZE_MAX,
|
SIZE_MAX,
|
||||||
GetBufferImageGranularity(),
|
GetBufferImageGranularity(),
|
||||||
pCreateInfo->frameInUseCount,
|
pCreateInfo->frameInUseCount,
|
||||||
false, // isCustomPool
|
|
||||||
false, // explicitBlockSize
|
false, // explicitBlockSize
|
||||||
false); // linearAlgorithm
|
false); // linearAlgorithm
|
||||||
// No need to call m_pBlockVectors[memTypeIndex][blockVectorTypeIndex]->CreateMinBlocks here,
|
// No need to call m_pBlockVectors[memTypeIndex][blockVectorTypeIndex]->CreateMinBlocks here,
|
||||||
|
Loading…
Reference in New Issue
Block a user