Skip to content

Commit

Permalink
[VP] Change L8 to R8 for format limitation
Browse files Browse the repository at this point in the history
Change L8 to R8 for format limitation according
  • Loading branch information
kchen1024 authored and intel-mediadev committed Jul 6, 2023
1 parent c8bb006 commit 95ed35b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ MOS_STATUS XRenderHal_Interface_Xe_Hpg_Base::SetupSurfaceState(
pSurfaceEntry->iSurfStateID * dwSurfaceSize; // Offset to Surface State within the area

// Obtain the Pointer to the Surface state from SSH Buffer
if (pSurfaceEntry->dwFormat == MHW_GFX3DSTATE_SURFACEFORMAT_L8_UNORM && !IsL8FormatSupported())
{
pSurfaceEntry->dwFormat = MHW_GFX3DSTATE_SURFACEFORMAT_R8_UNORM;
}
SurfStateParams.pSurfaceState = pSurfaceEntry->pSurfaceState;
SurfStateParams.bUseAdvState = pSurfaceEntry->bAVS;
SurfStateParams.dwWidth = pSurfaceEntry->dwWidth;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,11 @@ class XRenderHal_Interface_Xe_Hpg_Base : public XRenderHal_Platform_Interface_Ne
virtual MOS_STATUS FreeScratchSpaceBuffer(
RENDERHAL_INTERFACE *renderHal) override;

virtual bool IsL8FormatSupported()
{
return true;
}

MHW_SETPAR_DECL_HDR(STATE_BASE_ADDRESS);

MHW_SETPAR_DECL_HDR(_3DSTATE_CHROMA_KEY);
Expand Down

0 comments on commit 95ed35b

Please sign in to comment.