Skip to content

Commit

Permalink
core: added support of MFX_GPUCOPY_FAST enum (#6710)
Browse files Browse the repository at this point in the history
Co-authored-by: Miroslav Goncharenko <[email protected]>
  • Loading branch information
gfxVPLsdm and mgonchar authored Apr 25, 2024
1 parent d74cb63 commit 436fefc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 5 additions & 3 deletions _studio/mfx_lib/shared/src/mfx_session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,17 +450,19 @@ mfxStatus _mfxVersionedSessionImpl::InitEx(mfxInitParam& par, bool isSingleThrea
return gpu_copy == MFX_GPUCOPY_DEFAULT
|| gpu_copy == MFX_GPUCOPY_ON
|| gpu_copy == MFX_GPUCOPY_OFF
#ifdef ONEVPL_EXPERIMENTAL
|| gpu_copy == MFX_GPUCOPY_SAFE
#ifdef ONEVPL_EXPERIMENTAL
|| gpu_copy == MFX_GPUCOPY_FAST
#endif
;
};

MFX_CHECK(IsGPUcopyValid(par.GPUCopy), MFX_ERR_UNSUPPORTED);

if (MFX_PLATFORM_SOFTWARE == m_currentPlatform && (MFX_GPUCOPY_ON == par.GPUCopy
#ifdef ONEVPL_EXPERIMENTAL
if (MFX_PLATFORM_SOFTWARE == m_currentPlatform && (MFX_GPUCOPY_ON == par.GPUCopy
|| MFX_GPUCOPY_SAFE == par.GPUCopy
#ifdef ONEVPL_EXPERIMENTAL
|| MFX_GPUCOPY_FAST == par.GPUCopy
#endif
))
{
Expand Down
10 changes: 4 additions & 6 deletions _studio/shared/src/libmfx_core_vaapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -894,15 +894,13 @@ mfxStatus VAAPIVideoCORE_T<Base>::TryInitializeCm(bool force_cm_device_creation)
{
m_ForcedGpuCopyState = MFX_GPUCOPY_OFF;
}
/*
// Uncomment after additional changes

#ifdef ONEVPL_EXPERIMENTAL
bool use_cm_buffer_cache = m_ForcedGpuCopyState != MFX_GPUCOPY_SAFE;
bool use_cm_buffer_cache = m_ForcedGpuCopyState == MFX_GPUCOPY_FAST;
#else
bool use_cm_buffer_cache = true;
#endif
*/
bool use_cm_buffer_cache = false;
#endif

std::unique_ptr<CmCopyWrapper> tmp_cm(new CmCopyWrapper(use_cm_buffer_cache));

MFX_CHECK_NULL_PTR1(tmp_cm->GetCmDevice(*m_p_display_wrapper));
Expand Down

0 comments on commit 436fefc

Please sign in to comment.