diff options
author | Alexander Volkov <avolkov@astralinux.ru> | 2020-07-29 13:11:29 +0300 |
---|---|---|
committer | Alexander Volkov <avolkov@astralinux.ru> | 2020-07-29 15:35:01 +0300 |
commit | 2b781fd678c9d462a07173294da9f313c50b2ae4 (patch) | |
tree | 45e7e6a66d3461688681a8f7953b2140cde2f045 /src/3rdparty | |
parent | e7ade6092580ebc3eb77b1505007c30f6034f063 (diff) |
Revert "Add missing override" for 3rdparty vk_mem_alloc.h
This partially reverts 9bad3508fccb058261d47e023400868147f2d733.
Disable -Wsuggest-override for gcc when including the header
instead.
Change-Id: Id2507ce731da62bbd64aa6477b181735ba62adc1
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/VulkanMemoryAllocator/vk_mem_alloc.h | 140 |
1 files changed, 70 insertions, 70 deletions
diff --git a/src/3rdparty/VulkanMemoryAllocator/vk_mem_alloc.h b/src/3rdparty/VulkanMemoryAllocator/vk_mem_alloc.h index 696c8f9a17..5d311b750d 100644 --- a/src/3rdparty/VulkanMemoryAllocator/vk_mem_alloc.h +++ b/src/3rdparty/VulkanMemoryAllocator/vk_mem_alloc.h @@ -5268,22 +5268,22 @@ class VmaBlockMetadata_Generic : public VmaBlockMetadata public: VmaBlockMetadata_Generic(VmaAllocator hAllocator); virtual ~VmaBlockMetadata_Generic(); - void Init(VkDeviceSize size) override; + virtual void Init(VkDeviceSize size); - bool Validate() const override; - size_t GetAllocationCount() const override { return m_Suballocations.size() - m_FreeCount; } - VkDeviceSize GetSumFreeSize() const override { return m_SumFreeSize; } - VkDeviceSize GetUnusedRangeSizeMax() const override; - bool IsEmpty() const override; + virtual bool Validate() const; + virtual size_t GetAllocationCount() const { return m_Suballocations.size() - m_FreeCount; } + virtual VkDeviceSize GetSumFreeSize() const { return m_SumFreeSize; } + virtual VkDeviceSize GetUnusedRangeSizeMax() const; + virtual bool IsEmpty() const; - void CalcAllocationStatInfo(VmaStatInfo& outInfo) const override; - void AddPoolStats(VmaPoolStats& inoutStats) const override; + virtual void CalcAllocationStatInfo(VmaStatInfo& outInfo) const; + virtual void AddPoolStats(VmaPoolStats& inoutStats) const; #if VMA_STATS_STRING_ENABLED - void PrintDetailedMap(class VmaJsonWriter& json) const override; + virtual void PrintDetailedMap(class VmaJsonWriter& json) const; #endif - bool CreateAllocationRequest( + virtual bool CreateAllocationRequest( uint32_t currentFrameIndex, uint32_t frameInUseCount, VkDeviceSize bufferImageGranularity, @@ -5293,28 +5293,28 @@ public: VmaSuballocationType allocType, bool canMakeOtherLost, uint32_t strategy, - VmaAllocationRequest* pAllocationRequest) override; + VmaAllocationRequest* pAllocationRequest); - bool MakeRequestedAllocationsLost( + virtual bool MakeRequestedAllocationsLost( uint32_t currentFrameIndex, uint32_t frameInUseCount, - VmaAllocationRequest* pAllocationRequest) override; + VmaAllocationRequest* pAllocationRequest); - uint32_t MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount) override; + virtual uint32_t MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount); - VkResult CheckCorruption(const void* pBlockData) override; + virtual VkResult CheckCorruption(const void* pBlockData); - void Alloc( + virtual void Alloc( const VmaAllocationRequest& request, VmaSuballocationType type, VkDeviceSize allocSize, bool upperAddress, - VmaAllocation hAllocation) override; + VmaAllocation hAllocation); - void Free(const VmaAllocation allocation) override; - void FreeAtOffset(VkDeviceSize offset) override; + virtual void Free(const VmaAllocation allocation); + virtual void FreeAtOffset(VkDeviceSize offset); - bool ResizeAllocation(const VmaAllocation alloc, VkDeviceSize newSize) override; + virtual bool ResizeAllocation(const VmaAllocation alloc, VkDeviceSize newSize); //////////////////////////////////////////////////////////////////////////////// // For defragmentation @@ -5449,22 +5449,22 @@ class VmaBlockMetadata_Linear : public VmaBlockMetadata public: VmaBlockMetadata_Linear(VmaAllocator hAllocator); virtual ~VmaBlockMetadata_Linear(); - void Init(VkDeviceSize size) override; + virtual void Init(VkDeviceSize size); - bool Validate() const override; - size_t GetAllocationCount() const override; - VkDeviceSize GetSumFreeSize() const override { return m_SumFreeSize; } - VkDeviceSize GetUnusedRangeSizeMax() const override; - bool IsEmpty() const override { return GetAllocationCount() == 0; } + virtual bool Validate() const; + virtual size_t GetAllocationCount() const; + virtual VkDeviceSize GetSumFreeSize() const { return m_SumFreeSize; } + virtual VkDeviceSize GetUnusedRangeSizeMax() const; + virtual bool IsEmpty() const { return GetAllocationCount() == 0; } - void CalcAllocationStatInfo(VmaStatInfo& outInfo) const override; - void AddPoolStats(VmaPoolStats& inoutStats) const override; + virtual void CalcAllocationStatInfo(VmaStatInfo& outInfo) const; + virtual void AddPoolStats(VmaPoolStats& inoutStats) const; #if VMA_STATS_STRING_ENABLED - void PrintDetailedMap(class VmaJsonWriter& json) const override; + virtual void PrintDetailedMap(class VmaJsonWriter& json) const; #endif - bool CreateAllocationRequest( + virtual bool CreateAllocationRequest( uint32_t currentFrameIndex, uint32_t frameInUseCount, VkDeviceSize bufferImageGranularity, @@ -5474,26 +5474,26 @@ public: VmaSuballocationType allocType, bool canMakeOtherLost, uint32_t strategy, - VmaAllocationRequest* pAllocationRequest) override; + VmaAllocationRequest* pAllocationRequest); - bool MakeRequestedAllocationsLost( + virtual bool MakeRequestedAllocationsLost( uint32_t currentFrameIndex, uint32_t frameInUseCount, - VmaAllocationRequest* pAllocationRequest) override; + VmaAllocationRequest* pAllocationRequest); - uint32_t MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount) override; + virtual uint32_t MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount); - VkResult CheckCorruption(const void* pBlockData) override; + virtual VkResult CheckCorruption(const void* pBlockData); - void Alloc( + virtual void Alloc( const VmaAllocationRequest& request, VmaSuballocationType type, VkDeviceSize allocSize, bool upperAddress, - VmaAllocation hAllocation) override; + VmaAllocation hAllocation); - void Free(const VmaAllocation allocation) override; - void FreeAtOffset(VkDeviceSize offset) override; + virtual void Free(const VmaAllocation allocation); + virtual void FreeAtOffset(VkDeviceSize offset); private: /* @@ -5559,22 +5559,22 @@ class VmaBlockMetadata_Buddy : public VmaBlockMetadata public: VmaBlockMetadata_Buddy(VmaAllocator hAllocator); virtual ~VmaBlockMetadata_Buddy(); - void Init(VkDeviceSize size) override; + virtual void Init(VkDeviceSize size); - bool Validate() const override; - size_t GetAllocationCount() const override { return m_AllocationCount; } - VkDeviceSize GetSumFreeSize() const override { return m_SumFreeSize + GetUnusableSize(); } - VkDeviceSize GetUnusedRangeSizeMax() const override; - bool IsEmpty() const override { return m_Root->type == Node::TYPE_FREE; } + virtual bool Validate() const; + virtual size_t GetAllocationCount() const { return m_AllocationCount; } + virtual VkDeviceSize GetSumFreeSize() const { return m_SumFreeSize + GetUnusableSize(); } + virtual VkDeviceSize GetUnusedRangeSizeMax() const; + virtual bool IsEmpty() const { return m_Root->type == Node::TYPE_FREE; } - void CalcAllocationStatInfo(VmaStatInfo& outInfo) const override; - void AddPoolStats(VmaPoolStats& inoutStats) const override; + virtual void CalcAllocationStatInfo(VmaStatInfo& outInfo) const; + virtual void AddPoolStats(VmaPoolStats& inoutStats) const; #if VMA_STATS_STRING_ENABLED - void PrintDetailedMap(class VmaJsonWriter& json) const override; + virtual void PrintDetailedMap(class VmaJsonWriter& json) const; #endif - bool CreateAllocationRequest( + virtual bool CreateAllocationRequest( uint32_t currentFrameIndex, uint32_t frameInUseCount, VkDeviceSize bufferImageGranularity, @@ -5584,26 +5584,26 @@ public: VmaSuballocationType allocType, bool canMakeOtherLost, uint32_t strategy, - VmaAllocationRequest* pAllocationRequest) override; + VmaAllocationRequest* pAllocationRequest); - bool MakeRequestedAllocationsLost( + virtual bool MakeRequestedAllocationsLost( uint32_t currentFrameIndex, uint32_t frameInUseCount, - VmaAllocationRequest* pAllocationRequest) override; + VmaAllocationRequest* pAllocationRequest); - uint32_t MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount) override; + virtual uint32_t MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount); - VkResult CheckCorruption(const void* /*pBlockData*/) override { return VK_ERROR_FEATURE_NOT_PRESENT; } + virtual VkResult CheckCorruption(const void* /*pBlockData*/) { return VK_ERROR_FEATURE_NOT_PRESENT; } - void Alloc( + virtual void Alloc( const VmaAllocationRequest& request, VmaSuballocationType type, VkDeviceSize allocSize, bool upperAddress, - VmaAllocation hAllocation) override; + VmaAllocation hAllocation); - void Free(const VmaAllocation allocation) override { FreeAtOffset(allocation, allocation->GetOffset()); } - void FreeAtOffset(VkDeviceSize offset) override { FreeAtOffset(VMA_NULL, offset); } + virtual void Free(const VmaAllocation allocation) { FreeAtOffset(allocation, allocation->GetOffset()); } + virtual void FreeAtOffset(VkDeviceSize offset) { FreeAtOffset(VMA_NULL, offset); } private: static const VkDeviceSize MIN_NODE_SIZE = 32; @@ -6025,16 +6025,16 @@ public: bool overlappingMoveSupported); virtual ~VmaDefragmentationAlgorithm_Generic(); - void AddAllocation(VmaAllocation hAlloc, VkBool32* pChanged) override; - void AddAll() override { m_AllAllocations = true; } + virtual void AddAllocation(VmaAllocation hAlloc, VkBool32* pChanged); + virtual void AddAll() { m_AllAllocations = true; } - VkResult Defragment( + virtual VkResult Defragment( VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves, VkDeviceSize maxBytesToMove, - uint32_t maxAllocationsToMove) override; + uint32_t maxAllocationsToMove); - VkDeviceSize GetBytesMoved() const override { return m_BytesMoved; } - uint32_t GetAllocationsMoved() const override { return m_AllocationsMoved; } + virtual VkDeviceSize GetBytesMoved() const { return m_BytesMoved; } + virtual uint32_t GetAllocationsMoved() const { return m_AllocationsMoved; } private: uint32_t m_AllocationCount; @@ -6152,16 +6152,16 @@ public: bool overlappingMoveSupported); virtual ~VmaDefragmentationAlgorithm_Fast(); - void AddAllocation(VmaAllocation /*hAlloc*/, VkBool32* /*pChanged*/) override { ++m_AllocationCount; } - void AddAll() override { m_AllAllocations = true; } + virtual void AddAllocation(VmaAllocation /*hAlloc*/, VkBool32* /*pChanged*/) { ++m_AllocationCount; } + virtual void AddAll() { m_AllAllocations = true; } - VkResult Defragment( + virtual VkResult Defragment( VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves, VkDeviceSize maxBytesToMove, - uint32_t maxAllocationsToMove) override; + uint32_t maxAllocationsToMove); - VkDeviceSize GetBytesMoved() const override { return m_BytesMoved; } - uint32_t GetAllocationsMoved() const override { return m_AllocationsMoved; } + virtual VkDeviceSize GetBytesMoved() const { return m_BytesMoved; } + virtual uint32_t GetAllocationsMoved() const { return m_AllocationsMoved; } private: struct BlockInfo |