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

Method destroyBuffer

source/RenderGraph/ResourceHandler.cpp:503–523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501 }
502
503 void ResourceHandler::destroyBuffer( GraphContext & context
504 , BufferId bufferId )
505 {
506 lock_type lock( m_buffersMutex );
507 auto it = m_buffers.find( bufferId );
508
509 if ( it != m_buffers.end() )
510 {
511 if ( context.vkDestroyBuffer && it->second.first )
512 {
513 context.vkDestroyBuffer( context.device, it->second.first, context.allocator );
514 }
515
516 if ( context.vkFreeMemory && it->second.second )
517 {
518 context.vkFreeMemory( context.device, it->second.second, context.allocator );
519 }
520
521 m_buffers.erase( it );
522 }
523 }
524
525 void ResourceHandler::destroyBufferView( GraphContext & context
526 , BufferViewId viewId )

Callers 2

TESTFunction · 0.80

Calls 4

findMethod · 0.80
eraseMethod · 0.80
beginMethod · 0.80
endMethod · 0.45

Tested by 1

TESTFunction · 0.64