diff --git a/src/gallium/frontends/mediafoundation/encode.cpp b/src/gallium/frontends/mediafoundation/encode.cpp index ccd83251af4..08db2f41879 100644 --- a/src/gallium/frontends/mediafoundation/encode.cpp +++ b/src/gallium/frontends/mediafoundation/encode.cpp @@ -711,5 +711,9 @@ CDX12EncHMFT::ValidateDirtyRects( const LPDX12EncodeContext pDX12EncodeContext, } } done: + if( FAILED( hr ) ) + { + MFE_ERROR( "[dx12 hmft 0x%p] ValidateDirtyRects - hr=0x%x", this, hr ); + } return hr; } diff --git a/src/gallium/frontends/mediafoundation/encode_h264.cpp b/src/gallium/frontends/mediafoundation/encode_h264.cpp index 1ef0b2c95dc..5e1502b2d4a 100644 --- a/src/gallium/frontends/mediafoundation/encode_h264.cpp +++ b/src/gallium/frontends/mediafoundation/encode_h264.cpp @@ -319,7 +319,8 @@ CDX12EncHMFT::PrepareForEncodeHelper( LPDX12EncodeContext pDX12EncodeContext, bo if( cur_frame_desc->ref_list0_mod_operations.size() > PIPE_H264_MAX_NUM_LIST_REF ) { assert( false ); - return E_UNEXPECTED; + hr = E_UNEXPECTED; + goto done; } pPicInfo->slice.num_ref_list0_mod_operations = static_cast( cur_frame_desc->ref_list0_mod_operations.size() ); for( uint32_t i = 0; i < pPicInfo->slice.num_ref_list0_mod_operations; i++ ) @@ -329,7 +330,8 @@ CDX12EncHMFT::PrepareForEncodeHelper( LPDX12EncodeContext pDX12EncodeContext, bo if( cur_frame_desc->mmco_operations.size() > PIPE_H264_MAX_NUM_LIST_REF ) { assert( false ); - return E_UNEXPECTED; + hr = E_UNEXPECTED; + goto done; } pPicInfo->slice.num_ref_pic_marking_operations = static_cast( cur_frame_desc->mmco_operations.size() ); if( pPicInfo->slice.num_ref_pic_marking_operations > 0 ) @@ -639,6 +641,10 @@ CDX12EncHMFT::PrepareForEncodeHelper( LPDX12EncodeContext pDX12EncodeContext, bo pPicInfo->num_slice_descriptors ); done: + if( FAILED( hr ) ) + { + MFE_ERROR( "[dx12 hmft 0x%p] PrepareForEncodeHelper - hr=0x%x", this, hr ); + } return hr; } @@ -704,6 +710,10 @@ CDX12EncHMFT::GetCodecPrivateData( LPBYTE pSPSPPSData, DWORD dwSPSPPSDataLen, LP *lpdwSPSPPSDataLen = (DWORD) buf_size; done: + if( FAILED( hr ) ) + { + MFE_ERROR( "[dx12 hmft 0x%p] GetCodecPrivateData - hr=0x%x", this, hr ); + } return hr; } @@ -1143,6 +1153,10 @@ CDX12EncHMFT::CreateGOPTracker( uint32_t textureWidth, uint32_t textureHeight ) CHECKHR_GOTO( hr, done ); done: + if( FAILED( hr ) ) + { + MFE_ERROR( "[dx12 hmft 0x%p] CreateGOPTracker - hr=0x%x", this, hr ); + } return hr; } diff --git a/src/gallium/frontends/mediafoundation/encode_hevc.cpp b/src/gallium/frontends/mediafoundation/encode_hevc.cpp index 1ab5dfb7c40..9e950143e39 100644 --- a/src/gallium/frontends/mediafoundation/encode_hevc.cpp +++ b/src/gallium/frontends/mediafoundation/encode_hevc.cpp @@ -665,6 +665,10 @@ CDX12EncHMFT::PrepareForEncodeHelper( LPDX12EncodeContext pDX12EncodeContext, bo pPicInfo->num_slice_descriptors ); done: + if( FAILED( hr ) ) + { + MFE_ERROR( "[dx12 hmft 0x%p] PrepareForEncodeHelper - hr=0x%x", this, hr ); + } return hr; } @@ -741,6 +745,10 @@ CDX12EncHMFT::GetCodecPrivateData( LPBYTE pSPSPPSData, DWORD dwSPSPPSDataLen, LP *lpdwSPSPPSDataLen = (DWORD) buf_size; done: + if( FAILED( hr ) ) + { + MFE_ERROR( "[dx12 hmft 0x%p] GetCodecPrivateData - hr=0x%x", this, hr ); + } return hr; } @@ -983,6 +991,10 @@ CDX12EncHMFT::CreateGOPTracker( uint32_t textureWidth, uint32_t textureHeight ) CHECKHR_GOTO( hr, done ); done: + if( FAILED( hr ) ) + { + MFE_ERROR( "[dx12 hmft 0x%p] CreateGOPTracker - hr=0x%x", this, hr ); + } return hr; }