| 647 | |
| 648 | |
| 649 | void 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; |
no test coverage detected