本文整理汇总了C++中PVRSRV_DEVICE_NODE::pfnAllocMemTilingRange方法的典型用法代码示例。如果您正苦于以下问题:C++ PVRSRV_DEVICE_NODE::pfnAllocMemTilingRange方法的具体用法?C++ PVRSRV_DEVICE_NODE::pfnAllocMemTilingRange怎么用?C++ PVRSRV_DEVICE_NODE::pfnAllocMemTilingRange使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PVRSRV_DEVICE_NODE
的用法示例。
在下文中一共展示了PVRSRV_DEVICE_NODE::pfnAllocMemTilingRange方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PVRSRVMapDeviceClassMemoryKM
//.........这里部分代码省略.........
pvPageAlignedCPUVAddr,
&psMemInfo->ui32Flags,
&hBuffer);
if (!bBMError)
{
PVR_DPF((PVR_DBG_ERROR,"PVRSRVMapDeviceClassMemoryKM: BM_Wrap Failed"));
eError = PVRSRV_ERROR_BAD_MAPPING;
goto ErrorExitPhase2;
}
psMemBlock->sDevVirtAddr = BM_HandleToDevVaddr(hBuffer);
psMemBlock->hOSMemHandle = BM_HandleToOSMemHandle(hBuffer);
psMemBlock->hBuffer = (IMG_HANDLE)hBuffer;
psMemInfo->pvLinAddrKM = BM_HandleToCpuVaddr(hBuffer);
psMemInfo->sDevVAddr = psMemBlock->sDevVirtAddr;
psMemInfo->ui32AllocSize = ui32ByteSize;
psMemInfo->psKernelSyncInfo = psDeviceClassBuffer->psKernelSyncInfo;
psMemInfo->pvSysBackupBuffer = IMG_NULL;
psDCMapInfo->psMemInfo = psMemInfo;
#if defined(SUPPORT_MEMORY_TILING)
psDCMapInfo->psDeviceNode = psDeviceNode;
if(psDCMapInfo->ui32TilingStride > 0)
{
eError = psDeviceNode->pfnAllocMemTilingRange(psDeviceNode,
psMemInfo,
psDCMapInfo->ui32TilingStride,
&psDCMapInfo->ui32RangeIndex);
if (eError != PVRSRV_OK)
{
PVR_DPF((PVR_DBG_ERROR,"PVRSRVMapDeviceClassMemoryKM: AllocMemTilingRange failed"));
goto ErrorExitPhase3;
}
}
#endif
psMemInfo->sMemBlk.hResItem = ResManRegisterRes(psPerProc->hResManContext,
RESMAN_TYPE_DEVICECLASSMEM_MAPPING,
psDCMapInfo,
0,
&UnmapDeviceClassMemoryCallBack);
psMemInfo->ui32RefCount++;
psMemInfo->memType = PVRSRV_MEMTYPE_DEVICECLASS;
*ppsMemInfo = psMemInfo;
#if defined(SUPPORT_PDUMP_MULTI_PROCESS)
PDUMPCOMMENT("Dump display surface");
PDUMPMEM(IMG_NULL, psMemInfo, ui32Offset, psMemInfo->ui32AllocSize, PDUMP_FLAGS_CONTINUOUS, ((BM_BUF*)psMemInfo->sMemBlk.hBuffer)->pMapping);
#endif
return PVRSRV_OK;
#if defined(SUPPORT_MEMORY_TILING)
ErrorExitPhase3:
if(psMemInfo)
{
FreeDeviceMem(psMemInfo);
psMemInfo = IMG_NULL;
}
#endif
ErrorExitPhase2:
if(psMemInfo)
{
OSFreeMem(PVRSRV_PAGEABLE_SELECT, sizeof(PVRSRV_KERNEL_MEM_INFO), psMemInfo, IMG_NULL);
}
ErrorExitPhase1:
if(psDCMapInfo)
{
OSFreeMem(PVRSRV_OS_PAGEABLE_HEAP, sizeof(PVRSRV_KERNEL_MEM_INFO), psDCMapInfo, IMG_NULL);
}
return eError;
}