MCPcopy Create free account
hub / github.com/DragonJoker/RenderGraph / addInOutTransfer

Method addInOutTransfer

source/RenderGraph/FramePass.cpp:336–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334 }
335
336 Attachment const * FramePass::addInOutTransfer( Attachment const & attachment
337 , Attachment::Flag flag )
338 {
339 Attachment const * result{};
340
341 if ( attachment.isImage() )
342 {
343 auto attachName = fpass::adjustName( *this, attachment.view().data->name ) + "/IOTrf";
344 result = addOwnAttach( attachment.imageAttach.views
345 , std::move( attachName )
346 , Attachment::FlagKind( Attachment::FlagKind( Attachment::Flag::InOut ) | Attachment::FlagKind( flag ) )
347 , ImageAttachment::FlagKind( ImageAttachment::Flag::Transfer )
348 , AttachmentLoadOp::eDontCare, AttachmentStoreOp::eDontCare
349 , AttachmentLoadOp::eDontCare, AttachmentStoreOp::eDontCare
350 , ClearValue{}
351 , PipelineColorBlendAttachmentState{}
352 , ImageLayout::eTransferSrc
353 , &attachment );
354 m_inouts.try_emplace( TransferOffset + uint32_t( m_inouts.size() ), result );
355 }
356 else
357 {
358 auto attachName = fpass::adjustName( *this, attachment.buffer().data->name ) + "/IOTrf";
359 result = addOwnAttach( attachment.bufferAttach.buffers
360 , std::move( attachName )
361 , Attachment::FlagKind( Attachment::FlagKind( Attachment::Flag::InOut ) | Attachment::FlagKind( flag ) )
362 , BufferAttachment::FlagKind( BufferAttachment::Flag::Transfer )
363 , AccessState{}
364 , &attachment );
365 m_inouts.try_emplace( TransferOffset + uint32_t( m_inouts.size() ), result );
366 }
367
368 return result;
369 }
370
371 Attachment const * FramePass::addOutputTransferBuffer( BufferViewIdArray buffers )
372 {

Callers 2

TESTFunction · 0.80
TESTFunction · 0.80

Calls 5

adjustNameFunction · 0.85
isImageMethod · 0.80
viewMethod · 0.80
sizeMethod · 0.80
bufferMethod · 0.80

Tested by 2

TESTFunction · 0.64
TESTFunction · 0.64