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>
This commit is contained in:
parent
e7ade60925
commit
2b781fd678
140
src/3rdparty/VulkanMemoryAllocator/vk_mem_alloc.h
vendored
140
src/3rdparty/VulkanMemoryAllocator/vk_mem_alloc.h
vendored
@ -5268,22 +5268,22 @@ class VmaBlockMetadata_Generic : public VmaBlockMetadata
|
|||||||
public:
|
public:
|
||||||
VmaBlockMetadata_Generic(VmaAllocator hAllocator);
|
VmaBlockMetadata_Generic(VmaAllocator hAllocator);
|
||||||
virtual ~VmaBlockMetadata_Generic();
|
virtual ~VmaBlockMetadata_Generic();
|
||||||
void Init(VkDeviceSize size) override;
|
virtual void Init(VkDeviceSize size);
|
||||||
|
|
||||||
bool Validate() const override;
|
virtual bool Validate() const;
|
||||||
size_t GetAllocationCount() const override { return m_Suballocations.size() - m_FreeCount; }
|
virtual size_t GetAllocationCount() const { return m_Suballocations.size() - m_FreeCount; }
|
||||||
VkDeviceSize GetSumFreeSize() const override { return m_SumFreeSize; }
|
virtual VkDeviceSize GetSumFreeSize() const { return m_SumFreeSize; }
|
||||||
VkDeviceSize GetUnusedRangeSizeMax() const override;
|
virtual VkDeviceSize GetUnusedRangeSizeMax() const;
|
||||||
bool IsEmpty() const override;
|
virtual bool IsEmpty() const;
|
||||||
|
|
||||||
void CalcAllocationStatInfo(VmaStatInfo& outInfo) const override;
|
virtual void CalcAllocationStatInfo(VmaStatInfo& outInfo) const;
|
||||||
void AddPoolStats(VmaPoolStats& inoutStats) const override;
|
virtual void AddPoolStats(VmaPoolStats& inoutStats) const;
|
||||||
|
|
||||||
#if VMA_STATS_STRING_ENABLED
|
#if VMA_STATS_STRING_ENABLED
|
||||||
void PrintDetailedMap(class VmaJsonWriter& json) const override;
|
virtual void PrintDetailedMap(class VmaJsonWriter& json) const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool CreateAllocationRequest(
|
virtual bool CreateAllocationRequest(
|
||||||
uint32_t currentFrameIndex,
|
uint32_t currentFrameIndex,
|
||||||
uint32_t frameInUseCount,
|
uint32_t frameInUseCount,
|
||||||
VkDeviceSize bufferImageGranularity,
|
VkDeviceSize bufferImageGranularity,
|
||||||
@ -5293,28 +5293,28 @@ public:
|
|||||||
VmaSuballocationType allocType,
|
VmaSuballocationType allocType,
|
||||||
bool canMakeOtherLost,
|
bool canMakeOtherLost,
|
||||||
uint32_t strategy,
|
uint32_t strategy,
|
||||||
VmaAllocationRequest* pAllocationRequest) override;
|
VmaAllocationRequest* pAllocationRequest);
|
||||||
|
|
||||||
bool MakeRequestedAllocationsLost(
|
virtual bool MakeRequestedAllocationsLost(
|
||||||
uint32_t currentFrameIndex,
|
uint32_t currentFrameIndex,
|
||||||
uint32_t frameInUseCount,
|
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,
|
const VmaAllocationRequest& request,
|
||||||
VmaSuballocationType type,
|
VmaSuballocationType type,
|
||||||
VkDeviceSize allocSize,
|
VkDeviceSize allocSize,
|
||||||
bool upperAddress,
|
bool upperAddress,
|
||||||
VmaAllocation hAllocation) override;
|
VmaAllocation hAllocation);
|
||||||
|
|
||||||
void Free(const VmaAllocation allocation) override;
|
virtual void Free(const VmaAllocation allocation);
|
||||||
void FreeAtOffset(VkDeviceSize offset) override;
|
virtual void FreeAtOffset(VkDeviceSize offset);
|
||||||
|
|
||||||
bool ResizeAllocation(const VmaAllocation alloc, VkDeviceSize newSize) override;
|
virtual bool ResizeAllocation(const VmaAllocation alloc, VkDeviceSize newSize);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// For defragmentation
|
// For defragmentation
|
||||||
@ -5449,22 +5449,22 @@ class VmaBlockMetadata_Linear : public VmaBlockMetadata
|
|||||||
public:
|
public:
|
||||||
VmaBlockMetadata_Linear(VmaAllocator hAllocator);
|
VmaBlockMetadata_Linear(VmaAllocator hAllocator);
|
||||||
virtual ~VmaBlockMetadata_Linear();
|
virtual ~VmaBlockMetadata_Linear();
|
||||||
void Init(VkDeviceSize size) override;
|
virtual void Init(VkDeviceSize size);
|
||||||
|
|
||||||
bool Validate() const override;
|
virtual bool Validate() const;
|
||||||
size_t GetAllocationCount() const override;
|
virtual size_t GetAllocationCount() const;
|
||||||
VkDeviceSize GetSumFreeSize() const override { return m_SumFreeSize; }
|
virtual VkDeviceSize GetSumFreeSize() const { return m_SumFreeSize; }
|
||||||
VkDeviceSize GetUnusedRangeSizeMax() const override;
|
virtual VkDeviceSize GetUnusedRangeSizeMax() const;
|
||||||
bool IsEmpty() const override { return GetAllocationCount() == 0; }
|
virtual bool IsEmpty() const { return GetAllocationCount() == 0; }
|
||||||
|
|
||||||
void CalcAllocationStatInfo(VmaStatInfo& outInfo) const override;
|
virtual void CalcAllocationStatInfo(VmaStatInfo& outInfo) const;
|
||||||
void AddPoolStats(VmaPoolStats& inoutStats) const override;
|
virtual void AddPoolStats(VmaPoolStats& inoutStats) const;
|
||||||
|
|
||||||
#if VMA_STATS_STRING_ENABLED
|
#if VMA_STATS_STRING_ENABLED
|
||||||
void PrintDetailedMap(class VmaJsonWriter& json) const override;
|
virtual void PrintDetailedMap(class VmaJsonWriter& json) const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool CreateAllocationRequest(
|
virtual bool CreateAllocationRequest(
|
||||||
uint32_t currentFrameIndex,
|
uint32_t currentFrameIndex,
|
||||||
uint32_t frameInUseCount,
|
uint32_t frameInUseCount,
|
||||||
VkDeviceSize bufferImageGranularity,
|
VkDeviceSize bufferImageGranularity,
|
||||||
@ -5474,26 +5474,26 @@ public:
|
|||||||
VmaSuballocationType allocType,
|
VmaSuballocationType allocType,
|
||||||
bool canMakeOtherLost,
|
bool canMakeOtherLost,
|
||||||
uint32_t strategy,
|
uint32_t strategy,
|
||||||
VmaAllocationRequest* pAllocationRequest) override;
|
VmaAllocationRequest* pAllocationRequest);
|
||||||
|
|
||||||
bool MakeRequestedAllocationsLost(
|
virtual bool MakeRequestedAllocationsLost(
|
||||||
uint32_t currentFrameIndex,
|
uint32_t currentFrameIndex,
|
||||||
uint32_t frameInUseCount,
|
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,
|
const VmaAllocationRequest& request,
|
||||||
VmaSuballocationType type,
|
VmaSuballocationType type,
|
||||||
VkDeviceSize allocSize,
|
VkDeviceSize allocSize,
|
||||||
bool upperAddress,
|
bool upperAddress,
|
||||||
VmaAllocation hAllocation) override;
|
VmaAllocation hAllocation);
|
||||||
|
|
||||||
void Free(const VmaAllocation allocation) override;
|
virtual void Free(const VmaAllocation allocation);
|
||||||
void FreeAtOffset(VkDeviceSize offset) override;
|
virtual void FreeAtOffset(VkDeviceSize offset);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/*
|
/*
|
||||||
@ -5559,22 +5559,22 @@ class VmaBlockMetadata_Buddy : public VmaBlockMetadata
|
|||||||
public:
|
public:
|
||||||
VmaBlockMetadata_Buddy(VmaAllocator hAllocator);
|
VmaBlockMetadata_Buddy(VmaAllocator hAllocator);
|
||||||
virtual ~VmaBlockMetadata_Buddy();
|
virtual ~VmaBlockMetadata_Buddy();
|
||||||
void Init(VkDeviceSize size) override;
|
virtual void Init(VkDeviceSize size);
|
||||||
|
|
||||||
bool Validate() const override;
|
virtual bool Validate() const;
|
||||||
size_t GetAllocationCount() const override { return m_AllocationCount; }
|
virtual size_t GetAllocationCount() const { return m_AllocationCount; }
|
||||||
VkDeviceSize GetSumFreeSize() const override { return m_SumFreeSize + GetUnusableSize(); }
|
virtual VkDeviceSize GetSumFreeSize() const { return m_SumFreeSize + GetUnusableSize(); }
|
||||||
VkDeviceSize GetUnusedRangeSizeMax() const override;
|
virtual VkDeviceSize GetUnusedRangeSizeMax() const;
|
||||||
bool IsEmpty() const override { return m_Root->type == Node::TYPE_FREE; }
|
virtual bool IsEmpty() const { return m_Root->type == Node::TYPE_FREE; }
|
||||||
|
|
||||||
void CalcAllocationStatInfo(VmaStatInfo& outInfo) const override;
|
virtual void CalcAllocationStatInfo(VmaStatInfo& outInfo) const;
|
||||||
void AddPoolStats(VmaPoolStats& inoutStats) const override;
|
virtual void AddPoolStats(VmaPoolStats& inoutStats) const;
|
||||||
|
|
||||||
#if VMA_STATS_STRING_ENABLED
|
#if VMA_STATS_STRING_ENABLED
|
||||||
void PrintDetailedMap(class VmaJsonWriter& json) const override;
|
virtual void PrintDetailedMap(class VmaJsonWriter& json) const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool CreateAllocationRequest(
|
virtual bool CreateAllocationRequest(
|
||||||
uint32_t currentFrameIndex,
|
uint32_t currentFrameIndex,
|
||||||
uint32_t frameInUseCount,
|
uint32_t frameInUseCount,
|
||||||
VkDeviceSize bufferImageGranularity,
|
VkDeviceSize bufferImageGranularity,
|
||||||
@ -5584,26 +5584,26 @@ public:
|
|||||||
VmaSuballocationType allocType,
|
VmaSuballocationType allocType,
|
||||||
bool canMakeOtherLost,
|
bool canMakeOtherLost,
|
||||||
uint32_t strategy,
|
uint32_t strategy,
|
||||||
VmaAllocationRequest* pAllocationRequest) override;
|
VmaAllocationRequest* pAllocationRequest);
|
||||||
|
|
||||||
bool MakeRequestedAllocationsLost(
|
virtual bool MakeRequestedAllocationsLost(
|
||||||
uint32_t currentFrameIndex,
|
uint32_t currentFrameIndex,
|
||||||
uint32_t frameInUseCount,
|
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,
|
const VmaAllocationRequest& request,
|
||||||
VmaSuballocationType type,
|
VmaSuballocationType type,
|
||||||
VkDeviceSize allocSize,
|
VkDeviceSize allocSize,
|
||||||
bool upperAddress,
|
bool upperAddress,
|
||||||
VmaAllocation hAllocation) override;
|
VmaAllocation hAllocation);
|
||||||
|
|
||||||
void Free(const VmaAllocation allocation) override { FreeAtOffset(allocation, allocation->GetOffset()); }
|
virtual void Free(const VmaAllocation allocation) { FreeAtOffset(allocation, allocation->GetOffset()); }
|
||||||
void FreeAtOffset(VkDeviceSize offset) override { FreeAtOffset(VMA_NULL, offset); }
|
virtual void FreeAtOffset(VkDeviceSize offset) { FreeAtOffset(VMA_NULL, offset); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const VkDeviceSize MIN_NODE_SIZE = 32;
|
static const VkDeviceSize MIN_NODE_SIZE = 32;
|
||||||
@ -6025,16 +6025,16 @@ public:
|
|||||||
bool overlappingMoveSupported);
|
bool overlappingMoveSupported);
|
||||||
virtual ~VmaDefragmentationAlgorithm_Generic();
|
virtual ~VmaDefragmentationAlgorithm_Generic();
|
||||||
|
|
||||||
void AddAllocation(VmaAllocation hAlloc, VkBool32* pChanged) override;
|
virtual void AddAllocation(VmaAllocation hAlloc, VkBool32* pChanged);
|
||||||
void AddAll() override { m_AllAllocations = true; }
|
virtual void AddAll() { m_AllAllocations = true; }
|
||||||
|
|
||||||
VkResult Defragment(
|
virtual VkResult Defragment(
|
||||||
VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
|
VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
|
||||||
VkDeviceSize maxBytesToMove,
|
VkDeviceSize maxBytesToMove,
|
||||||
uint32_t maxAllocationsToMove) override;
|
uint32_t maxAllocationsToMove);
|
||||||
|
|
||||||
VkDeviceSize GetBytesMoved() const override { return m_BytesMoved; }
|
virtual VkDeviceSize GetBytesMoved() const { return m_BytesMoved; }
|
||||||
uint32_t GetAllocationsMoved() const override { return m_AllocationsMoved; }
|
virtual uint32_t GetAllocationsMoved() const { return m_AllocationsMoved; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint32_t m_AllocationCount;
|
uint32_t m_AllocationCount;
|
||||||
@ -6152,16 +6152,16 @@ public:
|
|||||||
bool overlappingMoveSupported);
|
bool overlappingMoveSupported);
|
||||||
virtual ~VmaDefragmentationAlgorithm_Fast();
|
virtual ~VmaDefragmentationAlgorithm_Fast();
|
||||||
|
|
||||||
void AddAllocation(VmaAllocation /*hAlloc*/, VkBool32* /*pChanged*/) override { ++m_AllocationCount; }
|
virtual void AddAllocation(VmaAllocation /*hAlloc*/, VkBool32* /*pChanged*/) { ++m_AllocationCount; }
|
||||||
void AddAll() override { m_AllAllocations = true; }
|
virtual void AddAll() { m_AllAllocations = true; }
|
||||||
|
|
||||||
VkResult Defragment(
|
virtual VkResult Defragment(
|
||||||
VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
|
VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
|
||||||
VkDeviceSize maxBytesToMove,
|
VkDeviceSize maxBytesToMove,
|
||||||
uint32_t maxAllocationsToMove) override;
|
uint32_t maxAllocationsToMove);
|
||||||
|
|
||||||
VkDeviceSize GetBytesMoved() const override { return m_BytesMoved; }
|
virtual VkDeviceSize GetBytesMoved() const { return m_BytesMoved; }
|
||||||
uint32_t GetAllocationsMoved() const override { return m_AllocationsMoved; }
|
virtual uint32_t GetAllocationsMoved() const { return m_AllocationsMoved; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct BlockInfo
|
struct BlockInfo
|
||||||
|
@ -44,7 +44,10 @@
|
|||||||
#ifdef QT_DEBUG
|
#ifdef QT_DEBUG
|
||||||
#define VMA_DEBUG_INITIALIZE_ALLOCATIONS 1
|
#define VMA_DEBUG_INITIALIZE_ALLOCATIONS 1
|
||||||
#endif
|
#endif
|
||||||
|
QT_WARNING_PUSH
|
||||||
|
QT_WARNING_DISABLE_GCC("-Wsuggest-override")
|
||||||
#include "vk_mem_alloc.h"
|
#include "vk_mem_alloc.h"
|
||||||
|
QT_WARNING_POP
|
||||||
|
|
||||||
#include <qmath.h>
|
#include <qmath.h>
|
||||||
#include <QVulkanFunctions>
|
#include <QVulkanFunctions>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user