MCPcopy Create free account
hub / github.com/carbonengine/trinity / Destroy

Method Destroy

trinityal/dx12/Tr2PrimaryRenderContextDx12.cpp:649–747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

647
648
649void Tr2PrimaryRenderContextAL::Destroy()
650{
651 if( IsValid() )
652 {
653 uint64_t value;
654 if( SUCCEEDED( SignalDx12( value ) ) )
655 {
656 WaitForFenceDx12( value );
657 }
658 }
659
660 if( m_upscalingTechnique )
661 {
662 m_upscalingTechnique->ReleaseResources();
663 }
664
665 std::fill( begin( m_nullSrv ), end( m_nullSrv ), nullptr );
666 std::fill( begin( m_nullUav ), end( m_nullUav ), nullptr );
667
668 if( m_amdExtDeviceObject )
669 {
670 static_cast<IAmdExtD3DDevice1*>( m_ownerDevice->m_amdExtDeviceObject )->Release();
671 m_amdExtDeviceObject = nullptr;
672 }
673
674 m_pendingPresents.clear();
675
676 m_statsQuery = nullptr;
677 m_statsResult = nullptr;
678
679 Tr2RenderContextAL::Destroy();
680
681 m_immediateBuffer.Destroy();
682
683 delete m_genMipsResources;
684 m_genMipsResources = nullptr;
685
686 m_nullRtHeap = nullptr;
687 m_nullRts.clear();
688
689 m_drawInstancedIndirect = nullptr;
690 m_drawIndexedInstancedIndirect = nullptr;
691 m_dispatchIndirect = nullptr;
692
693 m_pipelineStates.clear();
694 m_defaultBackBuffer.m_texture->Destroy();
695
696 m_presentFence = nullptr;
697
698 m_commandAllocators.clear();
699
700 if( m_swapchain )
701 {
702 CR( m_swapchain->SetFullscreenState( FALSE, nullptr ) );
703 }
704 m_swapchain = nullptr;
705
706 m_commandQueue = nullptr;

Callers 1

SetPresentParametersMethod · 0.45

Calls 8

DestroyFunction · 0.85
ReleaseMethod · 0.80
resetMethod · 0.80
IsValidFunction · 0.70
beginFunction · 0.50
endFunction · 0.50
ReleaseResourcesMethod · 0.45
ClearMethod · 0.45

Tested by

no test coverage detected