diff --git a/media_softlet/agnostic/common/vp/hal/packet/vp_render_cmd_packet.cpp b/media_softlet/agnostic/common/vp/hal/packet/vp_render_cmd_packet.cpp index 8f9fbe8157..9962d91c92 100644 --- a/media_softlet/agnostic/common/vp/hal/packet/vp_render_cmd_packet.cpp +++ b/media_softlet/agnostic/common/vp/hal/packet/vp_render_cmd_packet.cpp @@ -1044,7 +1044,25 @@ MOS_STATUS VpRenderCmdPacket::InitRenderHalSurface(VP_SURFACE &surface, RENDERHA { VP_FUNC_CALL(); VP_RENDER_CHK_NULL_RETURN(surface.osSurface); - VP_RENDER_CHK_STATUS_RETURN(RenderCmdPacket::InitRenderHalSurface(*surface.osSurface, &renderSurface)); + PMOS_INTERFACE pOsInterface = nullptr; + RENDER_PACKET_CHK_NULL_RETURN(m_renderHal->pOsInterface); + pOsInterface = m_renderHal->pOsInterface; + RENDER_PACKET_CHK_NULL_RETURN(pOsInterface->pfnGetMemoryCompressionMode); + RENDER_PACKET_CHK_NULL_RETURN(pOsInterface->pfnGetMemoryCompressionFormat); + + // Update compression status + VP_PUBLIC_CHK_STATUS_RETURN(pOsInterface->pfnGetMemoryCompressionMode(pOsInterface, + &surface.osSurface->OsResource, + &surface.osSurface->MmcState)); + + VP_PUBLIC_CHK_STATUS_RETURN(pOsInterface->pfnGetMemoryCompressionFormat(pOsInterface, + &surface.osSurface->OsResource, + &surface.osSurface->CompressionFormat)); + + if (Mos_ResourceIsNull(&renderSurface.OsSurface.OsResource)) + { + renderSurface.OsSurface = *surface.osSurface; + } renderSurface.rcSrc = surface.rcSrc; renderSurface.rcDst = surface.rcDst;