[VP] Enable Bindless Kernel

enable bindless features
This commit is contained in:
Gu_Peiyi 2025-05-15 22:00:15 +08:00 committed by intel-mediadev
parent 5252db968a
commit 2e050c1dde
18 changed files with 393 additions and 163 deletions

View File

@ -310,8 +310,6 @@ typedef struct _MHW_GPGPU_WALKER_PARAMS
MHW_EMIT_LOCAL_MODE emitLocal;
bool hasBarrier;
PMHW_INLINE_DATA_PARAMS inlineDataParamBase;
uint32_t inlineDataParamSize;
uint32_t simdSize;

View File

@ -700,14 +700,6 @@ typedef enum _MHW_CHROMAKEY_MODE
MHW_CHROMAKEY_MODE_REPLACE_BLACK = 1
} MHW_CHROMAKEY_MODE;
typedef struct _MHW_INLINE_DATA_PARAMS
{
uint32_t dwOffset;
uint32_t dwSize;
PMOS_RESOURCE resource;
bool isPtrType;
} MHW_INLINE_DATA_PARAMS, *PMHW_INLINE_DATA_PARAMS;
typedef struct _MHW_SAMPLER_STATE_UNORM_PARAM
{
MHW_SAMPLER_FILTER_MODE SamplerFilterMode;

View File

@ -84,6 +84,8 @@ class XRenderHal_Platform_Interface;
#define MHW_RENDERHAL_CHK_NULL_RETURN(_ptr) \
MOS_CHK_NULL_RETURN(MOS_COMPONENT_CM, MOS_CM_SUBCOMP_RENDERHAL, _ptr)
#define MHW_RENDERHAL_CHK_VALUE_RETURN(_value, _expect_value) \
MOS_CHK_STATUS_RETURN(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_PUBLIC, ((_value) == (_expect_value)) ? MOS_STATUS_SUCCESS : MOS_STATUS_INVALID_PARAMETER)
#define MHW_RENDERHAL_UNUSED(x) \
MOS_UNUSED(x)
@ -1066,6 +1068,7 @@ typedef struct _RENDERHAL_SURFACE_STATE_ENTRY
uint16_t wUYOffset; //
uint16_t wVXOffset; // (X,Y) offset V (AVS/ADI)
uint16_t wVYOffset; //
uint64_t stateGfxAddress; // Gfx Address of Surface State
} RENDERHAL_SURFACE_STATE_ENTRY, *PRENDERHAL_SURFACE_STATE_ENTRY;
//!
@ -1385,6 +1388,7 @@ typedef struct _RENDERHAL_INTERFACE
MOS_STATUS (*pfnSendBindlessSurfaceStates) (
PRENDERHAL_INTERFACE pRenderHal,
PMOS_COMMAND_BUFFER pCmdBuffer,
bool bNeedNullPatch);
MOS_STATUS (* pfnBindSurfaceState) (
@ -1484,7 +1488,7 @@ typedef struct _RENDERHAL_INTERFACE
int32_t iMediaID,
PMHW_SAMPLER_STATE_PARAM pSamplerParams,
int32_t iSamplers,
std::map<uint32_t, uint32_t> &samplerMap);
std::map<uint32_t, uint64_t> &samplerMap);
int32_t (* pfnAllocateMediaID) (
PRENDERHAL_INTERFACE pRenderHal,

View File

@ -565,6 +565,13 @@ public:
return MOS_STATUS_SUCCESS;
};
virtual MOS_STATUS SendStateComputeMpde(
PRENDERHAL_INTERFACE pRenderHal,
PMOS_COMMAND_BUFFER pCmdBuffer)
{
return MOS_STATUS_SUCCESS;
}
virtual bool IsBindlessHeapInUse(
PRENDERHAL_INTERFACE pRenderHal)
{

View File

@ -75,6 +75,8 @@ public:
void RefreshSync();
MOS_STATUS RegisterHeap();
MOS_STATUS DestroyHeap();
MOS_STATUS AssignSurfaceState();

View File

@ -179,7 +179,7 @@ MOS_STATUS RenderHal_SendSurfaces_PatchList(
if (pRenderHal->isBindlessHeapInUse)
{
bool bNeedNullPatch = MEDIA_IS_SKU(pOsInterface->pfnGetSkuTable(pOsInterface), FtrMediaPatchless);
MHW_RENDERHAL_CHK_STATUS_RETURN(pRenderHal->pfnSendBindlessSurfaceStates(pRenderHal, bNeedNullPatch));
MHW_RENDERHAL_CHK_STATUS_RETURN(pRenderHal->pfnSendBindlessSurfaceStates(pRenderHal, pCmdBuffer, bNeedNullPatch));
return MOS_STATUS_SUCCESS;
}

View File

@ -64,8 +64,7 @@ struct MHW_VFE_SCOREBOARD
struct MHW_HEAPS_RESOURCE
{
PMOS_RESOURCE presInstructionBuffer = nullptr;
PMHW_INLINE_DATA_PARAMS inlineDataParamsBase = nullptr;
uint32_t inlineDataParamSize = 0;
uint64_t kernelStartGfxAddress = 0;
};
enum MHW_VFE_SLICE_DISABLE

View File

@ -133,7 +133,8 @@ extern const RENDERHAL_SURFACE_STATE_ENTRY g_cInitSurfaceStateEntry =
0, // wUXOffset
0, // wUYOffset
0, // wVXOffset
0 // wVYOffset
0, // wVYOffset
0 // stateGfxAddress
};
const MHW_MEDIA_STATE_FLUSH_PARAM g_cRenderHal_InitMediaStateFlushParams =
@ -3024,6 +3025,7 @@ MOS_STATUS RenderHal_AssignSurfaceState(
pStateHeap = pRenderHal->pStateHeap;
uint8_t *pCurSurfaceState;
uint64_t stateGfxAddress = 0;
// Calculate the Offset to the Surface State
MHW_RENDERHAL_CHK_NULL_RETURN(pRenderHal->pRenderHalPltInterface);
@ -3051,9 +3053,13 @@ MOS_STATUS RenderHal_AssignSurfaceState(
SURFACE_STATES_HEAP_OBJ *sufStateHeap = pStateHeap->surfaceStateMgr->m_surfStateHeap;
MHW_RENDERHAL_CHK_NULL_RETURN(sufStateHeap);
MHW_RENDERHAL_CHK_NULL_RETURN(sufStateHeap->pLockedOsResourceMem);
MHW_RENDERHAL_CHK_NULL_RETURN(pRenderHal->pOsInterface);
MHW_RENDERHAL_CHK_NULL_RETURN(pRenderHal->pOsInterface->pfnGetResourceGfxAddress);
MHW_RENDERHAL_CHK_VALUE_RETURN(Mos_ResourceIsNull(&sufStateHeap->osResource), false);
dwOffset = sufStateHeap->uiCurState * sufStateHeap->uiInstanceSize;
pCurSurfaceState =sufStateHeap->pLockedOsResourceMem + dwOffset;
pStateHeap->iCurrentSurfaceState = sufStateHeap->uiCurState;
stateGfxAddress = pRenderHal->pOsInterface->pfnGetResourceGfxAddress(pRenderHal->pOsInterface, &sufStateHeap->osResource) + dwOffset;
MHW_RENDERHAL_CHK_STATUS_RETURN(pStateHeap->surfaceStateMgr->AssignUsedSurfaceState(pStateHeap->iCurrentSurfaceState));
// Obtain new surface entry and initialize
@ -3074,6 +3080,7 @@ MOS_STATUS RenderHal_AssignSurfaceState(
pSurfaceEntry->dwSurfStateOffset = (uint32_t)-1; // Each platform to setup
pSurfaceEntry->pSurfaceState = pCurSurfaceState;
pSurfaceEntry->pSurface = (PMOS_SURFACE)MOS_AllocAndZeroMemory(sizeof(MOS_SURFACE));
pSurfaceEntry->stateGfxAddress = stateGfxAddress;
if (pSurfaceEntry->pSurface == nullptr)
{
MHW_RENDERHAL_ASSERTMESSAGE("Allocating Surface failed!");
@ -5700,6 +5707,7 @@ MOS_STATUS RenderHal_AssignBindlessSurfaceStates(
MOS_STATUS RenderHal_SendSurfaces_Bindelss(
PRENDERHAL_INTERFACE pRenderHal,
PMOS_COMMAND_BUFFER pCmdBuffer,
bool bNeedNullPatch)
{
PRENDERHAL_STATE_HEAP pStateHeap = nullptr;
@ -5722,6 +5730,7 @@ MOS_STATUS RenderHal_SendSurfaces_Bindelss(
return eStatus;
}
MHW_CHK_STATUS_RETURN(pRenderHal->pStateHeap->surfaceStateMgr->RegisterHeap());
for (uint32_t i = 0; i < pStateHeap->surfaceStateMgr->m_usedStates.size(); i++)
{
uint32_t index = pStateHeap->surfaceStateMgr->m_usedStates[i];
@ -5733,7 +5742,7 @@ MOS_STATUS RenderHal_SendSurfaces_Bindelss(
SendSurfaceParams.pSurfaceToken = (uint8_t *)&pStateHeap->pSurfaceEntry[index].SurfaceToken;
SendSurfaceParams.pSurfaceStateSource = (uint8_t *)pStateHeap->pSurfaceEntry[index].pSurfaceState;
SendSurfaceParams.iSurfaceStateOffset = index * pStateHeap->surfaceStateMgr->m_surfStateHeap->uiInstanceSize;
pRenderHal->pfnSendSurfaceStateEntry(pRenderHal, nullptr, &SendSurfaceParams);
pRenderHal->pfnSendSurfaceStateEntry(pRenderHal, pCmdBuffer, &SendSurfaceParams);
}
return eStatus;
@ -6729,7 +6738,7 @@ MOS_STATUS RenderHal_SetAndGetSamplerStates(
int32_t iMediaID,
PMHW_SAMPLER_STATE_PARAM pSamplerParams,
int32_t iSamplers,
std::map<uint32_t, uint32_t> &samplerMap)
std::map<uint32_t, uint64_t> &samplerMap)
{
MOS_STATUS eStatus;
PRENDERHAL_STATE_HEAP pStateHeap;
@ -6738,7 +6747,7 @@ MOS_STATUS RenderHal_SetAndGetSamplerStates(
int32_t iOffsetSampler;
uint8_t *pPtrSampler;
int32_t i;
uint32_t stateOffsets = 0;
uint64_t stateGfxAddress = 0;
eStatus = MOS_STATUS_UNKNOWN;
@ -6793,7 +6802,9 @@ MOS_STATUS RenderHal_SetAndGetSamplerStates(
switch (pSamplerStateParams->SamplerType)
{
case MHW_SAMPLER_TYPE_3D:
stateOffsets = iOffsetSampler + i * pRenderHal->pHwSizes->dwSizeSamplerState;
MHW_RENDERHAL_CHK_VALUE_RETURN(Mos_ResourceIsNull(&pStateHeap->GshOsResource), false);
stateGfxAddress = pRenderHal->pOsInterface->pfnGetResourceGfxAddress(pRenderHal->pOsInterface, &pStateHeap->GshOsResource) + iOffsetSampler;
stateGfxAddress += (pRenderHal->pHwSizes->dwSizeSamplerState * i);
eStatus = pRenderHal->pMhwStateHeap->SetSamplerState(pPtrSampler, pSamplerStateParams);
break;
default:
@ -6802,7 +6813,7 @@ MOS_STATUS RenderHal_SetAndGetSamplerStates(
break;
}
samplerMap.emplace(i, stateOffsets);
samplerMap.insert(std::make_pair(i, stateGfxAddress));
if (MOS_FAILED(eStatus))
{

View File

@ -126,6 +126,18 @@ MOS_STATUS SurfaceStateHeapManager::DestroyHeap()
return MOS_STATUS_SUCCESS;
}
MOS_STATUS SurfaceStateHeapManager::RegisterHeap()
{
MHW_CHK_NULL_RETURN(m_osInterface);
if (Mos_ResourceIsNull(&m_surfStateHeap->osResource))
{
MHW_CHK_STATUS_RETURN(MOS_STATUS_NULL_POINTER);
}
MHW_CHK_STATUS_RETURN(m_osInterface->pfnRegisterResource(m_osInterface, &m_surfStateHeap->osResource, false, true));
return MOS_STATUS_SUCCESS;
}
void SurfaceStateHeapManager::RefreshSync()
{
SURFACE_STATES_OBJ *pCurInstance;

View File

@ -481,7 +481,7 @@ uint32_t RenderCmdPacket::SetSurfaceForHwAccess(
PRENDERHAL_SURFACE_NEXT pRenderSurface,
PRENDERHAL_SURFACE_STATE_PARAMS pSurfaceParams,
bool bWrite,
std::set<uint32_t> &stateOffsets)
std::vector<uint64_t> &stateGfxAddress)
{
PMOS_INTERFACE pOsInterface;
PRENDERHAL_SURFACE_STATE_ENTRY pSurfaceEntries[MHW_MAX_SURFACE_PLANES];
@ -580,7 +580,7 @@ uint32_t RenderCmdPacket::SetSurfaceForHwAccess(
{
for (i = 0; i < iSurfaceEntries; i++)
{
stateOffsets.insert(pSurfaceEntries[i]->dwSurfStateOffset);
stateGfxAddress.push_back(pSurfaceEntries[i]->stateGfxAddress);
}
}
@ -694,7 +694,7 @@ MOS_STATUS RenderCmdPacket::SetSurfaceForHwAccess(
PRENDERHAL_SURFACE_STATE_PARAMS pSurfaceParams,
std::set<uint32_t> &bindingIndexes,
bool bWrite,
std::set<uint32_t> &stateOffsets,
std::vector<uint64_t> &stateGfxAddress,
uint32_t capcityOfSurfaceEntries,
PRENDERHAL_SURFACE_STATE_ENTRY *surfaceEntries,
uint32_t *numOfSurfaceEntries)
@ -795,7 +795,7 @@ MOS_STATUS RenderCmdPacket::SetSurfaceForHwAccess(
{
for (i = 0; i < iSurfaceEntries; i++)
{
stateOffsets.insert(pSurfaceEntries[i]->dwSurfStateOffset);
stateGfxAddress.push_back(pSurfaceEntries[i]->stateGfxAddress);
}
}
@ -813,7 +813,7 @@ uint32_t RenderCmdPacket::SetBufferForHwAccess(
PRENDERHAL_SURFACE_NEXT pRenderSurface,
PRENDERHAL_SURFACE_STATE_PARAMS pSurfaceParams,
bool bWrite,
std::set<uint32_t> &stateOffsets)
std::vector<uint64_t> &stateGfxAddress)
{
RENDERHAL_SURFACE RenderHalSurface;
RENDERHAL_SURFACE_STATE_PARAMS SurfaceParam;
@ -869,7 +869,7 @@ uint32_t RenderCmdPacket::SetBufferForHwAccess(
}
else
{
stateOffsets.insert(pSurfaceEntry->dwSurfStateOffset);
stateGfxAddress.push_back(pSurfaceEntry->stateGfxAddress);
}
return pRenderSurface->Index;
}
@ -936,7 +936,7 @@ MOS_STATUS RenderCmdPacket::SetBufferForHwAccess(
PRENDERHAL_SURFACE_STATE_PARAMS pSurfaceParams,
std::set<uint32_t> &bindingIndexes,
bool bWrite,
std::set<uint32_t> &stateOffsets)
std::vector<uint64_t> &stateGfxAddress)
{
RENDERHAL_SURFACE RenderHalSurface = {};
RENDERHAL_SURFACE_STATE_PARAMS SurfaceParam = {};
@ -998,7 +998,7 @@ MOS_STATUS RenderCmdPacket::SetBufferForHwAccess(
}
else
{
stateOffsets.insert(pSurfaceEntry->dwSurfStateOffset);
stateGfxAddress.push_back(pSurfaceEntry->stateGfxAddress);
}
return eStatus;
@ -1265,8 +1265,6 @@ MOS_STATUS RenderCmdPacket::PrepareComputeWalkerParams(KERNEL_WALKER_PARAMS para
gpgpuWalker.SLMSize = params.slmSize;
gpgpuWalker.hasBarrier = params.hasBarrier;
gpgpuWalker.inlineDataParamBase = params.inlineDataParamBase;
gpgpuWalker.inlineDataParamSize = params.inlineDataParamSize;
return MOS_STATUS_SUCCESS;
}

View File

@ -121,8 +121,6 @@ typedef struct _KERNEL_WALKER_PARAMS
bool hasBarrier;
uint32_t slmSize;
PMHW_INLINE_DATA_PARAMS inlineDataParamBase;
uint32_t inlineDataParamSize;
uint32_t simdSize;
}KERNEL_WALKER_PARAMS, * PKERNEL_WALKER_PARAMS;
@ -206,7 +204,7 @@ public:
PRENDERHAL_SURFACE_NEXT pRenderSurface,
PRENDERHAL_SURFACE_STATE_PARAMS pSurfaceParams,
bool bWrite,
std::set<uint32_t> &stateOffsets);
std::vector<uint64_t> &stateGfxAddress);
// Step3: RSS Setup, return index insert in binding table
virtual uint32_t SetSurfaceForHwAccess(
@ -231,7 +229,7 @@ public:
PRENDERHAL_SURFACE_STATE_PARAMS pSurfaceParams,
std::set<uint32_t> &bindingIndexes,
bool bWrite,
std::set<uint32_t> &stateOffsets,
std::vector<uint64_t> &stateGfxAddress,
uint32_t capcityOfSurfaceEntries = 0,
PRENDERHAL_SURFACE_STATE_ENTRY *surfaceEntries = nullptr,
uint32_t *numOfSurfaceEntries = nullptr);
@ -241,7 +239,7 @@ public:
PRENDERHAL_SURFACE_NEXT pRenderSurface,
PRENDERHAL_SURFACE_STATE_PARAMS pSurfaceParams,
bool bWrite,
std::set<uint32_t> &stateOffsets);
std::vector<uint64_t> &stateGfxAddress);
virtual uint32_t SetBufferForHwAccess(
PMOS_SURFACE buffer,
@ -256,7 +254,7 @@ public:
PRENDERHAL_SURFACE_STATE_PARAMS pSurfaceParams,
std::set<uint32_t> &bindingIndexes,
bool bWrite,
std::set<uint32_t> &stateOffsets);
std::vector<uint64_t> &stateGfxAddress);
virtual uint32_t SetBufferForHwAccess(
MOS_BUFFER buffer,

View File

@ -134,6 +134,8 @@ MOS_STATUS VpRenderCmdPacket::LoadKernel()
return MOS_STATUS_UNKNOWN;
}
// Allocate Media ID, link to kernel
// iCurbeOffset and iCurbeLength is useless in bindless mode
// pRenderHal->pfnSetupInterfaceDesc is not used in bindless mode, it's set in send compute walker
m_renderData.mediaID = m_renderHal->pfnAllocateMediaID(
m_renderHal,
iKrnAllocation,
@ -271,12 +273,23 @@ MOS_STATUS VpRenderCmdPacket::Prepare()
VP_RENDER_CHK_STATUS_RETURN(SetupSurfaceState()); // once Surface setup done, surface index should be created here
if (m_renderHal->isBindlessHeapInUse == false)
{
VP_RENDER_CHK_STATUS_RETURN(SetupCurbeState()); // Set Curbe with updated surface index
}
VP_RENDER_CHK_STATUS_RETURN(LoadKernel());
VP_RENDER_CHK_STATUS_RETURN(SetupSamplerStates());
if (m_renderHal->isBindlessHeapInUse)
{
// In bindless mode, Curbe need to set after surface state setup and sampler state setup
// Since bindless surface and bindless sampler only can be set into curbe after they are setup
// In bindful mode, they don't need to be set in curbe
VP_RENDER_CHK_STATUS_RETURN(SetupCurbeStateInBindlessMode());
}
VP_RENDER_CHK_STATUS_RETURN(SetupWalkerParams());
VP_RENDER_CHK_STATUS_RETURN(m_renderHal->pfnSetVfeStateParams(
@ -349,12 +362,23 @@ MOS_STATUS VpRenderCmdPacket::Prepare()
VP_RENDER_CHK_STATUS_RETURN(SetupSurfaceState()); // once Surface setup done, surface index should be created here
if (m_renderHal->isBindlessHeapInUse == false)
{
VP_RENDER_CHK_STATUS_RETURN(SetupCurbeState()); // Set Curbe with updated surface index
}
VP_RENDER_CHK_STATUS_RETURN(LoadKernel());
VP_RENDER_CHK_STATUS_RETURN(SetupSamplerStates());
if (m_renderHal->isBindlessHeapInUse)
{
// In bindless mode, Curbe need to set after surface state setup and sampler state setup
// Since bindless surface and bindless sampler only can be set into curbe after they are setup
// In bindful mode, they don't need to be set in curbe
VP_RENDER_CHK_STATUS_RETURN(SetupCurbeStateInBindlessMode());
}
VP_RENDER_CHK_STATUS_RETURN(SetupWalkerParams());
m_kernelRenderData.emplace(it->first, m_renderData);
@ -402,6 +426,7 @@ MOS_STATUS VpRenderCmdPacket::SetupSamplerStates()
}
else
{
VP_RENDER_NORMALMESSAGE("Sampler State is empty for samplerIndex %d", samplerIndex);
MHW_SAMPLER_STATE_PARAM param = {};
samplerStates.push_back(param);
}
@ -756,7 +781,7 @@ MOS_STATUS VpRenderCmdPacket::SetupSurfaceState()
bWrite = false;
}
std::set<uint32_t> stateOffsets;
std::vector<uint64_t> stateGfxAddress;
if (kernelSurfaceParam->surfaceOverwriteParams.bindedKernel && !kernelSurfaceParam->surfaceOverwriteParams.bufferResource)
{
auto bindingMap = m_kernel->GetSurfaceBindingIndex(type);
@ -770,7 +795,7 @@ MOS_STATUS VpRenderCmdPacket::SetupSurfaceState()
&renderSurfaceParams,
bindingMap,
bWrite,
stateOffsets,
stateGfxAddress,
kernelSurfaceParam->iCapcityOfSurfaceEntry,
kernelSurfaceParam->surfaceEntries,
kernelSurfaceParam->sizeOfSurfaceEntries));
@ -796,7 +821,7 @@ MOS_STATUS VpRenderCmdPacket::SetupSurfaceState()
&renderSurfaceParams,
bindingMap,
bWrite,
stateOffsets));
stateGfxAddress));
for (uint32_t const &bti : bindingMap)
{
VP_RENDER_NORMALMESSAGE("Using Binded Index Buffer. KernelID %d, SurfType %d, bti %d", m_kernel->GetKernelId(), type, bti);
@ -814,7 +839,7 @@ MOS_STATUS VpRenderCmdPacket::SetupSurfaceState()
&renderHalSurface,
&renderSurfaceParams,
bWrite,
stateOffsets);
stateGfxAddress);
VP_RENDER_CHK_STATUS_RETURN(m_kernel->UpdateCurbeBindingIndex(type, index));
VP_RENDER_NORMALMESSAGE("Using UnBinded Index Buffer. KernelID %d, SurfType %d, bti %d", m_kernel->GetKernelId(), type, index);
}
@ -825,15 +850,15 @@ MOS_STATUS VpRenderCmdPacket::SetupSurfaceState()
&renderHalSurface,
&renderSurfaceParams,
bWrite,
stateOffsets);
stateGfxAddress);
VP_RENDER_CHK_STATUS_RETURN(m_kernel->UpdateCurbeBindingIndex(type, index));
VP_RENDER_NORMALMESSAGE("Using UnBinded Index Surface. KernelID %d, SurfType %d, bti %d. If 1D buffer overwrite to 2D for use, it will go SetSurfaceForHwAccess()", m_kernel->GetKernelId(), type, index);
}
}
if (stateOffsets.size() > 0)
if (stateGfxAddress.size() > 0)
{
m_kernel->UpdateBindlessSurfaceResource(type, stateOffsets);
m_kernel->UpdateBindlessSurfaceResource(type, stateGfxAddress);
}
}
VP_RENDER_CHK_STATUS_RETURN(m_kernel->UpdateCompParams());
@ -946,6 +971,54 @@ bool VpRenderCmdPacket::IsRenderUncompressedWriteNeeded(PVP_SURFACE VpSurface)
return false;
}
MOS_STATUS VpRenderCmdPacket::SetupCurbeStateInBindlessMode()
{
VP_FUNC_CALL();
MT_LOG1(MT_VP_HAL_RENDER_SETUP_CURBE_STATE, MT_NORMAL, MT_FUNC_START, 1);
VP_RENDER_CHK_NULL_RETURN(m_kernel);
VP_PUBLIC_CHK_NULL_RETURN(m_renderHal->pStateHeap);
VP_PUBLIC_CHK_NULL_RETURN(m_osInterface);
VP_PUBLIC_CHK_NULL_RETURN(m_osInterface->pfnGetResourceGfxAddress);
// set the Curbe Data length
void *curbeData = nullptr;
uint32_t curbeLength = 0;
uint32_t curbeLengthAligned = 0;
VP_RENDER_CHK_STATUS_RETURN(m_kernel->GetCurbeState(curbeData, curbeLength, curbeLengthAligned, m_renderData.KernelParam, m_renderHal->dwCurbeBlockAlign));
m_renderData.iCurbeOffset = m_renderHal->pfnLoadCurbeData(
m_renderHal,
m_renderData.mediaState,
curbeData,
curbeLength);
if (m_renderData.iCurbeOffset < 0 ||
(m_renderData.iCurbeOffset & 0x1F) != 0 ||
(m_renderData.iCurbeOffset + static_cast<int32_t>(curbeLengthAligned)) > m_renderData.mediaState->iCurbeOffset)
{
RENDER_PACKET_ASSERTMESSAGE("Curbe Set Fail, return error");
return MOS_STATUS_UNKNOWN;
}
PMOS_RESOURCE resource = &m_renderHal->pStateHeap->GshOsResource;
VP_PUBLIC_CHK_VALUE_RETURN(Mos_ResourceIsNull(resource), false);
uint64_t gfxAddress = m_osInterface->pfnGetResourceGfxAddress(m_osInterface, resource) +
m_renderHal->pStateHeap->pCurMediaState->dwOffset +
m_renderHal->pStateHeap->dwOffsetCurbe +
m_renderData.iCurbeOffset;
VP_PUBLIC_CHK_STATUS_RETURN(m_kernel->SetCurbeGfxAddress(gfxAddress));
m_renderData.iCurbeLength = curbeLengthAligned;
m_totalCurbeSize += m_renderData.iCurbeLength;
m_kernel->FreeCurbe(curbeData);
MT_LOG2(MT_VP_HAL_RENDER_SETUP_CURBE_STATE, MT_NORMAL, MT_FUNC_END, 1, MT_MOS_STATUS, MOS_STATUS_SUCCESS);
return MOS_STATUS_SUCCESS;
}
MOS_STATUS VpRenderCmdPacket::SetupCurbeState()
{
VP_FUNC_CALL();
@ -1953,10 +2026,17 @@ MOS_STATUS VpRenderCmdPacket::SendMediaStates(
// Send State Base Address command
MHW_RENDERHAL_CHK_STATUS(pRenderHal->pfnSendStateBaseAddress(pRenderHal, pCmdBuffer));
if (pRenderHal->bComputeContextInUse && !pRenderHal->isBindlessHeapInUse)
if (pRenderHal->bComputeContextInUse)
{
if (!pRenderHal->isBindlessHeapInUse)
{
pRenderHal->pRenderHalPltInterface->SendTo3DStateBindingTablePoolAlloc(pRenderHal, pCmdBuffer);
}
else
{
pRenderHal->pRenderHalPltInterface->SendStateComputeMpde(pRenderHal, pCmdBuffer);
}
}
// Send Surface States
MHW_RENDERHAL_CHK_STATUS(pRenderHal->pfnSendSurfaces(pRenderHal, pCmdBuffer));

View File

@ -94,6 +94,8 @@ protected:
virtual MOS_STATUS SetupCurbeState();
virtual MOS_STATUS SetupCurbeStateInBindlessMode();
virtual VP_SURFACE* GetSurface(SurfaceType type);
virtual MOS_STATUS SetupWalkerParams();

View File

@ -85,9 +85,7 @@ enum IMPLICIT_ARG_TYPE
{
ValueType = 0,
IndirectDataPtr,
ScratchPtr,
SamplerStateBasePtr,
SurfaceStateBasePtr
ScratchPtr
};
struct KRN_ARG
@ -142,6 +140,7 @@ typedef struct MOS_ALIGNED(16) _SURFACE_PARAMS
bool isOutput;
bool needVerticalStirde;
bool combineChannelY;
uint32_t planeIndex;
} SURFACE_PARAMS, *PSURFACE_PARAMS;
using KERNEL_ARG_INDEX_SURFACE_MAP = std::map<uint32_t, SURFACE_PARAMS>;

View File

@ -713,32 +713,57 @@ void VpRenderKernelObj::DumpSurface(VP_SURFACE* pSurface, PCCHAR fileName)
#endif
}
MOS_STATUS VpRenderKernelObj::SetInlineDataParameter(KRN_ARG args, RENDERHAL_INTERFACE *renderhal)
MOS_STATUS VpRenderKernelObj::SetInlineDataParameter(KRN_ARG arg, uint8_t* inlineData)
{
VP_FUNC_CALL();
MHW_INLINE_DATA_PARAMS inlineDataPar = {};
VP_RENDER_CHK_NULL_RETURN(renderhal);
MHW_STATE_BASE_ADDR_PARAMS *pStateBaseParams = &renderhal->StateBaseAddressParams;
inlineDataPar.dwOffset = args.uOffsetInPayload;
inlineDataPar.dwSize = args.uSize;
if (args.implicitArgType == IndirectDataPtr || args.implicitArgType == SamplerStateBasePtr)
VP_RENDER_CHK_NULL_RETURN(inlineData);
if (arg.implicitArgType == IndirectDataPtr)
{
inlineDataPar.resource = pStateBaseParams->presGeneralState;
inlineDataPar.isPtrType = true;
MOS_SecureMemcpy(inlineData + arg.uOffsetInPayload, arg.uSize, &m_curbeGfxAddress, sizeof(m_curbeGfxAddress));
VP_RENDER_NORMALMESSAGE("Setting Inline Data KernelID %d, index %d , value 0x%x, argKind %d", m_kernelId, arg.uIndex, m_curbeGfxAddress, arg.eArgKind);
}
else if (args.implicitArgType == SurfaceStateBasePtr)
else if (arg.implicitArgType == ValueType)
{
// New Heaps
inlineDataPar.isPtrType = true;
}
else if (args.implicitArgType == ValueType)
if (arg.pData != nullptr)
{
inlineDataPar.isPtrType = false;
MOS_SecureMemcpy(inlineData + arg.uOffsetInPayload, arg.uSize, arg.pData, arg.uSize);
VP_RENDER_NORMALMESSAGE("Setting Inline Data KernelID %d, index %d , value %d, argKind %d", m_kernelId, arg.uIndex, *(uint32_t *)arg.pData, arg.eArgKind);
}
else
{
VP_RENDER_NORMALMESSAGE("KernelID %d, index %d, argKind %d is empty", m_kernelId, arg.uIndex, arg.eArgKind);
}
}
// walkerParam.inlineDataParamBase will add m_inlineDataParams.data() in each kernel
// walkerParam.inlineDataParamSize will add m_inlineDataParams.size() in each kernel
m_inlineDataParams.push_back(inlineDataPar);
return MOS_STATUS_SUCCESS;
}
MOS_STATUS VpRenderKernelObj::GetBindlessSamplerGfxAddress(uint32_t samplerIndex, uint64_t &address)
{
auto it = m_bindlessSamperArray.find(samplerIndex);
VP_PUBLIC_CHK_NOT_FOUND_RETURN(it, &m_bindlessSamperArray);
address = it->second;
VP_PUBLIC_CHK_VALUE_RETURN(address == 0, false);
return MOS_STATUS_SUCCESS;
}
MOS_STATUS VpRenderKernelObj::GetBindlessSurfaceStateGfxAddress(KRN_ARG &arg, uint64_t &address)
{
auto surfMapHandle = m_argIndexSurfMap.find(arg.uIndex);
VP_PUBLIC_CHK_NOT_FOUND_RETURN(surfMapHandle, &m_argIndexSurfMap);
if (surfMapHandle->second.surfType == SurfaceTypeInvalid)
{
address = 0; //for invalid surface type, it means the surface in not used in this senario
return MOS_STATUS_SUCCESS;
}
auto bindlessAddressHandle = m_bindlessSurfaceArray.find(surfMapHandle->second.surfType);
VP_PUBLIC_CHK_NOT_FOUND_RETURN(bindlessAddressHandle, &m_bindlessSurfaceArray);
if (surfMapHandle->second.planeIndex >= bindlessAddressHandle->second.size())
{
address = 0; //for those surfaces plane number less than kernel interface max, skip these sub planes
return MOS_STATUS_SUCCESS;
}
address = bindlessAddressHandle->second.at(surfMapHandle->second.planeIndex);
VP_PUBLIC_CHK_VALUE_RETURN(address == 0, false);
return MOS_STATUS_SUCCESS;
}

View File

@ -87,8 +87,8 @@ using KERNEL_SAMPLER_INDEX = std::vector<SamplerIndex>;
using KERNEL_SURFACE_CONFIG = std::map<SurfaceType, KERNEL_SURFACE_STATE_PARAM>;
using KERNEL_SURFACE_BINDING_INDEX = std::map<SurfaceType, std::set<uint32_t>>;
using KERNEL_STATELESS_BUFF_CONFIG = std::map<SurfaceType, uint64_t>;
using KERNEL_BINDELESS_SURFACE = std::map<SurfaceType, std::set<uint32_t>>;
using KERNEL_BINDELESS_SAMPLER = std::map<uint32_t, uint32_t>;
using KERNEL_BINDELESS_SURFACE = std::map<SurfaceType, std::vector<uint64_t>>;
using KERNEL_BINDELESS_SAMPLER = std::map<uint32_t, uint64_t>;
typedef struct _KERNEL_PARAMS
{
@ -534,19 +534,25 @@ public:
virtual MOS_STATUS InitRenderHalSurfaceCMF(MOS_SURFACE* src, PRENDERHAL_SURFACE renderHalSurface);
virtual MOS_STATUS SetInlineDataParameter(KRN_ARG args, RENDERHAL_INTERFACE *renderhal);
virtual MOS_STATUS UpdateBindlessSurfaceResource(SurfaceType surf, std::set<uint32_t> surfStateOffset)
virtual MOS_STATUS UpdateBindlessSurfaceResource(SurfaceType surf, std::vector<uint64_t> stateGfxAddress)
{
if (surf != SurfaceTypeInvalid)
if (surf != SurfaceTypeInvalid && surf != SurfaceTypeSubPlane)
{
m_bindlessSurfaceArray.emplace(surf, surfStateOffset);
auto handle = m_bindlessSurfaceArray.find(surf);
if (handle == m_bindlessSurfaceArray.end())
{
m_bindlessSurfaceArray.insert(std::make_pair(surf, stateGfxAddress));
}
else
{
handle->second = stateGfxAddress;
}
}
return MOS_STATUS_SUCCESS;
}
virtual std::map<uint32_t, uint32_t>& GetBindlessSamplers()
virtual std::map<uint32_t, uint64_t>& GetBindlessSamplers()
{
return m_bindlessSamperArray;
}
@ -558,6 +564,12 @@ public:
return MOS_STATUS_SUCCESS;
}
virtual MOS_STATUS SetCurbeGfxAddress(uint64_t address)
{
m_curbeGfxAddress = address;
return MOS_STATUS_SUCCESS;
}
protected:
virtual MOS_STATUS SetWalkerSetting(KERNEL_THREAD_SPACE &threadSpace, bool bSyncFlag, bool flushL1 = false);
@ -588,6 +600,11 @@ protected:
virtual MOS_STATUS SetTuningFlag(PKERNEL_TUNING_PARAMS tuningParams);
virtual MOS_STATUS SetInlineDataParameter(KRN_ARG arg, uint8_t *inlineData);
virtual MOS_STATUS GetBindlessSamplerGfxAddress(uint32_t samplerIndex, uint64_t &address);
virtual MOS_STATUS GetBindlessSurfaceStateGfxAddress(KRN_ARG &arg, uint64_t &address);
protected:
VP_SURFACE_GROUP *m_surfaceGroup = nullptr; // input surface process surface groups
@ -608,6 +625,7 @@ protected:
VpKernelID m_kernelId = kernelCombinedFc;
DelayLoadedKernelType m_kernelType = KernelNone;
KernelIndex m_kernelIndex = 0; // index of current kernel in KERNEL_PARAMS_LIST
uint64_t m_curbeGfxAddress = 0;
PKERNEL_TUNING_PARAMS m_kernelTuningParams = nullptr;
@ -615,7 +633,6 @@ protected:
bool m_useIndependentSamplerGroup = false; //true means multi kernels has their own stand alone sampler states group. only can be true when m_isAdvKernel is true.
std::shared_ptr<mhw::vebox::Itf> m_veboxItf = nullptr;
std ::vector<MHW_INLINE_DATA_PARAMS> m_inlineDataParams = {};
KERNEL_ARG_INDEX_SURFACE_MAP m_argIndexSurfMap = {};

View File

@ -195,12 +195,14 @@ MOS_STATUS VpRenderOclFcKernel::SetKernelArgs(KERNEL_ARGS &kernelArgs, VP_PACKET
{
if (*(uint32_t *)srcArg.pData == MHW_SAMPLER_FILTER_BILINEAR)
{
m_linearSamplerIndex = dstArg.uOffsetInPayload;
m_linearSamplerIndex = (dstArg.addressMode == AddressingModeBindless) ? 1 : dstArg.uOffsetInPayload;
dstArg.pData = (dstArg.addressMode == AddressingModeBindless) ? srcArg.pData : nullptr;
srcArg.pData = nullptr;
}
else if (*(uint32_t *)srcArg.pData == MHW_SAMPLER_FILTER_NEAREST)
{
m_nearestSamplerIndex = dstArg.uOffsetInPayload;
m_nearestSamplerIndex = (dstArg.addressMode == AddressingModeBindless) ? 0 : dstArg.uOffsetInPayload;
dstArg.pData = (dstArg.addressMode == AddressingModeBindless) ? srcArg.pData : nullptr;
srcArg.pData = nullptr;
}
else
@ -245,7 +247,6 @@ MOS_STATUS VpRenderOclFcKernel::GetCurbeState(void *&curbe, uint32_t &curbeLengt
switch (arg.eArgKind)
{
case ARG_KIND_GENERAL:
case ARG_KIND_SURFACE:
if (arg.pData != nullptr)
{
MOS_SecureMemcpy(pCurbe + arg.uOffsetInPayload, arg.uSize, arg.pData, arg.uSize);
@ -256,8 +257,41 @@ MOS_STATUS VpRenderOclFcKernel::GetCurbeState(void *&curbe, uint32_t &curbeLengt
VP_RENDER_NORMALMESSAGE("KernelID %d, index %d, argKind %d is empty", m_kernelId, arg.uIndex, arg.eArgKind);
}
break;
case ARG_KIND_SURFACE:
if (arg.addressMode == AddressingModeBindless)
{
// this is bindless surface
uint64_t gfxAddress = 0;
VP_PUBLIC_CHK_STATUS_RETURN(GetBindlessSurfaceStateGfxAddress(arg, gfxAddress));
MOS_SecureMemcpy(pCurbe + arg.uOffsetInPayload, arg.uSize, &gfxAddress, sizeof(gfxAddress));
VP_RENDER_NORMALMESSAGE("Setting Curbe State Bindless Surface KernelID %d, index %d , value 0x%x, argKind %d", m_kernelId, arg.uIndex, gfxAddress, arg.eArgKind);
}
else
{
if (arg.pData != nullptr)
{
// this is statelss surface
MOS_SecureMemcpy(pCurbe + arg.uOffsetInPayload, arg.uSize, arg.pData, arg.uSize);
VP_RENDER_NORMALMESSAGE("Setting Curbe State KernelID %d, index %d , value %d, argKind %d", m_kernelId, arg.uIndex, *(uint32_t *)arg.pData, arg.eArgKind);
}
else
{
VP_RENDER_NORMALMESSAGE("KernelID %d, index %d, argKind %d is empty", m_kernelId, arg.uIndex, arg.eArgKind);
}
}
break;
case ARG_KIND_INLINE:
break;
case ARG_KIND_SAMPLER:
if (arg.addressMode == AddressingModeBindless)
{
VP_RENDER_CHK_NULL_RETURN(arg.pData);
uint64_t gfxAddress = 0;
uint32_t samplerIndex = (*(uint32_t *)arg.pData == MHW_SAMPLER_FILTER_NEAREST) ? 0 : 1;
VP_RENDER_CHK_STATUS_RETURN(GetBindlessSamplerGfxAddress(samplerIndex, gfxAddress));
MOS_SecureMemcpy(pCurbe + arg.uOffsetInPayload, arg.uSize, &gfxAddress, sizeof(gfxAddress));
VP_RENDER_NORMALMESSAGE("Setting Curbe State Bindless Sampler KernelID %d, index %d , value 0x%x, argKind %d", m_kernelId, arg.uIndex, gfxAddress, arg.eArgKind);
}
break;
default:
VP_PUBLIC_CHK_STATUS_RETURN(MOS_STATUS_UNIMPLEMENTED);
@ -269,48 +303,25 @@ MOS_STATUS VpRenderOclFcKernel::GetCurbeState(void *&curbe, uint32_t &curbeLengt
return MOS_STATUS_SUCCESS;
}
MOS_STATUS VpRenderOclFcKernel::SetupSurfaceState()
MOS_STATUS VpRenderOclFcKernel::GetKernelSurfaceParam(bool isBTI, SURFACE_PARAMS &surfParam, KERNEL_SURFACE_STATE_PARAM &kernelSurfaceParam)
{
VP_FUNC_CALL();
KERNEL_SURFACE_STATE_PARAM kernelSurfaceParam;
m_surfaceState.clear();
for (auto it = m_kernelBtis.begin(); it != m_kernelBtis.end(); ++it)
{
uint32_t argIndex = it->first;
uint32_t bti = it->second;
VP_RENDER_NORMALMESSAGE("Setting Surface State for OCL FC. KernelID %d, layer %d, argIndex %d , bti %d", m_kernelId, m_kernelIndex, argIndex, bti);
MOS_ZeroMemory(&kernelSurfaceParam, sizeof(KERNEL_SURFACE_STATE_PARAM));
kernelSurfaceParam.surfaceOverwriteParams.updatedRenderSurfaces = true;
kernelSurfaceParam.surfaceOverwriteParams.bindedKernel = true;
kernelSurfaceParam.surfaceOverwriteParams.bindedKernel = isBTI;
PRENDERHAL_SURFACE_STATE_PARAMS pRenderSurfaceParams = &kernelSurfaceParam.surfaceOverwriteParams.renderSurfaceParams;
pRenderSurfaceParams->bAVS = false;
pRenderSurfaceParams->Boundary = RENDERHAL_SS_BOUNDARY_ORIGINAL;
pRenderSurfaceParams->b2PlaneNV12NeededByKernel = true;
pRenderSurfaceParams->forceCommonSurfaceMessage = true;
SurfaceType surfType = SurfaceTypeInvalid;
MOS_HW_RESOURCE_DEF resourceType = MOS_HW_RESOURCE_USAGE_VP_INTERNAL_READ_WRITE_RENDER;
SurfaceType surfType = surfParam.surfType;
auto surfHandle = m_argIndexSurfMap.find(argIndex);
VP_PUBLIC_CHK_NOT_FOUND_RETURN(surfHandle, &m_argIndexSurfMap);
if (surfHandle->second.combineChannelY)
if (surfParam.combineChannelY)
{
pRenderSurfaceParams->combineChannelY = true;
}
surfType = surfHandle->second.surfType;
if (surfType == SurfaceTypeSubPlane || surfType == SurfaceTypeInvalid)
{
VP_RENDER_NORMALMESSAGE("Will skip surface argIndex %d, bti %d for its surf type is set as %d", argIndex, bti, surfType);
continue;
}
pRenderSurfaceParams->isOutput = surfHandle->second.isOutput;
if (m_surfaceState.find(surfType) != m_surfaceState.end())
{
UpdateCurbeBindingIndex(surfType, bti);
continue;
}
pRenderSurfaceParams->isOutput = surfParam.isOutput;
auto surf = m_surfaceGroup->find(surfType);
if (m_surfaceGroup->end() == surf)
{
@ -334,7 +345,7 @@ MOS_STATUS VpRenderOclFcKernel::SetupSurfaceState()
kernelSurfaceParam.surfaceOverwriteParams.height = MOS_MIN(static_cast<uint16_t>(surf->second->osSurface->dwHeight), static_cast<uint16_t>(surf->second->rcSrc.bottom));
}
if (surfHandle->second.needVerticalStirde)
if (surfParam.needVerticalStirde)
{
switch (surf->second->SampleType)
{
@ -361,10 +372,69 @@ MOS_STATUS VpRenderOclFcKernel::SetupSurfaceState()
kernelSurfaceParam.surfaceOverwriteParams.bufferResource = true;
}
return MOS_STATUS_SUCCESS;
}
MOS_STATUS VpRenderOclFcKernel::SetupSurfaceState()
{
VP_FUNC_CALL();
KERNEL_SURFACE_STATE_PARAM kernelSurfaceParam;
m_surfaceState.clear();
for (auto it = m_kernelBtis.begin(); it != m_kernelBtis.end(); ++it)
{
uint32_t argIndex = it->first;
uint32_t bti = it->second;
auto surfHandle = m_argIndexSurfMap.find(argIndex);
VP_PUBLIC_CHK_NOT_FOUND_RETURN(surfHandle, &m_argIndexSurfMap);
SURFACE_PARAMS &surfParam = surfHandle->second;
SurfaceType surfType = surfParam.surfType;
if (surfType == SurfaceTypeSubPlane || surfType == SurfaceTypeInvalid)
{
VP_RENDER_NORMALMESSAGE("Will skip surface argIndex %d, bti %d for its surf type is set as %d", argIndex, bti, surfType);
continue;
}
if (m_surfaceState.find(surfType) != m_surfaceState.end())
{
UpdateCurbeBindingIndex(surfType, bti);
continue;
}
VP_PUBLIC_CHK_STATUS_RETURN(GetKernelSurfaceParam(true, surfParam, kernelSurfaceParam));
m_surfaceState.emplace(surfType, kernelSurfaceParam);
UpdateCurbeBindingIndex(surfType, bti);
}
for (auto &handle : m_kernelArgs)
{
KRN_ARG &arg = handle.second;
if (arg.addressMode != AddressingModeBindless || arg.eArgKind != ARG_KIND_SURFACE)
{
continue;
}
uint32_t argIndex = arg.uIndex;
auto surfHandle = m_argIndexSurfMap.find(argIndex);
VP_PUBLIC_CHK_NOT_FOUND_RETURN(surfHandle, &m_argIndexSurfMap);
SURFACE_PARAMS &surfParam = surfHandle->second;
SurfaceType surfType = surfParam.surfType;
if (surfParam.planeIndex != 0 || surfType == SurfaceTypeSubPlane || surfType == SurfaceTypeInvalid)
{
VP_RENDER_NORMALMESSAGE("Will skip bindless surface argIndex %d for its planeIndex is set as %d, surfType %d", argIndex, surfParam.planeIndex, surfType);
continue;
}
if (m_surfaceState.find(surfType) != m_surfaceState.end())
{
continue;
}
VP_PUBLIC_CHK_STATUS_RETURN(GetKernelSurfaceParam(false, surfParam, kernelSurfaceParam));
m_surfaceState.insert(std::make_pair(surfType, kernelSurfaceParam));
}
return MOS_STATUS_SUCCESS;
}
@ -373,6 +443,18 @@ MOS_STATUS VpRenderOclFcKernel::GetWalkerSetting(KERNEL_WALKER_PARAMS &walkerPar
{
VP_FUNC_CALL();
if (m_renderHal && m_renderHal->isBindlessHeapInUse)
{
for (auto &handle : m_kernelArgs)
{
KRN_ARG &arg = handle.second;
if (arg.eArgKind == ARG_KIND_INLINE)
{
VP_PUBLIC_CHK_STATUS_RETURN(SetInlineDataParameter(arg, m_inlineData.data()));
}
}
}
walkerParam = m_walkerParam;
walkerParam.iBindingTable = renderData.bindingTable;
@ -406,6 +488,8 @@ MOS_STATUS VpRenderOclFcKernel::SetWalkerSetting(KERNEL_THREAD_SPACE &threadSpac
m_walkerParam.pipeControlParams.bFlushRenderTargetCache = false;
m_walkerParam.pipeControlParams.bInvalidateTextureCache = false;
if (m_renderHal == nullptr || m_renderHal->isBindlessHeapInUse == false)
{
for (auto &handle : m_kernelArgs)
{
KRN_ARG &arg = handle.second;
@ -422,6 +506,7 @@ MOS_STATUS VpRenderOclFcKernel::SetWalkerSetting(KERNEL_THREAD_SPACE &threadSpac
}
}
}
}
m_walkerParam.inlineDataLength = m_inlineData.size();
m_walkerParam.inlineData = m_inlineData.data();

View File

@ -55,6 +55,7 @@ protected:
virtual MOS_STATUS SetupSurfaceState() override;
virtual MOS_STATUS SetWalkerSetting(KERNEL_THREAD_SPACE &threadSpace, bool bSyncFlag, bool flushL1 = false);
virtual MOS_STATUS SetKernelArgs(KERNEL_ARGS &kernelArgs, VP_PACKET_SHARED_CONTEXT *sharedContext);
virtual MOS_STATUS GetKernelSurfaceParam(bool isBTI, SURFACE_PARAMS &surfParam, KERNEL_SURFACE_STATE_PARAM &kernelSurfaceParam);
PRENDERHAL_INTERFACE m_renderHal = nullptr;