Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ project(vsg
DESCRIPTION "VulkanSceneGraph library"
LANGUAGES CXX
)
set(VSG_SOVERSION 16)
set(VSG_SOVERSION 17)
SET(VSG_RELEASE_CANDIDATE 0)
set(Vulkan_MIN_VERSION 1.1.70.0)

Expand Down
25 changes: 25 additions & 0 deletions cmake/cppcheck-suppression-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ arrayIndexOutOfBounds:*/include/vsg/vk/State.h
// suppress warnings about intentional code usage or where cppcheck just hasn't got a clue about how templates are used...
knownConditionTrueFalse:*/src/vsg/utils/Builder.cpp
knownConditionTrueFalse:*/include/vsg/utils/CommandLine.h
knownConditionTrueFalse:*/include/vsg/core/Inherit.h

// suppress warning about initializtion.
useInitializationList:*/include/vsg/core/ScratchMemory.h
Expand Down Expand Up @@ -223,6 +224,11 @@ cstyleCast:*/src/vsg/io/mem_stream.cpp

// suppress unhelpful warnings of override that make inform programmers what is being done
uselessOverride:*/include/vsg/utils/TracyInstrumentation.h
uselessOverride:*/include/vsg/ui/WindowEvent.h
uselessOverride:*/include/vsg/utils/ShaderSet.h
uselessOverride:*/include/vsg/nodes/Transform.h
uselessOverride:*/include/vsg/raytracing/DescriptorAccelerationStructure.h
uselessOverride:*/include/vsg/raytracing/RayTracingShaderGroup.h

// suppress inappropriate warning
constParameterReference:*/include/vsg/vk/Device.h
Expand All @@ -242,3 +248,22 @@ constVariablePointer:*/src/vsg/app/SecondaryCommandGraph.cpp
// suppress inappropriate warning
passedByValue:*/src/vsg/vk/Device.cpp
passedByValue:*/src/vsg/vk/Instance.cpp

// suppress inappropriate warnings
functionStatic:*/include/vsg/io/Output.h
functionStatic:*/include/vsg/io/Input.h
functionStatic:*/src/vsg/app/CompileManager.h
functionStatic:*/include/vsg/app/RecordTraversal.h
functionStatic:*/include/vsg/io/VSG.h
functionStatic:*/include/vsg/io/json.h
functionStatic:*/include/vsg/io/txt.h
functionStatic:*/include/vsg/io/tile.h
functionStatic:*/include/vsg/state/QueryPool.h
functionStatic:*/include/vsg/state/ArrayState.h
functionStatic:*/include/vsg/text/StandardLayout.h
functionStatic:*/include/vsg/utils/Builder.h
functionStatic:*/include/vsg/utils/ShaderCompiler.h


// suppress inappropriate warnings
suspiciousFloatingPointCast:*/src/vsg/maths/maths_transform.cpp
2 changes: 1 addition & 1 deletion include/vsg/animation/AnimationGroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace vsg
void write(Output& output) const override;

protected:
virtual ~AnimationGroup();
~AnimationGroup() override;
};
VSG_type_name(vsg::AnimationGroup);

Expand Down
2 changes: 1 addition & 1 deletion include/vsg/animation/Joint.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace vsg
void write(Output& output) const override;

protected:
virtual ~Joint();
~Joint() override;
};
VSG_type_name(vsg::Joint);

Expand Down
2 changes: 1 addition & 1 deletion include/vsg/app/CommandGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace vsg
ref_ptr<Instrumentation> instrumentation;

protected:
virtual ~CommandGraph();
~CommandGraph() override;

CommandBuffers _commandBuffers; // assign one per index? Or just use round robin, each has a CommandPool
};
Expand Down
2 changes: 1 addition & 1 deletion include/vsg/app/CompileManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ namespace vsg
std::atomic_uint failedCompileCount{0};

protected:
~CompileManager();
~CompileManager() override;

using CompileTraversals = ThreadSafeQueue<ref_ptr<CompileTraversal>>;
size_t numCompileTraversals = 0;
Expand Down
2 changes: 1 addition & 1 deletion include/vsg/app/CompileTraversal.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ namespace vsg
void apply(View& view) override;

protected:
~CompileTraversal();
~CompileTraversal() override;

void add(ref_ptr<Context> context, Framebuffer& framebuffer, ref_ptr<TransferTask> transferTask, ref_ptr<View> view, const ResourceRequirements& resourceRequirements);
void addViewDependentState(ViewDependentState& viewDependentState, ref_ptr<Device> device, ref_ptr<TransferTask> transferTask, const ResourceRequirements& resourceRequirements);
Expand Down
2 changes: 1 addition & 1 deletion include/vsg/app/RecordTraversal.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ namespace vsg
ref_ptr<ViewDependentState> viewDependentState;

protected:
virtual ~RecordTraversal();
~RecordTraversal() override;
};

} // namespace vsg
2 changes: 1 addition & 1 deletion include/vsg/app/SecondaryCommandGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace vsg
void record(ref_ptr<RecordedCommandBuffers> recordedCommandBuffers, ref_ptr<FrameStamp> frameStamp = {}, ref_ptr<DatabasePager> databasePager = {}) override;

protected:
virtual ~SecondaryCommandGraph();
~SecondaryCommandGraph() override;

friend ExecuteCommands;

Expand Down
2 changes: 1 addition & 1 deletion include/vsg/app/UpdateOperations.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace vsg
virtual void run();

protected:
virtual ~UpdateOperations();
~UpdateOperations() override;

mutable std::mutex _updateOperationMutex;
std::list<ref_ptr<Operation>> _updateOperationsOneTime;
Expand Down
2 changes: 1 addition & 1 deletion include/vsg/app/View.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ namespace vsg
GraphicsPipelineStates overridePipelineStates;

protected:
virtual ~View();
~View() override;
};
VSG_type_name(vsg::View);

Expand Down
2 changes: 1 addition & 1 deletion include/vsg/app/Viewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ namespace vsg
void assignInstrumentation(ref_ptr<Instrumentation> in_instrumentation);

protected:
virtual ~Viewer();
~Viewer() override;

bool _close = false;

Expand Down
2 changes: 1 addition & 1 deletion include/vsg/app/Window.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ namespace vsg
protected:
Window(ref_ptr<WindowTraits> traits);

virtual ~Window();
~Window() override;

virtual void _initSurface() = 0;
void _initFormats();
Expand Down
2 changes: 1 addition & 1 deletion include/vsg/app/WindowAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace vsg
bool windowValid = false;

protected:
virtual ~WindowAdapter() {}
~WindowAdapter() override {}

void _initSurface() override {};
};
Expand Down
2 changes: 1 addition & 1 deletion include/vsg/app/WindowResizeHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace vsg
WindowResizeHandler();

template<typename T, typename R>
T scale_parameter(T original, R extentOriginal, R extentNew)
static T scale_parameter(T original, R extentOriginal, R extentNew)
{
if (original == static_cast<T>(extentOriginal)) return static_cast<T>(extentNew);
return static_cast<T>(static_cast<float>(original) * static_cast<float>(extentNew) / static_cast<float>(extentOriginal) + 0.5f);
Expand Down
2 changes: 1 addition & 1 deletion include/vsg/app/WindowTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ namespace vsg
std::any systemConnection;

protected:
virtual ~WindowTraits() {}
~WindowTraits() override {}
};
VSG_type_name(vsg::WindowTraits);

Expand Down
2 changes: 1 addition & 1 deletion include/vsg/commands/BindIndexBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace vsg
void record(CommandBuffer& commandBuffer) const override;

protected:
virtual ~BindIndexBuffer();
~BindIndexBuffer() override;
};
VSG_type_name(vsg::BindIndexBuffer);

Expand Down
2 changes: 1 addition & 1 deletion include/vsg/commands/BindVertexBuffers.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace vsg
void record(CommandBuffer& commandBuffer) const override;

protected:
virtual ~BindVertexBuffers();
~BindVertexBuffers() override;

vk_buffer<VulkanArrayData> _vulkanData;
};
Expand Down
2 changes: 1 addition & 1 deletion include/vsg/commands/Commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace vsg
void record(CommandBuffer& commandBuffer) const override;

protected:
virtual ~Commands();
~Commands() override;
};
VSG_type_name(vsg::Commands);

Expand Down
2 changes: 1 addition & 1 deletion include/vsg/commands/CopyAndReleaseBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace vsg
void record(CommandBuffer& commandBuffer) const override;

protected:
virtual ~CopyAndReleaseBuffer();
~CopyAndReleaseBuffer() override;

struct CopyData
{
Expand Down
2 changes: 1 addition & 1 deletion include/vsg/commands/CopyAndReleaseImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace vsg
void record(CommandBuffer& commandBuffer) const override;

protected:
virtual ~CopyAndReleaseImage();
~CopyAndReleaseImage() override;

void _copyDirectly(ref_ptr<Data> data, ref_ptr<ImageInfo> dest, uint32_t numMipMapLevels);

Expand Down
8 changes: 4 additions & 4 deletions include/vsg/commands/Event.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace vsg
VkResult status();

protected:
virtual ~Event();
~Event() override;

VkEvent _event;
ref_ptr<Device> _device;
Expand All @@ -57,7 +57,7 @@ namespace vsg
void record(CommandBuffer& commandBuffer) const override;

protected:
virtual ~SetEvent();
~SetEvent() override;
};
VSG_type_name(vsg::SetEvent);

Expand All @@ -73,7 +73,7 @@ namespace vsg
void record(CommandBuffer& commandBuffer) const override;

protected:
virtual ~ResetEvent();
~ResetEvent() override;
};
VSG_type_name(vsg::ResetEvent);

Expand Down Expand Up @@ -107,7 +107,7 @@ namespace vsg
ImageMemoryBarriers imageMemoryBarriers;

protected:
virtual ~WaitEvents();
~WaitEvents() override;
};
VSG_type_name(vsg::WaitEvents);

Expand Down
2 changes: 1 addition & 1 deletion include/vsg/commands/ExecuteCommands.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace vsg
void record(CommandBuffer& commandBuffer) const override;

protected:
virtual ~ExecuteCommands();
~ExecuteCommands() override;

struct CommandGraphAndBuffer
{
Expand Down
2 changes: 1 addition & 1 deletion include/vsg/commands/NextSubPass.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace vsg
VkSubpassContents contents = VK_SUBPASS_CONTENTS_INLINE;

protected:
virtual ~NextSubPass();
~NextSubPass() override;
};
VSG_type_name(vsg::NextSubPass);

Expand Down
2 changes: 1 addition & 1 deletion include/vsg/commands/PipelineBarrier.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ namespace vsg
ImageMemoryBarriers imageMemoryBarriers;

protected:
virtual ~PipelineBarrier();
~PipelineBarrier() override;
};
VSG_type_name(vsg::PipelineBarrier);

Expand Down
4 changes: 2 additions & 2 deletions include/vsg/core/Allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ namespace vsg
using other = allocator_affinity_adapter<U, A>;
};

value_type* allocate(std::size_t n)
static value_type* allocate(std::size_t n)
{
return static_cast<value_type*>(vsg::allocate(n * sizeof(value_type), A));
}

void deallocate(value_type* ptr, std::size_t n)
static void deallocate(value_type* ptr, std::size_t n)
{
vsg::deallocate(ptr, n * sizeof(value_type));
}
Expand Down
14 changes: 7 additions & 7 deletions include/vsg/core/Array.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ namespace vsg
dirty();
}

explicit Array(uint32_t numElements, Properties in_properties = {}) :
explicit Array(uint32_t numElements, const Properties& in_properties = {}) :
Data(in_properties, sizeof(value_type)),
_data(_allocate(numElements)),
_size(numElements) { dirty(); }

Array(uint32_t numElements, value_type* data, Properties in_properties = {}, MipmapLayout* mipmapLayout = nullptr) :
Array(uint32_t numElements, value_type* data, const Properties& in_properties = {}, MipmapLayout* mipmapLayout = nullptr) :
Data(in_properties, sizeof(value_type)),
_data(data),
_size(numElements)
Expand All @@ -71,7 +71,7 @@ namespace vsg
dirty();
}

Array(uint32_t numElements, const value_type& value, Properties in_properties = {}) :
Array(uint32_t numElements, const value_type& value, const Properties& in_properties = {}) :
Data(in_properties, sizeof(value_type)),
_data(_allocate(numElements)),
_size(numElements)
Expand All @@ -80,7 +80,7 @@ namespace vsg
dirty();
}

Array(ref_ptr<Data> data, uint32_t offset, uint32_t stride, uint32_t numElements, Properties in_properties = {}, MipmapLayout* mipmapLayout = nullptr) :
Array(ref_ptr<Data> data, uint32_t offset, uint32_t stride, uint32_t numElements, const Properties& in_properties = {}, MipmapLayout* mipmapLayout = nullptr) :
Data(),
_data(nullptr),
_size(0)
Expand Down Expand Up @@ -247,7 +247,7 @@ namespace vsg
return *this;
}

void assign(uint32_t numElements, value_type* data, Properties in_properties = {}, MipmapLayout* mipmapLayout = nullptr)
void assign(uint32_t numElements, value_type* data, const Properties& in_properties = {}, MipmapLayout* mipmapLayout = nullptr)
{
_delete();

Expand All @@ -262,7 +262,7 @@ namespace vsg
dirty();
}

void assign(ref_ptr<Data> storage, uint32_t offset, uint32_t stride, uint32_t numElements, Properties in_properties = {}, MipmapLayout* mipmapLayout = nullptr)
void assign(ref_ptr<Data> storage, uint32_t offset, uint32_t stride, uint32_t numElements, const Properties& in_properties = {}, MipmapLayout* mipmapLayout = nullptr)
{
_delete();

Expand Down Expand Up @@ -344,7 +344,7 @@ namespace vsg
const_iterator end() const { return const_iterator{data(_size), properties.stride}; }

protected:
virtual ~Array()
~Array() override
{
_delete();
}
Expand Down
Loading
Loading