mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
Refactor allocateGraphicsMemoryInPreferredPool
- extend AllocationType to code necessary flags - remove redundant args - refactor Buffer::create() Change-Id: Ic4b2e0931fad8198ad1cf4f79de210d815048ccf
This commit is contained in:
committed by
sys_ocldev
parent
c2454d5aa2
commit
4441387969
@@ -849,7 +849,7 @@ cl_int Program::parseProgramScopePatchList() {
|
||||
|
||||
surfaceSize = patch.InlineDataSize;
|
||||
headerSize = sizeof(SPatchAllocateConstantMemorySurfaceProgramBinaryInfo);
|
||||
constantSurface = pDevice->getMemoryManager()->allocateGraphicsMemoryInPreferredPool(true, true, false, false, nullptr, surfaceSize, GraphicsAllocation::AllocationType::CONSTANT_SURFACE);
|
||||
constantSurface = pDevice->getMemoryManager()->allocateGraphicsMemoryInPreferredPool(true, nullptr, surfaceSize, GraphicsAllocation::AllocationType::CONSTANT_SURFACE);
|
||||
|
||||
memcpy_s(constantSurface->getUnderlyingBuffer(), surfaceSize, (cl_char *)pPatch + headerSize, surfaceSize);
|
||||
pCurPatchListPtr = ptrOffset(pCurPatchListPtr, surfaceSize);
|
||||
@@ -871,7 +871,7 @@ cl_int Program::parseProgramScopePatchList() {
|
||||
surfaceSize = patch.InlineDataSize;
|
||||
globalVarTotalSize += (size_t)surfaceSize;
|
||||
headerSize = sizeof(SPatchAllocateGlobalMemorySurfaceProgramBinaryInfo);
|
||||
globalSurface = pDevice->getMemoryManager()->allocateGraphicsMemoryInPreferredPool(true, true, false, false, nullptr, surfaceSize, GraphicsAllocation::AllocationType::GLOBAL_SURFACE);
|
||||
globalSurface = pDevice->getMemoryManager()->allocateGraphicsMemoryInPreferredPool(true, nullptr, surfaceSize, GraphicsAllocation::AllocationType::GLOBAL_SURFACE);
|
||||
|
||||
memcpy_s(globalSurface->getUnderlyingBuffer(), surfaceSize, (cl_char *)pPatch + headerSize, surfaceSize);
|
||||
pCurPatchListPtr = ptrOffset(pCurPatchListPtr, surfaceSize);
|
||||
|
||||
Reference in New Issue
Block a user