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
6 changes: 3 additions & 3 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
build-macos:
strategy:
matrix:
os: [[macos-latest,x64-osx,clang]]
os: [[macos-13,x64-osx,clang]]
buildType: [Release]
runs-on: ${{ matrix.os[0] }}
steps:
Expand Down Expand Up @@ -270,8 +270,8 @@ jobs:
shell: bash
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
run: |
echo "CC=clang-15" >> $GITHUB_ENV
echo "CXX=clang++-15" >> $GITHUB_ENV
echo "CC=clang-16" >> $GITHUB_ENV
echo "CXX=clang++-16" >> $GITHUB_ENV
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
Expand Down
6 changes: 3 additions & 3 deletions include/RenderGraph/FrameGraph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ namespace crg
* Construction/Destruction.
*/
/**@{*/
CRG_API FrameGraph( FrameGraph const & ) = delete;
CRG_API FrameGraph & operator=( FrameGraph const & ) = delete;
FrameGraph( FrameGraph const & ) = delete;
FrameGraph & operator=( FrameGraph const & ) = delete;
FrameGraph & operator=( FrameGraph && )noexcept = delete;
CRG_API FrameGraph( FrameGraph && )noexcept = default;
CRG_API FrameGraph & operator=( FrameGraph && )noexcept = delete;
CRG_API ~FrameGraph()noexcept = default;
CRG_API explicit FrameGraph( ResourceHandler & handler
, std::string name = "FrameGraph" );
Expand Down
6 changes: 3 additions & 3 deletions include/RenderGraph/FramePassTimer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ namespace crg
public:
CRG_API explicit FramePassTimerBlock( FramePassTimer & timer );
CRG_API FramePassTimerBlock( FramePassTimerBlock && rhs )noexcept;
CRG_API FramePassTimerBlock & operator=( FramePassTimerBlock && rhs )noexcept = delete;
CRG_API FramePassTimerBlock( FramePassTimerBlock const & ) = delete;
CRG_API FramePassTimerBlock & operator=( FramePassTimerBlock const & ) = delete;
FramePassTimerBlock & operator=( FramePassTimerBlock && rhs )noexcept = delete;
FramePassTimerBlock( FramePassTimerBlock const & ) = delete;
FramePassTimerBlock & operator=( FramePassTimerBlock const & ) = delete;
CRG_API ~FramePassTimerBlock()noexcept;

FramePassTimer * operator->()const
Expand Down
8 changes: 4 additions & 4 deletions include/RenderGraph/GraphContext.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,10 @@ namespace crg

struct GraphContext
{
CRG_API GraphContext( GraphContext const & ) = delete;
CRG_API GraphContext( GraphContext && ) = delete;
CRG_API GraphContext & operator=( GraphContext const & ) = delete;
CRG_API GraphContext & operator=( GraphContext && ) = delete;
GraphContext( GraphContext const & ) = delete;
GraphContext( GraphContext && ) = delete;
GraphContext & operator=( GraphContext const & ) = delete;
GraphContext & operator=( GraphContext && ) = delete;

CRG_API GraphContext( VkDevice device
, VkPipelineCache cache
Expand Down
6 changes: 3 additions & 3 deletions include/RenderGraph/GraphNode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ namespace crg
FramePass,
};

CRG_API GraphNode( GraphNode const & ) = delete;
CRG_API GraphNode & operator=( GraphNode const & ) = delete;
CRG_API GraphNode & operator=( GraphNode && rhs )noexcept = delete;
GraphNode( GraphNode const & ) = delete;
GraphNode & operator=( GraphNode const & ) = delete;
GraphNode & operator=( GraphNode && rhs )noexcept = delete;
CRG_API virtual ~GraphNode()noexcept = default;

CRG_API GraphNode( GraphNode && rhs )noexcept;
Expand Down
16 changes: 8 additions & 8 deletions include/RenderGraph/ResourceHandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ namespace crg
using CreatedT = std::pair< ValueT, bool >;

public:
ResourceHandler( ResourceHandler const & ) = delete;
ResourceHandler( ResourceHandler && )noexcept = delete;
ResourceHandler & operator=( ResourceHandler const & ) = delete;
ResourceHandler & operator=( ResourceHandler && )noexcept = delete;
CRG_API ResourceHandler() = default;
CRG_API ResourceHandler( ResourceHandler const & ) = delete;
CRG_API ResourceHandler( ResourceHandler && )noexcept = delete;
CRG_API ResourceHandler & operator=( ResourceHandler const & ) = delete;
CRG_API ResourceHandler & operator=( ResourceHandler && )noexcept = delete;
CRG_API ~ResourceHandler()noexcept;

CRG_API ImageId createImageId( ImageData const & img );
Expand Down Expand Up @@ -73,10 +73,10 @@ namespace crg
class ContextResourcesCache
{
public:
CRG_API ContextResourcesCache( ContextResourcesCache const & ) = delete;
CRG_API ContextResourcesCache & operator=( ContextResourcesCache const & ) = delete;
CRG_API ContextResourcesCache( ContextResourcesCache && )noexcept = delete;
CRG_API ContextResourcesCache & operator=( ContextResourcesCache && )noexcept = delete;
ContextResourcesCache( ContextResourcesCache const & ) = delete;
ContextResourcesCache & operator=( ContextResourcesCache const & ) = delete;
ContextResourcesCache( ContextResourcesCache && )noexcept = delete;
ContextResourcesCache & operator=( ContextResourcesCache && )noexcept = delete;

CRG_API ContextResourcesCache( ResourceHandler & handler
, GraphContext & context );
Expand Down
4 changes: 2 additions & 2 deletions include/RenderGraph/RunnablePass.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace crg

Fence( Fence const & ) = delete;
Fence & operator=( Fence const & ) = delete;
CRG_API Fence & operator=( Fence && rhs )noexcept = delete;
Fence & operator=( Fence && rhs )noexcept = delete;
CRG_API Fence( Fence && rhs )noexcept;
CRG_API ~Fence()noexcept;

Expand Down Expand Up @@ -351,7 +351,7 @@ namespace crg
PipelineState m_pipelineState;
std::vector< PassData > m_passes;
FramePassTimer m_timer;
std::map< uint32_t, RecordContext > m_passContexts;
std::vector< RecordContext > m_passContexts;
LayerLayoutStatesHandler m_imageLayouts;
AccessStateMap m_bufferAccesses;
};
Expand Down
8 changes: 4 additions & 4 deletions include/RenderGraph/RunnablePasses/PipelineHolder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ namespace crg
class PipelineHolder
{
public:
PipelineHolder( PipelineHolder const & )noexcept = delete;
PipelineHolder & operator=( PipelineHolder const & )noexcept = delete;
PipelineHolder( PipelineHolder && )noexcept = delete;
PipelineHolder & operator=( PipelineHolder && )noexcept = delete;
CRG_API PipelineHolder( FramePass const & pass
, GraphContext & context
, RunnableGraph & graph
, pp::Config config
, VkPipelineBindPoint bindingPoint
, uint32_t maxPassCount );
CRG_API PipelineHolder( PipelineHolder const & )noexcept = delete;
CRG_API PipelineHolder & operator=( PipelineHolder const & )noexcept = delete;
CRG_API PipelineHolder( PipelineHolder && )noexcept = delete;
CRG_API PipelineHolder & operator=( PipelineHolder && )noexcept = delete;
CRG_API virtual ~PipelineHolder()noexcept;

CRG_API void initialise();
Expand Down
8 changes: 4 additions & 4 deletions include/RenderGraph/RunnablePasses/RenderPassHolder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ namespace crg
};

public:
RenderPassHolder( RenderPassHolder const & )noexcept = delete;
RenderPassHolder & operator=( RenderPassHolder const & )noexcept = delete;
RenderPassHolder( RenderPassHolder && )noexcept = delete;
RenderPassHolder & operator=( RenderPassHolder && )noexcept = delete;
CRG_API RenderPassHolder( FramePass const & pass
, GraphContext & context
, RunnableGraph & graph
, uint32_t maxPassCount
, VkExtent2D size = {} );
CRG_API RenderPassHolder( RenderPassHolder const & )noexcept = delete;
CRG_API RenderPassHolder & operator=( RenderPassHolder const & )noexcept = delete;
CRG_API RenderPassHolder( RenderPassHolder && )noexcept = delete;
CRG_API RenderPassHolder & operator=( RenderPassHolder && )noexcept = delete;
CRG_API ~RenderPassHolder()noexcept;

CRG_API bool initialise( RecordContext & context
Expand Down
3 changes: 3 additions & 0 deletions source/RenderGraph/GraphContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ namespace crg
{
#pragma warning( push )
#pragma warning( disable: 4191 )
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wcast-function-type-strict"
#define DECL_vkFunction( name )\
if ( vkGetDeviceProcAddr && device )\
vk##name = reinterpret_cast< PFN_vk##name >( vkGetDeviceProcAddr( device, "vk"#name ) )
Expand Down Expand Up @@ -139,6 +141,7 @@ namespace crg
#endif

#undef DECL_vkFunction
#pragma clang diagnostic pop
#pragma warning( pop )
}

Expand Down
8 changes: 4 additions & 4 deletions source/RenderGraph/RunnablePass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ namespace crg
for ( uint32_t i = 0u; i < m_ruConfig.maxPassCount; ++i )
{
m_passes.emplace_back( m_graph, m_context, m_pass.getGroupName() );
m_passContexts.emplace_back( graph.getResources() );
}

for ( auto & attach : m_pass.images )
Expand Down Expand Up @@ -327,10 +328,9 @@ namespace crg
assert( m_ruConfig.resettable );
auto index = m_callbacks.getPassIndex();

if ( auto it = m_passContexts.find( index );
it != m_passContexts.end() )
if ( index < m_passContexts.size() )
{
auto context = it->second;
auto context = m_passContexts[index];
recordOne( m_passes[index].commandBuffer
, index
, context );
Expand Down Expand Up @@ -366,7 +366,7 @@ namespace crg
{
if ( m_ruConfig.resettable )
{
m_passContexts.insert_or_assign( index, context );
m_passContexts[index] = context;
}

if ( isEnabled() )
Expand Down
2 changes: 0 additions & 2 deletions test/TestBases.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ namespace
{
using DummyFunc = std::function< void() >;
using OnDummy = crg::Signal< DummyFunc >;
using OnDummyConnection = crg::SignalConnection< OnDummy >;
OnDummy onDummy;

auto connection = onDummy.connect( []()
Expand Down Expand Up @@ -113,7 +112,6 @@ namespace
{
using DummyFunc = std::function< void() >;
using OnDummy = crg::Signal< DummyFunc >;
using OnDummyConnection = crg::SignalConnection< OnDummy >;
auto onDummy = std::make_unique< OnDummy >();

auto connection = onDummy->connect( []()
Expand Down