Skip to content

Commit

Permalink
[Media Common] [VP] cache setting on non apo path
Browse files Browse the repository at this point in the history
cache setting on non apo path
  • Loading branch information
Dylan-debug authored and intel-mediadev committed Oct 19, 2023
1 parent 95b9b1d commit de70557
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions media_driver/agnostic/common/os/mos_graphicsresource.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,17 @@ class GraphicsResource
m_width = pParams->dwWidth;
m_memType = pParams->dwMemType;
m_tileModeByForce = pParams->m_tileModeByForce;
m_gmmResUsageType = MosInterface::GetGmmResourceUsageType(pParams->ResUsageType);

if (pParams->ResUsageType >= MOS_HW_RESOURCE_USAGE_MEDIA_BATCH_BUFFERS || pParams->ResUsageType == MOS_CODEC_RESOURCE_USAGE_BEGIN_CODEC)
if (pParams->ResUsageType == MOS_CODEC_RESOURCE_USAGE_BEGIN_CODEC ||
pParams->ResUsageType == MOS_HW_RESOURCE_DEF_MAX) // the usage type is invalid, set to default usage.
{
m_mocsMosResUsageType = MOS_MP_RESOURCE_USAGE_DEFAULT;
}
else
{
m_mocsMosResUsageType = pParams->ResUsageType;
}
m_gmmResUsageType = MosInterface::GetGmmResourceUsageType(m_mocsMosResUsageType);
};

CreateParams()
Expand Down

0 comments on commit de70557

Please sign in to comment.